2009-07-07 Pavel Roskin <proski@gnu.org>
[grub2/bean.git] / ChangeLog
blob3fe273f639c6fddcf6c199a123de28695c28cf13
1 2009-07-07  Pavel Roskin  <proski@gnu.org>
3         * commands/search.c (search_file): Merge into ...
4         (search_fs): ... this.  Accept search type as argument.
5         (grub_cmd_search): Pass search type to search_fs().
7         * include/grub/util/console.h: New file.
8         * util/console.c: Use it instead of grub/machine/console.h.
9         * util/grub-emu.c: Likewise.
11         * lib/arg.c (find_long_option): Remove.
12         (find_long): Add `len' argument, make `s' const char *.
13         (grub_arg_parse): Parse long options in place, not in a
14         temporary buffer.
16 2009-07-06  Pavel Roskin  <proski@gnu.org>
18         * commands/search.c (search_fs): Fix potential NULL pointer
19         dereference.
21         * commands/search.c (search_fs): Replace QUID macro with quid_fn
22         function pointer.
24 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
26         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
27         comparison.
29 2009-07-05  Pavel Roskin  <proski@gnu.org>
31         * include/grub/i386/linux.h (struct linux_kernel_params):
32         Restore padding3, it's still needed.
34         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
35         FreeBSD.
36         * util/osdetect.lua: Likewise.
38 2009-07-05  Bean  <bean123ch@gmail.com>
40         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
42         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
43         (grub_lua_getenv): Likewise.
44         (grub_lua_setenv): Likewise.
45         (save_errno): New function.
46         (push_result): Likewise.
47         (grub_lua_enum_device): Likewise.
48         (grub_lua_enum_file): Likewise.
49         (grub_lua_file_open): Likewise.
50         (grub_lua_file_close): Likewise.
51         (grub_lua_file_seek): Likewise.
52         (grub_lua_file_read): Likewise.
53         (grub_lua_file_getline): Likewise.
54         (grub_lua_file_getsize): Likewise.
55         (grub_lua_file_getpos): Likewise.
56         (grub_lua_file_eof): Likewise.
57         (grub_lua_file_exist): Likewise.
58         (grub_lua_add_menu): Likewise.
60         * script/lua/grub_lua.h (isupper): New inline function.
61         (islower): Likewise.
62         (ispunct): Likewise.
63         (isxdigit): Likewise.
64         (strcspn): Change to normal function.
65         (strpbkr): New function declaration.
66         (memchr): Likewise.
68         * script/lua/grub_main.c (scan_str): New function.
69         (strcspn): Likewise.
70         (strpbrk): Likewise.
71         (memchr): Likewise.
73         * script/lua/linit.c (lualibs): Enable the string library.
75         * util/osdetect.lua: New file.
77 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
79         * include/grub/i386/linux.h (struct linux_kernel_params): Add
80         `capabilities' member.
82 2009-07-02  Pavel Roskin  <proski@gnu.org>
84         * genparttoollist.sh: Add missing newline at the end.
86 2009-07-01  Pavel Roskin  <proski@gnu.org>
88         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
90         * util/hostdisk.c (open_device): Remove `const' from
91         `sysctl_size', as sysctlbyname() can change it (in this case it
92         doesn't actually happen).
94         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
95         using signed long int constants.
97         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
98         constant to avoid a warning on FreeBSD.
100         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
101         where it's needed.
103         * Makefile.in: Install include/grub/machine symlink.
105         * Makefile.in: When installing symlinks, use "cp -fR", which
106         works on FreeBSD and MacOSX.
107         From Yves Blusseau <cl7m42e02@sneakemail.com>
109         * kern/dl.c (grub_dl_resolve_symbol): Make static.
110         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
112         * util/misc.c: Move grub_reboot() and grub_halt() ...
113         * util/grub-emu.c: ... here.  Make main_env static.
114         * include/grub/util/misc.h: Remove main_env.
116         * kern/mm.c: Use correct format to print size_t.
118         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
119         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
120         * kern/powerpc/dl.c: Likewise.
121         * kern/sparc64/dl.c: Likewise.
122         * kern/x86_64/dl.c: Likewise.
124 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
126         Fix grub-emu build on sparc64-ieee1275.
128         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
129         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
131 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
133         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
134         (grub_reboot, grub_halt): New functions.
136         * util/i386/pc/misc.c: Delete.  Update all users.
137         * util/sparc64/ieee1275/misc.c: Likewise.
138         * util/powerpc/ieee1275/misc.c: Likewise.
140 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
142         * conf/i386.rmk (setjmp_mod_SOURCES)
143         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
144         * conf/common.rmk (setjmp_mod_SOURCES)
145         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
146         to use $(target_cpu).
147         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
148         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
149         * conf/powerpc-ieee1275.rmk: Likewise.
150         * conf/sparc64-ieee1275.rmk: Likewise.
152         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
153         $(target_cpu) for kern/$(target_cpu)/dl.c.
154         * conf/i386-efi.rmk: Likewise.
155         * conf/i386-ieee1275.rmk: Likewise.
156         * conf/x86_64-efi.rmk: Likewise.
157         * conf/i386-coreboot.rmk: Likewise.
158         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
159         $(target_cpu) for kern/$(target_cpu)/dl.c and for
160         kern/$(target_cpu)/cache.S.
161         * conf/sparc64-ieee1275.rmk: Likewise.
163 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
165         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
166         type to `grub_uint8_t', and adjust `padding9' accordingly.
168 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
170         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
172         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
173         assembly in final jump, using register constraints.
175         (grub_linux_boot): For text mode, initialize `have_vga' using
176         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
178         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
179         right before the final jump.
181         Set `video_mode' to 0x3.
183         Document initialization of `video_page', `video_mode' and
184         `video_ega_bx'.
186 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
188         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
189         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
190         and set GRUB_LINUX_FLAG_QUIET appropiately.
192 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
194         Fix build on Debian / sparc.
196         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
198 2009-06-28  Pavel Roskin  <proski@gnu.org>
200         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
201         fix a warning.
203         * util/grub.d/10_linux.in: Match SUSE style initrd names.
205 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
207         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
208         `err'.
210 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
212         Revert r2338.
214         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
215         file can't be opened.  grub_file_open() is already supposed to set
216         grub_errno / grub_errmsg appropiately.
217         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
219 2009-06-27  Pavel Roskin  <proski@gnu.org>
220 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
222         * include/grub/dl.h: Include grub/elf.h.
223         (struct grub_dl): Add symtab field.
224         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
225         GRUB_MODULES_MACHINE_READONLY.
226         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
227         of the header for read-only modules.
228         (grub_dl_unload): Free mod->symtab for read-only modules.
229         * kern/i386/dl.c: Use mod->symtab.
230         * kern/powerpc/dl.c: Likewise.
231         * kern/sparc64/dl.c: Likewise.
232         * kern/x86_64/dl.c: Likewise.
234         * conf/i386-qemu.rmk: New file.
235         * kern/i386/qemu/startup.S: Likewise.
236         * kern/i386/qemu/mmap.c: Likewise.
237         * boot/i386/qemu/boot.S: Likewise.
238         * include/grub/i386/qemu/time.h: Likewise.
239         * include/grub/i386/qemu/serial.h: Likewise.
240         * include/grub/i386/qemu/kernel.h: Likewise.
241         * include/grub/i386/qemu/console.h: Likewise.
242         * include/grub/i386/qemu/boot.h: Likewise.
243         * include/grub/i386/qemu/init.h: Likewise.
244         * include/grub/i386/qemu/machine.h: Likewise.
245         * include/grub/i386/qemu/loader.h: Likewise.
246         * include/grub/i386/qemu/memory.h: Likewise.
248         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
249         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
250         [qemu] (pkglib_IMAGES): Add `boot.img'.
251         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
252         [qemu] (boot_img_FORMAT): New variables.
253         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
254         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
255         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
256         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
257         [qemu] (kernel_img_FORMAT): New variables.
259         * configure.ac: Recognise `i386-qemu'.
261         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
262         (for no compression).
263         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
264         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
265         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
266         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
267         ifdefs).
269 2009-06-27  Pavel Roskin  <proski@gnu.org>
271         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
272         read.
273         * efiemu/prepare32.c: Likewise.
274         * efiemu/prepare64.c: Likewise.
276 2009-06-26  Pavel Roskin  <proski@gnu.org>
278         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
279         * include/grub/elf.h: Define symbols without "32" or "64" based
280         on GRUB_TARGET_WORDSIZE.
281         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
282         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
283         ELF definitions.
284         * efiemu/loadcore64.c: Likewise.
285         * loader/i386/bsd32.c: Likewise.
286         * loader/i386/bsd64.c: Likewise.
287         * kern/dl.c: Remove own ELF definitions.
288         * util/i386/efi/grub-mkimage.c: Likewise.
290 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
292         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
293         segment 0x0 unconditionally, because the reference generated by
294         GAS is an absolute address.
296 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
298         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
299         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
301 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
303         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
304         indexes.  Check for -f explicitly.
305         (search_file): Improve error message.
306         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
308 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
310         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
311         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
313 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
315         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
316         * conf/i386-ieee1275.rmk: Likewise.
317         * conf/i386-coreboot.rmk: Likewise.
319         * kern/i386/pc/startup.S (grub_stop): Remove function.
320         * kern/i386/ieee1275/startup.S: Likewise.
321         * kern/i386/coreboot/startup.S: Likewise.
322         * kern/i386/misc.S (grub_stop): New function.
324 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
326         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
327         * kern/i386/realmode.S (real_to_prot): ... to here.
329 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
331         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
332         with `kernel.img'.
333         (kernel_elf_SOURCES): Rename to ...
334         (kernel_img_SOURCES): ... this.
335         (kernel_elf_HEADERS): Rename to ...
336         (kernel_img_HEADERS): ... this.  Update all users.
337         (kernel_elf_ASFLAGS): Rename to ...
338         (kernel_img_ASFLAGS): ... this.
339         (kernel_elf_CFLAGS): Rename to ...
340         (kernel_img_CFLAGS): ... this.
341         (kernel_elf_LDFLAGS): Rename to ...
342         (kernel_img_LDFLAGS): ... this.
343         * conf/i386-coreboot.rmk: Likewise.
344         * conf/powerpc-ieee1275.rmk: Likewise.
346         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
347         with "kernel.img".
349 2009-06-21  Pavel Roskin  <proski@gnu.org>
351         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
352         to match nested functions.
353         * loader/sparc64/ieee1275/linux.c: Likewise.
355         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
357 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
359         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
360         all i386 platforms.
362 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
364         Fix asm file handling on ELF, and remove workarounds.
366         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
367         and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
368         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
369         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
371 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
373         Load BSD ELF modules
375         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
376         and loader/i386/bsd64.c
377         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
378         (FREEBSD_MODTYPE_ELF_MODULE): New definition
379         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
380         (grub_freebsd_load_elfmodule32): New declaration
381         (grub_freebsd_load_elfmoduleobj64): Likewise
382         (grub_freebsd_load_elf_meta32): Likewise
383         (grub_freebsd_load_elf_meta64): Likewise
384         (grub_freebsd_add_meta): Likewise
385         (grub_freebsd_add_meta_module): Likewise
386         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
387         (grub_freebsd_add_meta_module): Likewise and move module-specific
388         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
389         (grub_cmd_freebsd): Add elf-kernel specific parts
390         based on grub_freebsd_add_meta_module
391         (grub_cmd_freebsd_module): Add type parsing moved from
392         grub_freebsd_add_meta_module
393         (grub_cmd_freebsd_module_elf): New function
394         (cmd_freebsd_module_elf): New variable
395         (GRUB_MOD_INIT): Register freebsd_module_elf
396         * loader/i386/bsd32.c: New file
397         * loader/i386/bsd64.c: Likewise
398         * loader/i386/bsdXX.c: Likewise
399         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
400         (grub_elf64_load): Likewise
401         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
402         All users updated
403         (grub_elf64_load_hook_t): Likewise
405 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
407         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
408         variable.
409         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
410         don't write a menu entry for recovery mode.
412 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
414         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
415         after it's no longer needed.
417 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
419         * include/grub/i386/loader.h (grub_linux_prot_size)
420         (grub_linux_tmp_addr, grub_linux_real_addr)
421         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
422         GRUB_MACHINE_PCBIOS.
423         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
424         common grub_util_info() call to ...
425         (generate_image): ... here.
426         Fix use of uninitialized memory, comparison of signed with
427         unsigned integers and memory leak.
428         Remove bogus module address message.
430 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
432         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
433         grub_raid_register
434         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
436 2009-06-19  Pavel Roskin  <proski@gnu.org>
438         * configure.ac: Remove stray AC_MSG_CHECKING.
440 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
442         * disk/scsi.c (grub_scsi_open): use continue instead of big if
444 2009-06-18  Pavel Roskin  <proski@gnu.org>
446         * conf/common.rmk: Add fs_file.mod.
447         * disk/fs_file.c: New file.
448         * include/grub/disk.h (enum grub_disk_dev_id): Add
449         GRUB_DISK_DEVICE_FILE_ID.
451 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
453         Fix build with Apple's toolchain. Part 2
455         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
456         a fake start
458 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
460         Fix build with Apple's toolchain. Part 1
462         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
463         for long calls
464         * configure.ac: remove a leftover AC_MSG_RESULT
465         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
466         Apple's toolchain
468 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
470         Fix warnings
472         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
473         (decomp_block): initialize ch
474         use grub_memcpy instead of memcpy
476 2009-06-17  Pavel Roskin  <proski@gnu.org>
478         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
479         version, use declarations needed to use vga_text as the startup
480         console.
482         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
483         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
484         the kernel.
485         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
486         and grub_at_keyboard_fini(), it's done on module load and
487         unload.
489 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
491         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
492         file can't be found.
493         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
495 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
497         Fix newline handling
499         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
500         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
501         (grub_script_yylex): don't segfault on unterminated script
502         newline terminates command and variable
504 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
506         avoid double grub_adjust_range call. Bug reported by David Simner
508         * kern/disk.c (grub_disk_write): change to raw disk access before
509         calling disk_read
511 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
513         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
514         spaces, for the benefit of help2man.
515         * util/i386/efi/grub-mkimage.c (usage): Likewise.
517 2009-06-16  Pavel Roskin  <proski@gnu.org>
519         * kern/i386/halt.c: Include grub/machine/init.h.
520         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
522 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
524         * util/grub.d/30_os-prober.in: Use ${root} in the generated
525         drivemap menuentry.
527 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
529         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
530         `echo' command.
532 2009-06-16  Pavel Roskin  <proski@gnu.org>
534         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
535         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
536         save %dx, we only need %dl and we never change it.
537         * boot/i386/pc/cdboot.S: Don't set the root drive.
538         * boot/i386/pc/pxeboot.S: Likewise.
539         * include/grub/i386/pc/boot.h: Remove
540         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
541         GRUB_BOOT_MACHINE_DRIVE_CHECK.
542         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
543         * kern/i386/pc/init.c (make_install_device): Remove references
544         to grub_root_drive.
545         * kern/i386/pc/startup.S: Likewise.
546         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
548 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
550         xnu_uuid command
552         * commands/xnu_uuid.c: new file
553         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
554         (xnu_uuid_mod_SOURCES): new variable
555         (xnu_uuid_mod_CFLAGS): likewise
556         (xnu_uuid_mod_LDFLAGS): likewise
557         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
558         * conf/i386-ieee1275.rmk: likewise
559         * conf/i386-pc.rmk: likewise
560         * conf/powerpc-ieee1275.rmk: likewise
561         * conf/sparc64-ieee1275.rmk: likewise
562         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
564 2009-06-16  Pavel Roskin  <proski@gnu.org>
566         * configure.ac: Avoid '==' in test command, it's not portable.
568 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
570         Probe command
572         * commands/probe.c: new file
573         * conf/common.rmk (pkglib_MODULES): add probe.mod
574         (probe_mod_SOURCES): new variable
575         (probe_mod_CFLAGS): likewise
576         (probe_mod_LDFLAGS): likewise
577         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
578         * conf/i386-ieee1275.rmk: likewise
579         * conf/i386-pc.rmk: likewise
580         * conf/powerpc-ieee1275.rmk: likewise
581         * conf/sparc64-ieee1275.rmk: likewise
583 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
585         Fix handling of string like \"hello\" and "a
586         b"
588         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
589         (grub_script_yylex): fix parsing of quoting, escaping and newline
591 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
593         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
594         handling
596 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
598         * util/grub-mkconfig.in: Fix parsing of --output option.
600 2009-06-12  Pavel Roskin  <proski@gnu.org>
602         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
603         genmk.rb don't need to be generated or installed.
605 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
607         * commands/i386/pc/drivemap_int13h.S: add more comments
609 2009-06-11  Pavel Roskin  <proski@gnu.org>
611         * Makefile.in (uninstall): Uninstall manuals.
613         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
614         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
615         and update-grub_lib in two places.
616         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
618         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
619         a compiler warning.
621         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
622         `entry_lo' to fix variable shadowing.
624 2009-06-11  Christian Franke  <franke@computer.org>
626         * kern/misc.c (__enable_execute_stack): Add missing return type
627         to prevent gcc warning.
629 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
631         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
633 2009-06-11  Pavel Roskin  <proski@gnu.org>
635         * Makefile.in: Don't rely on any scripts being executable.
636         Always use $(SHELL) to run shell scripts.
638         * configure.ac: Always define ___main if using -nostdlib.  This
639         fixes tests on Cygwin.
641 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
643         UDF fix
645         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
646         is in bytes and not in blocks
648 2009-06-11  Pavel Roskin  <proski@gnu.org>
650         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
651         warning.
653 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
655         * util/grub.d/30_os-prober.in: Fix a comment. Source
656         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
657         to set the root device.  Place drivemap command in the generated
658         chain entry.
660 2009-06-11  Pavel Roskin  <proski@gnu.org>
662         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
663         have long been resolved.
665 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
667         * util/grub.d/10_linux.in: Capitalise "Linux".
669         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
671 2009-06-11  Pavel Roskin  <proski@gnu.org>
673         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
674         fix a gcc warning and ensure that the function won't ever exit.
676         * kern/i386/ieee1275/init.c: Add missing prototype for
677         grub_stop_floppy().
679         * loader/ieee1275/multiboot2.c [__i386__]: Include
680         grub/cpu/multiboot.h.
682         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
683         casts to short - they are not portable and cause warnings.  Fix
684         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
686 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
688         Drivemap fixes
690         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
691         new function
692         (grub_get_root_biosnumber_saved): new variable
693         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
694         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
695         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
696         %dx after the call if necessary
697         * conf/common.rmk (pkglib_MODULES): remove boot.mod
698         (boot_mod_SOURCES): remove
699         (boot_mod_CFLAGS): remove
700         (boot_mod_LDFLAGS): remove
701         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
702         (boot_mod_SOURCES): new variable
703         (boot_mod_CFLAGS): likewise
704         (boot_mod_LDFLAGS): likewise
705         * conf/i386-efi.rmk: likewise
706         * conf/i386-ieee1275.rmk: likewise
707         * conf/i386-pc.rmk: likewise
708         * conf/powerpc-ieee1275.rmk: likewise
709         * conf/sparc64-ieee1275.rmk: likewise
710         * conf/x86_64-efi.rmk: likewise
711         * include/grub/i386/pc/biosnum.h: new file
712         * lib/i386/pc/biosnum.c: likewise
713         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
714         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
715         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
717 2009-06-10  Pavel Roskin  <proski@gnu.org>
719         * io/gzio.c (test_header): Don't reuse one buffer for all data.
720         Use separate variables.  Read only the file size at the end, but
721         not the checksum that we don't use.
723         * kern/file.c (grub_file_read): Use void pointer for the buffer.
724         Adjust all callers.
726         * kern/ieee1275/openfw.c: Remove libc includes.
727         * kern/ieee1275/cmain.c: Likewise.
728         * include/grub/ieee1275/ieee1275.h: Likewise.
730         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
731         compiler warnings.
733 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
735         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
736         `genparttoollist.sh'.
737         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
738         Add `*.sh' to the list find searches for and change `mdate.sh'
739         to `mdate-sh'.
741 2009-06-10  Pavel Roskin  <proski@gnu.org>
743         * include/grub/multiboot2.h: Provide compatibility defines for
744         multiboot2.h.
745         * include/multiboot2.h: Include stdint.h only if needed, using
746         angle brackets.
747         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
748         grub/multiboot2.h.
749         * loader/ieee1275/multiboot2.c: Likewise.
750         * loader/multiboot2.c: Likewise.
751         * loader/multiboot_loader.c: Likewise.
753         * configure.ac: Use -nostdlib when probing for the target.  It
754         should not be required to have libc for the target.
756         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
757         they fail without libc headers for the target.
758         * include/grub/powerpc/libgcc.h: Use weak attribute for all
759         exports.
760         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
761         preprocessor conditionals.
763         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
764         build system doesn't need to be aware of the tar.c internals.
766 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
768         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
770 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
772         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
773         disk limit to 26 for IDE, Virtio, Xen and SCSI.
775 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
777         * util/i386/pc/grub-install.in: Change the error message if UUIDs
778         aren't available if ata.mod gets used.
780 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
782         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
783         initialising controller.
784         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
786 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
788         * util/i386/pc/grub-install.in: Add a parameter --disk-module
789         to choose between ata and biosdisk module on i386-pc.
791 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
793         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
794         Subclass and Programming Interface fields in terms of the 3 byte
795         Class Code register.
796         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
798         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
799         interface is OHCI.  Add grub_dprintf for symmetry with
800         bus/usb/uhci.c.
801         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
802         interface is UHCI.  Add interf variable for programming
803         interface.  Print interface with class/subclass.
805         * bus/usb/ohci.c: Set interf with correct field.
807         * bus/usb/uhci.c: Remove unneeded doubled lines.
808         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
809         Remove whitespace inside comment.
811 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
813         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
814         as fallback an equivalent option without depth.
816 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
818         Not fail if unable to retrieve C/H/S on LBA disks
820         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
821         if unable to retrieve C/H/S on LBA disks
823 2009-06-08  Pavel Roskin  <proski@gnu.org>
825         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
826         about aliasing.
828 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
830         * Makefile.in (uninstall): Remove all $lib_DATA files.
832 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
834         Bugfix: install on partitionless device
836         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
837         is a whole disk
839 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
841         * Makefile.in (uninstall): Remove all $include_DATA files.
843 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
845         * commands/true.c: New file.  Implement the true and false commands.
846         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
847         (true_mod_SOURCES): New variable.
848         (true_mod_CFLAGS): Likewise.
849         (true_mod_LDFLAGS): Likewise.
851 2009-06-05  Colin D Bennett  <colin@gibibit.com>
853         Optimized font character lookup using binary search instead of linear
854         search.  Fonts now are required to have the character index ordered by
855         code point.
857         * font/font.c (load_font_index): Verify that fonts have ordered
858         character indices.
859         (find_glyph): Use binary search instead of linear search to find a
860         character in a font.
862 2009-06-05  Michael Scherer  <misc@mandriva.org>
864         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
865         uses case sensitive btree.
866         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
867         only for case insensitive filesystems.
869 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
871         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
872         * conf/common.rmk (search_mod_CFLAGS): likewise
874 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
876         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
877         compensate a compiler bug
879 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
881         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
882         instead of '\b'
884 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
886         Definitions for creating asm symbols with Apple's CC
888         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
889         [APPLE_CC] (VARIABLE): likewise
891 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
893         Disable lnxboot.img when compiled
894         with Apple's CC
896         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
897         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
898         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
899         [! APPLE_CC] (CODE_LENG): skip
900         [! APPLE_CC] (setup_sects): likewise
901         [! APPLE_CC]: skip filling
903 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
905         Address in trampolines based on 32-bit registers when compiled
906         with Apple's CC
908         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
909         for addresses
910         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
912 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
914         Avoid aliases when compiling with Apple's CC for PCBIOS machine
916         * kern/misc.c [APPLE_CC] (memcpy): new function
917         [APPLE_CC] (memmove): likewise
918         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
919         (memcpy): define alias conditionally on !APPLE_CC
920         (memset): likewise
921         (abort): likewise
922         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
923         APPLE_CC are defined
924         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
925         (grub_assert_fail): make prototype conditional
927 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
929         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
931         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
932         grub-macho2img
933         (CLEANFILES): add grub-macho2img
934         (grub_macho2img_SOURCES): new variable
935         * kern/i386/pc/startup.S (bss_start): new variable
936         (bss_end): likewise
937         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
938         * util/grub-macho2img.c: new file
940 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
942         Use objconv when compiling with Apple's CC
944         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
945         (efiemu64.o): likewise
946         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
947         when compiling with Apple's CC
948         (efiemu64_s.o): likewise
949         * configure.ac: check for objconv when compiling with Apple's CC
950         * genmk.rb: use objconv for modules when compiled with Apple's CC
952 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
954         Define segment as well as section when compiling with
955         Apple's CC
957         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
958         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
959         (efiemu_convert_pointer): likewise
960         (efiemu_set_virtual_address_map): likewise
961         (efiemu_convert_pointer): likewise
962         (efiemu_getcrc32): likewise
963         (init_crc32_table): likewise
964         (reflect): likewise
965         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
966         (GRUB_MOD_DEP): likewise
968 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
970         Allow a compilation without -mcmodel=large
972         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
973         when compiled without -mcmodel=large
974         (filter_memory_map): remove memory post 4 GiB when compiled
975         without -mcmodel=large
976         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
977         TARGET_CFLAGS when -mcmodel=large isn't supported
979 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
981         Remove nested functions in efiemu core
983         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
985 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
987         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
989         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
990         temporary storage
991         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
992         using Apple's CC
993         (grub_cpu_is_tsc_supported): likewise
994         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
996 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
998         Absolute addressing through constant with Apple's cc
1000         * kern/i386/pc/startup.S: Define necessary constants
1001         and address through it when using ABS with Apple's CC
1002         * boot/i386/pc/diskboot.S: likewise
1003         * boot/i386/pc/boot.S: likewise
1004         * boot/i386/pc/lnxboot.S: likewise
1005         * boot/i386/pc/cdboot.S: likewise
1006         * mmap/i386/pc/mmap_helper.S: likewise
1007         * commands/i386/pc/drivemap_int13h.S: likewise
1009 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1011         Check if compiler is apple cc
1013         * Makefile.in (ASFLAGS): new variable
1014         (TARGET_ASFLAGS): likewise
1015         (TARGET_MODULE_FORMAT): likewise
1016         (TARGET_APPLE_CC): likewise
1017         (OBJCONV): likewise
1018         (TARGET_IMG_CFLAGS): likewise
1019         (TARGET_CPPFLAGS): add includedir
1020         * configure.ac: call grub_apple_cc and grub_apple_target_cc
1021         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1022         Check for linker script only if compiler isn't Apple's CC
1023         (TARGET_MODULE_FORMAT): set
1024         (TARGET_APPLE_CC): likewise
1025         (TARGET_ASFLAGS): likewise
1026         (ASFLAGS): likewise
1027         Check for objcopy only if compiler isn't Apple's CC
1028         Check for BSS symbol only if compiler isn't Apple's CC
1029         * genmk.rb: adapt nm options if we use Apple's utils
1030         * aclocal.m4 (grub_apple_cc): new test
1031         (grub_apple_target_cc): likewise
1033 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1035         Simplify sed expressions and improve awk
1037         * Makefile.in (install-local): simplify sed expression
1038         * gencmdlist.sh: likewise
1039         * genmoddep.awk: avoid adding module as a dependency of itself
1041 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1043         Add missing start symbols
1045         * boot/i386/pc/boot.S: add start
1046         * boot/i386/pc/pxeboot.S: likewise
1048 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1050         Fix wrong assumptions with grub-mkimage on EFI
1052         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1053         (relocate_addresses): consider both r_addend and value at offset
1054         (make_mods_section): zerofill modinfo and header
1055         (convert_elf): write prefix here
1057 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1059         Use .asciz instead of .string
1061         * i386/pc/diskboot.S: use .asciz instead of .string
1062         * i386/pc/boot.S: likewise
1063         * include/grub/dl.h (GRUB_MOD_DEP): likewise
1064         (GRUB_MOD_NAME): likewise
1066 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1068         gfxpayload support
1070         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1071         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1072         (grub_video_setup): remove
1073         (grub_video_set_mode): new prototype
1074         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1075         (vid_mode): remove
1076         (linux_vesafb_res): compile only on PCBIOS
1077         (grub_linux_boot): support gfxpayload
1078         * loader/i386/pc/xnu.c (video_hook): new function
1079         (grub_xnu_set_video): support gfxpayload
1080         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1081         (DEFAULT_VIDEO_HEIGHT): likewise
1082         (DEFAULT_VIDEO_FLAGS): likewise
1083         (DEFAULT_VIDEO_MODE): new definition
1084         (video_hook): new function
1085         (grub_gfxterm_init): use grub_video_set_mode
1086         * util/grub.d/30_os-prober.in: remove explicit modesetting before
1087         loading xnu
1088         * video/video.c (grub_video_setup): removed
1089         (grub_video_set_mode): new function based on grub_gfxterm_init and
1090         grub_video_setup
1092 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1094         Avoid calling biosdisk in drivemap
1096         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1097         (revparse_biosdisk): likewise
1098         (list_mappings): derive name from id directly
1099         (grub_cmd_drivemap): use tryparse_diskstring
1101 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1103         Script fixes
1105         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1106         (grub_lexer_param): add tokenonhold
1107         (grub_script_create_cmdline): remove cmdline. All callers updated
1108         (grub_script_function_create): make functionname
1109         grub_script_arg. All callers updated
1110         (grub_script_execute_argument_to_string): new prototype
1111         * kern/parser.c (state_transitions): reorder
1112         (grub_parser_cmdline_state): fix a bug and make more compact
1113         * script/sh/execute.c (grub_script_execute_argument_to_string):
1114         make global
1115         (grub_script_execute_cmdline): use new format
1116         * script/sh/function.c (grub_script_function_create): make functionname
1117         grub_script_arg. All callers updated
1118         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1119         (grub_script_yylex): remove
1120         (grub_script_yylex2): renamed to ...
1121         (grub_script_yylex): ...renamed
1122         parse the expressions like a${b}c
1123         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1124         (GRUB_PARSER_TOKEN_VAR): remove
1125         (GRUB_PARSER_TOKEN_NAME): likewise
1126         ("if"): declare as typeless
1127         ("while"): likewise
1128         ("function"): likewise
1129         ("else"): likewise
1130         ("then"): likewise
1131         ("fi"): likewise
1132         (text): remove
1133         (argument): likewise
1134         (script): accept empty scripts and make exit on error
1135         (arguments): use GRUB_PARSER_TOKEN_ARG
1136         (function): likewise
1137         (command): move error handling to script
1138         (menuentry): move grub_script_lexer_ref before
1139         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1140         argument. All callers updated
1142 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1144         Prevent GRUB from probing floppies during boot.
1146         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1147         * commands/search.c (options): Add --no-floppy.
1148         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1149         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1150         --no-floppy when searching for UUIDs.
1152 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1154         Simplify the code duplication in commands/search.c.
1156         * commands/search.c (search_label, search_fs_uuid): Merge into ...
1157         (search_fs): ... this.  Update all users.
1159 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
1161         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1163 2009-05-28  Pavel Roskin  <proski@gnu.org>
1165         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1166         Remove the original symlink explicitly.
1168         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1169         just one slash.  That's how grub_fshelp_find_file() does it.
1171 2009-05-26  Pavel Roskin  <proski@gnu.org>
1173         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1174         to `str'.
1176         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1177         possibly unused.
1179 2009-05-25  Christian Franke  <franke@computer.org>
1181         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1182         register.
1183         (grub_atapi_identify): Add wait after drive select.
1184         (grub_ata_identify): Do more strict status register check before
1185         calling grub_atapi_identify ().  Suppress error message if status
1186         register is 0x00 after command failure.  Add status register
1187         check after PIO read to avoid bogus identify due to stuck DRQ.
1188         Thanks to Pavel Roskin for testing.
1189         (grub_device_initialize): Remove unsafe status register check.
1190         Thanks to 'phcoder' for problem report and patch.
1191         Prevent sign extension in debug message.
1193 2009-05-23  Colin D Bennett  <colin@gibibit.com>
1195         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
1196         definition file, and functions defined in `normal/menu.c' have had
1197         their prototypes moved to `include/grub/menu.h' for consistency.
1199         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1200         from normal.h.
1201         (grub_menu_get_entry): Likewise.
1202         (grub_menu_get_timeout): Likewise.
1203         (grub_menu_set_timeout): Likewise.
1204         (grub_menu_execute_entry): Likewise.
1205         (grub_menu_execute_with_fallback): Likewise.
1206         (grub_menu_entry_run): Likewise.
1208         * include/grub/normal.h: Re-ordered and grouped function
1209         prototypes by file that the function is defined in.
1210         (grub_menu_execute_callback): Removed; moved to menu.h.
1211         (grub_menu_get_entry): Likewise.
1212         (grub_menu_get_timeout): Likewise.
1213         (grub_menu_set_timeout): Likewise.
1214         (grub_menu_execute_entry): Likewise.
1215         (grub_menu_execute_with_fallback): Likewise.
1216         (grub_menu_entry_run): Likewise.
1217         (grub_menu_addentry): Renamed from this ...
1218         (grub_normal_add_menu_entry): ... to this.
1220         * normal/main.c (grub_menu_addentry): Renamed from this ...
1221         (grub_normal_add_menu_entry): ... to this.
1223         * script/sh/execute.c (grub_script_execute_menuentry): Update
1224         reference to renamed grub_menu_addentry function.
1226 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
1228         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1230 2009-05-22  Pavel Roskin  <proski@gnu.org>
1232         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1233         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
1234         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
1235         compiling for the i386 targets, but not for the utilities.
1237         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1238         to grub_uint8_t.
1239         (grub_root_drive): Likewise.
1240         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1241         remove alignment.
1242         (grub_root_drive): Change size to byte.
1243         (grub_start_addr): Remove.
1244         (grub_end_addr): Likewise.
1245         (grub_apm_bios_info): Likewise.
1247 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
1249         * normal/i386: Remove.
1250         * normal/powerpc: Likewise.
1251         * normal/sparc64: Likewise.
1252         * normal/x86_64: Likewise.
1254 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
1256         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1257         * loader/i386/linux_trampoline.S: Fix indentation
1258         * loader/i386/xnu_helper.S: Likewise
1260 2009-05-18  Colin D Bennett  <colin@gibibit.com>
1262         Display error messages when parsing a Lua statement fails.
1263         Previously, executing a syntactically invalid statement like
1264         ")foo" or "bar;" would silently fail.
1266         * script/lua/grub_main.c (handle_lua_error): New function.
1267         (grub_lua_parse_line): Improved reporting of Lua parser and
1268         execution errors.
1270 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1272         Remove -Werror which causes build to fail on some systems
1274         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1275         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1276         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1278 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1280         trampoline for linux on 64-bit platform
1282         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1283         loader/i386/efi/linux_trampoline.S
1284         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1285         declaration
1286         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1287         here
1288         * loader/i386/linux_trampoline.S: moved here
1289         * loader/i386/efi/linux.c (allocate_pages): reserve space for
1290         trampoline
1291         (jumpvector): removed
1292         (grub_linux_trampoline_start): new declaration
1293         (grub_linux_trampoline_end): likewise
1294         (grub_linux_boot): use trampoline when on 64-bit platform
1295         * loader/i386/linux.c: likewise
1297 2009-05-16  Pavel Roskin  <proski@gnu.org>
1299         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1300         const to avoid a warning.
1301         (grub_lua_setenv): Likewise.
1302         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1303         lmsg to fix a warning.
1305 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1307         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1308         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1309         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1310         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1311         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1312         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1313         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1314         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1316 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1318         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1320 2009-05-16  Bean  <bean123ch@gmail.com>
1322         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1323         (lua_mod_SOURCES): New variable.
1324         (lua_mod_CFLAGS): Likewise.
1325         (lua_mod_LDFLAGS): Likewise.
1327         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1328         (setjmp_mod_SOURCES): New variable.
1329         (setjmp_mod_CFLAGS): Likewise.
1330         (setjmp_LDFLAGS): Likewise.
1332         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1333         (setjmp_mod_SOURCES): New variable.
1334         (setjmp_mod_CFLAGS): Likewise.
1335         (setjmp_LDFLAGS): Likewise.
1337         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1338         (setjmp_mod_SOURCES): New variable.
1339         (setjmp_mod_CFLAGS): Likewise.
1340         (setjmp_LDFLAGS): Likewise.
1342         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1343         (setjmp_mod_SOURCES): New variable.
1344         (setjmp_mod_CFLAGS): Likewise.
1345         (setjmp_LDFLAGS): Likewise.
1347         * normal/i386/setjmp.S: Moved from here ...
1348         * lib/i386/setjmp.S: ... Moved here
1349         * normal/x86_64/setjmp.S: Moved from here ...
1350         * lib/x86_64/setjmp.S: ... Moved here
1351         * normal/powerpc/setjmp.S: Moved from here ...
1352         * lib/powerpc/setjmp.S: ... Moved here
1353         * normal/sparc64/setjmp.S: Moved from here ...
1354         * lib/sparc64/setjmp.S: ... Moved here
1356         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1357         returns_twice in mingw.
1359         * script/lua/grub_lib.c: New file.
1360         * script/lua/grub_lib.h: Likewise.
1361         * script/lua/grub_lua.h: Likewise.
1362         * script/lua/grub_main.c: Likewise.
1363         * script/lua/lapi.c: Likewise.
1364         * script/lua/lapi.h: Likewise.
1365         * script/lua/lauxlib.c: Likewise.
1366         * script/lua/lauxlib.h: Likewise.
1367         * script/lua/lbaselib.c: Likewise.
1368         * script/lua/lcode.c: Likewise.
1369         * script/lua/lcode.h: Likewise.
1370         * script/lua/ldblib.c: Likewise.
1371         * script/lua/ldebug.c: Likewise.
1372         * script/lua/ldebug.h: Likewise.
1373         * script/lua/ldo.c: Likewise.
1374         * script/lua/ldo.h: Likewise.
1375         * script/lua/ldump.c: Likewise.
1376         * script/lua/lfunc.c: Likewise.
1377         * script/lua/lfunc.h: Likewise.
1378         * script/lua/lgc.c: Likewise.
1379         * script/lua/lgc.h: Likewise.
1380         * script/lua/linit.c: Likewise.
1381         * script/lua/liolib.c: Likewise.
1382         * script/lua/llex.c: Likewise.
1383         * script/lua/llex.h: Likewise.
1384         * script/lua/llimits.h: Likewise.
1385         * script/lua/lmathlib.c: Likewise.
1386         * script/lua/lmem.c: Likewise.
1387         * script/lua/lmem.h: Likewise.
1388         * script/lua/loadlib.c: Likewise.
1389         * script/lua/lobject.c: Likewise.
1390         * script/lua/lobject.h: Likewise.
1391         * script/lua/lopcodes.c: Likewise.
1392         * script/lua/lopcodes.h: Likewise.
1393         * script/lua/loslib.c: Likewise.
1394         * script/lua/lparser.c: Likewise.
1395         * script/lua/lparser.h: Likewise.
1396         * script/lua/lstate.c: Likewise.
1397         * script/lua/lstate.h: Likewise.
1398         * script/lua/lstring.c: Likewise.
1399         * script/lua/lstring.h: Likewise.
1400         * script/lua/lstrlib.c: Likewise.
1401         * script/lua/ltable.c: Likewise.
1402         * script/lua/ltable.h: Likewise.
1403         * script/lua/ltablib.c: Likewise.
1404         * script/lua/ltm.c: Likewise.
1405         * script/lua/ltm.h: Likewise.
1406         * script/lua/lua.h: Likewise.
1407         * script/lua/luaconf.h: Likewise.
1408         * script/lua/lualib.h: Likewise.
1409         * script/lua/lundump.c: Likewise.
1410         * script/lua/lundump.h: Likewise.
1411         * script/lua/lvm.c: Likewise.
1412         * script/lua/lvm.h: Likewise.
1413         * script/lua/lzio.c: Likewise.
1414         * script/lua/lzio.h: Likewise.
1416 2009-05-16  Bean  <bean123ch@gmail.com>
1418         * include/grub/kernel.h (grub_module_header_types): Add type
1419         OBJ_TYPE_CONFIG.
1421         * kern/main.c (grub_load_config): New function.
1422         (grub_main): Call grub_load_config to read boot config.
1424         * grub-mkimage (generate_image): New parameter config_path.
1425         (options): New option --config.
1426         (main): Parse --config option, and pass it to generate_image.
1428 2009-05-14  Christian Franke  <franke@computer.org>
1430         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1431         This fixes build on Cygwin.
1433 2009-05-14  Pavel Roskin  <proski@gnu.org>
1435         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1436         jump.  This saves two bytes, so the typical case of 2 swapped
1437         drives would fit 32 bytes.
1439 2009-05-13  Pavel Roskin  <proski@gnu.org>
1441         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1442         grub_uint32_t to avoid a warning.
1444         * loader/i386/linux.c (allocate_pages): When assigning
1445         real_mode_mem, cast through grub_size_t to fix a warning.  The
1446         code already makes sure that the value would fit a pointer.
1447         (grub_linux_setup_video): Cast render_target->data to
1448         grub_size_t to fix a warning.
1450 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1452         * commands/i386/pc/drivemap.c: New file - implement drivemap
1453         command.
1454         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1455         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1457 2009-05-13  Pavel Roskin  <proski@gnu.org>
1459         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1460         embedding_area_exists.
1462 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1464         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1465         it easier to understand / work with.
1466         Improve warning messages for cases where there's no embedding area,
1467         or when it is too small (or core.img too large).
1469 2009-05-13  Pavel Roskin  <proski@gnu.org>
1471         * loader/i386/pc/multiboot2.c: Add necessary includes for
1472         grub_multiboot2_real_boot().
1474         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1475         PX record is always little-endian.  We only need the lower 2
1476         bytes of the mode.
1478         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1479         facilitate code reuse.
1480         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1481         fixes a warning reported by gcc 4.4.
1483         * kernel/disk.c (grub_disk_read): Use void pointer for the
1484         buffer.
1485         (grub_disk_write): Use const void pointer for the buffer.
1486         Adjust all callers.  Remove unnecessary casts.
1488 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1490         * util/i386/pc/grub-install.in: Update copyright year.
1492 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1494         gptsync
1496         * commands/gptsync.c: new file
1497         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1498         (gptsync_mod_SOURCES): new variable
1499         (gptsync_mod_CFLAGS): likewise
1500         (gptsync_mod_LDFLAGS): likewise
1501         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1502         new definition
1503         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1504         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1505         * conf/i386-ieee1275.rmk: likewise
1506         * conf/i386-pc.rmk: likewise
1507         * conf/powerpc-ieee1275.rmk: likewise
1509 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1511         Fixed grub-emu
1513         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1514         (grub_dl_ref): likewise
1516 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1518         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1519         split in two functions (one for msdos and one for gpt).
1521 2009-05-08  Pavel Roskin  <proski@gnu.org>
1523         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1524         not modified.
1526         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1527         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1528         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1529         nerr variable.
1531 2009-05-08  David S. Miller  <davem@davemloft.net>
1533         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1535 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1537         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1538         existence.
1540 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1542         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1543         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1545 2009-05-05  David S. Miller  <davem@davemloft.net>
1547         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1549 2009-05-05  Pavel Roskin  <proski@gnu.org>
1551         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1552         of grub_dl_ref() and grub_dl_unref().
1553         * commands/parttool.c: Remove preprocessor conditionals around
1554         grub_dl_ref() and grub_dl_unref().
1555         * fs/affs.c: Likewise.
1556         * fs/afs.c: Likewise.
1557         * fs/cpio.c: Likewise.
1558         * fs/ext2.c: Likewise.
1559         * fs/fat.c: Likewise.
1560         * fs/hfs.c: Likewise.
1561         * fs/hfsplus.c: Likewise.
1562         * fs/iso9660.c: Likewise.
1563         * fs/jfs.c: Likewise.
1564         * fs/minix.c: Likewise.
1565         * fs/ntfs.c: Likewise.
1566         * fs/reiserfs.c: Likewise.
1567         * fs/sfs.c: Likewise.
1568         * fs/udf.c: Likewise.
1569         * fs/ufs.c: Likewise.
1570         * fs/xfs.c: Likewise.
1571         * include/grub/dl.h: Likewise.
1572         * loader/xnu.c: Likewise.
1574 2009-05-04  Pavel Roskin  <proski@gnu.org>
1576         * commands/acpi.c: Remove unused variable my_mod.
1577         * partmap/amiga.c: Likewise.
1578         * partmap/apple.c: Likewise.
1579         * partmap/gpt.c: Likewise.
1580         * partmap/pc.c: Likewise.
1581         * partmap/sun.c: Likewise.
1582         * term/gfxterm.c: Likewise.
1583         * term/i386/pc/vesafb.c: Likewise.
1584         * term/i386/pc/vga.c: Likewise.
1586 2009-05-04  David S. Miller  <davem@davemloft.net>
1588         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1589         pointer args to grub_ieee1275_get_property().
1591         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1593         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1594         devices, and do not traverse down under controller nodes.
1596         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1597         (grub_ofdisk_open): Use it to un-escape "," characters.
1598         * kern/disk.c (find_part_sep): New.
1599         (grub_disk_open): Use it to find the first non-escaped ','
1600         character in the disk name.
1601         * util/ieee1275/devicemap.c (escape_of_path): New.
1602         (grub_util_emit_devicemap_entry): Use it.
1603         * util/sparc64/ieee1275/grub-install.in: Update script to
1604         strip partition specifiers properly by not triggering on
1605         '\' escaped ',' characters.
1607 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1609         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1610         to 0x300.
1611         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1612         resolutions.
1613         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1614         on documentation from Wikipedia).
1616 2009-05-04  Pavel Roskin  <proski@gnu.org>
1618         * disk/ata.c: Spelling fixes.
1619         * disk/raid.c: Likewise.
1620         * disk/usbms.c: Likewise.
1621         * disk/dmraid_nvidia.c: Likewise.
1622         * kern/ieee1275/openfw.c: Likewise.
1623         * kern/ieee1275/init.c: Likewise.
1624         * kern/ieee1275/cmain.c: Likewise.
1625         * boot/i386/pc/cdboot.S: Likewise.
1626         * video/readers/png.c: Likewise.
1627         * video/i386/pc/vbe.c: Likewise.
1628         * fs/udf.c: Likewise.
1629         * fs/hfs.c: Likewise.
1630         * fs/reiserfs.c: Likewise.
1631         * efiemu/runtime/efiemu.c: Likewise.
1632         * efiemu/main.c: Likewise.
1633         * efiemu/mm.c: Likewise.
1634         * include/grub/elf.h: Likewise.
1635         * include/grub/xnu.h: Likewise.
1636         * include/grub/usbdesc.h: Likewise.
1637         * include/grub/usb.h: Likewise.
1638         * include/grub/script_sh.h: Likewise.
1639         * include/grub/lib/LzmaEnc.h: Likewise.
1640         * include/grub/efiemu/efiemu.h: Likewise.
1641         * include/grub/command.h: Likewise.
1642         * normal/menu.c: Likewise.
1643         * normal/main.c: Likewise.
1644         * normal/datetime.c: Likewise.
1645         * bus/usb/uhci.c: Likewise.
1646         * mmap/i386/uppermem.c: Likewise.
1647         * mmap/mmap.c: Likewise.
1648         * commands/acpi.c: Likewise.
1649         * commands/test.c: Likewise.
1650         * partmap/apple.c: Likewise.
1651         * font/font.c: Likewise.
1652         * loader/sparc64/ieee1275/linux.c: Likewise.
1653         * loader/macho.c: Likewise.
1654         * loader/i386/bsd_trampoline.S: Likewise.
1655         * loader/i386/bsd.c: Likewise.
1656         * loader/xnu.c: Likewise.
1657         * term/i386/pc/vesafb.c: Likewise.
1658         * term/usb_keyboard.c: Likewise.
1659         * util/resolve.c: Likewise.
1660         * util/getroot.c: Likewise.
1662 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1664         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1666 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1668         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1669         build error.
1671 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1673         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1674         parameter only available on BIOS.
1676 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1678         Removed wrong semicolon in declaration
1680         * grub/misc.h (grub_dprintf): remove semicolon
1682 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1684         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1685         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1686         is done by grub_cmd_linux() now).
1687         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1688         restore video to text mode.
1689         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1690         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1691         `GRUB_LINUX_VID_MODE_NORMAL'.
1693 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1695         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1696         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1697         and `normal/script.c'.  Add `kern/rescue_reader.c',
1698         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1699         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1700         `grub_script.tab.c'.
1702         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1703         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1704         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1705         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1706         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1708         * Makefile.in: Remove duplicated 2008 in Copyright line.
1710 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1712         * util/misc.c (grub_util_warn): New function.  Emits a warning
1713         unconditionally.
1714         * include/grub/util/misc.h (grub_util_warn): New declaration.
1716         * util/i386/pc/grub-install.in: Understand --force and pass it down
1717         to grub-setup.
1719         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1720         down to setup().
1721         (setup): Improve error messages and add warnings when requested to
1722         install in odd layouts.  Refuse to install using blocklists unless
1723         --force was set.
1725 2009-05-04  martin f. krafft  <madduck@madduck.net>
1727         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1729 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1731         Updated copyright year
1733         * fs/hfsplus.c: updated copyright year
1735 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1737         HFS+ UUID
1739         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1740         in the space previously used by unused3
1741         (grub_hfsplus_uuid): new function
1742         (grub_hfsplus_fs): added uuid field
1744 2009-05-03  Pavel Roskin  <proski@gnu.org>
1746         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1747         suppress warnings.  It's no longer needed.
1748         * disk/host.c: Likewise.
1749         * disk/ata_pthru.c: Likewise.
1750         * disk/loopback.c: Likewise.
1751         * hook/datehook.c: Likewise.
1752         * parttool/pcpart.c: Likewise.
1753         * fs/i386/pc/pxe.c: Likewise.
1754         * fs/ntfscomp.c: Likewise.
1755         * efiemu/main.c: Likewise.
1756         * mmap/mmap.c: Likewise.
1757         * commands/crc.c: Likewise.
1758         * commands/hexdump.c: Likewise.
1759         * commands/hdparm.c: Likewise.
1760         * commands/acpi.c: Likewise.
1761         * commands/echo.c: Likewise.
1762         * commands/minicmd.c: Likewise.
1763         * commands/blocklist.c: Likewise.
1764         * commands/memrw.c: Likewise.
1765         * commands/loadenv.c: Likewise.
1766         * commands/usbtest.c: Likewise.
1767         * commands/lsmmap.c: Likewise.
1768         * commands/boot.c: Likewise.
1769         * commands/parttool.c: Likewise.
1770         * commands/configfile.c: Likewise.
1771         * commands/search.c: Likewise.
1772         * commands/ieee1275/suspend.c: Likewise.
1773         * commands/cat.c: Likewise.
1774         * commands/i386/pc/pxecmd.c: Likewise.
1775         * commands/i386/pc/play.c: Likewise.
1776         * commands/i386/pc/halt.c: Likewise.
1777         * commands/i386/pc/vbeinfo.c: Likewise.
1778         * commands/i386/pc/vbetest.c: Likewise.
1779         * commands/lspci.c: Likewise.
1780         * commands/date.c: Likewise.
1781         * commands/handler.c: Likewise.
1782         * commands/ls.c: Likewise.
1783         * commands/test.c: Likewise.
1784         * commands/cmp.c: Likewise.
1785         * commands/efi/loadbios.c: Likewise.
1786         * commands/efi/fixvideo.c: Likewise.
1787         * commands/halt.c: Likewise.
1788         * commands/help.c: Likewise.
1789         * commands/reboot.c: Likewise.
1790         * hello/hello.c: Likewise.
1791         * script/sh/main.c: Likewise.
1792         * loader/xnu.c: Likewise.
1793         * term/terminfo.c: Likewise.
1794         * term/i386/pc/serial.c: Likewise.
1795         * term/usb_keyboard.c: Likewise.
1797 2009-05-03  David S. Miller  <davem@davemloft.net>
1799         * normal/menu.c: Include grub/parser.h
1801 2009-05-03  Pavel Roskin  <proski@gnu.org>
1803         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1804         not char*.
1805         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1806         Suggested by Javier Martín <lordhabbit@gmail.com>
1808         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1809         efiemu??.o doesn't exist.
1810         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1811         copying.
1813 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1815         FreeBSD 64-bit support
1817         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1818         and loader/i386/bsd_trampoline.S
1819         (bsd_mod_ASFLAGS): new variable
1820         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1821         (FREEBSD_MODTYPE_KERNEL64): likewise
1822         (grub_bsd64_trampoline_start): likewise
1823         (grub_bsd64_trampoline_end): likewise
1824         (grub_bsd64_trampoline_selfjump): likewise
1825         (grub_bsd64_trampoline_gdt): likewise
1826         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1827         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1828         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1829         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1830         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1831         of "attrib" member
1832         * loader/i386/bsd_pagetable.c: new file
1833         * loader/i386/bsd_trampoline.S: likewise
1834         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1835         (ALIGN_VAR): likewise
1836         (entry_hi): new variable
1837         (kern_end_mdofs): likewise
1838         (is_64bit): likewise
1839         (grub_freebsd_add_meta): use ALIGN_VAR
1840         (grub_e820_mmap): new declaration
1841         (grub_freebsd_add_mmap): new function
1842         (grub_freebsd_add_meta_module): support 64 bit kernels
1843         (grub_freebsd_list_modules): use ALIGN_VAR
1844         (gdt_descriptor): new declaration
1845         (grub_freebsd_boot): support 64 bit kernels
1846         (grub_bsd_elf64_hook): new function
1847         (grub_bsd_load_elf): support elf64
1849 2009-05-03  Bean  <bean123ch@gmail.com>
1851         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1852         after we get the result of if statement.
1854 2009-05-03  Bean  <bean123ch@gmail.com>
1856         * Makefile.in (enable_efiemu): New variable.
1858         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1859         set.
1860         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1861         path.
1862         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1863         path, add -mno-red-zone option.
1864         (efiemu64_s.o): Likewise.
1865         (efiemu64.o): Use macro $^ for source file.
1867         * configure.ac (--enable-efiemu): New option.
1869 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1871         xnu support
1873         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1874         (pkglib_MODULES): add xnu.mod
1875         (xnu_mod_SOURCES): new variable
1876         (xnu_mod_CFLAGS): likewise
1877         (xnu_mod_LDFLAGS): likewise
1878         (xnu_mod_ASFLAGS): likewise
1879         * conf/i386-pc.rmk: likewise
1880         * conf/x86_64-efi.rmk: likewise
1881         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1882         new declaration
1883         * include/grub/i386/macho.h: new file
1884         * include/grub/i386/xnu.h: likewise
1885         * include/grub/macho.h: likewise
1886         * include/grub/machoload.h: likewise
1887         * include/grub/x86_64/macho.h: likewise
1888         * include/grub/x86_64/xnu.h: likewise
1889         * include/grub/xnu.h: likewise
1890         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1891         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1892         * loader/i386/efi/xnu.c: new file
1893         * loader/i386/pc/xnu.c: likewise
1894         * loader/i386/xnu.c: likewise
1895         * loader/i386/xnu_helper.S: likewise
1896         * loader/macho.c: likewise
1897         * loader/xnu.c: likewise
1898         * loader/xnu_resume.c: likewise
1899         * util/grub-dumpdevtree: likewise
1900         * include/grub/i386/pit.h: include grub/err.h
1901         (grub_pit_wait): export
1902         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1904 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1906         Efiemu
1908         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1909         _linux_efi, linux_efi.
1910         new files in grub-emu
1911         new targets efiemu32.o and efiemu64.o
1912         * loader/linux_normal_efiemu.c: likewise
1913         * loader/i386/efi/linux.c: added preliminary efiemu support
1914         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1915         files to copy
1916         * include/grub/autoefi.h: new file
1917         * include/grub/i386/efiemu.h: likewise
1918         * include/grub/i386/pc/efiemu.h: likewise
1919         * include/grub/efi/api.h: add LL suffix when necessary
1920         new definitions relating to tables
1921         * include/grub/efiemu/efiemu.h: new file
1922         * include/grub/efiemu/runtime.h: likewise
1923         * efiemu/prepare.c: likewise
1924         * efiemu/loadcore_common.c: likewise
1925         * efiemu/loadcore64.c: likewise
1926         * efiemu/runtime/efiemu.sh: likewise
1927         * efiemu/runtime/efiemu.S: likewise
1928         * efiemu/runtime/efiemu.c: likewise
1929         * efiemu/runtime/config.h: likewise
1930         * efiemu/prepare32.c: likewise
1931         * efiemu/main.c: likewise
1932         * efiemu/modules/pnvram.c: likewise
1933         * efiemu/modules/i386: likewise
1934         * efiemu/modules/i386/pc: likewise
1935         * efiemu/modules/acpi.c: likewise
1936         * efiemu/i386/pc/cfgtables.c: likewise
1937         * efiemu/i386/loadcore64.c: likewise
1938         * efiemu/i386/loadcore32.c: likewise
1939         * efiemu/prepare64.c: likewise
1940         * efiemu/loadcore.c: likewise
1941         * efiemu/symbols.c: likewise
1942         * efiemu/mm.c: likewise
1943         * efiemu/loadcore32.c: likewise
1945 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1947         ACPI spoofing
1949         * commands/acpi.c: new file
1950         * commands/i386/pc/acpi.c: likewise
1951         * commands/efi/acpi.c: likewise
1952         * include/grub/acpi.h: likewise
1953         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1954         (acpi_mod_SOURCES): new variable
1955         (acpi_mod_CFLAGS): likewise
1956         (acpi_mod_LDFLAGS): likewise
1957         * conf/i386-efi.rmk: likewise
1958         * conf/x86_64-efi.rmk: likewise
1960 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1962         Missing part from mmap patch
1964         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1965         (grub_mmap_unregister)
1966         (grub_mmap_free_and_unregister): use grub_mmap_register
1968 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1970         Mmap services
1972         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1973         * loader/i386/linux.c (find_mmap_size): likewise
1974         (allocate_pages): likewise
1975         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1976         (grub_fill_multiboot_mmap): likewise
1977         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1978         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1979         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1980         (OPENBSD_MMAP_RESERVED): likewise
1981         * include/grub/i386/pc/memory.h: include grub/memory.h
1982         (grub_lower_mem): removed
1983         (grub_upper_mem): likewise
1984         (GRUB_MACHINE_MEMORY_ACPI): new definition
1985         (GRUB_MACHINE_MEMORY_NVS): likewise
1986         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1987         (GRUB_MACHINE_MEMORY_HOLE): likewise
1988         (grub_machine_mmap_register): likewise
1989         (grub_machine_mmap_unregister): likewise
1990         (grub_machine_get_upper): likewise
1991         (grub_machine_get_lower): likewise
1992         (grub_machine_get_post64): likewise
1993         * include/grub/i386/efi/memory.h: new file
1994         * include/grub/x86_64/efi/memory.h: likewise
1995         * include/grub/efi/memory.h: likewise
1996         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1997         (mmap_mod_SOURCES): new variable
1998         (mmap_mod_LDFLAGS): likewise
1999         (mmap_mod_ASFLAGS): likewise
2000         * conf/i386-coreboot.rmk: likewise
2001         * conf/i386-ieee1275.rmk: likewise
2002         * conf/i386-efi.rmk: likewise
2003         * conf/x86_64-efi.rmk: likewise
2004         * include/grub/types.h (UINT_TO_PTR): new macro
2005         (PTR_TO_UINT32): likewise
2006         (PTR_TO_UINT64): likewise
2007         * include/grub/memory.h: new file
2008         * mmap/i386/pc/mmap.c: likewise
2009         * mmap/i386/pc/mmap_helper.S: likewise
2010         * mmap/i386/uppermem.c: likewise
2011         * mmap/mmap.c: likewise
2012         * mmap/efi/mmap.c: likewise
2013         * kern/i386/coreboot/init.c (grub_machine_init): don't use
2014         grub_upper_mem
2015         * kern/i386/pc/init.c (grub_lower_mem): removed variable
2016         (grub_upper_mem): likewise
2017         (grub_machine_init): don't use grub_upper_mem,
2018         make grub_lower_mem local
2019         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2020         grub_mmap_iterate and grub_mmap_get_upper
2021         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2023 2009-05-02  Bean  <bean123ch@gmail.com>
2025         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2026         script/sh/parser.y.
2027         (pkglib_MODULES): Add normal.mod and sh.mod.
2028         (normal_SOURCES): New variable.
2029         (normal_mod_CFLAGS): Likewise.
2030         (normal_mod_LDFLAGS): Likewise.
2031         (sh_mod_SOURCES): Likewise.
2032         (sh_mod_CFLAGS): Likewise.
2033         (sh_mod_LDFLAGS): Likewise.
2035         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2036         script/sh/lexer.c_DEPENDENCIES.
2037         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2038         kern/rescue_reader.c and kern/rescue_parser.c.
2039         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2040         (grub_emu_SOURCES): Change source files.
2041         (pkglib_MODULES): Remove normal.mod.
2042         (normal_SOURCES): Removed.
2043         (normal_mod_CFLAGS): Likewise.
2044         (normal_mod_LDFLAGS): Likewise.
2045         * conf/i386-coreboot.rmk: Likewise.
2046         * conf/i386-efi.rmk: Likewise.
2047         * conf/i386-ieee1276.rmk: Likewise.
2048         * conf/powerpc-ieee1275.rmk: Likewise.
2049         * conf/sparc64-ieee1275.rmk: Likewise.
2050         * conf/x86_64-efi.rmk: Likewise.
2052         * include/grub/command.h (grub_command_execute): New inline function.
2054         * include/grub/menu.h (grub_menu_entry): Removed commands field.
2056         * include/grub/normal.h: Remove <grub/setjmp.h>.
2057         (grub_fs_module_list): Moved to normal/autofs.c.
2058         (grub_exit_env): Removed.
2059         (grub_command_execute): Likewise.
2060         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2061         parameter script.
2062         (read_command_list): New function declaration.
2063         (read_fs_list): Likewise.
2065         * include/parser.h: Include <grub/reader.h>.
2066         (grub_parser_split_cmdline): Change type of getline parameter.
2067         (grub_parser): New structure.
2068         (grub_parser_class): New variable.
2069         (grub_parser_execute): New function declaration.
2070         (grub_register_rescue_parser): Likewise.
2071         (grub_parser_register): New inline function.
2072         (grub_parser_unregister): Likewise.
2073         (grub_parser_get_current): Likewise.
2074         (grub_parser_set_current): Likewise.
2076         * include/grub/reader.h: New file.
2077         * kern/reader.c: Likewise.
2078         * kern/rescue_parser.c: Likewise.
2079         * kern/rescue_reader.c: Likewise.
2080         * normal/autofs.c: Likewise.
2081         * normal/dyncmd.c: Likewise.
2083         * include/grub/rescue.h: Removed.
2084         * normal/command.h: Likewise.
2086         * include/grub/script.h: Moved to ...
2087         * include/grub/script_sh.h: ... Moved here.
2088         * normal/execute.c: Moved to ...
2089         * script/sh/execute.c: ... Moved here.
2090         * normal/function.c: Moved to ...
2091         * script/sh/function.c: ... Moved here.
2092         * normal/lexer.c: Moved to ...
2093         * script/sh/lexer.c: ... Moved here.
2094         * normal/parser.y: Moved to ...
2095         * script/sh/parser.y: ... Moved here.
2096         * normal/script.c: Moved to ...
2097         * script/sh/script.c: ... Moved here.
2099         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2100         <grub/reader.h>.
2101         (grub_exit_env): Removed.
2102         (fs_module_list): Moved to normal/autofs.c.
2103         (grub_file_getline): Don't handle comment here.
2104         (free_menu): Skip removed field entry->commands.
2105         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2106         script parameter.
2107         (read_config_file): Removed nested parameter, change getline function.
2108         (grub_enter_normal_mode): Removed.
2109         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2110         (read_command_list): Likewise.
2111         (autoload_fs_module): Moved to normal/autofs.c.
2112         (read_fs_list): Likewise.
2113         (reader_nested): New variable.
2114         (grub_normal_execute): Run parser.sh to switch to sh parser.
2115         (grub_cmd_rescue): Removed.
2116         (cmd_normal): Removed.
2117         (grub_cmd_normal): Unregister itself at the beginning. Don't register
2118         rescue command.
2119         (grub_cmdline_run): New function.
2120         (grub_normal_reader_init): Likewise.
2121         (grub_normal_read_line): Likewise.
2122         (grub_env_write_pager): Likewise.
2123         (cmdline): New variable.
2124         (grub_normal_reader): Likewise.
2125         (GRUB_MOD_INIT): Register normal reader and set as current, register
2126         pager hook, register normal command with grub_register_command_prio,
2127         so that it won't show up in command.lst.
2128         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2129         grub_fs_autoload_hook.
2131         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2132         (grub_menu_execute_entry): Replace grub_script_execute with
2133         grub_parser_execute, change parameter to grub_command_execute.
2135         * normal/menu_text.c: Remove <grub/script.h>.
2137         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2138         and <grub/parser.h>.
2139         (run): Change editor_getline to use new parser interface. Change
2140         parameter to grub_command_execute.
2142         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2143         <grub/reader.h> and <grub/parser.h>.
2144         (grub_load_normal_mode): Execute normal command.
2145         (grub_main): Call grub_register_core_commands,
2146         grub_register_rescue_parser and grub_register_rescue_reader, use
2147         grub_reader_loop to enter input loop.
2149         * kern/parser.c (grub_parser_split_cmdline): Change type of
2150         getline parameter.
2151         (grub_parser_class): New variable.
2152         (grub_parser_execute): New function.
2154         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2155         * loader/multiboot2.c: Likewise.
2156         * loader/sparc64/ieee1275/linux.c: Likewise.
2158         * util/grub-emu.c (read_command_list): New dummy function.
2160 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2162         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2163         count to 16 for CCISS and IDA.
2165 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2167         * normal/menu_text.c  (grub_wait_after_message): Print a newline
2168         after waiting for user input.
2170         * loader/i386/linux.c: Include `<grub/normal.h>'.
2171         (grub_cmd_linux): Improve the error message about `ask' mode, by
2172         waiting for user input so it's not missed (we can do this, since
2173         user requested interaction).
2175 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2177         Added missing lst to grub-mkrescue
2179         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2180         and ${input_dir}/parttool.lst
2182 2009-04-30  David S. Miller  <davem@davemloft.net>
2184         * util/hostdisk.c (device_is_wholedisk): New function.
2185         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2186         zero only if device_is_wholedisk() returns true.
2188         * util/hostdisk.c (convert_system_partition_to_system_disk):
2189         Handle virtual disk devices named /dev/vdiskX as found on sparc
2190         and powerpc.
2192         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2193         lettered partition specifier is found, convert to numbered.
2195 2009-04-29  David S. Miller  <davem@davemloft.net>
2197         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2198         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2200         * normal/command.c: Add missing newline at end of file.
2202         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2203         warnings.
2204         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2205         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2206         grub_ofdisk_read): Likewise, and deal similarly with the fact that
2207         ihandles have a 32-bit type but need to be stored in a "void *".
2209 2009-04-28  Pavel Roskin  <proski@gnu.org>
2211         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2212         not disk.  Adjust all dependencies.
2213         (grub_fs_uuid_close): Use grub_device_close(), not
2214         grub_disk_close().
2216         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2217         parent's partition, don't copy it by reference, as it gets freed
2218         on close.
2220 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2222         Preboot hooks support
2224         * commands/boot.c (struct grub_preboot_t): new declaration
2225         (preboots_head): new variable
2226         (preboots_tail): likewise
2227         (grub_loader_register_preboot_hook): new function
2228         (grub_loader_unregister_preboot_hook): likewise
2229         (grub_loader_set): launch preboot hooks
2230         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2231         (grub_loader_register_preboot_hook): new declaration
2232         (grub_loader_unregister_preboot_hook): likewise
2234 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2236         Warning fix
2238         * disk/scsi.c (grub_scsi_open): added missing cast when
2239         calling grub_dprintf
2241 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
2243         Bug and warning fixes
2245         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2246         declaration
2247         * commands/test.c (test_parse): fixed bug with file tests and corrected
2248         declaration of find_file
2250 2009-04-26  Pavel Roskin  <proski@gnu.org>
2252         * Makefile.in: Don't install empty manual pages if help2man is
2253         missing.  Use help2man option for output, not shell redirection.
2255 2009-04-26  David S. Miller  <davem@davemloft.net>
2257         * util/grub-mkdevicemap.c (make_device_map): Add missing
2258         NESTED_FUNC_ATTR to process_device().
2260 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2262         Test command
2264         * commands/test.c: rewritten to use bash-like test
2266 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2268         Parttool autoloading and improvements
2270         * Makefile.in (pkglib_DATA): add parttool.lst
2271         (parttool.lst): new target
2272         * genmk.rb: generate parttool-*
2273         (CLEANFILES): add #{parttool}
2274         (PARTTOOLFILES): new variable
2275         * genparttoollist.sh: new file
2276         * parttool/pcpart.c (grub_pcpart_boot): more feedback
2277         (grub_pcpart_type): likewise
2278         * commands/parttool.c (helpmsg): new variable
2279         (grub_cmd_parttool): output help if not enough arguments are supplied
2280         autoload modules
2281         (GRUB_MOD_INIT(parttool)): use helpmsg
2283 2009-04-24  David S. Miller  <davem@davemloft.net>
2285         Avoiding opening same device multiple times in device iterator.
2287         * kern/device.c: (grub_device_iterate): Define struct part_ent,
2288         and use it to build a list of partitions in iterate_disk() and
2289         iterate_partition().
2291         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2292         on disk->data.
2294         * disk/ieee1275/nand.c (grub_nand_iterate): Return
2295         grub_devalias_iterate() result instead of unconditional 0.
2296         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2297         Also, capture hook return value, either directly or via
2298         grub_children_iterate(), and propagate to caller.
2299         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2300         grub_children_iterate): Return value is now 'int' instead of
2301         'grub_err_t'.
2302         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2303         like a proper iterator, stopping when hooks return non-zero.
2304         (grub_devalias_iterate): Likewise.
2306 2009-04-23  David S. Miller  <davem@davemloft.net>
2308         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2310 2009-04-22  David S. Miller  <davem@davemloft.net>
2312         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2313         is larger than address_cells, use that value for address_cells too.
2315         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2316         IEEE1275_MAX_PATH_LEN): Define.
2317         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2318         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2319         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2320         'devtype'.  Explicitly NULL terminate devalias expansion.
2322         * util/sparc64/ieee1275/misc.c: New file.
2323         * util/sparc64/ieee1275/grub-setup.c: New file.
2324         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2325         * util/sparc64/ieee1275/grub-mkimage.c: New file.
2326         * util/sparc64/ieee1275/grub-install.in: New file.
2327         * util/ieee1275/ofpath.c: New file.
2328         * util/ieee1275/devicemap.c: New file.
2329         * util/devicemap.c: New file.
2330         * util/deviceiter.c: New file.
2331         * kern/sparc64/ieee1275/init.c: New file.
2332         * include/grub/util/ofpath.h: New file.
2333         * include/grub/util/deviceiter.h: New file.
2334         * util/grub-mkdevicemap.c: Include deviceiter.h.
2335         Implement using grub_util_emit_devicemap_entry and
2336         grub_util_iterate_devices.
2337         * conf/i386-corebook.rmk: Build util/deviceiter.c and
2338         util/devicemap.c into grub-mkdevicemap
2339         * conf/i386-efi.rmk: Likewise.
2340         * conf/i386-ieee1275.rmk: Likewise.
2341         * conf/i386-pc.rmk: Likewise.
2342         * conf/powerpc-ieee1275.rmk: Likewise.
2343         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2344         images and installation utilities.  Build kernel as image
2345         instead of as elf binary.  Use common rules as much as possible.
2347 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
2349         Correct GPT definition
2351         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2352         of "attrib" member
2354 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
2356         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2358 2009-04-19  David S. Miller  <davem@davemloft.net>
2360         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2361         (grub_rescue_cmd_linux): Rename to...
2362         (grub_cmd_linux): and fix prototype.
2363         (grub_rescue_cmd_initrd): Rename to...
2364         (grub_cmd_initrd): and fix prototype.
2365         (cmd_linux, cmd_initrd): New.
2366         (GRUB_MOD_INIT(linux)): Use grub_register_command().
2367         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2369 2009-04-17  Pavel Roskin  <proski@gnu.org>
2371         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2372         format.
2373         (grub_ohci_transfer): Likewise.
2375         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2377         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2378         return without a value.  Fix inconsistent indentation.
2380         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2381         match struct grub_fs.
2383         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2384         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2385         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2386         * commands/lspci.c (grub_lspci_iter): Likewise.
2388 2009-04-16  Bean  <bean123ch@gmail.com>
2390         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2391         value.
2393 2009-04-15  Pavel Roskin  <proski@gnu.org>
2395         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2396         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
2397         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2398         definitions.
2400 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2402         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2403         that no multiple data or metadata areas are supported and `Unknown
2404         metadata header'.
2406 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2408         Move loader out of the kernel
2410         * kern/loader.c: moved to ...
2411         * commands/boot.c: ... moved here
2412         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2413         * commands/boot.c (grub_cmd_boot): moved here. All users updated
2414         * include/grub/kernel.h (grub_machine_fini): export
2415         * include/grub/loader.h (grub_loader_is_loaded): update declaration
2416         (grub_loader_set): likewise
2417         (grub_loader_unset): likewise
2418         (grub_loader_boot): likewise
2419         * conf/common.rmk: new module boot.mod
2420         (pkglib_MODULES): add boot.mod
2421         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2422         (grub_emu_SOURCES): likewise
2423         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2424         (grub_emu_SOURCES): likewise
2425         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2426         (grub_emu_SOURCES): likewise
2427         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2428         (grub_emu_SOURCES): likewise
2429         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2430         (grub_emu_SOURCES): likewise
2431         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2432         (grub_emu_SOURCES): likewise
2433         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2434         (grub_emu_SOURCES): likewise
2436 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2438         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2440         * kern/misc.c (grub_itoa): Removed function
2441         (grub_ltoa): likewise
2442         (grub_vsprintf): use grub_lltoa
2444 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2446         Restore grub-emu
2448         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2449         * conf/i386-coreboot.rmk: likewise
2450         * conf/i386-ieee1275.rmk: likewise
2451         * conf/powerpc-ieee1275.rmk: likewise
2453 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2455         * INSTALL: Add that `./autogen.sh' needs to be run before
2456         `./configure.'.
2458 2009-04-14  Bean  <bean123ch@gmail.com>
2460         * Makefile.in (pkglib_DATA): Add handler.lst.
2461         (handler.lst): New rule.
2463         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2464         * conf/i386-coreboot.rmk: Likewise.
2465         * conf/i386-ieee1275.rmk: Likewise.
2466         * conf/i386-efi.rmk: Likewise.
2467         * conf/x86_64-efi.rmk: Likewise.
2468         * conf/powerpc-ieee1275.rmk: Likewise.
2469         * conf/sparc64-ieee1275.rmk: Likewise.
2471         * genhandlerlist.sh: New file.
2473         * genmk.rb: Add rules to generate handler.lst.
2475         * include/grub/normal.h (grub_file_getline): New function definition.
2476         (read_handler_list): Likewise.
2477         (free_handler_list): Likewise.
2479         * include/grub/term.h (grub_term_register_input): Add name parameter
2480         for auto generation of handler.lst.
2481         (grub_term_register_output): Likewise.
2483         * normal/handler.c: New file.
2485         * normal/main.c (get_line): Renamed to grub_file_getline.
2486         (read_config_file): Use the newly renamed grub_file_getline.
2487         (read_command_list): Likewise.
2488         (read_fs_list): Likewise.
2489         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2490         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2492         * term/efi/console.c (grub_console_init): Add name parameter for auto
2493         generation of handler.lst.
2494         * term/gfxterm.c: Likewise.
2495         * term/i386/pc/at_keyboard.c: Likewise.
2496         * term/i386/pc/console.c: Likewise.
2497         * term/i386/pc/serial.c: Likewise.
2498         * term/i386/pc/vesafb.c: Likewise.
2499         * term/i386/pc/vga.c: Likewise.
2500         * term/i386/pc/vga_text.c: Likewise.
2501         * term/ieee1275/ofconsole.c: Likewise.
2502         * term/usb_keyboard.c: Likewise.
2504 2009-04-14  Bean  <bean123ch@gmail.com>
2506         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2507         properly with null character.
2509 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2511         * configure: Remove.
2512         * config.h.in: Likewise.
2513         * stamp-h.in: Likewise.
2514         * DISTLIST: Likewise.
2515         * conf/common.mk: Likewise.
2516         * conf/i386-coreboot.mk: Likewise.
2517         * conf/i386-efi.mk: Likewise.
2518         * conf/i386-ieee1275.mk: Likewise.
2519         * conf/i386.mk: Likewise.
2520         * conf/i386-pc.mk: Likewise.
2521         * conf/powerpc-ieee1275.mk: Likewise.
2522         * conf/sparc64-ieee1275.mk: Likewise.
2523         * conf/x86_64-efi.mk: Likewise.
2525         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2526         develop on GRUB.
2528 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2529             David S. Miller  <davem@davemloft.net>
2531         * util/hostdisk.c (make_device_name): Fix buffer length
2532         calculations.
2534 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2536         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2537         <sys/param.h> and <sys/sysctl.h>.
2538         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2539         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2540         opening the device and reset them afterwards.
2542 2009-04-13  Pavel Roskin  <proski@gnu.org>
2544         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2545         Reported by John Stanley <jpsinthemix@verizon.net>
2547 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2549         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2550         that name for menuentries when appropriate.
2552 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2554         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2556 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2558         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2559         to Linux, simply abort telling the user it's no longer supported.
2561 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2563         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2564         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2565         `freebsd_loadenv' only when devices.hints exist.
2567 2009-04-13  Pavel Roskin  <proski@gnu.org>
2569         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2571 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2573         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2574         partition number.
2575         (grub_drive): Likewise.
2577 2009-04-13  David S. Miller  <davem@davemloft.net>
2579         * kern/sparc64/ieee1275/ieee1275.c: New file.
2580         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2581         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2582         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2583         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2584         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2585         grub_ieee1275_alloc_physmem): Declare new exported functions.
2587         * include/grub/sparc64/ieee1275/loader.h: New file.
2588         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2589         * include/grub/sparc64/kernel.h: Likewise.
2590         * loader/sparc64/ieee1275/linux.c: Likewise.
2592         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2593         (grub_fstest_SOURCES): Likewise.
2595         * util/hostdisk.c (make_device_name): Do not make any assumptions
2596         about the length of drive names.
2598         * kern/dl.c (grub_dl_load_file): Close file immediately when
2599         we are done using it.
2601 2009-04-12  David S. Miller  <davem@davemloft.net>
2603         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2604         values.  Noticed by Pavel Roskin.
2606         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2607         target compiler.
2609         * genmk.rb: Add more flexible image type specification, also
2610         pass --strip-unneeded to objcopy.
2611         * conf/i386-pc.rmk: Use *_FORMAT.
2612         * conf/i386-pc.mk: Rebuilt.
2614         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2615         (OFDISK_HASH_SZ): Define.
2616         (ofdisk_hash): New hash table.
2617         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2618         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2619         instead of device phandle which is not unique.
2621         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2622         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2623         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2624         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2625         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2626         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2627         GRUB_KERNEL_MACHINE_DATA_END): Define.
2628         (grub_kernel_image_size, grub_total_module_size): Declare.
2630 2009-04-12  Pavel Roskin  <proski@gnu.org>
2632          * configure.ac: Change the logic when we check for target tools.
2633          Do it when the target is specified and it's different from the
2634          specified value of the host.
2636 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2638         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2639         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2640         GNU/kFreeBSD. Check if a device is a character device. Use
2641         DIOCGMEDIASIZE to get the size.
2642         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2643         support for GNU/kFreeBSD.
2644         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2645         is a character device instead of a block device. Add support for
2646         FreeBSD device names.
2648         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2649         is a character device instead of a block device.
2651         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2652         is a character device instead of a block device.
2654 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2656         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2657         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2658         FreeBSD. Check if a device is a character device. Use
2659         DIOCGMEDIASIZE to get the size.
2660         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2661         support for FreeBSD.
2662         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2663         is a character device instead of a block device. Add support for
2664         FreeBSD device names.
2666         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2667         a character device instead of a block device.
2668         (grub_util_check_char_device): New function.
2670         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2671         a character device instead of a block device.
2673         * include/grub/util/getroot.h (grub_util_check_char_device): New
2674         prototype.
2676 2009-04-11  David S. Miller  <davem@davemloft.net>
2678         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2679         static libgcc.
2680         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2681         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2682         function, if present.
2683         (__bswapdi2): Likewise.
2685         * include/grub/sparc64/ieee1275/boot.h: New file.
2686         * boot/sparc64/ieee1275/boot.S: Likewise.
2687         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2689         * kern/misc.c (grub_ltoa): New function.
2690         (grub_vsprintf): Use it to format 'long' integers.
2692 2009-04-10  David S. Miller  <davem@davemloft.net>
2694         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2695         slots are of type grub_ieee1275_cell_t.
2696         (grub_nand_read): Likewise.
2697         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2698         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2699         macros are used to compare values in arg/ret block of the call.
2700         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2701         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2702         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2703         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2704         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2705         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2706         grub_ieee1275_close, grub_ieee1275_set_property,
2707         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2708         grub_ieee1275_cell_t.
2709         * kern/ieee1275/openfw.c (grub_map): Likewise.
2710         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2711         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2713         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2714         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2715         (grub_devalias_iterate): Likewise.
2717 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2719         UFS improvements
2721         * fs/ufs.c (INODE_NBLOCKS): new definition
2722         (struct grub_ufs_dirent): added fields for non-BSD dirents
2723         (grub_ufs_get_file_block): fixed double indirect handling
2724         (grub_ufs_lookup_symlink): use more robust way to determine whether
2725         symlink is inline
2726         (grub_ufs_find_file): support for non-BSD dirents
2727         (grub_ufs_dir): support for non-BSD dirents
2729 2009-04-10  Bean  <bean123ch@gnail.com>
2731         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2732         attribute, otherwise the size would be wrong for i386 platform.
2734         * include/grub/pci.h (grub_pci_read_word): New inline function.
2735         (grub_pci_read_byte): Likewise.
2736         (grub_pci_write): Likewise.
2737         (grub_pci_write_word): Likewise.
2738         (grub_pci_write_byte): Likewise.
2740         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2742         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2743         (find_framebuf): Scan pci to locate the frame buffer address.
2745         * commands/efi/fixvideo.c: New file.
2747         * commands/efi/loadbios.c: Likewise.
2749         * commands/memrw.c: Likewise.
2751         * util/grub-dumpbios.in: Likewise.
2753         * conf/common.rmk (grub-dumpbios): New utility.
2754         (pkglib_MODULES): New module memrw.mod.
2755         (memrw_mod_SOURCE): New macro.
2756         (memrw_mod_CFLAGS): Likewise.
2757         (memrw_mod_LDFLAGS): Likewise.
2759         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2760         fixvideo.mod.
2761         (loadbios_mod_SOURCE): New macro.
2762         (loadbios_mod_CFLAGS): Likewise.
2763         (loadbios_mod_LDFLAGS): Likewise.
2764         (fixvideo_mod_SOURCE): Likewise.
2765         (fixvideo_mod_CFLAGS): Likewise.
2766         (fixvideo_mod_LDFLAGS): Likewise.
2768         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2769         fixvideo.mod.
2770         (loadbios_mod_SOURCE): New macro.
2771         (loadbios_mod_CFLAGS): Likewise.
2772         (loadbios_mod_LDFLAGS): Likewise.
2773         (fixvideo_mod_SOURCE): Likewise.
2774         (fixvideo_mod_CFLAGS): Likewise.
2775         (fixvideo_mod_LDFLAGS): Likewise.
2777 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2779         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2781 2009-04-07  David S. Miller  <davem@davemloft.net>
2783         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2784         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2785         R_SPARC_WDISP30 case.
2786         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2788 2009-04-06  Pavel Roskin  <proski@gnu.org>
2790         * include/grub/misc.h (ARRAY_SIZE): New macro.
2791         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2792         New macro.
2793         * loader/i386/linux.c (allocate_pages): Use free_pages().
2794         (grub_linux_unload): Don't use free_pages().
2795         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2796         wrong index.  Treat all other modes as text modes.
2797         (grub_cmd_linux): Initialize vid_mode unconditionally to
2798         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2800         * commands/help.c (print_command_help): Use cmd->prio, not
2801         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2803 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2805         Parttool
2807         * parttool/pcpart.c: new file
2808         * commands/parttool.c: likewise
2809         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2810         (parttool_mod_SOURCES): new variable
2811         (parttool_mod_CFLAGS): likewise
2812         (parttool_mod_LDFLAGS): likewise
2813         (pcpart_mod_SOURCES): likewise
2814         (pcpart_mod_CFLAGS): likewise
2815         (pcpart_mod_LDFLAGS): likewise
2816         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2817         and parttool/pcpart.c
2818         * conf/i386-efi.rmk: likewise
2819         * conf/i386-ieee1275.rmk: likewise
2820         * conf/i386-pc.rmk: likewise
2821         * conf/powerpc-ieee1275.rmk: likewise
2822         * conf/sparc64-ieee1275.rmk: likewise
2823         * conf/x86_64-ieee1275.rmk: likewise
2825 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2827         Support for mtime and further expandability of dir command
2829         * include/grub/lib/datetime.h: moved to ...
2830         * include/grub/datetime.h: ... moved here and added
2831         declaration of grub_unixtime2datetime. All users updated
2832         * include/grub/fs.h: new syntax for dir and mtime functions in
2833         struct grub_fs
2834         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2835         and GRUB_FSHELP_FLAGS_MASK
2836         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2837         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2838         (grub_ext2_mtime): new function
2839         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2840         (grub_hfsplus_mtime): new function
2841         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2842         (GRUB_UFS_ATTR_FILE): likewise
2843         (GRUB_UFS_ATTR_LNK): likewise
2844         (struct grub_ufs_sblock): new fields mtime
2845         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2846         all users updated
2847         (grub_ufs_dir): mtime support
2848         (grub_ufs_mtime): new function
2849         * fs/affs.c (grub_affs_dir): use new dir syntax
2850         * fs/afs.c (grub_afs_dir): likewise
2851         * fs/cpio.c (grub_cpio_dir): likewise
2852         * fs/fat.c (grub_fat_find_dir): likewise
2853         * fs/hfs.c (grub_hfs_dir): likewise
2854         * fs/iso9660.c (grub_iso9660_dir): likewise
2855         * fs/jfs.c (grub_jfs_dir): likewise
2856         * fs/minix.c (grub_minix_dir): likewise
2857         * fs/ntfs.c (grub_ntfs_dir): likewise
2858         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2859         * fs/sfs.c (grub_sfs_dir): likewise
2860         * fs/xfs.c (grub_xfs_dir): likewise
2861         * util/hostfs.c (grub_hostfs_dir): likewise
2862         * lib/datetime.c: moved to ...
2863         * normal/datetime.c: ... moved here
2864         (grub_unixtime2datetime): new function
2865         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2866         * normal/completion.c (iterate_dir): use new dir syntax
2867         * normal/misc.c (grub_normal_print_device_info): tell the
2868         last modification time of a volume
2869         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2870         * conf/common.rmk: added lib/datetime.c to ls.mod
2871         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2872         (normal_mod_SOURCES): likewise
2873         (datetime_mod_SOURCES): Removed lib/datetime.c
2874         * conf/i386-efi.rmk: likewise
2875         * conf/i386-ieee1275.rmk: likewise
2876         * conf/i386-pc.rmk: likewise
2877         * conf/powerpc-ieee1275.rmk: likewise
2878         * conf/sparc64-ieee1275.rmk: likewise
2879         * conf/x86_64-efi.rmk: likewise
2881 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2883         Trim trailing spaces in FAT label and support mtools-like labels
2885         * fs/fat.c (grub_fat_iterate_dir): New function based
2886         on grub_fat_find_dir
2887         (grub_fat_find_dir): use grub_fat_iterate_dir
2888         (grub_fat_label): likewise
2890 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2892         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2893         and command.h
2894         remove extraneous kernel_elf_HEADERS
2896 2009-04-04  Bean  <bean123ch@gnail.com>
2898         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2900         * util/misc.c: Likewise.
2902 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2904         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2905         instead of grub_printf.
2907 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2909         * loader/i386/linux.c (grub_linux_setup_video): Fill
2910         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2911         values from `mode info' structure instead of hardcoded
2912         values.
2914 2009-04-01  Pavel Roskin  <proski@gnu.org>
2916         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2917         unused now.
2918         * genmk.rb: Likewise.
2919         * configure.ac: Likewise.
2921 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2923         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2924         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2926 2009-04-01  David S. Miller  <davem@davemloft.net>
2928         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2929         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2930         (grub_setjmp): Mark with 'returns_twice' attribute.
2931         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2932         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2933         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2935 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2937         Reapply fix from 2008-07-28 which was accidentally reverted; also
2938         perform the same fix to a similar check in same function.
2940         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2941         with the same number are found, just use issue a warning with
2942         grub_dprintf(), as this error has been reported to be non-fatal.
2944 2009-03-31  Pavel Roskin  <proski@gnu.org>
2946         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2947         for cross-compilation.
2949 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2951         Fix i386-ieee1275 build.
2953         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2954         Remove declaration.
2956 2009-03-30  Pavel Roskin  <proski@gnu.org>
2958         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2959         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2960         zero-terminated, rely only on the strlen value.  Fix comparison
2961         of strings differing in length.
2963 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2965         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2966         checking for abi version.  Improve error messages on BIOS to notify
2967         user about `linux16' command.
2969 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2971         Leak fixes
2973         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2974         in case of collision
2975         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2977 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2979         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2980         set `vid_mode' accordingly.
2981         (grub_linux_boot): Process `vid_mode' and set video mode.
2983 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2985         * util/grub.d/10_linux.in (linux_entry): New function.
2986         Factorize generation of Linux boot entries.
2988 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2990         Make the format of Environment Block plain text. The boot loader
2991         part is not tested well yet.
2993         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2994         (buffer): Removed.
2995         (envblk): Likewise.
2996         (usage): Remove "info" and "clear". Add "unset". Update the
2997         description of "set", as this does not delete variables any
2998         longer.
2999         (create_envblk_file): Complete rewrite.
3000         (open_envblk_file): Likewise.
3001         (cmd_info): Removed.
3002         (cmd_list): Likewise.
3003         (cmd_set): Likewise.
3004         (cmd_clear): Likewise.
3005         (list_variables): New function.
3006         (write_envblk): Likewise.
3007         (set_variables): Likewise.
3008         (unset_variables): Likewise.
3009         (main): Complete rewrite.
3011         * commands/loadenv.c (buffer): Removed.
3012         (envblk): Likewise.
3013         (open_envblk_file): New function.
3014         (read_envblk_file): Complete rewrite.
3015         (grub_cmd_load_env): Likewise.
3016         (grub_cmd_list_env): Likewise.
3017         (struct blocklist): New struct.
3018         (free_blocklists): New function.
3019         (check_blocklists): Likewise.
3020         (write_blocklists): Likewise.
3021         (grub_cmd_save_env): Complete rewrite.
3023         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3024         a plain text signature.
3025         (GRUB_ENVBLK_MAXLEN): Removed.
3026         (struct grub_envblk): Complete rewrite.
3027         (grub_envblk_find): Removed.
3028         (grub_envblk_insert): Likewise.
3029         (grub_envblk_open): New prototype.
3030         (grub_envblk_set): Likewise.
3031         (grub_envblk_delete): Put const to VALUE.
3032         (grub_envblk_iterate): Put const to NAME and VALUE.
3033         (grub_envblk_close): New prototype.
3034         (grub_envblk_buffer): New inline function.
3035         (grub_envblk_size): Likewise.
3037         * lib/envblk.c: Include grub/mm.h.
3038         (grub_env_find): Removed.
3039         (grub_envblk_open): New function.
3040         (grub_envblk_close): Likewise.
3041         (escaped_value_len): Likewise.
3042         (find_next_line): Likewise.
3043         (grub_envblk_insert): Removed.
3044         (grub_envblk_set): New function.
3045         (grub_envblk_delete): Complete rewrite.
3046         (grub_envblk_iterate): Likewise.
3048 2009-03-28  Robert Millan  <rmh@aybabtu.com>
3050         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3051         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3052         variables.  Use 16-bit loader.
3053         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3054         loader.
3055         * kern/i386/loader.S (grub_linux_boot): Rename to ...
3056         (grub_linux16_boot): ... this.  Update all users.
3057         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3058         (grub_linux_boot): ... this.  Update all users.
3060         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3061         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
3062         commands to `linux16' and `initrd16'.
3063         (GRUB_MOD_FINI(linux)): Rename to ...
3064         (GRUB_MOD_FINI(linux16)): ... this.
3066 2009-03-24  Pavel Roskin  <proski@gnu.org>
3068         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3069         not just for compilation.
3071 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
3073         Move multiboot helper out of kernel
3075         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3076         `loader/i386/multiboot_helper.S'.
3077         * conf/i386-coreboot.rmk: Likewise
3078         * conf/i386-ieee1275.rmk: Likewise
3080         * kern/i386/loader.S: Move multiboot helpers from here...
3081         * loader/i386/multiboot_helper.S: ...moved here
3082         * include/grub/i386/loader.h: Move declarations of multiboot
3083         helpers from here...
3084         * include/grub/i386/multiboot.h: ...moved here
3085         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3087 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3089         * kern/env.c (grub_env_context_open): Added an argument to specify
3090         whether a new context inherits exported variables from current
3091         one. This is useful when making a sandbox to interpret a config
3092         file.
3093         All callers updated.
3095         * include/grub/env.h (grub_env_context_open): Updated the prototype.
3097 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3099         * kern/env.c (grub_env_context_close): Fix memory leaks.
3101 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3103         * normal/main.c (grub_normal_execute): Added an argument
3104         BATCH to specify if an interactive interface should be provided
3105         after reading a config file.
3106         All callers updated.
3107         (read_command_list): Prevent being executed twice.
3108         (read_fs_list): Likewise.
3110         * include/grub/normal.h (grub_normal_execute): Updated the
3111         prototype.
3113 2009-03-22  Pavel Roskin  <proski@gno.org>
3115         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3116         _start.
3117         * kern/i386/pc/startup.S: Likewise.
3118         * kern/i386/efi/startup.S: Likewise.
3119         * kern/i386/ieee1275/startup.S: Likewise.
3120         * kern/i386/coreboot/startup.S: Likewise.
3121         * kern/x86_64/efi/startup.S: Likewise.
3123         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3124         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3125         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3127 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
3129         Bugfixes in multiboot for bugs uncovered by solaris kernel.
3131         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3132         limit detection.
3133         Use vaddr of correct segment for entry_point.
3135 2009-03-21  Bean  <bean123ch@gmail.com>
3137         * commands/blocklist.c: Add include file <grub/command.h>, remove
3138         <grub/normal.h> and <grub/arg.h>.
3139         (grub_cmd_blocklist): Use the new command interface.
3140         (GRUB_MOD_INIT): Likewise.
3141         (GRUB_MOD_FINI): Likewise.
3142         * commands/boot.c: Likewise.
3143         * commands/cat.c: Likewise.
3144         * commands/cmp.c: Likewise.
3145         * commands/configfile.c: Likewise.
3146         * commands/crc.c: Likewise.
3147         * commands/echo.c: Likewise.
3148         * commands/halt.c: Likewise.
3149         * commands/handler.c: Likewise.
3150         * commands/hdparm.c: Likewise.
3151         * commands/help.c: Likewise.
3152         * commands/hexdump.c: Likewise.
3153         * commands/loadenv.c: Likewise.
3154         * commands/ls.c: Likewise.
3155         * commands/lsmmap.c: Likewise.
3156         * commands/lspci.c: Likewise.
3157         * commands/loadenv.c: Likewise.
3158         * commands/read.c: Likewise.
3159         * commands/reboot.c: Likewise.
3160         * commands/search.c: Likewise.
3161         * commands/sleep.c: Likewise.
3162         * commands/test.c: Likewise.
3163         * commands/usbtest.c: Likewise.
3164         * commands/videotest.c: Likewise.
3165         * commands/i386/cpuid.c: Likewise.
3166         * commands/i386/pc/halt.c: Likewise.
3167         * commands/i386/pc/play.c: Likewise.
3168         * commands/i386/pc/pxecmd.c: Likewise.
3169         * commands/i386/pc/vbeinfo.c: Likewise.
3170         * commands/i386/pc/vbetest.c: Likewise.
3171         * commands/ieee1275/suspend.c: Likewise.
3172         * disk/loopback.c: Likewise.
3173         * font/font_cmd.c: Likewise.
3174         * hello/hello.c: Likewise.
3175         * loader/efi/appleloader.c: Likewise.
3176         * loader/efi/chainloader.c: Likewise.
3177         * loader/i386/bsd.c: Likewise.
3178         * loader/i386/efi/linux.c: Likewise.
3179         * loader/i386/ieee1275/linux.c: Likewise.
3180         * loader/i386/linux.c: Likewise.
3181         * loader/i386/pc/chainloader.c: Likewise.
3182         * loader/i386/pc/linux.c: Likewise.
3183         * loader/powerpc/ieee1275/linux.c: Likewise.
3184         * loader/multiboot_loader.c: Likewise.
3185         * term/gfxterm.c: Likewise.
3186         * term/i386/pc/serial.c: Likewise.
3187         * term/terminfo.c: Likewise.
3189         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3190         * term/i386/pc/vga.c: Likewise.
3191         * video/readers/jpeg.c: Likewise.
3192         * video/readers/png.c: Likewise.
3193         * video/readers/tga.c: Likewise.
3195         * util/grub-fstest (cmd_loopback): Removed.
3196         (cmd_blocklist): Likewise.
3197         (cmd_ls): Likewise.
3198         (grub_register_command): Likewise.
3199         (grub_unregister_command): Likewise.
3200         (execute_command): Use grub_command_find to locate command and execute
3201         it.
3203         * include/grub/efi/chainloader.h: Removed.
3204         * loader/efi/chainloader_normal.c: Likewise.
3205         * loader/i386/bsd_normal.c: Likewise.
3206         * loader/i386/pc/chainloader_normal.c: Likewise.
3207         * loader/i386/pc/multiboot_normal.c: Likewise.
3208         * loader/linux_normal.c: Likewise.
3209         * loader/multiboot_loader_normal.c: Likewise.
3210         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3212         * gencmdlist.sh: Scan new registration command grub_register_extcmd
3213         and grub_register_command_p1.
3215         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3216         kern/command.c, lib/arg.c and commands/extcmd.c.
3217         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3218         (minicmd_mod_SOURCES): New variable.
3219         (minicmd_mod_CFLAGS): Likewise.
3220         (minicmd_mod_LDFLAGS): Likewise.
3221         (extcmd_mod_SOURCES): Likewise.
3222         (extcmd_mod_CFLAGS): Likewise.
3223         (extcmd_mod_LDFLAGS): Likewise.
3224         (boot_mod_SOURCES): Removed.
3225         (boot_mod_CFLAGS): Likewise.
3226         (boot_mod_LDFLAGS): Likewise.
3228         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3229         kern/corecmd.c.
3230         (kernel_img_HEADERS): Add command.h.
3231         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3232         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3233         and lib/arg.c.
3234         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3235         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3236         remove the corresponding normal mode command.
3237         (normal_mod_SOURCES): Remove normal/arg.c.
3238         * conf/i386-coreboot.rmk: Likewise.
3239         * conf/i386-efi.rmk: Likewise.
3240         * conf/i386-ieee1275.rmk: Likewise.
3241         * conf/powerpc-ieee1275.rmk: Likewise.
3242         * conf/x86_64-efi.rmk: Likewise.
3244         * include/grub/arg.h: Move from here ...
3245         * include/grub/lib/arg.h: ... to here.
3247         * normal/arg.c: Move from here ...
3248         * lib/arg.c: ... to here.
3250         * commands/extcmd.c: New file.
3251         * commands/minicmd.c: Likewise.
3252         * include/grub/command.h: Likewise.
3253         * include/grub/extcmd.h: Likewise.
3254         * kern/command.c: Likewise.
3255         * kern/corecmd.c: Likewise.
3257         * kern/list.c (grub_list_iterate): Return int instead of void.
3258         (grub_list_insert): New function.
3259         (grub_prio_list_insert): Likewise.
3261         * kern/rescue.c (grub_rescue_command): Removed.
3262         (grub_rescue_command_list): Likewise.
3263         (grub_rescue_register_command): Likewise.
3264         (grub_rescue_unregister_command): Likewise.
3265         (grub_rescue_cmd_boot): Move to minicmd.c
3266         (grub_rescue_cmd_help): Likewise.
3267         (grub_rescue_cmd_info): Likewise.
3268         (grub_rescue_cmd_boot): Likewise.
3269         (grub_rescue_cmd_testload): Likewise.
3270         (grub_rescue_cmd_dump): Likewise.
3271         (grub_rescue_cmd_rmmod): Likewise.
3272         (grub_rescue_cmd_lsmod): Likewise.
3273         (grub_rescue_cmd_exit): Likewise.
3274         (grub_rescue_print_devices): Moved to corecmd.c.
3275         (grub_rescue_print_files): Likewise.
3276         (grub_rescue_cmd_ls): Likewise.
3277         (grub_rescue_cmd_insmod): Likewise.
3278         (grub_rescue_cmd_set): Likewise.
3279         (grub_rescue_cmd_unset): Likewise.
3280         (attempt_normal_mode): Use grub_command_find to get normal module.
3281         (grub_enter_rescue_mode): Use grub_register_core_commands to register
3282         commands, remove grub_rescue_register_command calls.
3284         * normal/command.c (grub_register_command): Removed.
3285         (grub_unregister_command): Likewise.
3286         (grub_command_find): Likewise.
3287         (grub_iterate_commands): Likewise.
3288         (rescue_command): Likewise.
3289         (export_command): Moved to corecmd.c.
3290         (set_command): Removed.
3291         (unset_command): Likewise.
3292         (insmod_command): Likewise.
3293         (rmmod_command): Likewise.
3294         (lsmod_command): Likewise.
3295         (grub_command_init): Likewise.
3297         * normal/completion.c (iterate_command): Use cmd->prio to check for
3298         active command.
3299         (complete_arguments): Use grub_extcmd_t structure to find options.
3300         (grub_normal_do_completion): Change function grub_iterate_commands to
3301         grub_command_iterate.
3303         * normal/execute.c (grub_script_execute_cmd): No need to parse
3304         argument here.
3306         * normal/main.c (grub_dyncmd_dispatcher): New function.
3307         (read_command_list): Register unload commands as dyncmd.
3308         (grub_cmd_normal): Use new command interface, register rescue,
3309         unregister normal at entry, register normal, unregister rescue at exit.
3311         * include/grub/list.h (grub_list_test_t): New type.
3312         (grub_list_iterate): Return int instead of void.
3313         (grub_list_insert): New function.
3314         (GRUB_AS_NAMED_LIST_P): New macro.
3315         (GRUB_AS_PRIO_LIST): Likewise.
3316         (GRUB_AS_PRIO_LIST_P): Likewise.
3317         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3318         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3319         (grub_prio_list): New structure.
3320         (grub_prio_list_insert): New function.
3321         (grub_prio_list_remove): New inline function.
3323         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3324         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3325         (GRUB_COMMAND_FLAG_MENU): Likewise.
3326         (GRUB_COMMAND_FLAG_BOTH): Likewise.
3327         (GRUB_COMMAND_FLAG_TITLE): Likewise.
3328         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3329         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3330         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3331         (grub_command): Likewise.
3332         (grub_register_command): Likewise.
3333         (grub_command_find): Likewise.
3334         (grub_iterate_commands): Likewise.
3335         (grub_command_init): Likewise.
3336         (grub_arg_parse): Likewise.
3337         (grub_arg_show_help): Likewise.
3339         * include/grub/rescue.h (grub_rescue_register_command): Removed.
3340         (grub_rescue_unregister_command): Likewise.
3342         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3343         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3344         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3346         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3347         grub_rescue_cmd_initrd.
3348         * include/grub/i386/loader.h: Likewise.
3349         * include/grub/x86_64/loader.h: Likewise.
3351         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3353 2009-03-21  Bean  <bean123ch@gmail.com>
3355         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3356         instead of stat in mingw environment.
3358         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3360         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3362         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3363         AC_CONFIG_LINKS.
3365 2009-03-21  Bean  <bean123ch@gmail.com>
3367         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3368         out of range error.
3370 2009-03-18  Michel Dänzer  <michel@daenzer.net>
3372         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3373         checking inode flags for EXT4_EXTENTS_FLAG.
3375 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3377         * loader/i386/linux.c: Include `<grub/video.h>' and
3378         `<grub/i386/pc/vbe.h>'..
3379         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
3380         (grub_linux32_boot): Attempt to configure video settings with
3381         grub_linux_setup_video().
3382         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3383         to avoid grub_console_fini() which would step out of graphical mode
3384         unconditionally.
3386 2009-03-14  Robert Millan  <rmh@aybabtu.com>
3388         Fix build on powerpc.
3389         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3391 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
3393         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3394         background image command.
3396 2009-03-12  Colin D Bennett  <colin@gibibit.com>
3398         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3399         (grub_gfxterm_putchar): Extract pairs of identical calls to
3400         draw_cursor out of conditional blocks.
3402 2009-03-11  Pavel Roskin  <proski@gnu.org>
3404         * fs/hfs.c (grub_hfs_strncasecmp): New function.
3405         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3407 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3409         * loader/i386/multiboot_elfxx.c
3410         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3412 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
3414         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3415         `kern/handler.c'.
3417 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3419         * loader/i386/multiboot.c (code_size): New variable.
3420         (grub_multiboot): Define offsets by adding to `code_size' rather
3421         than subtracting from `grub_multiboot_payload_size'.  Provide
3422         4-byte alignment to MBI and others by increasing
3423         `boot_loader_name_length' appropriately.
3425         * loader/i386/multiboot_elfxx.c
3426         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3428 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3430         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3431         `fs/ext2.c'.
3433 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3435         Make loader/i386/linux.c usable on i386-pc again.
3437         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3438         memory to heap.
3439         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3440         `#error' stanza.
3442 2009-03-07  Bean  <bean123ch@gmail.com>
3444         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3445         allocation.
3447 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3449         Fix display issue on terminals with screen size other than 80x25
3450         (e.g. gfxterm with resolution higher than 640x480).
3452         * normal/main.c (grub_normal_init_page): Display title text in a
3453         position relative to the center of the terminal instead of relying
3454         on a hardcoded offset.
3456 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3458         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3459         installed.
3461         * Makefile.in (host_kernel): New variable.
3462         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3463         scripts instead of just the windows one.
3464         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3466 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3468         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3469         `kern/handler.c'.
3470         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3471         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3472         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3473         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3474         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3475         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3477 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3479         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3480         or if there's no space for the disk label and print the partition number on a
3481         invalid magic.
3483 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3485         * util/misc.c: Include <time.h>.
3486         (grub_millisleep): New function.
3488 2009-03-04  Bean  <bean123ch@gmail.com>
3490         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3491         another option -mno-red-zone.
3493         * commands/handler.c: Change module description.
3495         * kern/handler.c: Add missing space at the end of description line.
3497         * kern/list.c: Likewise.
3499 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3501         Move more components to the relocation area, and fix mbi pointer
3502         handling to use the destination rather than the origin (thanks to
3503         Vladimir Serbinenko for spotting).
3505         * loader/i386/multiboot.c (mbi_dest): New variable.
3506         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3507         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3508         relocation area.
3510 2009-03-01  Bean  <bean123ch@gmail.com>
3512         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3513         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3514         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3515         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3517         * loader/i386/efi/linux.c (acpi_guid): New variable.
3518         (acpi_guid): Likewise.
3519         (EBDA_SEG_ADDR): New constant.
3520         (LOW_MEM_ADDR): Likewise.
3521         (FAKE_EBDA_SEG): Likewise.
3522         (fake_bios_data): New function.
3523         (grub_linux_boot): Call fake_bios_data.
3525 2009-03-01  Bean  <bean123ch@gmail.com>
3527         * commands/terminal.c: Removed.
3529         * commands/handler.c: New file.
3531         * include/grub/list.h: Likewise.
3533         * include/grub/handler.h: Likewise.
3535         * kern/list.c: Likewise.
3537         * kern/handler.c: Likewise.
3539         * kern/term.h: Include header file <grub/handler.h>.
3540         (grub_term_input): Move next field to the beginning.
3541         (grub_term_output): Likewise.
3542         (grub_term_input_class): New variable.
3543         (grub_term_output_class): Likewise.
3544         (grub_term_register_input): Changed to inline function.
3545         (grub_term_register_output): Likewise.
3546         (grub_term_unregister_input): Likewise.
3547         (grub_term_unregister_output): Likewise.
3548         (grub_term_set_current_input): Likewise.
3549         (grub_term_set_current_output): Likewise.
3550         (grub_term_get_current_input): Likewise.
3551         (grub_term_get_current_output): Likewise.
3552         (grub_term_iterate_input): Removed.
3553         (grub_term_iterate_output): Likewise.
3555         * kern/term.c (grub_term_list_input): Removed.
3556         (grub_term_list_output): Likewise.
3557         (grub_term_input_class): New variable.
3558         (grub_term_output_class): Likewise.
3559         (grub_cur_term_input): Change variable as macro.
3560         (grub_cur_term_output): Likewise.
3561         (grub_term_register_input): Removed.
3562         (grub_term_register_output): Likewise.
3563         (grub_term_unregister_input): Likewise.
3564         (grub_term_unregister_output): Likewise.
3565         (grub_term_set_current_input): Likewise.
3566         (grub_term_set_current_output): Likewise.
3567         (grub_term_iterate_input): Likewise.
3568         (grub_term_iterate_output): Likewise.
3569         (grub_term_get_current_input): Likewise.
3570         (grub_term_get_current_output): Likewise.
3572         * util/grub-editenv.c: Include header file <grub/handler.h>.
3573         (grub_term_get_current_input): Removed.
3574         (grub_term_get_current_output): Likewise.
3575         (grub_term_input_class): New variable.
3576         (grub_term_output_class): Likewise.
3578         * util/grub-fstest.c (grub_term_get_current_input): Removed.
3579         (grub_term_get_current_output): Likewise.
3580         (grub_term_input_class): New variable.
3581         (grub_term_output_class): Likewise.
3583         * util/grub-probe.c (grub_term_get_current_input): Removed.
3584         (grub_term_get_current_output): Likewise.
3585         (grub_term_input_class): New variable.
3586         (grub_term_output_class): Likewise.
3588         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3589         (grub_term_get_current_output): Likewise.
3590         (grub_term_input_class): New variable.
3591         (grub_term_output_class): Likewise.
3593         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3594         (terminal_mod_SOURCES): Likewise.
3595         (terminal_mod_CFLAGS): Likewise.
3596         (terminal_mod_LDFLAGS): Likewise.
3598         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3599         handler.c.
3600         (kernel_img_SOURCES): Add list.c and handler.c.
3601         (kernel_img_HEADERS): Add list.h and handler.h.
3603         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3604         handler.c.
3605         (kernel_mod_SOURCES): Add list.c and handler.c.
3606         (kernel_mod_HEADERS): Add list.h and handler.h.
3608         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3609         handler.c.
3610         (kernel_elf_SOURCES): Add list.c and handler.c.
3611         (kernel_elf_HEADERS): Add list.h and handler.h.
3613         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3614         handler.c.
3615         (kernel_elf_SOURCES): Add list.c and handler.c.
3616         (kernel_elf_HEADERS): Add list.h and handler.h.
3618         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3619         handler.c.
3620         (kernel_mod_SOURCES): Add list.c and handler.c.
3621         (kernel_mod_HEADERS): Add list.h and handler.h.
3623         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3624         handler.c.
3625         (kernel_elf_SOURCES): Add list.c and handler.c.
3626         (kernel_elf_HEADERS): Add list.h and handler.h.
3628 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3630         Factorize elf32 / elf64 code in Multiboot loader.  This will
3631         prevent it from getting out of sync again.
3633         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3634         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3635         grub_multiboot_load_elf64): Move from here ...
3636         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3637         grub_multiboot_load_elf): ... to here (new file).
3639 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3641         * util/grub.d/10_linux.in: Rename "single-user mode" to
3642         "recovery mode".
3644 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3646         Don't leak in SCSI code.
3647         * disk/scsi.c (grub_scsi_close): free `scsi'.
3649 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3651         * loader/i386/pc/multiboot.c: Move from here ...
3652         * loader/i386/multiboot.c: ... to here.  Update all users.
3654 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3656         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3657         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3659 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3661         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3662         b-tree.
3664 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3666         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3667         `0x' qualifier as 0 when base is specified as parameter).
3669 2009-02-24  Bean  <bean123ch@gmail.com>
3671         * configure.ac: Check for -mcmodel=large in x86_64 target.
3673         * include/grub/efi/api.h (efi_call_10): New macro.
3674         (efi_wrap_10): New function.
3676         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3677         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3678         (GRUB_PE32_REL_BASED_LOW): Likewise.
3679         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3680         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3681         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3682         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3683         (GRUB_PE32_REL_BASED_REL): Likewise.
3684         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3685         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3686         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3688         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3689         issue.
3691         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3692         (efi_wrap_10): New function.
3694         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3696         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3697         MB/MBP model (NV chipset).
3698         (devdata_devs): Add devpath_5 to the list.
3700         * load/i386/efi/linux.c (video_base): Remove variable.
3701         (RGB_MASK): New macro.
3702         (RGB_MAGIC): Likewise.
3703         (LINE_MIN): Likewise.
3704         (LINE_MAX): Likewise.
3705         (FBTEST_STEP): Likewise.
3706         (FBTEST_COUNT): Likewise.
3707         (fb_list): New variable.
3708         (grub_find_video_card): Remove function.
3709         (find_framebuf): New function.
3710         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3711         line length.
3713         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3714         problem for x86_64.
3716 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3718         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3720         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3721         coding tool name.
3723 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3725         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3726         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3727         in our relocation, instead of using it directly from heap.  Also
3728         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3730 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3732         Implement USB keyboard support (based on patch by Marco Gerards)
3734         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3735         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3736         (usb_keyboard_mod_LDFLAGS): New variables.
3738         * term/usb_keyboard.c: New file.
3740 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3742         Corrected wrong declaration
3744         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3746 2009-02-14  Christian Franke  <franke@computer.org>
3748         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3749         (grub_lspci_iter): Print class code and programming interface byte.
3751 2009-02-14  Christian Franke  <franke@computer.org>
3753         * gendistlist.sh: Ignore `.svn' directories.
3755 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3757         * fs/fat.c: Add 2009 to Copyright line.
3759 2009-02-14  Christian Franke  <franke@computer.org>
3761         * commands/hdparm.c: New file.  Provides `hdparm' command
3762         which sends ATA commands via grub_disk_ata_pass_through ().
3764         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3766         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3767         and <grub/cpu/io.h> to include/grub/ata.h.
3768         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3769         (GRUB_CDROM_SECTOR_SIZE): Remove.
3770         (GRUB_ATA_*): Move to include/grub/ata.h.
3771         (GRUB_ATAPI_*): Likewise.
3772         (enum grub_ata_commands): Likewise.
3773         (enum grub_ata_timeout_milliseconds): Likewise.
3774         (struct grub_ata_device): Likewise.
3775         (grub_ata_regset): Likewise.
3776         (grub_ata_regget): Likewise.
3777         (grub_ata_regset2): Likewise.
3778         (grub_ata_regget2): Likewise.
3779         (grub_ata_check_ready): Likewise.
3780         (grub_ata_wait_not_busy): Remove static, exported in
3781         include/grub/ata.h.
3782         (grub_ata_wait_drq): Likewise.
3783         (grub_ata_pio_read): Likewise.
3785         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3786         function for hdparm.mod.
3788         * include/grub/ata.h: New file, contains declarations from
3789         disk/ata.c.
3790         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3792         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3793         (grub_disk_ata_pass_through): New exported variable.
3795         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3797 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3799         Support multiple fallback entries, and provide an API to support
3800         executing default+fallback menu entries.  Renamed the `terminal' menu
3801         viewer to `text'.
3803         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3804         variable declaration.
3805         (grub_menu_execute_callback): New structure declaration.
3806         (grub_menu_execute_callback_t): New typedef.
3807         (grub_menu_execute_with_fallback): New function declaration.
3808         (grub_menu_get_entry): Likewise.
3809         (grub_menu_get_timeout): Likewise.
3810         (grub_menu_set_timeout): Likewise.
3812         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3814         * normal/menu.c (grub_wait_after_message): Moved to
3815         `normal/menu_text.c'.
3816         (draw_border): Likewise.
3817         (print_message): Likewise.
3818         (print_entry): Likewise.
3819         (print_entries): Likewise.
3820         (grub_menu_init_page): Likewise.
3821         (get_entry_number): Likewise.
3822         (print_timeout): Likewise.
3823         (run_menu): Likewise.
3824         (grub_menu_execute_entry): Likewise.
3825         (show_text_menu): Likewise.
3826         (get_and_remove_first_entry_number): New function.
3827         (grub_menu_execute_with_fallback): Likewise.
3828         (get_entry): Renamed to ...
3829         (grub_menu_get_entry): .. this and made it global.
3830         (get_timeout): Renamed to ...
3831         (grub_menu_get_timeout): ... this and made it global.
3832         (set_timeout): Renamed to ...
3833         (grub_menu_set_timeout): ... this and made it global.
3834         (grub_normal_terminal_menu_viewer): Renamed to ...
3835         (grub_normal_text_menu_viewer): ... this.
3837         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3838         from normal/menu.c.
3840         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3841         (normal_mod_SOURCES): Likewise.
3843         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3844         (normal_mod_SOURCES): Likewise.
3846         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3847         (normal_mod_SOURCES): Likewise.
3849         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3850         (normal_mod_SOURCES): Likewise.
3852         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3853         (normal_mod_SOURCES): Likewise.
3855         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3856         (normal_mod_SOURCES): Likewise.
3858         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3859         (normal_mod_SOURCES): Likewise.
3861 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3863         * util/grub.d/00_header.in: Update old reference to `font' command.
3865 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3867         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3869         Based on patch from Javier Martín.
3871 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3873         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3874         to avoid false positives with FAT.
3875         (grub_fstest_SOURCES): Likewise.
3876         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3877         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3878         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3879         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3880         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3881         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3883 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3885         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3886         bpb.version_specific.fat12_or_fat16.fstype and
3887         bpb.version_specific.fat32.fstype.
3889 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3891         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3893 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3895         * Makefile.in (host_os, host_cpu): New variables.
3896         (target_os): Remove.  Update all users.
3898 2009-02-08  Marco Gerards  <marco@gnu.org>
3900         * Makefile.in (enable_grub_emu_usb): New variable.
3901         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3902         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3903         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3904         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3905         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3906         `usbtest.mod' and `usbms.mod'.
3907         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3908         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3909         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3910         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3911         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3912         variables.
3914         * disk/usbms.c: New file.
3916         * include/grub/usb.h: Likewise.
3918         * include/grub/usbtrans.h: Likewise.
3920         * include/grub/usbdesc.h: Likewise.
3922         * bus/usb/usbtrans.c: Likewise.
3924         * bus/usb/ohci.c: Likewise.
3926         * bus/usb/uhci.c: Likewise.
3928         * bus/usb/usbhub.c: Likewise.
3930         * bus/usb/usb.c: Likewise.
3932         * commands/usbtest.c: Likewise.
3934         * util/usb.c: Likewise.
3936         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3938         * configure.ac: Test for libusb presence.
3940         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3942 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3944         * kern/mm.c: Add more comments.
3946 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3948         Patch from Javier Martín.
3949         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3950         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3952 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3954         * fs/cpio.c: Split tar functionality to ...
3955         * fs/tar.c: ... here (new file).  Update all users.
3957 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3959         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3960         backward-incompatible features.
3962         Based on patch from Javier Martín, with some adjustments.
3964 2009-02-07  Michael Scherer  <misc@mandriva.org>
3966         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3968 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3970         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3971         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3972         after the RAID stuff.
3974 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3976         Fixes problem when running vbetest command as reported by
3977         Vladimir Serbinenko <phcoder@gmail.com>.
3979         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3981 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3983         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3984         /dev/md/NpN style mdraid devices.
3986 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3988         * util/unifont2pff.rb: Remove.
3990 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3992         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3993         `#'.
3995 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3997         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3998         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3999         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4000         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4001         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4002         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4003         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4005 2009-02-02  Christian Franke  <franke@computer.org>
4007         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4009 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
4011         * INSTALL: Note that we now require at least autoconf 2.59 and
4012         that LZO is optional.
4014 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4016         Base on patch on bug #24154 created by Tomas Tintera
4017         <trosos@seznam.cz>.
4019         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4021 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4023         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4024         <bero@arklinux.org>.
4026         * normal/parser.y (script_init): Add missing semicolon.
4028 2009-01-31  Colin D Bennett  <colin@gibibit.com>
4030         * normal/main.c: Add include to grub/menu_viewer.h.
4031         (free_menu_entry_classes): Added.
4032         (grub_normal_menu_addentry): Added class property handling.
4033         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4034         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4036         * normal/menu_viewer.c: New file.
4038         * normal/menu.c (run_menu_entry): Renamed to ...
4039         (grub_menu_execute_entry): ... this and made it as global.
4040         (grub_menu_run): Renamed to ...
4041         (show_text_menu): ... this and made it local.
4042         (show_text_menu): Adapt to new function names.
4043         (grub_normal_terminal_menu_viewer): New global variable.
4045         * include/grub/menu.h: New file.
4047         * include/grub/menu_viewer.h: New file.
4049         * include/grub/normal.h: Added include to grub/menu.h.
4050         (grub_menu_entry): Moved to include/grub/menu.h.
4051         (grub_menu_entry_t): Likewise.
4052         (grub_menu): Likewise.
4053         (grub_menu_t): Likewise.
4054         (grub_normal_terminal_menu_viewer): Added.
4055         (grub_menu_execute_entry): Likewise.
4056         (grub_menu_run): Removed.
4058         * DISTLIST: Added include/grub/menu.h.
4059         Added include/grub/menu_viewer.h.
4060         Added normal/menu_viewer.c.
4062 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
4064         * normal/execute.c (grub_script_execute_menuentry): Changed to use
4065         arglist for menutitle arguments.
4067         * normal/main.c (grub_normal_menu_addentry): Likewise.
4069         * normal/parser.y (menuentry): Likewise.
4071         * normal/script.c (grub_script_create_cmdmenu): Likewise.
4073         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4074         (grub_script_create_cmdmenu): Likewise.
4076         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4078         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4079         changes.
4081         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4083         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4085         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4087         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4089         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4091         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4093 2009-01-30  Christian Franke  <franke@computer.org>
4095         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4096         in option help text.
4098 2009-01-27  Pavel Roskin  <proski@gnu.org>
4100         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4102 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4104         * commands/lsmmap.c: Add include to grub/machine/memory.h.
4106         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4108         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4109         unregister function.
4111 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4113         * disk/scsi.c (grub_scsi_read): Fix sign problem.
4115         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4117         * util/grub-mkfont.c (usage): Fix typo.
4119         * util/elf/grub-mkimage.c (load_modules): Fix warning.
4121 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
4123         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4125         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4127         * kern/misc.c (grub_strcasecmp): New function.
4128         (grub_strcasecmp): Use grub_size_t instead of int for length.
4129         Fix return value.
4130         * include/grub/misc.h: Update function prototypes.
4132 2009-01-26  Robert Millan  <rmh@aybabtu.com>
4134         * configure.ac: Fix cross-compilation check.
4136 2009-01-22  Christian Franke  <franke@computer.org>
4138         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4139         (precision) digit string.  Allow `.format2' without `format1' (width).
4140         Limit input chars for `%s' output to `format2' if specified.  This is
4141         compatible with standard printf ().
4143 2009-01-22  Christian Franke  <franke@computer.org>
4145         * disk/ata.c (grub_ata_wait_status): Replace by ...
4146         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
4147         other status bits may be invalid while BSY is asserted.
4148         (grub_ata_check_ready): New function.
4149         (grub_ata_cmd): Removed.
4150         (grub_ata_wait_drq): New function.
4151         (grub_ata_strncpy): Remove inline.
4152         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
4153         and error check now done by grub_ata_wait_drq ().
4154         (grub_ata_pio_write): Likewise.
4155         (grub_atapi_identify): Set DEV before check for !BSY.  Use
4156         grub_ata_wait_drq () to wait for data.
4157         (grub_ata_device_initialize): Add status register check to
4158         detect missing SATA slave devices.  Add debug messages.
4159         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4160         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
4161         transfer loop by grub_ata_pio_write ().
4162         (grub_ata_identify): Set DEV before check for !BSY. Use
4163         grub_ata_wait_drq () to wait for data.
4164         (grub_ata_setaddress): Set DEV before check for !BSY.
4165         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4166         read/write in one loop.  Fix invalid command on write.  Fix incomplete
4167         command on (size % batch) == 0.  Add missing error check after write of
4168         last block.  Add debug messages.
4169         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
4171 2009-01-19  Christian Franke  <franke@computer.org>
4173         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4174         (GRUB_ATAPI_IREASON_*): Likewise.
4175         (grub_ata_pio_write): Fix timeout error return.
4176         (grub_atapi_identify): Add grub_ata_wait () after cmd.
4177         (grub_atapi_wait_drq): New function.
4178         (grub_atapi_packet): New parameter `size'.
4179         Use grub_atapi_wait_drq () and direct write instead of
4180         grub_ata_pio_write ().
4181         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4182         reads the number of bytes requested by the device for each DRQ
4183         assertion.
4184         (grub_atapi_write): Remove old implementation, return not
4185         implemented instead.
4187 2009-01-19  Christian Franke  <franke@computer.org>
4189         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4190         of 512 to calculate data size.
4191         (grub_scsi_read12): Likewise.
4192         (grub_scsi_write10): Likewise.
4193         (grub_scsi_write12): Likewise.
4194         (grub_scsi_read): Adjust size according to blocksize.
4195         Add checks for invalid blocksize and unaligned transfer.
4197 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
4199         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4201         * term/gfxterm.c (write_char): Fix background rendering for wide
4202         width glyphs.
4204 2009-01-19  Robert Millan  <rmh@aybabtu.com>
4206         * config.guess: Update to latest version from config git.
4207         * config.sub: Likewise.
4209 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
4211         * Makefile.in: Change font compilation to use new grub-mkfont instead
4212         of java version.
4214         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4215         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4216         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4217         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4218         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4219         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4220         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4221         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4222         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4224 2009-01-16  Christian Franke  <franke@computer.org>
4226         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4227         (enum grub_ata_timeout_milliseconds): New enum.
4228         (grub_ata_wait_status): Add parameter milliseconds.
4229         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
4230         recovery from timed-out commands.
4231         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
4232         return grub_errno instead of REG_ERROR.
4233         (grub_ata_pio_write): Add parameter milliseconds.
4234         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4235         Pass milliseconds to grub_ata_wait_status () and
4236         grub_ata_pio_read ().
4237         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4238         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
4239         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
4240         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4241         It is not suitable for device detection, because DEV bit is ignored,
4242         the command may run too long, and not all devices set the signature
4243         properly.
4244         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4245         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4246         Fix device selection, DEV bit must be set first to address the registers
4247         of the correct device.
4248         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4249         grub_ata_pio_read/write ().
4250         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4251         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4253 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
4255         * util/grub-editenv.c (main): Use fseeko(), not fseek().
4257 2009-01-13  Bean  <bean123ch@gmail.com>
4259         * util/grub-mkfont.c (write_font): forget to remove some debug code.
4261 2009-01-13  Bean  <bean123ch@gmail.com>
4263         * Makefile.in: (enable_grub_mkfont): New variable.
4264         (freetype_cflags): Likewise.
4265         (freetype_libs): Likewise.
4267         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4268         (grub_mkfont_SOURCES): New variable.
4269         (grub_mkfont_CFLAGS): Likewise.
4270         (grub_mkfont_LDFLAGS): Likewise.
4272         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4273         library if `--enable-grub-mkfont' is requested.
4274         (enable_grub_mkfont): New variable.
4275         (freetype_cflags): Likewise.
4276         (freetype_libs): Likewise.
4278         * util/grub-mkfont.c: New file.
4280 2009-01-12  Christian Franke  <franke@computer.org>
4282         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4283         mode check.  Fix setting of compat_use[].
4285 2009-01-10  Robert Millan  <rmh@aybabtu.com>
4287         Update a few copyright years which we forgot to do in 2008 (only for
4288         files whose changes made in 2008 were copyright-significant)
4290         * Makefile.in: Add 2008 to Copyright line.
4291         * disk/ieee1275/ofdisk.c: Likewise.
4292         * disk/efi/efidisk.c: Likewise.
4293         * kern/dl.c: Likewise.
4294         * kern/sparc64/ieee1275/init.c: Likewise.
4295         * kern/mm.c: Likewise.
4296         * kern/efi/mm.c: Likewise.
4297         * boot/i386/pc/boot.S: Likewise.
4298         * genfslist.sh: Likewise.
4299         * fs/iso9660.c: Likewise.
4300         * fs/hfs.c: Likewise.
4301         * fs/jfs.c: Likewise.
4302         * fs/minix.c: Likewise.
4303         * fs/ufs.c: Likewise.
4304         * gensymlist.sh.in: Likewise.
4305         * genkernsyms.sh.in: Likewise.
4306         * include/grub/misc.h: Likewise.
4307         * include/grub/types.h: Likewise.
4308         * include/grub/symbol.h: Likewise.
4309         * include/grub/elf.h: Likewise.
4310         * include/grub/kernel.h: Likewise.
4311         * include/grub/disk.h: Likewise.
4312         * include/grub/dl.h: Likewise.
4313         * include/grub/i386/linux.h: Likewise.
4314         * include/grub/i386/pc/biosdisk.h: Likewise.
4315         * include/grub/efi/api.h: Likewise.
4316         * include/grub/efi/pe32.h: Likewise.
4317         * include/grub/util/misc.h: Likewise.
4318         * normal/execute.c: Likewise.
4319         * normal/arg.c: Likewise.
4320         * normal/completion.c: Likewise.
4321         * normal/lexer.c: Likewise.
4322         * normal/parser.y: Likewise.
4323         * normal/misc.c: Likewise.
4324         * commands/i386/pc/vbeinfo.c: Likewise.
4325         * commands/hexdump.c: Likewise.
4326         * commands/terminal.c: Likewise.
4327         * commands/ls.c: Likewise.
4328         * commands/help.c: Likewise.
4329         * partmap/pc.c: Likewise.
4330         * loader/efi/chainloader.c: Likewise.
4331         * loader/multiboot_loader.c: Likewise.
4332         * loader/i386/pc/multiboot2.c: Likewise.
4333         * term/efi/console.c: Likewise.
4334         * term/i386/pc/serial.c: Likewise.
4335         * util/lvm.c: Likewise.
4336         * util/console.c: Likewise.
4337         * util/i386/efi/grub-mkimage.c: Likewise.
4338         * util/raid.c: Likewise.
4340 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
4342         * commands/videotest.c: Removed include to grub/machine/memory.h.
4344         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4345         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4346         (video_mod_SOURCES): Removed.
4347         (video_mod_CFLAGS): Likewise.
4348         (video_mod_LDFLAGS): Likewise.
4349         (gfxterm_mod_SOURCES): Likewise.
4350         (gfxterm_mod_CFLAGS): Likewise.
4351         (gfxterm_mod_LDFLAGS): Likewise.
4352         (videotest_mod_SOURCES): Likewise.
4353         (videotest_mod_CFLAGS): Likewise.
4354         (videotest_mod_LDFLAGS): Likewise.
4355         (bitmap_mod_SOURCES): Likewise.
4356         (bitmap_mod_CFLAGS): Likewise.
4357         (bitmap_mod_LDFLAGS): Likewise.
4358         (tga_mod_SOURCES): Likewise.
4359         (tga_mod_CFLAGS): Likewise.
4360         (tga_mod_LDFLAGS): Likewise.
4361         (jpeg_mod_SOURCES): Likewise.
4362         (jpeg_mod_CFLAGS): Likewise.
4363         (jpeg_mod_LDFLAGS): Likewise.
4364         (png_mod_SOURCES): Likewise.
4365         (png_mod_CFLAGS): Likewise.
4366         (png_mod_LDFLAGS): Likewise.
4368         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4369         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4370         (video_mod_SOURCES): Added.
4371         (video_mod_CFLAGS): Likewise.
4372         (video_mod_LDFLAGS): Likewise.
4373         (videotest_mod_SOURCES): Likewise.
4374         (videotest_mod_CFLAGS): Likewise.
4375         (videotest_mod_LDFLAGS): Likewise.
4376         (bitmap_mod_SOURCES): Likewise.
4377         (bitmap_mod_CFLAGS): Likewise.
4378         (bitmap_mod_LDFLAGS): Likewise.
4379         (tga_mod_SOURCES): Likewise.
4380         (tga_mod_CFLAGS): Likewise.
4381         (tga_mod_LDFLAGS): Likewise.
4382         (jpeg_mod_SOURCES): Likewise.
4383         (jpeg_mod_CFLAGS): Likewise.
4384         (jpeg_mod_LDFLAGS): Likewise.
4385         (png_mod_SOURCES): Likewise.
4386         (png_mod_CFLAGS): Likewise.
4387         (png_mod_LDFLAGS): Likewise.
4388         (gfxterm_mod_SOURCES): Likewise.
4389         (gfxterm_mod_CFLAGS): Likewise.
4390         (gfxterm_mod_LDFLAGS): Likewise.
4392         * term/gfxterm.c: Removed include to grub/machine/memory.h,
4393         grub/machine/console.h.
4395 2009-01-04  Jerone Young  <jerone@gmail.com>
4397         Make on screen instructions clearer
4399         Based on patch created by Jidanni <jidanni@jidanni.org>
4401         * normal/menu.c: print clearer instructions on the screen
4403 2009-01-02  Colin D Bennett  <colin@gibibit.com>
4405         New font engine.
4407         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4408         build system and fixed gfxterm.c to work with different sized fonts.
4410         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4412         * configure: Re-generated.
4414         * DISTLIST: Removed font/manager.c.
4415         Added font/font.c.
4416         Added font/font_cmd.c.
4418         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
4419         compilation.
4421         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
4423         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4425         * kern/term.c: Changed users of grub_utf8_to_ucs4.
4427         * normal/menu.c: Likewise.
4429         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4430         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4432         * include/grub/font.h: Replaced with new file.
4434         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4435         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4436         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4437         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4438         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4439         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4440         fg_red, fg_green, fg_blue, fg_alpha.
4441         (grub_video_adapter): Removed blit_glyph.
4442         (grub_video_blit_glyph): Removed.
4444         * font/manager.c: Removed file.
4446         * font/font.c: New file.
4448         * font/font_cmd.c: Likewise.
4450         * video/video.c (grub_video_blit_glyph): Removed.
4452         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4453         (grub_video_vbe_map_rgba): Likewise.
4454         (grub_video_vbe_unmap_color_int): Likewise.
4455         (grub_video_vbe_blit_glyph): Removed.
4456         (grub_video_vbe_adapter): Removed blit_glyph.
4458         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4459         (get_pixel): Likewise.
4460         (set_pixel): Likewise.
4462         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4464         * term/gfxterm.c: Adapted to new font engine.
4466         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4468         * term/i386/pc/vga.c: Likewise.
4470         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4472         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4474         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4476         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4478         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4480         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4482         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4484         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4486         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4488         * util/grub.d/00_header.in: Changed to use new loadfont command.
4490         * util/grub-mkconfig_lib.in: Changed font extension.
4492 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4494         * util/getroot.c (grub_util_get_grub_dev): Add support for
4495         /dev/md/dNNpNN style partitionable mdraid devices.
4497 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4499         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4500         at a time limit of the PXE TFTP API correctly.
4501         (grub_pxefs_close): Likewise.
4503 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4505         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4506         grub_ata_device_initialize() calls.
4508 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4510         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4511         iteration failed.
4512         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4514 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4516         Fix build on powerpc-ieee1275.  Based on patch created by
4517         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4518         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4519         `kern/ieee1275/mmap.c'.
4520         * include/grub/powerpc/ieee1275/memory.h: New file.
4522         Provide grub-install on coreboot.
4523         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4524         (grub_install_SOURCES): New variable.
4525         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4526         usable on coreboot.
4528 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4530         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4531         to `grub_term_input_t'.
4532         (grub_term_get_current_output): Change return type to
4533         `grub_term_output_t'.
4535 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4537         Fix breakage on coreboot due to declaration mismatch.
4538         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4539         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4540         grub_vga_text_cls().
4542         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4543         comments.  Avoid copying one more byte than necessary (just in case).
4545         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4546         to 0x200000 (avoids trouble with some OFW implementations, and matches
4547         with the one in Yaboot).
4548         Reported by Manoel Abranches
4550 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4552         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4553         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4555         * util/grub-mkconfig_lib.in (grub_warn): New function.
4556         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4557         warnings, to obtain consistent formatting.
4558         * util/grub.d/00_header.in: Likewise.
4559         * util/update-grub_lib.in: Likewise.
4561         * loader/i386/linux.c (allocate_pages): Fix a warning.
4562         Move comment text to `#error' stanza.
4564         Harmonize ieee1275's grub_available_iterate() with the generic
4565         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4566         build problem on i386-ieee1275):
4567         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4568         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4569         parameter `type'.  Update all users of this function.
4570         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4571         `kern/ieee1275/mmap.c'.
4572         * kern/ieee1275/init.c
4573         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4574         with ...
4575         (grub_machine_mmap_iterate): ... this.
4576         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4577         return type to `grub_err_t'.  Update all implementations of this
4578         function prototype.
4579         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4580         Likewise.
4582         Add `lsmmap' command (lists firmware-provided memory map):
4583         * commands/lsmmap.c: New file.
4584         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4585         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4586         variables.
4587         * conf/powerpc-ieee1275.rmk: Likewise.
4588         * conf/i386-coreboot.rmk: Likewise.
4589         * conf/i386-ieee1275.rmk: Likewise.
4591 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4593         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4594         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4595         constraints to initrd allocation (based on code from
4596         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4597         for Linux to find it.
4599 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4601         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4602         order to cope with duplicate slashes.
4604 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4606         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4607         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4608         don't want to mess with lower memory, because it is used in the Linux
4609         loader.
4611         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4612         an appropriate place in lower memory, between 0x10000 and 0x90000,
4613         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4614         is in our heap (probably as a result of it being corrupted during
4615         decompression).  Add #error instance with comment to explain why this
4616         loader isn't currently usable on PC/BIOS.
4618 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4620         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4621         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4623 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4625         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4627         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4628         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4629         from here ...
4630         * include/grub/i386/pc/memory.h: ... to here.
4632 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4634         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4635         split).
4637         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4638         (grub_console_cur_color, grub_console_real_putchar)
4639         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4640         (grub_console_setcolorstate, grub_console_setcolor)
4641         (grub_console_getcolor): Move from here ...
4642         * include/grub/i386/vga_common.h: ... to here (new file).
4644         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4645         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4646         `<grub/i386/io.h>'.
4647         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4648         `<grub/i386/vga_common.h>'.
4650 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4652         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4653         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4654         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4655         variables.
4656         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4657         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4659         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4660         grub_console_init() with call to grub_vga_text_init().
4661         (grub_machine_fini): Replace call to
4662         grub_console_fini() with call to grub_vga_text_fini() and
4663         grub_at_keyboard_fini().
4665         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4666         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4667         (grub_console_setcolorstate, grub_console_setcolor)
4668         (grub_console_getcolor): New function prototypes.
4670         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4671         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4672         (grub_vga_text_setcursor): Static-ize.
4673         (grub_vga_text_term): New structure.
4674         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4676         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4677         (grub_console_cur_color, grub_console_standard_color)
4678         (grub_console_normal_color, grub_console_highlight_color)
4679         (map_char, grub_console_putchar, grub_console_getcharwidth)
4680         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4681         (grub_console_getcolor): Move from here ...
4682         * term/i386/vga_common.c: ... to here (same function names).
4684 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4686         Use newly-added Multiboot support in coreboot.
4688         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4689         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4691         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4692         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4693         (codestart): Store the MBI in `startup_multiboot_info' when we're
4694         being loaded using Multiboot.
4696         * kern/i386/coreboot/init.c (grub_machine_init): Move
4697         grub_at_keyboard_init() call to beginning of function (useful for
4698         debugging).  Call grub_machine_mmap_init() before attempting to use
4699         grub_machine_mmap_iterate().
4700         (grub_lower_mem, grub_upper_mem): Move from here ...
4701         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4702         here (new file).
4704         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4705         function prototype.
4707 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4709         Fix a regression introduced by the at_keyboard.mod split.  Because
4710         some terminals are default on some platforms and non-default on
4711         others, the first terminal being registered determines which is
4712         going to be default.
4714         * kern/term.c (grub_term_register_input): If this is the first
4715         terminal being registered, set it as the current one.
4716         (grub_term_register_output): Likewise.
4718         * term/efi/console.c (grub_console_init): Do not call
4719         grub_term_set_current_output() or grub_term_set_current_input().
4720         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4721         * term/i386/pc/console.c (grub_console_init): Likewise.
4722         (grub_console_fini): Do not call grub_term_set_current_input()
4723         (but leave grub_term_set_current_output() to restore text mode).
4725 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4727         * util/grub.d/00_header.in: Add backward compatibility check for
4728         versions of terminal.mod that don't understand `terminal_input' or
4729         `terminal_output'.
4731 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4733         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4734         `terminal_input' / `terminal_output', not `terminal'.
4736 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4738         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4739         (DISTCLEANFILES): Add `build_env.mk'.
4741 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4743         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4744         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4745         members.  Update all users.
4746         * util/console.c (grub_ncurses_term): Split in ...
4747         (grub_ncurses_term_input): ... this, and ...
4748         (grub_ncurses_term_output): ... this.  Update all users.
4749         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4751 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4753         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4754         (PKGDATA): Add $(pkgdata_SRCDIR).
4755         (pkglib_BUILDDIR): New variable.
4756         (pkgdata_SRCDIR): New variable.
4757         (build_env.mk): New target.
4758         (include_DATA): New variable.
4759         (install-local): Install $(include_DATA) files in $(includedir).
4761 2008-11-07  Pavel Roskin  <proski@gnu.org>
4763         * gendistlist.sh: Use C locale for sorting to ensure consistent
4764         output on all systems.
4766         * util/grub.d/00_header.in: Remove incorrect space before
4767         "serial".
4769 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4771         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4772         per specification.
4773         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4774         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4775         (based on find_multi_boot1_header).
4776         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4777         using find_multi_boot2_header(), and abort if neither Multiboot or
4778         Multiboot headers were found.
4780 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4782         Modularize at_keyboard.mod:
4784         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4785         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4786         (at_keyboard_mod_LDFLAGS): New variables.
4788         Actual terminal split:
4790         * include/grub/term.h (struct grub_term): Split in ...
4791         (struct grub_term_input): ... this, and ...
4792         (struct grub_term_output): ... this.  Update all users.
4793         (grub_term_set_current): Split in ...
4794         (grub_term_set_current_input): ... this, and ...
4795         (grub_term_set_current_output): ... this.
4796         (grub_term_get_current): Split in ...
4797         (grub_term_get_current_input): ... this, and ...
4798         (grub_term_get_current_output): ... this.
4799         (grub_term_register): Split in ...
4800         (grub_term_register_input): ... this, and ...
4801         (grub_term_register_output): ... this.
4802         (grub_term_unregister): Split in ...
4803         (grub_term_unregister_input): ... this, and ...
4804         (grub_term_unregister_output): ... this.
4805         (grub_term_iterate): Split in ...
4806         (grub_term_iterate_input): ... this, and ...
4807         (grub_term_iterate_output): ... this.
4809         * kern/term.c (grub_term_list): Split in ...
4810         (grub_term_list_input): ... this, and ...
4811         (grub_term_list_output): ... this.  Update all users.
4812         (grub_cur_term): Split in ...
4813         (grub_cur_term_input): ... this, and ...
4814         (grub_cur_term_output): ... this.  Update all users.
4815         (grub_term_set_current): Split in ...
4816         (grub_term_set_current_input): ... this, and ...
4817         (grub_term_set_current_output): ... this.
4818         (grub_term_get_current): Split in ...
4819         (grub_term_get_current_input): ... this, and ...
4820         (grub_term_get_current_output): ... this.
4821         (grub_term_register): Split in ...
4822         (grub_term_register_input): ... this, and ...
4823         (grub_term_register_output): ... this.
4824         (grub_term_unregister): Split in ...
4825         (grub_term_unregister_input): ... this, and ...
4826         (grub_term_unregister_output): ... this.
4827         (grub_term_iterate): Split in ...
4828         (grub_term_iterate_input): ... this, and ...
4829         (grub_term_iterate_output): ... this.
4831         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4832         a check for input and one for output (and only attempt to get keys
4833         from user when input works).
4835         * util/grub-probe.c (grub_term_get_current): Split in ...
4836         (grub_term_get_current_input): ... this, and ...
4837         (grub_term_get_current_output): ... this.
4838         * util/grub-fstest.c: Likewise.
4839         * util/i386/pc/grub-setup.c: Likewise.
4840         * util/grub-editenv.c: Likewise.
4842         Portability adjustments:
4844         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4845         `term/i386/pc/at_keyboard.c'.
4846         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4847         grub_keyboard_controller_init() (now handled by terminal .init).
4848         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4849         grub_at_keyboard_init().
4850         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4851         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4852         at_keyboard.mod via input terminal interface).
4853         * include/grub/i386/coreboot/console.h: Convert into a stub for
4854         `<grub/i386/pc/console.h>'.
4856         Migrate full terminals to new API:
4858         * term/efi/console.c (grub_console_term): Split into ...
4859         (grub_console_term_input): ... this, and ...
4860         (grub_console_term_output): ... this.  Update all users.
4861         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4862         (grub_ofconsole_init): Split into ...
4863         (grub_ofconsole_init_input): ... this, and ...
4864         (grub_ofconsole_init_output): ... this.
4865         (grub_ofconsole_term): Split into ...
4866         (grub_ofconsole_term_input): ... this, and ...
4867         (grub_ofconsole_term_output): ... this.  Update all users.
4868         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4869         (grub_serial_term_input): ... this, and ...
4870         (grub_serial_term_output): ... this.  Update all users.
4871         * term/i386/pc/console.c (grub_console_term): Split into ...
4872         (grub_console_term_input): ... this, and ...
4873         (grub_console_term_output): ... this.  Update all users.
4874         (grub_console_term_input): Only enable it on PC/BIOS platform.
4875         (grub_console_init): Remove grub_keyboard_controller_init() call.
4877         Migrate input terminals to new API:
4879         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4880         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4881         i386-specific anyway).
4882         (grub_console_checkkey): Rename to ...
4883         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4884         users.
4885         (grub_keyboard_controller_orig): New variable.
4886         (grub_console_getkey): Rename to ...
4887         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4888         users.
4889         (grub_keyboard_controller_init): Static-ize.  Save original
4890         controller value so that it can be restored ...
4891         (grub_keyboard_controller_fini): ... here (new function).
4892         (grub_at_keyboard_term): New structure.
4893         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4894         functions.
4896         Migrate output terminals to new API:
4898         * term/i386/pc/vga.c (grub_vga_term): Change type to
4899         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4900         members.  Update all users.
4901         * term/gfxterm.c (grub_video_term): Change type to
4902         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4903         members.  Update all users.
4904         * include/grub/i386/pc/console.h (grub_console_checkkey)
4905         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4906         etc).
4908         Migrate `terminal' command and userland tools to new API:
4910         * commands/terminal.c (grub_cmd_terminal): Split into ...
4911         (grub_cmd_terminal_input): ... this, and ...
4912         (grub_cmd_terminal_output): ... this.
4913         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4914         `terminal_input' and `terminal_output'.
4915         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4916         `terminal_input' / `terminal_output' API.
4917         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4918         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4919         provided ${GRUB_TERMINAL}, convert it).
4921 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4923         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4924         for FreeBSD.
4925         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4927 2008-11-03  Bean  <bean123ch@gmail.com>
4929         * kern/elf.c (grub_elf32_load): Revert to previous code.
4930         (grub_elf64_load): Likewise.
4932         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4934 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4936         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4937         (TARGET_CPPFLAGS): Likewise.
4938         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4940 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4942         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4944 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4946         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4947         addition of objects until the code is not going to be able to fail.
4949 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4951         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4952         (add a missing NULL check, and correct them by moving the pointer
4953         operations after the actual check).
4955 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4957         * util/i386/pc/grub-install.in: Handle empty string as output from
4958         make_system_path_relative_to_its_root().
4960 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4962         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4963         circular metadata worst case scenario. If the metadata is circular
4964         then copy the wrap in place.
4965         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4966         project lib/format_text/layout.h
4967         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4969 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4971         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4973 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4975         * util/update-grub_lib.in: Mention filename in warning message.
4977 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4979         * NEWS: Update for rename of update-grub to grub-mkconfig.
4981 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4983         * util/update-grub_lib.in: Copy to ...
4984         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4985         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4986         * util/update-grub.in: Rename to ...
4987         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4988         option. Add `--output' option to allow users to specify the generated
4989         configuration file.  Default to stdout.
4990         (update_grub_dir): Rename to ...
4991         (grub_mkconfig_dir): ... this.
4992         (grub_cfg): Default to an empty string.
4993         * conf/common.rmk (update-grub): Rename to ...
4994         (grub-mkconfig): ... this.
4995         (update-grub_lib): Copy to ...
4996         (grub-mkconfig_lib): ... this.
4997         (update-grub_SCRIPTS): Copy to ...
4998         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4999         (update-grub_DATA): Rename to ...
5000         (grub-mkconfig_DATA): ... this.
5002 2008-09-28  Robert Millan  <rmh@aybabtu.com>
5004         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5005         to `modified'.  Add the real `created' field.
5006         (grub_iso9660_uuid): Use `modified' rather than `created' for
5007         constructing the UUID.
5009 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
5011         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5012         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5014 2008-09-28  Bean  <bean123ch@gmail.com>
5016         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5017         Thanks to Christian Franke for finding this bug.
5019 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5021         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5022         instances of grub_util_get_disk_name() (see previous commit).
5024 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5026         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5027         `util/i386/get_disk_name.c'.
5028         * conf/i386-efi.rmk: Likewise.
5029         * conf/x86_64-efi.rmk: Likewise.
5030         * conf/i386-coreboot.rmk: Likewise.
5031         * conf/i386-ieee1275.rmk: Likewise.
5032         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5033         `util/ieee1275/get_disk_name.c'.
5034         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5035         * util/ieee1275/get_disk_name.c: Remove file.
5036         * util/i386/get_disk_name.c: Remove file.
5037         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5038         "hd%d" for device.map entries, rather than using
5039         grub_util_get_disk_name().
5041 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5043         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5044         warning.
5045         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5047 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5049         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5050         Changed to 0x5100.
5051         (GRUB_TERM_PPAGE): Changed to 0x4900.
5053 2008-09-24  Robert Millan  <rmh@aybabtu.com>
5055         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5056         macros (they were i386-pc specific).
5057         * include/grub/sparc64/ieee1275/console.h: Likewise.
5058         * include/grub/efi/console.h: Likewise.
5060 2008-09-22  Bean  <bean123ch@gmail.com>
5062         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5063         resident and in attribute list.
5065         * include/grub/ntfs.h (BMP_LEN): Removed.
5067 2008-09-22  Bean  <bean123ch@gmail.com>
5069         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5070         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5072         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5073         error occurs, as grub_disk_open will call grub_disk_close, which will
5074         call p->close (scsi).
5076 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5078         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5079         (AC_PREREQ): Bumped to 2.59.
5080         (AC_TRY_COMPILE): Replace obsolete macro with ...
5081         (AC_COMPILE_IFELSE): ... this.
5082         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5083         (AC_LINK_IFELSE): ... this.
5085 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5087         * autogen.sh: Add a call to `gendistlist.sh'.
5089 2008-09-19  Christian Franke  <franke@computer.org>
5091         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5092         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5093         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5094         Export __enable_execute_stack() to modules.
5095         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5096         New function.
5098 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5100         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5101         Sort the list.
5103 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5105         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5106         #include <grub/util/hostdisk.h>.
5108 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5110         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5111         segments when their filesz is zero (grub_file_read() interprets
5112         zero-size as "read until EOF", which results in memory corruption).
5113         Use `lowest_segment' rather than 0 for calculating the current
5114         segment load address.
5116 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5118         * util/hostdisk.c (open_device): Replace a grub_util_info() call
5119         with grub_dprintf("hostdisk", ...), as it was so verbose that it
5120         clobbered useful information.
5122 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5124         * include/grub/util/biosdisk.h: Move to ...
5125         * include/grub/util/hostdisk.h: ... here.  Update all users.
5126         * util/biosdisk.c: Move to ...
5127         * util/hostdisk.c: ... here.  Update all users.
5129 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5131         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5132         variables.
5133         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5134         and length can be stored directly in the `mbi->mmap_addr' and
5135         `mbi->mmap_length' struct fields.
5137 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5139         * conf/i386.rmk: New file.  Provides declaration for building
5140         `cpuid.mod'.
5141         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5142         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5143         variables.
5144         Include `conf/i386.mk'.
5145         * conf/i386-efi.rmk: Likewise.
5146         * conf/x86_64-efi.rmk: Likewise.
5147         * conf/i386-coreboot.rmk: Likewise.
5148         * conf/i386-ieee1275.rmk: Likewise.
5150 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
5152         Based on patch created by Colin D Bennett <colin@gibibit.com>.
5153         Adds optimization support for BGR based modes.
5155         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5156         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5157         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5158         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5159         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5160         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5161         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5162         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5163         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5164         (grub_video_i386_vbeblit_index_index): Likewise.
5165         (grub_video_i386_vbeblit_replace_directN): Added.
5166         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5167         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5168         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5169         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5170         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5171         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5172         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5173         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5174         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5175         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5176         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5177         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5178         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5180         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5181         (grub_video_i386_vbefill_R8G8B8): Likewise.
5182         (grub_video_i386_vbefill_index): Likewise.
5183         (grub_video_i386_vbefill_direct32): Added.
5184         (grub_video_i386_vbefill_direct24): Likewise.
5185         (grub_video_i386_vbefill_direct16): Likewise.
5186         (grub_video_i386_vbefill_direct8): Likewise.
5188         * include/grub/video.h (grub_video_blit_format): Removed
5189         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5190         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5191         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5192         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5193         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5195         * video/video.c (grub_video_get_blit_format): Updated to use new
5196         blit formats.  Added handling for 16 bit color modes.
5198         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5199         fillers.
5200         (common_blitter): Updated to use new blitters.
5202         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5203         Removed.
5204         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5205         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5206         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5207         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5208         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5209         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5210         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5211         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5212         (grub_video_i386_vbeblit_index_index): Likewise.
5213         (grub_video_i386_vbeblit_replace_directN): Added.
5214         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5215         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5216         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5217         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5218         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5219         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5220         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5221         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5222         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5223         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5224         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5225         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5226         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5228         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5229         (grub_video_i386_vbefill_R8G8B8): Likewise.
5230         (grub_video_i386_vbefill_index): Likewise.
5231         (grub_video_i386_vbefill_direct32): Added.
5232         (grub_video_i386_vbefill_direct24): Likewise.
5233         (grub_video_i386_vbefill_direct16): Likewise.
5234         (grub_video_i386_vbefill_direct8): Likewise.
5236         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5237         types.
5239         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5240         types.
5242         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5243         blitter types.
5245         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5246         types.
5248 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5250         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5251         RAID level 1.
5253 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5255         * fs/iso9660.c (grub_iso9660_date): New structure.
5256         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5257         (grub_iso9660_uuid): New function.
5259 2008-09-05  Bean  <bean123ch@gmail.com>
5261         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5263         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5264         insensitive bit for names in Win32 and Win32 & DOS namespace.
5266         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5268         * include/grub/types.h (LONG_MAX): Likewise.
5270 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5272         * util/getroot.c: Include <config.h>.
5273         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5274         add support for /dev/md/N devices and handle LVM double dash escaping.
5276 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5278         * config.guess: Update to latest version from config git.
5279         * config.sub: Likewise.
5281 2008-09-03  Robert Millan  <rmh@aybabtu.com>
5283         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5284         `disk->total_sectors'.
5286 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5288         * include/grub/normal.h: Fixed incorrect comment for
5289         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5291 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5293         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5294         values with defines.
5296         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5297         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5298         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5299         (GRUB_VBE_MODEATTR_COLOR): Likewise.
5300         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5301         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5302         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5303         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5304         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5305         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5306         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5307         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5308         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5309         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5310         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5311         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5312         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5313         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5314         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5316 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5318         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5319         declaration.
5320         (grub_multiboot): Fix a few warnings.
5322 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5324         * loader/i386/pc/multiboot.c: Update comment not to say that
5325         boot_device support is unimplemented.
5327 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5329         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5330         or memory map support are unimplemented.
5332 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5334         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5336 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5338         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5339         total video memory in 'vbeinfo' output; show color format details for
5340         each video mode.
5342 2008-08-30  Pavel Roskin  <proski@gnu.org>
5344         * util/genmoddep.c: Remove for real this time.
5345         * DISTLIST: Remove util/genmoddep.c.
5347 2008-08-30  Robert Millan  <rmh@aybabtu.com>
5349         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5350         as required by Multiboot spec (it was already 4-byte aligned, but
5351         only by chance).
5353 2008-08-29  Pavel Roskin  <proski@gnu.org>
5355         * kern/powerpc/ieee1275/crt0.S: Rename to ...
5356         * kern/powerpc/ieee1275/startup.S: ... this.
5357         * conf/powerpc-ieee1275.rmk: Adjust for the above.
5358         * DISTLIST: Likewise.
5360         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5361         grub/cpu/kernel.h.  Add start label for consistency with other
5362         platforms.  Add grub_prefix immediately after start.  Add jump
5363         to the code after grub_prefix.
5364         * include/grub/powerpc/kernel.h: Provide valid values for
5365         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5367 2008-08-29  Bean  <bean123ch@gmail.com>
5369         * configure.ac: Change host_os to cygwin for mingw.
5370         (asprintf): New check for function.
5372         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5373         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5375         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5376         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5377         sync, sleep and grub_util_get_disk_size for mingw.
5379         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5380         to get size in mingw.
5381         (open_device): Use flag O_BINARY if it's defined.
5382         (find_root_device): Add dummy code for mingw.
5384         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5385         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5386         (get_scsi_disk_name): Return 0 for mingw.
5388         * util/hostfs.c: #include <grub/util/misc.h>.
5389         (grub_hostfs_open): Use "rb" flag to open file, use
5390         grub_util_get_disk_size to get disk size for mingw.
5392         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5393         (asprintf): New function if HAVE_ASPRINTF is not set.
5394         (sync): New function for mingw.
5395         (sleep): Likewise.
5396         (grub_util_get_disk_size): Likewise.
5398 2008-08-28  Pavel Roskin  <proski@gnu.org>
5400         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5401         kern/time.c.
5403 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5405         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5407 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5409         Change find_grub_drive() syntax so it doesn't prevent it from
5410         detecting NULL names as errors.
5412         * util/biosdisk.c (find_grub_drive): Move free slot search code
5413         from here ...
5414         (find_free_slot): ... to here.
5415         (read_device_map): Use find_free_slot() to search for free slots.
5417 2008-08-27  Marco Gerards  <marco@gnu.org>
5419         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5420         (scsi_mod_SOURCES): New variable.
5421         (scsi_mod_CFLAGS): Likewise
5422         (scsi_mod_LDFLAGS): Likewise.
5424         * disk/scsi.c: New file.
5426         * include/grub/scsi.h: Likewise.
5428         * include/grub/scsicmd.h: Likewise.
5430         * disk/ata.c: Include <grub/scsi.h>.
5431         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5432         instead.
5433         (grub_ata_iterate): Skip ATAPI devices.
5434         (grub_ata_open): Only handle ATAPI devices.
5435         (struct grub_atapi_read): Removed.
5436         (grub_atapi_readsector): Likewise.
5437         (grub_ata_read): No longer handle ATAPI devices.
5438         (grub_ata_write): Likewise.
5439         (grub_atapi_iterate): New function.
5440         (grub_atapi_read): Likewise.
5441         (grub_atapi_write): Likewise.
5442         (grub_atapi_open): Likewise.
5443         (grub_atapi_close): Likewise.
5444         (grub_atapi_dev): New variable.
5445         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5446         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5448         * include/grub/disk.h (enum grub_disk_dev_id): Add
5449         `GRUB_DISK_DEVICE_SCSI_ID'.
5451 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5453         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5454         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5455         descriptive.
5457 2008-08-23  Bean  <bean123ch@gmail.com>
5459         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5460         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5461         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5462         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5463         dm_nv.mod.
5464         (raid5rec_mod_SOURCES): New macro.
5465         (raid5rec_mod_CFLAGS): Likewise.
5466         (raid5rec_mod_LDFLAGS): Likewise.
5467         (raid6rec_mod_SOURCES): Likewise.
5468         (raid6rec_mod_CFLAGS): Likewise.
5469         (raid6rec_mod_LDFLAGS): Likewise.
5470         (mdraid_mod_SOURCES): Likewise.
5471         (mdraid_mod_CFLAGS): Likewise.
5472         (mdraid_mod_LDFLAGS): Likewise.
5473         (dm_nv_mod_SOURCES): Likewise.
5474         (dm_nv_mod_CFLAGS): Likewise.
5475         (dm_nv_mod_LDFLAGS): Likewise.
5477         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5478         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5479         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5481         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5482         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5484         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5486         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5488         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5490         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5492         * disk/raid5_recover.c: New file.
5494         * disk/raid6_recover.c: Likewise.
5496         * disk/mdraid_linux.c: Likewise.
5498         * disk/dmraid_nvidia.c: Likewise.
5500         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5501         ULONG_MAX.
5503         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5504         calculate the size of raid device.
5505         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5506         different layout of raid5.
5507         (grub_raid_scan_device): Remove code specific to mdraid.
5508         (grub_raid_list): New variable.
5509         (free_array): New function.
5510         (grub_raid_register): Likewise.
5511         (grub_raid_unregister): Likewise.
5512         (grub_raid_rescan): Likewise.
5513         (GRUB_MOD_INIT): Don't iterate device here.
5514         (GRUB_MOD_FINI): Use free_array to release resource.
5516         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5517         (grub_raid5_recover_func_t): New function variable type.
5518         (grub_raid6_recover_func_t): Likewise.
5519         (grub_raid5_recover_func): New variable.
5520         (grub_raid6_recover_func): Likewise.
5521         (grub_raid_register): New function.
5522         (grub_raid_unregister): Likewise.
5523         (grub_raid_rescan): Likewise.
5524         (grub_raid_block_xor): Likewise.
5526         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5527         (CMD_CRC): New macro.
5528         (part): Removed.
5529         (read_file): Handle device as well as file.
5530         (cmd_crc): New function.
5531         (fstest): Handle multiple disks.
5532         (options): Remove part, raw and long, add root and diskcount.
5533         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5534         (main): Find the first non option entry and ignore subsequent options,
5535         add handling for the new options, support multiple disks.
5537         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5539 2008-08-23  Bean  <bean123ch@gmail.com>
5541         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5543         * genfslist.sh: Ignore kernel.mod.
5545         * genpartmaplist.sh: Likewise.
5547 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5549         * util/getroot.c (find_root_device): Skip anything that starts with
5550         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5552 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5554         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5555         * util/grub.d/00_header.in: Allow the administrator to change default
5556         gfxmode via ${GRUB_GFXMODE}.
5558 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5560         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5562 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5564         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5565         loader.
5566         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5567         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5569 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5571         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5572         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5574 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5576         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5577         (struct grub_virtual_screen): Remove `cursor_color'.
5578         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5579         initialization.
5580         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5582 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5584         Unify (identical) linux_normal.c files.
5585         * loader/i386/efi/linux_normal.c: Move from here ...
5586         * loader/linux_normal.c: ... to here.  Update all users.
5587         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5588         * loader/i386/ieee1275/linux_normal.c: Likewise.
5590 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5592         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5593         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5594         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5595         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5596         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5597         New macros.
5598         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5599         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5600         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5601         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5602         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5603         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5604         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5605         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5606         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5607         portably using grub_getxy().
5608         Replace `-EFI' with `-bzImage' in boot message.
5610 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5612         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5614 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5616         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5618         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5619         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5620         (grub_machine_mmap_iterate): New function declaration.
5621         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5622         structure.
5623         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5624         macros.
5626         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5627         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5628         Move e820 parsing from here ...
5629         * kern/i386/pc/mmap.c: New file.
5630         (grub_machine_mmap_iterate): ... to here.
5632         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5633         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5634         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5635         (grub_available_iterate): Redeclare to return `void', and redeclare
5636         its hook to use grub_uint64_t as addr and size parameters, and rename
5637         to ...
5638         (grub_machine_mmap_iterate): ... this.  Update all users.
5640         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5641         to make it more readable.  Rename to ...
5642         (grub_machine_mmap_iterate): ... this.
5644         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5645         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5646         (grub_multiboot): Allocate an extra region after the payload, and fill
5647         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5648         with the extra space.
5649         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5650         with the extra space.
5652 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5654         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5656 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5658         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5659         mdate-sh to the list `find' searches for.
5660         * DISTLIST: Regenerated.
5662 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5664         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5665         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5666         genmoddep.awk, gensymlist.sh.in.
5667         (DISTDIRS): Add bus, docs, hook, lib.
5668         * DISTLIST: Regenerated.
5669         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5671 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5673         * disk/raid.c (grub_raid_init): Handle/report errors set by
5674         grub_device_iterate().
5675         * disk/lvm.c (grub_lvm_init): Likewise.
5677 2008-08-15  Bean  <bean123ch@gmail.com>
5679         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5680         and datehook.mod.
5681         (datetime_mod_SOURCES): New macro.
5682         (datetime_mod_CFLAGS): Likewise.
5683         (datetime_mod_LDFLAGS): Likewise.
5684         (date_mod_SOURCES): Likewise.
5685         (date_mod_CFLAGS): Likewise.
5686         (date_mod_LDFLAGS): Likewise.
5687         (datehook_mod_SOURCES): Likewise.
5688         (datehook_mod_CFLAGS): Likewise.
5689         (datehook_mod_LDFLAGS): Likewise.
5691         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5692         and datehook.mod.
5693         (datetime_mod_SOURCES): New macro.
5694         (datetime_mod_CFLAGS): Likewise.
5695         (datetime_mod_LDFLAGS): Likewise.
5696         (date_mod_SOURCES): Likewise.
5697         (date_mod_CFLAGS): Likewise.
5698         (date_mod_LDFLAGS): Likewise.
5699         (datehook_mod_SOURCES): Likewise.
5700         (datehook_mod_CFLAGS): Likewise.
5701         (datehook_mod_LDFLAGS): Likewise.
5703         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5704         and datehook.mod.
5705         (datetime_mod_SOURCES): New macro.
5706         (datetime_mod_CFLAGS): Likewise.
5707         (datetime_mod_LDFLAGS): Likewise.
5708         (date_mod_SOURCES): Likewise.
5709         (date_mod_CFLAGS): Likewise.
5710         (date_mod_LDFLAGS): Likewise.
5711         (datehook_mod_SOURCES): Likewise.
5712         (datehook_mod_CFLAGS): Likewise.
5713         (datehook_mod_LDFLAGS): Likewise.
5715         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5716         and datehook.mod.
5717         (datetime_mod_SOURCES): New macro.
5718         (datetime_mod_CFLAGS): Likewise.
5719         (datetime_mod_LDFLAGS): Likewise.
5720         (date_mod_SOURCES): Likewise.
5721         (date_mod_CFLAGS): Likewise.
5722         (date_mod_LDFLAGS): Likewise.
5723         (datehook_mod_SOURCES): Likewise.
5724         (datehook_mod_CFLAGS): Likewise.
5725         (datehook_mod_LDFLAGS): Likewise.
5727         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5728         and datehook.mod.
5729         (datetime_mod_SOURCES): New macro.
5730         (datetime_mod_CFLAGS): Likewise.
5731         (datetime_mod_LDFLAGS): Likewise.
5732         (date_mod_SOURCES): Likewise.
5733         (date_mod_CFLAGS): Likewise.
5734         (date_mod_LDFLAGS): Likewise.
5735         (datehook_mod_SOURCES): Likewise.
5736         (datehook_mod_CFLAGS): Likewise.
5737         (datehook_mod_LDFLAGS): Likewise.
5739         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5741         * commands/date.c: New file.
5743         * hook/datehook.c: Likewise.
5745         * include/grub/lib/datetime.h: Likewise.
5747         * include/grub/i386/cmos.h: Likewise.
5749         * lib/datetime.c: Likewise.
5751         * lib/i386/datetime.c: Likewise.
5753         * lib/efi/datetime.c: Likewise.
5755 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5757         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5758         (grub_mkelfimage_SOURCES): New variable.
5759         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5761         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5762         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5763         * conf/powerpc-ieee1275.rmk: Likewise.
5764         * conf/i386-ieee1275.rmk: Likewise.
5766         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5767         * kern/i386/coreboot/init.c: Likewise.
5769         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5770         with `<grub/cpu/kernel.h>'.
5771         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5772         to ...
5773         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5774         * kern/i386/coreboot/startup.S: Likewise.
5776         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5777         (GRUB_MOD_GAP): Remove.
5778         * include/grub/powerpc/kernel.h: New file.
5779         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5780         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5781         * include/grub/i386/kernel.h: New file.
5782         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5783         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5784         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5786         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5787         `grub-mkelfimage'.
5788         Use --directory when invoking grub_mkimage.
5790         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5791         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5792         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5793         and GRUB_KERNEL_CPU_PREFIX.
5795 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5797         * include/grub/err.h (grub_err_printf): New function prototype.
5798         * util/misc.c (grub_err_printf): New function.
5799         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5800         grub_printf.
5801         * kern/err.c (grub_print_error): Use grub_err_printf.
5803 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5805         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5807 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5809         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5810         boot entry.
5812 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5814         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5815         of the relocation code from here ...
5816         (grub_multiboot): ... to here.
5817         (forward_relocator, backward_relocator): Move from here ...
5818         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5819         (grub_multiboot_backward_relocator): ... to here.
5820         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5821         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5822         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5823         (grub_multiboot_forward_relocator_end)
5824         (grub_multiboot_backward_relocator)
5825         (grub_multiboot_backward_relocator_end): New variables.
5827 2008-08-12  Bean  <bean123ch@gmail.com>
5829         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5831 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5833         * kern/i386/linuxbios/startup.S: Move from here ...
5834         * kern/i386/coreboot/startup.S: ... to here.
5836         * kern/i386/linuxbios/init.c: Move from here ...
5837         * kern/i386/coreboot/init.c: ... to here.
5839         * kern/i386/linuxbios/table.c: Move from here ...
5840         * kern/i386/coreboot/mmap.c: ... to here.
5842         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5844 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5846         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5847         errors.  Leave it to the upper layer to handle them.
5849 2008-08-09  Christian Franke  <franke@computer.org>
5851         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5852         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5853         Install `grub.d/10_windows' only on Cygwin.
5854         * configure.ac: Add subst of `target_os'.
5855         Check `target_os' also before setting TARGET_OBJ2ELF.
5856         Add `--enable-grub-pe2elf'.
5858 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5860         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5861         (grub_last_time): Change type to grub_uint64_t.
5862         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5863         (grub_disk_close): Likewise.
5865         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5866         (run_menu): Migrate code from to using grub_get_time_ms().
5868         * util/misc.c (grub_get_time_ms): New function.
5870 2008-08-08  Marco Gerards  <marco@gnu.org>
5872         * disk/ata.c (grub_ata_regget): Change return type to
5873         `grub_uint8_t'.
5874         (grub_ata_regget2): Likewise.
5875         (grub_ata_wait_status): New function.
5876         (grub_ata_wait_busy): Removed function, updated all users to use
5877         `grub_ata_wait_status'.
5878         (grub_ata_wait_drq): Likewise.
5879         (grub_ata_cmd): New function.
5880         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5881         error handling.
5882         (grub_ata_pio_write): Add error handling.
5883         (grub_atapi_identify): Likewise.
5884         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5885         handling.
5886         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5887         handling.  Actually use the detected registers.  Reorder the
5888         detection logic such that it is easier to read.
5889         (grub_ata_pciinit): Do not assign the same ID to each controller.
5890         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5891         handling.
5892         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5894         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5896 2008-08-08  Marco Gerards  <marco@gnu.org>
5898         * NEWS: Update.
5900 2008-08-07  Bean  <bean123ch@gmail.com>
5902         * include/grub/x86_64/pci.h: New file.
5904 2008-08-07  Christian Franke  <franke@computer.org>
5906         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5907         (TIMER2_GATE): Likewise.
5908         (grub_pit_wait): Add enable/disable of the timer2 gate
5909         bit of port 0x61.  This fixes a possible infinite loop.
5911 2008-08-07  Bean  <bean123ch@gmail.com>
5913         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5914         kern/i386/tsc.c and kern/i386/pit.c.
5916         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5917         x86_64 platform.
5919         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5920         <grub/i386/tsc.h>.
5922         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5924 2008-08-07  Bean  <bean123ch@gmail.com>
5926         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5928         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5930         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5931         multiple inclusion. Add #include <grub/types.h>.
5933 2008-08-06  Christian Franke  <franke@computer.org>
5935         * conf/common.rmk: Build and install `10_windows'.
5936         * util/grub.d/10_windows.in: New script.
5938 2008-08-06  Pavel Roskin  <proski@gnu.org>
5940         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5942 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5944         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5945         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5947 2008-08-06  Bean  <bean123ch@gmail.com>
5949         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5950         (grub_pxefs_fs_int): Remove dummy definition.
5951         (grub_pxefs_open): Use data->block_size to store the current block
5952         size setting.
5953         (grub_pxefs_read): Use block size stored in data->block_size. As the
5954         value of grub_pxe_blksize can be changed after the file is opened.
5956 2008-08-06  Bean  <bean123ch@gmail.com>
5958         * fs/i386/pc/pxe.c (curr_file): new variable.
5959         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5960         require the dummy internal file system anymore.
5961         (grub_pxefs_read): Removed.
5962         (grub_pxefs_close): Likewise.
5963         (grub_pxefs_fs_int): Likewise.
5964         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5965         connection when we switch file.
5966         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5968 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5970         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5971         `halt.mod'.
5972         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5973         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5975         * kern/i386/halt.c: New file.
5976         * kern/i386/reboot.c: Likewise.
5977         * include/grub/i386/reboot.h: Likewise.
5978         * include/grub/i386/halt.h: Likewise.
5980         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5981         Include `<grub/cpu/halt.h>'.
5982         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5983         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5985         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5986         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5987         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5988         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5989         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5990         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5991         from here ...
5992         * include/grub/i386/at_keyboard.h: ... to here.
5994 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5996         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5997         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5998         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5999         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6000         `kern/generic/millisleep.c'.
6002         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6003         instead of grub_get_rtc().
6004         (grub_tsc_init): Initialize `tsc_boot_time'.
6006         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6007         (grub_machine_init): Use grub_tsc_init() rather than
6008         installing an RTC-based handler via grub_install_get_time_ms().
6010         * kern/i386/pit.c: New file.
6011         * include/grub/i386/pit.h: Likewise.
6013 2008-08-05  Bean  <bean123ch@gmail.com>
6015         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6017         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6018         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6019         (pxe_mod_SOURCES): New macro.
6020         (pxe_mod_CFLAGS): Likewise.
6021         (pxe_mod_LDFLAGS): Likewise.
6022         (pxecmd_mod_SOURCES): Likewise.
6023         (pxecmd_mod_CFLAGS): Likewise.
6024         (pxecmd_mod_LDFLAGS): Likewise.
6026         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6027         (grub_pxe_call): Likewise.
6029         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6031         * commands/i386/pc/pxecmd.c: New file.
6033         * fs/i386/pc/pxe.c: Likewise.
6035         * include/grub/i386/pc/pxe.h: Likewise.
6037 2008-08-05  Bean  <bean123ch@gmail.com>
6039         * util/console.c (grub_console_cur_color): New variable.
6040         (grub_console_standard_color): Likewise.
6041         (grub_console_normal_color): Likewise.
6042         (grub_console_highlight_color): Likewise.
6043         (color_map): Likewise.
6044         (use_color): Likewise.
6045         (NUM_COLORS): New macro.
6046         (grub_ncurses_setcolorstate): Handle color properly.
6047         (grub_ncurses_setcolor): Don't change color here, just remember the
6048         settings, color will be set in grub_ncurses_setcolorstate.
6049         (grub_ncurses_getcolor): New function.
6050         (grub_ncurses_init): Initialize color pairs.
6051         (grub_ncurses_term): New member grub_ncurses_getcolor.
6053 2008-08-05  Colin D Bennett  <colin@gibibit.com>
6055         High resolution timer support.  Implemented for x86 CPUs using TSC.
6056         Extracted generic grub_millisleep() so it's linked in only as needed.
6057         This requires a Pentium compatible CPU; if the RDTSC instruction is
6058         not supported, then it falls back on the generic grub_get_time_ms()
6059         implementation that uses the machine's RTC.
6061         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6062         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6063         `kern/generic/millisleep.c'.
6065         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6066         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6068         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6069         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6071         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6073         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6074         `kern/generic/millisleep.c'.
6076         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6078         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6080         * kern/generic/rtc_get_time_ms.c: New file.
6082         * kern/generic/millisleep.c: New file.
6084         * kern/misc.c: Don't include
6085         <kern/time.h> anymore.
6086         (grub_millisleep_generic): Removed.
6088         * commands/sleep.c (grub_interruptible_millisleep): Uses
6089         grub_get_time_ms() instead of grub_get_rtc().
6091         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
6092         function.
6093         (grub_cpu_is_cpuid_supported): New inline function.
6094         (grub_cpu_is_tsc_supported): New inline function.
6095         (grub_tsc_init): New function prototype.
6096         (grub_tsc_get_time_ms): New function prototype.
6098         * kern/i386/tsc.c (grub_get_time_ms): New file.
6100         * include/grub/time.h: Include <grub/types.h.
6101         (grub_millisleep_generic): Removed.
6102         (grub_get_time_ms): New prototype.
6103         (grub_install_get_time_ms): New prototype.
6104         (grub_rtc_get_time_ms): New prototype.
6106         * kern/time.c (grub_get_time_ms): New function.
6107         (grub_install_get_time_ms): New function.
6109         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
6110         <grub/time.h> anymore.
6111         (grub_millisleep): Removed.
6112         (grub_machine_init): Call grub_tsc_init.
6114         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6115         get_time_ms() implementation.
6117         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6118         (ieee1275_get_time_ms): New function.
6119         (grub_machine_init): Install get_time_ms() implementation.
6121         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6122         (grub_machine_init): Call grub_tsc_init().
6123         (grub_millisleep): Removed.
6125         * kern/ieee1275/init.c (grub_millisleep): Removed.
6126         (grub_machine_init): Install ieee1275_get_time_ms()
6127         implementation.
6128         (ieee1275_get_time_ms): New function.
6129         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6130         real work.
6132 2008-08-05  Marco Gerards  <marco@gnu.org>
6134         * disk/ata.c: Include <grub/pci.h>.
6135         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6136         (grub_ata_initialize): Rewritten.
6137         (grub_ata_device_initialize): New function.
6139 2008-08-04  Pavel Roskin  <proski@gnu.org>
6141         * kern/main.c: Include grub/mm.h.
6143 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6145         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6146         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6147         corruption problem).
6149 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6151         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6152         warnings introduced in my last commit.
6154 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6156         Make PCI available on all i386 architectures.
6158         * include/grub/i386/pc/pci.h: Move from here ...
6159         * include/grub/i386/pci.h: ... to here.
6161         * include/grub/i386/pc/pci.h: Remove.
6162         * include/grub/i386/efi/pci.h: Remove.
6163         * include/grub/x86_64/efi/pci.h: Remove.
6165         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6166         `<grub/cpu/pci.h>'.
6168         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6169         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6170         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6172         * conf/i386-ieee1275.rmk: Likewise.
6174 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6176         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6177         (grub_console_setcursor): Make it possible to set cursor off.
6179 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6181         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
6182         of modules instead of assuming which platform provides what.
6183         * util/update-grub.in: Likewise.
6185 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6187         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6188         instead of `grub_install_dos_part' to determine whether a drive needs
6189         to be prepended to prefix (`grub_install_dos_part' is not reliable,
6190         because it can be overridden when loading GRUB via Multiboot).
6192 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6194         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6196 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6198         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6199         of informational grub_dprintf() calls.
6201 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6203         * disk/memdisk.c (memdisk_size): Don't initialize.
6204         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6206         * include/grub/i386/pc/kernel.h
6207         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6208         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6209         (grub_memdisk_image_size, grub_arch_memdisk_addr)
6210         (grub_arch_memdisk_size): Remove.
6212         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6213         field (was only used to transfer a constant).  Add `type' field to
6214         support multiple module types.
6215         (grub_module_iterate): New function.
6217         * kern/device.c (grub_device_open): Do not hide error messages
6218         when grub_disk_open() fails.  Use grub_print_error() instead.
6220         * kern/i386/pc/init.c (grub_arch_modules_addr)
6221         (grub_arch_memdisk_size): Remove functions.
6222         (grub_arch_modules_addr): Return the module address in high memory
6223         (now that it isn't copied anymore).
6225         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6226         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6227         decompression routine (grub_total_module_size already includes that
6228         now).  Don't copy modules back to low memory.
6230         * kern/main.c: Include `<grub/mm.h>'.
6231         (grub_load_modules): Split out (and use) ...
6232         (grub_module_iterate): ... this function, which iterates through
6233         module objects and runs a hook.
6234         Comment out grub_mm_init_region() call, as it would cause non-ELF
6235         modules to be overwritten.
6237         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6238         the memdisk image in its own region, make it part of the module list.
6239         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6240         (main): Parse --memdisk|-m option, and pass user-provided path as
6241         parameter to generate_image().
6242         (add_segments): Pass `memdisk_path' down to load_modules().
6243         (load_modules): Embed memdisk image in module section when requested.
6244         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6245         `header.type' instead of `header.offset'.
6247         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6248         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6249         (memdisk_mod_LDFLAGS): New variables.
6250         * conf/i386-coreboot.rmk: Likewise.
6251         * conf/i386-ieee1275.rmk: Likewise.
6253 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6255         * loader/i386/pc/multiboot.c (playground, forward_relocator)
6256         (backward_relocator): New variables.  Used to allocate and relocate
6257         the payload, respectively.
6258         (grub_multiboot_load_elf32): Load into heap instead of requested
6259         address, install the appropriate relocator code in each bound of
6260         the payload, and set the entry point such that
6261         grub_multiboot_real_boot() will jump to one of them.
6263         * kern/i386/loader.S (grub_multiboot_payload_size)
6264         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6265         (grub_multiboot_payload_entry_offset): New variables.
6266         (grub_multiboot_real_boot): Set cpu context to what the relocator
6267         expects, and jump to the relocator instead of the payload.
6269         * include/grub/i386/loader.h (grub_multiboot_payload_size)
6270         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6271         (grub_multiboot_payload_entry_offset): Export.
6273 2008-08-01  Bean  <bean123ch@gmail.com>
6275         * normal/menu_entry.c (editor_getline): Don't return the original
6276         string as result, as it will be released by lexer once it has done
6277         using it.
6279 2008-08-01  Robert Millan  <rmh@aybabtu.com>
6281         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6282         within menuentries, not before them.
6283         util/grub.d/10_hurd.in: Likewise.
6285 2008-08-01  Bean  <bean123ch@gmail.com>
6287         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6288         (bufio_mod_SOURCES): New macro.
6289         (bufio_mod_CFLAGS): Likewise.
6290         (bufio_mod_LDFLAGS): Likewise.
6292         * include/grub/bufio.h: New file.
6294         * io/bufio.c: Likewise.
6296         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6297         (grub_video_reader_png): Use grub_buffile_open to open file.
6299         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6300         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6302         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6303         (grub_video_reader_tga): Use grub_buffile_open to open file.
6305         * font/manager.c: Include <grub/bufio.h>.
6306         (add_font): Use grub_buffile_open to open file.
6308 2008-07-31  Robert Millan  <rmh@aybabtu.com>
6310         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6311         ELF segments, use a macro for arbitrarily accessing any of them instead
6312         of preparing a pointer that allows access to one at a time.
6313         (grub_multiboot_load_elf64): Likewise.
6315 2008-07-31  Bean  <bean123ch@gmail.com>
6317         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6318         GRUB_KERNEL_MACHINE_DATA_END.
6320 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6322         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6323         Increase from 0x50 to 0x60.
6324         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6325         use UUIDs to identify the root drive for them.  If that's not
6326         possible, abort.
6327         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6328         check, for cross-disk installs.
6330 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6332         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6333         is non-empty, use it to set the `prefix' environment variable instead
6334         of the usual approach.
6335         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6336         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6337         environment variable instead of dummy make_install_device().
6339         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6340         (start): Insert a data section, with `grub_prefix' variable.
6341         * kern/i386/linuxbios/startup.S: Likewise.
6343         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6344         New variable reference.
6345         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6346         New macro.  Defines offset of `grub_prefix' within startup.S (relative
6347         to `start').
6348         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
6349         section within startup.S (relative to `start').
6350         * include/grub/i386/coreboot/kernel.h: Likewise.
6352         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6353         Overwrite grub_prefix with its contents, at the beginning of the
6354         first segment.
6355         (main): Understand -p|--prefix.
6357 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6359         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6361 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6363         * term/i386/pc/vga_text.c (grub_console_cls): Use
6364         grub_console_gotoxy() to go back to beginning of the screen.
6365         Found by Patrick Georgi <patrick.georgi@coresystems.de>
6367 2008-07-29  Christian Franke  <franke@computer.org>
6369         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6370         Add conversion of emulated mount points on Cygwin.
6372 2008-07-29  Christian Franke  <franke@computer.org>
6374         * util/update-grub.in: Add a check for admin
6375         group on Cygwin.
6376         Remove old `grub.cfg.new' before creation.
6377         Add `-f' to `mv' to handle the different filesystem
6378         semantics of Windows.
6380 2008-07-29  Bean  <bean123ch@gmail.com>
6382         * normal/main.c (get_line): Fix buffer overflow bug.
6384 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6386         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6387         (struct grub_apple_header): New struct.  Describes the layout of
6388         the partmap header.
6389         (apple_partition_map_iterate): Check the header magic as well as the
6390         partition magic (which was already being checked).
6392 2008-07-28  Pavel Roskin  <proski@gnu.org>
6394         * genmk.rb: Add a warning to the beginning of the output that
6395         it's a generated file and should not be edited.
6397 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6399         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6400         with the same number are found, just use issue a warning with
6401         grub_dprintf(), as this error has been reported to be non-fatal.
6403 2008-07-27  Robert Millan  <rmh@aybabtu.com>
6405         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6406         information.
6408 2008-07-27  Bean  <bean123ch@gmail.com>
6410         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6411         (grub_fat_find_dir): Ignore case when comparing filename.
6413 2008-07-27  Bean  <bean123ch@gmail.com>
6415         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6416         smallino, as it's more descriptive, and i8count can be confused with
6417         the other field count.
6418         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6419         inode type.
6421 2008-07-27  Bean  <bean123ch@gmail.com>
6423         * commands/crc.c: New file.
6425         * lib/crc.c: Likewise.
6427         * include/grub/lib/crc.h: Likewise.
6429         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6431         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6432         (hexdump): Move this function to ...
6434         * lib/hexdump.c: ... here.
6436         * include/grub/hexdump.h: Renamed to ...
6438         * include/grub/lib/hexdump.h: ... this.
6440         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6442         * util/grub-editenv.c: Likewise.
6444         * include/envblk.h: Renamed to ...
6446         * include/lib/envblk.h: ... this.
6448         * util/envblk.c: Renamed to ...
6450         * lib/envblk.c: ... this.
6452         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6453         lib/hexdump.c.
6454         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6455         (pkglib_MODULES): Add crc.mod.
6456         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6457         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6458         (crc_mod_SOURCES): New macro.
6459         (crc_mod_CFLAGS): Likewise.
6460         (crc_mod_LDFLAGS): Likewise.
6462         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6464         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6466         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6468         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6470         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6472 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6474         * commands/help.c: Include <grub/term.h>.
6475         (TERM_WIDTH): Removed.  Updated all users.
6477 2008-07-27  Pavel Roskin  <proski@gnu.org>
6479         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6480         spurious warnings about a comment within a comment.
6482 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6484         * util/getroot.c (find_root_device): Skip devices that match
6485         /dev/dm-[0-9].  This lets the real device be found for any type of
6486         abstraction (LVM, EVMS, RAID..).
6487         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6488         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6489         device is found first, find_root_device() will now skip it.
6491 2008-07-24  Pavel Roskin  <proski@gnu.org>
6493         * include/grub/types.h: Use __builtin_bswap32() and
6494         __builtin_bswap64() with gcc 4.3 and newer.
6496 2008-07-24  Christian Franke  <franke@computer.org>
6498         * util/i386/pc/grub-install.in: If `--debug' is specified,
6499         pass `--verbose' to grub-setup.
6500         Abort script if make_system_path_relative_to_its_root() fails.
6502 2008-07-24  Bean  <bean123ch@gmail.com>
6504         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6505         variable `target_platform' should be `platform'.
6507 2008-07-24  Bean  <bean123ch@gmail.com>
6509         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6510         (grub_png_init_fixed_block): New function.
6511         (grub_png_decode_image_data): Handle fixed huffman code compression.
6513 2008-07-24  Bean  <bean123ch@gmail.com>
6515         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6516         (grub_pe2elf_SOURCES): New macro.
6517         (CLEANFILES): Add grub-pe2elf.
6519         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6520         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6521         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6522         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6523         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6524         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6525         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6526         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6527         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6528         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6529         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6530         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6531         (GRUB_PE32_DT_FUNCTION): Likewise.
6532         (GRUB_PE32_REL_I386_DIR32): Likewise.
6533         (GRUB_PE32_REL_I386_REL32): Likewise.
6534         (grub_pe32_symbol): New structure.
6535         (grub_pe32_reloc): Likewise.
6537         * util/grub-pe2elf.c: New file.
6539         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6540         start symbol in non pc platform.
6542         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6544         The following patches are from Christian Franke.
6546         * include/grub/dl.h: Remove .previous, gas supports this only
6547         for ELF format.
6549         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6550         Remove .type, gas supports this only for ELF format.
6552         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6553         nullbytes in symbol table. This fixes an infinite loop if table is
6554         zero filled.
6556         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6557         TARGET_IMG_LDFLAGS and EXEEXT.
6559         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6560         TARGET_IMG_LDFLAGS_AC.
6561         (grub_CHECK_STACK_ARG_PROBE): New function.
6563         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6565         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6567         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6568         to set TARGET_IMG_LD* accordingly.
6569         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6570         Add call to grub_CHECK_STACK_ARG_PROBE.
6571         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6573         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6575         * genmk.rb: Add EXEEXT to CLEANFILES.
6577 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6579         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6580         define the codes for arrows and lines used for the menu).
6581         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6582         as well.
6584         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6585         fonts, because the latter are too slow.
6587 2008-07-21  Bean  <bean123ch@gmail.com>
6589         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6590         a20. Run keyboard test last, as it will cause macbook to halt.
6592 2008-07-18  Pavel Roskin  <proski@gnu.org>
6594         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6595         load foreign architecture modules correctly anyway.  Keep
6596         support for loading host architecture modules, whether we
6597         compile them or not.
6599 2008-07-17  Pavel Roskin  <proski@gnu.org>
6601         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6602         change target_cpu.  The compiler default can mismatch target_cpu
6603         in any case.
6605         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6606         * kern/efi/efi.c: Likewise.
6608         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6609         target compiler is functional.
6610         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6611         are set up.
6613         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6614         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6615         adjustments from the rest, only do them if target is not
6616         explicitly given.  Merge other adjustments with the final sanity
6617         check.  Remove an extraneous check for supported CPU.  Be
6618         specific which CPU and which platform is not supported.
6620         * configure.ac: Default to pc platform for x86_64.
6622 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6624         Partial LinuxBIOS -> Coreboot rename.
6626         * conf/i386-linuxbios.rmk: Renamed to ...
6627         * conf/i386-coreboot.rmk: ... this.
6628         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6629         * configure.ac: Accept "coreboot" as input platform (but maintain
6630         compatibility with "linuxbios").
6631         * include/grub/i386/linuxbios: Renamed to ...
6632         * include/grub/i386/coreboot: ... this.
6634 2008-07-17  Bean  <bean123ch@gmail.com>
6636         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6637         (appleldr_mod_SOURCE): New variable.
6638         (appleldr_mod_CFLAGS): Likewise.
6639         (appleldr_mod_LDFLAGS): Likewise.
6640         (pci_mod_SOURCES): Likewise.
6641         (pci_mod_CFLAGS): Likewise.
6642         (pci_mod_LDFLAGS): Likewise.
6643         (lspci_mod_SOURCES): Likewise.
6644         (lspci_mod_CFLAGS): Likewise.
6645         (lspci_mod_LDFLAGS): Likewise.
6647         * conf/x86_64-efi.rmk: New file.
6649         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6650         macro.
6651         (grub_efidisk_write): Likewise.
6653         * include/efi/api.h (efi_call_0): New macro.
6654         (efi_call_1): Likewise.
6655         (efi_call_2): Likewise.
6656         (efi_call_3): Likewise.
6657         (efi_call_4): Likewise.
6658         (efi_call_5): Likewise.
6659         (efi_call_6): Likewise.
6661         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6662         grub_rescue_cmd_chainloader.
6664         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6665         (grub_pe32_optional_header): Change some fields based on i386 or
6666         x86_64 platform.
6667         (GRUB_PE32_PE32_MAGIC): Likewise.
6669         * include/grub/efi/uga_draw.h: New file.
6671         * include/grub/elf.h (STN_ABS): New constant.
6672         (R_X86_64_NONE): Relocation constant for x86_64.
6673         (R_X86_64_64): Likewise.
6674         (R_X86_64_PC32): Likewise.
6675         (R_X86_64_GOT32): Likewise.
6676         (R_X86_64_PLT32): Likewise.
6677         (R_X86_64_COPY): Likewise.
6678         (R_X86_64_GLOB_DAT): Likewise.
6679         (R_X86_64_JUMP_SLOT): Likewise.
6680         (R_X86_64_RELATIVE): Likewise.
6681         (R_X86_64_GOTPCREL): Likewise.
6682         (R_X86_64_32): Likewise.
6683         (R_X86_64_32S): Likewise.
6684         (R_X86_64_16): Likewise.
6685         (R_X86_64_PC16): Likewise.
6686         (R_X86_64_8): Likewise.
6687         (R_X86_64_PC8): Likewise.
6689         * include/grub/i386/efi/pci.h: New file.
6691         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6692         Change it value based on platform.
6693         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6694         (GRUB_E820_RAM): Likewise.
6695         (GRUB_E820_RESERVED): Likewise.
6696         (GRUB_E820_ACPI): Likewise.
6697         (GRUB_E820_NVS): Likewise.
6698         (GRUB_E820_EXEC_CODE): Likewise.
6699         (GRUB_E820_MAX_ENTRY): Likewise.
6700         (grub_e820_mmap): New structure.
6701         (linux_kernel_header): Change the efi field according to different
6702         kernel version, also field from linux_kernel_header.
6704         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6706         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6707         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6708         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6709         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6710         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6711         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6712         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6713         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6714         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6715         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6717         * include/grub/x86_64/efi/kernel.h: New file.
6719         * include/grub/x86_64/efi/loader.h: Likewise.
6721         * include/grub/x86_64/efi/machine.h: Likewise.
6723         * include/grub/x86_64/efi/pci.h: Likewise.
6725         * include/grub/x86_64/efi/time.h: Likewise.
6727         * include/grub/x86_64/linux.h: Likewise.
6729         * include/grub/x86_64/setjmp.h: Likewise.
6731         * include/grub/x86_64/time.h: Likewise.
6733         * include/grub/x86_64/types.h: Likewise.
6735         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6736          GRUB_TARGET_SIZEOF_VOID_P.
6738         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6739         (grub_efi_locate_handle): Likewise.
6740         (grub_efi_open_protocol): Likewise.
6741         (grub_efi_set_text_mode): Likewise.
6742         (grub_efi_stall): Likewise.
6743         (grub_exit): Likewise.
6744         (grub_reboot): Likewise.
6745         (grub_halt): Likewise.
6746         (grub_efi_exit_boot_services): Likewise.
6747         (grub_get_rtc): Likewise.
6749         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6750         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6751         (grub_efi_allocate_pages): Wrap efi calls.
6752         (grub_efi_free_pages): Wrap efi calls.
6753         (grub_efi_get_memory_map): Wrap efi calls.
6755         * kern/x86_64/dl.c: New file.
6757         * kern/x86_64/efi/callwrap.S: Likewise.
6759         * kern/x86_64/efi/startup.S: Likewise.
6761         * loader/efi/appleloader.c: Likewise.
6763         * loader/efi/chainloader.c (cmdline): New variable.
6764         (grub_chainloader_unload): Wrap efi calls.
6765         (grub_chainloader_boot): Likewise.
6766         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6767         command line.
6769         * loader/efi/chainloader_normal.c (chainloader_command):
6770         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6771         command line.
6773         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6774         method.
6775         (grub_e820_add_region): New function.
6776         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6777         booting.
6778         (grub_find_video_card): New function.
6779         (grub_linux_setup_video): New function.
6780         (grub_rescue_cmd_linux): Probe for video information.
6782         * normal/x86_64/setjmp.S: New file.
6784         * term/efi/console.c (map_char): New function.
6785         (grub_console_putchar): Map unicode char.
6786         (grub_console_checkkey): Wrap efi calls.
6787         (grub_console_getkey): Likewise.
6788         (grub_console_getwh): Likewise.
6789         (grub_console_gotoxy): Likewise.
6790         (grub_console_cls): Likewise.
6791         (grub_console_setcolorstate): Likewise.
6792         (grub_console_setcursor): Likewise.
6794         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6796 2008-07-16  Pavel Roskin  <proski@gnu.org>
6798         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6799         format strings.
6801         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6802         pointer, not an integer.  This fixes a warning and prevents
6803         precision loss on 64-bit systems.
6804         (relocate_addresses): Remove unneeded cast.
6806 2008-07-15  Pavel Roskin  <proski@gnu.org>
6808         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6810         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6812         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6813         Fix comparison between signed and unsigned.
6815         * include/grub/i386/ieee1275/console.h: Declare
6816         grub_console_init() and grub_console_fini().
6818         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6819         It's empty and unused.
6821         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6822         beginning to avoid warnings with some compilers.
6824         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6825         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6827 2008-07-14  Pavel Roskin  <proski@gnu.org>
6829         * kern/env.c (grub_register_variable_hook): Don't copy empty
6830         string, it leaks memory.  Pass "" to grub_env_set(), it should
6831         handle constant strings.
6833         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6834         * commands/cmp.c (grub_cmd_cmp): Likewise.
6835         * kern/dl.c (grub_dl_flush_cache): Likewise.
6836         (grub_dl_load_core): Likewise.
6837         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6838         (grub_elf64_load_phdrs): Likewise.
6840 2008-07-13  Pavel Roskin  <proski@gnu.org>
6842         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6843         between signed and unsigned.
6844         (LzmaEnc_Finish): Fix warning about an unused parameter.
6846 2008-07-13  Bean  <bean123ch@gmail.com>
6848         * Makefile.in (enable_lzo): New rule.
6850         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6852         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6854         * boot/i386/pc/lnxboot.S: #include <config.h>.
6856         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6857         its value according to the compression algorithm used, lzo or lzma.
6859         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6860         compression algorithm according to configure macro.
6862         * kern/i386/pc/startup.S (codestart): Likewise.
6864         * kern/i386/pc/lzma_decode.S: New file.
6866         * include/grub/lib/LzFind.h: Likewise.
6868         * include/grub/lib/LzHash.h: Likewise.
6870         * include/grub/lib/LzmaDec.h: Likewise.
6872         * include/grub/lib/LzmaEnc.h: Likewise.
6874         * include/grub/lib/LzmaTypes.h: Likewise.
6876         * lib/LzFind.c: Likewise.
6878         * lib/LzmaDec.c: Likewise.
6880         * lib/LzmaEnc.c: Likewise.
6882 2008-07-13  Bean  <bean123ch@gmail.com>
6884         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6885         (grub_ext4_extent_header): New structure.
6886         (grub_ext4_extent): Likewise.
6887         (grub_ext4_extent_idx): Likewise.
6888         (grub_ext4_find_leaf): New function.
6889         (grub_ext2_read_block): Handle extents.
6891 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6893         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6895 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6897         * util/grub.d/40_custom.in: New file. Example on how to add custom
6898         entries to /etc/grub.d.
6899         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6900         40_custom (implicitly, by merging all the grub.d rules).
6902 2008-07-11  Pavel Roskin  <proski@gnu.org>
6904         * commands/read.c (grub_getline): Fix invalid memory access.
6905         Don't add newline to the variable value.
6907         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6908         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6909         (serial_hw_get_port): Check validity of the port number.
6910         (grub_cmd_serial): Check return value of serial_hw_get_port().
6912 2008-07-07  Pavel Roskin  <proski@gnu.org>
6914         * boot/i386/pc/diskboot.S (notification_string): Replace
6915         "Loading kernel" with just "loading".  This is shorter, less
6916         confusing and saves a few bytes for possible future changes.
6918 2008-07-05  Pavel Roskin  <proski@gnu.org>
6920         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6921         size for ATAPI devices, they are undefined.  Output sector
6922         number in decimal form.
6924         * disk/ata.c: Use named constants for status bits.
6926 2008-07-04  Pavel Roskin  <proski@gnu.org>
6928         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6929         grub_addr_t before casting it to the void pointer to fix a
6930         warning.  Non-addressable regions are discarded earlier.
6931         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6932         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6933         (check_signature): Don't shadow table_header.
6934         (grub_linuxbios_table_iterate): Cast numeric constants to
6935         grub_linuxbios_table_header_t.
6936         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6937         grub_stop().
6939         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6940         prevent warnings.
6942         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6943         pointer, which can cause warnings.  Support 64-bit addresses.
6945         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6946         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6948 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6950         This fixes a performance issue when pc & gpt partmap iterators
6951         didn't abort iteration even after our hook found what it was
6952         looking for (often causing expensive probes of non-existent drives).
6954         Some callers relied on previous buggy behaviour, since they would
6955         raise an error when their own hooks caused early abortion of its
6956         iteration.
6958         * kern/device.c (grub_device_open): Improve error message.
6959         * disk/lvm.c (grub_lvm_open): Likewise.
6960         * disk/raid.c (grub_raid_open): Likewise.
6962         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6963         when hook requests it, independently of grub_errno.
6964         (pc_partition_map_probe): Do not fail when find_func() caused
6965         early abortion of pc_partition_map_iterate().
6967         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6968         when hook requests it, independently of grub_errno.
6969         (gpt_partition_map_probe): Do not fail when find_func() caused
6970         early abortion of gpt_partition_map_iterate().
6972         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6973         when hook requests it, independently of grub_errno.  Do not fail when
6974         part_map_iterate_hook() caused early abortion of p->iterate().
6976         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6977         when grub_partition_iterate() returned with non-zero.
6979 2008-07-03  Pavel Roskin  <proski@gnu.org>
6981         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6982         like we do in grub_ata_pio_read().
6983         (grub_ata_readwrite): Always write individual sectors.  Fix the
6984         sector count for the remainder.
6985         (grub_ata_write): Enable writing to ATA devices.  Correctly
6986         report error for ATAPI devices.
6988 2008-07-02  Pavel Roskin  <proski@gnu.org>
6990         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6991         warning.
6993         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6994         for every read sector, we already increment it for the whole
6995         batch.  This fixes reading more than 256 sectors at once.
6997         * util/grub-editenv.c (cmd_info): Cast argument to long
6998         explicitly.  ptrdiff_t reduces to int on i386.
7000         * util/grub-editenv.c (main): Be specific which parameter is
7001         missing.
7003         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7004         (memdisk): Make memdisk_orig_addr a pointer.
7006         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7007         for file offsets, use grub_off_t instead.  Fix printf format
7008         warnings.
7010         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7011         there.  Real unexpected warnings should not drown in the noise
7012         about known problems.
7014         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7015         grub_disk_addr_t for memory addresses.
7017         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7018         explicitly to fix a warning.
7020         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7022         * Makefile.in (MODULE_LDFLAGS): New variable.
7023         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
7024         the linker accepts --build-id=none.
7025         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
7026         MODULE_LDFLAGS.
7027         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7029         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7030         those in Linux XFS code.  Provide a way to access 64-bit parent
7031         inode.
7032         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
7033         the end of struct grub_xfs_dir_header.
7035 2008-07-02  Bean  <bean123ch@gmail.com>
7037         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7038         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7039         and GRUB_IEEE1275_FLAG_NO_ANSI.
7041         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7042         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7043         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7045         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7046         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7048         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7049         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7051         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7052         esc sequence on non ANSI terminal.
7053         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7055         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7056         beginning of file.
7058 2008-07-02  Bean  <bean123ch@gmail.com>
7060         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7061         (grub_editenv_SOURCES): New variable.
7062         (pkglib_MODULES): Add loadenv.mod.
7063         (loadenv_mod_SOURCES): New variable.
7064         (loadenv_mod_CFLAGS): Likewise.
7065         (loadenv_mod_LDFLAGS): Likewise.
7067         * include/grub/envblk.h: New file.
7069         * util/envblk.c: New file.
7071         * util/grub-editenv.c: New file.
7073         * commands/loadenv.c: New file.
7075 2008-07-01  Pavel Roskin  <proski@gnu.org>
7077         * include/multiboot2.h (struct multiboot_tag_module): Use char,
7078         not unsigned char.  This fixes warnings and is consistent with
7079         other tags.
7081         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7083         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7085         * term/tparm.c (analyze): Always set *popcount.
7087         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7088         cast to fix a warning.
7090         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7091         cast to suppress a warning.
7093         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7094         grub_fshelp_read_file() expects.
7096         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
7097         write uuid as a 32-bit value in CPU byte order, so declare and
7098         use it as such.
7100         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7101         long if the format specifier expects it.
7102         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7103         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7104         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7105         long to fix a warning.
7106         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7107         grub_dprintf() arguments to fix warnings.
7109 2008-06-30  Pavel Roskin  <proski@gnu.org>
7111         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7112         install_bsd_part immediately before core.img is embedded or
7113         modified on disk.  This fixes core.img verification if core.img
7114         cannot be embedded.
7116         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7117         core_path to calculate the blocklist.
7118         Patch from Javier Martín <lordhabbit@gmail.com>
7120 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7122         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
7123         block to disk block.
7124         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7125         Patch from Niels Böhm <bitbucket@arcor.de>
7127 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7129         * util/update-grub_lib.in (font_path): Search for fonts in
7130         /boot/grub first, which is more likely to be readable (we aren't
7131         deciding where fonts live, just looking for them).
7133 2008-06-26  Pavel Roskin  <proski@gnu.org>
7135         * util/biosdisk.c (read_device_map): Don't leave dead map
7136         entries for devices failing stat() check.
7138         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7139         core_path_dev for the core.img path on the target device.
7141 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7143         * disk/fs_uuid.c: New file.
7144         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7145         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7146         (fs_uuid_mod_LDFLAGS): New variables.
7147         * include/grub/disk.h (grub_disk_dev_id): Add
7148         `GRUB_DISK_DEVICE_UUID_ID'.
7149         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7150         implement iterate().
7152 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7154         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7155         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7156         Linux image includes no initrd.
7158 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
7160         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7161         call to resolve the core image location that effectively appended the
7162         name twice.
7164 2008-06-21  Robert Millan  <rmh@aybabtu.com>
7166         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7167         call from here ...
7169         * util/grub.d/10_hurd.in: ... to here ...
7170         * util/grub.d/10_linux.in: ... and here.
7172 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7174         * kern/main.c (grub_main): Export `prefix' variable immediately
7175         after it has been set by grub_machine_set_prefix().
7177 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7179         * commands/search.c (search_label, search_fs_uuid, search_file): Print
7180         search result when not saving to variable, not the other way around.
7181         When saving to variable, abort iteration as soon as a match is found.
7183 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7185         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7186         check for partition that provides /boot/grub.  Its logic is flawed,
7187         as it prevents prepare_grub_to_access_device() from being called
7188         multiple times.
7190 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7192         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7193         "insmod" command directly when abstraction modules are needed,
7194         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7195         since it had already been processed).
7197 2008-06-19  Pavel Roskin  <proski@gnu.org>
7199         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7200         changed.  This is needed in case GRUB_LIBDIR changes.
7201         * conf/i386-ieee1275.rmk: Likewise.
7202         * conf/i386-linuxbios.rmk: Likewise.
7203         * conf/i386-pc.rmk: Likewise.
7204         * conf/powerpc-ieee1275.rmk: Likewise.
7206 2008-06-18  Pavel Roskin  <proski@gnu.org>
7208         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7209         kernel_elf_symlist.c to symlist.c for consistency with other
7210         architectures.  Update all users.
7211         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7213 2008-06-18  Robert Millan  <rmh@aybabtu.com>
7215         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7216         it in prefix.
7218         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
7219         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
7220         a RAID device, run setup() for all members independently on whether
7221         LVM abstraction is being used.
7222         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7223         If grub-mkimage has set `*install_dos_part == -2', don't override this
7224         value.
7225         Perform *install_dos_part adjustments independently on whether
7226         we're embedding or not.
7227         Clarify error message when image is too big for embedding.
7228         Remove duplicate *install_dos_part stanza.
7230 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7232         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7233         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7234         variables.
7235         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7236         values in grub_ofconsole_normal_color and
7237         grub_ofconsole_highlight_color (they're not directly related to
7238         background and foreground).
7239         (grub_ofconsole_setcolorstate): Extract background and foreground
7240         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7242 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7244         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7245         /boot/grub for the check in last commit, not /boot (they could be
7246         different partitions).
7248 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7250         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7251         asked to setup access for the same partition that provides /boot,
7252         don't bother using UUIDs since our root already has the value we
7253         want.
7255 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7257         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7258         I2O devices.
7259         Patch from Sven Mueller <sven@debian.org>.
7261 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7263         * util/update-grub.in: Check for $EUID instead of $UID.
7264         Reported by Vincent Zweije.
7266 2008-06-16  Bean  <bean123ch@gmail.com>
7268         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7269         (grub_ext2_read_block): Likewise.
7270         (grub_ext2_read_inode): Likewise.
7271         (grub_ext2_mount): Likewise.
7272         (grub_ext2_close): Likewise.
7273         (grub_ext3_get_journal): Removed.
7275         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7276         (grub_reiserfs_read_symlink): Likewise.
7277         (grub_reiserfs_mount): Likewise.
7278         (grub_reiserfs_open): Likewise.
7279         (grub_reiserfs_read): Likewise.
7280         (grub_reiserfs_close): Likewise.
7281         (grub_reiserfs_get_journal): Removed.
7283         * fs/fshelp.c (grub_fshelp_read): Removed.
7284         (grub_fshelp_map_block): Likewise.
7286         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7287         (grub_fshelp_journal): Likewise.
7288         (grub_fshelp_read): Likewise.
7289         (grub_fshelp_map_block): Likewise.
7291 2008-06-16  Pavel Roskin  <proski@gnu.org>
7293         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7294         floating point anymore.
7295         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7297 2008-06-15  Pavel Roskin  <proski@gnu.org>
7299         * commands/ls.c (grub_ls_list_files): Use integer calculations
7300         for human readable format, avoid floating point use.
7301         * kern/misc.c (grub_ftoa): Remove.
7302         (grub_vsprintf): Remove floating point support.
7304 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7306         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7307         devices.
7308         Reported by Max Vozeler.
7310 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7312         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7313         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7314         skipped later.
7315         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7316         the beginning of the prefix.
7318         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7319         It is assumed that if we have a memdisk, grub-mkimage has set
7320         grub_prefix to include the "(memdisk)" drive in it.
7322 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7324         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7325         Initialize keyboard controller after registering the terminal, so that
7326         grub_printf() can be called from grub_keyboard_controller_init().
7328 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7330         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7331         extent-btree which is written as big endian on disk.
7332         Reported by Alain Greppin  <al@chilibi.org>.
7334 2008-06-14  Robert Millan  <rmh@aybabtu.com>
7336         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7337         * util/i386/pc/grub-install.in (modules): Likewise.
7339 2008-06-13  Pavel Roskin  <proski@gnu.org>
7341         * commands/ls.c (grub_ls_list_files): Fix format warnings.
7343 2008-06-13  Bean  <bean123ch@gmail.com>
7345         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7347         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7349         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7350         to indicate sparse block.
7352 2008-06-12  Pavel Roskin  <proski@gnu.org>
7354         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7355         number, grub_fshelp_read() does it for us.
7357         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
7358         linear disk read with journal translation.
7359         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7360         * include/grub/fshelp.h: Declare grub_fshelp_read().
7362 2008-06-09  Pavel Roskin  <proski@gnu.org>
7364         * fs/minix.c (grub_minix_mount): Handle error reading
7365         superblock.
7367 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7369         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7370         don't append the RAID prefix afterwards.
7371         Reported by Clint Adams.
7373 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7375         Based on description from Pavel:
7376         * kern/disk.c (grub_disk_check_range): Rename to ...
7377         (grub_disk_adjust_range): ... this.  Add a comment explaining the
7378         tasks performed by this function.
7380 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7382         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7383         `num_serial' (for consistency with other variables).
7384         (struct grub_ntfs_data): Add `uuid' member.
7385         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7386         (grub_ntfs_uuid): New function.
7387         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7389 2008-06-07  Pavel Roskin  <proski@gnu.org>
7391         * util/biosdisk.c (open_device): Revert last change to the
7392         function, it broke installation.  The sector needs to be
7393         different dependent on which device is opened.
7395 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7397         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7398         rest of GRUB, and breakage doesn't happen if its value were modified.
7400         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7401         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7402         a constant (same value).
7403         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7404         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7406 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7408         * util/biosdisk.c (open_device): Do not modify sector offset when
7409         accessing a partition.  kern/disk.c already handles this for us.
7411 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7413         * util/grub-emu.c (grub_machine_init): Move code in this function from
7414         here ...
7415         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7416         segfault in case grub_printf() is called).
7418         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7419         grub_probe.  Update all users not to explicitly add it again.
7420         (grub_device): New variable; contains corresponding device for grubdir.
7421         (fs_module, partmap_module, devabstraction_module): Pass
7422         `--device ${grub_device}' to grub_probe to avoid traversing /dev
7423         every time.
7425 2008-06-05  Robert Millan  <rmh@aybabtu.com>
7427         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7428         is found, print it (same layout as with labels).
7430 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7432         * util/biosdisk.c (get_drive): Rename to ...
7433         (find_grub_drive): ... this.  Update all users.
7435         (get_os_disk): Rename to ...
7436         (convert_system_partition_to_system_disk): ... this.  Update all users.
7438         (find_drive): Rename to ...
7439         (find_system_device): ... this.  Update all users.
7441 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7443         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7444         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7445         (make_device_map): Likewise.
7447 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7449         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7450         before dereferencing it.
7452         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7453         union with fat12/fat16-specific ones.  Add some new fields, including
7454         `num_serial' for both versions.
7455         (struct grub_fat_data): Add `uuid' member.
7456         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7457         names.  Initialize `data->uuid' using `num_serial'.
7458         (grub_fat_uuid): New function.
7459         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7461         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7462         (grub_reiserfs_uuid): New function.
7463         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7464         member.
7466         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7467         (grub_xfs_uuid): New function.
7468         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7470 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7472         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7473         code that is backward compatible with pre-uuid search command.
7475 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7477         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7478         floppies after everything else, to ensure floppy drive isn't accessed
7479         unnecessarily (patch from Bean).
7481 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7483         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7484         not print device names when we were asked to set a variable.
7486 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7488         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7489         using "cursor-on" and "cursor-off" commands (understood at least by
7490         the Open Firmware flavour on OLPC).
7492 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7494         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7495         on and off sequences.
7497 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7499         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7500         * util/update-grub.in: Likewise.
7502 2008-05-30  Pavel Roskin  <proski@gnu.org>
7504         * util/biosdisk.c (linux_find_partition): Simplify logic and
7505         make the code more universal.  Keep special processing for
7506         devfs, but use a simple rule for all other devices.  If the
7507         device ends with a number, append 'p' and the partition number.
7508         Otherwise, append only the partition number.
7510 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7512         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7513         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7514         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7515         the `root' parameter to Linux.
7517 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7519         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7520         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7521         --fs_uuid with --fs-uuid.
7522         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7523         all filesystems support them).
7525 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7527         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7528         grub_printf() flags, since we're printing in units of 2 bytes.
7530 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7532         * util/grub.d/00_header.in: Remove obsolete comment referencing
7533         convert_system_path_to_grub_path().
7534         * util/update-grub.in: Likewise.
7535         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7536         (convert_system_path_to_grub_path): Add a warning message explaining
7537         that this function is deprecated.  Rely on is_path_readable_by_grub()
7538         for the readability checks.
7539         (font_path): Use is_path_readable_by_grub() for the readability
7540         check rather than convert_system_path_to_grub_path().
7542 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7544         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7545         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7546         converting it first.
7547         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7548         grub.cfg for access to font file, and afterwards call it again to set
7549         the root device.
7551 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7553         * commands/search.c (options): Add --fs_uuid option.
7554         (search_fs_uuid): New function.
7555         (grub_cmd_search): Fix --set argument passing.
7556         Use search_fs_uuid() when requested via --fs_uuid.
7557         (grub_search_init): Update help message.
7558         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7559         and redeclare it as an array of 16-bit words.
7560         (grub_ext2_uuid): New function.
7561         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7562         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7563         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7564         (GRUB_DEVICE_BOOT_UUID): New variables.
7565         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7566         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7567         whenever possible.
7568         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7569         just assume `root' variable has the right value.
7570         * util/grub.d/10_linux.in: Likewise.
7571         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7572         via PRINT_FS_UUID.
7573         (main): Recognise `-t fs_uuid' argument.
7575 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7577         * util/biosdisk.c (map): Redefine structure to hold information
7578         about GRUB drive name.
7579         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7580         drive names.
7581         (call_hook): Remove.
7582         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7583         member.  Assume drive has partitions.
7584         (grub_util_biosdisk_open): Access device names via `.device' struct
7585         member.
7586         (open_device): Likewise.
7587         (find_drive): Likewise.
7588         (read_device_map): Adjust map[] usage to match the new struct
7589         definition.  Don't check for duplicates (still possible, but not cheap
7590         anymore).
7591         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7592         (make_device_name): Remove assumption of BIOS-like drive names.
7594 2008-05-30  Pavel Roskin  <proski@gnu.org>
7596         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7597         compiling execute.c doesn't need grub_script.tab.h anymore.
7598         (normal/command.c_DEPENDENCIES): Likewise.
7599         (normal/function.c_DEPENDENCIES): Likewise.
7600         * conf/i386-ieee1275.rmk: Likewise.
7601         * conf/i386-linuxbios.rmk: Likewise.
7602         * conf/i386-pc.rmk: Likewise.
7603         * conf/powerpc-ieee1275.rmk: Likewise.
7604         * conf/sparc64-ieee1275.rmk: Likewise.
7606 2008-05-29  Pavel Roskin  <proski@gnu.org>
7608         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7609         when scanning metadata for volume group name.
7611         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7612         a generated file, which may only be included from the files with
7613         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7614         use union YYSTYPE, as the later allows forward declaration.
7615         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7617 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7619         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7620         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7621         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7622         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7623         scan codes.
7625 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7627         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7628         control key combinations.
7630 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7632         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7633         * util/ieee1275/grub-install.in: ... to here.
7634         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7635         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7636         (grub_install_SOURCES): Likewise.
7638 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7640         * fs/affs.c: Update copyright year.
7641         * fs/ext2.c: Likewise.
7642         * fs/fshelp.c: Likewise.
7643         * fs/hfsplus.c: Likewise.
7644         * fs/ntfs.c: Likewise.
7645         * fs/xfs.c: Likewise.
7646         * include/grub/fshelp.h: Likewise.
7647         * util/grub-mkdevicemap.c: Likewise.
7649 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7651         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7652         might need to be fatfs to support some firmware implementations
7653         (e.g. OFW or EFI).
7655 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7657         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7658         devices.
7659         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7660         (make_device_map): Likewise.
7662 2008-05-20  Bean  <bean123ch@gmail.com>
7664         * fs/fshelp.c (grub_fshelp_map_block): New function.
7665         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7666         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7668         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7669         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7670         (grub_fshelp_journal): New structure.
7671         (grub_fshelp_map_block): New function prototype.
7672         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7673         (grub_fshelp_map_block): Likewise.
7675         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7676         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7677         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7678         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7679         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7680         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7681         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7682         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7683         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7684         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7685         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7686         (grub_ext2_sblock): New members for journal support.
7687         (grub_ext3_journal_header): New structure.
7688         (grub_ext3_journal_revoke_header): Likewise.
7689         (grub_ext3_journal_block_tag): Likewise.
7690         (grub_ext3_journal_sblock): Likewise.
7691         (grub_fshelp_node): New members logfile and journal.
7692         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7693         grub_fshelp_map_block to get real block number.
7694         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7695         number.
7696         (grub_ext2_read_inode): Likewise.
7697         (grub_ext3_get_journal): New function.
7698         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7699         (grub_ext2_close): Release memory used by journal.
7701         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7702         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7703         (grub_reiserfs_transaction_header): Renamed to
7704         grub_reiserfs_description_block, replace field data with real_blocks.
7705         (grub_reiserfs_commit_block): New structure.
7706         (grub_reiserfs_data): New member journal.
7707         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7708         number.
7709         (grub_reiserfs_read_symlink): Likewise.
7710         (grub_reiserfs_iterate_dir): Likewise.
7711         (grub_reiserfs_open): Likewise.
7712         (grub_reiserfs_read): Likewise.
7713         (grub_reiserfs_get_journal): New function.
7714         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7715         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7716         using grub_reiserfs_get_journal.
7717         (grub_reiserfs_close): Release memory used by journal.
7719         * fs/affs.c (grub_affs_read_block): Change block type to
7720         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7722         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7724         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7726         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7728         * fs/udf.c (grub_udf_read_block): Change block type to
7729         grub_disk_addr_t. Use type cast to avoid warning.
7731         * fs/xfs.c (grub_xfs_read_block): Likewise.
7733 2008-05-16  Christian Franke  <franke@computer.org>
7735         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7736         to ensure that break with ESC will always work.
7737         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7738         Remove ESC from keyboard queue.
7740 2008-05-16  Christian Franke  <franke@computer.org>
7742         * util/biosdisk.c: [__CYGWIN__] Add includes.
7743         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7744         (get_os_disk): Move variable declarations to OS specific
7745         parts to avoid warning.
7746         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7747         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7748         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7749         Cygwin.
7750         * util/getroot.c: [__CYGWIN__] Add includes.
7751         (strip_extra_slashes): Fix "/" case.
7752         [__CYGWIN__] (get_win32_path): New function.
7753         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7754         [__CYGWIN__] (find_root_device): Disable.
7755         [__CYGWIN__] (get_bootsec_serial): New function.
7756         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7757         [__linux__] (grub_guess_root_device): Add early returns to simplify
7758         structure.
7759         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7760         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7761         check for Linux only.
7763 2008-05-15  Bean  <bean123ch@gmail.com>
7765         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7766         keyboard hang problem in apple's intel mac.
7768 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7770         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7771         devices.
7772         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7773         (make_device_map): Likewise.
7774         Reported by Aurelien Jarno <aurel32@debian.org>
7776 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7778         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7779         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7780         (make_device_map): Output entries for xvd type disks.
7782 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7784         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7785         devices.
7786         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7787         (make_device_map): Likewise.
7788         Reported by Roland Dreier <rdreier@cisco.com>
7790 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7792         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7793         grub_strstr() call.  Correct a few mistakes in failure path handling.
7795 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7797         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7798         Do not print a trailing slash (therefore, the root directory is an
7799         empty string).
7800         (convert_system_path_to_grub_path): Do not remove trailing slash
7801         from make_system_path_relative_to_its_root() output.
7803         * util/i386/pc/grub-install.in: Add trailing slash to output from
7804         make_system_path_relative_to_its_root().
7806 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7808         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7809         ensures that output lines aren't intermangled with those sent to
7810         stderr (via grub_util_info()).
7811         * util/grub-probe.c (grub_refresh): Likewise.
7812         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7814 2008-05-05  Christian Franke  <franke@computer.org>
7816         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7817         Add Cygwin device names.
7818         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7819         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7820         (check_device): Return error instead of success on empty name.
7821         (make_device_map): Move label inside linux specific code to
7822         prevent compiler warning.
7824 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7826         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7827         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7828         first boot option.
7829         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7831 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7833         * docs/grub.cfg: New file (example GRUB configuration).
7835 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7837         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7838         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7839         and `disk/ieee1275/nand.c'.
7841 2008-04-25  Bean  <bean123ch@gmail.com>
7843         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7844         i386-linuxbios.
7846         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7847         change the buffer size to 4096 for cdrom device.
7849         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7850         and nand.mod.
7851         (_linux_mod_SOURCES): New variable.
7852         (_linux_mod_CFLAGS): Likewise.
7853         (_linux_mod_LDFLAGS): Likewise.
7854         (linux_mod_SOURCES): Likewise.
7855         (linux_mod_CFLAGS): Likewise.
7856         (linux_mod_LDFLAGS): Likewise.
7857         (nand_mod_SOURCES): Likewise.
7858         (nand_mod_CFLAGS): Likewise.
7859         (nand_mod_LDFLAGS): Likewise.
7861         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7862         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7863         type property. (nand device in olpc don't have this property)
7865         * include/grub/disk.h (grub_disk_dev_id): New macro
7866         GRUB_DISK_DEVICE_NAND_ID.
7868         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7869         function prototype.
7870         (grub_rescue_cmd_initrd): Likewise.
7872         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7873         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7874         ofw_cif_handler and ofw_idt, adjust padding number.
7876         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7877         GRUB_MACHINE_IEEE1275 is defined.
7879         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7880         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7882         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7883         on nested function heap_init.
7884         (grub_upper_mem): New variable for i386-ieee1275.
7885         (grub_get_extended_memory): New function for i386-ieee1275.
7886         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7888         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7889         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7890         property.
7892         * loader/i386/ieee1275/linux.c: New file.
7894         * loader/i386/ieee1275/linux_normal.c: New file.
7896         * disk/ieee1275/nand.c: New file.
7898 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7900         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7901         value.
7902         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7904 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7906         Restructures early code path on ieee1275 to unify grub_main() as
7907         the first C function that is executed in every platform.
7909         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7910         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7911         cmain().
7912         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7913         * kern/ieee1275/cmain.c (cmain): Rename to ...
7914         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7915         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7916         at the beginning.
7918 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7920         * util/update-grub.in: Fix syntax error when setting
7921         `GRUB_PRELOAD_MODULES'.
7922         Reported by Stephane Chazelas <stephane@artesyncp.com>
7924 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7926         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7927         section into account, newer toolchains generate unique build ids
7928         * configure.ac: remove the test for --build-id=none acceptance,
7929         we want build ids to be preserved
7930         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7931         far from other sections don't cause the raw binary images grow
7932         size
7934 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7936         * disk/lvm.c: Update copyright year.
7937         * kern/misc.c: Likewise.
7939 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7941         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7942         there is no memory left for physical volume name.
7944 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7946         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7947         volume name mapping to support bigger than 9 character names properly.
7949 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7951         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7952         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7954 2008-04-13  Christian Franke  <franke@computer.org>
7956         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7957         to create a floppy emulation boot CD when non emulation mode
7958         does not work.
7959         Enable Joliet CD filesystem extension.
7961 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7963         * kern/misc.c (grub_strncat): Fix off-by-one error.
7964         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7966         * kern/env.c (grub_env_context_close): Clear current context, not
7967         previous one.
7968         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7970         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7972 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7974         Improve robustness when handling LVM.
7976         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7977         (and leave `*p' unmodified).
7978         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7979         through it.
7980         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7981         iterating through it.
7982         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7983         through it.
7984         (grub_lvm_scan_device): Check the return value (and fail gracefully
7985         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7986         Don't assume `vg->pvs != NULL' when iterating through it.
7988 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7990         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7991         * genmk.rb (partmap): New variable.
7992         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7993         (#{partmap}): New target rule.
7994         * genpartmaplist.sh: New file.
7995         * Makefile.in (pkglib_DATA): Add partmap.lst.
7996         (partmap.lst): New target rule.
7997         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7998         modules (including all partition maps), instead of preloading them.
8000 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
8002         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8003         `linux-boot-prober' (if installed) to detect other operating
8004         systems which are installed on the computer and add them to
8005         the boot menu.
8006         * conf/common.rmk: Build and install 30_os-prober.
8008 2008-04-12  Robert Millan  <rmh@aybabtu.com>
8010         * kern/powerpc/ieee1275/init.c: Move from here ...
8011         * kern/ieee1275/init.c: ... to here.  Update all users.
8013         * kern/powerpc/ieee1275/cmain.c: Move from here ...
8014         * kern/ieee1275/cmain.c: ... to here.  Update all users.
8016         * kern/powerpc/ieee1275/openfw.c: Move from here ...
8017         * kern/ieee1275/openfw.c: ... to here.  Update all users.
8019         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8020         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
8022 2008-04-10  Pavel Roskin  <proski@gnu.org>
8024         * configure.ac: Always use "_cv_" in cache variables for
8025         compatibility with Autoconf 2.62.
8027 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8029         Revert grub/machine/init.h addition by Pavel (since it breaks on
8030         i386-ieee1275 and others):
8031         * util/i386/pc/misc.c: Remove grub/machine/init.h.
8032         * util/powerpc/ieee1275/misc.c: Likewise.
8034 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8036         * util/grub-probe.c (probe): Improve error message.
8038 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8040         * util/biosdisk.c (read_device_map): Skip devices that don't exist
8041         (this prevents the presence of a bogus entry from ruining the whole
8042         thing).
8044 2008-04-06  Pavel Roskin  <proski@gnu.org>
8046         * util/biosdisk.c: Include grub/util/biosdisk.h.
8047         * util/grub-fstest.c (execute_command): Make static.
8048         * util/grub-mkdevicemap.c (check_device): Likewise.
8049         * util/i386/pc/misc.c: Include grub/machine/init.h.
8050         * util/powerpc/ieee1275/misc.c: Likewise.
8051         * util/lvm.c: Include grub/util/lvm.h.
8052         * util/misc.c: Include grub/kernel.h, grub/misc.h and
8053         grub/cache.h.
8054         * util/raid.c: Include grub/util/raid.h.
8055         (grub_util_getdiskname): Make static.
8057         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8058         grub_hostfs_fini(), as they are called from grub_init_all() and
8059         grub_fini_all() respectively.  This fixes an infinite loop in
8060         grub-fstest due to double registration of hostfs.
8061         Reported by Christian Franke <Christian.Franke@t-online.de>
8063 2008-04-05  Pavel Roskin  <proski@gnu.org>
8065         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8066         all 8 functions.  Otherwise, probe function 0 only.
8068 2008-04-04  Pavel Roskin  <proski@gnu.org>
8070         * commands/lspci.c (grub_lspci_iter): Print the bus number
8071         correctly.
8073         * commands/lspci.c (grub_pci_classes): Fix typos.
8074         (grub_lspci_iter): Don't print func twice.  Print vendor ID
8075         before device ID, as it's normally done.
8077         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8078         Fix signedness warnings.
8079         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8080         Likewise.
8081         * util/ieee1275/get_disk_name.c: Include config.h so that
8082         _GNU_SOURCE is defined and getline() is declared.  Mark an
8083         unused argument as such.  Fix a signedness warning.
8085 2008-04-02  Pavel Roskin  <proski@gnu.org>
8087         * genkernsyms.sh.in: Use more robust assignments for CC and
8088         srcdir.  Quote srcdir.
8089         * gensymlist.sh.in: Likewise.  Assert at the compile time that
8090         the symbol table is not empty.
8092         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8093         * fs/cpio.c (grub_cpio_read): Likewise.
8095 2008-04-01  Pavel Roskin  <proski@gnu.org>
8097         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8098         * disk/host.c (grub_host_open): Likewise.
8099         * disk/loopback.c (grub_loopback_open): Likewise.
8100         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8101         disk->id as in disk/host.c, not a multi-character constant.
8103         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
8104         later is obsolete, potentially dangerous and sets a bad example.
8105         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8106         * util/misc.c (grub_util_get_image_size): Likewise.
8108         * disk/loopback.c (options): Improve help for "--partitions".
8110         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8111         options to align them with the short options, e.g. "echo -e".
8113 2008-03-31  Bean  <bean123ch@gmail.com>
8115         * video/reader/png.c (grub_png_data): New member is_16bit and
8116         image_data.
8117         (grub_png_decode_image_header): Detect 16 bit png image.
8118         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8119         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8120         (grub_video_reader_png): Release memory occupied by image_data.
8122         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8123         4096 bytes.
8124         (grub_nfs_mount): Skip the test for sector per cluster.
8126         * include/grub/ntfs.h (MAX_SPC): Removed.
8128 2008-03-31  Bean  <bean123ch@gmail.com>
8130         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8131         (grub_probe_SOURCES): Add fs/afs.c.
8132         (grub_fstest_SOURCES): Likewise.
8133         (afs_mod_SOURCES): New variable.
8134         (afs_mod_CFLAGS): Likewise.
8135         (afs_mod_LDFLAGS): Likewise.
8137         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8138         (grub_emu_SOURCES): Likewise.
8140         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8142         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8144         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8146         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8148         * fs/afs.c: New file.
8150 2008-03-30  Pavel Roskin  <proski@gnu.org>
8152         * disk/host.c: Include grub/misc.h to fix a warning.
8153         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8154         warnings about implicit declarations.
8156         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8157         variable.
8158         * include/grub/i386/loader.h: Change declaration of
8159         grub_linux_boot() to match what grub_loader_set() expects.
8160         * util/getroot.c (grub_guess_root_device): Return const char* to
8161         fix a warning.
8162         * util/grub-probe.c (probe): Fix a warning about uninitialized
8163         abstraction_name variable.
8164         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8165         second argument as unused to fix a warning.
8167         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8168         missing grub_error() call.
8170         * util/update-grub_lib.in: Define datarootdir, since Autoconf
8171         2.60 and newer uses it to define datadir.
8173         * commands/sleep.c: Fix warning about implicit declaration.
8174         * disk/memdisk.c: Likewise.
8175         * loader/aout.c: Likewise.
8176         * loader/i386/bsd_normal.c: Likewise.
8177         * util/grub-probe.c: Likewise.
8179         * commands/i386/cpuid.c (has_longmode): Make static.
8180         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8181         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8183         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8184         GDT.  This is more robust, as %ds can change.
8185         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8186         calling real_to_prot().
8187         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8189 2008-03-28  Pavel Roskin  <proski@gnu.org>
8191         * kern/i386/pc/startup.S: Assert that uncompressed functions
8192         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8193         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8194         code, as they push parts of the code (error handlers) beyond
8195         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
8196         code as correctness and size.
8198 2008-03-28  Pavel Roskin  <proski@gnu.org>
8200         * kern/i386/pc/startup.S
8201         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8202         data block address to the real mode, keep offset minimal.  This
8203         works around a bug in AWARD BIOS on old Athlon systems, which
8204         makes CD detection hang.
8206 2008-03-26  Pavel Roskin  <proski@gnu.org>
8208         * normal/color.c (grub_parse_color_name_pair): Make `name' a
8209         const.
8210         * include/grub/normal.h: Add grub_parse_color_name_pair()
8211         declaration.
8213 2008-03-24  Bean  <bean123ch@gmail.com>
8215         * disk/i386/pc/biosdisk.c (cd_start): Removed.
8216         (cd_count): Removed.
8217         (cd_drive): New variable.
8218         (grub_biosdisk_get_drive): Don't check for (cdN) device.
8219         (grub_biosdisk_call_hook): Likewise.
8220         (grub_biosdisk_iterate): Change cdrom detection method.
8221         (grub_biosdisk_open): Replace cd_start with cd_drive.
8222         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8223         detect cdrom device.
8225         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8226         Removed.
8227         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8228         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8229         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8230         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8231         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8232         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8233         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8234         (grub_biosdisk_cdrp): New structure.
8235         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8237         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8239         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8240         device.
8242         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8243         New function.
8245 2008-03-20  Robert Millan  <rmh@aybabtu.com>
8247         Remove 2 TiB limit in ata.mod.
8248         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8249         (grub_ata_dumpinfo): Print sector count with 0x%llx.
8250         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8251         grub_uint64_t instead of grub_uint32_t.
8253 2008-03-05  Bean  <bean123ch@gmail.com>
8255         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8256         (grub_multiboot): Set boot device.
8258         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8260 2008-03-02  Bean  <bean123ch@gmail.com>
8262         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8263         symlink_buffer.
8265 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
8267         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8268         texinfo.tex.
8270         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8271         modified.
8273         * docs/fdl.texi: New file.
8275         * docs/mdate-sh: New file. Copied from gnulib.
8276         * docs/texinfo.tex: Likewise.
8278         * config.guess: Updated from gnulib.
8279         * install-sh: Likewise.
8281 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8283         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8284         (aout_mod_SOURCES): New variable.
8285         (aout_mod_CFLAGS): Likewise.
8286         (aout_mod_LDFLAGS): Likewise.
8288         * conf/i386-ieee1275.rmk: Likewise.
8290 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8292         * util/update-grub.in: Reorganise terminal validity check.  Accept
8293         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8294         Based on suggestion by Franklin PIAT.
8296 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
8298         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8299         function.
8300         * util/getroot.c (grub_util_check_block_device): New function that
8301         returns the given argument if it is a block device and returns NULL else.
8302         * util/grub-probe.c (argument_is_device): New variable.
8303         (probe): Promote device_name from a variable to an argument. Receive
8304         device_name from grub_util_check_block_device() if path is NULL and from
8305         grub_guess_root_device() else. Do not free() device_name anymore.
8306         (options): Introduce new parameter '-d, --device'.
8307         (main): Add description of the new parameter to the help screen.
8308         Rename path variable to argument. Set argument_is_device if the '-d'
8309         option is given. Pass argument to probe() depending on
8310         argument_is_device.
8312 2008-02-24  Bean  <bean123ch@gmail.com>
8314         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8315         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8316         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8317         (GRUB_ISO9660_VOLDESC_PART): Likewise.
8318         (GRUB_ISO9660_VOLDESC_END): Likewise.
8319         (grub_iso9660_primary_voldesc): New member escape.
8320         (grub_iso9660_data): New member joliet.
8321         (grub_iso9660_convert_string): New function.
8322         (grub_iso9660_mount): Detect joliet extension.
8323         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8324         (grub_iso9660_iso9660_label): Likewise.
8326         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8327         (grub_setup_SOURCES): Add fs/udf.c.
8328         (grub_fstest_SOURCES): Likewise.
8329         (udf_mod_SOURCES): New variable.
8330         (udf_mod_CFLAGS): Likewise.
8331         (udf_mod_LDFLAGS): Likewise.
8333         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8334         (grub_emu_SOURCES): Likewise.
8336         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8338         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8340         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8342         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8344         * fs/udf.c: New file.
8346 2008-02-24  Robert Millan  <rmh@aybabtu.com>
8348         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8349         (normal/lexer.c_DEPENDENCIES): New variables.
8350         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8351         (normal/lexer.c_DEPENDENCIES): Likewise.
8352         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8353         (normal/lexer.c_DEPENDENCIES): Likewise.
8354         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8355         (normal/lexer.c_DEPENDENCIES): Likewise.
8356         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8357         (normal/lexer.c_DEPENDENCIES): Likewise.
8358         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8359         (normal/lexer.c_DEPENDENCIES): Likewise.
8361 2008-02-23  Robert Millan  <rmh@aybabtu.com>
8363         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8364         since they were intended to be in hex.  This didn't break previously
8365         because of a bug in gpt_partition_map_iterate() (see below).
8367         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8368         when checking the validity of GPT header.
8369         Remove `partno', since it always provides the same information as `i'.
8371 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
8373         * include/grub/efi/time.h: Fix a wrong comment.
8375 2008-02-19  Pavel Roskin  <proski@gnu.org>
8377         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8378         message.
8380 2008-02-19  Bean  <bean123ch@gmail.com>
8382         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8383         (aout_mod_SOURCES): New variable.
8384         (aout_mod_CFLAGS): Likewise.
8385         (aout_mod_LDFLAGS): Likewise.
8386         (_bsd_mod_SOURCES): New variable.
8387         (_bsd_mod_CFLAGS): Likewise.
8388         (_bsd_mod_LDFLAGS): Likewise.
8389         (bsd_mod_SOURCES): New variable.
8390         (bsd_mod_CFLAGS): Likewise.
8391         (bsd_mod_LDFLAGS): Likewise.
8393         * include/grub/aout.h: New file.
8395         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8397         * include/grub/i386/bsd.h: New file.
8399         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8400         to make it public.
8402         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8403         function is called, so that it's possible to change it inside the hook.
8404         (grub_elf64_load): Likewise.
8405         (grub_elf_file): Don't close the file if elf header is not found.
8406         (grub_elf_close): Close the file if grub_elf_file fails (The new
8407         grub_elf_file won't close it).
8408         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8409         (grub_elf64_size): Likewise.
8411         * kern/i386/loader.S (grub_unix_real_boot): New function.
8413         * loader/aout.c: New file.
8415         * loader/i386/bsd.c: New file.
8417         * loader/i386/bsd_normal.c: New file.
8419         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8421         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8422         can test other formats.
8424 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8426         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8427         (grub_gpt_partition_type_empty): Redefine with macro from
8428         `<grub/gpt_partition.h>'.
8429         (gpt_partition_map_iterate): Adjust partition type comparison.
8431         Export `entry' as partmap-specific `part.data' struct.
8432         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8434         * include/grub/gpt_partition.h (grub_gpt_header)
8435         (grub_gpt_partentry): ... to here (new file).
8437         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8439         (grub_gpt_partition_type_bios_boot): New const variable, defined
8440         with macro from `<grub/gpt_partition.h>'.
8442         (setup): Replace `first_start' with `embed_region', which keeps
8443         track of the embed region (and is partmap-agnostic).
8445         Replace find_first_partition_start() with find_usable_region(),
8446         which finds a usable region for embedding using partmap-specific
8447         knowledge (supports PC/MSDOS and GPT).
8449         Fix all assumptions that the embed region start at sector 1, using
8450         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8451         rather than `first_start' to calculate available size.
8453         In grub_util_info() message, replace "into after the MBR" with an
8454         indication of the specific sector our embed region starts at.
8456 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8458         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8459         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8460         `commands/reboot.c'.
8461         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8462         (halt_mod_SOURCES): Likewise.
8463         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8464         (halt_mod_SOURCES): Likewise.
8466 2008-02-17  Christian Franke  <franke@computer.org>
8468         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8470 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8472         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8473         set `first_start' to 0 for non-PC/MSDOS partition maps.
8475 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8477         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8478         do not assume partition map is PC/MSDOS before performing checks that
8479         are specific to that layout.
8481 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8483         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8484         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8485         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8487 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8489         * configure.ac: Only a cosmetic change on the handling of
8490         -fno-stack-protector.
8492 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8494         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8495         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8496         reboot.c.
8497         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8498         (halt_mod_SOURCES): New variable.
8499         (halt_mod_CFLAGS): Likewise.
8500         (halt_mod_LDFLAGS): Likewise.
8501         (reboot_mod_SOURCES): Likewise.
8502         (reboot_mod_CFLAGS): Likewise.
8503         (reboot_mod_LDFLAGS): Likewise.
8505         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8506         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8507         reboot.c.
8508         (halt_mod_SOURCES): Likewise.
8509         (reboot_mod_SOURCES): Likewise.
8511         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8512         commands/i386/pc/reboot.c by commands/reboot.c.
8513         (reboot_mod_SOURCES): Likewise.
8515         * commands/i386/pc/reboot.c: merge this file ...
8517         * commands/ieee1275/reboot.c: ... and this file ...
8519         * commands/reboot.c: ... to this file.
8520         Add some precompiler directive to include the correct header for
8521         each machine.
8523         * commands/ieee1275/halt.c: move this file ...
8525         * commands/halt.c: ... to here.
8526         Add some precompiler directive to include the correct header for
8527         each machine.
8529         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8530         (grub_halt): Likewise.
8532         * kern/efi/efi.c (grub_reboot): New function.
8533         (grub_halt): Likewise.
8535 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8537         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8538         /dev (like it is done for /dev/mapper).  This doesn't provide support
8539         for EVMS, but at least it is now easy to identify the problem when it
8540         arises.
8542 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8544         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8545         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8546         comparing it with -1, not 0.
8548 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8550         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8551         `disk/lvm.c'.
8552         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8553         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8555         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8556         `disk/lvm.c' to the end of the list.
8557         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8558         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8560 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8562         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8563         grub_print_error() instead.  This will let user know why we're entering
8564         rescue mode.
8565         Based on suggestions from Sam Morris.
8567 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8569         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8570         on remaining N args, instead of "--" arg N times.
8572 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8574         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8575         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8576         pattern for unknown glyphs.
8578 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8580         * configure.ac: Probe for `help2man'.
8581         * Makefile.in (builddir): New variable.
8582         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8583         or otherwise add a few flags/options to it.
8584         (install-local): For every executable utility or script that is
8585         installed, invoke $(HELP2MAN) to install a manpage based on --help
8586         output.
8588         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8589         that it doesn't prevent --help from working in build tree.
8591         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8592         with `bug-grub@gnu.org'.
8593         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8594         * util/update-grub.in (usage): New function.
8595         Implement proper argument check, with support for --help and --version
8596         (as well as existing -y).
8598 2008-02-09  Christian Franke  <franke@computer.org>
8600         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8601         avoid overwriting previous output.
8602         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8604 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8606         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8607         drawing the menu.
8609 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8611         * commands/sleep.c: New file.
8612         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8613         (sleep_mod_SOURCES): New variable.
8614         (sleep_mod_CFLAGS): Likewise.
8615         (sleep_mod_LDFLAGS): Likewise.
8617 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8619         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8620         situations in which we can deduce the RAID size and the superblock
8621         doesn't match it.
8623 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8625         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8626         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8627         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8629         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8630         and return a grub_diskmemberlist_t composed of physical array members.
8631         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8633         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8634         prototype.
8635         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8636         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8637         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8639         * util/grub-probe.c (probe): Move partmap probing code from here ...
8640         (probe_partmap): ... to here.
8641         (probe): Use probe_partmap() once for the disk we're probing, and
8642         additionally, when such disk contains a memberlist() struct member,
8643         once for each disk that is contained in the structure returned by
8644         memberlist().
8646 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8648         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8649         environment variable to 'all' in order to obtain debug output from
8650         non-util/ code.
8651         * util/i386/pc/grub-setup.c (main): Likewise.
8653 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8655         * disk/raid.c (grub_raid_scan_device): Check for
8656         `array->device[sb.this_disk.number]' rather than for
8657         `array->device[sb.this_disk.number]->name', since the latter is not
8658         guaranteed to be accessible.
8660 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8662         * disk/raid.c: Update copyright.
8663         * fs/cpio.c: Likewise.
8664         * include/grub/raid.h: Likewise.
8665         * loader/i386/pc/multiboot.c: Likewise.
8666         * util/hostfs.c: Likewise.
8668 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8670         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8671         to a grub_disk_t array.
8672         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8673         `device[x]'.
8674         (grub_raid_scan_device): Replace `device[x].name' accesses with
8675         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8677 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8679         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8680         grub_dprintf() calls.
8681         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8682         error message.
8684 2008-02-07  Christian Franke  <franke@computer.org>
8686         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8687         instead of fseek and ftell to support large files.
8688         (grub_hostfs_read): Likewise.
8690 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8692         Patch from Jeroen Dekkers.
8693         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8694         failure, since successfully reading all array members might not be
8695         required.
8697 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8699         * util/grub-probe.c (probe): Simplify partmap probing (with the
8700         assumption that the first word up to the underscore equals to
8701         the module name).
8703 2008-02-06  Christian Franke  <franke@computer.org>
8705         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8706         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8707         last block of a cpio or tar stream.
8708         Check for "TRAILER!!!" instead of any empty data
8709         block to detect last block of a cpio stream.
8710         (grub_cpio_dir): Fix constness of variable np.
8711         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8712         cpio or tar trailer is detected.  This fixes a crash
8713         on open of a non existing file.
8715 2008-02-05  Bean  <bean123ch@gmail.com>
8717         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8718         address of entry.
8719         (grub_multiboot_load_elf64): Likewise.
8720         (grub_multiboot): Initialize mbi structure.
8722         * util/grub-fstest.c: Don't include unused header file script.h.
8724         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8725         of file.
8726         (grub_fstest_SOURCES): Likewise.
8728 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8730         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8731         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8732         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8733         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8735         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8736         (translation_table): Replace hardcoded values with macros
8737         provided by `<grub/term.h>'.
8739         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8740         (keyboard_map): Correct/add a few values, with macros provided
8741         by `<grub/term.h>'.
8742         (keyboard_map_shift): Zero values that don't differ from their
8743         `keyboard_map' equivalents.
8744         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8745         Discard the second scan code that is always sent by Caps lock.
8746         Only use `keyboard_map_shift' when it provides a non-zero value,
8747         otherwise fallback to `keyboard_map'.
8749 2008-02-04  Bean  <bean123ch@gmail.com>
8751         * Makefile.in (enable_grub_fstest): New variable.
8753         * conf/common.rmk (grub_fstest_init.lst): New rule.
8754         (grub_fstest_init.h): Likewise.
8755         (grub_fstest_init.c): Likewise.
8756         (util/grub-fstest.c_DEPENDENCIES): New variable.
8757         (grub_fstest_SOURCES): Likewise.
8759         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8761         * util/grub-fstest.c: New file.
8763 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8765         Make grub-setup handle a separate root device.
8767         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8768         so that the root device can be compared with the destination
8769         device.
8770         When embedding the core image, if the root and destination devices
8771         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8772         0xFF.
8773         When not embedding, set ROOT_DRIVE to 0xFF.
8775 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8777         Add support for having a grub directory in a different drive. This
8778         is still only the data handling part.
8780         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8781         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8782         (grub_root_drive): New variable.
8784         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8785         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8786         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8787         as it was.
8789         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8791         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8792         macro.
8793         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8795         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8796         is bogus, because PXE booting does not specify any drive
8797         correctly.
8799         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8800         am not sure if this is really correct.
8802         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8803         is always identical to the boot drive when booting from a CD.
8805         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8806         longer.
8807         (root_drive): New variable.
8808         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8809         (setup_sectors): Push %dx right after popping it, because %dh will
8810         be modified later.
8811         (copy_buffer): Restore %dx.
8813 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8815         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8816         use `cdboot.img' for cdrom images.
8818 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8820         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8821         only setup gfxterm when `font' command has succeeded.
8823 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8825         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8826         (grub_rescue_cmd_multiboot_loader)
8827         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8829 2008-02-03  Pavel Roskin  <proski@gnu.org>
8831         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8832         %edx and %esi from stack only after grub_gate_a20() is called.
8833         grub_gate_a20() clobbers %edx.
8835 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8837         * configure.ac (AC_INIT): Bumped to 1.96.
8839         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8840         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8841         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8842         video/readers/png.c.
8844 2008-02-03  Bean  <bean123ch@gmail.com>
8846         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8847         (cdboot_img_SOURCES): New variable.
8848         (cdboot_img_ASFLAGS): New variable.
8849         (cdboot_img_LDFLAGS): New variable.
8851         * boot/i386/pc/cdboot.S: New file.
8853         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8854         (cd_count): Likewise.
8855         (grub_biosdisk_get_drive): Add support for cd device.
8856         (grub_biosdisk_call_hook): Likewise.
8857         (grub_biosdisk_iterate): Likewise.
8858         (grub_biosdisk_open): Likewise.
8859         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8860         (grub_biosdisk_rw): Support reading from cd device.
8861         (GRUB_MOD_INIT): Iterate cd devices.
8863         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8864         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8865         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8867         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8869 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8871         * commands/read.c: New file.
8872         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8873         (read_mod_SOURCES): New variable.
8874         (read_mod_CFLAGS): Likewise.
8875         (read_mod_LDFLAGS): Likewise.
8877 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8879         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8880         determining whether menu has to be displayed.
8882 2008-02-02  Marco Gerards  <marco@gnu.org>
8884         * bus/pci.c: New file.
8886         * include/grub/pci.h: Likewise.
8888         * include/grub/i386/pc/pci.h: Likewise.
8890         * commands/lspci.c: Likewise.
8892         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8893         `lspci.mod'.
8894         (pci_mod_SOURCES): New variable.
8895         (pci_mod_CFLAGS): Likewise.
8896         (pci_mod_LDFLAGS): Likewise.
8897         (lspci_mod_SOURCES): Likewise.
8898         (lspci_mod_CFLAGS): Likewise.
8899         (lspci_mod_LDFLAGS): Likewise.
8901 2008-02-02  Bean  <bean123ch@gmail.com>
8903         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8904         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8906         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8907         (grub_xfs_btree_node): New structure.
8908         (grub_xfs_btree_root): New structure.
8909         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8910         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8911         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8912         (GRUB_XFS_EXTENT_SIZE): Likewise.
8913         (grub_xfs_read_block): Support btree format type.
8914         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8915         Use directory block as basic unit.
8917         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8919         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8920         __attribute__ ((__regparm__ (1))).
8922 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8924         Correct a mistake in previous commit.
8926         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8927         top.
8928         (normal/command.c_DEPENDENCIES): New variable.
8930 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8932         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8933         top.
8934         (normal/command.c_DEPENDENCIES): New variable.
8935         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8936         * conf/i386-ieee1275.rmk: Likewise.
8937         * conf/i386-linuxbios.rmk: Likewise.
8938         * conf/i386-pc.rmk: Likewise.
8939         * conf/sparc64-ieee1275.rmk: Likewise.
8940         * conf/powerpc-ieee1275.rmk: Likewise.
8941         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8943         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8945 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8947         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8948         call at beginning of function.
8950 2008-01-31  Pavel Roskin  <proski@gnu.org>
8952         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8953         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8954         (grub_mkrescue_SOURCES): Likewise.
8955         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8957 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8959         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8960         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8961         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8962         (grub_probe_SOURCES): ... to here.
8964         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8965         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8966         * conf/i386-ieee1275.rmk: Likewise.
8967         * conf/i386-linuxbios.rmk: Likewise.
8968         * conf/powerpc-ieee1275.rmk: Likewise.
8970 2008-01-30  Tristan Gingold  <gingold@free.fr>
8972         * kern/rescue.c: Silently accept empty lines.
8974 2008-01-29  Bean  <bean123ch@gmail.com>
8976         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8977         (real_code_2): Code cleanup and change comment style.
8978         (move_memory): Avoid using 32-bit address mode.
8980 2008-01-29  Bean  <bean123ch@gmail.com>
8982         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8983         (png_mod_SOURCES): New variable.
8984         (png_mod_CFLAGS): Likewise.
8985         (png_mod_LDFLAGS): Likewise.
8987         * video/readers/png.c: New file.
8989 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8991         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8992         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8993         `ifndef GRUB_MOD_GAP' hack.
8994         * util/elf/grub-mkimage.c (add_segments): Likewise.
8996 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8998         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8999         `GRUB_MOD_GAP' for platforms in which it's not defined.
9000         * util/elf/grub-mkimage.c (add_segments): Likewise.
9002 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9004         Get grub-emu to build again (including parallel builds).
9006         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9007         Split into ...
9008         (util/grub-emu.c_DEPENDENCIES): ... this, ...
9009         (normal/execute.c_DEPENDENCIES): ... this, ...
9010         (grub-emu_DEPENDENCIES): ... and this.
9012         * conf/i386-efi.rmk: Likewise.
9013         * conf/i386-linuxbios.rmk: Likewise.
9014         * conf/i386-ieee1275.rmk: Likewise.
9015         * conf/powerpc-ieee1275.rmk: Likewise.
9016         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9018 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9020         * NEWS: Add a few items.
9022 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9024         Fix parallel builds with grub-emu.  Based on earlier commit for
9025         grub-probe and grub-setup.
9027         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9028         (util/grub-emu.c_DEPENDENCIES): ... this.
9029         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9030         (util/grub-emu.c_DEPENDENCIES): ... this.
9031         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9032         (util/grub-emu.c_DEPENDENCIES): ... this.
9033         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9034         (util/grub-emu.c_DEPENDENCIES): ... this.
9035         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9036         (util/grub-emu.c_DEPENDENCIES): ... this.
9038 2008-01-27  Pavel Roskin  <proski@gnu.org>
9040         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9041         to create a gap between _end and the modules added to the image
9042         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
9043         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9044         * util/elf/grub-mkimage.c (add_segments): Likewise.
9046 2008-01-26  Pavel Roskin  <proski@gnu.org>
9048         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9049         just return an error.
9051 2008-01-26  Bean  <bean123ch@gmail.com>
9053         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9054         (grub_reiserfs_get_item): Save offset of the next item.
9055         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9057 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9059         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9060         make all filesystem sources appear together (possibly fixing omissions
9061         while at it).
9062         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9063         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9064         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9065         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9067         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
9068         add `kern/file.c'.
9069         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9070         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9071         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9072         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9074         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9075         (probe): Add a sanity check to make sure of our ability to read
9076         requested files when probing for filesystem type.
9078         * genmk.rb: Update copyright year (2007).
9080         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9081         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9082         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9083         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9084         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9085         : Remove function prototypes.
9087 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9089         Revert my previous commits (based on wrong assumption of how grub_errno
9090         works).
9092         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9093         * kern/file.c (grub_file_open): Likewise.
9095 2008-01-24  Pavel Roskin  <proski@gnu.org>
9097         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9098         that hang if GRUB tries to setup colors.
9099         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9100         colors for firmwares that don't support it.
9101         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9102         Recognize Open Hack'Ware, set flags to work around its
9103         limitations.
9105 2008-01-24  Robert Millan  <rmh@aybabtu.com>
9107         * kern/file.c (grub_file_open): Do not account previous failures of
9108         unrelated functions when grub_errno is checked for.
9109         Reported by Oleg Strikov.
9111 2008-01-24  Bean  <bean123ch@gmail.com>
9113         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9114         (grub_ufs_sblock): New member volume name.
9115         (grub_ufs_find_file): Fix string copy bug.
9116         (grub_ufs_label): Implement this function properly.
9118         * fs/hfs.c (grub_hfs_cnid_type): New enum.
9119         (grub_hfs_iterate_records): Use the correct file number for extents
9120         and catalog file. Fix problem in next index calculation.
9121         (grub_hfs_find_node): Replace recursive function call with loop.
9122         (grub_hfs_iterate_dir): Replace recursive function call with loop.
9124 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9126         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9127         `<grub/symbol.h>' and `<grub/multiboot.h>'.
9128         (grub_multiboot2_real_boot): New function prototype.
9130         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9131         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9133         * kern/i386/ieee1275/init.c (grub_os_area_addr)
9134         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9136 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9138         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9139         #ifdef'ed out grub_printf().
9141 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9143         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9144         grub_dprintf calls, since they make "debug=all" mode unusable.
9145         (grub_console_checkkey): Likewise.
9147 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9149         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9150         `term/i386/pc/at_keyboard.c'.
9151         (pkglib_MODULES): Add `serial.mod'.
9152         (serial_mod_SOURCES): New variable.
9153         (serial_mod_CFLAGS): Likewise.
9154         (serial_mod_LDFLAGS): Likewise.
9156         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
9157         `<grub/powerpc/ieee1275/console.h>'.
9158         (grub_keyboard_controller_init): New function prototype.
9159         (grub_console_checkkey): Likewise.
9160         (grub_console_getkey): Likewise.
9162         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9163         keyboard on i386.
9165         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9166         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9168 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9170         * kern/i386/pc/init.c (make_install_device): When memdisk image is
9171         present, "(memdisk)/boot/grub" becomes the default prefix.
9173         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9174         a memdisk tarball with all the modules.  Add --overlay=DIR option that
9175         allows users to overlay additional files into the image.
9177 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9179         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9180         and `machine/memory.h'.
9181         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9182         (_multiboot_mod_SOURCES): New variable.
9183         (_multiboot_mod_CFLAGS): Likewise.
9184         (_multiboot_mod_LDFLAGS): Likewise.
9185         (multiboot_mod_SOURCES): Likewise.
9186         (multiboot_mod_CFLAGS): Likewise.
9187         (multiboot_mod_LDFLAGS): Likewise.
9189         * include/grub/i386/ieee1275/loader.h: New file.
9191         * include/grub/i386/ieee1275/machine.h: Likewise.
9193         * include/grub/i386/ieee1275/memory.h: Likewise.
9195         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9196         variable declaration.
9197         (grub_os_area_size): Likewise.
9199         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9200         (grub_lower_mem, grub_upper_mem): New variables.
9201         (grub_stop_floppy): New function (just to make
9202         grub_multiboot2_real_boot() happy).
9204         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9205         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9206         (grub_stop): New function.
9207         Include `"../realmode.S"' and `"../loader.S"'.
9209         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9210         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9212         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9213         rely on grub_multiboot2_real_boot() for final boot.
9215 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9217         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9218         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9219         device that doesn't look like an SD card.
9220         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9221         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9222         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9223         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9224         found.
9226 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9228         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9229         avoid claiming over our own code.
9231 2008-01-22  Bean  <bean123ch@gmail.com>
9233         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9234         (jpeg_mod_SOURCES): New variable.
9235         (jpeg_mod_CFLAGS): Likewise.
9236         (jpeg_mod_LDFLAGS): Likewise.
9238         * video/readers/jpeg.c : New file.
9240 2008-01-22  Bean  <bean123ch@gmail.com>
9242         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9243         there are no more items.
9245 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9247         * kern/mm.c (grub_mm_init_region): Improve debug message.
9249 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9251         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9252         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9253         address.
9254         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9255         a C macro.
9256         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9257         Indicates start of upper memory.
9258         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9259         (generate_image): Abort when image size is big enough to corrupt
9260         upper memory.
9262         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9263         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9264         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9265         instead of hardcoding 0xA0000.
9266         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9267         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9268         instead of hardcoding 0xA0000.
9270 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9272         * disk/memdisk.c (memdisk_size): New variable.
9273         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9274         `memdisk_size'.
9275         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
9276         image to dynamic memory.
9277         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9278         `memdisk_size'.  Free memdisk block.
9280 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9282         Fix detection of very small filesystems (like tar).
9284         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9285         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9286         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9287         a problem with this disk).
9289 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9291         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9292         on grub_biosdisk_rw_standard() error.
9294 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9296         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9297         recent changes.
9298         * kern/elf.c: Likewise.
9299         * kern/ieee1275/ieee1275.c: Likewise.
9300         * kern/powerpc/ieee1275/openfw.c: Likewise.
9301         * term/ieee1275/ofconsole.c: Likewise.
9303 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9305         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9307         * include/grub/kernel.h (grub_arch_memdisk_addr)
9308         (grub_arch_memdisk_size): Moved from here ...
9310         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9311         (grub_arch_memdisk_size): ... to here.
9313 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9315         Mostly based on bugfix from Bean.
9317         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9318         attribute with hook() parameter.
9319         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9320         declaration.
9321         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9322         attribute with hook() parameter.
9323         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9324         declaration.
9326 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9328         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9329         (pkglib_MODULES): Add `memdisk.mod'.
9330         (memdisk_mod_SOURCES): New variable.
9331         (memdisk_mod_CFLAGS): Likewise.
9332         (memdisk_mod_LDFLAGS): Likewise.
9334         * disk/memdisk.c: New file.
9336         * include/grub/disk.h (grub_disk_dev_id): Add
9337         `GRUB_DISK_DEVICE_MEMDISK_ID'.
9339         * include/grub/i386/pc/kernel.h
9340         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9341         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9342         (grub_kernel_image_size): New variable declaration.
9343         (grub_total_module_size): Likewise.
9344         (grub_memdisk_image_size): Likewise.
9346         * include/grub/i386/pc/memory.h
9347         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9349         * include/grub/kernel.h: Include `<grub/symbol.h>'.
9350         (grub_arch_memdisk_addr): New variable declaration.
9351         (grub_arch_memdisk_size): Likewise.
9353         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9354         (grub_arch_memdisk_size): Likewise.
9356         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9357         (codestart): Replace hardcoded `0x100000' with
9358         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9360         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9361         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
9362         not NULL, append the contents of the file it refers to, at the end of
9363         the compressed kernel image.  Initialize `grub_memdisk_image_size'
9364         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9365         (options): Add "memdisk"|'m' option.
9366         (main): Parse --memdisk|-m option, and pass user-provided path as
9367         parameter to generate_image().
9369 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9371         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9372         grub_dprintf() calls from here ...
9373         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9375 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9377         Fix detection of "real mode" when /options/real-mode? doesn't exist.
9379         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9380         declaration.
9381         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9382         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9383         `GRUB_IEEE1275_FLAG_REAL_MODE'.
9384         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9385         property).
9386         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9387         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9389 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9391         Get rid of confusing function (superseded by
9392         `grub_ieee1275_get_integer_property')
9393         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9394         prototype.
9395         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9396         function.
9397         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9398         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9399         in native endianness from grub_ieee1275_get_integer_property().
9401 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9403         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9404         command after "shut-down", since implementations differ on which
9405         the command for halt is.
9407 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9409         * include/grub/i386/linuxbios/console.h: Add header protection.
9410         (grub_keyboard_controller_init): New function prototype.
9411         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9412         (KEYBOARD_COMMAND_READ): Likewise.
9413         (KEYBOARD_COMMAND_WRITE): Likewise.
9414         (KEYBOARD_SCANCODE_SET1): Likewise.
9415         (grub_keyboard_controller_write): New function.
9416         (grub_keyboard_controller_read): Likewise.
9417         (grub_keyboard_controller_init): Likewise.
9419         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9420         (grub_console_init): On coreboot/LinuxBIOS, call
9421         grub_keyboard_controller_init().
9423 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9425         PowerPC changes provided by Pavel Roskin.
9427         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9428         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9429         don't rely on cmain() doing it.
9430         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9431         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9433 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9435         * include/grub/i386/linuxbios/memory.h
9436         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9437         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9438         receive `table_header' as argument.  Instead, probe for it in the
9439         known memory ranges where it can be present.
9440         (grub_available_iterate): Do not pass a fixed `table_header' address
9441         to grub_linuxbios_table_iterate().
9443 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9445         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9446         * conf/i386-ieee1275.rmk: New file.
9447         * include/grub/i386/ieee1275/console.h: Likewise.
9448         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9449         * include/grub/i386/ieee1275/kernel.h: Likewise.
9450         * include/grub/i386/ieee1275/time.h: Likewise.
9451         * kern/i386/ieee1275/init.c: Likewise.
9452         * kern/i386/ieee1275/startup.S: Likewise.
9454 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9456         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9457         when pointers are 32-bit (but still do set it to one when they are
9458         64-bit).
9460 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9462         * include/grub/ieee1275/ieee1275.h
9463         (grub_ieee1275_get_integer_property): New function prototype.
9465         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9466         (grub_ieee1275_get_integer_property): New function.  Wraps around
9467         grub_ieee1275_get_property() to handle endianness.
9469         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9470         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9471         where appropriate.
9472         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9473         (grub_map): Likewise.
9474         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9476 2008-01-15  Bean  <bean123ch@gmail.com>
9478         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9479         (grub_script_execute_cmdline): Reset grub_errno.
9481         * normal/main.c (read_config_file): Reset grub_errno.
9483         * normal/parse.y (script_init): New.
9484         (script): Move function and menuentry here.
9485         (delimiter): New.
9486         (command): Add delimiter at the end of command.
9487         (commands): Adjust to match the new command.
9488         (commandblock): Remove grub_script_lexer_record_start.
9489         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9490         (if): Use the new commands.
9492         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9494 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9496         * normal/menu.c (run_menu): Move timeout message from here ...
9497         (print_timeout): ... to here.
9498         (run_menu): Use print_timeout() once during initial draw to print
9499         the whole message, and again in every clock tick to update only
9500         the number of seconds.
9502 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9504         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9505         actual size of `available' from grub_ieee1275_get_property(), and
9506         restrict parsing to that bound.
9508 2008-01-15  Christian Franke  <franke@computer.org>
9510         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9511         (argp_program_version): Remove variable.
9512         (argp_program_bug_address): Likewise.
9513         (options): Convert from struct argp_option to struct option.
9514         (struct arguments): Remove.
9515         (parse_opt): Remove.
9516         (usage): New function.
9517         (main): Replace struct args members by simple variables.
9518         Replace argp_parse() by getopt_long().
9519         Add switch to evaluate options.
9520         Add missing "(...)" around root_dev in prefix string.
9522 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9524         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9525         for grub_ieee1275_exit(), in order to improve portability.
9527 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9529         * util/grub.d/10_linux.in (prefix): Define.
9530         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9532 2008-01-13  Pavel Roskin  <proski@gnu.org>
9534         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9535         grub_errno if no errors have been detected.
9537 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9539         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9540         (grub_util_get_dev_abstraction): New function prototype.
9542         * util/getroot.c: Include `<grub/util/getroot.h>'
9543         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9544         (grub_util_get_dev_abstraction): ... here (new function).
9546         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9547         `PRINT_ABSTRACTION'.
9548         (probe): Probe for abstraction type when requested.
9549         (main): Understand `--target=abstraction'.
9551         * util/i386/efi/grub-install.in: Add abstraction module to core
9552         image when it is found to be necessary.
9553         * util/i386/pc/grub-install.in: Likewise.
9554         * util/powerpc/ieee1275/grub-install.in: Likewise.
9556         * util/update-grub_lib.in (font_path): Return system path without
9557         converting to GRUB path.
9558         * util/update-grub.in: Convert system path returned by font_path()
9559         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9560         abstraction module is needed for loading fonts (if any).  Export
9561         that as `GRUB_PRELOAD_MODULES'.
9562         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9563         insmod commands).
9565 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9567         Remove some unused code from reiserfs.
9569         * fs/reiserfs.c (struct grub_reiserfs_key)
9570         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9571         (struct grub_reiserfs_node_body): Removed.
9572         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9573         Likewise.
9574         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9575         Likewise.
9576         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9577         Likewise.
9578         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9579         Likewise.
9580         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9581         Likewise.
9582         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9583         Likewise.
9584         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9585         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9586         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9588 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9590         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9591         Determines if a file is garbage left by packaging systems, etc.
9592         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9593         for processing /etc/grub.d scripts.
9594         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9595         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9596         as a condition for processing Linux images.
9598 2008-01-10  Pavel Roskin  <proski@gnu.org>
9600         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9601         to compile reiserfs.c on PowerPC.
9603 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9605         * kern/device.c (grub_device_iterate): Do not abort device iteration
9606         when one of the devices cannot be opened.
9607         * kern/disk.c (grub_disk_open): Do not account previous failures of
9608         unrelated functions when grub_errno is checked for.
9610 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9612         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9613         `! grub_linux_is_bzimage', change order of address comparison to make
9614         it more intuitive, and improve "too big zImage" error message.
9616 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9618         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9619         `$(update-grub_DATA)'.
9620         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9621         targets.
9623 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9625         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9626         which instruction is modified by grub-setup during installation
9627         (since it wasn't obvious by only looking at this file).
9629 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9631         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9632         listing actual TODO items.
9634 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9636         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9637         correctly.
9638         (grub_reiserfs_get_key_offset): Likewise.
9639         (grub_reiserfs_set_key_offset): Likewise.
9640         (grub_reiserfs_set_key_type): Likewise.
9641         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9643         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9644         better to remove the bitfield version completely.
9646 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9648         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9649         allocated from the heap, due to the fshelp implementation.
9650         (grub_reiserfs_dir): Free NODE, due to the same reason.
9652 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9654         Mostly from Vincent Pelletier:
9656         * fs/reiserfs.c: New file.
9658         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9659         (reiserfs_mod_SOURCES): New variable.
9660         (reiserfs_mod_CFLAGS): Likewise.
9661         (reiserfs_mod_LDFLAGS): Likewise.
9663         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9664         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9665         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9666         normal/color.c.
9668 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9670         * normal/color.c: Remove `<grub/env.h>'.
9672 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9674         * include/grub/normal.h: Include <grub/env.h>.
9676 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9678         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9679         usage example with `(hd0,1)'.
9680         Reported by Samuel Thibault.
9682 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9684         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9685         (grub_linux_boot_zimage): Rename to ...
9686         (grub_linux_boot): ... this.
9687         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9688         (grub_linux_boot_zimage): Conditionalize zImage copy.
9690         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9691         (grub_linux_boot_bzimage): Remove prototype.
9692         (grub_linux_boot_zimage): Rename to ...
9693         (grub_linux_boot): ... this.
9695         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9696         (grub_linux_boot): Remove function.
9698 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9700         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9701         (grub_env_write_color_highlight): Likewise.
9702         (grub_wait_after_message): Likewise.
9704         * normal/color.c: New file.
9706         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9707         (normal_mod_DEPENDENCIES): Likewise.
9709         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9710         (normal_mod_DEPENDENCIES): Likewise.
9712         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9713         (normal_mod_DEPENDENCIES): Likewise.
9715         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9716         (normal_mod_DEPENDENCIES): Likewise.
9718         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9719         for waiting after a message is printed.
9720         * normal/main.c (read_config_file): Likewise.
9721         (grub_normal_init): Register grub_env_write_color_normal() and
9722         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9723         `color_highlight' variables as global.
9725         * normal/menu.c (grub_wait_after_message): New function.
9726         (grub_color_menu_normal): New variable.  Replaces ...
9727         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9728         (grub_color_menu_highlight): New variable.  Replaces ...
9729         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9730         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9731         `GRUB_TERM_COLOR_STANDARD'.
9732         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9733         `normal_code' and `highlight_code' to `old_color_normal' and
9734         `old_color_highlight', respectively.
9735         (grub_menu_init_page): Update colors when drawing the menu, based on
9736         `menu_color_normal' and `menu_color_highlight' variables.
9737         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9738         a message is printed.
9740 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9742         * kern/env.c (grub_env_context_open): Propagate hooks for global
9743         variables to new context.
9745         * kern/main.c (grub_set_root_dev): Export `root' variable.
9747 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9749         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9750         discs unconditionally, since udev and others have options to provide
9751         them.
9753 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9755         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9757 2008-01-04  Christian Franke  <franke@computer.org>
9759         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9760         of eisa_mmap.
9762 2008-01-03  Pavel Roskin  <proski@gnu.org>
9764         * kern/i386/linuxbios/init.c: Put "void" to all function
9765         declarations with no arguments.
9766         * kern/powerpc/ieee1275/init.c: Likewise.
9767         * term/i386/pc/at_keyboard.c: Likewise.
9768         * term/i386/pc/vga_text.c: Likewise.
9769         * util/grub-mkdevicemap.c: Likewise.
9771 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9773         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9774         message when loaded image is out of bounds.
9775         (grub_multiboot_load_elf64): Likewise.
9777 2008-01-02  Pavel Roskin  <proski@gnu.org>
9779         * util/grub.d/10_linux.in: Try version without ".old" when
9780         looking for initrd.  It's better to use initrd from the newer
9781         kernel of the same version than no initrd at all.
9783 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9785         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9787 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9789         * include/grub/video.h: Added grub_video_unmap_color and
9790         grub_video_get_active_render_target.
9791         (grub_video_adapter): Added unmap_color and get_active_render_target.
9793         * video/video.c: Added grub_video_unmap_color and
9794         grub_video_get_active_render_target.
9795         (grub_video_get_info): Changed method to accept NULL pointer as an
9796         argument to allow detection of active video adapter.
9798         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9799         grub_video_vbe_unmap_color_int.
9800         Added grub_video_vbe_unmap_color and
9801         grub_video_vbe_get_active_render_target.
9802         (grub_video_vbe_adapter): Added unmap_color and
9803         get_active_render_target.
9805         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9806         with grub_video_vbe_unmap_color_int.
9808         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9809         (DEFAULT_NORMAL_COLOR): Likewise.
9810         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9811         (DEFAULT_FG_COLOR): Removed.
9812         (DEFAULT_BG_COLOR): Likewise.
9813         (DEFAULT_CURSOR_COLOR): Changed value.
9814         (grub_virtual_screen): Added standard_color_setting,
9815         normal_color_setting, highlight_color_setting and term_color.
9816         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9817         (bitmap_width): Added.
9818         (bitmap_height): Likewise.
9819         (bitmap): Likewise.
9820         (set_term_color): Likewise.
9821         (grub_virtual_screen_setup): Changed to use new terminal coloring
9822         settings.
9823         (grub_gfxterm_init): Added init for bitmap.
9824         (grub_gfxterm_fini): Added destroy for bitmap.
9825         (redraw_screen_rect): Updated to use background bitmap and new
9826         terminal coloring.
9827         (scroll_up): Added optimization for case when there is no bitmap.
9828         (grub_gfxterm_cls): Fixed to use correct background color.
9829         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9830         coloring.
9831         (grub_virtual_screen_setcolor): Likewise.
9832         (grub_virtual_screen_getcolor): Added.
9833         (grub_gfxterm_background_image_cmd): Likewise.
9834         (grub_video_term): Added setcolor and getcolor.
9835         (MOD_INIT): Added registration of background_image command.
9836         (MOD_TERM): Added unregistration for background_image command.
9838 2007-12-30  Pavel Roskin  <proski@gnu.org>
9840         * loader/multiboot_loader.c: Fix multiboot command
9841         unregistration.  Fix all typos in the word "multiboot".
9843 2007-12-29  Pavel Roskin  <proski@gnu.org>
9845         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9846         support for initrd names used in Fedora.
9848 2007-12-26  Bean  <bean123ch@gmail.com>
9850         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9851         (cpio_mod_SOURCES): New variable.
9852         (cpio_mod_CFLAGS): Likewise.
9853         (cpio_mod_LDFLAGS): Likewise.
9855         * fs/cpio.c: New file.
9857         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9859         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9861         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9863         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9865 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9867         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9868         (grub_getcolor): New function.
9870         * kern/term.c (grub_getcolor): New function.
9871         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9872         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9873         (print_entry): Set normal and highlight colors to
9874         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9875         respectively, before printing and restore them to old
9876         values afterwards.
9877         (grub_menu_init_page): Likewise.  Fill an additional colored space
9878         that would otherwise be left blank.
9880         * term/efi/console.c (grub_console_getcolor): New function.
9881         (struct grub_console_term.getcolor): New variable.
9882         * term/i386/pc/console.c (grub_console_getcolor): New function.
9883         (struct grub_console_term.getcolor): New variable.
9884         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9885         (struct grub_console_term.getcolor): New variable.
9887         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9888         (struct grub_console_term.setcolor): Remove variable.
9889         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9890         (struct grub_console_term.setcolor): Remove variable.
9891         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9892         (struct grub_console_term.setcolor): Remove variable.
9893         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9894         (struct grub_console_term.setcolor): Remove variable.
9896 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9898         * configure.ac: Search for possible unifont.hex locations, and
9899         define UNIFONT_HEX if found.
9901         * Makefile.in (UNIFONT_HEX): Define variable.
9902         (DATA): Rename to ...
9903         (PKGLIB): ... this.  Update all users.
9904         (PKGDATA): New variable.
9905         (pkgdata_IMAGES): Rename to ...
9906         (pkglib_IMAGES): ... this. Update all users.
9907         (pkgdata_MODULES): Rename to ...
9908         (pkglib_MODULES): ... this. Update all users.
9909         (pkgdata_PROGRAMS): Rename to ...
9910         (pkglib_PROGRAMS): ... this. Update all users.
9911         (pkgdata_DATA): Rename to ...
9912         (pkglib_DATA): ... this. Update all users.
9913         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9914         (unicode.pff, ascii.pff): New rules.
9915         (all-local): Add `$(PKGDATA)' dependency.
9916         (install-local): Process `$(PKGDATA)'.
9918         * util/update-grub_lib.in (font_path): Search for *.pff files in
9919         a few more locations, including `${pkgdata}'.
9921 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9923         Patch from Bean  <bean123ch@gmail.com>:
9924         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9925         `size'.
9927 2007-12-21  Bean  <bean123ch@gmail.com>
9929         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9930         (ntfscomp_mod_SOURCES): New variable.
9931         (ntfscomp_mod_CFLAGS): Likewise.
9932         (ntfscomp_mod_LDFLAGS): Likewise.
9934         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9935         (grub_probe_SOURCES): Likewise.
9936         (grub_emu_SOURCES): Likewise.
9938         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9939         (grub_emu_SOURCES): Likewise.
9941         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9942         (grub_emu_SOURCES): Likewise.
9944         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9945         (grub_emu_SOURCES): Likewise.
9947         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9948         (read_run_list): Renamed to grub_ntfs_read_run_list.
9949         (decomp_nextvcn): Moved to ntfscomp.c.
9950         (decomp_getch): Likewise.
9951         (decomp_get16): Likewise.
9952         (decomp_block): Likewise.
9953         (read_block): Likewise.
9954         (read_data): Partially moved to ntfscomp.c.
9955         (fixup): Change unsigned to grub_uint16_t.
9956         (read_mft): Change unsigned long to grub_uint32_t.
9957         (read_attr): Likewise.
9958         (read_data): Likewise.
9959         (read_run_data): Likewise.
9960         (read_run_list): Likewise.
9961         (read_mft): Likewise.
9963         * fs/ntfscomp.c: New file.
9965         * include/grub/ntfs.h: New file.
9967 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9969         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9970         IDE disk check, since Linux is known to support 20 IDE disks.
9971         Reported by Colin Watson.
9973 2007-12-15  Bean  <bean123ch@gmail.com>
9975         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9976         (lnxboot_img_SOURCES): New variable.
9977         (lnxboot_img_ASFLAGS): Likewise.
9978         (lnxboot_img_LDFLAGS): Likewise.
9980         * boot/i386/pc/lnxboot.S: New file.
9982 2007-11-24  Pavel Roskin  <proski@gnu.org>
9984         * configure.ac: Test if '--build-id=none' is supported by the
9985         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9986         objcopy to generate incorrect binary files (binutils
9987         2.17.50.0.18-1 as shipped by Fedora 8).
9988         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9989         linking, so that build ID doesn't break the test.
9991 2007-11-24  Pavel Roskin  <proski@gnu.org>
9993         * include/grub/i386/time.h: use "void" in the argument list
9994         of grub_cpu_idle().
9995         * include/grub/powerpc/time.h: Likewise.
9996         * include/grub/sparc64/time.h: Likewise.
9998 2007-11-18  Christian Franke  <franke@computer.org>
10000         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10001         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10002         This fixes the problem that function keys did not work in grub-emu.
10004 2007-11-18  Christian Franke  <franke@computer.org>
10006         * disk/host.c (grub_host_open): Remove attribute unused from
10007         name parameter. Add check for "host". This fixes the problem
10008         that grub-emu does not find partitions.
10010 2007-11-18  Christian Franke  <franke@computer.org>
10012         * util/hostfs.c (is_dir): New function.
10013         (grub_hostfs_dir):  Handle missing dirent.d_type case.
10014         (grub_hostfs_read): Add missing fseek().
10015         (grub_hostfs_label): Clear label pointer.  This fixes a crash
10016         of grub-emu on "ls (host)".
10018 2007-11-18  Christian Franke  <franke@computer.org>
10020         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10021         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10022         to 64 bit boundary by default.
10024 2007-11-18  Bean  <bean123ch@gmail.com>
10026         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10027         (hexdump_mod_SOURCES): New variable.
10028         (hexdump_mod_CFLAGS): Likewise.
10029         (hexdump_mod_LDFLAGS): Likewise.
10031         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10033         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10035         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10037         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10039         * include/grub/hexdump.h: New file.
10041         * commands/hexdump.c: New file.
10043 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10045         * commands/i386/pc/play.c (beep_off): Switch order of arguments
10046         in grub_outb() calls.
10047         (beep_on): Likewise.
10049 2007-11-10  Christian Franke  <franke@computer.org>
10051         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10052         (grub_menu_run): Likewise.
10054 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10056         * include/grub/i386/efi/machine.h: New file.
10057         * include/grub/i386/linuxbios/machine.h: Likewise.
10058         * include/grub/i386/pc/machine.h: Likewise.
10059         * include/grub/powerpc/ieee1275/machine.h: Likewise.
10060         * include/grub/sparc64/ieee1275/machine.h: Likewise.
10062         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10063         (serial_hw_io_addr): New variable.
10064         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10065         instead of `(unsigned short *) 0x400'.
10067 2007-11-10  Bean  <bean123ch@gmail.com>
10069         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10071 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10073         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10074         (vga_mod_SOURCES): Added.
10075         (vga_mod_CFLAGS): Likewise.
10076         (vga_mod_LDFLAGS): Likewise.
10078         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10079         grub_outb() calls.
10080         (set_map_mask): Likewise.
10081         (set_read_map): Likewise.
10082         (set_read_address): Likewise.
10083         (vga_font): Removed variable.
10084         (get_vga_glyph): Removed function.
10085         (invalidate_char): Likewise.
10086         (write_char): Changed to use grub_font_get_glyph() for font
10087         information.
10088         (grub_vga_putchar): Likewise.
10089         (grub_vga_getcharwidth): Likewise.
10091 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10093         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10094         flags.
10095         (pxeboot_img_LDFLAGS): Likewise.
10096         (diskboot_img_LDFLAGS): Likewise.
10097         (kernel_img_LDFLAGS): Likewise.
10099 2007-11-06  Robert Millan  <rmh@aybabtu.com>
10101         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10102         in grub_outb() calls.
10103         (serial_hw_init): Likewise.
10105 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10107         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10108         spaces.  Skip non-regular files.
10110 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10112         * kern/disk.c (grub_disk_firmware_fini)
10113         (grub_disk_firmware_is_tainted): New variables.
10115         * include/grub/disk.h (grub_disk_firmware_fini)
10116         (grub_disk_firmware_is_tainted): Likewise.
10118         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10119         (grub_disk_biosdisk_fini): ... to here.
10120         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10121         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10122         is set.  Register grub_disk_biosdisk_fini() in
10123         `grub_disk_firmware_fini'.
10125         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10126         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10127         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10128         to finish existing firmware disk interface.
10130         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10131         (ata_mod_SOURCES): New variable.
10132         (ata_mod_CFLAGS): Likewise.
10133         (ata_mod_LDFLAGS): Likewise.
10135 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10137         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
10138         (grub_ata_wait): Reimplement using grub_millisleep().
10140         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10141         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10143 2007-11-03  Marco Gerards  <marco@gnu.org>
10145         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10146         (CRTC_ADDR_PORT): New macro.
10147         (CRTC_DATA_PORT): Likewise.
10148         (CRTC_CURSOR): Likewise.
10149         (CRTC_CURSOR_ADDR_HIGH): Likewise.
10150         (CRTC_CURSOR_ADDR_LOW): Likewise.
10151         (update_cursor): New function.
10152         (grub_console_real_putchar): Call `update_cursor'.
10153         (grub_console_gotoxy): Likewise.
10154         (grub_console_cls): Set the default color when clearing the
10155         screen.
10156         (grub_console_setcursor): Implemented.
10158 2007-11-03  Marco Gerards  <marco@gnu.org>
10160         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10161         become activate.
10162         (grub_ata_pio_write): Likewise.
10164         (grub_atapi_identify): Wait after issuing an ATA command.
10165         (grub_atapi_packet): Likewise.
10166         (grub_ata_identify): Likewise.
10167         (grub_ata_readwrite): Likewise.
10169 2007-11-03  Marco Gerards  <marco@gnu.org>
10171         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10172         (grub_ata_pio_write): Likewise.
10173         (grub_ata_readwrite): Use `grub_error', instead of
10174         returning `grub_errno'.
10176 2007-11-03  Marco Gerards  <marco@gnu.org>
10178         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10179         grub_ata_pio_write once for every single sector, instead of for
10180         multiple sectors.
10182 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10184         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10186         * conf/i386-linuxbios.rmk: New file.
10188         * kern/i386/pc/hardware.c: Likewise.
10189         * term/i386/pc/at_keyboard.c: Likewise.
10190         * term/i386/pc/vga_text.c: Likewise.
10192         * include/grub/i386/linuxbios/boot.h: Likewise.
10193         * include/grub/i386/linuxbios/console.h: Likewise.
10194         * include/grub/i386/linuxbios/init.h: Likewise.
10195         * include/grub/i386/linuxbios/kernel.h: Likewise.
10196         * include/grub/i386/linuxbios/loader.h: Likewise.
10197         * include/grub/i386/linuxbios/memory.h: Likewise.
10198         * include/grub/i386/linuxbios/serial.h: Likewise.
10199         * include/grub/i386/linuxbios/time.h: Likewise.
10201         * kern/i386/linuxbios/init.c: Likewise.
10202         * kern/i386/linuxbios/startup.S: Likewise.
10203         * kern/i386/linuxbios/table.c: Likewise.
10205 2007-10-31  Marco Gerards  <marco@gnu.org>
10207         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10208         (ata_mod_SOURCES): New variable.
10209         (ata_mod_CFLAGS): Likewise.
10210         (ata_mod_LDFLAGS): Likewise.
10212         * disk/ata.c: New file.
10214         * include/grub/disk.h (grub_disk_dev_id): Add
10215         `GRUB_DISK_DEV_ATA_ID'.
10217 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10219         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10220         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10222         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10223         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10225         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10226         `<grub/types.h>'.
10228         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10230 2007-10-27  Robert Millan  <rmh@aybabtu.com>
10232         * include/grub/types.h (ULONG_MAX): Define macro.
10234 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10236         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
10237         `"../realmode.S"'.
10238         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
10240 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10242         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10243         (pkgdata_MODULES): Add `biosdisk.mod'.
10244         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10245         variables.
10247         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10248         (grub_biosdisk_init): Replace with ...
10249         (GRUB_MOD_INIT(biosdisk)): ... this.
10250         (grub_biosdisk_fini): Replace with ...
10251         (GRUB_MOD_FINI(biosdisk)): ... this.
10253         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10254         (grub_machine_init): Remove call to grub_biosdisk_init().
10255         (grub_machine_fini): Remove call to grub_machine_fini().
10257         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10259 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10261         * include/grub/time.h: New file.
10262         * include/grub/i386/time.h: Likewise.
10263         * include/grub/powerpc/time.h: Likewise.
10264         * include/grub/sparc64/time.h: Likewise.
10266         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10267         instances to ...
10268         (KERNEL_MACHINE_TIME_HEADER): ... this.
10269         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10270         instances to ...
10271         (KERNEL_MACHINE_TIME_HEADER): ... this.
10272         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10273         instances to ...
10274         (KERNEL_MACHINE_TIME_HEADER): ... this.
10276         * kern/i386/efi/init.c: Include `<grub/time.h>'.
10277         (grub_millisleep): New function.
10278         * kern/i386/pc/init.c: Include `<grub/time.h>'.
10279         (grub_millisleep): New function.
10280         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10281         Remove `grub/machine/time.h' include.
10282         (grub_millisleep): New function.
10283         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10284         Remove `grub/machine/time.h' include.
10285         (grub_millisleep): New function.
10287         * include/grub/misc.h (grub_div_roundup): New function.
10289         * kern/misc.c: Include `<grub/time.h>'.
10290         (grub_millisleep_generic): New function.
10292         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10293         Add `time.h'.
10294         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10295         Add `time.h'.
10296         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10297         `machine/time.h'.  Add `time.h'.
10298         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10300 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10302         * include/grub/misc.h (grub_max): New function.
10304 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10306         * util/misc.c (grub_util_info): Call fflush() before returning.
10308 2007-10-20  Robert Millan  <rmh@aybabtu.com>
10310         * genmk.rb (Image): Copy `extra_flags' from here ...
10311         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
10313         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10314         to `argc' and `args' arguments.
10316 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10318         * kern/i386/loader.S: New file.
10320         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10321         * kern/i386/loader.S (grub_linux_prot_size)... to here.
10322         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10323         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10324         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10325         * kern/i386/loader.S (grub_linux_real_addr)... to here.
10326         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10327         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10328         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10329         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10330         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10331         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10332         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10333         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10335         * kern/i386/realmode.S: New file.
10337         * kern/i386/pc/startup.S (protstack): Moved from here ...
10338         * kern/i386/realmode.S (protstack)... to here.
10339         * kern/i386/pc/startup.S (gdt): Moved from here ...
10340         * kern/i386/realmode.S (gdt)... to here.
10341         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10342         * kern/i386/realmode.S (prot_to_real)... to here.
10344         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10345         `kern/i386/realmode.S'.
10347 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10349         * include/grub/i386/loader.h: New file.
10351         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10352         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10353         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10354         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10355         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10356         * include/grub/i386/loader.h (grub_linux_prot_size)
10357         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10358         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10359         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10360         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10362         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10364 2007-10-15  Robert Millan  <rmh@aybabtu.com>
10366         * normal/misc.c (grub_normal_print_device_info): Do not probe for
10367         filesystem when dev->disk is unset.
10368         Do probe for filesystem even when dev->disk->has_partitions is set.
10369         In case a filesystem is found, always report it.
10370         In case it isn't, if dev->disk->has_partitions is set, report that
10371         a partition table was found instead of reporting that no filesystem
10372         could be identified.
10374 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10376         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10377         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10379         * include/grub/types.h (grub_host_to_target16): New macro.
10380         (grub_host_to_target32): Likewise.
10381         (grub_host_to_target64): Likewise.
10382         (grub_target_to_host16): Likewise.
10383         (grub_target_to_host32): Likewise.
10384         (grub_target_to_host64): Likewise.
10386         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10387         Renamed from to ...
10388         (GRUB_MOD_ALIGN): ...this.  Update all users.
10390         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10391         grub_host_to_target32.
10392         Replace grub_be_to_cpu32 with grub_target_to_host32.
10393         (load_modules): Likewise.
10394         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10395         Replace grub_be_to_cpu32 with grub_target_to_host32.
10396         Replace grub_cpu_to_be16 with grub_host_to_target16.
10397         Replace grub_cpu_to_be32 grub_host_to_target32.
10399 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10401         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10402         * util/elf/grub-mkimage.c: ... here.
10404         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
10405         `util/powerpc/ieee1275/grub-mkimage.c'.
10407 2007-10-07  Robert Millan  <rmh@aybabtu.com>
10409         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10410         and make it easier to figure out.
10411         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10412         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10413         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10414         leave us with less than HEAP_MIN_SIZE total heap.
10415         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10417 2007-10-03  Robert Millan  <rmh@aybabtu.com>
10419         * include/grub/i386/io.h: New file.
10420         * commands/i386/pc/play.c (inb): Removed.
10421         (outb): Removed.
10422         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10423         with grub_outb().
10424         * term/i386/pc/serial.c  (inb): Removed.
10425         (outb): Removed.
10426         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10427         with grub_outb().
10428         * term/i386/pc/vga.c  (inb): Removed.
10429         (outb): Removed.
10430         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10431         with grub_outb().
10433 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10435         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10436         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10437         Reported by Marcin Kurek.
10439 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10441         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10442         SmartFirmware version updates (as released by Sven Luther), and avoid
10443         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10444         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10445         known broken.
10447 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10449         From Hitoshi Ozeki:
10450         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10451         when merging two regions.
10453 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10455         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10456         * normal/completion.c (grub_normal_do_completion): Likewise.
10457         Reported by Hitoshi Ozeki.
10459 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10461         Do not use devices at boot in chainloading.
10463         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10464         (boot_part_addr): Likewise.
10465         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10466         with BOOT_DRIVE and BOOT_PART_ADDR.
10467         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10468         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10470 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10472         Patch from Simon Peter <dn.tlp@gmx.net>:
10473         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10474         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10475         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10476         util/i386/pc/grub-setup.c_DEPENDENCIES.
10477         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10478         util/grub-probe.c_DEPENDENCIES.
10479         * conf/powerpc-ieee1275.rmk: Likewise.
10481 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10483         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10484         to tell grub-mkdevicemap how to name devices.
10485         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10486         feature).
10488         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10489         util/i386/get_disk_name.c.
10490         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10491         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10492         util/ieee1275/get_disk_name.c.
10494         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10496         * DISTLIST: Add util/i386/get_disk_name.c and
10497         util/ieee1275/get_disk_name.c.
10499         * util/grub-mkdevicemap.c: Replace device naming logic with
10500         grub_util_get_disk_name() calls.
10502 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10504         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10505         (so that it works for both plural and singular quantities).
10507 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10509         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10510         so that [xz] isn't taken into account when determining order.
10512 2007-08-02  Marco Gerards  <marco@gnu.org>
10514         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10515         `include/multiboot2.h', `include/grub/elfload.h',
10516         `include/multiboot.h', `include/grub/multiboot.h',
10517         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10518         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10519         `kern/elf.c', `loader/multiboot_loader.c',
10520         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10521         `loader/i386/pc/multiboot2.c',
10522         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10523         `util/i386/pc/grub-mkrescue.in'.  Remove
10524         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10525         `include/grub/i386/pc/util/biosdisk.h' and
10526         `include/grub/powerpc/ieee1275/multiboot.h'.
10528 2007-08-02  Bean  <bean123ch@gmail.com>
10530         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10531         (ntfs_mod_SOURCES): New variable.
10532         (ntfs_mod_CFLAGS): Likewise.
10533         (ntfs_mod_LDFLAGS): Likewise.
10535         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10536         (grub_probe_SOURCES): Likewise.
10537         (grub_emu_SOURCES): Likewise.
10539         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10540         (grub_emu_SOURCES): Likewise.
10542         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10543         (grub_emu_SOURCES): Likewise.
10545         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10547         * fs/ntfs.c: New file.
10549 2007-08-02  Bean  <bean123ch@gmail.com>
10551         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10553         * file.h (grub_file): Likewise.
10555         * fshelp.h (grub_fshelp_read_file): Likewise.
10557         * util/i386/pc/grub-setup.c (setup): Likewise.
10558         (save_first_sector): Likewise.
10559         (save_blocklists): Likewise.
10561         * fs/affs.c (grub_affs_read_file): Likewise.
10563         * fs/ext2.c (grub_ext2_read_file): Likewise.
10565         * fs/fat.c (grub_fat_read_data): Likewise.
10567         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10569         * fs/hfs.c (grub_hfs_read_file): Likewise.
10571         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10573         * fs/jfs.c (grub_jfs_read_file): Likewise.
10575         * fs/minix.c (grub_minix_read_file): Likewise.
10577         * fs/sfs.c (grub_sfs_read_file): Likewise.
10579         * fs/ufs.c (grub_ufs_read_file): Likewise.
10581         * fs/xfs.c (grub_xfs_read_file): Likewise.
10583         * command/blocklist.c (read_blocklist): Likewise.
10584         (print_blocklist): Likewise.
10586 2007-08-02  Marco Gerards  <marco@gnu.org>
10588         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10589         `util/hostfs.c'.
10591         * disk/host.c: New file.
10593         * util/hostfs.c: Likewise.
10595         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10596         return `GRUB_ERR_BAD_FS'.
10597         * fs/sfs.c (grub_sfs_mount): Likewise.
10598         * fs/xfs.c (grub_xfs_mount): Likewise.
10600         * include/grub/disk.h (enum grub_disk_dev_id): Add
10601         `GRUB_DISK_DEVICE_HOST_ID'.
10603         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10605 2007-07-24  Jerone Young  <jerone@gmail.com>
10607         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10608         modules for compilation.
10609         * conf/powerpc-ieee1275.rmk: Likewise.
10611         * include/multiboot.h: Move multiboot definitions to one file. Rename
10612         many definitions to not get grub specific.
10613         * include/multiboot2.h: Create header with multiboot 2 definitions.
10614         * include/grub/multiboot.h: Header for grub specific function
10615         prototypes and definitions.
10616         * include/grub/multiboot2.h: Likewise.
10617         * include/grub/multiboot_loader.h: Likewise.
10618         * include/grub/i386/pc/multiboot.h: Removed.
10619         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10621         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10622         and 2 to allow for one multiboot and module commands.
10623         * loader/multiboot2.c: Add multiboot2 functionality.
10624         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10625         and definition names.
10626         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10627         2 functions.
10628         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10629         ieee1275 specific multiboot2 code.
10631         * kern/i386/pc/startup.S: Change headers and definition names for
10632         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10634 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10636         * geninitheader.sh: Process file specified in first parameter rather
10637         than hardcoding grub_modules_init.lst.
10638         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10639         than hardcoding grub_modules_init.h.
10641         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10642         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10643         grub_probe_init.[ch] and grub_setup_init.[ch].
10645         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10646         grub_modules_init.h with grub_emu_init.h.
10647         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10648         grub_probe_init.[ch] files.
10649         * conf/i386-efi.rmk: Likewise.
10650         * conf/i386-pc.rmk: Likewise.
10651         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10652         grub_setup_init.[ch] files.
10654         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10655         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10656         to initialize modules rather than a list of hardcoded functions.
10657         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10658         grub_init_all() to initialize modules rather than a list of hardcoded
10659         functions.
10661 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10663         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10664         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10666 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10668         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10669         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10670         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10671         flag when running on SmartFirmware.
10672         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10673         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10674         was set.
10676         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10677         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10678         rather than decreasing it.
10680         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10681         there's not enough space to do it, fail in the same way as when it
10682         can't be done because there are no partitions.
10684         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10685         when nvsetenv failed.
10687 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10689         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10690         because this rule is automatically generated.
10691         (grub-mkrescue): Removed for the same reason as above.
10693 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10695         Migrate to GNU General Public License Version 3.
10697         * COPYING: Replaced with the plain text version of GPLv3.
10699         * config.guess: Updated from gnulib.
10700         * config.sub: Likewise.
10702         * geninit.sh: Output a GPLv3 copyright notice.
10703         * geninitheader.sh: Likewise.
10704         * genmodsrc.sh: Likewise.
10705         * gensymlist.sh.in: Likewise.
10707         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10708         * boot/i386/pc/diskboot.S: Likewise.
10709         * boot/i386/pc/pxeboot.S: Likewise.
10710         * commands/blocklist.c: Likewise.
10711         * commands/boot.c: Likewise.
10712         * commands/cat.c: Likewise.
10713         * commands/cmp.c: Likewise.
10714         * commands/configfile.c: Likewise.
10715         * commands/echo.c: Likewise.
10716         * commands/help.c: Likewise.
10717         * commands/ls.c: Likewise.
10718         * commands/search.c: Likewise.
10719         * commands/terminal.c: Likewise.
10720         * commands/test.c: Likewise.
10721         * commands/videotest.c: Likewise.
10722         * commands/i386/cpuid.c: Likewise.
10723         * commands/i386/pc/halt.c: Likewise.
10724         * commands/i386/pc/play.c: Likewise.
10725         * commands/i386/pc/reboot.c: Likewise.
10726         * commands/i386/pc/vbeinfo.c: Likewise.
10727         * commands/i386/pc/vbetest.c: Likewise.
10728         * commands/ieee1275/halt.c: Likewise.
10729         * commands/ieee1275/reboot.c: Likewise.
10730         * commands/ieee1275/suspend.c: Likewise.
10731         * disk/loopback.c: Likewise.
10732         * disk/lvm.c: Likewise.
10733         * disk/raid.c: Likewise.
10734         * disk/efi/efidisk.c: Likewise.
10735         * disk/i386/pc/biosdisk.c: Likewise.
10736         * disk/ieee1275/ofdisk.c: Likewise.
10737         * font/manager.c: Likewise.
10738         * fs/affs.c: Likewise.
10739         * fs/ext2.c: Likewise.
10740         * fs/fat.c: Likewise.
10741         * fs/fshelp.c: Likewise.
10742         * fs/hfs.c: Likewise.
10743         * fs/hfsplus.c: Likewise.
10744         * fs/iso9660.c: Likewise.
10745         * fs/jfs.c: Likewise.
10746         * fs/minix.c: Likewise.
10747         * fs/sfs.c: Likewise.
10748         * fs/ufs.c: Likewise.
10749         * fs/xfs.c: Likewise.
10750         * hello/hello.c: Likewise.
10751         * include/grub/acorn_filecore.h: Likewise.
10752         * include/grub/arg.h: Likewise.
10753         * include/grub/bitmap.h: Likewise.
10754         * include/grub/boot.h: Likewise.
10755         * include/grub/cache.h: Likewise.
10756         * include/grub/device.h: Likewise.
10757         * include/grub/disk.h: Likewise.
10758         * include/grub/dl.h: Likewise.
10759         * include/grub/elfload.h: Likewise.
10760         * include/grub/env.h: Likewise.
10761         * include/grub/err.h: Likewise.
10762         * include/grub/file.h: Likewise.
10763         * include/grub/font.h: Likewise.
10764         * include/grub/fs.h: Likewise.
10765         * include/grub/fshelp.h: Likewise.
10766         * include/grub/gzio.h: Likewise.
10767         * include/grub/hfs.h: Likewise.
10768         * include/grub/kernel.h: Likewise.
10769         * include/grub/loader.h: Likewise.
10770         * include/grub/lvm.h: Likewise.
10771         * include/grub/misc.h: Likewise.
10772         * include/grub/mm.h: Likewise.
10773         * include/grub/net.h: Likewise.
10774         * include/grub/normal.h: Likewise.
10775         * include/grub/parser.h: Likewise.
10776         * include/grub/partition.h: Likewise.
10777         * include/grub/pc_partition.h: Likewise.
10778         * include/grub/raid.h: Likewise.
10779         * include/grub/rescue.h: Likewise.
10780         * include/grub/script.h: Likewise.
10781         * include/grub/setjmp.h: Likewise.
10782         * include/grub/symbol.h: Likewise.
10783         * include/grub/term.h: Likewise.
10784         * include/grub/terminfo.h: Likewise.
10785         * include/grub/tparm.h: Likewise.
10786         * include/grub/types.h: Likewise.
10787         * include/grub/video.h: Likewise.
10788         * include/grub/efi/api.h: Likewise.
10789         * include/grub/efi/chainloader.h: Likewise.
10790         * include/grub/efi/console.h: Likewise.
10791         * include/grub/efi/console_control.h: Likewise.
10792         * include/grub/efi/disk.h: Likewise.
10793         * include/grub/efi/efi.h: Likewise.
10794         * include/grub/efi/pe32.h: Likewise.
10795         * include/grub/efi/time.h: Likewise.
10796         * include/grub/i386/linux.h: Likewise.
10797         * include/grub/i386/setjmp.h: Likewise.
10798         * include/grub/i386/types.h: Likewise.
10799         * include/grub/i386/efi/kernel.h: Likewise.
10800         * include/grub/i386/efi/loader.h: Likewise.
10801         * include/grub/i386/efi/time.h: Likewise.
10802         * include/grub/i386/pc/biosdisk.h: Likewise.
10803         * include/grub/i386/pc/boot.h: Likewise.
10804         * include/grub/i386/pc/chainloader.h: Likewise.
10805         * include/grub/i386/pc/console.h: Likewise.
10806         * include/grub/i386/pc/init.h: Likewise.
10807         * include/grub/i386/pc/kernel.h: Likewise.
10808         * include/grub/i386/pc/loader.h: Likewise.
10809         * include/grub/i386/pc/memory.h: Likewise.
10810         * include/grub/i386/pc/multiboot.h: Likewise.
10811         * include/grub/i386/pc/serial.h: Likewise.
10812         * include/grub/i386/pc/time.h: Likewise.
10813         * include/grub/i386/pc/vbe.h: Likewise.
10814         * include/grub/i386/pc/vbeblit.h: Likewise.
10815         * include/grub/i386/pc/vbefill.h: Likewise.
10816         * include/grub/i386/pc/vbeutil.h: Likewise.
10817         * include/grub/i386/pc/vga.h: Likewise.
10818         * include/grub/ieee1275/ieee1275.h: Likewise.
10819         * include/grub/ieee1275/ofdisk.h: Likewise.
10820         * include/grub/powerpc/libgcc.h: Likewise.
10821         * include/grub/powerpc/setjmp.h: Likewise.
10822         * include/grub/powerpc/types.h: Likewise.
10823         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10824         * include/grub/powerpc/ieee1275/console.h: Likewise.
10825         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10826         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10827         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10828         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10829         * include/grub/powerpc/ieee1275/time.h: Likewise.
10830         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10831         * include/grub/sparc64/libgcc.h: Likewise.
10832         * include/grub/sparc64/setjmp.h: Likewise.
10833         * include/grub/sparc64/types.h: Likewise.
10834         * include/grub/sparc64/ieee1275/console.h: Likewise.
10835         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10836         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10837         * include/grub/sparc64/ieee1275/time.h: Likewise.
10838         * include/grub/util/biosdisk.h: Likewise.
10839         * include/grub/util/getroot.h: Likewise.
10840         * include/grub/util/lvm.h: Likewise.
10841         * include/grub/util/misc.h: Likewise.
10842         * include/grub/util/raid.h: Likewise.
10843         * include/grub/util/resolve.h: Likewise.
10844         * io/gzio.c: Likewise.
10845         * kern/device.c: Likewise.
10846         * kern/disk.c: Likewise.
10847         * kern/dl.c: Likewise.
10848         * kern/elf.c: Likewise.
10849         * kern/env.c: Likewise.
10850         * kern/err.c: Likewise.
10851         * kern/file.c: Likewise.
10852         * kern/fs.c: Likewise.
10853         * kern/loader.c: Likewise.
10854         * kern/main.c: Likewise.
10855         * kern/misc.c: Likewise.
10856         * kern/mm.c: Likewise.
10857         * kern/parser.c: Likewise.
10858         * kern/partition.c: Likewise.
10859         * kern/rescue.c: Likewise.
10860         * kern/term.c: Likewise.
10861         * kern/efi/efi.c: Likewise.
10862         * kern/efi/init.c: Likewise.
10863         * kern/efi/mm.c: Likewise.
10864         * kern/i386/dl.c: Likewise.
10865         * kern/i386/efi/init.c: Likewise.
10866         * kern/i386/efi/startup.S: Likewise.
10867         * kern/i386/pc/init.c: Likewise.
10868         * kern/i386/pc/lzo1x.S: Likewise.
10869         * kern/i386/pc/startup.S: Likewise.
10870         * kern/ieee1275/ieee1275.c: Likewise.
10871         * kern/powerpc/cache.S: Likewise.
10872         * kern/powerpc/dl.c: Likewise.
10873         * kern/powerpc/ieee1275/cmain.c: Likewise.
10874         * kern/powerpc/ieee1275/crt0.S: Likewise.
10875         * kern/powerpc/ieee1275/init.c: Likewise.
10876         * kern/powerpc/ieee1275/openfw.c: Likewise.
10877         * kern/sparc64/cache.S: Likewise.
10878         * kern/sparc64/dl.c: Likewise.
10879         * kern/sparc64/ieee1275/init.c: Likewise.
10880         * kern/sparc64/ieee1275/openfw.c: Likewise.
10881         * loader/efi/chainloader.c: Likewise.
10882         * loader/efi/chainloader_normal.c: Likewise.
10883         * loader/i386/efi/linux.c: Likewise.
10884         * loader/i386/efi/linux_normal.c: Likewise.
10885         * loader/i386/pc/chainloader.c: Likewise.
10886         * loader/i386/pc/chainloader_normal.c: Likewise.
10887         * loader/i386/pc/linux.c: Likewise.
10888         * loader/i386/pc/linux_normal.c: Likewise.
10889         * loader/i386/pc/multiboot.c: Likewise.
10890         * loader/i386/pc/multiboot_normal.c: Likewise.
10891         * loader/powerpc/ieee1275/linux.c: Likewise.
10892         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10893         * normal/arg.c: Likewise.
10894         * normal/cmdline.c: Likewise.
10895         * normal/command.c: Likewise.
10896         * normal/completion.c: Likewise.
10897         * normal/execute.c: Likewise.
10898         * normal/function.c: Likewise.
10899         * normal/lexer.c: Likewise.
10900         * normal/main.c: Likewise.
10901         * normal/menu.c: Likewise.
10902         * normal/menu_entry.c: Likewise.
10903         * normal/misc.c: Likewise.
10904         * normal/parser.y: Likewise.
10905         * normal/script.c: Likewise.
10906         * normal/i386/setjmp.S: Likewise.
10907         * normal/powerpc/setjmp.S: Likewise.
10908         * normal/sparc64/setjmp.S: Likewise.
10909         * partmap/acorn.c: Likewise.
10910         * partmap/amiga.c: Likewise.
10911         * partmap/apple.c: Likewise.
10912         * partmap/gpt.c: Likewise.
10913         * partmap/pc.c: Likewise.
10914         * partmap/sun.c: Likewise.
10915         * term/gfxterm.c: Likewise.
10916         * term/terminfo.c: Likewise.
10917         * term/efi/console.c: Likewise.
10918         * term/i386/pc/console.c: Likewise.
10919         * term/i386/pc/serial.c: Likewise.
10920         * term/i386/pc/vesafb.c: Likewise.
10921         * term/i386/pc/vga.c: Likewise.
10922         * term/ieee1275/ofconsole.c: Likewise.
10923         * util/biosdisk.c: Likewise.
10924         * util/console.c: Likewise.
10925         * util/genmoddep.c: Likewise.
10926         * util/getroot.c: Likewise.
10927         * util/grub-emu.c: Likewise.
10928         * util/grub-mkdevicemap.c: Likewise.
10929         * util/grub-probe.c: Likewise.
10930         * util/lvm.c: Likewise.
10931         * util/misc.c: Likewise.
10932         * util/raid.c: Likewise.
10933         * util/resolve.c: Likewise.
10934         * util/update-grub.in: Likewise.
10935         * util/update-grub_lib.in: Likewise.
10936         * util/grub.d/00_header.in: Likewise.
10937         * util/grub.d/10_hurd.in: Likewise.
10938         * util/grub.d/10_linux.in: Likewise.
10939         * util/i386/efi/grub-install.in: Likewise.
10940         * util/i386/efi/grub-mkimage.c: Likewise.
10941         * util/i386/pc/grub-install.in: Likewise.
10942         * util/i386/pc/grub-mkimage.c: Likewise.
10943         * util/i386/pc/grub-mkrescue.in: Likewise.
10944         * util/i386/pc/grub-setup.c: Likewise.
10945         * util/i386/pc/misc.c: Likewise.
10946         * util/powerpc/ieee1275/grub-install.in: Likewise.
10947         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10948         * util/powerpc/ieee1275/misc.c: Likewise.
10949         * video/bitmap.c: Likewise.
10950         * video/video.c: Likewise.
10951         * video/i386/pc/vbe.c: Likewise.
10952         * video/i386/pc/vbeblit.c: Likewise.
10953         * video/i386/pc/vbefill.c: Likewise.
10954         * video/i386/pc/vbeutil.c: Likewise.
10955         * video/readers/tga.c: Likewise.
10957 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10959         * conf/i386-efi.rmk: Replace obsolete reference to
10960         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10961         with util/getroot.c.
10962         * conf/powerpc-ieee1275.rmk: Likewise.
10963         * conf/sparc64-ieee1275.rmk: Likewise.
10965         * util/grub-emu.c (main): Fix unchecked pointer handling.
10967 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10969         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10970         invocation to fail, in order to support partition-less media.
10972         * util/i386/pc/grub-install.in: Likewise.
10974         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10975         which fs or partmap modules are needed (akin to its sister scripts).
10977         Also use grub-probe to get rid of unportable /proc/mounts check.
10979         Print the same informational message that the other scripts do, before
10980         exiting.
10982 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10984         * util/update-grub_lib.in (font_path): New function.  Determine whether
10985         a font file can be found and, if so, echo the GRUB path to it.
10987         * util/update-grub.in: Handle multiple terminals depending on user
10988         input, platform availability and font file presence.  Propagate
10989         variables of our findings to /etc/grub.d/ children.
10991         * util/grub.d/00_header.in: Handle multiple terminals, based on
10992         environment setup by update-grub.
10994 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10996         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10998 2007-06-21  Robert Millan  <rmh@aybabtu.com>
11000         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11001         indicate end of data section in kernel image.
11002         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11003         GRUB_KERNEL_MACHINE_DATA_END.
11005         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11006         space for it.
11007         * kern/i386/efi/startup.S: Likewise.
11009         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11010         during image generation.  Implement --prefix option to override this
11011         patch.
11012         * util/i386/efi/grub-mkimage.c: Likewise.
11014         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11015         code to make path relative to its root into a separate function.
11017         * util/i386/pc/grub-install.in: Use newly provided
11018         make_system_path_relative_to_its_root() to convert ${grubdir}, then
11019         pass the result to grub-install --prefix.
11021 2007-06-13  Robert Millan  <rmh@aybabtu.com>
11023         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11024         DEFAULT_DEVICE_MAP.
11025         * util/grub-emu.c: Use above definitions from misc.h instead of
11026         defining them.
11027         * util/grub-mkdevicemap.c: Likewise.
11028         * util/i386/pc/grub-setup.c: Likewise.
11029         * util/grub-probe.c: Likewise.
11030         (probe): Abort with grub_util_error() when either
11031         grub_guess_root_device or grub_util_get_grub_dev fails.
11033 2007-06-12  Robert Millan  <rmh@aybabtu.com>
11035         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11036         "pager" assignment.
11037         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11038         "pcdata".
11039         * util/grub-probe.c (probe): Likewise for "drive_name".
11041 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11043         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11044         not just the cdrom one.
11046 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11048         * util/i386/pc/grub-mkrescue.in: Add "set -e".
11049         Add --pkglibdir=DIR option to override pkglibdir.
11050         Mention --image-type=TYPE in help output.
11051         Fix --grub-mkimage (it was a no-op).
11052         Abort gracefully when no parameter is given.
11054 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11056         * util/i386/pc/grub-mkrescue.in: New file.
11057         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
11058         * Makefile.in: Handle bin_SCRIPTS.
11060 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
11062         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11063         list of video modes.
11065 2007-06-06  Robert Millan  <rmh@aybabtu.com>
11067         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11068         file doesn't exist, or if it is in a filesystem grub can't read.
11070         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
11071         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
11072         header comment to fit in 80 columns when the variables are resolved.
11074         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11075         could be identified by update-grub.  Remove redundant check for
11076         unifont.pff existence (since convert_system_path_to_grub_path now
11077         handles that).
11079 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11081         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11083         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11085         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11087 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11089         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11091         * include/grub/partition.h: Declare grub_apple_partition_map_init and
11092         grub_apple_partition_map_fini.
11094         * util/biosdisk.c
11095         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11096         to access >2 TiB disks).
11098         Print disk->total_sectors with %llu instead of %lu, since this
11099         variable is always 64-bit (prevents wrong disk size from being displayed
11100         on either >2 TiB disk or big-endian CPU).
11102         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11103         into a generic case that supports all (sane) partition maps.
11105         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11106         breaks big-endian.
11108         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11109         and grub_apple_partition_map_fini() after that.
11111 2007-06-01  Robert Millan  <rmh@aybabtu.com>
11113         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11115         * util/grub.d/00_header.in: Only enable gfxterm when
11116         convert_system_path_to_grub_path() succeeds.
11118 2007-05-20  Robert Millan  <rmh@aybabtu.com>
11120         * util/update-grub_lib.in: New file.
11121         * DISTLIST: Add update-grub_lib.in.
11122         * conf/common.rmk: Generate update-grub_lib and install it in
11123         $(lib_DATA).
11124         * Makefile.in: Add install routine for $(lib_DATA).
11126         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11127         function provided by update-grub_lib to support arbitrary paths of
11128         unifont.pff.
11129         * util/update-grub.in: Use convert_system_path_to_grub_path() to
11130         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11132 2007-05-19  Robert Millan  <rmh@aybabtu.com>
11134         * commands/i386/cpuid.c: New module.
11135         * DISTLIST: Add it.
11136         * conf/i386-efi.rmk: Enable cpuid.mod.
11137         * conf/i386-pc.rmk: Likewise.
11139 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11141         * kern/disk.c (grub_disk_read): Check return value of
11142         grub_realloc().
11144 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11146         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11147         arrays.
11148         * disk/raid.c (grub_raid_open): Likewise.
11150 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11152         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11153         stack instead of on the heap.
11155         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11156         before doing a read on it.
11158         * configure.ac: Only use -fno-stack-protector for the target
11159         environment.
11161 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11163         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11164         __attribute_ ((unused)) to mode_type argument.
11166         * util/getroot.c (grub_guess_root_device): Fix #endif.
11168         * kern/misc.c (memcmp): Fix prototype.
11170         * include/grub/partition.h [GRUB_UTIL]
11171         (grub_gpt_partition_map_init): Add prototype.
11172         (grub_gpt_partition_map_fini): Likewise.
11174         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11175         at the right place.
11177         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11178         (grub_fat_read_data): Likewise.
11179         (grub_fat_find_dir): Likewise.
11181         * font/manager.c (find_glyph): Make table a const.
11182         (grub_font_get_glyph): Remove bitmap from if statement.
11184 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
11186         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11187         code, first search for device in /dev/mapper, then in /dev.
11188         (grub_util_get_grub_dev): New function.
11189         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11190         prototype.
11191         * util/grub-probe.c (probe): Remove check for RAID, call
11192         grub_util_get_grub_dev() instead of
11193         grub_util_biosdisk_get_grub_dev().
11194         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11195         grub_util_biosdisk_get_grub_dev().
11196         * util/i386/pc/grub-setup.c (main): Likewise.
11198 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11200         * DISTLIST: Update for the latest changes.
11201         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11202         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11203         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11204         grub/util/biosdisk.h.
11205         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11206         grub/util/biosdisk.h.
11208 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11210         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11212 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11214         * util/i386/efi/grub-install.in: New.
11215         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11216         newly added grub-install.
11217         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11218         include.
11219         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11220         grub/util/biosdisk.h.
11221         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11222         grub/util/biosdisk.h.
11224 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11226         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11227         * include/grub/util/biosdisk.h: ... here.
11228         * util/i386/pc/biosdisk.c: Moved to ...
11229         * util/biosdisk.c: ... here.
11230         * util/i386/pc/getroot.c: Moved to ...
11231         * util/getroot.c: ... here.
11232         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11233         * util/grub-mkdevicemap.c: ... here.
11234         * util/i386/pc/grub-probe.c: Moved to ...
11235         * util/grub-probe.c: ... here.
11237 2007-05-15  Robert Millan  <rmh@aybabtu.com>
11239         * util/update-grub.in: Remove duplicated line in grub.cfg header
11240         message.
11242 2007-05-13  Robert Millan  <rmh@aybabtu.com>
11244         * util/update-grub.in: Fix a few assumptions about the devices holding
11245         /, /boot and /boot/grub being the same.
11246         * util/grub.d/00_header.in: Likewise.
11247         * util/grub.d/10_hurd.in: Likewise.
11248         * util/grub.d/10_linux.in: Likewise.
11250         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11251         patterns.  Use that to define the `.old' suffix as older than `'.
11253         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11255         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11256         the grub.cfg header message.
11258 2007-05-11  Robert Millan  <rmh@aybabtu.com>
11260         * util/update-grub.in: Create device.map if it doesn't already exist,
11261         before attempting to run grub-probe.
11262         Check for grub-probe and grub-mkdevicemap with the same code
11263         grub-install is using.
11264         Remove test mode.
11266 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11268         * Makefile.in: Add the datarootdir autoconf variable.
11270 2007-05-09  Robert Millan  <rmh@aybabtu.com>
11272         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11273         fail gracefully if dev->disk->partition == NULL.
11275 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11277         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11278         determine partition map module.
11279         * util/i386/pc/grub-install.in: Use this feature to decide which
11280         partition module to load, instead of hardcoding pc and gpt.
11282 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11284         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11285         source directory differs from build directory.
11287 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11289         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11290         initialisation.
11292 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11294         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11296 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11298         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11299         command-line arguments via ${GRUB_CMDLINE_LINUX}.
11301 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11303         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11304         (grub_probe_SOURCES): Likewise.
11305         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11306         GPT and initialize dos_part and bsd_part accordingly.
11307         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11308         install_bsd_part.
11309         (main): Activate gpt module for use during partition identification,
11310         and deactivate it afterwards.
11311         * util/i386/pc/grub-install.in: Add gpt module to core.img.
11312         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11313         partition identification, and deactivate it afterwards.
11315 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11317         * term/i386/pc/console.c (grub_console_fini): Call
11318         grub_term_set_current() before grub_term_unregister().
11320 2007-05-04  Robert Millan  <rmh@aybabtu.com>
11322         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11323         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11324         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
11325         and update-grub_DATA.
11326         * conf/common.rmk: Build and install update-grub components.
11327         * conf/common.mk: Regenerate.
11328         * util/update-grub.in: New.  Core of update-grub.
11329         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
11330         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
11331         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
11332         * util/grub.d/README: New.  Document grub.d directory layout.
11334 2007-05-01  Robert Millan  <rmh@aybabtu.com>
11336         * util/grub-emu.c: Move initialization functions
11337         grub_util_biosdisk_init() and grub_init_all() before
11338         grub_util_biosdisk_get_grub_dev(), which relies on them.
11340 2007-04-19  Robert Millan  <rmh@aybabtu.com>
11342         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11343         it is used later.
11345 2007-04-18  Jerone Young  <jerone@gmail.com>
11347         * kernel/elf.c: Add missing parenthesis for conditional statement
11348         stanza.
11350 2007-04-10  Jerone Young  <jerone@gmail.com>
11352         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11353         continue on and look for device node with real device name.
11355 2007-04-10  Jerone Young  <jerone@gmail.com>
11357         * configure.ac: Add argument for autoconf to use transformation
11358         ability.
11359         * Makefile.in: Add autoconf package transformation code.
11360         * util/i386/pc/grub-install.in: Likewise.
11361         * util/powerpc/ieee1275/grub-install.in: Likewise.
11363 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11365         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11366         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11367         (EXT2_REVISION): Likewise.
11368         (EXT2_INODE_SIZE): Likewise.
11369         (struct grub_ext2_block_group): Added a missing member
11370         "used_dirs".
11371         (grub_ext2_read_inode): Divide by the inode size in a superblock
11372         instead of 128 to obtain INODES_PER_BLOCK.
11373         Use the macro EXT2_INODE_SIZE instead of directly using
11374         SBLOCK->INODE_SIZE.
11376 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11378         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11379         superblock instead of the structure size to compute an
11380         offset. This fixes the problem that GRUB could not read a
11381         filesystem when inode size is different from 128-byte.
11383 2007-03-05  Marco Gerards  <marco@gnu.org>
11385         * normal/main.c (read_config_file): When "menu" is not set, create
11386         an initial context.
11388 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11390         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11391         (HEAP_LIMIT): New macro.
11392         (grub_claim_heap): Claim memory up to `heaplimit'.
11394 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11396         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11397         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11398         (_start): Likewise.
11399         (grub_arch_modules_addr): Return address after `_end'.
11400         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11401         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11402         (add_segments): Calculate `_end' from phdr size and location.
11403         (ALIGN_UP): Moved to ...
11404         * include/grub/misc.h: here.
11405         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11406         New macro.
11407         (GRUB_IEEE1275_MODULE_BASE): Removed.
11409 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11411         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11412         loop boundary.
11414 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11416         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11417         All users updated.
11418         (grub_elf64_load_hook_t): Likewise.
11419         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11420         debug output.
11422 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11424         * kern/mm.c: Update copyright.
11425         (grub_mm_debug): Correct syntax error.
11426         (grub_mm_dump_free): New function.
11427         (grub_debug_free): Call `grub_free'.
11428         * include/grub/mm.h: Update copyright.
11429         (grub_mm_dump_free): Add declaration.
11431 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11433         * include/grub/ieee1275/ieee1275.h: Update copyright.
11434         * kern/powerpc/ieee1275/init.c: Likewise.
11435         * kern/powerpc/ieee1275/openfw.c: Likewise.
11437         * loader/powerpc/ieee1275/linux.c: Likewise.
11438         * include/grub/elfload.h: Likewise.
11439         * kern/elf.c: Likewise.
11440         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11441         callers.
11442         (grub_elf64_load): Likewise.
11443         (grub_elf32_load_segment): Move to a nested function.
11444         (grub_elf64_load_segment): Likewise.
11446 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11448         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11449         prototype.
11450         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11451         (grub_heap_len): Likewise.
11452         (HEAP_SIZE): New macro.
11453         (grub_claim_heap): New function.
11454         (grub_machine_init): Don't claim heap directly.  Call
11455         `grub_claim_heap'.
11456         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11457         (grub_available_iterate): New function.
11459 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11461         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11462         * configure.ac: Use it for testing the HOST and TARGET compilers.
11464 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11466         * Makefile.in (enable_grub_emu): New variable.
11467         * configure.ac (--enable-grub-emu): New option.
11468         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11469         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11470         * conf/i386-pc.rmk: Likewise.
11471         * conf/powerpc-ieee1275.rmk: Likewise.
11472         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11474 2006-12-12  Marco Gerards  <marco@gnu.org>
11476         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11478         * kern/env.c (grub_env_unset): Don't free the member `value' when
11479         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11480         pointer.
11482         * normal/main.c (current_menu): Removed.
11483         (free_menu): Unset the `menu' environment variable.
11484         (grub_normal_menu_addentry): Make use of the environment variable
11485         `menu', instead of using the global `current_menu'.  Allocate
11486         memory for the sourcecode of this entry.
11487         (read_config_file): New argument `nested', changed all callers.
11488         Only in the case of a new context, initialize a new menu.  Set the
11489         `menu' environment variable.
11490         (grub_normal_execute): Don't set and unset the environment
11491         variable `menu' here anymore.  Only free the menu when leaving the
11492         context.
11494         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11495         leak.
11497 2006-12-11  Marco Gerards  <marco@gnu.org>
11499         * normal/menu_entry.c (run): Fix off by one bug so the last line
11500         is executed.  Move the loader check to outside the loop.
11502 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11504         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11506 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11508         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11509         the number of sectors.  Reported by Andrey Shuvikov
11510         <mr_hyro@yahoo.com>.
11512 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11514         * kern/disk.c (grub_disk_read): When there is a read error, always
11515         try to read only the necessary data.
11517         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11518         disk/raid.c.
11519         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11520         prototype.
11521         [GRUB_UTIL] (grub_raid_fini): Likewise.
11522         [GRUB_UTIL] (grub_lvm_init): Likewise.
11523         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11524         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11525         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11526         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11527         and grub_raid_fini().
11529 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11531         * include/grub/types.h (__unused): Rename to UNUSED.
11532         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11533         (grub_elf64_size): Likewise.
11535 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11537         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11538         grub_error_push and grub_error_pop in the error-handling path.
11539         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11540         length.
11542 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11544         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11545         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11546         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11547         (kernel_elf_SOURCES): Likewise.
11548         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11549         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11550         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11551         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11552         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11553         (elf_mod_SOURCES): New variable.
11554         (elf_mod_CFLAGS): Likewise.
11555         (elf_mod_LDFLAGS): Likewise.
11556         * include/grub/types.h (__unused): New macro.
11557         * include/grub/elfload.h: New file.
11558         * kern/elf.c: Likewise.
11559         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11560         (ELF32_LOADMASK): New macro.
11561         (ELF64_LOADMASK): Likewise.
11562         (vmlinux): Removed.
11563         (grub_linux_load32): New function.
11564         (grub_linux_load64): Likewise.
11565         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11566         Use grub_elf_t instead of grub_file_t.
11568 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11570         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11571         `catch_result' to struct set_color_args.
11573 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11575         * normal/menu.c: Include grub/script.h.
11576         * normal/menu_entry.c: Likewise.
11577         * include/grub/normal.h: Do not include grub/script.h.
11579 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11581         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11583 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11585         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11586         disk.
11587         (grub_disk_close): Print debug messages when closing a disk.
11588         (grub_disk_read): Print debug messages when disk read fails.
11589         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11590         filesystem type.
11591         * kern/partition.c: Include misc.h.
11592         (grub_partition_iterate): Print debug messages when detecting
11593         partition type.
11595 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11597         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11598         is negative.
11599         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11601 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11603         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11604         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11606 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11608         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11609         instead of sizeof(lv). Patch by Michael Guntsche.
11611 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11613         * disk/lvm.c: Rename VGS to VG_LIST.
11614         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11615         (grub_lvm_open): Likewise.
11616         Thanks to Michael Guntsche for finding this bug.
11618 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11620         * configure.ac (AC_INIT): Bumped to 1.95.
11622 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11624         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11625         with "/dev/.static/dev/md".
11627 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11629         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11630         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11631         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11632         DRIVE_NAME are always freed.
11634         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11635         DOS_PART, as a DOS partition is counted from one instead of zero
11636         now. Reported by Robert Millan.
11638 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11640         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11641         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11642         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11643         string returned by grub_guess_root_device.
11644         * util/i386/pc/grub-setup.c: Likewise.
11645         * util/i386/pc/grub-probefs.c: Likewise.
11647         * util/i386/pc/grub-probefs.c: Rename to ...
11648         * util/i386/pc/grub-probe.c: ... this.
11649         * DISTLIST: Remove grub-probefs, add grub-probe.
11650         * conf/i386-efi.rmk: Likewise.
11651         * conf/i386-pc.rmk: Likewise.
11652         * util/i386/pc/grub-install.in: Likewise.
11654         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11655         choose which information we want to print.
11657 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11659         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11660         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11661         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11662         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11663         video/readers/tga.c and video/i386/pc/vbeutil.c.
11665 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11667         Added support for RAID and LVM.
11669         * disk/lvm.c: New file.
11670         * disk/raid.c: Likewise.
11671         * include/grub/lvm.h: Likewise.
11672         * include/grub/raid.h: Likewise.
11673         * include/grub/util/lvm.h: Likewise.
11674         * include/grub/util/raid.h: Likewise.
11675         * util/lvm.c: Likewise.
11676         * util/raid.c: Likewise.
11678         * include/grub/disk.h (grub_disk_dev_id): Add
11679         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11680         (grub_disk_get_size): New prototype.
11681         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11682         returns a partition.
11683         (grub_disk_get_size): New function.
11685         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11686         verbatim if grub_install_dos_part is -2.
11688         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11689         and LVM devices.
11691         * util/i386/pc/grub-setup.c (setup): New argument
11692         MUST_EMBED. Force embedding of GRUB when the argument is
11693         true. Close FILE before returning.
11694         (main): Add support for RAID and LVM.
11696         * conf/common.rmk: Add RAID and LVM modules.
11697         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11698         util/lvm.c.
11699         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11701         * kern/misc.c (grub_strstr): New function.
11702         * include/grub/misc.h (grub_strstr): New prototype.
11704 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11706         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11708 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11710         * kern/misc.c (grub_strtoull): Guess the base only if not
11711         specified.
11713 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11715         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11716         PowerMac support.
11718 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11720         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11722         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11723         Remove `flags' argument.  All callers changed.
11724         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11725         (IEEE1275_IHANDLE_INVALID): New variable.
11726         (IEEE1275_CELL_INVALID): New variable.
11727         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11728         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11729         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11730         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11731         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11732         codes from Open Firmware.  All callers updated.
11733         (grub_ieee1275_next_property): Directly return Open Firmware return
11734         code.
11735         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11736         Standardize error checking from `grub_ieee1275_get_property'.
11737         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11738         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11740 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11742         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11743         `instance_to_package_args' to `instance_to_path_args'.
11745         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11746         `grub_ieee1275_chosen'.
11748         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11749         `grub_ieee1275_interpret'.
11751 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11753         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11755 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11757         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11758         (__cmpdi): Likewise.
11760         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11761         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11762         `grub_ssize_t'.
11764         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11766         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11767         to type `grub_ssize_t'.
11768         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11770 2006-09-22  Marco Gerards  <marco@gnu.org>
11772         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11773         newlines.
11775 2006-09-22  Marco Gerards  <marco@gnu.org>
11777         * commands/echo.c: New file.
11779         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11781         * conf/common.rmk (echo_mod_SOURCES): New variable.
11782         (echo_mod_CFLAGS): Likewise.
11783         (echo_mod_LDFLAGS): Likewise.
11785 2006-09-22  Marco Gerards  <marco@gnu.org>
11787         * normal/main.c (get_line): Malloc memory instead of using
11788         preallocated memory.  Removed the arguments `cmdline' and
11789         `max_len'.  Updated all callers.
11791 2006-09-22  Marco Gerards  <marco@gnu.org>
11793         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11794         (normal_mod_DEPENDENCIES): Likewise.
11796         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11797         (normal_mod_DEPENDENCIES): Likewise.
11799         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11801 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11803         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11804         programs.
11805         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11806         (normal_mod_DEPENDENCIES): Likewise.
11807         * conf/i386-pc.mk: Regenerate.
11808         * conf/i386-efi.mk: Likewise
11809         * conf/common.mk: Likewise.
11810         * conf/powerpc-ieee1275.mk: Likewise.
11811         * conf/sparc64-ieee1275.mk: Likewise.
11813 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11815         Sync with i386 version.
11816         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11817         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11819 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11821         Import from GRUB Legacy (lib/device.c):
11822         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11823         (init_device_map) [__linux__]: Add support for I2O devices.
11825 2006-09-14  Marco Gerards  <marco@gnu.org>
11827         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11828         `-melf_i386'.
11830 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11832         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11833         /boot/grub/*.lst.
11835         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11837         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11838         before adding it to device.map.
11840 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11842         * genmk.rb: Let GCC generate dependencies the first time it
11843         compiles a file; using the -MD option.
11844         * conf/common.mk: Regenerate.
11845         * conf/i386-pc.mk: Likewise.
11846         * conf/i386-efi.mk: Likewise.
11847         * conf/powerpc-ieee1275.mk: Likewise.
11848         * conf/sparc64-ieee1275.mk: Likewise.
11850 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11852         Move the prototypes of grub_setjmp and grub_longjmp to
11853         cpu/setjmp.h, so that each architecture may specify different
11854         attributes.
11856         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11857         (grub_longjmp): Likewise.
11858         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11859         (grub_longjmp): Likewise.
11860         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11861         (grub_longjmp): Likewise.
11863         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11864         [!GRUB_UTIL] (grub_longjmp): Removed.
11866 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11868         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11869         "color!" method does not return any value.
11871 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11873         * include/grub/bitmap.h: New file.
11875         * include/grub/i386/pc/vbeutil.h: Likewise.
11877         * video/bitmap.c: Likewise.
11879         * video/readers/tga.c: Likewise.
11881         * video/i386/pc/vbeutil.c: Likewise.
11883         * commands/videotest.c: Code cleanup and updated to reflect to new
11884         video API.
11886         * term/gfxterm.c: Likewise.
11888         * video/video.c: Likewise.
11890         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11891         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11892         (bitmap_mod_SOURCES): New entry.
11893         (bitmap_mod_CFLAGS): Likewise.
11894         (bitmap_mod_LDFLAGS): Likewise.
11895         (tga_mod_SOURCES): Likewise.
11896         (tga_mod_CFLAGS): Likewise.
11897         (tga_mod_LDFLAGS): Likewise.
11899         * include/grub/video.h (grub_video_blit_operators): New enum type.
11900         (grub_video_render_target): Changed as forward declaration and moved
11901         actual definition to be video driver specific.
11902         (grub_video_adapter.blit_bitmap): Added blitting operator.
11903         (grub_video_adapter.blit_render_target): Likewise.
11904         (grub_video_blit_bitmap): Likewise.
11905         (grub_video_blit_render_target): Likewise.
11907         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11908         driver specific render target definition.
11909         (grub_video_vbe_map_rgba): Added driver internal helper.
11910         (grub_video_vbe_unmap_color): Updated to use
11911         grub_video_i386_vbeblit_info.
11912         (grub_video_vbe_get_video_ptr): Likewise.
11914         * include/grub/i386/pc/vbeblit.h
11915         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11916         grub_video_i386_vbeblit_info.
11917         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11918         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11919         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11920         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11921         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11922         (grub_video_i386_vbeblit_index_index): Likewise.
11923         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11924         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11925         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11926         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11927         operator.
11928         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11929         operator.
11931         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11932         include/grub/i386/pc/vbeblit.h.
11934         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11935         Updated to use grub_video_i386_vbeblit_info.
11936         (grub_video_i386_vbefill_R8G8B8): Likewise.
11937         (grub_video_i386_vbefill_index): Likewise.
11938         (grub_video_i386_vbefill): Added generic filler.
11940         * video/i386/pc/vbefill.c: Updated to reflect changes on
11941         include/grub/i386/pc/vbefill.h.
11943         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11944         grub_video_i386_vbeblit_info.
11945         (grub_video_vbe_unmap_color): Likewise.
11946         (grub_video_vbe_blit_glyph): Likewise.
11947         (grub_video_vbe_scroll): Likewise.
11948         (grub_video_vbe_draw_pixel): Removed function.
11949         (grub_video_vbe_get_pixel): Likewise.
11950         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11951         updated code to use it.
11952         (common_blitter): Added common blitter for render target and bitmap.
11953         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11954         (grub_video_vbe_blit_render_target): Likewise.
11956 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11958         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11959         is in text mode if there is no console control protocol instance
11960         available.
11962 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11964         * include/grub/video.h: Code cleanup.
11966         * include/grub/i386/pc/vbe.h: Likewise.
11968         * video/i386/pc/vbe.c: Likewise.
11970         * video/i386/pc/vbeblit.c: Likewise.
11972         * video/i386/pc/vbefill.c: Likewise.
11974         * video/video.c: Likewise.  Also added more comments.
11976 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11978         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11979         (struct grub_biosdisk_dap): Likewise.
11981         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11982         linkage settings for all functions.
11984 2006-07-12  Marco Gerards  <marco@gnu.org>
11986         * configure.ac (--enable-mm-debug): Fix typo.
11988         * genkernsyms.sh.in: Use proper quoting for `CC'.
11990 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11992         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11993         (normal_mod_ASFLAGS): Remove "-m32".
11995 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11997         * util/misc.c: Include config.h.
11998         [!HAVE_MEMALIGN]: Do not include malloc.h.
11999         (grub_memalign): Use posix_memalign, if present. Then, use
12000         memalign, if present. Otherwise, emit an error.
12002         * util/grub-emu.c: Do not include malloc.h.
12004         * include/grub/util/misc.h: Include unistd.h. This is required for
12005         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12006         D. Eades III <hde@foobar-qux.org>.
12008         * configure.ac (AC_GNU_SOURCE): Added.
12009         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12010         type.
12012 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
12014         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12015         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12017 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
12019         * include/grub/types.h (grub_host_addr_t): Rename to
12020         grub_target_addr_t.
12021         (grub_host_off_t): Rename to grub_target_off_t.
12022         (grub_host_size_t): Rename to grub_target_size_t.
12023         (grub_host_ssize_t): Rename to grub_target_ssize_t.
12024         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12026         * include/grub/kernel.h (struct grub_module_header): Change type
12027         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12028         (grub_module_info): Likewise.
12030 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12032         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12033         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12034         Velazquez <jesus.velazquez@gmail.com>.
12036 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12038         Count partitions from 1 instead of 0 in the string representation
12039         of partitions. Still use 0-based internally.
12041         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12042         (sun_partition_map_iterate): Use grub_partition_t instead of
12043         struct grub_partition *. Cast DESC->START_CYLINDER to
12044         grub_uint64_t after converting the endian.
12045         (sun_partition_map_probe): Subtract 1 for PARTNUM.
12046         (sun_partition_map_get_name): Add 1 to P->INDEX.
12048         * partmap/pc.c (grub_partition_parse): Subtract 1 for
12049         PCDATA->DOS_PART.
12050         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12052         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12053         zero instead of one.
12054         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12055         (gpt_partition_map_get_name): Add 1 into P->INDEX.
12057         * partmap/apple.c (apple_partition_map_iterate): Change the type
12058         of POS to unsigned.
12059         (apple_partition_map_probe): Subtract 1 for PARTNUM.
12060         (apple_partition_map_get_name): Add 1 into P->INDEX.
12062         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12063         of POS to unsigned.
12064         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12065         calculate the offset of a partition.
12066         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12067         (amiga_partition_map_get_name): Add 1 into P->INDEX.
12069         * partmap/acorn.c (acorn_partition_map_find): Change the type of
12070         SECTOR to grub_disk_addr_t.
12071         (acorn_partition_map_iterate): Likewise.
12072         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12073         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12074         top.
12075         (acorn_partition_map_get_name): Add 1 into P->INDEX.
12077         * kern/i386/pc/init.c (make_install_device): Add 1 into
12078         GRUB_INSTALL_DOS_PART.
12080         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12081         conditional.
12083 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12085         Clean up the code to support 64-bit addressing in disks and
12086         files. This change is not enough for filesystems yet.
12088         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12089         type of "start" to grub_uint64_t.
12090         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12091         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12092         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12093         convert addresses.
12095         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12096         to grub_disk_addr_t.
12098         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12099         string.
12101         * partmap/pc.c (pc_partition_map_iterate): Likewise.
12103         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12104         to char *.
12106         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12108         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12110         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12112         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12113         to grub_off_t, to detect an error from grub_file_seek.
12114         (grub_multiboot_load_elf32): Likewise.
12116         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12117         maximum unsigned long value when an overflow is detected.
12118         (grub_strtoull): New function.
12119         (grub_divmod64): Likewise.
12120         (grub_lltoa): use grub_divmod64.
12122         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12123         grub_disk_addr_t.
12124         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12125         the pointer to next character. Use grub_strtoull instead of
12126         grub_strtoul.
12127         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12128         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12129         respectively.
12131         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12132         return value is signed.
12133         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12134         test if OFFSET is less than zero, as OFFSET is unsigned now.
12136         * kern/disk.c (struct grub_disk_cache): Change the type of
12137         "sector" to grub_disk_addr_t.
12138         (grub_disk_cache_get_index): Change the type of SECTOR to
12139         grub_disk_addr_t. Calculate the hash with SECTOR casted to
12140         unsigned after shifting.
12141         (grub_disk_cache_invalidate): Change the type of SECTOR to
12142         grub_disk_addr_t.
12143         (grub_disk_cache_unlock): Likewise.
12144         (grub_disk_cache_store): Likewise.
12145         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12146         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12147         grub_disk_addr_t and grub_uint64_t, respectively.
12148         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12149         body, as the value of OFFSET is tweaked by
12150         grub_disk_check_range. Change the types of START_SECTOR, LEN and
12151         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12152         respectively.
12153         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12154         body, as the value of OFFSET is tweaked by
12155         grub_disk_check_range. Change the types of LEN and N to
12156         grub_size_t.
12158         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12159         and "saved_offset" to grub_off_t.
12160         (test_header): Cast BUF to char *.
12161         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12162         to char *.
12163         (grub_gzio_read): Change the types of OFFSET and SIZE to
12164         grub_off_t and grub_size_t, respectively.
12166         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12167         Removed.
12168         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12169         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12170         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12171         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12172         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12174         * include/grub/types.h (grub_off_t): Unconditionally set to
12175         grub_uint64_t.
12176         (grub_disk_addr_t): Changed to grub_uint64_t.
12178         * include/grub/partition.h (struct grub_partition): Change the
12179         types of "start", "len" and "offset" to grub_disk_addr_t,
12180         grub_uint64_t and grub_disk_addr_t, respectively.
12181         (grub_partition_get_start): Return grub_disk_addr_t.
12182         (grub_partition_get_len): Return grub_uint64_t.
12184         * include/grub/misc.h (grub_strtoull): New prototype.
12185         (grub_divmod64): Likewise.
12187         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12188         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12189         grub_off_t, respectively.
12190         All callers and references changed.
12192         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12193         grub_size_t in "read".
12194         All callers and references changed.
12196         * include/grub/file.h (struct grub_file): Change the types of
12197         "offset" and "size" to grub_off_t and grub_off_t,
12198         respectively. Change the type of SECTOR to grub_disk_addr_t in
12199         "read_hook".
12200         (grub_file_read): Change the type of LEN to grub_size_t.
12201         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12202         grub_off_t.
12203         (grub_file_size): Return grub_off_t.
12204         (grub_file_tell): Likewise.
12205         All callers and references changed.
12207         * include/grub/disk.h (struct grub_disk_dev): Change the types of
12208         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12209         "write".
12210         (struct grub_disk): Change the type of "total_sectors" to
12211         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12212         "read_hook".
12213         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12214         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12215         (grub_disk_write): Likewise.
12216         All callers and references changed.
12218         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12219         char * for grub_strncmp to silence gcc.
12220         (grub_iso9660_mount): Likewise.
12221         (grub_iso9660_mount): Likewise.
12222         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12223         return statement.
12224         (grub_iso9660_iterate_dir): Likewise.
12225         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12227         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12228         LEN to grub_disk_addr_t and grub_size_t, respectively.
12230         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12232         * fs/jfs.c (grub_jfs_read_file): Likewise.
12234         * fs/minix.c (grub_jfs_read_file): Likewise.
12236         * fs/sfs.c (grub_jfs_read_file): Likewise.
12238         * fs/ufs.c (grub_jfs_read_file): Likewise.
12240         * fs/xfs.c (grub_jfs_read_file): Likewise.
12242         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12243         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12244         respectively.
12246         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12247         BLKNR to -1 instead of returning GRUB_ERRNO.
12248         (grub_ext2_read_file): Change the types of SECTOR and
12249         LEN to grub_disk_addr_t and grub_size_t, respectively.
12251         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12252         LEN to grub_disk_addr_t and grub_size_t, respectively.
12254         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12255         grub_file_read.
12257         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12258         string. Do not cast SECTOR explicitly.
12260         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12261         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12262         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12263         grub_disk_addr_t and grub_size_t, respectively. If the sector is
12264         over 2TB and LBA mode is not supported, raise an error.
12265         (get_safe_sectors): New function.
12266         (grub_biosdisk_read): Use get_safe_sectors.
12267         (grub_biosdisk_write): Likewise.
12269         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12270         (grub_efidisk_write): Likewise.
12272         * disk/loopback.c (delete_loopback): Cosmetic changes.
12273         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12274         correctly.
12275         (grub_loopback_open): Likewise.
12276         (grub_loopback_read): Likewise. Also, change the type of POS to
12277         grub_off_t, and fix the usage of grub_memset.
12279         * commands/i386/pc/play.c: Include grub/machine/time.h.
12281         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12282         print FILE->SIZE.
12284         * commands/configfile.c: Include grub/env.h.
12286         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12287         GRUB_ERRNO directly instead. Change the type of POS to
12288         grub_off_t. Follow the coding standard.
12290         * commands/blocklist.c: Include grub/partition.h.
12291         (grub_cmd_blocklist): Return an error if the underlying device is
12292         not a disk. Take the starting sector of a partition into account,
12293         if a partition is used.
12295         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12296         a length field.
12297         (lba_mode): Support 64-bit addresses.
12298         (chs_mode): Likewise.
12299         (copy_buffer): Adapted to the new offsets of a length field and a
12300         segment field.
12301         (blocklist_default_start): Allocate 64-bit space.
12303         * boot/i386/pc/boot.S (force_lba): Removed.
12304         (boot_drive): Moved to under KERNEL_SECTOR.
12305         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12306         space.
12307         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12308         is useless.
12309         (lba_mode): Refactored to support a 64-bit address. More size
12310         optimization.
12311         (setup_sectors): Likewise.
12313 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12315         * DISTLIST: Added include/grub/i386/linux.h. Removed
12316         include/grub/i386/pc/linux.h
12318         * configure.ac (AC_INIT): Bumped to 1.94.
12320         * config.guess: Updated from gnulib.
12321         * config.sub: Likewise.
12322         * install-sh: Likewise.
12323         * mkinstalldirs: Likewise.
12325 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12327         * conf/common.rmk (grub_modules_init.lst): Depended on
12328         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12329         MODSRCFILES.
12331         * genmk.rb (PModule::rule): Reverted the previous change.
12333 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12335         * conf/common.rmk (grub_modules_init.lst): Depends on
12336         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12337         that the target does not exist before producing.
12338         (grub_modules_init.h): Remove the target before generating.
12339         (grub_emu_init.c): Likewise.
12341         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12343 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
12345         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12346         for the target-specific tests. Make sure that we also have the
12347         up-to-date target variables for those tests.
12349 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12351         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12352         (PModule::rule): Likewise.
12354 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12356         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12357         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12358         target-specific flags should be prefixed.
12359         (PModule::rule): Likewise.
12361 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
12363         * configure.ac (CMP): Check if cmp is available explicitly.
12365 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
12367         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12368         (target_cpu): New variable.
12369         (pkglibdir): Use target_cpu instead of host_cpu.
12371         * util/i386/pc/grub-install.in (host_cpu): Removed.
12372         (target_cpu): New variable.
12373         (pkglibdir): Use target_cpu instead of host_cpu.
12375         * util/genmoddep.c: Removed.
12377         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12378         instead of GRUB_HOST_SIZEOF_VOID_P.
12379         * kern/dl.c: Likewise.
12381         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12382         ...
12383         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12384         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12385         (GRUB_TARGET_SIZEOF_LONG): ... this.
12386         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12387         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12388         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12389         to ...
12390         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12391         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12392         (GRUB_TARGET_SIZEOF_LONG): ... this.
12393         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12394         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12395         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12396         to ...
12397         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12398         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12399         (GRUB_TARGET_SIZEOF_LONG): ... this.
12400         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12401         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12403         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12404         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12405         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12406         instead of GRUB_HOST_SIZEOF_LONG.
12407         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12408         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12409         GRUB_CPU_WORDS_BIGENDIAN.
12410         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12411         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12412         grub_host_ssize_t.
12414         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12415         (genmoddep_SOURCES): Likewise.
12416         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12417         (genmoddep_SOURCES): Likewise.
12418         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12419         (genmoddep_SOURCES): Likewise.
12420         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12421         Likewise.
12422         (genmoddep_SOURCES): Likewise.
12424         * genmoddep.awk: New file.
12426         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12427         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12428         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12429         (PModule::rule): Likewise.
12430         (Program::rule): Likewise.
12431         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12432         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12433         respectively.
12435         * configure.ac: Rewritten intensively to use host and target
12436         instead of build and host, respectively.
12438         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12439         (host_cpu): Removed.
12440         (target_cpu): New variable.
12441         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12442         (BUILD_CC): Removed.
12443         (BUILD_CFLAGS): Likewise.
12444         (BUILD_CPPFLAGS): Likewise.
12445         (TARGET_CC): New variable.
12446         (TARGET_CFLAGS): Likewise.
12447         (TARGET_CPPFLAGS): Likewise.
12448         (TARGET_LDFLAGS): Likewise.
12449         (AWK): Likewise.
12450         (include): Use target_cpu instead of host_cpu.
12451         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12453         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12455 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12457         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12458         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12459         field 'false' to 'exec_on_false'.
12460         (grub_script_create_cmdif): Renamed argument names to reflect above
12461         changes.
12463         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12465         * normal/script.c (grub_script_create_cmdif): Likewise.
12467 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12469         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12470         top.
12471         (grub_hfsplus_btree_recptr): Likewise.
12472         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12473         FILEBLOCK both to pass a block number and store next block
12474         number.
12475         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12476         overflow file correctly. Specify errors appropriately, because
12477         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12478         grub_hfsplus_btree_recptr to get the pointer to a found key.
12479         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12480         is found.
12482         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12483         linux.mod.
12484         (_linux_mod_SOURCES): New variable.
12485         (_linux_mod_CFLAGS): Likewise.
12486         (_linux_mod_LDFLAGS): Likewise.
12487         (linux_mod_SOURCES): Likewise.
12488         (linux_mod_CFLAGS): Likewise.
12489         (linux_mod_LDFLAGS): Likewise.
12491         * DISTLIST: Added loader/i386/efi/linux.c,
12492         loader/i386/efi/linux_normal.c and
12493         include/grub/i386/efi/loader.h.
12495         * loader/i386/efi/linux.c: New file.
12496         * loader/i386/efi/linux_normal.c: Likewise.
12497         * include/grub/i386/efi/loader.h: Likewise.
12499 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12501         * commands/blocklist.c: New file.
12503         * DISTLIST: Added commands/blocklist.c.
12505         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12506         color for the background, and a darker color for the foreground.
12507         (grub_console_checkkey): Return READ_KEY.
12508         (grub_console_cls): Set the background to
12509         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12511         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12513         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12514         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12516         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12517         prototype.
12519         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12520         BG. The spec is wrong again.
12522         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12523         prototype.
12524         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12526         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12527         commands/blocklist.c.
12528         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12530         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12531         (blocklist_mod_SOURCES): New variable.
12532         (blocklist_mod_CFLAGS): Likewise.
12533         (blocklist_mod_LDFLAGS): Likewise.
12535 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12537         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12538         duplication.
12539         (lba_mode): Use %eax more intensively to reduce the code size.
12541 2006-05-20  Marco Gerards  <marco@gnu.org>
12543         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12545         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12546         for `menuentry'.
12547         (script): Accept leading newlines.
12548         (newlines): New rule to describe 0 or more newlines.
12549         (commands): Accept `command' with trailing newline.  Fixed the
12550         order in which arguments were passed to `grub_script_add_cmd'.
12551         Accept commands separated by newlines.
12552         (function): Changed to accept newlines.
12553         (menuentry) Rewritten.
12555         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12556         front of the list, instead of to the end.
12558 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12560         * util/i386/pc/grub-install.in (bindir): New variable.
12561         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12562         Shaver <lbgwjl@gmail.com>.
12564 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12566         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12567         grub/machine/linux.h
12568         * loader/i386/pc/linux.c: Likewise.
12570         * include/grub/i386/pc/linux.h: Moved to ...
12571         * include/grub/i386/linux.h: ... here.
12573         * include/grub/i386/linux.h (struct linux_kernel_params): New
12574         struct.
12576 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12578         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12579         checking.
12580         (grub_video_vbe_blit_glyph): Likewise.
12581         (grub_video_vbe_blit_bitmap): Likewise.
12582         (grub_video_vbe_blit_render_target): Likewise.
12584 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12586         * configure.ac (--with-platform): Properly quote the square
12587         brackets.
12589 2006-05-08  Marco Gerards  <marco@gnu.org>
12591         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12592         this...
12593         (kernel_elf_HEADERS): ...to this.  Updated all users.
12594         (grubof_symlist.c): Renamed from this...
12595         (kernel_elf_symlist.c): ...to this.  Updated all users.
12596         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12597         (grubof_SOURCES): Renamed from this...
12598         (kernel_elf_SOURCES): ...to this.
12599         (grubof_HEADERS): Renamed from this...
12600         (kernel_elf_HEADERS): ...to this.
12601         (grubof_CFLAGS): Renamed from this...
12602         (kernel_elf_CFLAGS): ...to this.
12603         (grubof_ASFLAGS): Renamed from this...
12604         (kernel_elf_ASFLAGS): ...to this.
12605         (grubof_LDFLAGS): Renamed from this...
12606         (kernel_elf_LDFLAGS): ...to this.
12608         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12609         this...
12610         (kernel_elf_HEADERS): ...to this.  Updated all users.
12611         (grubof_symlist.c): Renamed from this...
12612         (kernel_elf_symlist.c): ...to this.  Updated all users.
12613         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12614         (grubof_SOURCES): Renamed from this...
12615         (kernel_elf_SOURCES): ...to this.
12616         (grubof_HEADERS): Renamed from this...
12617         (kernel_elf_HEADERS): ...to this.
12618         (grubof_CFLAGS): Renamed from this...
12619         (kernel_elf_CFLAGS): ...to this.
12620         (grubof_ASFLAGS): Renamed from this...
12621         (kernel_elf_ASFLAGS): ...to this.
12622         (grubof_LDFLAGS): Renamed from this...
12623         (kernel_elf_LDFLAGS): ...to this.
12625         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12626         `kernel.elf' instead of `grubof'.
12628 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12630         Add --with-platform to configure. Use pkglibdir instead of
12631         pkgdatadir. This is reported by Roger Leigh.
12633         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12634         (host_vendor): Likewise.
12635         (host_os): Likewise.
12636         (pkgdatadir): Likewise.
12637         (platform): New variable.
12638         (pkglibdir): Likewise.
12639         Use PKGLIBDIR instead of PKGDATADIR.
12641         * util/i386/pc/grub-install.in (datadir): Removed.
12642         (host_vendor): Likewise.
12643         (host_os): Likewise.
12644         (pkgdatadir): Likewise.
12645         (platform): New variable.
12646         (pkglibdir): Likewise.
12647         Use PKGLIBDIR instead of PKGDATADIR.
12649         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12650         instead of GRUB_DATADIR.
12651         (main): Likewise.
12652         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12653         (main): Likewise.
12654         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12655         (main): Likewise.
12657         * configure.ac (--with-platform): New option.
12658         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12660         * Makefile.in: Include a makefile based on PLATFORM instead of
12661         HOST_VENDOR.
12662         (pkgdatadir): Not appended by the machine type.
12663         (pkglibdir): Appended by the machine type.
12664         (host_vendor): Removed.
12665         (platform): New variable.
12666         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12667         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12668         (uninstall): Likewise.
12670 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12672         Use the environment context in the menu. Remove the commands
12673         "default" and "timeout", and use variables instead.
12675         * normal/menu.c: Include grub/env.h.
12676         (print_entry): Cast TITLE to silence gcc.
12677         (get_timeout): New function.
12678         (set_timeout): Likewise.
12679         (get_entry_number): Likewise.
12680         (run_menu): Use a default entry, a fallback entry and a timeout
12681         in the environment variables "default", "fallback" and
12682         "timeout". Also, tweak the default entry if it is not within the
12683         current menu entries.
12684         (grub_menu_run): Use a fallback entry in the environment variable
12685         "fallback".
12687         * normal/main.c (read_config_file): Do not initialize
12688         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12689         NEWMENU->TIMEOUT.
12690         (grub_normal_execute): Use a data slot to store the menu.
12692         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12693         fallback_entry and timeout.
12694         (struct grub_menu_list): Removed.
12695         (grub_menu_list_t): Likewise.
12696         (struct grub_context): Likewise.
12697         (grub_context_t): Likewise.
12698         (grub_context_get): Likewise.
12699         (grub_context_get_current_menu): Likewise.
12700         (grub_context_push_menu): Likewise.
12701         (grub_context_pop_menu): Likewise.
12702         (grub_default_init): Likewise.
12703         (grub_default_fini): Likewise.
12704         (grub_timeout_init): Likewise.
12705         (grub_timeout_fini): Likewise.
12707         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12708         and timeout.mod.
12709         (normal_mod_SOURCES): Removed normal/context.c.
12711         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12712         commands/default.c, commands/timeout.c and normal/context.c.
12713         (normal_mod_SOURCES): Removed normal/context.c.
12715         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12716         commands/timeout.c and normal/context.c.
12717         (normal_mod_SOURCES): Removed normal/context.c.
12719         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12720         commands/default.c, commands/timeout.c and normal/context.c.
12721         (normal_mod_SOURCES): Removed normal/context.c.
12723         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12724         timeout.mod.
12725         (default_mod_SOURCES): Removed.
12726         (default_mod_CFLAGS): Likewise.
12727         (default_mod_LDFLAGS): Likewise.
12728         (timeout_mod_SOURCES): Removed.
12729         (timeout_mod_CFLAGS): Likewise.
12730         (timeout_mod_LDFLAGS): Likewise.
12732         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12733         normal/context.c.
12735         * commands/default.c: Removed.
12736         * commands/timeout.c: Likewise.
12737         * normal/context.c: Likewise.
12739 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12741         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12743 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12745         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12746         "next" to "prev" for readability.
12747         (struct grub_env_sorted_var): New struct.
12748         (grub_env_context): Renamed to ...
12749         (initial_context): ... this.
12750         (grub_env_var_context): Renamed to ...
12751         (current_context): ... this.
12752         (grub_env_find): Look only at CURRENT_CONTEXT.
12753         (grub_env_context_open): Rewritten to copy exported variables from
12754         previous context.
12755         (grub_env_context_close): Rewritten according to the new
12756         scheme. Also, add an assertion to prevent the initial context from
12757         removed.
12758         (grub_env_insert): Removed the code for the sorted list.
12759         (grub_env_remove): Likewise.
12760         (grub_env_export): Simply mark the variable with
12761         GRUB_ENV_VAR_GLOBAL.
12762         (grub_env_set): A cosmetic change for naming consistency.
12763         (grub_env_get): Likewise.
12764         (grub_env_unset): Likewise.
12765         (grub_env_iterate): Rewritten to sort variables within this
12766         function.
12767         (grub_register_variable_hook): Fixed for naming consistency. Call
12768         grub_env_find again, only if NAME is not found at the first time.
12769         (mangle_data_slot_name): New function.
12770         (grub_env_set_data_slot): Likewise.
12771         (grub_env_get_data_slot): Likewise.
12772         (grub_env_unset_data_slot): Likewise.
12774         * include/grub/env.h (grub_env_var_type): New enum.
12775         (GRUB_ENV_VAR_LOCAL): New constant.
12776         (GRUB_ENV_VAR_GLOBAL): Likewise.
12777         (GRUB_ENV_VAR_DATA): Likewise.
12778         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12779         "type".
12780         (grub_env_set): Replace VAR with NAME for consistency.
12781         (grub_register_variable_hook): Likewise.
12782         (grub_env_export): Specify the name of the argument.
12783         (grub_env_set_data_slot): New prototype.
12784         (grub_env_get_data_slot): Likewise.
12785         (grub_env_unset_data_slot): Likewise.
12787 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12789         Extend the loader so that GRUB can accept a loader which comes
12790         back to GRUB when a loaded image exits. Also, this change adds
12791         support for a chainloader on EFI.
12793         * term/efi/console.c: Include grub/misc.h.
12794         (grub_console_checkkey): Display a scan code on the top for
12795         debugging. This will be removed once the EFI port gets stable.
12796         Correct the scan code mapping.
12798         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12799         allocate memory from larger regions, in order to reduce the number
12800         of allocated regions. Otherwise, the MacOSX loader panics.
12801         (filter_memory_map): Avoid less than 1MB for compatibility with
12802         other loaders.
12803         (add_memory_regions): Allocate from the tail of a region, if
12804         possible, to avoid allocating a region near to 1MB, for the MacOSX
12805         loader.
12807         * kern/efi/init.c (grub_efi_set_prefix): Specify
12808         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12810         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12811         argument IMAGE_HANDLE and specify it to get a loaded image.
12812         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12813         grub_efi_get_loaded_image.
12814         (grub_efi_get_filename): Divide the length by the size of
12815         grub_efi_char16_t.
12816         (grub_efi_get_device_path): New function.
12817         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12818         the length by the size of grub_efi_char16_t for a file path device
12819         path node.
12821         * kern/loader.c (grub_loader_noreturn): New variable.
12822         (grub_loader_set): Accept a new argument NORETURN. Set
12823         GRUB_LOADER_NORETURN to NORETURN.
12824         All callers changed.
12825         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12826         grub_machine_fini.
12828         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12829         prototype.
12830         (grub_efi_get_loaded_image): Take an argument to specify an image
12831         handle.
12833         * include/grub/loader.h (grub_loader_set): Added one more argument
12834         NORETURN.
12836         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12837         instead of grub_efi_open_protocol.
12838         (grub_efidisk_get_device_name): Likewise.
12839         (grub_efidisk_close): Print a newline.
12840         (grub_efidisk_get_device_handle): Fixed to use
12841         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12842         GRUB_EFI_DEVICE_PATH_TYPE.
12844         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12845         * kern/efi/efi.c (device_path_guid): ... here.
12847         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12848         chain.mod.
12849         (kernel_mod_HEADERS): Added efi/disk.h.
12850         (_chain_mod_SOURCES): New variable.
12851         (_chain_mod_CFLAGS): Likewise.
12852         (_chain_mod_LDFLAGS): Likewise.
12853         (chain_mod_SOURCES): Likewise.
12854         (chain_mod_CFLAGS): Likewise.
12855         (chain_mod_LDFLAGS): Likewise.
12857         * DISTLIST: Added include/grub/efi/chainloader.h,
12858         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12860         * include/grub/efi/chainloader.h: New file.
12861         * loader/efi/chainloader.c: Likewise.
12862         * loader/efi/chainloader_normal.c: Likewise.
12864 2006-04-30  Marco Gerards  <marco@gnu.org>
12866         * commands/configfile.c (grub_cmd_source): New function.
12867         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12868         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12870 2006-04-30  Marco Gerards  <marco@gnu.org>
12872         * normal/execute.c (grub_script_execute_cmd): Change the return
12873         type to `grub_err_t'.  Correctly return the error.
12874         (grub_script_execute_cmdline): In case a command line is not a
12875         command or a function, try to interpret it as an assignment.
12877 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12879         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12880         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12881         skip a node whose name is obviously invalid as UTF-16,
12882         i.e. contains a NUL character. Stop the iteration when the last
12883         directory entry is found. Instead of using the return value of
12884         grub_hfsplus_btree_iterate_node, store the value in RET and use
12885         it, because the iterator can be stopped by the last directory
12886         entry.
12888 2006-04-30  Marco Gerards  <marco@gnu.org>
12890         * include/grub/env.h (grub_env_export): New prototype.  Reported
12891         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12893 2006-04-30  Marco Gerards  <marco@gnu.org>
12895         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12896         size of the extents in a catalog file record.
12898 2006-04-29  Marco Gerards  <marco@gnu.org>
12900         * commands/configfile.c (grub_cmd_configfile): Execute the
12901         configfile within its own context.
12903         * include/grub/env.h (grub_env_context_open): New prototype.
12904         (grub_env_context_close): Likewise.
12906         * kern/env.c (grub_env): Removed.
12907         (grub_env_sorted): Likewise.
12908         (grub_env_context): New variable.
12909         (grub_env_var_context): Likewise.
12910         (grub_env_find): Search both the active context and the global
12911         context.
12912         (grub_env_context_open): New function.
12913         (grub_env_context_close): Likewise.
12914         (grub_env_insert): Likewise.
12915         (grub_env_remove): Likewise.
12916         (grub_env_export): Likewise.
12917         (grub_env_set): Changed to use helper functions to avoid code
12918         duplication.
12919         (grub_env_iterate): Rewritten so both the current context and the
12920         global context are being used.
12922         * normal/command.c (export_command): New function.
12923         (grub_command_init): Register the `export' function.
12925 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12927         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12928         explicitly to suppress gcc's warnings.
12929         * fs/fat.c (grub_fat_find_dir): Likewise.
12930         (grub_fat_label): Likewise.
12931         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12932         (grub_xfs_mount): Likewise.
12933         (grub_xfs_label): Likewise.
12934         * fs/affs.c (grub_affs_mount): Likewise.
12935         (grub_affs_label): Likewise.
12936         (grub_affs_iterate_dir): Likewise.
12937         * fs/sfs.c (grub_sfs_mount): Likewise.
12938         (grub_sfs_iterate_dir): Likewise.
12939         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12940         * fs/hfs.c (grub_hfs_mount): Likewise.
12941         (grub_hfs_cmp_catkeys): Likewise.
12942         (grub_hfs_find_dir): Likewise.
12943         (grub_hfs_dir): Likewise.
12944         (grub_hfs_label): Likewise.
12945         * fs/jfs.c (grub_jfs_mount): Likewise.
12946         (grub_jfs_opendir): Likewise.
12947         (grub_jfs_getent): Likewise.
12948         (grub_jfs_lookup_symlink): Likewise.
12949         (grub_jfs_label): Likewise.
12950         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12951         (grub_hfsplus_iterate_dir): Likewise.
12952         (grub_hfsplus_btree_iterate_node): Made static.
12954         * util/grub-emu.c (prefix): New variable.
12955         (grub_machine_set_prefix): New function.
12956         (main): Do not set the environment variable "prefix" here. Only
12957         set PREFIX, which is used later by grub_machine_set_prefix.
12959         * include/grub/video.h: Do not include grub/symbol.h.
12960         (grub_video_register): Not exported. This symbol is not defined in
12961         the kernel.
12962         (grub_video_unregister): Likewise.
12963         (grub_video_iterate): Likewise.
12964         (grub_video_setup): Likewise.
12965         (grub_video_restore): Likewise.
12966         (grub_video_get_info): Likewise.
12967         (grub_video_get_blit_format): Likewise.
12968         (grub_video_set_palette): Likewise.
12969         (grub_video_get_palette): Likewise.
12970         (grub_video_set_viewport): Likewise.
12971         (grub_video_get_viewport): Likewise.
12972         (grub_video_map_color): Likewise.
12973         (grub_video_map_rgb): Likewise.
12974         (grub_video_map_rgba): Likewise.
12975         (grub_video_fill_rect): Likewise.
12976         (grub_video_blit_glyph): Likewise.
12977         (grub_video_blit_bitmap): Likewise.
12978         (grub_video_blit_render_target): Likewise.
12979         (grub_video_scroll): Likewise.
12980         (grub_video_swap_buffers): Likewise.
12981         (grub_video_create_render_target): Likewise.
12982         (grub_video_delete_render_target): Likewise.
12983         (grub_video_set_active_render_target): Likewise.
12985         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12986         Undefined.
12987         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12989         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12990         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12991         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12992         instead of $(srcdir)/genkernsyms.sh.
12994         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12995         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12996         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12997         instead of $(srcdir)/genkernsyms.sh.
12999         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13000         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13001         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13002         instead of $(srcdir)/genkernsyms.sh.
13004         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13005         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13006         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13007         instead of $(srcdir)/genkernsyms.sh.
13009         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13010         genkernsyms.sh.
13012         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13013         genkernsyms.sh.
13014         (gensymlist.sh): New target.
13015         (genkernsyms.sh): Likewise.
13017         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13018         genkernsyms.sh.in and gensymlist.sh.in.
13020         * genkernsyms.sh: Removed.
13021         * gensymlist.sh: Likewise.
13023         * genkernsyms.sh.in: New file.
13024         * gensymlist.sh.in: Likewise.
13026 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13028         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13029         clobber "prefix", since we may have already set it manually.
13031 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13033         * kern/misc.c (abort): New alias for grub_abort.
13035 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
13037         A new machine-specific function "grub_machine_set_prefix" is
13038         defined. This is called after loading modules, so that a prefix
13039         initialization can use modules. Also, this change adds an
13040         intensive debugging feature for the memory manager via the
13041         configure option "--enable-mm-debug".
13043         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13044         PART.LEN.
13046         * kern/sparc64/ieee1275/init.c (abort): Removed.
13047         (grub_stop): Likewise.
13048         (grub_exit): New function.
13049         (grub_set_prefix): Renamed to ...
13050         (grub_machine_set_prefix): ... this.
13051         (grub_machine_init): Do not call grub_set_prefix.
13053         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13054         (grub_machine_set_prefix): ... this.
13055         (grub_machine_init): Do not call grub_set_prefix.
13057         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13058         (grub_machine_init): Do not set the prefix here.
13060         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13062         * kern/efi/init.c: Include grub/mm.h.
13063         (grub_efi_set_prefix): New function.
13065         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13066         (grub_efi_get_filename): New function.
13067         (grub_print_device_path): Renamed to ...
13068         (grub_efi_print_device_path): ... this.
13070         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13071         [MM_DEBUG] (grub_realloc): Likewise.
13072         [MM_DEBUG] (grub_free): Likewise.
13073         [MM_DEBUG] (grub_memalign): Likewise.
13074         [MM_DEBUG] (grub_mm_debug): New variable.
13075         [MM_DEBUG] (grub_debug_malloc): New function.
13076         [MM_DEBUG] (grub_debug_free): New function.
13077         [MM_DEBUG] (grub_debug_realloc): New function.
13078         [MM_DEBUG] (grub_debug_memalign): New function.
13080         * kern/misc.c (grub_abort): Print a newline to distinguish
13081         the message.
13083         * kern/main.c (grub_main): Call grub_machine_set_prefix and
13084         grub_set_root_dev after loading modules. This is necessary when
13085         setting a prefix depends on modules.
13087         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13088         (grub_efi_print_device_path): ... this.
13089         (grub_efi_get_filename): New prototype.
13090         (grub_efi_set_prefix): Likewise.
13092         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13093         and grub/disk.h.
13094         (grub_efidisk_get_device_handle): New prototype.
13095         (grub_efidisk_get_device_name): Likewise.
13097         * include/grub/mm.h: Include config.h.
13098         (MM_DEBUG): Removed.
13099         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13100         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13101         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13102         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13103         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13104         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13105         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13106         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13107         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13109         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13111         * disk/efi/efidisk.c: Include grub/partition.h.
13112         (iterate_child_devices): New function.
13113         (add_device): First, compare only last device path nodes, so that
13114         devices are sorted by the types.
13115         (grub_efidisk_get_device_handle): New function.
13116         (grub_efidisk_get_device_name): Likewise.
13118         * configure.ac (--enable-mm-debug): New option to enable the
13119         memory manager debugging feature. This makes the binary much
13120         bigger, so is disabled by default.
13122 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
13124         Use grub_abort instead of grub_stop, and grub_exit must be
13125         define in each architecture now. Also, this change adds support
13126         for EFI disks.
13128         * util/i386/pc/grub-probefs.c: Include grub/term.h.
13129         (grub_getkey): New function.
13130         (grub_term_get_current): Likewise.
13132         * util/i386/pc/grub-setup.c: Include grub/term.h.
13133         (grub_getkey): New function.
13134         (grub_term_get_current): Likewise.
13136         * util/misc.c (grub_stop): Renamed to ...
13137         (grub_exit): ... this.
13139         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13140         (grub_exit): ... this.
13141         (grub_machine_init): Use grub_abort instead of abort.
13142         (grub_stop): Removed.
13144         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13145         abort.
13147         * kern/i386/pc/startup.S (grub_exit): New function.
13148         (cold_reboot): New label.
13150         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13151         (grub_efi_init): Call grub_efidisk_init.
13152         (grub_efi_fini): Call grub_efidisk_fini.
13154         * kern/efi/efi.c: Include grub/mm.h.
13155         (grub_efi_console_control_guid): Renamed to ...
13156         (console_control_guid): ... this.
13157         (grub_efi_loaded_image_guid): Renamed to ...
13158         (loaded_image_guid): ... this.
13159         (grub_efi_locate_handle): New function.
13160         (grub_efi_open_protocol): Likewise.
13161         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13162         GRUB_EFI_CONSOLE_CONTROL_GUID.
13163         (grub_efi_exit): Removed.
13164         (grub_stop): Likewise.
13165         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13166         (grub_exit): New function.
13167         (grub_print_device_path): Likewise.
13169         * kern/rescue.c (grub_rescue_cmd_exit): New function.
13170         (grub_enter_rescue_mode): Register "exit".
13172         * kern/misc.c (grub_real_dprintf): A cosmetic change.
13173         (grub_abort): New function.
13175         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13177         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13179         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13181         * include/grub/efi/efi.h (grub_efi_exit): Removed.
13182         (grub_print_device_path): New prototype.
13183         (grub_efi_locate_handle): Likewise.
13184         (grub_efi_open_protocol): Likewise.
13186         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13187         * disk/efi/efidisk.c: Likewise.
13189         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13191         * include/grub/efi/console_control.h
13192         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13194         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13195         last 8 bytes as an array.
13196         (GRUB_EFI_DISK_IO_GUID): New macro.
13197         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13198         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13199         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13200         grub_uint8_t.
13201         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13202         (struct grub_efi_device_path): Rename the member "sub_type" to
13203         "subtype".
13204         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13205         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13206         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13207         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13208         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13209         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13210         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13211         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13212         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13213         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13214         (struct grub_efi_pci_device_path): New structure.
13215         (grub_efi_pci_device_path_t): New type.
13216         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13217         (struct grub_efi_pccard_device_path): New structure.
13218         (grub_efi_pccard_device_path_t): New type.
13219         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13220         (struct grub_efi_memory_mapped_device_path): New structure.
13221         (grub_efi_memory_mapped_device_path_t): New type.
13222         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13223         (struct grub_efi_vendor_device_path): New structure.
13224         (grub_efi_vendor_device_path_t): New type.
13225         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13226         (struct grub_efi_controller_device_path): New structure.
13227         (grub_efi_controller_device_path_t): New type.
13228         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13229         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13230         (struct grub_efi_acpi_device_path): New structure.
13231         (grub_efi_acpi_device_path_t): New type.
13232         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13233         (struct grub_efi_expanded_acpi_device_path): New structure.
13234         (grub_efi_expanded_acpi_device_path_t): New type.
13235         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13236         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13237         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13238         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13239         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13240         (struct grub_efi_atapi_device_path): New structure.
13241         (grub_efi_atapi_device_path_t): New type.
13242         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13243         (struct grub_efi_fibre_channel_device_path): New structure.
13244         (grub_efi_fibre_channel_device_path_t): New type.
13245         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13246         (struct grub_efi_1394_device_path): New structure.
13247         (grub_efi_1394_device_path_t): New type.
13248         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13249         (struct grub_efi_usb_device_path): New structure.
13250         (grub_efi_usb_device_path_t): New type.
13251         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13252         (struct grub_efi_usb_class_device_path): New structure.
13253         (grub_efi_usb_class_device_path_t): New type.
13254         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13255         (struct grub_efi_i2o_device_path): New structure.
13256         (grub_efi_i2o_device_path_t): New type.
13257         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13258         (struct grub_efi_mac_address_device_path): New structure.
13259         (grub_efi_mac_address_device_path_t): New type.
13260         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13261         (struct grub_efi_ipv4_device_path): New structure.
13262         (grub_efi_ipv4_device_path_t): New type.
13263         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13264         (struct grub_efi_ipv6_device_path): New structure.
13265         (grub_efi_ipv6_device_path_t): New type.
13266         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13267         (struct grub_efi_infiniband_device_path): New structure.
13268         (grub_efi_infiniband_device_path_t): New type.
13269         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13270         (struct grub_efi_uart_device_path): New structure.
13271         (grub_efi_uart_device_path_t): New type.
13272         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13273         (struct grub_efi_vendor_messaging_device_path): New structure.
13274         (grub_efi_vendor_messaging_device_path_t): New type.
13275         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13276         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13277         (struct grub_efi_hard_drive_device_path): New structure.
13278         (grub_efi_hard_drive_device_path_t): New type.
13279         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13280         (struct grub_efi_cdrom_device_path): New structure.
13281         (grub_efi_cdrom_device_path_t): New type.
13282         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13283         (struct grub_efi_vendor_media_device_path): New structure.
13284         (grub_efi_vendor_media_device_path_t): New type.
13285         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13286         (struct grub_efi_file_path_device_path): New structure.
13287         (grub_efi_file_path_device_path_t): New type.
13288         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13289         (struct grub_efi_protocol_device_path): New structure.
13290         (grub_efi_protocol_device_path_t): New type.
13291         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13292         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13293         (struct grub_efi_bios_device_path): New structure.
13294         (grub_efi_bios_device_path_t): New type.
13295         (struct grub_efi_disk_io): New structure.
13296         (grub_efi_disk_io_t): New type.
13297         (struct grub_efi_block_io_media): New structure.
13298         (grub_efi_block_io_media_t): New type.
13299         (struct grub_efi_block_io): New structure.
13300         (grub_efi_block_io_t): New type.
13302         * include/grub/misc.h (grub_stop): Removed.
13303         (grub_exit): New prototype.
13304         (grub_abort): Likewise.
13306         * include/grub/disk.h (enum grub_disk_dev_id): Added
13307         GRUB_DISK_DEVICE_EFIDISK_ID.
13309         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13310         disk/efi/efidisk.c.
13311         (kernel_syms.lst): Remove the target if an error occurs.
13313 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
13315         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13316         as it was simply too buggy.
13318 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
13320         * kern/misc.c (grub_lltoa): New function.
13321         (grub_vsprintf): Added support for the long long suffix,
13322         i.e. "ll".
13324 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
13326         * Makefile.in (LDFLAGS): Add variable.
13327         (LD): Remove variable.
13328         * configure.ac: Add -m32 to LDFLAGS.
13329         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13330         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13331         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13332         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13333         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13334         variables.
13335         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13336         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13337         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13339 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
13341         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13342         length for unknown glyph.
13344 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13346         Add support for pre-loaded modules into the EFI port.
13348         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13349         completely. Accept one more argument DIR. The caller has changed.
13351         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13353         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13354         (grub_efi_loaded_image_guid): New variable.
13355         (grub_efi_get_loaded_image): New function.
13356         (grub_arch_modules_addr): Likewise.
13358         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13359         prototype.
13361         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13362         (struct grub_efi_loaded_image): New structure.
13363         (grub_efi_loaded_image_t): New type.
13365 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13367         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13368         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13369         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13371 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
13373         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13375 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
13377         * DISTLIST: Added include/grub/efi/console.h,
13378         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13379         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13381         * include/grub/efi/console.h: New file.
13382         * include/grub/efi/time.h: Likewise.
13383         * include/grub/i386/efi/kernel.h: Likewise.
13384         * kern/efi/init.c: Likewise.
13385         * kern/efi/mm.c: Likewise.
13386         * term/efi/console.c: Likewise.
13388         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13389         (grub_stop): Removed.
13390         (grub_get_rtc): Likewise.
13391         (grub_machine_init): Simply call grub_efi_init.
13392         (grub_machine_fini): Call grub_efi_fini.
13394         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13395         (grub_efi_output_string): Removed.
13396         (grub_efi_stall): New function.
13397         (grub_stop): Likewise.
13398         (grub_get_rtc): Likewise.
13400         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13401         (grub_efi_stall): New prototype.
13402         (grub_efi_allocate_pages): Likewise.
13403         (grub_efi_free_pages): Likewise.
13404         (grub_efi_get_memory_map): Likewise.
13405         (grub_efi_mm_init): Likewise.
13406         (grub_efi_mm_fini): Likewise.
13407         (grub_efi_init): Likewise.
13408         (grub_efi_fini): Likewise.
13410         * include/grub/i386/efi/time.h: Do not include
13411         grub/symbol.h. Include grub/efi/time.h.
13412         (GRUB_TICKS_PER_SECOND): Removed.
13413         (grub_get_rtc): Likewise.
13415         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13416         Added padding. The EFI spec is buggy.
13417         (GRUB_EFI_BLACK): New macro.
13418         (GRUB_EFI_BLUE): Likewise.
13419         (GRUB_EFI_GREEN): Likewise.
13420         (GRUB_EFI_CYAN): Likewise.
13421         (GRUB_EFI_RED): Likewise.
13422         (GRUB_EFI_MAGENTA): Likewise.
13423         (GRUB_EFI_BROWN): Likewise.
13424         (GRUB_EFI_LIGHTGRAY): Likewise.
13425         (GRUB_EFI_BRIGHT): Likewise.
13426         (GRUB_EFI_DARKGRAY): Likewise.
13427         (GRUB_EFI_LIGHTBLUE): Likewise.
13428         (GRUB_EFI_LIGHTGREEN): Likewise.
13429         (GRUB_EFI_LIGHTCYAN): Likewise.
13430         (GRUB_EFI_LIGHTRED): Likewise.
13431         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13432         (GRUB_EFI_YELLOW): Likewise.
13433         (GRUB_EFI_WHITE): Likewise.
13434         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13435         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13436         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13437         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13438         (GRUB_EFI_BACKGROUND_RED): Likewise.
13439         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13440         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13441         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13442         (GRUB_EFI_TEXT_ATTR): Likewise.
13444         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13445         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13446         (kernel_mod_HEADERS): Added efi/time.h.
13448 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13450         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13451         include/grub/efi/api.h, include/grub/efi/console_control.h,
13452         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13453         include/grub/i386/efi/time.h, kern/efi/efi.c,
13454         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13455         and util/i386/efi/grub-mkimage.c.
13457         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13459         * genmk.rb (PModule#rule): Do not export symbols if
13460         #{prefix}_EXPORTS is set to "no".
13462         * conf/i386-efi.mk: New file.
13463         * conf/i386-efi.rmk: Likewise.
13464         * include/grub/efi/api.h: Likewise.
13465         * include/grub/efi/console_control.h: Likewise.
13466         * include/grub/efi/efi.h: Likewise.
13467         * include/grub/efi/pe32.h: Likewise.
13468         * include/grub/i386/efi/time.h: Likewise.
13469         * kern/efi/efi.c: Likewise.
13470         * kern/i386/efi/init.c: Likewise.
13471         * kern/i386/efi/startup.S: Likewise.
13472         * util/i386/efi/grub-mkimage.c: Likewise.
13474 2006-04-17  Marco Gerards  <marco@gnu.org>
13476         * include/grub/script.h: Include <grub/parser.h> and
13477         "grub_script.tab.h".
13478         (struct grub_lexer_param): New struct.
13479         (struct grub_parser_param): Likewise.
13480         (grub_script_create_arglist): Pass the state in an argument.
13481         (grub_script_add_arglist): Likewise.
13482         (grub_script_create_cmdline): Likewise.
13483         (grub_script_create_cmdblock): Likewise.
13484         (grub_script_create_cmdif): Likewise.
13485         (grub_script_create_cmdmenu): Likewise.
13486         (grub_script_add_cmd): Likewise.
13487         (grub_script_arg_add): Likewise.
13488         (grub_script_lexer_ref): Likewise.
13489         (grub_script_lexer_deref): Likewise.
13490         (grub_script_lexer_record_start): Likewise.
13491         (grub_script_lexer_record_stop): Likewise.
13492         (grub_script_mem_record): Likewise.
13493         (grub_script_mem_record_stop): Likewise.
13494         (grub_script_malloc): Likewise.
13495         (grub_script_yylex): Likewise.
13496         (grub_script_yyparse): Likewise.
13497         (grub_script_yyerror): Likewise.
13498         (grub_script_yylex): Likewise.
13499         (grub_script_lexer_init): Return the state.
13501         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13502         (grub_script_lexer_done): Likewise.
13503         (grub_script_lexer_getline): Likewise.
13504         (grub_script_lexer_refs): Likewise.
13505         (script): Likewise.
13506         (newscript): Likewise.
13507         (record): Likewise.
13508         (recording): Likewise.
13509         (recordpos): Likewise.
13510         (recordlen): Likewise.
13511         (grub_script_lexer_init): Return the state instead of setting
13512         global variables.
13513         (grub_script_lexer_ref): Use the newly added argument for state
13514         instead of globals.
13515         (grub_script_lexer_deref): Likewise.
13516         (grub_script_lexer_record_start): Likewise.
13517         (grub_script_lexer_record_stop): Likewise.
13518         (recordchar): Likewise.
13519         (nextchar): Likewise.
13520         (grub_script_yylex2): Likewise.
13521         (grub_script_yylex): Likewise.
13522         (grub_script_yyerror): Likewise.
13524         * normal/parser.y (func_mem): Removed variable.
13525         (menu_entry): Likewise.
13526         (err): Likewise.
13527         (%lex-param): New parser option.
13528         (%parse-param): Likewise.
13529         (script): Always return the AST.
13530         (argument): Pass the state around.
13531         (arguments): Likewise.
13532         (grubcmd): Likewise.
13533         (commands): Likewise.
13534         (function): Likewise.
13535         (menuentry): Likewise.
13536         (if_statement): Likewise.
13537         (if): Likewise.
13539         * normal/script.c (grub_script_memused): Removed variable.
13540         (grub_script_parsed): Likewise.
13541         (grub_script_malloc): Added a state argument.  Use that instead of
13542         global variables.
13543         (grub_script_mem_record): Likewise.
13544         (grub_script_mem_record_stop): Likewise.
13545         (grub_script_arg_add): Likewise.
13546         (grub_script_add_arglist): Likewise.
13547         (grub_script_create_cmdline): Likewise.
13548         (grub_script_create_cmdif): Likewise.
13549         (grub_script_create_cmdmenu): Likewise.
13550         (grub_script_add_cmd): Likewise.
13551         (grub_script_parse): Setup the state before calling the parser.
13553 2006-04-16  Marco Gerards  <marco@gnu.org>
13555         * normal/command.c (grub_command_init): Remove the title command.
13557         * normal/lexer.c (grub_script_yylex): Renamed from this...
13558         (grub_script_yylex2): ... to this.
13559         (grub_script_yylex): New function.  Temporary
13560         introduced to filter some tokens.
13561         (grub_script_yyerror): Print a newline.
13563         * normal/main.c (read_config_file): Output information about the
13564         lines that contain errors.  Wait for a key after all lines have
13565         been processed.  Don't return an empty menu.
13567         * normal/parser.y (func_mem): Don't initialize.
13568         (menu_entry): Likewise.
13569         (err): New variable.
13570         (script): Don't return anything when an error was encountered.
13571         (ws, returns): Removed rules.
13572         (argument): Disabled concatenated variable support.
13573         (arguments): Remove explicit separators.
13574         (grubcmd): Likewise.
13575         (function): Likewise.
13576         (menuentry): Likewise.
13577         (if): Likewise.
13578         (commands): Likewise.  Add error handling.
13580         * normal/script.c (grub_script_create_cmdline): If
13581         `grub_script_parsed' is 0, assume the parser encountered an error.
13583 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13585         * configure.ac: Add support for EFI. Fix the typo
13586         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13588 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13590         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13591         foreign multibyte characters should be shown correctly.
13593 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13595         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13596         calculation.
13597         (read_config_file): Made it to close file before returning.
13599 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13601         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13602         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13603         video/i386/pc/vbefill.c.
13605         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13606         video/i386/pc/vbefill.c.
13608         * include/grub/video.h (grub_video_blit_format): New enum.
13609         (grub_video_mode_info): Added new member blit_format.
13610         (grub_video_get_blit_format): New function prototype.
13612         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13613         function prototype.
13614         (grub_video_vbe_map_rgb): Likewise.
13615         (grub_video_vbe_unmap_color): Likewise.
13617         * include/grub/i386/pc/vbeblit.h: New file.
13619         * include/grub/i386/pc/vbefill.h: New file.
13621         * video/video.c (grub_video_get_blit_format): New function.
13622         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13623         (grub_video_vbe_map_rgb): Likewise.
13624         (grub_video_vbe_unmap_color): Likewise.
13626         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13627         optimized fills.
13628         (grub_video_vbe_blit_render_target): Changed to use more optimized
13629         blits.
13630         (grub_video_vbe_setup): Added detection for optimized settings.
13631         (grub_video_vbe_create_render_target): Likewise.
13633         * video/i386/pc/vbeblit.c: New file.
13635         * video/i386/pc/vbefill.c: New file.
13637 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13639         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13640         here...
13642         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13643         parsing to support both hex and dec ranges.  If filename was missing
13644         show usage information.
13646 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13648         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13649         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13651         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13652         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13653         (video_mod_SOURCES): Added.
13654         (video_mod_CFLAGS): Likewise.
13655         (video_mod_LDFLAGS): Likewise.
13656         (gfxterm_mod_SOURCES): Likewise.
13657         (gfxterm_mod_CFLAGS): Likewise.
13658         (gfxterm_mod_LDFLAGS): Likewise.
13659         (videotest_mod_SOURCES): Likewise.
13660         (videotest_mod_CFLAGS): Likewise.
13661         (videotest_mod_LDFLAGS): Likewise.
13662         (vesafb_mod_SOURCES): Removed.
13663         (vesafb_mod_CFLAGS): Likewise.
13664         (vesafb_mod_LDFLAGS): Likewise.
13665         (vga_mod_SOURCES): Likewise.
13666         (vga_mod_CFLAGS): Likewise.
13667         (vga_mod_LDFLAGS): Likewise.
13669         * commands/videotest.c: New file.
13671         * font/manager.c (fill_with_default_glyph): Modified to use
13672         grub_font_glyph.
13673         (grub_font_get_glyph): Likewise.
13674         (fontmanager): Renamed from this...
13675         (font_manager): ... to this.
13677         * include/grub/font.h (grub_font_glyph): Added new structure.
13678         (grub_font_get_glyph): Modified to use grub_font_glyph.
13680         * include/grub/misc.h (grub_abs): Added as inline function.
13682         * include/grub/video.h: New file.
13684         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13685         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13686         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13687         (grub_vbe_get_controller_info): Renamed from this...
13688         (grub_vbe_bios_get_controller_info): ... to this.
13689         (grub_vbe_get_mode_info): Renamed from this...
13690         (grub_vbe_bios_get_mode_info): ... to this.
13691         (grub_vbe_set_mode): Renamed from this...
13692         (grub_vbe_bios_set_mode): ... to this.
13693         (grub_vbe_get_mode): Renamed from this...
13694         (grub_vbe_bios_get_mode): ... to this.
13695         (grub_vbe_set_memory_window): Renamed from this...
13696         (grub_vbe_bios_set_memory_window): ... to this.
13697         (grub_vbe_get_memory_window): Renamed from this...
13698         (grub_vbe_bios_get_memory_window): ... to this.
13699         (grub_vbe_set_scanline_length): Renamed from this...
13700         (grub_vbe_set_scanline_length): ... to this.
13701         (grub_vbe_get_scanline_length): Renamed from this...
13702         (grub_vbe_bios_get_scanline_length): ... to this.
13703         (grub_vbe_set_display_start): Renamed from this...
13704         (grub_vbe_bios_set_display_start): ... to this.
13705         (grub_vbe_get_display_start): Renamed from this...
13706         (grub_vbe_bios_get_display_start): ... to this.
13707         (grub_vbe_set_palette_data): Renamed from this...
13708         (grub_vbe_bios_set_palette_data): ... to this.
13709         (grub_vbe_set_pixel_rgb): Removed.
13710         (grub_vbe_set_pixel_index): Likewise.
13712         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13713         from this...
13714         (grub_vbe_bios_get_controller_info): ... to this.
13715         (grub_vbe_get_mode_info): Renamed from this...
13716         (grub_vbe_bios_get_mode_info): ... to this.
13717         (grub_vbe_set_mode): Renamed from this...
13718         (grub_vbe_bios_set_mode): ... to this.
13719         (grub_vbe_get_mode): Renamed from this...
13720         (grub_vbe_bios_get_mode): ... to this.
13721         (grub_vbe_set_memory_window): Renamed from this...
13722         (grub_vbe_bios_set_memory_window): ... to this.
13723         (grub_vbe_get_memory_window): Renamed from this...
13724         (grub_vbe_bios_get_memory_window): ... to this.
13725         (grub_vbe_set_scanline_length): Renamed from this...
13726         (grub_vbe_set_scanline_length): ... to this.
13727         (grub_vbe_get_scanline_length): Renamed from this...
13728         (grub_vbe_bios_get_scanline_length): ... to this.
13729         (grub_vbe_set_display_start): Renamed from this...
13730         (grub_vbe_bios_set_display_start): ... to this.
13731         (grub_vbe_get_display_start): Renamed from this...
13732         (grub_vbe_bios_get_display_start): ... to this.
13733         (grub_vbe_set_palette_data): Renamed from this...
13734         (grub_vbe_bios_set_palette_data): ... to this.
13735         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13736         getting corrupted after calling it.  Added more pushes and pops.
13737         (grub_vbe_bios_set_mode): Likewise.
13738         (grub_vbe_bios_get_mode): Likewise.
13739         (grub_vbe_bios_get_memory_window): Likewise.
13740         (grub_vbe_bios_set_scanline_length): Likewise.
13741         (grub_vbe_bios_get_scanline_length): Likewise.
13742         (grub_vbe_bios_get_display_start): Likewise.
13743         (grub_vbe_bios_set_palette_data): Likewise.
13745         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13746         (cl_insert): Likewise.
13747         (cl_delete): Likewise.
13749         * term/gfxterm.c: New file.
13751         * term/i386/pc/vesafb.c: Removed file.
13753         * video/video.c: New file.
13755         * video/i386/pc/vbe.c (real2pm): Added new function.
13756         (grub_video_vbe_draw_pixel): Likewise.
13757         (grub_video_vbe_get_video_ptr): Likewise.
13758         (grub_video_vbe_get_pixel): Likewise
13759         (grub_video_vbe_init): Likewise.
13760         (grub_video_vbe_fini): Likewise.
13761         (grub_video_vbe_setup): Likewise.
13762         (grub_video_vbe_get_info): Likewise.
13763         (grub_video_vbe_set_palette): Likewise.
13764         (grub_video_vbe_get_palette): Likewise.
13765         (grub_video_vbe_set_viewport): Likewise.
13766         (grub_video_vbe_get_viewport): Likewise.
13767         (grub_video_vbe_map_color): Likewise.
13768         (grub_video_vbe_map_rgb): Likewise.
13769         (grub_video_vbe_map_rgba): Likewise.
13770         (grub_video_vbe_unmap_color): Likewise.
13771         (grub_video_vbe_fill_rect): Likewise.
13772         (grub_video_vbe_blit_glyph): Likewise.
13773         (grub_video_vbe_blit_bitmap): Likewise.
13774         (grub_video_vbe_blit_render_target): Likewise.
13775         (grub_video_vbe_scroll): Likewise.
13776         (grub_video_vbe_swap_buffers): Likewise.
13777         (grub_video_vbe_create_render_target): Likewise.
13778         (grub_video_vbe_delete_render_target): Likewise.
13779         (grub_video_vbe_set_active_render_target): Likewise.
13780         (grub_vbe_set_pixel_rgb): Remove function.
13781         (grub_vbe_set_pixel_index): Likewise.
13782         (index_color_mode): Remove static variable.
13783         (active_mode): Likewise.
13784         (framebuffer): Likewise.
13785         (bytes_per_scan_line): Likewise.
13786         (grub_video_vbe_adapter): Added new static variable.
13787         (framebuffer): Likewise.
13788         (render_target): Likewise.
13789         (initial_mode): Likewise.
13790         (mode_in_use): Likewise.
13791         (mode_list): Likewise.
13793 2006-03-10  Marco Gerards  <marco@gnu.org>
13795         * configure.ac (AC_INIT): Bumped to 1.93.
13797         * DISTLIST: Added `include/grub/hfs.h'.
13799 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13801         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13802         18H, which might help the BIOS falling back to next boot media.
13804 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13806         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13807         Poe Chen <poe.poechen@gmail.com>.
13809 2006-01-17  Marco Gerards  <marco@gnu.org>
13811         * include/grub/normal.h: Include <grub/script.h>.
13812         (grub_command_list): Removed struct.
13813         (grub_command_list_t): Removed type.
13814         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13815         members `commands' and `sourcecode'.
13816         * include/grub/script.h: Add inclusion guards.
13817         (grub_script_cmd_menuentry): New struct.
13818         (grub_script_execute_menuentry): New prototype.
13819         (grub_script_lexer_record_start): Likewise.
13820         (grub_script_lexer_record_stop): Likewise.
13821         * normal/execute.c (grub_script_execute_menuentry): New function.
13822         * normal/lexer.c (record, recording, recordpos, recordlen): New
13823         variables.
13824         (grub_script_lexer_record_start): New function.
13825         (grub_script_lexer_record_stop): Likewise.
13826         (recordchar): Likewise.
13827         (nextchar): Likewise.
13828         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13829         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13830         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13831         (current_menu): New variable.
13832         (free_menu): Mainly rewritten.
13833         (grub_normal_menu_addentry): New function.
13834         (read_config_file): Rewritten.
13835         * normal/menu.c (run_menu_entry): Mainly rewritten.
13836         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13837         the menu entry.
13838         (run): Mainly rewritten.
13839         * normal/parser.y (menu_entry): New variable.
13840         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13841         (menuentry): New rule.
13842         (command): Add `menuentry'.
13843         (if_statement): Allow additional returns before `fi'.
13844         * normal/script.c (grub_script_create_cmdmenu): New function.
13846 2006-01-03  Marco Gerards  <marco@gnu.org>
13848         * INSTALL: GNU Bison is required.
13849         * configure.ac: Rewritten the test to detect Bison.
13850         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13851         <xun.sun.cn@gmail.com>.
13853 2006-01-03  Marco Gerards  <marco@gnu.org>
13855         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13856         the HFS+ filesystem to filesystem blocks.
13857         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13858         GCC warning is silenced.
13860 2006-01-03  Marco Gerards  <marco@gnu.org>
13862         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13863         read from disk from big endian to host byte order.
13865 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13867         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13868         documentation.
13869         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13870         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13871         embedded HFS+ filesystem.
13872         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13873         (grub_hfs_sblock): Move from here...
13874         * include/grub/hfs.h: To here...  New file.
13875         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13876         documentation.
13877         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13878         New macros.
13879         (grub_hfsplus_volheader): Change type of member `magic' to
13880         `grub_uint16_t'.
13881         (grub_hfsplus_data): Add new member `embedded_offset'.
13882         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13883         returned block.
13884         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13885         Calculate the offset.
13887 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13889         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13890         Removed.
13891         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13893 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13895         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13896         ENV->NAME is NULL after allocating ENV->VALUE.
13898 2005-12-25  Marco Gerards  <marco@gnu.org>
13900         * kern/env.c (grub_env_set): Rewritten the error handling code.
13902 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13904         * geninit.sh: Made more robust, and more portable.
13906 2005-12-25  Marco Gerards  <marco@gnu.org>
13908         Add support for Apple HFS+ filesystems.
13910         * fs/hfsplus.c: New file.
13912         * DISTLIST: Added `fs/hfsplus.c'.
13914         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13915         (hfsplus_mod_SOURCES): New variable.
13916         (hfsplus_mod_CFLAGS): Likewise.
13917         (hfsplus_mod_LDFLAGS): Likewise.
13918         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13919         (grub_setup_SOURCES): Likewise.
13920         (grub_mkdevicemap_SOURCES): Likewise.
13921         (grub_emu_SOURCES): Likewise.
13922         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13924         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13926         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13928 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13930         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13931         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13932         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13933         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13934         normal/lexer.c, normal/parser.y, normal/script.c, and
13935         partmap/gpt.c.
13936         Removed kern/sparc64/cache.c.
13938         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13939         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13940         grub_emu_init.c.
13942         * configure.ac (AC_INIT): Bumped to 1.92.
13944 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13946         * kern/err.c (grub_error_push): Added new function to support error
13947         stacks.
13948         (grub_error_pop): Likewise.
13949         (grub_error_stack_items): New local variable to support error stacks.
13950         (grub_error_stack_pos): Likewise.
13951         (grub_error_stack_assert): Likewise.
13952         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13953         stack depth.
13954         (grub_print_error): Added support to print errors from error stack.
13956         * include/grub/err.h (grub_error_push): Added function prototype.
13957         (grub_error_pop): Likewise.
13959 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13961         * configure.ac: Accept `powerpc64' as host_cpu.
13962         (amd64): Rename to `biarch32'.
13964         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13965         non-cacheline-aligned addresses.
13967         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13968         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13969         if `size' is non-zero.
13971 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13973         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13974         and `cd' to make sure the filename is not prefixed with a
13975         directory name.
13976         (pkgdata_MODULES): Add `gpt.mod'.
13977         (gpt_mod_SOURCES): New variable.
13978         (gpt_mod_CFLAGS): Likewise.
13979         (gpt_mod_LDFLAGS): Likewise.
13981         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13983         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13984         New macro.
13986         * partmap/gpt.c: New file.
13988         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13989         GPT partition map is detected.
13991 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13993         * commands/i386/pc/play.c: New file.
13994         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13995         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13996         macros.
13998 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
14000         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14001         ((unused))' to silence gcc warning.
14003 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
14005         * configure.ac: Correct `AC_PROG_YACC' test.
14007 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14009         * util/powerpc/ieee1275/grub-install.in: Run the mount point
14010         check before installing files.
14012 2005-11-22  Mike Small  <smallm@panix.com>
14014         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14015         number regex so multidigit numbers are recognized correctly.
14017 2005-11-22  Mike Small  <smallm@panix.com>
14019         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14020         debugging message before attempting to claim memory.
14021         (grub_rescue_cmd_initrd): Add a claim debugging message and try
14022         multiple addresses in case of failure.
14024 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14026         * term/tparm.c (get_space): Remove empty `if' statement.
14028         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14030         * kern/parser.c (check_varstate): Rename `state' to 's'.
14032 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14034         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
14035         variable definitions to the beginning of each function.  Sort stack
14036         variables by size.
14037         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
14038         `buf' argument to `char *'.
14040 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14042         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14043         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14044         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14045         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14046         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14047         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14048         configfile.mod, search.mod, gzio.mod and test.mod.
14049         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14050         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14051         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14052         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14053         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14054         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14055         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14056         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14057         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14058         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14059         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14060         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14061         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14062         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14063         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14064         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14065         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14066         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14067         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14068         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14069         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14070         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14071         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14073         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14074         `grep --include'.
14075         (pkgdata_MODULES): Add test.mod.
14077 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14079         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
14080         appending to variables with "+=".
14081         (PModule): Use full pathname to generate *.lst filenames.
14083         * Makefile.in: Fixed list rules moved from genmk.rb.
14084         (.DELETE_ON_ERROR): New special target.
14085         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14087         * conf/i386-pc.rmk: Include conf/common.mk.
14088         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14089         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14090         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14091         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14092         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14093         configfile.mod, search.mod, gzio.mod and test.mod.
14094         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14095         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14096         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14097         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14098         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14099         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14100         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14101         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14102         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14103         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14104         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14105         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14106         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14107         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14108         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14109         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14110         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14111         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14112         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14113         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14114         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14115         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14116         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14117         here...
14118         * conf/common.rmk: ... to here.  New file.
14120         * conf/common.mk: New file.
14122 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
14124         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14125         (grub_script.tab.c): ... here.
14127         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14128         (grub_script.tab.c): ... here.
14130         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14131         (grub_script.tab.c): ... here.
14133         * normal/command.c (grub_command_find): Fixed a memory leak of
14134         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14136 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14138         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14139         "@" which marks the start of a comment on ARM.
14140         (VARIABLE): Likewise.
14142 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14144         Add support for Linux/ADFS partition tables.
14146         * partmap/acorn.c: New file.
14148         * include/grub/acorn_filecore.h: Likewise.
14150         * DISTLIST: Added `partmap/acorn.c' and
14151         `include/grub/acorn_filecore.h'.
14153         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14154         `partmap/acorn.c'.
14155         (pkgdata_MODULES): Add `acorn.mod'.
14156         (acorn_mod_SOURCES): New variable.
14157         (acorn_mod_CFLAGS): Likewise.
14159         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14160         `partmap/acorn.c'.
14161         (pkgdata_MODULES): Add `acorn.mod'.
14162         (acorn_mod_SOURCES): New variable.
14163         (acorn_mod_CFLAGS): Likewise.
14165         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14166         (pkgdata_MODULES): Add `acorn.mod'.
14167         (acorn_mod_SOURCES): New variable.
14168         (acorn_mod_CFLAGS): Likewise.
14169         (acorn_mod_LDFLAGS): Likewise.
14171         * include/types.h (grub_disk_addr_t): New typedef.
14173 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
14175         * geninit.sh: New file.
14177         * geninitheader.sh: Likewise.
14179         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14180         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14181         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14182         * commands/configfile.c (grub_configfile_init)
14183         (grub_configfile_fini): Likewise.
14184         * commands/default.c (grub_default_init, grub_default_fini):
14185         Likewise.
14186         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14187         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14188         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14189         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14190         Likewise.
14191         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14192         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14193         Likewise.
14194         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14195         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14196         Likewise.
14197         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14198         Likewise.
14199         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14200         Likewise.
14201         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14202         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14203         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14204         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14205         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14206         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14207         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14208         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14209         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14210         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14211         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14212         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14213         * partmap/amiga.c (grub_amiga_partition_map_init)
14214         (grub_amiga_partition_map_fini): Likewise.
14215         * partmap/apple.c (grub_apple_partition_map_init)
14216         (grub_apple_partition_map_fini): Likewise.
14217         * partmap/pc.c (grub_pc_partition_map_init)
14218         (grub_pc_partition_map_fini): Likewise.
14219         * partmap/sun.c (grub_sun_partition_map_init,
14220         grub_sun_partition_map_fini): Likewise.
14221         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14222         Likewise.
14224         * util/grub-emu.c: Include <grub_modules_init.h>.
14225         (main): Don't initialize and de-initialize any modules directly,
14226         use `grub_init_all' and `grub_fini_all' instead.
14228         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14229         `grub_vesafb_mod_init'.
14230         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
14231         all users.
14232         * term/i386/pc/vga.c (grub_vga_init): Renamed to
14233         `grub_vga_mod_init'.  Updated all users.
14234         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14236         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14237         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14238         rules.
14240         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14241         Generate a function to initialize the module in utilities.
14242         Updated all callers.
14243         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
14244         initialize the module in utilities.  Updated all callers.
14246 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14248         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14249         escape sequence and a literal ^L to clear the screen.
14251         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14252         when returning from Open Firmware.
14254 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14256         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14257         (grub_ofconsole_height): Likewise.
14258         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14259         manually insert a '\n'.
14260         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14261         `grub_ofconsole_height'.  Return early if these are already set.
14263 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
14265         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14266         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14267         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14268         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14269         and `normal/script.c'.
14270         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14271         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14272         (test_mod_SOURCES): New variable.
14273         (test_mod_CFLAGS): Likewise.
14274         (test_mod_LDFLAGS): Likewise.
14275         (pkgdata_MODULES): Add `test.mod'.
14276         (grub_script.tab.c): New rule.
14277         (grub_script.tab.h): Likewise.
14279 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
14281         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14282         `commands/test.c', `normal/execute.c', `normal/lexer.c',
14283         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14284         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14285         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14286         (test_mod_SOURCES): New variable.
14287         (test_mod_CFLAGS): Likewise.
14288         (pkgdata_MODULES): Add `test.mod'.
14289         (grub_script.tab.c): New rule.
14290         (grub_script.tab.h): Likewise.
14292 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
14294         Add initial scripting support.
14296         * commands/test.c: New file.
14297         * include/grub/script.h: Likewise.
14298         * normal/execute.c: Likewise.
14299         * normal/function.c: Likewise.
14300         * normal/lexer.c: Likewise.
14301         * normal/parser.y: Likewise.
14302         * normal/script.c: Likewise.
14304         * configure.ac: Add `AC_PROG_YACC' test.
14306         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14307         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14308         `normal/function.c' and `normal/script.c'.
14309         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14310         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14311         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14312         variables.
14313         (pkgdata_MODULES): Add `test.mod'.
14314         (grub_script.tab.c): New rule.
14315         (grub_script.tab.h): Likewise.
14317         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14319         * include/grub/normal.h (grub_test_init): New prototype.
14320         (grub_test_fini): Likewise.
14322         * normal/command.c: Include <grub/script.h>.
14323         (grub_command_execute): Rewritten.
14325         * util/grub-emu.c (main): Call `grub_test_init' and
14326         `grub_test_fini'.
14328 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14330         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14331         to 0.
14332         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14333         there are no pending characters.
14335 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14337         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14338         `grub_strndup' to drop device arguments. Replace unnecessary
14339         `grub_strndup' with `grub_strdup'.
14341 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14343         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14344         `debug' environment variable has been set.
14346 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14348         * Makefile.in (install-local): Use $(DATA).
14349         (uninstall): Likewise.
14350         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14351         (sbin_UTILITIES): ... to here.
14352         (sbin_SCRIPTS): New variable.
14353         (grub_install_SOURCES): New variable.
14354         * util/powerpc/ieee1275/grub-install.in: New file.
14355         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14356         variable.
14357         (add_segments): Call `grub_util_get_path'.
14359 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
14361         From Timothy Baldwin:
14362         * commands/ls.c (grub_ls_list_files): Close FILE with
14363         grub_file_close.
14364         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14366 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
14368         * include/grub/parser.h: New file.
14370         * kern/parser.c: Likewise.
14372         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14373         (grub_setup_SOURCES): Likewise.
14374         (grub_probefs_SOURCES): Likewise.
14375         (grub_emu_SOURCES): Likewise.
14376         (kernel_img_HEADERS): Add `parser.h'.
14378         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14379         (grub_emu_SOURCES): Add `kern/parser.c'.
14380         (grubof_SOURCES): Likewise.
14382         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14383         (grubof_SOURCES): Add `kern/parser.c'.
14385         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14387         * kern/misc.c (grub_split_cmdline): Removed function.
14389         * kern/rescue.c: Include <grub/parser.h>.
14390         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14391         of `grub_split_cmdline'.
14393         * normal/command.c: Include <grub/parser.h>.
14394         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
14395         of `grub_split_cmdline'.
14397         * normal/completion.c: Include <grub/parser.h>.
14398         (cmdline_state): New variable.
14399         (iterate_dir): End the filename with a quote depending on the
14400         command line state.
14401         (get_state): new function.
14402         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14403         split the arguments and determine the current argument.  When the
14404         argument string is not quoted, escape all spaces.
14406 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14408         * normal/sparc64/setjmp.S: New file.
14410 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14412         * include/grub/sparc64/libgcc.h: New file.
14413         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14414         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14415         normal/sparc64/setjmp.c.
14417 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14419         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14420         * kern/sparc64/cache.S: New file.
14421         * kern/sparc64/cache.c: Removed.
14422         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14423         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
14424         -mtune=ultrasparc.
14425         (COMMON_LDFLAGS): Add -melf64_sparc.
14426         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14427         (grubof_SOURCES): Use cache.S instead of cache.c.
14428         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14429         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14430         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14431         commented though.
14432         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14433         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14434         (linux_mod_CFLAGS): Commented out.
14435         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14436         out because module isn't built.
14437         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14438         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14439         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14440         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14441         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14442         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14443         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14444         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14445         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14446         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14447         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14448         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14449         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14450         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14452 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14454         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14455         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14456         longer, because HFS should not be used on PC.
14458 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14460         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14461         consistently within the loop.
14463 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14465         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14466         directory can not be read.
14468 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14470         * configure.ac (AC_INIT): Increase the version number to 1.91.
14472         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14473         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14474         term/i386/pc/serial.c.
14476 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14478         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14479         file size must be permitted.
14481         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14482         between %ah and %al.
14484 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14486         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14487         grub_uint64_t.
14488         Call the hook with a NUL-terminated filename.
14489         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14490         grub_cpu_to_be32.
14492         * kern/term.c (cursor_state): New variable.
14493         (grub_term_set_current): Reset the cursor state on a new
14494         terminal.
14495         (grub_setcursor): Rewritten to use CURSOR_STATE.
14496         (grub_getcursor): New function.
14498         * include/grub/term.h (grub_getcursor): New prototype.
14500         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14501         integers on ARM. Reported by Timothy Baldwin
14502         <T.E.Baldwin99@members.leeds.ac.uk>.
14504 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14506         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14507         allocated.
14508         (grub_sfs_dir): Likewise.
14510 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14512         Add support for the SFS filesystem.
14514         * fs/sfs.c: New file.
14516         * DISTLIST: Added `fs/sfs.c'.
14518         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14519         (grub_probefs_SOURCES): Likewise.
14520         (grub_emu_SOURCES): Likewise.
14521         (pkgdata_MODULES): Add `sfs.mod'.
14522         (sfs_mod_SOURCES): New variable.
14523         (sfs_mod_CFLAGS): Likewise.
14524         (sfs_mod_LDFLAGS): Likewise.
14526         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14527         (pkgdata_MODULES): Add `sfs.mod'.
14528         (sfs_mod_SOURCES): New variable.
14529         (sfs_mod_CFLAGS): Likewise.
14531         * util/grub-emu.c (main): Call `grub_sfs_init' and
14532         `grub_sfs_fini'.
14534         * include/grub/fs.h (grub_sfs_init): New prototype.
14535         (grub_sfs_fini): Likewise.
14537 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14539         Add support for the AFFS filesystem.
14541         * fs/affs.c: New file.
14543         * DISTLIST: Added `fs/affs.c'.
14545         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14546         (grub_probefs_SOURCES): Likewise.
14547         (grub_emu_SOURCES): Likewise.
14548         (pkgdata_MODULES): Add `affs.mod'.
14549         (affs_mod_SOURCES): New variable.
14550         (affs_mod_CFLAGS): Likewise.
14551         (affs_mod_LDFLAGS): Likewise.
14553         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14554         (pkgdata_MODULES): Add `affs.mod'.
14555         (affs_mod_SOURCES): New variable.
14556         (affs_mod_CFLAGS): Likewise.
14558         * util/grub-emu.c (main): Call `grub_affs_init' and
14559         `grub_affs_fini'.
14561         * include/grub/fs.h (grub_affs_init): New prototype.
14562         (grub_affs_fini): Likewise.
14564 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14566         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14568 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14570         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14571         `-m32' to CFLAGS.
14573         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14574         linking.
14576         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14577         (COMMON_LDFLAGS): New variable.
14578         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14579         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14580         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14581         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14582         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14583         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14584         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14585         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14586         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14587         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14588         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14589         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14590         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14591         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14592         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14593         variables.
14594         (normal_mod_ASFLAGS): Add `-m32'.
14596         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14597         (grub_host_size_t, grub_host_ssize_t): New types.
14598         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14599         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14600         `GRUB_HOST_SIZEOF_VOID_P'.
14602         * include/grub/kernel.h (struct grub_module_header): Type of
14603         member offset changed to `grub_host_off_t'.  Type of member size
14604         changed to `grub_host_size_t'.
14605         (struct grub_module_info): Type of member offset changed to
14606         `grub_host_off_t'.  Type of member size changed to
14607         `grub_host_size_t'.
14609 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14611         Make GRUB's kernel compliant to Multiboot Specification.
14613         * kern/i386/pc/startup.S (multiboot_header): New label.
14614         (multiboot_entry): Likewise.
14615         (multiboot_trampoline): Likewise.
14617         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14618         Increased to 0x4A0.
14620         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14621         put parentheses after a question mark.
14622         [!GRUB_UTIL] (my_mod): New variable.
14624         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14626 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14628         Adds support for the XFS filesystem.  Btrees are not supported
14629         yet.
14631         * fs/xfs.c: New file.
14633         * DISTLIST: Added `fs/xfs.c'.
14635         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14636         (grub_probefs_SOURCES): Likewise.
14637         (grub_emu_SOURCES): Likewise.
14638         (pkgdata_MODULES): Add `xfs.mod'.
14639         (xfs_mod_SOURCES): New variable.
14640         (xfs_mod_CFLAGS): Likewise.
14642         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14643         (pkgdata_MODULES): Add `xfs.mod'.
14644         (xfs_mod_SOURCES): New variable.
14645         (xfs_mod_CFLAGS): Likewise.
14647         * util/grub-emu.c (main): Call `grub_xfs_init' and
14648         `grub_xfs_fini'.
14650         * include/grub/fs.h (grub_xfs_init): New prototype.
14651         (grub_xfs_fini): Likewise.
14654 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14656         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14657         color modes, allow greater than 16 colors to be configured as
14658         a default palette.
14660 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14662         * normal/completion.c (complete_arguments): Add the qualifier
14663         const into OPTIONS.
14665         From Omniflux <omniflux+lists@omniflux.com>:
14666         * include/grub/terminfo.h: New file.
14667         * include/grub/tparm.h: Likewise.
14668         * include/grub/i386/pc/serial.h: Likewise.
14669         * term/terminfo.c: Likewise.
14670         * term/tparm.c: Likewise.
14671         * term/i386/pc/serial.c: Likewise.
14672         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14673         serial.mod.
14674         (terminfo_mod_SOURCES): New variable.
14675         (terminfo_mod_CFLAGS): Likewise.
14676         (serial_mod_SOURCES): Likewise.
14677         (serial_mod_CFLAGS): Likewise.
14679 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14681         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14682         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14683         and kern/powerpc/ieee1275/cmain.c, respectively.
14685         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14686         * kern/powerpc/ieee1275/crt0.S: ... here.
14688         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14689         * kern/powerpc/ieee1275/cmain.c: ... here.
14691         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14692         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14693         instead of boot/powerpc/ieee1275/crt0.S and
14694         boot/powerpc/ieee1275/cmain.c, respectively.
14696         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14697         sectors. It was not used anyway.
14699 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14701         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14702         `unused parameter' warning.
14704 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14706         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14707         function.
14708         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14709         getcharwidth.
14711 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14713         * include/grub/normal.h (enum grub_completion_type): Added
14714         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14716         * normal/cmdline.c (print_completion): Handle
14717         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14718         * normal/menu_entry.c (store_completion): Likewise.
14720         * normal/completion.c (complete_arguments): New function.
14721         (grub_normal_do_completion): Call `complete_arguments' when the
14722         current words start with a dash.
14724 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14726         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14727         `gzio.mod' instead of `io.mod').
14729 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14731         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14732         (DISTDIRS): Added io and video.
14733         Rewrite the search routine to make an output consistently.
14735         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14736         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14737         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14738         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14739         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14740         util/powerpc/ieee1275/misc.c.
14742         * include/grub/gzio.h: New file.
14743         * io/gzio.c: Likewise.
14745         * kern/file.c (grub_file_close): Call grub_device_close only if
14746         FILE->DEVICE is not NULL.
14748         * include/grub/mm.h [!NULL] (NULL): New macro.
14750         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14752         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14753         (pkgdata_MODULES): Added gzio.mod.
14754         (gzio_mod_SOURCES): New variable.
14755         (gzio_mod_CFLAGS): Likewise.
14757         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14758         (pkgdata_MODULES): Added gzio.mod.
14759         (gzio_mod_SOURCES): New variable.
14760         (gzio_mod_CFLAGS): Likewise.
14762         * commands/cat.c: Include grub/gzio.h.
14763         (grub_cmd_cat): Use grub_gzfile_open instead of
14764         grub_file_open.
14766         * commands/cmp.c: Include grub/gzio.h.
14767         (grub_cmd_cmp): Use grub_gzfile_open instead of
14768         grub_file_open.
14770         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14771         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14772         grub_file_open.
14773         (grub_rescue_cmd_module): Likewise.
14775 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14777         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14778         kern/sparc64/ieee1275/init.c because it contains _start.
14779         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14781 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14783         * configure.ac: Add support for sparc64 host with ieee1275
14784         firmware.
14785         * configure: Generated from configure.ac.
14786         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14787         instead of int.
14788         (grub_ofdisk_read): Likewise.
14789         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14790         pointers as (void *) to remove a warning.
14791         (grub_ofdisk_close): Likewise.
14792         (grub_ofdisk_read): Likewise.
14793         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14794         returns, so make it return void to remove a warning.
14795         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14796         Corresponding prototype change.
14797         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14798         values, and cast the pointers as (void *) to remove a warning.
14799         (grub_mm_dump): Likewise.
14800         * conf/sparc64-ieee1275.mk: New file.
14801         * conf/sparc64-ieee1275.rmk: Likewise.
14802         * include/grub/sparc64/setjmp.h: Likewise.
14803         * include/grub/sparc64/types.h: Likewise.
14804         * include/grub/sparc64/ieee1275/console.h: Likewise.
14805         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14806         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14807         * include/grub/sparc64/ieee1275/time.h: Likewise.
14808         * kern/sparc64/cache.c: Likewise.
14809         * kern/sparc64/dl.c: Likewise.
14810         * kern/sparc64/ieee1275/init.c: Likewise.
14811         * kern/sparc64/ieee1275/openfw.c: Likewise.
14813 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14815         * util/console.c (grub_ncurses_putchar): If C is greater than
14816         0x7f, set C to a question mark.
14817         (grub_ncurses_getcharwidth): New function.
14818         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14819         getcharwidth.
14821         * normal/menu.c (print_entry): Made aware of Unicode. First,
14822         convert TITLE to UCS-4, and predict the cursor position by
14823         grub_getcharwidth.
14825         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14826         const to SRC.
14827         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14829 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14831         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14832         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14833         grub_strcat.
14835         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14836         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14837         grub_strcpy and grub_strlen. Take it into account that a space
14838         character is inserted as a delimiter.
14840 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14842         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14843         invalid magic in the error.
14845         * commands/search.c: New file.
14847         * util/grub-emu.c (main): Call grub_search_init and
14848         grub_search_fini.
14850         * kern/rescue.c (grub_rescue_print_disks): Removed.
14851         (grub_rescue_print_devices): New function.
14852         (grub_rescue_cmd_ls): Use grub_device_iterate with
14853         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14854         grub_rescue_print_disks.
14856         * kern/partition.c (grub_partition_iterate): Return the result of
14857         PARTMAP->ITERATE instead of GRUB_ERRNO.
14859         * kern/device.c: Include grub/partition.h.
14860         (grub_device_iterate): New function.
14862         * include/grub/partition.h (grub_partition_iterate): Return int
14863         instead of grub_err_t.
14865         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14866         prototype.
14867         [GRUB_UTIL] (grub_search_fini): Likewise.
14869         * include/grub/device.h (grub_device_iterate): New prototype.
14871         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14872         commands/search.c.
14873         (pkgdata_MODULES): Added search.mod.
14874         (search_mod_SOURCES): New variable.
14875         (search_mod_CFLAGS): Likewise.
14877         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14878         (pkgdata_MODULES): Added search.mod.
14879         (search_mod_SOURCES): New variable.
14880         (search_mod_CFLAGS): Likewise.
14882         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14883         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14884         All callers changed.
14886         * DISTLIST: Added commands/search.c.
14888 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14890         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14891         conversion.
14892         (grub_getcharwidth): New function.
14894         * kern/misc.c (grub_utf8_to_ucs4): New function.
14896         * include/grub/term.h (struct grub_term): Added a new member
14897         "getcharwidth".
14898         (grub_getcharwidth): New prototype.
14900         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14902         * term/i386/pc/console.c (map_char): New function. Segregated from
14903         grub_console_putchar.
14904         (grub_console_putchar): Use map_char.
14905         (grub_console_getcharwidth): New function.
14906         (grub_console_term): Specified grub_console_getcharwidth as
14907         getcharwidth.
14909         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14910         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14912         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14913         GRUB_ERRNO.
14914         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14915         on grub_strtoul completely.
14916         (write_char): Declare local variables in the beginning of the
14917         function.
14918         (grub_vesafb_getcharwidth): New function.
14919         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14920         getcharwidth.
14922 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14924         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14925         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14926         commands/i386/pc/vbetest.c.
14928         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14929         call grub_vbe_get_controller_info again, because the returned
14930         information is volatile.
14931         (grub_vbe_set_video_mode): Mostly rewritten.
14932         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14933         grub_vbe_status_t correctly.
14934         (grub_vbe_get_video_mode_info): Likewise.
14935         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14936         several if statements.
14938         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14939         * commands/i386/pc/vbeinfo.c: ... this.
14941         * commands/i386/pc/vbe_test.c: Renamed to ...
14942         * commands/i386/pc/vbetest.c: ... this.
14944         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14945         ...
14946         (grub_cmd_vbeinfo): ... this. Save video modes before
14947         iterating. Skip a video mode, if it is not available, not enough
14948         information is given or it is monochrome. Show the memory
14949         model. Leave the interpretation of MODEVAR to grub_strtoul
14950         completely.
14951         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14952         (GRUB_MOD_FINI): Likewise.
14954         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14955         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14956         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14957         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14958         grub_strtoul completely.
14959         (real2pm): Removed.
14960         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14961         (GRUB_MOD_FINI): Likewise.
14963         * normal/misc.c: Include grub/mm.h.
14965         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14966         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14967         (vbe_list_modes_mod_SOURCES): Removed.
14968         (vbe_list_modes_mod_CFLAGS): Likewise.
14969         (vbe_test_mod_SOURCES): Likewise.
14970         (vbe_test_mod_CFLAGS): Likewise.
14971         (vbeinfo_mod_SOURCES): New variable.
14972         (vbeinfo_mod_CFLAGS): Likewise.
14973         (vbetest_mod_SOURCES): Likewise.
14974         (vbetest_mod_CFLAGS): Likewise.
14976 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14978         * normal/misc.c: New file.
14980         * DISTLIST: Added normal/misc.c.
14982         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14983         DISK to HOOK. Call HOOK with DISK.
14984         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14985         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14986         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14988         * normal/menu_entry.c (struct screen): Added a new member
14989         "completion_shown".
14990         (completion_buffer): New global variable.
14991         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14992         (store_completion): New function.
14993         (complete): Likewise.
14994         (clear_completions): Likewise.
14995         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14996         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14997         a tab, call complete.
14999         * normal/completion.c (disk_dev): Removed.
15000         (print_simple_completion): Likewise.
15001         (print_partition_completion): Likewise.
15002         (print_func): New global variable.
15003         (add_completion): Do not take the arguments WHAT or PRINT any
15004         longer. Added a new argument TYPE. Instead of printing directly,
15005         call PRINT_FUNC if not NULL.
15006         All callers changed.
15007         (complete_device): Use a local variable DEV instead of
15008         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15009         (grub_normal_do_completion): Take a new argument HOOK. Do not
15010         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15011         empty string, return NULL instead.
15012         All callers changed.
15014         * normal/cmdline.c (print_completion): New function.
15016         * kern/partition.c (grub_partition_iterate): Add an argument DISK
15017         to HOOK.
15018         All callers changed.
15020         * kern/disk.c (grub_print_partinfo): Removed.
15022         * include/grub/partition.h (struct grub_partition_map): Add a new
15023         argument DISK into HOOK of ITERATE.
15024         (grub_partition_iterate): Add a new argument DISK to HOOK.
15026         * include/grub/normal.h (enum grub_completion_type): New enum.
15027         (grub_completion_type_t): New type.
15028         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15029         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15030         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15031         (GRUB_COMPLETION_TYPE_FILE): Likewise.
15032         (grub_normal_do_completion): Added a new argument HOOK.
15033         (grub_normal_print_device_info): New prototype.
15035         * include/grub/disk.h (grub_print_partinfo): Removed.
15037         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15038         (normal_mod_SOURCES): Likewise.
15039         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15040         (normal_mod_SOURCES): Likewise.
15042         * commands/ls.c (grub_ls_list_disks): Use
15043         grub_normal_print_device_info instead of grub_print_partinfo. Free
15044         PNAME.
15045         (grub_ls_list_files): Use grub_normal_print_device_info instead of
15046         duplicating the code.
15048 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15050         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15051         follow GCS more precisely.
15052         * commands/i386/pc/vbe_test.c: Likewise.
15053         * include/grub/i386/pc/vbe.h: Likewise.
15054         * term/i386/pc/vesafb.c: Likewise.
15055         * video/i386/pc/vbe.c: Likewise.
15057 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15059         * DISTLIST: Added term/i386/pc/vesafb.c
15060         DISTLIST: Added video/i386/pc/vbe.c
15061         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15062         DISTLIST: Added commands/i386/pc/vbe_test.c.
15063         * commands/i386/pc/vbe_list_modes.c: New file.
15064         * commands/i386/pc/vbe_test.c: Likewise.
15065         * term/i386/pc/vesafb.c: Likewise.
15066         * video/i386/pc/vbe.c: Likewise.
15067         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15068         (grub_vbe_probe) Added prototype.
15069         (grub_vbe_set_video_mode) Likewise.
15070         (grub_vbe_get_video_mode) Likewise.
15071         (grub_vbe_get_video_mode_info) Likewise.
15072         (grub_vbe_set_pixel_rgb) Likewise.
15073         (grub_vbe_set_pixel_index) Likewise.
15074         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15075         (pkgdata_MODULES): Added vesafb.mod.
15076         (pkgdata_MODULES): Added vbe_list_modes.mod.
15077         (pkgdata_MODULES): Added vbe_test.mod.
15078         (vbe_mod_SOURCES): Added.
15079         (vbe_mod_CFLAGS): Likewise.
15080         (vesafb_mod_SOURCES): Likewise.
15081         (vesafb_mod_CFLAGS): Likewise.
15082         (vbe_list_modes_mod_SOURCES): Likewise.
15083         (vbe_list_modes_mod_CFLAGS): Likewise.
15084         (vbe_test_mod_SOURCES): Likewise.
15085         (vbe_test_mod_CFLAGS): Likewise.
15087 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
15089         * normal/command.c (grub_command_execute): If INTERACTIVE is
15090         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15091         CMDLINE. Disable the pager if INTERACTIVE is true.
15092         All callers are changed.
15094         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15095         before reading a config file.
15096         * normal/main.c (read_config_file): Even if a command is not
15097         found, register it if it is within an entry.
15099         * util/grub-emu.c: Include sys/types.h and unistd.h.
15100         (options): Added --hold.
15101         (struct arguments): Added a new member "hold".
15102         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15103         missing.
15104         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15105         cleared by a debugger, if it is not zero.
15107         * include/grub/normal.h (grub_command_execute): Add an argument
15108         INTERACTIVE.
15110 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
15112         * DISTLIST: Added include/grub/i386/pc/vbe.h.
15114 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
15116         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15117         program with another one, because the old one didn't detect a bug
15118         in gcc-3.4. Always use regparm 2, because the new test is still
15119         not enough for gcc-4.0. Someone must investigate a simple test
15120         case which detects a bug in gcc-4.0.
15122 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
15124         * DISTLIST: Added normal/completion.c.
15126         * normal/completion.c: New file.
15128         * term/i386/pc/console.c (grub_console_getwh): New function.
15129         (grub_console_term): Assign grub_console_getwh to getwh.
15131         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15132         function is defined in normal/completion.c as
15133         grub_normal_do_completion.
15134         (grub_cmdline_get): Use grub_normal_do_completion instead of
15135         grub_tab_complete.
15137         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15138         returns non-zero, otherwise return 0.
15139         (grub_partition_iterate): First, probe the partition map. Then,
15140         call ITERATE only for this partition map.
15142         * kern/misc.c (grub_strncmp): Rewritten.
15144         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15145         returns non-zero. Otherwise return 0.
15147         * include/grub/partition.h (grub_partition_map_iterate): Return
15148         int instead of void.
15150         * include/grub/normal.h (grub_normal_do_completion): New prototype.
15152         * include/grub/misc.h (grub_strncmp): Change the type of N to
15153         grub_size_t.
15155         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15156         of void.
15158         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15159         unsigned explicitly before comparing it with I.
15161         * kern/main.c (grub_env_write_root): Add the attribute unused into
15162         VAR.
15164         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15165         normal/completion.c.
15166         (normal_mod_SOURCES): Likewise.
15167         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15168         (normal_mod_SOURCES): Likewise.
15170         * normal/command.c (grub_iterate_commands): If ITERATE returns
15171         non-zero, return one immediately.
15173 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
15175         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15176         * kern/i386/pc/startup.S: Updated Global Descriptor table's
15177         descriptions.
15178         (grub_vbe_get_controller_info): New function.
15179         (grub_vbe_get_mode_info): Likewise.
15180         (grub_vbe_set_mode): Likewise.
15181         (grub_vbe_get_mode): Likewise.
15182         (grub_vbe_set_memory_window): Likewise.
15183         (grub_vbe_get_memory_window): Likewise.
15184         (grub_vbe_set_scanline_length): Likewise.
15185         (grub_vbe_get_scanline_length): Likewise.
15186         (grub_vbe_set_display_start): Likewise.
15187         (grub_vbe_get_display_start): Likewise.
15188         (grub_vbe_set_palette_data): Likewise.
15189         * include/grub/i386/pc/vbe.h: New file.
15191 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15193         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15194         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15195         * DISTLIST: Likewise.
15196         * kern/ieee1275/of.c: Moved to ...
15197         * kern/ieee1275/ieee1275.c: ... here.
15199 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15201         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15202         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15203         Pass 0 as `end' parameter to grub_strtoul().
15205 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15207         * include/grub/powerpc/ieee1275/console.h: Do not include
15208         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
15209         ifdef.
15210         (grub_console_cur_color): Remove i386-specific prototype.
15211         (grub_console_real_putchar): Likewise.
15212         (grub_console_checkkey): Likewise.
15213         (grub_console_getkey): Likewise.
15214         (grub_console_getxy): Likewise.
15215         (grub_console_gotoxy): Likewise.
15216         (grub_console_cls): Likewise.
15217         (grub_console_setcursor): Likewise.
15218         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15219         Include <grub/machine/console.h>.
15220         * term/ieee1275/ofconsole.c: Likewise.
15222 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
15224         * Makefile.in (LIBLZO): New variable.
15226         * configure.ac: Check for LZO version 2.
15228         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15229         lzo/lzo1x.h instead of lzo1x.h.
15231         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15232         of -llzo.
15234         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15235         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15237         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15238         copying the data from PARTITION to P.
15240 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15242         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15243         negative, unload the module.
15245         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15246         map is "pc_partition_map" but not "pc".
15247         (usage): Fix the description. The options are --boot-image and
15248         --core-image but not --boot-file or --core-file.
15249         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15250         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15251         DEFAULT_DIRECTORY.
15253         * util/i386/pc/grub-install.in: Do not specify --boot-file or
15254         --core-file. Specify INSTALL_DEVICE as an argument.
15256         * util/console.c: Include config.h.
15257         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15258         [HAVE_NCURSES_H]: Include ncurses.h.
15259         [HAVE_CURSES_H]: Include curses.h.
15260         [!A_NORMAL] (A_NORMAL): Defined as zero.
15261         [!A_STANDOUT] (A_STANDOUT): Likewise.
15263         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15264         -lncurses.
15265         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15267         * configure.ac: Check for curses libraries and headers.
15269         * Makefile.in (LIBCURSES): New variable.
15271         * genmk.rb (Script::rule): Set the executable bits.
15273         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15274         name of the PC partition map is "pc_partition_map" but not "pc".
15276 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15278         * util/i386/pc/grub-install.in (grub_probefs): New variable.
15279         (modules): Likewise.
15280         (usage): Added descriptions for --modules and --grub-probefs.
15281         Handle --modules and --grub-probefs. Save the arguments in MODULES
15282         and GRUB_PROBEFS, respectively.
15283         Auto-detect a filesystem module against GRUBDIR. If the result is
15284         empty and modules are not specified explicitly, abort the
15285         installation. Add the result to MODULES.
15287         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15288         disk/powerpc/ieee1275/ofdisk.c,
15289         include/grub/powerpc/ieee1275/init.h and
15290         term/powerpc/ieee1275/ofconsole.c.
15291         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15292         term/ieee1275/ofconsole.c.
15294         * include/grub/powerpc/ieee1275/console.h: Resurrected.
15296         * COPYING: Upgraded to the latest version. Only the address of the
15297         FSF office has changed.
15299 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15301         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15302         kern/ieee1275.c with kern/ieee1275/of.c.
15304         * kern/ieee1275.c: Moved to ...
15305         * kern/ieee1275/of.c: ... here.
15307 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
15309         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15310         readability.
15312         * config.guess: Updated to the latest version from gnulib.
15313         * config.sub: Likewise.
15314         * install.sh: Likewise.
15315         * mkinstalldirs: Likewise.
15317         * include/grub/console.h: Removed. This file is arch-specific. Do
15318         not put this in include/grub.
15320         * include/grub/i386/pc/console.h: Resurrected.
15322         * util/console.c: Include grub/machine/console.h instead of
15323         grub/console.h.
15324         * util/grub-emu.c: Likewise.
15326 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
15328         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15329         hardcoded value.
15331         From Vincent Pelletier  <subdino2004@yahoo.fr>
15332         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15333         Redefined to use grub_getwh.
15334         (grub_term): New member named getwh.
15335         (grub_getwh): New prototype.
15336         * kern/term.c (grub_getwh): New function.
15337         * term/i386/pc/console.c (grub_console_getwh): New function.
15338         (grub_console_term): New member `getwh'.
15339         * term/i386/pc/vga.c (grub_vga_getwh): New function.
15340         (grub_vga_term): New member `getwh'.
15341         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15342         grub_ssize_t.
15343         (grub_ofconsole_getw): New function.
15344         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15345         (grub_ofconsole_term): New field named getwh and new initial
15346         value.
15348 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
15350         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15351         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
15352         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15353         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15354         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15355         of <grub/machine/ieee1275.h>.
15356         * commands/ieee1275/reboot.c: Likewise.
15357         * boot/powerpc/ieee1275/ieee1275.c: Move ...
15358         * kern/ieee1275.c: ... to here.  All users updated.  Change all
15359         parameter structs to use new type `grub_ieee1275_cell_t'.
15360         * term/powerpc/ieee1275/ofconsole.c: Move ...
15361         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
15362         * disk/powerpc/ieee1275/ofdisk.c: Move ...
15363         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
15364         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15365         to return int.
15366         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15367         Remove unused prototypes.  All users updated.
15368         * include/grub/powerpc/ieee1275/console.h: Removed.
15369         * include/grub/powerpc/ieee1275/ieee1275.h: Define
15370         `grub_ieee1275_cell_t'.
15371         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15372         Cast comparisons with -1 to the correct type.
15373         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15374         type to match `grub_ieee1275_entry_fn'.
15376 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
15378         * DISTLIST: Added util/i386/pc/grub-probefs.c.
15380         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15381         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15382         partmap/sun.c.
15383         (grub_probefs_SOURCES): New variable.
15385         * util/i386/pc/grub-probefs.c: New file.
15387         * util/i386/pc/grub-setup.c (main): Call
15388         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15389         grub_hfs_init and grub_jfs_init to initialize the system. Call
15390         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15391         grub_pc_partition_map_fini to finish the system.
15393 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
15395         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15396         function.
15397         (grub_multiboot_load_elf32): Likewise.
15398         (grub_multiboot_is_elf64): Likewise.
15399         (grub_multiboot_load_elf64): Likewise.
15400         (grub_multiboot_load_elf): Likewise.
15401         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15402         an ELF32 or ELF64 file.
15403         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15405         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15406         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15407         NULL before calling FS->LABEL.
15408         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15409         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15410         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15411         before calling FS->LABEL.
15413 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
15415         * util/i386/pc/grub-install.in (datadir): New variable.
15416         (libdir): Removed.
15417         (pkgdatadir): New variable.
15418         (pkglibdir): Removed.
15420 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
15422         * DISTLIST: Added util/i386/pc/grub-install.in.
15424         * util/i386/pc/grub-install.in: New file.
15426         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15427         (grub_install_SOURCES): Likewise.
15429         * genmk.rb: Added support for scripts.
15430         (Script): New class.
15431         (scripts): New variable.
15433         * Makefile.in (install-local): Install sbin_SCRIPTS by
15434         INSTALL_SCRIPT.
15435         (uninstall): Remove sbin_SCRIPTS.
15437         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15438         device, try to get a GRUB device by
15439         grub_util_biosdisk_get_grub_dev.
15440         Free DEST_DEV.
15442         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15443         description for --device-map.
15445 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15447         Change the semantics of variable hooks. They now return strings
15448         instead of error values.
15450         * util/i386/pc/grub-setup.c: Include grub/env.h.
15451         (setup): Use grub_device_set_root instead of grub_env_set.
15453         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15454         grub_env_get instead of grub_device_set_root and
15455         grub_device_get_root, respectively.
15457         * kern/main.c (grub_env_write_root): New function.
15458         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15459         grub_env_set instead of grub_device_set_root.
15461         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15462         many variables.
15463         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15464         rather than calling ENV->WRITE_HOOK afterwards.
15465         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15466         passing a pointer of a pointer.
15467         (grub_register_variable_hook): Change the types of "read_hook" and
15468         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15469         respectively.
15470         Allocate the default empty string on the heap, because this string
15471         may be freed later.
15473         * kern/device.c: Include grub/env.h.
15474         (grub_device_set_root): Removed.
15475         (grub_device_get_root): Likewise.
15476         (grub_device_open): Use grub_env_get instead of
15477         grub_device_get_root.
15479         * include/grub/env.h (grub_env_read_hook_t): New type.
15480         (grub_env_write_hook_t): Likewise.
15481         (grub_env_var): Change the types of "read_hook" and "write_hook"
15482         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15483         (grub_register_variable_hook): Likewise.
15485         * include/grub/device.h (grub_device_set_root): Removed.
15486         (grub_device_set_root): Likewise.
15488         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15489         make sure that DIRNAME terminates with '/', so that
15490         grub_fat_find_dir will fail if PATH is not a directory.
15492         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15493         from DIRNAME.
15494         Use the qualifier auto for print_files and print_files_long.
15495         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15496         as a regular file.
15497         Put a newline only if there is no error.
15498         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15499         used.
15501 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15503         * kern/partition.c (grub_partition_probe): Initialize PART to
15504         NULL. Otherwise, when no partition map is registered, this returns
15505         a garbage.
15507 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15509         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15510         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15511         valid.
15513 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15515         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15516         information on each device, if it does not have partitions. Print
15517         "Device" instead of "Disk", because this function is not specific
15518         to disk devices.
15520         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15521         static to ensure that it is put on the memory rather than a
15522         register.
15524 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15526         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15527         (grub_cat_init): Likewise.
15528         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15529         (options): Likewise.
15530         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15531         (grub_configfile_init): Likewise.
15532         * font/manager.c (GRUB_MOD_INIT): Likewise.
15533         * commands/help.c (GRUB_MOD_INIT): Likewise.
15534         (grub_help_init): Likewise.
15535         * normal/command.c (grub_command_init): Likewise.
15536         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15537         * disk/loopback.c (grub_loop_init): Likewise.
15538         (GRUB_MOD_INIT): Likewise.
15539         * commands/ls.c (grub_ls_init): Likewise.
15540         (GRUB_MOD_INIT): Likewise.
15541         (options): Likewise.
15542         * commands/boot.c (grub_boot_init): Likewise.
15543         (GRUB_MOD_INIT): Likewise.
15544         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15545         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15546         (GRUB_MOD_INIT): Likewise.
15547         * commands/cmp.c (grub_cmp_init): Likewise.
15548         (GRUB_MOD_INIT): Likewise.
15550         * normal/arg.c: Use <> instead of "" to include header files.
15551         (SHORT_ARG_HELP): New macro.
15552         (SHORT_ARG_USAGE): Likewise.
15553         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15554         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15555         descriptions.
15556         (find_short): Check if C is 'h' or 'u' explicitly.
15557         (grub_arg_show_help): Use space characters instead of tabs. Treat
15558         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15559         are shown with --help and --usage only if they are not used for
15560         the command itself.
15561         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15562         'h' and 'u'.
15564         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15565         const into "longarg". Change the type of "shortarg" to int.
15567 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15569         * boot/i386/pc/boot.S (boot_drive_check): New label.
15571         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15572         macro.
15574         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15575         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15577 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15579         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15580         When turning off Gate A20, skip the check and return immediately,
15581         because this is not fatal usually.
15583 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15585         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15586         be 0x7C00 instead of 0x8000.
15588         * boot/i386/pc/pxeboot.S: Rewritten.
15590         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15591         EXT_C.
15592         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15593         result.
15595 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15597         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15598         robustness. This routine now supports a BIOS call and System
15599         Control Port A to modify the gate A20.
15601         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15602         Increased to 0x440.
15604 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15606         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15607         device path and resulting ihandle.
15608         (grub_ofdisk_close): dprintf the ihandle being closed.
15609         (grub_ofdisk_read): dprintf function parameters.
15610         * kern/mm.c (grub_mm_init_region): Likewise.
15611         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15612         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15613         size, and boot arguments.
15614         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15615         before loading into memory.
15616         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15617         before loading into memory.
15619 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15621         * kern/mm.c: Added much documentation.
15622         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15623         8, set to 5 instead of 8.
15625 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15627         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15629         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15630         (grub_mkdevicemap_SOURCES): New variable.
15632         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15633         lib/device.c of GRUB Legacy.
15635 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15637         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15638         instead of PATH is NULL.
15640 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15642         * commands/cmp.c (BUFFER_SIZE): New macro.
15643         (grub_cmd_cmp): Close the right file at the right time.  Compare
15644         only data just read.  Don't report files of different  size as
15645         identical.  Dynamically allocate buffers.  Move variable
15646         declarations at the beginning of function.
15648 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15650         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15651         reverse.
15653 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15655         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15656         when backspace is pressed at beginning of line.
15658 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15660         * DISTLIST: Added genfslist.sh.
15662         * normal/main.c (fs_module_list): New variable.
15663         (autoload_fs_module): New function.
15664         (read_fs_list): Likewise.
15665         (grub_normal_execute): Call read_fs_list.
15667         * kern/fs.c (grub_fs_autoload_hook): New variable.
15668         (grub_fs_probe): Added support for auto-loading.
15670         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15671         (grub_fs_module_list_t): New type.
15673         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15674         (grub_fs_autoload_hook): New prototype.
15676         * genfslist.sh: New file.
15678         * genmk.rb: Added a rule to generate a filesystem list.
15680 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15682         * configure.ac: Fix the test for cross-compiling.
15684         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15685         define GRUB_UTIL anymore.
15687         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15688         so this function works on other systems than just big endian.
15689         (load_modules): Likewise.
15690         (add_segments): Likewise.
15692 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15694         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15695         contains `l' modifier, get a long from va_arg().
15697 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15699         * kern/mm.c (grub_free): If the next free block which is being
15700         merged is the first free block, set the first block to the block
15701         being freed.
15702         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15704 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15706         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15707         `grub_ieee1275_chosen'.
15709 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15711         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15712         (grub_ieee1275_chosen): New variable.
15713         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15714         `chosen'.
15715         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15716         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15717         Rename first argument to `phandle' for consistency.
15718         (grub_ieee1275_get_property_length): Likewise.
15719         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15720         to grub_ieee1275_phandle_t.
15721         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15722         Move export next to declaration.
15723         (grub_ieee1275_chosen): New variable.
15724         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15725         Correct cosmetic typo.
15726         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15727         `grub_ieee1275_chosen'.
15728         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15729         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15730         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15731         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15732         `grub_ieee1275_chosen'.
15734 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15736         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15737         /chosen/bootargs.
15738         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15739         /chosen/bootargs as "variable=value" pairs.
15741 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15743         * include/grub/misc.h (grub_dprintf): New macro.
15744         (grub_real_dprintf): New prototype.
15745         (grub_strword): Likewise.
15746         (grub_iswordseparator): Likewise.
15747         * kern/misc.c (grub_real_dprintf): New function.
15748         (grub_strword): Likewise.
15749         (grub_iswordseparator): Likewise.
15751 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15753         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15754         (roundup): Remove macro.
15755         (grub_ieee1275_flags): Make static.
15756         (grub_ieee1275_realmode): Remove.
15757         (grub_ieee1275_test_flag): New function.
15758         (grub_ieee1275_set_flag): Likewise.
15759         (find_options): Rename to `grub_ieee1275_find_options'; update
15760         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15761         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15762         (cmain): New prototype.
15763         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15764         `grub_ieee1275_flags' directly.
15765         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15766         machine/biosdisk.h.
15767         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15768         Don't include grub/machine/init.h.
15769         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15770         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15771         Remove prototype.
15772         (grub_ieee1275_realmode): Likewise.
15773         (grub_ieee1275_flag): New enum.
15774         (grub_ieee1275_test_flag): New prototype.
15775         (grub_ieee1275_set_flag): New prototype.
15776         * include/grub/powerpc/ieee1275/init.h: Remove file.
15777         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15778         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15779         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15780         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15781         comment.
15782         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15783         `grub_ieee1275_test_flag'.
15784         (grub_ieee1275_encode_devname): Likewise.
15786 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15788         * include/grub/powerpc/ieee1275/ieee1275.h
15789         (grub_ieee1275_encode_devname): New prototype.
15790         (grub_ieee1275_get_filename): Likewise.
15791         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15792         function.
15793         (grub_set_prefix): Likewise.
15794         (grub_machine_init): Call grub_set_prefix.
15795         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15796         (grub_parse_type): New enum.
15797         (grub_ieee1275_get_devargs): New function.
15798         (grub_ieee1275_get_devname): Likewise.
15799         (grub_ieee1275_parse_args): Likewise.
15800         (grub_ieee1275_get_filename): Likewise.
15801         (grub_ieee1275_encode_devname): Likewise.
15803 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15805         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15806         `grub_loader_unset'.
15808 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15810         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15811         instead of grub_ieee1275_interpret.
15812         (grub_halt_init): New function.
15813         (grub_halt_fini): Likewise.
15814         (GRUB_MOD_INIT): Correct message grammar.
15815         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15816         instead of grub_ieee1275_interpret.
15817         (grub_reboot_init): New function.
15818         (grub_reboot_fini): Likewise.
15819         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15820         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15821         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15822         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15823         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15824         function.
15825         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15826         Add prototype.
15827         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15828         prototype.
15829         (grub_halt): Likewise.
15830         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15831         (cmain): Remove __attribute__((unused)).
15832         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15833         (grub_heap_len): Likewise.
15834         (grub_machine_fini): New function.
15835         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15836         (grub_halt): Likewise.
15837         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15838         function.
15839         * util/powerpc/ieee1275/misc.c: New file.
15841 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15843         * DISTLIST: New file.
15844         * gendistlist.sh: Likewise.
15846         * Makefile.in (COMMON_DISTFILES): Removed.
15847         (BOOT_DISTFILES): Likewise.
15848         (CONF_DISTFILES): Likewise.
15849         (DISK_DISTFILES): Likewise.
15850         (FS_DISTFILES): Likewise.
15851         (INCLUDE_DISTFILES): Likewise.
15852         (KERN_DISTFILES): Likewise.
15853         (LOADER_DISTFILES): Likewise.
15854         (TERM_DISTFILES): Likewise.
15855         (UTIL_DISTFILES): Likewise.
15856         (DISTFILES): Likewise.
15857         (uninstall): Uninstall files in $(pkgdata_DATA).
15858         (DISTLIST): New target.
15859         (distdir): Use the contents of the file DISTLIST to get a list of
15860         distributed files.
15862 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15864         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15865         descriptor. This is ported from GRUB Legacy.
15867         * gencmdlist.sh: Added an extra semicolon to make it work with
15868         old sed versions. Reported by Robert Bihlmeyer
15869         <robbe@orcus.priv.at>.
15871 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15873         Automatic loading of commands is supported.
15875         * normal/main.c (read_command_list): New function.
15876         (grub_normal_execute): Call read_command_list.
15878         * normal/command.c (grub_register_command): Return zero or CMD.
15879         Allocate CMD->NAME from the heap.
15880         Initialize CMD->MODULE_NAME to zero.
15881         Find the same name as well. If the same command is found and it is
15882         a dummy command, overwrite members. If it is not a dummy command,
15883         return zero.
15884         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15885         (grub_command_find): If a dummy command is found, load a module
15886         and retry to find a command only once.
15888         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15889         make sure that each command is loaded.
15891         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15892         macro.
15893         (struct grub_command): Remove const from the member `name'.
15894         Add a new member `module_name'.
15895         (grub_register_command): Return grub_command_t.
15897         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15898         sure that each command is loaded.
15900         * genmk.rb (PModule::rule): Specify a module name without the
15901         suffix ".mod" to gencmdlist.sh.
15903 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15905         * gencmdlist.sh: New file.
15907         * genmk.rb (PModule::rule): Generate a rule for a command list.
15908         Clean command.lst.
15909         Generate command.lst from $(COMMANDFILES).
15911         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15912         (DATA): Added $(pkgdata_DATA).
15913         (install-local): Install files in $(pkgdata_DATA).
15915 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15917         * term/i386/pc/vga.c (debug_command): Removed.
15918         (GRUB_MOD_INIT): Do not register the command "debug".
15920         From Hollis Blanchard:
15921         * commands/configfile.c: New file.
15922         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15923         commands/configfile.c.
15924         (pkgdata_MODULES): Added configfile.mod.
15925         (configfile_mod_SOURCES): New variable.
15926         (configfile_mod_CFLAGS): Likewise.
15927         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15928         commands/configfile.c.
15929         (pkgdata_MODULES): Added configfile.mod.
15930         (configfile_mod_SOURCES): New variable.
15931         (configfile_mod_CFLAGS): Likewise.
15932         * util/grub-emu.c (main): Call grub_configfile_init and
15933         grub_configfile_fini.
15934         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15935         prototype.
15936         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15938 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15940         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15941         address.
15943         * commands/help.c (grub_cmd_help): Do not print newlines after
15944         the last command in print_command_help.
15946 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15948         * commands/default.h: New file.
15949         * commands/timeout.h: Likewise.
15950         * normal/context.c: Likewise.
15952         * util/misc.c: Do not include sys/times.h.
15953         Include sys/time.h and grub/machine/time.h.
15954         (grub_get_rtc): Rewritten with gettimeofday.
15956         * util/grub-emu.c (main): Call grub_default_init and
15957         grub_timeout_init before grub_normal_init, and call
15958         grub_timeout_fini and grub_default_fini after grub_main.
15960         * util/console.c (grub_ncurses_checkkey): Return the read
15961         character or -1.
15963         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15964         timeouts.
15966         * normal/main.c (read_config_file): Push MENU. If this fails,
15967         print an error and wait for a user input.
15968         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15969         If a menu is empty or an error occurs, pop MENU.
15970         (grub_normal_execute): Pop and free MENU after grub_menu_run
15971         returns.
15973         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15975         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15976         include time.h.
15977         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15978         without GRUB_UTIL.
15979         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15980         time.h.
15981         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15982         without GRUB_UTIL.
15984         * include/grub/normal.h (struct grub_menu_list): New struct.
15985         (grub_menu_list_t): New type.
15986         (struct grub_context): New struct.
15987         (grub_context_t): New type.
15988         (grub_register_command): Got rid of EXPORT_FUNC.
15989         (grub_unregister_command): Likewise.
15990         (grub_context_get): New prototype.
15991         (grub_context_get_current_menu): Likewise.
15992         (grub_context_push_menu): Likewise.
15993         (grub_context_pop_menu): Likewise.
15994         [GRUB_UTIL] (grub_default_init): Likewise.
15995         [GRUB_UTIL] (grub_default_fini): Likewise.
15996         [GRUB_UTIL] (grub_timeout_init): Likewise.
15997         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15999         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16000         commands/timeout.c and normal/context.c.
16001         (pkgdata_MODULES): Added default.mod and timeout.mod.
16002         (normal_mod_SOURCES): Added normal/context.c.
16003         (default_mod_SOURCES): New variable.
16004         (default_mod_CFLAGS): Likewise.
16005         (timeout_mod_SOURCES): Likewise.
16006         (timeout_mod_CFLAGS): Likewise.
16007         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16008         conf/i386-pc.rmk.
16009         (pkgdata_MODULES): Added default.mod and timeout.mod.
16010         (normal_mod_SOURCES): Added normal/context.c.
16011         (default_mod_SOURCES): New variable.
16012         (default_mod_CFLAGS): Likewise.
16013         (timeout_mod_SOURCES): Likewise.
16014         (timeout_mod_CFLAGS): Likewise.
16016         * Makefile.in (all-local): Added $(MKFILES).
16018 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16020         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16021         (grub_emu_SOURCES): Likewise.
16022         (pkgdata_MODULES): Add `sun.mod'.
16023         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16024         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16025         `partmap/sun.c'.
16026         (pkgdata_MODULES): Add `sun.mod'.
16027         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16028         * include/grub/partition.h (grub_sun_partition_map_init): New
16029         prototype.
16030         (grub_sun_partition_map_fini): Likewise.
16031         * partmap/sun.c: New file.
16032         * util/grub-emu.c (main): Initialize and de-initialize the sun
16033         partitionmap support.
16035 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
16037         This implements an Emacs-like menu entry editor.
16039         * normal/menu_entry.c: New file.
16041         * util/console.c (grub_ncurses_putchar): Translate some Unicode
16042         characters to ASCII.
16043         (saved_char): New variable.
16044         (grub_ncurses_checkkey): Rewritten completely.
16045         (grub_ncurses_getkey): Likewise.
16046         (grub_ncurses_init): Call raw instead of cbreak.
16048         * normal/menu.c (print_entry): Do not put a space.
16049         (init_page): Renamed to ...
16050         (grub_menu_init_page): ... this. All callers changed.
16051         (edit_menu_entry): Removed.
16052         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16054         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16056         * kern/misc.c (grub_vprintf): Call grub_refresh.
16058         * normal/menu.c (DISP_LEFT): Renamed to ...
16059         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16060         * normal/menu.c (DISP_UP): Renamed to ...
16061         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16062         * normal/menu.c (DISP_RIGHT): Renamed to ...
16063         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16064         * normal/menu.c (DISP_DOWN): Renamed to ...
16065         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16066         * normal/menu.c (DISP_HLINE): Renamed to ...
16067         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16068         * normal/menu.c (DISP_VLINE): Renamed to ...
16069         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16070         * normal/menu.c (DISP_UL): Renamed to ...
16071         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16072         * normal/menu.c (DISP_UR): Renamed to ...
16073         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16074         * normal/menu.c (DISP_LL): Renamed to ...
16075         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16076         * normal/menu.c (DISP_LR): Renamed to ...
16077         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16078         * normal/menu.c (TERM_WIDTH): Renamed to ...
16079         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16080         * normal/menu.c (TERM_HEIGHT): Renamed to ...
16081         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16082         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16083         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16084         * normal/menu.c (TERM_MARGIN): Renamed to ...
16085         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16086         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16087         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16088         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16089         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16090         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16091         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16092         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16093         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16094         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16095         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16096         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16097         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16098         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16099         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16100         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16101         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16102         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16103         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16104         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16105         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16106         All callers changed.
16108         * include/grub/normal.h: New prototype.
16110         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16111         normal/menu_entry.c.
16112         (normal_mod_SOURCES): Likewise.
16113         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16114         (normal_mod_SOURCES): Likewise.
16116 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
16118         * include/grub/normal.h (grub_halt_init): New prototype.
16119         (grub_halt_fini): Likewise.
16120         (grub_reboot_init): Likewise.
16121         (grub_reboot_fini): Likewise.
16123         * util/grub-emu.c: Include signal.h.
16124         (main_env): New global variable.
16125         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16126         catch C-c.
16127         (grub_machine_fini): New function.
16128         (main): Call grub_halt_init and grub_reboot_init before
16129         grub_main, and grub_reboot_fini and grub_halt_fini after it.
16130         Call setjmp with MAIN_ENV to go back afterwards.
16131         Call grub_machine_fini right before return.
16133         * include/grub/util/misc.h: Include setjmp.h.
16134         (main_env): New prototype.
16136         * include/grub/kernel.h (grub_machine_fini): New prototype.
16137         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16138         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16140         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16141         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16142         * term/i386/pc/console.c (grub_console_fini): Likewise.
16144         * util/i386/pc/misc.c: New file.
16146         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16147         util/i386/pc/misc.c, commands/i386/pc/halt.c and
16148         commands/i386/pc/reboot.c.
16150 2005-02-14  Guillem Jover  <guillem@hadrons.org>
16152         * include/grub/dl.h (grub_dl_check_header): New prototype.
16153         (grub_arch_dl_check_header): Change return type to grub_err_t,
16154         remove size parameter and export function.  Update all callers.
16155         * kern/dl.c (grub_dl_check_header): New function.
16156         (grub_dl_load_core): Use `grub_dl_check_header' instead of
16157         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
16158         are inside the core.
16159         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16160         independent ELF header checks.
16161         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16162         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16163         `grub_dl_check_header' instead of explicit checks.  Check for the
16164         ELF type.
16165         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16166         `grub_dl_check_header' instead of explicit checks.  Remove arch
16167         specific ELF header checks.
16169         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16170         argument SIZE.
16172 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
16174         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16175         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16177 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
16179         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16180         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16181         (part_map_iterate): Clear `grub_errno' and return 0 if
16182         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16183         * partmap/amiga.c (amiga_partition_map_iterate): Return
16184         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16185         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16187 2005-02-01  Guillem Jover  <guillem@hadrons.org>
16189         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16190         help info.
16192 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16194         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16195         Removed prototype.
16196         (grub_rescue_cmd_linux): New prototype.
16197         (grub_rescue_cmd_initrd): Likewise.
16198         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16199         `bi_rec'.
16200         (grub_linux_release_mem): Release the memory for the initrd.
16201         (grub_load_linux): Renamed from this...
16202         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
16203         Changed `entry' not to be static.  Loop over memory regions to
16204         find another one when the default fails.
16205         (grub_rescue_cmd_initrd): New function.
16206         (grub_linux_init): Remove function.
16207         (grub_linux_fini): Likewise.
16208         (GRUB_MOD_INIT): Register `initrd'.
16209         (GRUB_MOD_FINI): Unregister `initrd'.
16210         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16211         Function removed.
16212         (grub_linux_normal_fini): Likewise.
16213         (GRUB_MOD_INIT): Register `initrd'.
16214         (GRUB_MOD_FINI): Unregister `initrd'.
16216 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16218         * commands/help.c: New file.
16219         * normal/arg.c (show_help): Renamed to...
16220         (grub_arg_show_help): ... this.
16221         * commands/i386/pc/halt.c: New file.
16222         * commands/i386/pc/reboot.c: Likewise.
16223         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16224         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16225         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16226         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16227         variables.
16228         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16229         `commands/help.c'.
16230         (pkgdata_MODULES): Add `help.mod'.
16231         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16232         * grub/i386/pc/init.h (grub_reboot): New prototype.
16233         (grub_halt): Likewise.
16234         * include/grub/normal.h (grub_arg_show_help): New prototype.
16235         (grub_help_init): Likewise.
16236         (grub_help_fini): Likewise.
16237         * util/grub-emu.c (main): Initialize and deinitialize the help
16238         command.
16240         * normal/cmdline.c (grub_cmdline_get): Doc fix.
16242         * normal/command.c (grub_command_init): Fixed the description of
16243         the `set' and `unset' commands.
16245 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16247         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16248         function.
16249         * commands/ieee1275/halt.c: New file.
16250         * commands/ieee1275/reboot.c: Likewise.
16251         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16252         `__attribute__ ((unused))'.  Some GCS related fixed.
16253         (grub_suspend_init) [GRUB_UTIL]: Function removed.
16254         (grub_suspend_fini): Likewise.
16255         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16256         and `halt.mod'.
16257         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16258         (halt_mod_CFLAGS): New variables.
16259         * include/grub/powerpc/ieee1275/ieee1275.h
16260         (grub_ieee1275_interpret): New prototype.
16262 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
16264         * include/grub/misc.h (memmove): New prototype.
16265         (memcpy): Likewise.
16267 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
16269         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16270         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
16272 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
16274         * kern/misc.c (grub_strndup): Function rewritten.
16276 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
16278         * normal/menu.c (TERM_WIDTH): Macro redefined.
16279         (TERM_TOP_BORDER_Y): Likewise.
16280         (draw_border): Replaced while-loop by a for-loop.  Make the number
16281         of lines consistent with the number of lines displayed in
16282         print_entries.  Added a margin below the rectangle.
16283         (print_entry): Make the entry fit in the rectangle.
16284         (print_entries): Display the scroll arrows next to the right
16285         border.
16287 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16289         * fs/minix.c (grub_minix_find_file): Reserve more space for
16290         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
16291         `grub_strncpy' to copy `path' into it.
16293 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16295         Add the loopback device, a device via which files can be accessed
16296         as devices.
16298         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16299         (pkgdata_MODULES): Add loopback.mod.
16300         (loopback_mod_SOURCES): New variable.
16301         (loopback_mod_CFLAGS): Likewise.
16302         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16303         `disk/loopback.c'.
16304         (pkgdata_MODULES): Add loopback.mod.
16305         (loopback_mod_SOURCES): New variable.
16306         (loopback_mod_CFLAGS): Likewise.
16307         * disk/loopback.c: new file.
16308         * include/grub/normal.h (grub_loop_init): New prototype.
16309         (grub_loop_fini): New prototype.
16310         * util/grub-emu.c (main): Initialize and de-initialize loopback
16311         support.
16312         * include/grub/disk.h (grub_disk_dev_id): Add
16313         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16315 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
16317         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16318         function.
16319         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16320         (suspend_mod_SOURCES): New variable.
16321         (suspend_mod_CFLAGS): Likewise.
16322         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16323         New prototype.
16324         * commands/ieee1275/suspend.c: New file.
16326 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16328         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16329         ((unused))' to `__attribute__ ((used))'.
16330         (GRUB_MOD_FINI): Likewise.
16331         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16332         * genmk.rb (PModule): Assign space to common symbols when linking
16333         modules.
16335 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
16337         * include/grub/mm.h (grub_mm_init_region): Change the type of the
16338         `unsigned' arguments to `grub_size_t'.
16339         (grub_malloc): Likewise.
16340         (grub_realloc): Likewise.
16341         (grub_memalign): Likewise.
16342         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16343         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16344         * util/misc.c (grub_malloc): Likewise.
16345         (grub_realloc): Likewise.
16346         * kern/mm.c (get_header_from_pointer): Change the casts to
16347         `unsigned' into a cast to `grub_size_t'.
16349         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16350         point to `currnode' when `currnode' is changed.
16352         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
16353         Schottelius <nico-linux@schottelius.org>.
16355 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
16357         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16358         (note_path): Remove variable.
16359         (GRUB_IEEE1275_NOTE_NAME): New macro.
16360         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16361         (grub_ieee1275_note_hdr): New structure.
16362         (grub_ieee1275_note_desc): Likewise.
16363         (grub_ieee1275_note): Likewise.
16364         (load_note): Remove `dir' argument.  All callers updated.  Remove
16365         `note_img' and `path'.  Do not load a file from `note_path'.
16366         Initialize a struct grub_ieee1275_note and write that to `out'.
16367         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16369 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
16371         * util/misc.c (grub_util_read_image): Revert last change.  It
16372         called `grub_util_read_at', which seeks from the beginning of the
16373         file.
16375 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
16377         * TODO: Add note about endianness in grub-mkimage.
16378         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16379         section.
16380         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16381         (grub_mkimage_SOURCES): New target.
16382         * include/grub/kernel.h (grub_start_addr): Remove variable.
16383         (grub_end_addr): Likewise.
16384         (grub_total_module_size): Likewise.
16385         (grub_kernel_image_size): Likewise.
16386         (GRUB_MODULE_MAGIC): New constant.
16387         (grub_module_info): New structure.
16388         (grub_arch_modules_addr): New prototype.
16389         (grub_get_end_addr): Remove prototype.
16390         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16391         * include/grub/powerpc/ieee1275/kernel.h: New file.
16392         * include/grub/util/misc.h (grub_util_get_fp_size): New
16393         prototype.
16394         (grub_util_read_at): Likewise.
16395         (grub_util_write_image_at): Likewise.
16396         * kern/main.c (grub_get_end_addr): Remove function.
16397         (grub_load_modules): Call grub_arch_modules_addr instead of using
16398         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
16399         the grub_module_info fields instead of calling grub_get_end_addr
16400         as loop conditions.  Move grub_add_unused_region code here.
16401         (grub_add_unused_region): Remove function.
16402         * kern/i386/pc/init.c: Include grub/cache.h.
16403         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
16404         one call to add_mem_region.
16405         (grub_arch_modules_addr): New function.
16406         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16407         (grub_total_module_size): Likewise.
16408         Include grub/machine/kernel.h.
16409         (grub_arch_modules_addr): New function.
16410         * util/grub-emu.c (grub_end_addr): Remove variable.
16411         (grub_total_module_size): Likewise.
16412         (grub_arch_modules_addr): New function.
16413         * util/misc.c: Include unistd.h.
16414         (grub_util_get_fp_size): New function.
16415         (grub_util_read_at): Likewise.
16416         (grub_util_write_image_at): Likewise.
16417         (grub_util_read_image): Call grub_util_read_at.
16418         (grub_util_write_image): Call grub_util_write_image_at.
16419         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16420         additional memory in kernel_img for a struct grub_module_info.
16421         Fill in that grub_module_info.
16422         * util/powerpc/ieee1275/grub-mkimage.c: New file.
16424 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16426         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16427         New function.
16428         * include/grub/powerpc/ieee1275/ieee1275.h
16429         (grub_ieee1275_milliseconds): New prototype.
16430         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16431         Change to 1000.
16432         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16433         grub_ieee1275_milliseconds.
16435 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16437         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16438         variable.
16439         (find_options): New function.
16440         (cmain): Call find_options.
16441         * include/grub/powerpc/ieee1275/ieee1275.h
16442         (grub_ieee1275_realmode): New extern variable.
16443         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16444         grub_map if grub_ieee1275_realmode is false.
16446 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16448         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16449         lines are inserted and make it work like readline.  Reported by
16450         Vincent Pelletier <subdino2004@yahoo.fr>.
16452 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16454         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16456         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16457         `kern/powerpc/cache.S'.
16459 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16461         * genmk.rb: Handle the `Program' class in the main loop.  Written
16462         by Johan Rydberg <jrydberg@gnu.org>.
16463         (Program): New class.
16464         (programs): New variable.
16465         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16466         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16467         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16468         (help_arch): Function removed.
16469         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16470         `powerpc/libgcc.h' and `loader.h'.
16471         (pkgdata_PROGRAMS): New variable.
16472         (sbin_UTILITIES): Variable removed.
16473         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16474         (grubof_SOURCES): Variable re-defined so it only includes the
16475         core functionality.
16476         (grubof_CFLAGS): Remove `-DGRUBOF'.
16477         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16478         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16479         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16480         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16481         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16482         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16483         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16484         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16485         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16486         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16487         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16488         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16489         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16490         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16491         (pc_mod_CFLAGS): New variables.
16492         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16493         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16494         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16495         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16496         Moved from here...
16497         * include/grub/i386/pc/init.h (grub_os_area_addr)
16498         (rub_os_area_size): ... to here.
16499         * include/grub/powerpc/ieee1275/ieee1275.h
16500         (grub_ieee1275_entry_fn): Export symbol.
16501         * include/grub/powerpc/ieee1275/init.h: New file.
16502         * include/grub/powerpc/libgcc.h: Likewise.
16503         * include/grub/cache.h: Likewise.
16504         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16505         <hollis@penguinppc.org>.
16506         * kern/dl.c: Include <grub/cache.h>.
16507         (grub_dl_flush_cache): New function.
16508         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16509         for this module.
16510         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16511         (grub_console_init): Removed prototypes.
16512         (grub_machine_init): Don't initialize the modules anymore.
16513         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16514         static.
16515         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16516         Macro undef removed.
16517         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16518         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16519         relocation `R_PPC_REL32'.  Return an error when the relocation is
16520         unknown.
16521         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16522         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16523         * util/misc.c (grub_arch_sync_caches): Likewise.
16525 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16527         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16528         `symlist.c', add `grubof_symlist.c'.
16529         (symlist.c): Variable removed.
16530         (grubof_HEADERS): Variable added.
16531         (grubof_symlist.c): New target.
16532         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16533         `kernel_img_HEADERS'.
16534         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16535         * kern/powerpc/dl.c: New file.
16536         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16537         Function removed.
16538         (grub_arch_dl_relocate_symbols): Likewise.
16539         (grub_register_exported_symbols): Likewise.
16541 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16543         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16544         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16545         to fail instead.  Reported by Vincent Pelletier
16546         <subdino2004@yahoo.fr>.
16548         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16549         it is not allocated.  Reported by Vincent Pelletier
16550         <subdino2004@yahoo.fr>.
16552         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16553         output so the output looks better.
16555 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16557         Modulize the partition map support and add support for the amiga
16558         partition map.
16560         * commands/ls.c: Include <grub/partition.h> instead of
16561         <grub/machine/partition.h>.
16562         * kern/disk.c: Likewise.
16563         * kern/rescue.c: Likewise.
16564         * loader/i386/pc/chainloader.c: Likewise.
16565         * normal/cmdline.c: Likewise.
16566         * kern/powerpc/ieee1275/init.c: Likewise.
16567         (grub_machine_init): Call `grub_pc_partition_map_init',
16568         `grub_amiga_partition_map_init' and
16569         `grub_apple_partition_map_init'.
16570         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16571         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16572         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16573         `partition.h' and `pc_partition.h'.
16574         (grub_setup_SOURCES): Remove
16575         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16576         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16577         (grub_emu_SOURCES): Likewise.
16578         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16579         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16580         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16581         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16582         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16583         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16584         (grubof_SOURCES): Likewise.
16585         * disk/i386/pc/partition.c: File removed.
16586         * disk/powerpc/ieee1275/partition.c: Likewise.
16587         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16588         * include/grub/i386/pc/partition.h: Likewise.
16589         * kern/partition.c: New file.
16590         * partmap/amiga.c: Likewise.
16591         * partmap/apple.c: Likewise.
16592         * partmap/pc.c: Likewise.
16593         * include/grub/partition.h: Likewise..
16594         * include/grub/pc_partition.h: Likewise.
16595         * util/grub-emu.c: Include <grub/partition.h> instead of
16596         <grub/machine/partition.h>.
16597         (main): Call `grub_pc_partition_map_init',
16598         `grub_amiga_partition_map_init' and
16599         `grub_apple_partition_map_init' and deinitialize afterwards.
16600         * util/i386/pc/biosdisk.c: Include `#include
16601         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16602         `<grub/machine/partition.h>'.
16603         * util/i386/pc/grub-setup.c: Likewise.
16604         * util/i386/pc/biosdisk.c: Likewise.
16605         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16606         partition information in case of a PC partition.
16607         * util/i386/pc/grub-setup.c: Include `#include
16608         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16609         `<grub/machine/partition.h>'.
16610         (setup): Only access the PC specific partition information in case
16611         of a PC partition.
16613 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16615         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16616         (grub_longjmp): Likewise.
16617         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16618         20.
16619         * normal/powerpc/setjmp.S: New file.
16620         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16621         `normal/powerpc/setjmp.S'.
16622         (grubof_CFLAGS): Add `-DGRUBOF'.
16623         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16624         [GRUB_UTIL && !GRUBOF].
16626 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16628         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16629         property named `name'.  Correctly handle the error returned by
16630         `grub_ieee1275_finddevice' if a device can not be opened.
16632 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16634         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16635         `actual' for negativity.
16636         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16637         kern/fshelp.c.
16639 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16641         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16642         (PAGE_OFFSET): New macro.
16643         (CRTC_ADDR_PORT): Likewise.
16644         (CRTC_DATA_PORT): Likewise.
16645         (START_ADDR_HIGH_REGISTER): Likewise.
16646         (START_ADDR_LOW_REGISTER): Likewise.
16647         (GRAPHICS_ADDR_PORT): Likewise.
16648         (GRAPHICS_DATA_PORT): Likewise.
16649         (READ_MAP_REGISTER): Likewise.
16650         (INPUT_STATUS1_REGISTER): Likewise.
16651         (INPUT_STATUS1_VERTR_BIT): Likewise.
16652         (page): New variable.
16653         (wait_vretrace): New function.
16654         (set_read_map): Likewise.
16655         (set_start_address): Likewise.
16656         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16657         the right page.
16658         (check_vga_mem): Take the page into account.
16659         (write_char): Likewise.
16660         (write_cursor): Likewise.
16661         (scroll_up): Likewise.  Copy the page to the page that is not
16662         shown and switch between both pages.
16663         (grub_vga_putchar): Fix off by one error.
16664         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16665         account.
16667 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16669         Add support for iso9660 (including rockridge).
16671         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16672         (iso9660_mod_SOURCES): New variable.
16673         (iso9660_mod_CFLAGS): Likewise.
16674         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16675         * include/grub/fs.h (grub_iso9660_init): New prototype.
16676         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16677         * fs/iso9660.c: New file.
16679         * include/grub/misc.h (grub_strncat): New prototype.
16680         * kern/misc.c (grub_strncat): New function.
16682         * fs/hfs.c (grub_hfs_mount): Translate the error
16683         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16684         * fs/jfs.c (grub_jfs_mount): Likewise.
16685         * fs/ufs.c (grub_ufs_mount): Likewise.
16687 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16689         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16690         which initialized BAT registers.
16691         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16692         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16693         Move from here...
16694         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16695         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16696         ... to here.
16697         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16698         (grub_mapclaim): Likewise.
16699         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16700         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16701         hand.
16703 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16705         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16706         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16707         -ffreestanding and -msoft-float.
16709 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16711         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16712         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16713         set in grub_ieee1275_flags.
16715 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16717         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16718         prototype.
16719         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16720         grub_console_init first.
16721         Change the memory range used for grub_ieee1275_claim and
16722         grub_mm_init_region.
16723         Print an error message if the claim fails.
16724         Include <grub/misc.h>.
16726 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16728         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16729         Call grub_children_iterate for device nodes of type `scsi',
16730         `ide', or `ata'.
16731         (grub_ofdisk_open): Remove manual device alias resolution.
16732         Fix memory leak when device cannot be opened.
16733         * include/grub/powerpc/ieee1275/ieee1275.h
16734         (grub_children_iterate): New prototype.
16735         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16736         New function.
16737         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16738         Return -1 if args.size was -1.
16740 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16742         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16743         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16744         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16745         Open Firmware's memory for it; claim memory from _start to _end.
16746         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16747         (_end): New extern.
16748         (_start): Zero BSS from __bss_start to _end.
16749         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16750         New extern.
16751         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16753 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16755         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16756         -1 if args.base was -1.
16758 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16760         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16761         escape sequence instead of a literal ^L. Also call
16762         grub_ofconsole_gotoxy.
16764 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16766         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16767         void *  arguments to grub_addr_t.  All callers updated.  Also make
16768         the `result' argument optional.
16769         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16770         All callers updated.
16772 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16774         * commands/ls.c (grub_ls_list_files): Use the string following the
16775         initial ')', if present, as the filesystem path.
16776         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16778         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16780 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16782         Make the source code of the menu interface more readable.
16784         * normal/menu.c: Include grub/mm.h.
16785         (TERM_WIDTH): New macro.
16786         (TERM_HEIGHT): Likewise.
16787         (TERM_INFO_HEIGHT): Likewise.
16788         (TERM_MARGIN): Likewise.
16789         (TERM_SCROLL_WIDTH): Likewise.
16790         (TERM_TOP_BORDER_Y): Likewise.
16791         (TERM_LEFT_BORDER_X): Likewise.
16792         (TERM_BORDER_WIDTH): Likewise.
16793         (TERM_MESSAGE_HEIGHT): Likewise.
16794         (TERM_BORDER_HEIGHT): Likewise.
16795         (TERM_NUM_ENTRIES): Likewise.
16796         (TERM_FIRST_ENTRY_Y): Likewise.
16797         (TERM_ENTRY_WIDTH): Likewise.
16798         (TERM_CURSOR_X): Likewise.
16799         (draw_border): Use macros instead of magic numbers.
16800         (print_entry): Likewise.
16801         (print_entries): Likewise.
16802         (run_menu): Likewise. Also, handle the key 'e'.
16803         (run_menu_entry): Ignore empty command lines.
16804         (print_message): Added a new argument EDIT. If EDIT is true,
16805         print a different message.
16806         (init_page): Likewise.
16807         (edit_menu_entry): New function. Not implemented yet.
16809 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16811         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16812         can be loaded from normal mode.
16814         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16815         `multiboot.mod'.
16816         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16817         (multiboot_mod_CFLAGS): New variables.
16818         * loader/i386/pc/linux_normal.c: New file.
16819         * loader/i386/pc/multiboot_normal.c: Likewise.
16821         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16822         attribute `unused'.
16824         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16825         `fdiro' to read the mode information from instead of `diro'.
16827         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16828         looking up a symlink.
16830         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16831         macro.
16832         * normal/command.c (grub_command_execute): Don't parse the
16833         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16834         flags of the command.
16836         * normal/menu.c (grub_menu_run): Fix typo.
16838 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16840         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16842         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16843         `y + 1' instead of `y - 1'.
16845         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16847 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16849         From Hollis Blanchard <hollis@penguinppc.org>:
16850         * kern/misc.c (memmove): New alias for grub_memmove.
16851         (memcmp): New alias for grub_memcmp.
16852         (memset): New alias for grub_memset.
16853         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16854         Change "int handle" to "grub_ieee1275_phandle_t handle".
16855         * include/grub/powerpc/ieee1275/ieee1275.h
16856         (grub_ieee1275_get_property): Likewise.
16858 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16860         Added normal mode command `chainloader' as module chain.mod, which
16861         depends on normal.mod and _chain.mod.
16863         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16864         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16865         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16866         Deleted prototype.
16867         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16868         but arguments parsing moved to ...
16869         (grub_chainloader_cmd): ... here.  New function.
16870         * include/grub/i386/pc/chainloader.h: New file.
16871         * loader/i386/pc/chainloader_normal.c: Likewise.
16873 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16875         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16876         (grub_mkimage_LDFLAGS): Likewise.
16877         (grub_emu_SOURCES): Likewise.
16878         (kernel_img_HEADERS): Added fshelp.h.
16879         * fs/ext2.c: Include <grub/fshelp.h>.
16880         (FILETYPE_REG): New macro.
16881         (FILETYPE_INO_REG): Likewise.
16882         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16883         Changed all users.
16884         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16885         all users.
16886         (grub_fshelp_node): New struct.
16887         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16888         to a pointer.
16889         (grub_ext2_get_file_block): Removed function.
16890         (grub_ext2_read_block): New function.
16891         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16892         This function was written.
16893         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16894         (grub_ext2_find_file): Removed function.
16895         (grub_ext2_read_symlink): New function.
16896         (grub_ext2_iterate_dir): Likewise.
16897         (grub_ext2_open): Rewritten.
16898         (grub_ext2_dir): Rewritten.
16899         * include/grub/fshelp.h: New file.
16900         * fs/fshelp.c: Likewise.
16902 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16904         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16905         (print_message): Add a missing newline.
16906         (run_menu): Added timeout support.
16907         (run_menu_entry): New local function.
16908         (grub_menu_run): Added support for booting.
16910         * kern/loader.c (grub_loader_is_loaded): New function.
16912         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16913         (grub_get_rtc): Exported.
16915         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16916         (grub_get_rtc): Exported.
16918         * include/grub/normal.h (struct grub_command_list): Remove
16919         constant from the member `command'.
16921         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16923         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16925         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16927 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16929         Add support for the JFS filesystem.
16931         * fs/jfs.c: New file.
16932         * include/grub/fs.h (grub_jfs_init): New prototype.
16933         (grub_jfs_fini): New prototype.
16934         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16935         (grub_emu_SOURCES): Likewise.
16936         (pkgdata_MODULES): Add jfs.mod.
16937         (jfs_mod_SOURCES): New variable.
16938         (jfs_mod_CFLAGS): Likewise.
16939         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16940         (grubof_SOURCES): Likewise.
16941         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16943         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16944         endian to the host endian.
16945         (grub_fat_utf16_to_utf8): Move function from there...
16946         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16947         the endianness of the source string anymore.
16948         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16950 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16952         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16953         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16954         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16955         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16957         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16958         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16959         for `node_found' and `it_dir'.
16960         (grub_hfs_dir): Add prototype for `dir_hook'.
16962         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16963         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16964         and `indir32' to silence a gcc warning.
16966         * include/grub/fs.h (grub_hfs_init): New prototype.
16967         (grub_hfs_fini): Likewise.
16970 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16972         Each disk device has its own id now. This is useful to make use
16973         of multiple disk devices.
16975         * include/grub/disk.h (grub_disk_dev_id): New enum.
16976         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16977         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16979         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16980         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16982         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16983         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16985         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16986         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16988         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16989         "id" which is used by the cache manager.
16991         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16992         of just "GRUB".
16994 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16996         * fs/hfs.c: New file.
16997         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16998         (grub_emu_SOURCES): Likewise.
16999         (pkgdata_MODULES): Add hfs.mod.
17000         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17001         (grubof_SOURCES): Likewise.
17002         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17004         * include/grub/misc.h (grub_strncasecmp): Add prototype.
17005         * kern/misc.c (grub_strncasecmp): Add function.
17007 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
17009         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17010         with parentheses.
17012         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17013         (grub_ext2_dir): In case the directory entry type is unknown, read
17014         it from the inode.
17016 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
17018         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17019         grub_load_linux instead of grub_rescue_cmd_linux as second
17020         argument of grub_rescue_register_command.
17022         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17024 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
17026         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17027         function.
17028         * commands/boot.c: Remove the check for `GRUB_UTIL'.
17029         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17030         `loader/powerpc/ieee1275/linux.c',
17031         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17032         * include/grub/powerpc/ieee1275/ieee1275.h
17033         (grub_ieee1275_release): New prototype.
17034         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17035         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17036         normal, boot, linux and linux_normal.
17037         * loader/powerpc/ieee1275/linux.c: New file.
17038         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17040 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
17042         * normal/arg.c (grub_arg_parse): Correct error handling after
17043         reallocating the argumentlist (check if `argl' is not null instead
17044         of checking if `args' is not null).
17045         * kern/mm.c (grub_realloc): Return the same pointer when using the
17046         same region, instead of returning the header address.
17048 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17050         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17051         one block instead of two when looking for the initial partition.
17052         (grub_partition_probe): Initialize the local variable `p' with 0.
17053         Use base 10 for the grub_strtoul call.
17054         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
17055         need for one local variable.
17056         (grub_strtoul): Don't add the new value to `num', instead of that
17057         just assign it.
17059 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17061         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17062         (pxeboot_img_SOURCES): New variable.
17063         (pxeboot_img_ASFLAGS): Likewise.
17064         (pxeboot_img_LDFLAGS): Likewise.
17065         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
17066         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
17067         <lode_leroy@hotmail.com>.
17069 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17071         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17072         there was no input.
17074 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17076         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
17077         the history buffer logic.
17079 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17081         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17082         (FILETYPE_INO_SYMLINK): New macros.
17083         (grub_ext2_find_file): Check if the node is a directory using the
17084         inode stat information instead of using the filetype in the
17085         dirent.  Exclude the first character of an absolute symlink.
17086         (grub_ext2_dir): Mask out the filetype part of the mode member of
17087         the inode.
17089 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
17091         Add support for UFS version 1 and 2.  Add support for the minix
17092         filesystem version 1 and 2, both the variants with 14 and 30 long
17093         filenames.
17095         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17096         fs/minix.c.
17097         (grub_emu_SOURCES): Likewise.
17098         (pkgdata_MODULES): Add ufs.mod and minix.mod.
17099         (ufs_mod_SOURCES): New variable.
17100         (ufs_mod_CFLAGS): Likewise.
17101         (minix_mod_SOURCES): Likewise.
17102         (minix_mod_CFLAGS): Likewise.
17103         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17104         fs/minix.c.
17105         (grubof_SOURCES): Likewise.
17106         * fs/ufs.c: New file.
17107         * fs/minix.c: New file.
17108         * include/grub/fs.h (grub_ufs_init): New prototype.
17109         (grub_ufs_fini): Likewise.
17110         (grub_minix_init): Likewise.
17111         (grub_minix_fini): Likewise.
17112         * util/grub-emu.c (main): Initialize and deinitialize UFS and
17113         minix fs.
17115 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
17117         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17118         commands/ls.c, commands/terminal.c, commands/boot.c,
17119         commands/cmp.c and commands/cat.c.
17120         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17122         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17123         "env.h"
17125 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17127         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17128         and grub_, respectively. Because the conversion is trivial and
17129         mechanical, I omit the details here. Please refer to the CVS
17130         if you need more information.
17132 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17134         * include/pupa: Renamed to ...
17135         * include/grub: ... this.
17136         * util/i386/pc/pupa-mkimage.c: Renamed to ...
17137         * util/i386/pc/grub-mkimage.c: ... this.
17138         * util/i386/pc/pupa-setup.c: Renamed to ...
17139         * util/i386/pc/grub-setup.c: ... this.
17140         * util/pupa-emu.c: Renamed to ...
17141         * util/grub-emu.c: ... this.
17143 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
17145         Add support for the newworld apple macintosh (PPC).  This has been
17146         tested on the powerbook 2000 only.  It only adds support for
17147         generic ieee1275 functions, console and disk support.  This should
17148         be easy to port to other architectures with support for Open
17149         Firmware.
17151         * configure.ac: Accept the powerpc as host_cpu.  In the case of
17152         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
17153         specific tests are only executed while building for the i386.
17154         Inverse test for crosscompile.
17155         * genmk.rb (Utility): Allow assembler files.
17156         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17157         * conf/powerpc-ieee1275.rmk: New file.
17158         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17159         * disk/powerpc/ieee1275/partition.c: Likewise.
17160         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17161         * include/pupa/powerpc/ieee1275/console.h: Likewise.
17162         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17163         * include/pupa/powerpc/ieee1275/time.h: Likewise.
17164         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17165         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17166         * include/pupa/powerpc/ieee1275/loader.h
17167         * include/pupa/powerpc/setjmp.h: Likewise.
17168         * include/pupa/powerpc/types.h: Likewise.
17169         * kern/powerpc/ieee1275/init.c: Likewise.
17170         * kern/powerpc/ieee1275/openfw.c: Likewise.
17171         * term/powerpc/ieee1275/ofconsole.c: Likewise.
17173         These files were written by Johan Rydberg
17174         (jrydberg@night.trouble.net) and I only modified them slightly.
17176         * boot/powerpc/ieee1275/cmain.c: New file.
17177         * boot/powerpc/ieee1275/crt0.S: Likewise.
17178         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17179         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17181 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
17183         * Makefile.in: Update copyright.
17184         * genmodsrc.sh: Likewise.
17185         * gensymlist.sh: Likewise.
17186         * term/i386/pc/vga.c: Indent correctly.
17188         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17189         bugreporting address.
17190         * util/i386/pc/pupa-setup.c (usage): Likewise,
17191         (main): Call pupa_ext2_init and pupa_ext2_fini.
17193         * fs/fat.c (log2): Renamed to ...
17194         (fat_log2): ... this.
17195         All callers changed.
17196         * kern/misc.c (memcpy): Alias to pupa_memmove.
17197         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17198         lvalue cast.
17199         * util/console.c (pupa_ncurses_fini): Return 0.
17201         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17202         Move fail label here.
17203         [__GNU__]: Don't warn when using stat.
17204         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17205         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17206         long int. Use strtol instead of strtoul.
17208 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
17210         * commands/boot.c: New file.
17211         * commands/cat.c: Likewise.
17212         * commands/cmp.c: Likewise.
17213         * commands/ls.c: Likewise.
17214         * commands/terminal.c: Likewise.
17215         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17216         (pupa_register_command): Changed interface to match the new
17217         argument parser.
17218         (pupa_command_execute): Changed (almost rewritten) so it uses
17219         pupa_split_command.  Added support for setting variables using the
17220         syntax `foo=bar'.
17221         (rescue_command): Changed to work with the new argument parser.
17222         (terminal_command): Moved from here to commands/terminal.c.
17223         (set_command): New function.
17224         (unset_command): New function.
17225         (insmod_command): New function.
17226         (rmmod_command): New function.
17227         (lsmod_command): New function.
17228         (pupa_command_init): Don't initialize the command terminal
17229         anymore.  Initialize the commands set, unset, insmod, rmmod and
17230         lsmod.
17231         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17232         (kernel_img_HEADERS): Add arg.h and env.h.
17233         (pupa_mkimage_LDFLAGS): Add kern/env.c.
17234         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17235         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17236         normal/arg.c.
17237         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17238         terminal.mod.
17239         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17240         (boot_mod_SOURCES): New variable.
17241         (terminal_mod_SOURCES): Likewise.
17242         (ls_mod_SOURCES): Likewise.
17243         (cmp_mod_SOURCES): Likewise.
17244         (cat_mod_SOURCES): Likewise.
17246         * normal/arg.c: New file.
17247         * kern/env.c: Likewise.
17248         * include/pupa/arg.h: Likewise.
17249         * include/pupa/env.h: Likewise.
17250         * font/manager.c (font_command): Changed to match argument parsing
17251         interface changes.
17252         (PUPA_MOD_INIT): Likewise.
17253         * hello/hello.c (pupa_cmd_hello): Likewise.
17254         (PUPA_MOD_INIT): Likewise.
17255         * include/pupa/disk.h: Include <pupa/device.h>.
17256         (pupa_print_partinfo): New prototype.
17257         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17258         (pupa_dl_get_prefix): Likewise.
17259         * include/pupa/misc.h: Include <pupa/err.h>.
17260         (pupa_isgraph): New prototype.
17261         (pupa_isdigit): Likewise.
17262         (pupa_split_cmdline): Likewise.
17263         * include/pupa/normal.h: Include <pupa/arg.h>.
17264         (pupa_command): Changed the prototype of the member `func' to
17265         match the argument parsing interface.  Added member `options'.
17266         (pupa_register_command): Updated to match function.
17267         (pupa_arg_parse): New prototype.
17268         (pupa_hello_init) [PUPA_UTIL]: New prototype.
17269         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17270         (pupa_ls_init) [PUPA_UTIL]: Likewise.
17271         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17272         (pupa_cat_init) [PUPA_UTIL]: Likewise.
17273         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17274         (pupa_boot_init) [PUPA_UTIL]: Likewise.
17275         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17276         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17277         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17278         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17279         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17280         * kern/disk.c: Include <pupa/file.h>.
17281         (pupa_print_partinfo): New function.
17282         * kern/dl.c: Include <pupa/env.h>.
17283         (pupa_dl_dir): Variable removed.
17284         (pupa_dl_load): Use the environment variable `prefix' instead of
17285         the variable pupa_dl_dir.
17286         (pupa_dl_set_prefix): Function removed.
17287         (pupa_dl_get_prefix): Likewise.
17288         * kern/i386/pc/init.c: Include <pupa/env.h>.
17289         (pupa_machine_init): Use the environment variable `prefix' instead of
17290         using pupa_dl_set_prefix to set the prefix.
17291         * kern/main.c: Include <pupa/env.h>.
17292         (pupa_set_root_dev): Use the environment variable `prefix' instead of
17293         using pupa_dl_get_prefix to get the prefix.
17294         * kern/misc.c: Include <pupa/env.h>.
17295         (pupa_isdigit): New function.
17296         (pupa_isgraph): Likewise.
17297         (pupa_ftoa): Likewise.
17298         (pupa_vsprintf): Added support for printing values of the type
17299         `double'.  Make it possible to format variable output when using
17300         formatting like `%1.2%f'.
17301         (pupa_split_cmdline): New function.
17302         * kern/rescue.c: Include <pupa/env.h>.
17303         (next_word): Removed function.
17304         (pupa_rescue_cmd_prefix): Likewise.
17305         (pupa_rescue_cmd_set): New function.
17306         (pupa_rescue_cmd_unset): New function.
17307         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17308         split the command line instead of splitting it here.  Added
17309         support for setting variables using the syntax `foo=bar'.  Don't
17310         initialize the prefix command anymore.  Initialized the set and
17311         unset commands.
17312         * normal/cmdline.c: Include <pupa/env.h>.
17313         (pupa_tab_complete): Added prototypes for print_simple_completion,
17314         print_partition_completion, add_completion, iterate_commands,
17315         iterate_dev, iterate_part and iterate_dir. Moved code to print
17316         partition information from here to kern/disk.c.
17317         (pupa_cmdline_run): Don't check if the function exists anymore.
17318         * normal/main.c: Include <pupa/env.h>.
17319         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17320         instead of using pupa_dl_get_prefix to get the prefix.
17321         * term/i386/pc/vga.c: Include <pupa/arg.h>.
17322         (check_vga_mem): Cast pointers to `void *' to silence a gcc
17323         warning.
17324         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17325         (pupa_vga_setcolor): Declare unused variables with `__attribute__
17326         ((unused))' to silence a gcc warning.
17327         (pupa_vga_setcolor): Likewise.
17328         (debug_command): Changed to match argument parsing
17329         interface changes.
17330         * util/pupa-emu.c: Include <pupa/env.h>.
17331         (options): Added 0's for unused fields to silence a gcc warning.
17332         (argp): Likewise.
17333         (main): Use the environment variable `prefix' instead of using
17334         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
17335         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
17336         and terminal.
17338         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17339         * util/misc.c: Include <malloc.h>.
17340         (pupa_malloc): Rewritten so errors are correctly reported.
17341         (pupa_realloc): Likewise.
17342         (pupa_memalign): Likewise.
17343         (pupa_mm_init_region): Declare unused variables with
17344         `__attribute__ ((unused))' to silence a gcc warning.
17345         * normal/i386/setjmp.S: Remove tab at the end of the file to
17346         silence a gcc warning.
17347         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17348         variables with `__attribute__ ((unused))' to silence a gcc
17349         warning.
17350         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17351         local variable i unsigned to silence a gcc warning.
17353         * kern/term.c: Include <pupa/misc.h>.
17354         (pupa_more_lines): New variable.
17355         (pupa_more): Likewise.
17356         (pupa_putcode): When the pager is active pause at the end of every
17357         screen.
17358         (pupa_set_more): New function.
17359         * include/pupa/term.h (pupa_set_more): New prototype.
17362 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
17364         Now this project is GRUB 2 rather than PUPA. The location of
17365         the CVS repository was moved to GRUB's.
17367         * configure.ac: Use bug-grub as the reporting address.
17368         Use GRUB instead of PUPA.
17369         Change the version number to 1.90.
17371 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
17373         * genkernsyms.sh: Updated copyright information.
17374         * genmk.rb: Likewise.
17375         * genmodsrc.sh: Likewise.
17376         * gensymlist.sh: Likewise.
17377         * boot/i386/pc/boot.S: Likewise.
17378         * boot/i386/pc/diskboot.S: Likewise.
17379         * disk/i386/pc/biosdisk.c: Likewise.
17380         * disk/i386/pc/partition.c: Likewise.
17381         * font/manager.c: Likewise.
17382         * fs/ext2.c: Likewise.
17383         * fs/fat.c: Likewise.
17384         * include/pupa/boot.h: Likewise.
17385         * include/pupa/device.h: Likewise.
17386         * include/pupa/disk.h: Likewise.
17387         * include/pupa/dl.h: Likewise.
17388         * include/pupa/elf.h: Likewise.
17389         * include/pupa/err.h: Likewise.
17390         * include/pupa/file.h: Likewise.
17391         * include/pupa/font.h: Likewise.
17392         * include/pupa/fs.h: Likewise.
17393         * include/pupa/kernel.h: Likewise.
17394         * include/pupa/loader.h: Likewise.
17395         * include/pupa/misc.h: Likewise.
17396         * include/pupa/mm.h: Likewise.
17397         * include/pupa/net.h: Likewise.
17398         * include/pupa/normal.h: Likewise.
17399         * include/pupa/rescue.h: Likewise.
17400         * include/pupa/setjmp.h: Likewise.
17401         * include/pupa/symbol.h: Likewise.
17402         * include/pupa/term.h: Likewise.
17403         * include/pupa/types.h: Likewise.
17404         * include/pupa/i386/setjmp.h: Likewise.
17405         * include/pupa/i386/types.h: Likewise.
17406         * include/pupa/i386/pc/biosdisk.h: Likewise.
17407         * include/pupa/i386/pc/boot.h: Likewise.
17408         * include/pupa/i386/pc/console.h: Likewise.
17409         * include/pupa/i386/pc/init.h: Likewise.
17410         * include/pupa/i386/pc/kernel.h: Likewise.
17411         * include/pupa/i386/pc/linux.h: Likewise.
17412         * include/pupa/i386/pc/loader.h: Likewise.
17413         * include/pupa/i386/pc/memory.h: Likewise.
17414         * include/pupa/i386/pc/multiboot.h: Likewise.
17415         * include/pupa/i386/pc/partition.h: Likewise.
17416         * include/pupa/i386/pc/time.h: Likewise.
17417         * include/pupa/i386/pc/vga.h: Likewise.
17418         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17419         * include/pupa/util/getroot.h: Likewise.
17420         * include/pupa/util/misc.h: Likewise.
17421         * include/pupa/util/resolve.h: Likewise.
17422         * kern/device.c: Likewise.
17423         * kern/disk.c: Likewise.
17424         * kern/dl.c: Likewise.
17425         * kern/err.c: Likewise.
17426         * kern/file.c: Likewise.
17427         * kern/fs.c: Likewise.
17428         * kern/loader.c: Likewise.
17429         * kern/main.c: Likewise.
17430         * kern/misc.c: Likewise.
17431         * kern/mm.c: Likewise.
17432         * kern/rescue.c: Likewise.
17433         * kern/term.c: Likewise.
17434         * kern/i386/dl.c: Likewise.
17435         * kern/i386/pc/init.c: Likewise.
17436         * kern/i386/pc/lzo1x.S: Likewise.
17437         * kern/i386/pc/startup.S: Likewise.
17438         * loader/i386/pc/chainloader.c: Likewise.
17439         * loader/i386/pc/linux.c: Likewise.
17440         * loader/i386/pc/multiboot.c: Likewise.
17441         * normal/cmdline.c: Likewise.
17442         * normal/command.c: Likewise.
17443         * normal/main.c: Likewise.
17444         * normal/menu.c: Likewise.
17445         * normal/i386/setjmp.S: Likewise.
17446         * term/i386/pc/console.c: Likewise.
17447         * term/i386/pc/vga.c: Likewise.
17448         * util/console.c: Likewise.
17449         * util/genmoddep.c: Likewise.
17450         * util/misc.c: Likewise.
17451         * util/pupa-emu.c: Likewise.
17452         * util/resolve.c: Likewise.
17453         * util/unifont2pff.rb: Likewise.
17454         * util/i386/pc/biosdisk.c: Likewise.
17455         * util/i386/pc/getroot.c: Likewise.
17456         * util/i386/pc/pupa-mkimage.c: Likewise.
17457         * util/i386/pc/pupa-setup.c: Likewise.
17459 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17461         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17462         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17463         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17464         reading and reset it after reading.
17465         (pupa_ext2_close): Return PUPA_ERR_NONE.
17467         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17468         Correct value.
17469         (struct linux_kernel_header): Add kernel_version and
17470         initrd_addr_max.
17471         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17472         pupa_file_read succeeds.
17473         (pupa_rescue_cmd_initrd): Implement.
17475 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17477         * fs/ext2.c (pupa_ext2_label): New function.
17478         (pupa_ext2_fs): Added label.
17479         * fs/fat.c (pupa_fat_label): New function.
17480         (pupa_fat_fs): Added label.
17481         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17483         * kern/misc.c (pupa_strndup): New function.
17484         * include/pupa/misc.h (pupa_strndup): New prototype.
17486         * include/pupa/normal.h: Include <pupa/err.h>.
17487         (pupa_set_history): New prototype.
17488         (pupa_iterate_commands): New prototype.
17489         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17490         <pupa/disk.h>, <pupa/file.h>.
17491         (hist_size): New variable.
17492         (hist_lines): Likewise.
17493         (hist_end): Likewise.
17494         (hist_used): Likewise.
17495         (pupa_set_history): New function.
17496         (pupa_history_get): Likewise.
17497         (pupa_history_add): Likewise.
17498         (pupa_history_replace): Likewise.
17499         (pupa_tab_complete): Likewise.
17500         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17501         completion shows partitionnames while completing partitions, this
17502         feature was suggested by Jeff Bailey.
17503         * normal/command.c (pupa_iterate_commands): New function.
17504         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17505         (pupa_normal_init): Initialize history buffer.
17506         (PUPA_MOD_INIT): Likewise.
17507         (pupa_normal_fini): Free the history buffer.
17508         (PUPA_MOD_FINI): Likewise.
17510         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17511         key.
17513         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17514         * configure.ac [i386]: Check for regparam bug.
17515         (NESTED_FUNC_ATTR) [! i386]: Defined.
17517 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17519         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17520         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17521         (pupa_emu_SOURCES): New variable.
17522         (pupa_emu_LDFLAGS): Likewise.
17523         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17524         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17525         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17526         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17527         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17528         (pupa_jmp_buf): New typedef.
17529         (pupa_setjmp) [PUPA_UTIL]: New macro.
17530         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17531         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17532         (pupa_refresh): New prototype.
17533         * include/pupa/util/getroot.h: New file.
17534         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17535         it.
17536         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17537         (pupa_rescue_cmd_cat): Likewise.
17538         (pupa_rescue_cmd_ls): Likewise.
17539         (pupa_rescue_cmd_testload): Likewise.
17540         (pupa_rescue_cmd_lsmod): Likewise.
17541         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17542         * normal/menu.c (run_menu): Likewise.
17543         * kern/term.c (pupa_cls): Likewise.
17544         (pupa_refresh): New function.
17545         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17546         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17547         * util/console.c: New file.
17549         * util/i386/pc/getroot.c: New file.
17550         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17551         (pupa_putchar): New function.
17552         (pupa_refresh): Likewise.
17553         (xgetcwd): Function moved to ...
17554         (strip_extra_slashes): Likewise.
17555         (get_prefix): Likewise.
17556         * util/i386/pc/getroot.c: ... here.
17557         (find_root_device): Function moved and renamed to...
17558         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17559         Changed all callers.
17560         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17561         and renamed to...
17562         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17563         Changed all callers.
17564         * util/misc.c (pupa_memalign): New function.
17565         (pupa_mm_init_region): Likewise.
17566         (pupa_register_exported_symbols): Likewise.
17567         (pupa_putchar): Function removed.
17568         * util/pupa-emu.c: New file.
17570 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17572         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17573         (_multiboot_mod_SOURCES): New variable.
17574         (_multiboot_mod_CFLAGS): Likewise.
17575         * loader/i386/pc/multiboot.c: New file.
17576         * include/pupa/i386/pc/multiboot.h: Likewise.
17577         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17578         (pupa_multiboot_real_boot): New function.
17579         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17580         (pupa_multiboot_real_boot): New prototype.
17581         (pupa_rescue_cmd_multiboot): Likewise
17582         (pupa_rescue_cmd_module): Likewise.
17584         * kern/loader.c (pupa_loader_set): Continue when
17585         pupa_loader_unload_func() fails.
17586         (pupa_loader_unset): New function.
17587         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17589         * kern/misc.c (pupa_stpcpy): New function.
17590         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17592 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17594         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17595         for available extensions.
17597         * include/pupa/i386/pc/time.h: New file.
17598         * kern/disk.c: Include <pupa/machine/time.h>.
17599         (PUPA_CACHE_TIMEOUT): New macro.
17600         (pupa_last_time): New variable.
17601         (pupa_disk_open): Flush the cache when there was a timeout.
17602         (pupa_disk_close): Reset the timer.
17603         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17604         pupa_currticks.
17605         * util/misc.c: Include <sys/times.h>
17606         (pupa_get_rtc): New function.
17608 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17610         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17611         as blocks.
17612         (pupa_ext2_get_file_block): Use blocks member.
17614         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17615         first block. Return -1 instead of pupa_errno on error.
17617 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17619         * README: In the pupa-mkimage example use _chain instead of chain
17620         and ext2 instead of fat.
17621         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17622         adding journal playback for ext2fs.
17623         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17624         (pkgdata_MODULES): Added ext2.mod.
17625         (ext2_mod_SOURCES): New variable.
17626         (ext2_mod_CFLAGS): Likewise.
17627         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17628         * include/pupa/misc.h (pupa_strncpy): New prototype.
17629         (pupa_strcat): Likewise.
17630         (pupa_strncmp): Likewise.
17631         * kern/misc.c (pupa_strcat): Enable function.
17632         (pupa_strncpy): New function.
17633         (pupa_strncmp): Likewise.
17634         * fs/ext2.c: New file.
17636         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17637         when the read failed before retrying.
17638         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17639         (_FILE_OFFSET_BITS): Likewise.
17640         * configure.ac: Added AC_SYS_LARGEFILE.
17642 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17644         * genmk.rb (PModule#rule): Make sure to get only symbol names
17645         from the output of nm.
17646         Reported by Robert Millan <zeratul2@wanadoo.es>.
17648 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17650         I forgot to check in these changes for a long time. This adds
17651         incomplete support for VGA console, and this is still very
17652         buggy. Also, a lot of consideration is required for I18N,
17653         UNICODE, and VGA font issues. Therefore, assume that this is
17654         such that "better than nothing".
17656         * font/manager.c: New file.
17657         * include/pupa/font.h: Likewise.
17658         * include/pupa/i386/pc/vga.h: Likewise.
17659         * term/i386/pc/vga.c: Likewise.
17660         * util/unifont2pff.rb: Likewise.
17662         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17663         (pkgdata_MODULES): Added vga.mod and font.mod.
17664         (vga_mod_SOURCES): New variables.
17665         (vga_mod_CFLAGS): Likewise.
17666         (font_mod_SOURCES): Likewise.
17667         (font_mod_CFLAGS): Likewise.
17669         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17671         * include/pupa/term.h: Include pupa/err.h.
17672         (struct pupa_term): Added init and fini.
17673         Changed the argument of putchar to pupa_uint32_t.
17675         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17676         (pupa_console_real_putchar): New prototype.
17677         (pupa_console_putchar): Removed.
17678         (pupa_console_checkkey): Exported.
17679         (pupa_console_getkey): Likewise.
17681         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17682         characters.
17684         * kern/term.c (pupa_term_set_current): Rewritten.
17685         (pupa_putchar): Likewise.
17686         (pupa_putcode): New function.
17688         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17689         (pupa_console_real_putchar): ... this.
17690         (pupa_vga_set_mode): New function.
17691         (pupa_vga_get_font): Likewise.
17693         * normal/command.c: Include pupa/term.h.
17694         (terminal_command): New function.
17695         (pupa_command_init): Register the command "terminal".
17697         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17698         (DISP_UP): Likewise.
17699         (DISP_RIGHT): Likewise.
17700         (DISP_DOWN): Likewise.
17701         (DISP_HLINE): Likewise.
17702         (DISP_VLINE): Likewise.
17703         (DISP_UL): Likewise.
17704         (DISP_UR): Likewise.
17705         (DISP_LL): Likewise.
17706         (DISP_LR): Likewise.
17708         * term/i386/pc/console.c (pupa_console_putchar): New function.
17710 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17712         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17713         FIX. Reverse the path_list.
17715         * include/pupa/normal.h: Export pupa_register_command and
17716         pupa_unregister_command.
17718         * hello/hello.c (pupa_cmd_hello): New module.
17719         * conf/i386-pc.rmk: Added hello.mod.
17721 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17723         * kern/i386/pc/lzo1x.S: New file.
17725         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17726         (compress_kernel): New variable.
17727         (generate_image): Heavily modified to support compressing a
17728         large part of the core image.
17730         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17731         leak.
17732         (pupa_util_load_image): New function.
17734         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17735         (pupa_compressed_size): New variable.
17736         (codestart): Enable Gate A20 here.
17737         Decompress the compressed part of the core image.
17738         Rearrange the code to put functions and variables which are
17739         required for initialization in the non-compressed part.
17740         Include lzo1x.S.
17742         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17743         here.
17745         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17747         * include/pupa/i386/pc/kernel.h
17748         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17749         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17750         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17751         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17752         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17754         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17756         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17757         (Utility#rule): Likewise.
17759         * configure.ac: Check if LZO is available.
17761 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17763         * include/pupa/normal.h: New file.
17764         * include/pupa/setjmp.h: Likewise.
17765         * include/pupa/i386/setjmp.h: Likewise.
17766         * normal/cmdline.c: Likewise.
17767         * normal/command.c: Likewise.
17768         * normal/main.c: Likewise.
17769         * normal/menu.c: Likewise.
17770         * normal/i386/setjmp.S: Likewise.
17772         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17773         (pupa_rescue_cmd_initrd): Likewise.
17775         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17776         Likewise.
17778         * kern/i386/pc/startup.S (translation_table): New variable.
17779         (translate_keycode): New function.
17780         (pupa_console_getkey): Call translate_keycode.
17782         * kern/rescue.c (attempt_normal_mode): New function.
17783         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17784         it failed, print a message.
17786         * kern/mm.c (pupa_real_malloc): Print more information when a
17787         free magic is broken.
17788         (pupa_free): If the first free header is not free actually, set
17789         it to P.
17791         * kern/main.c (pupa_load_normal_mode): Just load the module
17792         "normal".
17793         (pupa_main): Don't print the message
17794         "Entering into rescue mode..." here.
17796         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17797         Declared.
17798         (pupa_rescue_cmd_initrd): Likewise.
17799         (pupa_rescue_cmd_initrd): Likewise.
17801         * include/pupa/symbol.h (FUNCTION): Specify the type.
17802         (VARIABLE): Likewise.
17804         * include/pupa/err.h (pupa_err_t): Added
17805         PUPA_ERR_UNKNOWN_COMMAND.
17807         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17808         (pupa_dl_get_prefix): Likewise.
17810         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17811         Added _chain.mod and _linux.mod instead of chain.mod and
17812         linux.mod.
17813         (chain_mod_SOURCES): Renamed to ...
17814         (_chain_mod_SOURCES): ... this.
17815         (chain_mod_CFLAGS): Renamed to ...
17816         (_chain_mod_CFLAGS): ... this.
17817         (linux_mod_SOURCES): Renamed to ...
17818         (_linux_mod_SOURCES): ... this.
17819         (linux_mod_CFLAGS): Renamed to ...
17820         (_linux_mod_CFLAGS): ... this.
17821         (normal_mod_SOURCES): New variable.
17822         (normal_mod_CFLAGS): Likewise.
17823         (normal_mod_ASFLAGS): Likewise.
17825 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17827         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17828         possible.
17830         * kern/dl.c (pupa_dl_ref): Refer depending modules
17831         recursively.
17832         (pupa_dl_unref): Unrefer depending modules recursively.
17833         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17834         a module is unloaded before one depending on that module is
17835         unloaded.
17836         (pupa_dl_unload): Unload depending modules explicitly,
17837         if possible.
17839 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17841         * include/pupa/i386/pc/linux.h: New file.
17842         * loader/i386/pc/linux.c: Likewise.
17844         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17845         Removed.
17846         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17847         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17848         of PUPA_CHAINLOADER_BOOT_SECTOR.
17850         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17851         (pupa_linux_prot_size): New variable.
17852         (pupa_linux_tmp_addr): Likewise.
17853         (pupa_linux_real_addr): Likewise.
17854         (pupa_linux_boot_zimage): New function.
17855         (pupa_linux_boot_bzimage): Likewise.
17857         * kern/i386/pc/init.c (struct mem_region): New structure.
17858         (MAX_REGIONS): New macro.
17859         (mem_regions): New variable.
17860         (num_regions): Likewise.
17861         (pupa_os_area_addr): Likewise.
17862         (pupa_os_area_size): Likewise.
17863         (pupa_lower_mem): Likewise.
17864         (pupa_upper_mem): Likewise.
17865         (add_mem_region): New function.
17866         (compact_mem_regions): Likewise.
17867         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17868         the size of the conventional memory and that of so-called upper
17869         memory (before the first memory hole).
17870         Instead of adding each found region to free memory, use
17871         add_mem_region and add them after removing overlaps.
17872         Also, add only 1/4 of the upper memory to free memory. The rest
17873         is used for loading OS images. Maybe this is ad hoc, but this
17874         makes it much easier to relocate OS images when booting.
17876         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17877         (pupa_enter_rescue_mode): Don't register initrd and module.
17879         * kern/mm.c: Include pupa/dl.h.
17881         * kern/main.c: Include pupa/file.h and pupa/device.h.
17883         * kern/loader.c (pupa_loader_load_module_func): Removed.
17884         (pupa_loader_load_module): Likewise.
17886         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17887         ``.o''.
17889         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17890         (pupa_linux_tmp_addr): Likewise.
17891         (pupa_linux_real_addr): Likewise.
17892         (pupa_linux_boot_zimage): Likewise.
17893         (pupa_linux_boot_bzimage): Likewise.
17895         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17896         (pupa_upper_mem): Likewise.
17897         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17898         module is too dangerous.
17900         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17901         (pupa_os_area_size): Likewise.
17902         (pupa_loader_set): Remove the first argument. Loader doesn't
17903         manage modules or initrd any longer.
17904         (pupa_loader_load_module): Removed.
17906         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17907         (linux_mod_SOURCES): New variable.
17908         (linux_mod_CFLAGS): Likewise.
17910 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17912         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17913         the length of a blocklist correctly.
17915         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17916         Use ioctl only if the OS file is a block device.
17917         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17918         not very useful for normal files.
17920         * kern/main.c (pupa_set_root_dev): New function.
17921         (pupa_load_normal_mode): Likewise.
17922         (pupa_main): Call those above.
17924         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17925         pupa_uint16_t.
17927         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17929 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17931         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17932         (setup): Configure the installed partition information and the
17933         dl prefix.
17935         * loader/i386/pc/chainloader.c (my_mod): New variable.
17936         (pupa_chainloader_unload): New function.
17937         (pupa_rescue_cmd_chainloader): Refer itself.
17938         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17940         * kern/i386/pc/startup.S (install_partition): Removed.
17941         (version_string): Likewise.
17942         (config_file): Likewise.
17943         (pupa_install_dos_part): New variable.
17944         (pupa_install_bsd_part): Likewise.
17945         (pupa_prefix): Likewise.
17946         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17948         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17949         and pupa/misc.h.
17950         (make_install_device): New function.
17951         (pupa_machine_init): Set the dl prefix.
17953         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17954         (buf): Renamed to ...
17955         (linebuf): ... this.
17956         (pupa_rescue_cmd_prefix): New function.
17957         (pupa_rescue_cmd_insmod): Likewise.
17958         (pupa_rescue_cmd_rmmod): Likewise.
17959         (pupa_rescue_cmd_lsmod): Likewise.
17960         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17961         rmmod and lsmod.
17963         * kern/mm.c (pupa_memalign): If failed even after invalidating
17964         disk caches, unload unneeded modules and retry.
17966         * kern/misc.c (pupa_memmove): New function.
17967         (pupa_memcpy): Removed.
17968         (pupa_strcpy): New function.
17969         (pupa_itoa): Made static.
17971         * kern/dl.c (pupa_dl_iterate): New function.
17972         (pupa_dl_ref): Likewise.
17973         (pupa_dl_unref): Likewise.
17974         (pupa_dl_unload): Return if succeeded or not.
17975         (pupa_dl_unload_unneeded): New function.
17976         (pupa_dl_unload_all): Likewise.
17977         (pupa_dl_init): Renamed to ...
17978         (pupa_dl_set_prefix): ... this.
17979         (pupa_dl_get_prefix): New function.
17981         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17982         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17983         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17984         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17985         (pupa_install_dos_part): Declared.
17986         (pupa_install_bsd_part): Likewise.
17987         (pupa_prefix): Likewise.
17988         (pupa_boot_drive): Likewise.
17990         * include/pupa/types.h: Fix a typo.
17992         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17993         pupa_memmove.
17994         (pupa_memmove): Declared.
17995         (pupa_strcpy): Likewise.
17997         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17998         pupa_mod_init takes one argument, its own module.
17999         (pupa_dl_unload_unneeded): Declared.
18000         (pupa_dl_unload_all): Likewise.
18001         (pupa_dl_ref): Likewise.
18002         (pupa_dl_unref): Likewise.
18003         (pupa_dl_iterate): Likewise.
18004         (pupa_dl_init): Renamed to ...
18005         (pupa_dl_set_prefix): ... this.
18006         (pupa_dl_get_prefix): Declared.
18008         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18009         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18010         unloaded.
18011         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18012         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18014         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18015         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18017 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18019         * util/i386/pc/pupa-setup.c (setup): Define the internal
18020         function find_first_partition_start at the top level, because GCC
18021         3.0.x cannot compile internal functions in deeper scopes
18022         correctly.
18023         (find_root_device): Use lstat instead of stat.
18024         Don't follow symbolic links.
18025         Fix the path-constructing code.
18027         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18028         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18029         by a BLKGETSIZE ioctl first, because block devices don't fill
18030         the member st_mode of the structure stat on Linux.
18031         [__linux__] (linux_find_partition): Use a temporary buffer
18032         REAL_DEV for the working space. Copy it to DEV before returning.
18033         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18034         buffer cache consistent.
18035         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18036         strncmp. The previous value was merely wrong.
18037         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18039         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18040         FAT size is 12. The previous value was merely wrong.
18042         * kern/main.c (pupa_main): Don't split the starting message from
18043         newlines.
18045         * kern/term.c (pupa_putchar): Put CR after LF instead of before
18046         LF, because BIOS goes crazy about character attributes in this
18047         case.
18049 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18051         * include/i386/pc/util/biosdisk.h: New file.
18052         * util/i386/pc/biosdisk.c: Likewise.
18053         * util/i386/pc/pupa-setup.c: Likewise.
18055         * Makefile.in (INCLUDE_DISTFILES): Added
18056         include/pupa/i386/pc/util/biosdisk.h.
18057         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18058         directory util/i386/pc.
18059         (install-local): Added a rule for sbin_UTILITIES.
18060         (uninstall): Likewise.
18062         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18064         * util/misc.c (xrealloc): New function.
18065         (pupa_malloc): Likewise.
18066         (pupa_free): Likewise.
18067         (pupa_realloc): Likewise.
18068         (pupa_stop): Likewise.
18069         (pupa_putchar): Likewise.
18071         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18073         * include/pupa/util/misc.h (xrealloc): Declared.
18075         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18076         macro.
18077         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18078         (PUPA_BOOT_MACHINE_BPB_END): ... this.
18080         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18081         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18083         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18084         way should be implemented.
18085         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18087         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18088         the size of NAME for safety.
18089         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18090         0x88.
18092         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18093         (pupa_setup_SOURCES): Likewise.
18095         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18097 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18099         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18100         bunch of pushl's from pusha, because this destroys the return
18101         value.
18103 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18105         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18106         This means that any missing prototypes could be fatal. Also, you
18107         must take care when writing assembly code. See the comments at
18108         the beginning of startup.S, for more details.
18110         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18111         compilation mechanism.
18112         (pupa_chainloader_real_boot): Likewise.
18113         (pupa_biosdisk_rw_int13_extensions): Likewise.
18114         (pupa_biosdisk_rw_standard): Likewise.
18115         (pupa_biosdisk_check_int13_extensions): Likewise.
18116         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18117         (pupa_biosdisk_get_diskinfo_standard): Likewise.
18118         (pupa_get_memsize): Likewise.
18119         (pupa_get_mmap_entry): Likewise.
18120         (pupa_console_putchar): Likewise.
18121         (pupa_console_setcursor): Likewise.
18122         (pupa_getrtsecs): Use pushl instead of push.
18124         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18125         memory instead of the stack for a mmap entry, because some
18126         BIOSes may ignore the maximum size and overflow.
18128         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18130         * genmk.rb (PModule#rule): Compile automatically generated
18131         sources with module-specific CFLAGS as well as other sources.
18133 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18135         * configure.ac: Check ld.
18136         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18137         respectively, before checking endianness and sizes.
18139         * Makefile.in (LD): New variable.
18141 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18143         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18145 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18147         * Changelog: New file.