fix last changelog entry
[grub2/phcoder/solaris.git] / ChangeLog
blobc8f1b9cbf9523b36f9779520213b6922677dbb9d
1 2009-09-15  Vladimir Serbinenko  <phcoder@gmail.com>
3         * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
5 2009-09-14  Colin Watson  <cjwatson@ubuntu.com>
7         * commands/test.c (get_fileinfo): Return immediately if
8         grub_fs_probe fails.
10 2009-09-14  José Martínez  <xosemp@gmail.com>
12         * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
14 2009-09-14  Colin Watson  <cjwatson@ubuntu.com>
16         * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
17         output.
19 2009-09-13  Robert Millan  <rmh.grub@aybabtu.com>
21         * configure.ac: Remove --enable-grub-pe2elf.  Only build
22         grub-pe2elf when needed by the build system itself.
23         * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
25 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
27         * configure.ac: Bump version to 1.97~beta3.
28         * docs/version.texi: Likewise.
30 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
32         * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
33         mode special handling (grub_vbe_bios_set_dac_palette_width() call)
34         from here ...
35         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
36         (grub_linux_setup_video): ... to here (with some adjustments).
38 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
40         Fix memory corruption issue (spotted by Colin Watson).
42         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
43         causing returned size to be stored in an incorrect memory location.
44         Fix use of uninitialized value when storing the returned size.
46 2009-09-12  Yves Blusseau  <blusseau@zetam.org>
48         Change clean rules to properly remove files
50         * genmk.rb: add new clean rules
51         * Makefile.in (clean): add the new targets
52         (mostlyclean): likewise
54 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
56         * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
57         to grub_uint64_t.
58         * fs/ntfs.c (init_file): Understand 64-bit sizes for
59         non-resident files.
61 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
63         * configure.ac: Don't look for help2man when cross-compiling.  Fixes
64         part of bug #27349.
66 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
68         * util/grub-mkconfig.in: Make the created config mode 400 and
69         print a warning if it fails.
71 2009-09-10  Robert Millan  <rmh.grub@aybabtu.com>
73         * util/grub.d/40_custom.in: Ask user to type custom entries below
74         comment, rather than below 'exec tail' line.
76 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
78         * util/grub.d/40_custom.in: Make sure that the explanatory text is
79         visible in grub.cfg.
81 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
83         * util/grub.d/40_custom.in: Make it a little clearer how to use this
84         file.
86 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
88         * docs/grub.cfg: Add an example menu entry for memtest86+.
90 2009-09-09  Felix Zielcke  <fzielcke@z-51.de>
92         * config.guess: Update to latest version from config git.
93         * config.sub: Likewise.
95 2009-09-08  Colin Watson  <cjwatson@ubuntu.com>
97         * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
98         unknown-command case.  Fixes bug #27320.
100 2009-09-08  Felix Zielcke  <fzielcke@z-51.de>
102         * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
103         `help' if the command exists.
105 2009-09-06  Robert Millan  <rmh.grub@aybabtu.com>
107         * INSTALL: Require GCC 4.1.3 or later.
109 2009-09-06  Yves Blusseau  <blusseau@zetam.org>
111         * Makefile.in (RMKFILES): add i386-qemu.rmk
112         (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
113         $(srcdir)/stamp-h.in
115 2009-09-05  Robert Millan  <rmh.grub@aybabtu.com>
117         * util/grub-probe.c (probe): Comment out buggy codepath, which
118         was unexpectedly enabled by Colin Watson's 2009-09-02 fix.  This
119         should be re-enabled after 1.97.
121 2009-09-05  Felix Zielcke  <fzielcke@z-51.de>
123         * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
124         find searches for.
126 2009-09-04  Vladimir Serbinenko  <phcoder@gmail.com>
128         * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
129         unnecessary calls to grub_error.
131 2009-09-04  Colin Watson  <cjwatson@ubuntu.com>
133         * NEWS: Mention `keystatus' and Unicode fonts.
135 2009-09-04  Robert Millan  <rmh.grub@aybabtu.com>
137         * configure.ac: Bump version to 1.97~beta2.
138         * docs/version.texi: Likewise.
140 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
142         * configure.ac: By default, GCC 4.4 generates .eh_frame sections
143         containing unwind information in some cases where it previously did
144         not. Use -fno-dwarf2-cfi-asm if available to restore the old
145         behaviour. See http://patchwork.kernel.org/patch/8555/ for related
146         discussion.
148 2009-09-02  Yves BLUSSEAU  <blusseau@zetam.org>
150         Embedding loadenv module into grub-emu
152         * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
153         commands/loadenv.c
154         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
155         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
156         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
157         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
158         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
159         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
161 2009-09-03  Magnus Granberg  <zorry@ume.nu>
163         * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
164         include -fPIE in the default specs.
165         * configure.ac: Check if pie_possible is yes and add -fno-PIE
166         to TARGET_CFLAGS.
168 2009-09-03  Felix Zielcke  <fzielcke@z-51.de>
170         * INSTALL: Note that GNU Bison 2.3 or later is required.
172 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
174         * kern/i386/pc/startup.S: Fix typo.
176 2009-09-02  Vladimir Serbinenko  <phcoder@gmail.com>
178         * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
179         according to GCS.
181 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
183         * docs/grub.texi (Naming convention): Describe one-based partition
184         numbering.
185         (Device syntax): Likewise.
186         (File name syntax): Likewise.
187         (Block list syntax): Likewise.
188         (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
189         menu.lst.
190         (File name syntax): Likewise.
191         (Command-line and menu entry commands): Document acpi, blocklist,
192         crc, export, insmod, keystatus, ls, set, and unset commands.
194 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
196         * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
197         to avoid implying that only one of --shift, --ctrl, or --alt may be
198         used.
200 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
202         * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
203         rather than comparing against S_IFREG, which will almost never work.
205 2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>
207         * commands/loadenv.c (check_blocklists): Fix off-by-one error.
208         (write_blocklists): Likewise.
210 2009-09-01  Colin Watson  <cjwatson@ubuntu.com>
212         * script/lua/grub_lua.h (fputs): Supply a format string as the first
213         argument to grub_printf.
215 2009-09-01  Felix Zielcke  <fzielcke@z-51.de>
217         * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
218          non GNU test.
220 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
222         * kern/file.c (grub_file_read): Spelling fix
224 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
226         * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
227         loading of headers in some cases.
229 2009-08-30  Robert Millan  <rmh.grub@aybabtu.com>
231         * configure.ac: Bump version to 1.97~beta1.
232         * docs/version.texi: Likewise.
234 2009-08-29  Vladimir Serbinenko  <phcoder@gmail.com>
236         * include/grub/i386/xnu.h: Add license header.
237         include grub/err.h explicitly.
239 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
241         * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
242         to `ufs' in the vfs.root.mountfrom kernel parameter.
244 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
246         * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
248         [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
249         value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
251         [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
252         `ARRAY_SIZE' macro.
254 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
256         * kern/file.c (grub_file_read): Check offset.
257         * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
258         * fs/jfs.c (grub_jfs_read_file): Likewise.
259         * fs/ntfs.c (grub_ntfs_read): Likewise.
260         * fs/reiserfs.c (grub_reiserfs_read): Likewise.
261         * fs/minix.c (grub_minix_read_file): Correct offset check.
262         * fs/ufs.c (grub_ufs_read_file): Likewise.
264 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
266         * term/i386/pc/console.c (bios_data_area): Cast
267         GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
269 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
271         1-bit optimised blitters.
273         * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
274         prototype.
275         (grub_video_fbblit_replace_24bit_1bit): Likewise.
276         (grub_video_fbblit_replace_16bit_1bit): Likewise.
277         (grub_video_fbblit_replace_8bit_1bit): Likewise.
278         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
279         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
280         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
281         * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
282         function.
283         (grub_video_fbblit_replace_24bit_1bit): Likewise.
284         (grub_video_fbblit_replace_16bit_1bit): Likewise.
285         (grub_video_fbblit_replace_8bit_1bit): Likewise.
286         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
287         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
288         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
289         * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
290         when possible.
291         * video/video.c (grub_video_get_blit_format): Return
292         GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
294 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
296         * normal/cmdline.c (grub_cmdline_get): Supply a format string as
297         the first argument to grub_printf.
299 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
300 2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>
302         Add `getkeystatus' terminal method.  Add a new `keystatus' command
303         to query it.
305         * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
306         GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
307         modifier key bitmasks.
308         (struct grub_term_input): Add `getkeystatus' member.
309         (grub_getkeystatus): Add prototype.
310         * kern/term.c (grub_getkeystatus): New function.
312         * include/grub/i386/pc/memory.h
313         (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
314         (struct grub_machine_bios_data_area): Define necessary parts of BIOS
315         Data Area layout.
316         * term/i386/pc/console.c (grub_console_getkeystatus): New function.
317         (grub_console_term_input): Set `getkeystatus' member.
318         * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
319         constants.
320         (grub_usb_keyboard_getreport): Likewise.
321         (grub_usb_keyboard_checkkey): Likewise.
322         (grub_usb_keyboard_getkeystatus): New function.
323         (grub_usb_keyboard_term): Set `getkeystatus' member.
325         * commands/keystatus.c: New file.
326         * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
327         (keystatus_mod_SOURCES): New variable.
328         (keystatus_mod_CFLAGS): Likewise.
329         (keystatus_mod_LDFLAGS): Likewise.
330         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
331         commands/keystatus.c.
332         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
333         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
334         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
335         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
336         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
337         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
339 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
341         Split befs.mod and afs.mod into *_be.mod and *.mod
343         * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
344         (grub_fstest_SOURCES): Likewise.
345         (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
346         (afs_be_mod_SOURCES): New variable.
347         (afs_be_mod_CFLAGS): Likewise.
348         (afs_be_mod_LDFLAGS): Likewise.
349         (befs_be_mod_SOURCES): Likewise.
350         (befs_be_mod_CFLAGS): Likewise.
351         (befs_be_mod_LDFLAGS): Likewise.
352         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
353         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
354         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
355         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
356         (grub_emu_SOURCES): Likewise.
357         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
358         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
359         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
360         * fs/afs_be.c: New file.
361         * fs/befs_be.c: New file.
362         * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
363         (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
364         (U16): Replaced with ...
365         (grub_afs_to_cpu16): ...this. All users updated.
366         (U32): Replaced with ...
367         (grub_afs_to_cpu32): ...this. All users updated.
368         (U64): Replaced with ...
369         (grub_afs_to_cpu64): ...this. All users updated.
370         (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
371         (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
372         (grub_afs_validate_sblock): Check only one endianness.
373         (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
374         (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
375         (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
376         (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
377         (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
378         (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
379         (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
380         (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
382 2009-08-26  Bean  <bean123ch@gmail.com>
384         * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
385         64-bit number.
386         (GRUB_XFS_FSB_TO_BLOCK): Likewise.
387         (grub_xfs_inode_block): Change return type to grub_uint64_t.
388         (grub_xfs_read_inode): Change type of block to grub_uint64_t.
390 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
392         NetBSD memory map support.
394         * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
395         (grub_netbsd_btinfo_mmap_header): New structure.
396         (grub_netbsd_btinfo_mmap_entry): Likewise.
397         * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
399 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
401         Enable bsd.mod on coreboot.
403         * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
404         (bsd_mod_SOURCES): New variable.
405         (bsd_mod_CFLAGS): Likewise.
406         (bsd_mod_LDFLAGS): Likewise.
407         (bsd_mod_ASFLAGS): Likewise.
408         * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
409         (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
411 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
413         Cleanup NetBSD root support.
415         * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
416         grub_bsd_get_device.
417         Fix typo.
419 2009-08-25  Felix Zielcke  <fzielcke@z-51.de>
421         * util/grub.d/00_header.in: Move check for the video backend of
422         gfxterm from here ...
423         * util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
424         a suitable video backend.
426 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
428         Fix breakage in grub-setup.
430         * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
431         "msdos_partition_map".
433 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
435         Fix breakage in normal/auth.c.
437         * normal/auth.c (grub_iswordseparator): New function.
439 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
441         Authentication support.
443         * commands/password.c: New file.
444         * conf/common.rmk (pkglib_MODULES): Add password.mod.
445         (password_mod_SOURCES): New variable.
446         (password_mod_CFLAGS): Likewise.
447         (password_mod_LDFLAGS): Likewise.
448         (normal_mod_SOURCES): Add normal/auth.c.
449         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
450         normal/auth.c.
451         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
452         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
453         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
454         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
455         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
456         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
457         * include/grub/auth.h: New file.
458         * include/grub/err.h (grub_err_t): New enum value
459         GRUB_ERR_ACCESS_DENIED.
460         * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
461         'users'.
462         * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
463         * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
464         users updated.
465         * normal/auth.c: New file.
466         * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
467         (grub_cmdline_run): Don't allow to go to command line without
468         authentication.
469         * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
470         * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
471         menuentry without superuser rights.
472         * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
473         user isn't a superuser.
475 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
477         Save space by inlining misc.c functions.
479         * kern/misc.c (grub_iswordseparator): Made static.
480         * kern/misc.c (grub_strcat): Moved from here ...
481         * include/grub/misc.h (grub_strcat): ... here. Inlined.
482         * kern/misc.c (grub_strncat): Moved from here ...
483         * include/grub/misc.h (grub_strncat): ... here. Inlined.
484         * kern/misc.c (grub_strcasecmp): Moved from here ...
485         * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
486         * kern/misc.c (grub_strncasecmp): Moved from here ...
487         * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
488         * kern/misc.c (grub_isalpha): Moved from here ...
489         * include/grub/misc.h (grub_isalpha): ... here. Inlined.
490         * kern/misc.c (grub_isdigit): Moved from here ...
491         * include/grub/misc.h (grub_isdigit): ... here. Inlined.
492         * kern/misc.c (grub_isgraph): Moved from here ...
493         * include/grub/misc.h (grub_isgraph): ... here. Inlined.
494         * kern/misc.c (grub_tolower): Moved from here ...
495         * include/grub/misc.h (grub_tolower): ... here. Inlined.
497 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
499         * script/sh/function.c (grub_script_function_find): Cut error message
500         not to flood terminal.
501         * script/sh/lexer.c (grub_script_yylex): Remove command line length
502         limit.
503         * script/sh/script.c (grub_script_arg_add): Duplicate string.
505 2009-08-24  Colin Watson  <cjwatson@ubuntu.com>
507         * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
508         `report' grub_uint8_t *.
509         (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
510         Use a 50-millisecond timeout rather than just repeating
511         grub_usb_keyboard_getreport 50 times.
512         (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
514 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
516         Rename *_partition_map to part_*
518         * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
519         * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
520         * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
521         * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
522         All users updated.
523         * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
524         All users updated.
525         * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
526         * util/grub-probe.c (probe_partmap): Don't transform partition name
527         to get module name.
529 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
531         Fix OpenBSD and NetBSD support.
533         * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
534         memory address conflict.
535         (OPENBSD_MMAP_ACPI): New definition.
536         (OPENBSD_MMAP_NVS): Likewise.
537         * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
538         and OPENBSD_MMAP_NVS.
539         Add memory map terminator
540         Explicit cast when calling grub_unix_real_boot.
541         (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
543 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
545         Let user specify NetBSD root device.
547         * loader/i386/bsd.c (netbsd_root): New variable.
548         (netbsd_opts): New option 'root'.
549         (NETBSD_ROOT_ARG): New macro.
550         (grub_netbsd_boot): Use 'netbsd_root'.
551         (grub_bsd_unload): Free 'netbsd_root'.
552         (grub_cmd_netbsd): Fill 'netbsd_root'.
554 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
556         Support for 64-bit NetBSD.
558         * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
559         point when booting non-FreeBSD.
561 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
563         Support --no-smp and --no-acpi for NetBSD.
565         * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
566         (NETBSD_AB_NOACPI): Likewise.
567         * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
568         (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
570 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
572         * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
573         errors.
574         (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
575         errors. Call grub_error when needed.
577 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
579         * commands/search.c (search_fs): Try searching without autoload first.
580         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
581         filesystem module explicitly for faster booting.
583 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
585         * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
587 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
589         * util/grub.d/30_os-prober.in: Disable os-prober if
590         `GRUB_DISABLE_OS_PROBER' was set to true.
592 2009-08-23  Robert Millan  <rmh.grub@aybabtu.com>
594         * partmap/pc.c: Rename to ...
595         * partmap/msdos.c: ... this.  Update all users.
596         (grub_pc_partition_map): Rename to ...
597         (grub_msdos_partition_map): ... this.  Update all users.
599         * parttool/pcpart.c: Rename to ...
600         * parttool/msdospart.c: ... this.  Update all users.
602         * include/grub/pc_partition.h: Rename to ...
603         * include/grub/msdos_partition.h: ... this.  Update all users.
604         (grub_pc_partition_bsd_entry): Rename to ...
605         (grub_msdos_partition_bsd_entry): ... this.  Update all users.
606         (grub_pc_partition_disk_label): Rename to ...
607         (grub_msdos_partition_disk_label): ... this.  Update all users.
608         (grub_pc_partition_entry): Rename to ...
609         (grub_msdos_partition_entry): ... this.  Update all users.
610         (grub_pc_partition_mbr): Rename to ...
611         (grub_msdos_partition_mbr): ... this.  Update all users.
612         (grub_pc_partition): Rename to ...
613         (grub_msdos_partition): ... this.  Update all users.
614         (grub_pc_partition_is_empty): Rename to ...
615         (grub_msdos_partition_is_empty): ... this.  Update all users.
616         (grub_pc_partition_is_extended): Rename to ...
617         (grub_msdos_partition_is_extended): ... this.  Update all users.
618         (grub_pc_partition_is_bsd): Rename to ...
619         (grub_msdos_partition_is_bsd): ... this.  Update all users.
621         * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
622         (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
623         (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
624         (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
625         (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
626         (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
627         (gpt_mod_LDFLAGS): Rename to ...
628         (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
629         (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
630         (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
631         (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
632         (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
633         (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
634         (part_gpt_mod_LDFLAGS): ... this.
635         (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
636         `pcpart.mod' to `msdospart.mod'.
637         (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
638         to ...
639         (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
640         (msdospart_mod_LDFLAGS): ... this.
642 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
644         * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
645         (openbsd_opts): Likewise.
646         (netbsd_opts): Likewise.
647         (freebsd_flags): Added 0 terminator.
648         (openbsd_flags): Likewise.
649         (netbsd_flags): Likewise.
650         (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
651         (grub_cmd_freebsd): Transformed into extended command.
652         (grub_cmd_openbsd): Likewise.
653         (grub_cmd_netbsd): Likewise.
654         (cmd_freebsd): Changed type to grub_extcmd_t.
655         (cmd_openbsd): Likewise.
656         (cmd_netbsd): Likewise.
657         (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
658         grub_cmd_openbsd as extended commands.
659         (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
660         cmd_netbsd and cmd_openbsd
662 2009-08-22  Vladimir Serbinenko  <phcoder@gmail.com>
664         * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
666 2009-08-21  Pavel Roskin  <proski@gnu.org>
668         * Makefile.in (install-local): When checking if a file is in the
669         build directory, use "test -e" to detect symlinks.
671         * Makefile.in (install-local): Remove all files in
672         $(DESTDIR)$(pkglibdir) before installing new files there.
674 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
676         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
677         grub-mkelfimage.
679 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
681         * util/grub-mkconfig.in: Don't use gfxterm by default if not
682         explicitly specified by the user.
684 2009-08-18  Pavel Roskin  <proski@gnu.org>
686         * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
687         grub_uint8_t pointer for data.
688         * include/grub/fbutil.h (struct grub_video_fbblit_info):
689         Likewise.
690         * video/fb/fbutil.c: Remove unnecessary casts.
692 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
694         VBE cleanup.
696         * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
697         (grub_vbe_set_video_mode): Save active mode info
698         only after setting the mode.
699         (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
700         second argument.
702 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
704         Rename variables for clarity.
706         * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
707         (active_vbe_mode_info): ... this. All users updated.
708         (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
709         All users updated.
710         (initial_mode): Rename to ...
711         (initial_vbe_mode): ... this. All users updated.
712         (mode_in_use): Rename to ..
713         (vbe_mode_in_use): ... this. All users updated.
714         (mode_list): Rename to ..
715         (vbe_mode_list): ... this. All users updated.
716         (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
717         'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
718         (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
719         'mode_list_size' to 'vbe_mode_list_size'.
720         (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
721         'best_mode_info' to 'best_vbe_mode_info' and
722         'best_mode' to 'best_vbe_mode'
724 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
726         Remove duplicate grub_video_fb_get_video_ptr.
728         * include/grub/fbutil.h (get_data_ptr): Rename to ...
729         (grub_video_fb_get_video_ptr): ... this.
730         * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
731         * video/fb/fbutil.c: Add comment about addressing.
732         (get_data_ptr): Rename to ...
733         (grub_video_fb_get_video_ptr): ... this. All users updated.
734         * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
736 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
738         * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
739         grub_dprintf() that was just added.
741 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
743         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
744         (DEFAULT_VIDEO_MODE): Remove macros.
745         (grub_linux_boot): Remove assumption that Linux has FB support,
746         and use "text" as default video mode.
748 2009-08-15  Vladimir Serbinenko  <phcoder@gmail.com>
750         * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
751         grub_dprintf.
752         * fs/fat.c (grub_fat_read_data): Likewise.
754 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
756         * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
757         payload.
758         (grub_module): Likewise.
760 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
762         * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
763         mbi->cmdline but free playground.
765 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
767         Handle group offset on UFS1.
769         * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
770         (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
772 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
774         Split ufs.mod into ufs1.mod and ufs2.mod.
776         * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
777         (grub_fstest_SOURCES): Likewise.
778         (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
779         (ufs_mod_SOURCES): Remove.
780         (ufs_mod_CFLAGS): Likewise.
781         (ufs_mod_LDFLAGS): Likewise.
782         (ufs1_mod_SOURCES): New variable.
783         (ufs1_mod_CFLAGS): Likewise.
784         (ufs1_mod_LDFLAGS): Likewise.
785         (ufs2_mod_SOURCES): New variable.
786         (ufs2_mod_CFLAGS): Likewise.
787         (ufs2_mod_LDFLAGS): Likewise.
788         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
789         * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
790         Likewise.
791         (grub_emu_SOURCES): Likewise.
792         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
793         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
794         (grub_setup_SOURCES): Likewise.
795         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
796         * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
797         (grub_setup_SOURCES): Likewise.
798         * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
799         Likewise.
800         * fs/ufs2.c: New file.
801         * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
803 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
805         Framebuffer split.
807         * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
808         subsystem at the end.
809         * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
810         (video_fb_mod_SOURCES): New variable.
811         (video_fb_mod_CFLAGS): Likewise.
812         (video_fb_mod_LDFLAGS): Likewise.
813         * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
814         video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
815         * video/i386/pc/vbeblit.c: Moved from here ...
816         * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
817         * video/i386/pc/vbefill.c: Moved from here ...
818         * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
819         * video/i386/pc/vbeutil.c: Moved from here ...
820         * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
821         * include/grub/i386/pc/vbeblit.h: Moved from here ...
822         * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
823         * include/grub/i386/pc/vbefill.h: Moved from here ...
824         * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
825         * include/grub/i386/pc/vbeutil.h: Moved from here ...
826         * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
827         * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
828         * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
829         * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
830         (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
831         (grub_video_adapter): Added 'get_info_and_fini'.
832         (grub_video_get_info_and_fini): New prototype.
833         (grub_video_set_mode): make modestring const char *.
834         * loader/i386/linux.c (grub_linux_setup_video): Use
835         grub_video_get_info_and_fini.
836         (grub_linux_boot): Move modesetting just before booting.
837         * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
838         grub_video_get_info_and_fini.
839         * video/i386/pc/vbe.c: Moved framebuffer part ...
840         * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
841         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
842         grub_video_fbstd_colors and grub_video_fb_set_palette.
843         (grub_video_vbe_init): Clear 'framebuffer' variable and use
844         grub_video_fb_init.
845         (grub_video_vbe_fini): Use grub_video_fb_fini.
846         (grub_video_vbe_setup): Use framebuffer.render_target instead of
847         render_target and use grub_video_fb_set_active_render_target and
848         grub_video_fb_set_palette.
849         (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
850         (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
851         (grub_video_vbe_adapter): Use framebuffer.
852         * video/video.c (grub_video_get_info_and_fini): New function.
853         (grub_video_set_mode): Make modestring const char *.
854         (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
855         values are already initialised.
857 2009-08-14  Pavel Roskin  <proski@gnu.org>
859         * boot/i386/pc/cdboot.S: Use LOCAL for local labels.  Eliminate
860         ABS and APPLE_CC.
861         * boot/i386/pc/diskboot.S: Likewise.
862         * boot/i386/pc/lnxboot.S: Likewise.  Hardcode the number of code
863         sectors allow compilation on MacOSX.
864         * conf/i386-pc.rmk: Enable unconditional compilation of
865         lnxboot.img.
867 2009-08-13  Colin Watson  <cjwatson@ubuntu.com>
869         * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
870         * util/grub.d/00_header.in: Enter interruptible sleep if
871         GRUB_HIDDEN_TIMEOUT is set.
873 2009-08-13  Yves Blusseau  <blusseau@zetam.org>
875         * include/grub/symbol.h: Add the LOCAL macro.
876         * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
877         starting with "L_".
879 2009-08-13  Pavel Roskin  <proski@gnu.org>
881         * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
882         any modern compilers we support.
884         * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
885         Use local labels starting with "L_" so that Apple assembler
886         knows they are local.
888 2009-08-10  Robert Millan  <rmh.grub@aybabtu.com>
890         * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
891         (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
892         (bsd_kernel_types): ... this enum.
894         * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
895         (grub_cmd_freebsd_module_elf): Abort with "You need to load the
896         kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
898         (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
899         (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
900         (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
901         messages.
903 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
905         * util/grub-dumpdevtree: Moved from here ...
906         * util/i386/efi/grub-dumpdevtree: ... to here.
907         (hexify): New function.  Converts a string to its hex version.
908         Generate hex versions of "efi" and "device-properties" by calling
909         hexify() on the ASCII strings rather than by hardcoding numbers.
911 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
913         * fs/jfs.c: Update copyright year.
915 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
917         * util/grub.d/00_header.in: Fix a comment.
918         * util/grub.d/10_linux.in: Likewise.
919         * util/grub.d/10_windows.in: Likewise.
920         * util/grub.d/10_hurd.in: Likewise.
922 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
924         * util/grub-mkconfig.in: Allow the user to specify the used font
925         with GRUB_FONT.
927 2009-08-08  Pavel Roskin  <proski@gnu.org>
929         * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
930         available, xfs.mod needs it now.
932         * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
933         the "g" modifier in sed when the intention is to strip something
934         once.  This fixes comparison of kernels with multiple dashes.
936         * util/grub-mkconfig.in: Define datarootdir, datadir may depend
937         on it.  Add missing space before closing bracket.  Fix
938         misleading formatting.
940 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
942         * docs/grub.texi: Major overhaul.  Remove all sections that are
943         specific to GRUB Legacy, or mostly composed of Legacy-specific
944         information.
946 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
948         * docs/version.texi: New file.  Provides version information for
949         grub.texi.
951 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
953         * docs/grub.texi: Update CVS information to SVN.
954         Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
956 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
958         * util/grub-mkconfig.in: Remove a wrong `fi'.
960 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
962         * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
963         (grub_jfs_uuid): New function.
964         (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
966 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
968         * util/grub-mkconfig_lib.in (font_path): Move the functionality
969         of it to ...
970         * util/grub-mkconfig.in: ... here.  Prefer unicode.pf2 and
971         unifont.pf2 over ascii.pf2.  Export LANG=C in case ascii.pf2 gets used.
973 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
975         * util/grub.d/10_linux.in (test_numeric): Moved from here ...
976         * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
977         Update all users.
979         * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
980         not just "vmlinu[zx]".
981         Moved from here ...
982         * util/grub-mkconfig_lib.in (version_test_gt): ... to here.  Update
983         all users.
985         * util/grub.d/10_linux.in (find_latest): Moved from here ...
986         * util/grub-mkconfig_lib.in (version_find_latest): ... to here.  Update
987         all users.
989 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
991         * util/grub.d/10_freebsd.in: Use an absolute device path for
992         `vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.
994 2009-08-06  Felix Zielcke  <fzielcke@z-51.de>
996         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
997         handling of multiple abstraction modules.
999 2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>
1001         Fix a bug resulting in black screen when loading Linux using a
1002         packed video mode.
1004         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
1005         function.
1007         * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
1008         (grub_vbe_bios_getset_dac_palette_width): New function.
1009         (grub_vbe_bios_get_dac_palette_width)
1010         (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
1011         grub_vbe_bios_getset_dac_palette_width()).
1013         * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
1014         check for return status.
1015         (grub_vbe_get_video_mode_info): When getting information for a packed
1016         mode (<= 8 bpp), obtain DAC palette width using
1017         grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
1018         {red,green,blue}_mark_size.
1020 2009-08-04  Felix Zielcke  <fzielcke@z-51.de>
1022         * commands/search.c (options): Fix help output to match actual code.
1024 2009-08-02  Vladimir Serbinenko  <phcoder@gmail.com>
1026         * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
1027         of homegrown code.
1029 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1031         * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
1032         on XFS or ReiserFS.
1034 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1036         Support Apple partition map with sector size different from 512 bytes.
1038         * partmap/apple.c (grub_apple_header): New field 'blocksize'.
1039         (apple_partition_map_iterate): Respect 'aheader.blocksize'
1040         and 'apart.partmap_size'.
1042 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1043 2009-08-01  Robert Millan  <rmh.grub@aybabtu.com>
1045         Fix cpuid command.
1047         * commands/i386/cpuid.c (options): New variable.
1048         (grub_cmd_cpuid): Return real error.
1049         (GRUB_MOD_INIT(cpuid)): Declare options.
1051 2009-07-31  Vladimir Serbinenko  <phcoder@gmail.com>
1053         * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
1054         valid.
1056 2009-07-31  Bean  <bean123ch@gmail.com>
1058         * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
1059         log2_inode.
1060         (grub_fshelp_node): Move inode field to the end.
1061         (grub_xfs_data): Remove inode field.
1062         (grub_xfs_inode_block): Calculate inode size using sblock.
1063         (grub_xfs_inode_offset): Likewise.
1064         (grub_xfs_read_inode): Calculate inode size using sblock.
1065         (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
1066         (grub_xfs_iterate_dir): Calculate inode size using sblock.
1067         (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
1068         to match inode size.
1069         (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
1070         not accessible when data is null.
1071         (grub_xfs_open): Likewise.
1073 2009-07-31  Bean  <bean123ch@gmail.com>
1075         * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
1076         Don't change pv->disk if it's already set.
1078         * disk/raid.c (grub_raid_scan_device): Merge this function into ...
1079         (grub_raid_register): ... here.
1080         (grub_raid_rescan): Removed.
1082         * include/grub/raid.h (grub_raid_rescan): Removed.
1084         * util/grub-fstest.c: Remove include file <grub/raid.h>.
1085         (fstest): Replace grub_raid_rescan with module fini function followed
1086         by init function.
1088         * util/grub-probe.c: Add include file <grub/raid.h>.
1089         (probe_raid_level): New function.
1090         (probe): Detect abstraction by walking the disk device, support two
1091         level of abstraction (LVM on RAID) when detecting partition map.
1093 2009-07-31  Pavel Roskin  <proski@gnu.org>
1095         * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
1096         to grub_zalloc(), it was erroneous.
1097         Reported by Bean <bean123ch@gmail.com>
1099 2009-07-30  Vladimir Serbinenko  <phcoder@gmail.com>
1101         * util/i386/pc/grub-setup.c (setup): Check that no partition is in
1102         embedding zone, not only the first one.
1104 2009-07-29  Joe Auricchio  <jauricchio@gmail.com>
1106         * term/gfxterm.c (clear_char): New function.
1107         (grub_virtual_screen_setup): Use clear_char.
1108         (scroll_up): Likewise.
1109         (grub_virtual_screen_cls): Likewise.
1111 2009-07-29  Felix Zielcke  <fzielcke@z-51.de>
1113         * util/deviceiter.c (get_acceleraid_disk_name): New static
1114         function.
1115         (grub_util_iterate_devices): Handle Accelraid devices.
1116         * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
1118 2009-07-28  Robert Millan  <rmh.grub@aybabtu.com>
1120         * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
1121         separator for the suggested gfxpayload string (';' collides with the
1122         parser and needs escaping).
1124 2009-07-28  Vladimir Serbinenko  <phcoder@gmail.com>
1126         * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
1127         Clear direction flag before jumping to OS.
1128         (grub_multiboot2_real_boot): Likewise.
1130 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1132         * util/i386/pc/grub-install: Fix parsing of --disk-module
1133         option.
1135 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1137         * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
1138         when embedding.
1140 2009-07-26  Felix Zielcke  <fzielcke@z-51.de>
1142         * util/grub-mkconfig.in (package_version): New variable.
1143         Use it do display the version.
1145 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1147         * kern/file.c (grub_file_open): Revert to previous check with
1148         grub_errno.
1150 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1152         * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
1153         from help line. It's out of sync with code.
1155 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1157         * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
1158         entries on failed boot.
1160 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1162         * kern/file.c (grub_file_open): Fix an error check.
1164 2009-07-24  Vladimir Serbinenko  <phcoder@gmail.com>
1166         * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
1167         partition map couldn't be identified.
1169 2009-07-23  Pavel Roskin  <proski@gnu.org>
1171         * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
1172         instead of WORDS_BIGENDIAN.  Use grub_le_to_cpu32(), so that the
1173         case of little endian words becomes just an optimization.
1174         Respect const modifier.
1175         (md5_final): Use code that doesn't depend on endianness.
1177         * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
1178         to avoid loss of upper bits if align is unsigned and shorter
1179         than addr.
1181 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1183         UUID support for UFS
1185         * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
1186         (grub_ufs_uuid): New function.
1187         (grub_ufs_fs): add .uuid
1189 2009-07-21  Pavel Roskin  <proski@gnu.org>
1191         * kern/dl.c (grub_dl_check_header): Make static.
1193 2009-07-21  Felix Zielcke  <fzielcke@z-51.de>
1195         * util/grub.d/30_os-prober.in: Remove unused CHAINROOT.  Don't
1196         add drivemap for Vista.  It breaks Windows 7.
1198 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1200         * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
1201         128 bytes
1203 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1205         Add BFS support
1207         * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
1208         (grub_fstest_SOURCES): Likewise.
1209         (pkglib_MODULES): Add befs.mod.
1210         (befs_mod_SOURCES): New variable.
1211         (befs_mod_CFLAGS): Likewise.
1212         (befs_mod_LDFLAGS): Likewise.
1213         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1214         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1215         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1216         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1217         (grub_setup_SOURCES): Likewise.
1218         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1219         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1220         (grub_setup_SOURCES): Likewise.
1221         * fs/befs.c: New file.
1222         * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
1223         (GRUB_AFS_SBLOCK_SECTOR): Likewise.
1224         (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
1225         (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
1226         (B_KEY_INDEX_ALIGN): New declaration.
1227         (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
1228         (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
1229         (grub_afs_btree) [MODE_BFS]: New conditional declaration.
1230         (grub_afs_sblock) [MODE_BFS]: Remove link_count.
1231         (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
1232         (grub_afs_mount) [MODE_BFS]: Likewise.
1233         (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
1234         (grub_afs_fs): Use GRUB_AFS_FSNAME
1235         (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
1236         (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
1237         (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
1238         (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
1240 2009-07-19  Yves BLUSSEAU  <yves.grub-devel@zetam.org>
1242         * util/getroot.c (find_root_device): Add support for MacOSX.
1243         * util/hostdisk.c: Likewise.
1245 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1247         * font/font.c (find_glyph): Check whether a font is present to avoid
1248         segmentation fault.
1250 2009-07-20  Joe Auricchio  <jauricchio@gmail.com>
1252         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
1254 2009-07-20  Pavel Roskin  <proski@gnu.org>
1256         * configure.ac: Trim excessively wordy excuses.
1258 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1260         Add symlink, mtime and label support to AtheFS.
1262         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
1263         (grub_afs_iterate_dir): Handle symlinks.
1264         (grub_afs_open): Use grub_afs_read_symlink.
1265         (grub_afs_dir): Likewise.
1266         Pass mtime.
1267         (grub_afs_label): New function.
1268         (grub_afs_fs): Add grub_afs_label.
1269         (grub_afs_read_symlink): New function.
1271 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1273         Fix AtheFS support.
1275         * fs/afs.c: Fix comments style.
1276         (grub_afs_blockrun): Declare as packed.
1277         (grub_afs_datastream): Likewise.
1278         (grub_afs_bnode): Likewise.
1279         (grub_afs_btree): Likewise.
1280         (grub_afs_sblock): Likewise.
1281         Declare `name' as char.
1282         (grub_afs_inode): Declare as packed.
1283         Change void *vnode to grub_uint32_t unused.
1284         (grub_afs_iterate_dir): Check that key_size is positive.
1285         (grub_afs_mount): Don't read superblock twice.
1286         (grub_afs_dir): Don't free node in case of error,
1287         grub_fshelp_find_file already handles this.
1288         (grub_afs_open): Likewise.
1290 2009-07-19  Pavel Roskin  <proski@gnu.org>
1292         * Makefile.in: Remove LIBLZO and enable_lzo.
1293         * conf/i386-pc.rmk: Remove lzo support.
1294         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
1295         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
1296         support.
1297         * kern/i386/pc/lzo1x.S: Remove.
1298         * kern/i386/pc/startup.S: Remove lzo support.
1299         * util/i386/pc/grub-mkimage.c: Likewise.
1301 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
1303         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
1304         * fs/xfs.c (grub_xfs_dir): Likewise.
1305         * fs/afs.c (grub_afs_dir): Likewise.
1306         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
1307         (grub_iso9660_open): Likewise.
1308         * fs/jfs.c (grub_jfs_open): Likewise.
1309         * fs/ext2.c (grub_ext2_dir): Likewise.
1310         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
1311         * script/sh/lexer.c (grub_script_yylex): Likewise.
1313 2009-07-16  Pavel Roskin  <proski@gnu.org>
1315         * configure.ac: Never add "-c" to CFLAGS.
1317         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
1319         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
1320         grub_cv_cc_efiemu should be used.
1322         * configure.ac: Typo fixes.
1324         * kern/mm.c (grub_zalloc): New function.
1325         (grub_debug_zalloc): Likewise.
1326         * include/grub/mm.h: Declare grub_zalloc() and
1327         grub_debug_zalloc().
1328         * util/misc.c (grub_zalloc): New function.
1329         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
1330         instead of grub_malloc(), remove unneeded initializations.
1331         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
1332         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
1333         * commands/parttool.c (grub_cmd_parttool): Likewise.
1334         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
1335         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
1336         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
1337         * disk/usbms.c (grub_usbms_finddevs): Likewise.
1338         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
1339         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
1340         (grub_cmd_efiemu_pnvram): Likewise.
1341         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
1342         * fs/iso9660.c (grub_iso9660_mount): Likewise.
1343         (grub_iso9660_iterate_dir): Likewise.
1344         * fs/jfs.c (grub_jfs_opendir): Likewise.
1345         * fs/ntfs.c (list_file): Likewise.
1346         (grub_ntfs_mount): Likewise.
1347         * kern/disk.c (grub_disk_open): Likewise.
1348         * kern/dl.c (grub_dl_load_core): Likewise.
1349         * kern/elf.c (grub_elf_file): Likewise.
1350         * kern/env.c (grub_env_context_open): Likewise.
1351         (grub_env_set): Likewise.
1352         (grub_env_set_data_slot): Likewise.
1353         * kern/file.c (grub_file_open): Likewise.
1354         * kern/fs.c (grub_fs_blocklist_open): Likewise.
1355         * loader/i386/multiboot.c (grub_module): Likewise.
1356         * loader/xnu.c (grub_xnu_create_key): Likewise.
1357         (grub_xnu_create_value): Likewise.
1358         * normal/main.c (grub_normal_add_menu_entry): Likewise.
1359         (read_config_file): Likewise.
1360         * normal/menu_entry.c (make_screen): Likewise.
1361         * partmap/sun.c (sun_partition_map_iterate): Likewise.
1362         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
1363         * script/sh/script.c (grub_script_parse): Likewise.
1364         * video/bitmap.c (grub_video_bitmap_create): Likewise.
1365         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
1366         * video/readers/png.c (grub_png_output_byte): Likewise.
1367         (grub_video_reader_png): Likewise.
1369 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1371         Enable all targets that can be built by default
1373         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
1374         grub-mkfont and grub-fstest if they can be built
1376 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1378         Fix hang and segmentation fault in grub-emu-usb
1380         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
1381         * util/usb.c (grub_libusb_devices): likewise
1382         (grub_libusb_init): rename to ...
1383         (GRUB_MOD_INIT (libusb)):...this
1384         (grub_libusb_fini): rename to ..
1385         (GRUB_MOD_FINI (libusb)):...this
1386         * disk/usbms.c (grub_usbms_transfer): fix retry logic
1387         * include/grub/disk.h (grub_raid_init): removed, it's useless
1388         (grub_raid_fini): likewise
1389         (grub_lvm_init): likewise
1390         (grub_lvm_fini): likewise
1391         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
1392         by grub_init_all
1394 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1396         Fix libusb
1398         * Makefile.in (LIBUSB): new macro
1399         * genmk.rb (Utility/print_tail): new method
1400         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
1401         (top level): call util.print_tail at the end.
1403 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1405         Make FreeBSD accept zpool.cache
1407         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
1408         type is /boot/zfs/zpool.cache
1410 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1412         Fix 64-bit efiemu
1414         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
1415         correct wrong typedef
1416         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
1418 2009-07-15  Pavel Roskin  <proski@gnu.org>
1420         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
1421         * kern/disk.c (struct grub_disk_cache): Likewise.
1423         * commands/probe.c (options): Typo fix.
1425         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
1426         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
1427         accordingly.
1428         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
1430         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
1431         the end of "Error" to make the message more readable.
1433         * boot/i386/pc/boot.S (kernel_segment): Remove.
1434         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
1435         for destination.
1437         * boot/i386/pc/boot.S (boot_version): Remove.
1438         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
1439         Remove.
1441         * include/grub/i386/pc/boot.h: Sort all offsets.
1442         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
1443         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
1444         * boot/i386/pc/boot.S: Assert location of every offset listed in
1445         include/grub/i386/pc/boot.h.
1447 2009-07-13  Pavel Roskin  <proski@gnu.org>
1449         * include/grub/i386/coreboot/machine.h: Rename
1450         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
1451         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
1452         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
1454         * kern/dl.c: Force native word size to suppress warnings when
1455         compiling grub-emu.
1457         * kern/device.c (grub_device_iterate): Change struct part_ent to
1458         hold the name, not a pointer to it.  Use one grub_malloc() per
1459         partition, not two.  Free partition_name if grub_malloc() fails.
1460         Set ents to NULL only before grub_partition_iterate() is called.
1462 2009-07-11  Bean  <bean123ch@gmail.com>
1464         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
1465         childname.
1467 2009-07-10  Bean  <bean123ch@gmail.com>
1468 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
1470         * kern/ieee1275/openfw.c (grub_children_iterate)
1471         (grub_devalias_iterate): Fix size evaluation for property or path
1472         strings, which was broken since r2132.
1474 2009-07-07  Pavel Roskin  <proski@gnu.org>
1476         * commands/search.c (search_file): Merge into ...
1477         (search_fs): ... this.  Accept search type as argument.
1478         (grub_cmd_search): Pass search type to search_fs().
1480         * include/grub/util/console.h: New file.
1481         * util/console.c: Use it instead of grub/machine/console.h.
1482         * util/grub-emu.c: Likewise.
1484         * lib/arg.c (find_long_option): Remove.
1485         (find_long): Add `len' argument, make `s' const char *.
1486         (grub_arg_parse): Parse long options in place, not in a
1487         temporary buffer.
1489 2009-07-06  Pavel Roskin  <proski@gnu.org>
1491         * commands/search.c (search_fs): Fix potential NULL pointer
1492         dereference.
1494         * commands/search.c (search_fs): Replace QUID macro with quid_fn
1495         function pointer.
1497 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
1499         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
1500         comparison.
1502 2009-07-05  Pavel Roskin  <proski@gnu.org>
1504         * include/grub/i386/linux.h (struct linux_kernel_params):
1505         Restore padding3, it's still needed.
1507         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
1508         FreeBSD.
1509         * util/osdetect.lua: Likewise.
1511 2009-07-05  Bean  <bean123ch@gmail.com>
1513         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
1515         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
1516         (grub_lua_getenv): Likewise.
1517         (grub_lua_setenv): Likewise.
1518         (save_errno): New function.
1519         (push_result): Likewise.
1520         (grub_lua_enum_device): Likewise.
1521         (grub_lua_enum_file): Likewise.
1522         (grub_lua_file_open): Likewise.
1523         (grub_lua_file_close): Likewise.
1524         (grub_lua_file_seek): Likewise.
1525         (grub_lua_file_read): Likewise.
1526         (grub_lua_file_getline): Likewise.
1527         (grub_lua_file_getsize): Likewise.
1528         (grub_lua_file_getpos): Likewise.
1529         (grub_lua_file_eof): Likewise.
1530         (grub_lua_file_exist): Likewise.
1531         (grub_lua_add_menu): Likewise.
1533         * script/lua/grub_lua.h (isupper): New inline function.
1534         (islower): Likewise.
1535         (ispunct): Likewise.
1536         (isxdigit): Likewise.
1537         (strcspn): Change to normal function.
1538         (strpbkr): New function declaration.
1539         (memchr): Likewise.
1541         * script/lua/grub_main.c (scan_str): New function.
1542         (strcspn): Likewise.
1543         (strpbrk): Likewise.
1544         (memchr): Likewise.
1546         * script/lua/linit.c (lualibs): Enable the string library.
1548         * util/osdetect.lua: New file.
1550 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
1552         * include/grub/i386/linux.h (struct linux_kernel_params): Add
1553         `capabilities' member.
1555 2009-07-02  Pavel Roskin  <proski@gnu.org>
1557         * genparttoollist.sh: Add missing newline at the end.
1559 2009-07-01  Pavel Roskin  <proski@gnu.org>
1561         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
1563         * util/hostdisk.c (open_device): Remove `const' from
1564         `sysctl_size', as sysctlbyname() can change it (in this case it
1565         doesn't actually happen).
1567         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
1568         using signed long int constants.
1570         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
1571         constant to avoid a warning on FreeBSD.
1573         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
1574         where it's needed.
1576         * Makefile.in: Install include/grub/machine symlink.
1578         * Makefile.in: When installing symlinks, use "cp -fR", which
1579         works on FreeBSD and MacOSX.
1580         From Yves Blusseau <cl7m42e02@sneakemail.com>
1582         * kern/dl.c (grub_dl_resolve_symbol): Make static.
1583         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
1585         * util/misc.c: Move grub_reboot() and grub_halt() ...
1586         * util/grub-emu.c: ... here.  Make main_env static.
1587         * include/grub/util/misc.h: Remove main_env.
1589         * kern/mm.c: Use correct format to print size_t.
1591         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
1592         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
1593         * kern/powerpc/dl.c: Likewise.
1594         * kern/sparc64/dl.c: Likewise.
1595         * kern/x86_64/dl.c: Likewise.
1597 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1599         Fix grub-emu build on sparc64-ieee1275.
1601         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
1602         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
1604 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1606         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
1607         (grub_reboot, grub_halt): New functions.
1609         * util/i386/pc/misc.c: Delete.  Update all users.
1610         * util/sparc64/ieee1275/misc.c: Likewise.
1611         * util/powerpc/ieee1275/misc.c: Likewise.
1613 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1615         * conf/i386.rmk (setjmp_mod_SOURCES)
1616         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
1617         * conf/common.rmk (setjmp_mod_SOURCES)
1618         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
1619         to use $(target_cpu).
1620         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
1621         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
1622         * conf/powerpc-ieee1275.rmk: Likewise.
1623         * conf/sparc64-ieee1275.rmk: Likewise.
1625         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
1626         $(target_cpu) for kern/$(target_cpu)/dl.c.
1627         * conf/i386-efi.rmk: Likewise.
1628         * conf/i386-ieee1275.rmk: Likewise.
1629         * conf/x86_64-efi.rmk: Likewise.
1630         * conf/i386-coreboot.rmk: Likewise.
1631         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
1632         $(target_cpu) for kern/$(target_cpu)/dl.c and for
1633         kern/$(target_cpu)/cache.S.
1634         * conf/sparc64-ieee1275.rmk: Likewise.
1636 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1638         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
1639         type to `grub_uint8_t', and adjust `padding9' accordingly.
1641 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1643         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
1645         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
1646         assembly in final jump, using register constraints.
1648         (grub_linux_boot): For text mode, initialize `have_vga' using
1649         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
1651         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
1652         right before the final jump.
1654         Set `video_mode' to 0x3.
1656         Document initialization of `video_page', `video_mode' and
1657         `video_ega_bx'.
1659 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1661         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
1662         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
1663         and set GRUB_LINUX_FLAG_QUIET appropriately.
1665 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1667         Fix build on Debian / sparc.
1669         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
1671 2009-06-28  Pavel Roskin  <proski@gnu.org>
1673         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
1674         fix a warning.
1676         * util/grub.d/10_linux.in: Match SUSE style initrd names.
1678 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1680         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
1681         `err'.
1683 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1685         Revert r2338.
1687         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
1688         file can't be opened.  grub_file_open() is already supposed to set
1689         grub_errno / grub_errmsg appropriately.
1690         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1692 2009-06-27  Pavel Roskin  <proski@gnu.org>
1693 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1695         * include/grub/dl.h: Include grub/elf.h.
1696         (struct grub_dl): Add symtab field.
1697         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
1698         GRUB_MODULES_MACHINE_READONLY.
1699         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
1700         of the header for read-only modules.
1701         (grub_dl_unload): Free mod->symtab for read-only modules.
1702         * kern/i386/dl.c: Use mod->symtab.
1703         * kern/powerpc/dl.c: Likewise.
1704         * kern/sparc64/dl.c: Likewise.
1705         * kern/x86_64/dl.c: Likewise.
1707         * conf/i386-qemu.rmk: New file.
1708         * kern/i386/qemu/startup.S: Likewise.
1709         * kern/i386/qemu/mmap.c: Likewise.
1710         * boot/i386/qemu/boot.S: Likewise.
1711         * include/grub/i386/qemu/time.h: Likewise.
1712         * include/grub/i386/qemu/serial.h: Likewise.
1713         * include/grub/i386/qemu/kernel.h: Likewise.
1714         * include/grub/i386/qemu/console.h: Likewise.
1715         * include/grub/i386/qemu/boot.h: Likewise.
1716         * include/grub/i386/qemu/init.h: Likewise.
1717         * include/grub/i386/qemu/machine.h: Likewise.
1718         * include/grub/i386/qemu/loader.h: Likewise.
1719         * include/grub/i386/qemu/memory.h: Likewise.
1721         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
1722         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
1723         [qemu] (pkglib_IMAGES): Add `boot.img'.
1724         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
1725         [qemu] (boot_img_FORMAT): New variables.
1726         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
1727         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
1728         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
1729         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
1730         [qemu] (kernel_img_FORMAT): New variables.
1732         * configure.ac: Recognise `i386-qemu'.
1734         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
1735         (for no compression).
1736         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
1737         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
1738         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
1739         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
1740         ifdefs).
1742 2009-06-27  Pavel Roskin  <proski@gnu.org>
1744         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
1745         read.
1746         * efiemu/prepare32.c: Likewise.
1747         * efiemu/prepare64.c: Likewise.
1749 2009-06-26  Pavel Roskin  <proski@gnu.org>
1751         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
1752         * include/grub/elf.h: Define symbols without "32" or "64" based
1753         on GRUB_TARGET_WORDSIZE.
1754         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
1755         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
1756         ELF definitions.
1757         * efiemu/loadcore64.c: Likewise.
1758         * loader/i386/bsd32.c: Likewise.
1759         * loader/i386/bsd64.c: Likewise.
1760         * kern/dl.c: Remove own ELF definitions.
1761         * util/i386/efi/grub-mkimage.c: Likewise.
1763 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
1765         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
1766         segment 0x0 unconditionally, because the reference generated by
1767         GAS is an absolute address.
1769 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1771         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
1772         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
1774 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1776         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
1777         indexes.  Check for -f explicitly.
1778         (search_file): Improve error message.
1779         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
1781 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1783         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
1784         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
1786 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1788         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
1789         * conf/i386-ieee1275.rmk: Likewise.
1790         * conf/i386-coreboot.rmk: Likewise.
1792         * kern/i386/pc/startup.S (grub_stop): Remove function.
1793         * kern/i386/ieee1275/startup.S: Likewise.
1794         * kern/i386/coreboot/startup.S: Likewise.
1795         * kern/i386/misc.S (grub_stop): New function.
1797 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1799         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
1800         * kern/i386/realmode.S (real_to_prot): ... to here.
1802 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1804         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
1805         with `kernel.img'.
1806         (kernel_elf_SOURCES): Rename to ...
1807         (kernel_img_SOURCES): ... this.
1808         (kernel_elf_HEADERS): Rename to ...
1809         (kernel_img_HEADERS): ... this.  Update all users.
1810         (kernel_elf_ASFLAGS): Rename to ...
1811         (kernel_img_ASFLAGS): ... this.
1812         (kernel_elf_CFLAGS): Rename to ...
1813         (kernel_img_CFLAGS): ... this.
1814         (kernel_elf_LDFLAGS): Rename to ...
1815         (kernel_img_LDFLAGS): ... this.
1816         * conf/i386-coreboot.rmk: Likewise.
1817         * conf/powerpc-ieee1275.rmk: Likewise.
1819         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
1820         with "kernel.img".
1822 2009-06-21  Pavel Roskin  <proski@gnu.org>
1824         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
1825         to match nested functions.
1826         * loader/sparc64/ieee1275/linux.c: Likewise.
1828         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
1830 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1832         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
1833         all i386 platforms.
1835 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1837         Fix asm file handling on ELF, and remove workarounds.
1839         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
1840         and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
1841         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
1842         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
1844 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
1846         Load BSD ELF modules
1848         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
1849         and loader/i386/bsd64.c
1850         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
1851         (FREEBSD_MODTYPE_ELF_MODULE): New definition
1852         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
1853         (grub_freebsd_load_elfmodule32): New declaration
1854         (grub_freebsd_load_elfmoduleobj64): Likewise
1855         (grub_freebsd_load_elf_meta32): Likewise
1856         (grub_freebsd_load_elf_meta64): Likewise
1857         (grub_freebsd_add_meta): Likewise
1858         (grub_freebsd_add_meta_module): Likewise
1859         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
1860         (grub_freebsd_add_meta_module): Likewise and move module-specific
1861         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
1862         (grub_cmd_freebsd): Add elf-kernel specific parts
1863         based on grub_freebsd_add_meta_module
1864         (grub_cmd_freebsd_module): Add type parsing moved from
1865         grub_freebsd_add_meta_module
1866         (grub_cmd_freebsd_module_elf): New function
1867         (cmd_freebsd_module_elf): New variable
1868         (GRUB_MOD_INIT): Register freebsd_module_elf
1869         * loader/i386/bsd32.c: New file
1870         * loader/i386/bsd64.c: Likewise
1871         * loader/i386/bsdXX.c: Likewise
1872         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
1873         (grub_elf64_load): Likewise
1874         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
1875         All users updated
1876         (grub_elf64_load_hook_t): Likewise
1878 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
1880         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
1881         variable.
1882         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
1883         don't write a menu entry for recovery mode.
1885 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1887         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
1888         after it's no longer needed.
1890 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1892         * include/grub/i386/loader.h (grub_linux_prot_size)
1893         (grub_linux_tmp_addr, grub_linux_real_addr)
1894         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
1895         GRUB_MACHINE_PCBIOS.
1896         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
1897         common grub_util_info() call to ...
1898         (generate_image): ... here.
1899         Fix use of uninitialized memory, comparison of signed with
1900         unsigned integers and memory leak.
1901         Remove bogus module address message.
1903 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
1905         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
1906         grub_raid_register
1907         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
1909 2009-06-19  Pavel Roskin  <proski@gnu.org>
1911         * configure.ac: Remove stray AC_MSG_CHECKING.
1913 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
1915         * disk/scsi.c (grub_scsi_open): use continue instead of big if
1917 2009-06-18  Pavel Roskin  <proski@gnu.org>
1919         * conf/common.rmk: Add fs_file.mod.
1920         * disk/fs_file.c: New file.
1921         * include/grub/disk.h (enum grub_disk_dev_id): Add
1922         GRUB_DISK_DEVICE_FILE_ID.
1924 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1926         Fix build with Apple's toolchain. Part 2
1928         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
1929         a fake start
1931 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1933         Fix build with Apple's toolchain. Part 1
1935         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
1936         for long calls
1937         * configure.ac: remove a leftover AC_MSG_RESULT
1938         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
1939         Apple's toolchain
1941 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1943         Fix warnings
1945         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
1946         (decomp_block): initialize ch
1947         use grub_memcpy instead of memcpy
1949 2009-06-17  Pavel Roskin  <proski@gnu.org>
1951         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
1952         version, use declarations needed to use vga_text as the startup
1953         console.
1955         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
1956         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
1957         the kernel.
1958         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
1959         and grub_at_keyboard_fini(), it's done on module load and
1960         unload.
1962 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
1964         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
1965         file can't be found.
1966         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1968 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1970         Fix newline handling
1972         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
1973         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
1974         (grub_script_yylex): don't segfault on unterminated script
1975         newline terminates command and variable
1977 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1979         avoid double grub_adjust_range call. Bug reported by David Simner
1981         * kern/disk.c (grub_disk_write): change to raw disk access before
1982         calling disk_read
1984 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
1986         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
1987         spaces, for the benefit of help2man.
1988         * util/i386/efi/grub-mkimage.c (usage): Likewise.
1990 2009-06-16  Pavel Roskin  <proski@gnu.org>
1992         * kern/i386/halt.c: Include grub/machine/init.h.
1993         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
1995 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
1997         * util/grub.d/30_os-prober.in: Use ${root} in the generated
1998         drivemap menuentry.
2000 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
2002         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
2003         `echo' command.
2005 2009-06-16  Pavel Roskin  <proski@gnu.org>
2007         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
2008         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
2009         save %dx, we only need %dl and we never change it.
2010         * boot/i386/pc/cdboot.S: Don't set the root drive.
2011         * boot/i386/pc/pxeboot.S: Likewise.
2012         * include/grub/i386/pc/boot.h: Remove
2013         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
2014         GRUB_BOOT_MACHINE_DRIVE_CHECK.
2015         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
2016         * kern/i386/pc/init.c (make_install_device): Remove references
2017         to grub_root_drive.
2018         * kern/i386/pc/startup.S: Likewise.
2019         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
2021 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2023         xnu_uuid command
2025         * commands/xnu_uuid.c: new file
2026         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
2027         (xnu_uuid_mod_SOURCES): new variable
2028         (xnu_uuid_mod_CFLAGS): likewise
2029         (xnu_uuid_mod_LDFLAGS): likewise
2030         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2031         * conf/i386-ieee1275.rmk: likewise
2032         * conf/i386-pc.rmk: likewise
2033         * conf/powerpc-ieee1275.rmk: likewise
2034         * conf/sparc64-ieee1275.rmk: likewise
2035         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
2037 2009-06-16  Pavel Roskin  <proski@gnu.org>
2039         * configure.ac: Avoid '==' in test command, it's not portable.
2041 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2043         Probe command
2045         * commands/probe.c: new file
2046         * conf/common.rmk (pkglib_MODULES): add probe.mod
2047         (probe_mod_SOURCES): new variable
2048         (probe_mod_CFLAGS): likewise
2049         (probe_mod_LDFLAGS): likewise
2050         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2051         * conf/i386-ieee1275.rmk: likewise
2052         * conf/i386-pc.rmk: likewise
2053         * conf/powerpc-ieee1275.rmk: likewise
2054         * conf/sparc64-ieee1275.rmk: likewise
2056 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
2058         Fix handling of string like \"hello\" and "a
2059         b"
2061         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
2062         (grub_script_yylex): fix parsing of quoting, escaping and newline
2064 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
2066         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
2067         handling
2069 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
2071         * util/grub-mkconfig.in: Fix parsing of --output option.
2073 2009-06-12  Pavel Roskin  <proski@gnu.org>
2075         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
2076         genmk.rb don't need to be generated or installed.
2078 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
2080         * commands/i386/pc/drivemap_int13h.S: add more comments
2082 2009-06-11  Pavel Roskin  <proski@gnu.org>
2084         * Makefile.in (uninstall): Uninstall manuals.
2086         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
2087         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
2088         and update-grub_lib in two places.
2089         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
2091         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
2092         a compiler warning.
2094         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
2095         `entry_lo' to fix variable shadowing.
2097 2009-06-11  Christian Franke  <franke@computer.org>
2099         * kern/misc.c (__enable_execute_stack): Add missing return type
2100         to prevent gcc warning.
2102 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2104         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
2106 2009-06-11  Pavel Roskin  <proski@gnu.org>
2108         * Makefile.in: Don't rely on any scripts being executable.
2109         Always use $(SHELL) to run shell scripts.
2111         * configure.ac: Always define ___main if using -nostdlib.  This
2112         fixes tests on Cygwin.
2114 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
2116         UDF fix
2118         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
2119         is in bytes and not in blocks
2121 2009-06-11  Pavel Roskin  <proski@gnu.org>
2123         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
2124         warning.
2126 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2128         * util/grub.d/30_os-prober.in: Fix a comment. Source
2129         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
2130         to set the root device.  Place drivemap command in the generated
2131         chain entry.
2133 2009-06-11  Pavel Roskin  <proski@gnu.org>
2135         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
2136         have long been resolved.
2138 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
2140         * util/grub.d/10_linux.in: Capitalise "Linux".
2142         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
2144 2009-06-11  Pavel Roskin  <proski@gnu.org>
2146         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
2147         fix a gcc warning and ensure that the function won't ever exit.
2149         * kern/i386/ieee1275/init.c: Add missing prototype for
2150         grub_stop_floppy().
2152         * loader/ieee1275/multiboot2.c [__i386__]: Include
2153         grub/cpu/multiboot.h.
2155         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
2156         casts to short - they are not portable and cause warnings.  Fix
2157         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
2159 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
2161         Drivemap fixes
2163         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
2164         new function
2165         (grub_get_root_biosnumber_saved): new variable
2166         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
2167         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
2168         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
2169         %dx after the call if necessary
2170         * conf/common.rmk (pkglib_MODULES): remove boot.mod
2171         (boot_mod_SOURCES): remove
2172         (boot_mod_CFLAGS): remove
2173         (boot_mod_LDFLAGS): remove
2174         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
2175         (boot_mod_SOURCES): new variable
2176         (boot_mod_CFLAGS): likewise
2177         (boot_mod_LDFLAGS): likewise
2178         * conf/i386-efi.rmk: likewise
2179         * conf/i386-ieee1275.rmk: likewise
2180         * conf/i386-pc.rmk: likewise
2181         * conf/powerpc-ieee1275.rmk: likewise
2182         * conf/sparc64-ieee1275.rmk: likewise
2183         * conf/x86_64-efi.rmk: likewise
2184         * include/grub/i386/pc/biosnum.h: new file
2185         * lib/i386/pc/biosnum.c: likewise
2186         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
2187         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
2188         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2190 2009-06-10  Pavel Roskin  <proski@gnu.org>
2192         * io/gzio.c (test_header): Don't reuse one buffer for all data.
2193         Use separate variables.  Read only the file size at the end, but
2194         not the checksum that we don't use.
2196         * kern/file.c (grub_file_read): Use void pointer for the buffer.
2197         Adjust all callers.
2199         * kern/ieee1275/openfw.c: Remove libc includes.
2200         * kern/ieee1275/cmain.c: Likewise.
2201         * include/grub/ieee1275/ieee1275.h: Likewise.
2203         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
2204         compiler warnings.
2206 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2208         * Makefile.in: Remove all trailing whitespace.
2209         * conf/i386-pc.rmk: Likewise.
2210         * conf/powerpc-ieee1275.rmk: Likewise.
2211         * conf/sparc64-ieee1275.rmk: Likewise.
2212         * docs/grub.texi: Likewise.
2213         * docs/texinfo.tex: Likewise.
2214         * disk/fs_uuid.c: Likewise.
2215         * disk/lvm.c: Likewise.
2216         * disk/scsi.c: Likewise.
2217         * disk/ata.c: Likewise.
2218         * disk/ieee1275/ofdisk.c: Likewise.
2219         * disk/i386/pc/biosdisk.c: Likewise.
2220         * disk/host.c: Likewise.
2221         * disk/raid.c: Likewise.
2222         * disk/efi/efidisk.c: Likewise.
2223         * disk/usbms.c: Likewise.
2224         * disk/memdisk.c: Likewise.
2225         * disk/loopback.c: Likewise.
2226         * kern/powerpc/dl.c: Likewise.
2227         * kern/device.c: Likewise.
2228         * kern/dl.c: Likewise.
2229         * kern/sparc64/dl.c: Likewise.
2230         * kern/ieee1275/ieee1275.c: Likewise.
2231         * kern/term.c: Likewise.
2232         * kern/fs.c: Likewise.
2233         * kern/i386/dl.c: Likewise.
2234         * kern/i386/pc/startup.S: Likewise.
2235         * kern/i386/pc/init.c: Likewise.
2236         * kern/i386/pc/mmap.c: Likewise.
2237         * kern/i386/pc/lzo1x.S: Likewise.
2238         * kern/i386/ieee1275/init.c: Likewise.
2239         * kern/i386/realmode.S: Likewise.
2240         * kern/i386/tsc.c: Likewise.
2241         * kern/partition.c: Likewise.
2242         * kern/corecmd.c: Likewise.
2243         * kern/file.c: Likewise.
2244         * kern/efi/efi.c: Likewise.
2245         * kern/efi/init.c: Likewise.
2246         * kern/efi/mm.c: Likewise.
2247         * kern/main.c: Likewise.
2248         * kern/err.c: Likewise.
2249         * kern/env.c: Likewise.
2250         * kern/disk.c: Likewise.
2251         * kern/generic/millisleep.c: Likewise.
2252         * kern/generic/rtc_get_time_ms.c: Likewise.
2253         * kern/misc.c: Likewise.
2254         * kern/parser.c: Likewise.
2255         * genmk.rb: Likewise.
2256         * configure.ac: Likewise.
2257         * boot/i386/pc/diskboot.S: Likewise.
2258         * boot/i386/pc/pxeboot.S: Likewise.
2259         * boot/i386/pc/boot.S: Likewise.
2260         * boot/i386/pc/lnxboot.S: Likewise.
2261         * boot/i386/pc/cdboot.S: Likewise.
2262         * parttool/pcpart.c: Likewise.
2263         * video/readers/tga.c: Likewise.
2264         * video/video.c: Likewise.
2265         * video/bitmap.c: Likewise.
2266         * lib/envblk.c: Likewise.
2267         * lib/i386/setjmp.S: Likewise.
2268         * fs/xfs.c: Likewise.
2269         * fs/afs.c: Likewise.
2270         * fs/fat.c: Likewise.
2271         * fs/ntfs.c: Likewise.
2272         * fs/udf.c: Likewise.
2273         * fs/affs.c: Likewise.
2274         * fs/iso9660.c: Likewise.
2275         * fs/hfs.c: Likewise.
2276         * fs/fshelp.c: Likewise.
2277         * fs/ext2.c: Likewise.
2278         * fs/jfs.c: Likewise.
2279         * fs/reiserfs.c: Likewise.
2280         * fs/hfsplus.c: Likewise.
2281         * fs/minix.c: Likewise.
2282         * fs/cpio.c: Likewise.
2283         * fs/sfs.c: Likewise.
2284         * fs/ufs.c: Likewise.
2285         * efiemu/prepare.c: Likewise.
2286         * efiemu/loadcore_common.c: Likewise.
2287         * efiemu/runtime/efiemu.sh: Likewise.
2288         * efiemu/runtime/efiemu.S: Likewise.
2289         * efiemu/runtime/efiemu.c: Likewise.
2290         * efiemu/pnvram.c: Likewise.
2291         * efiemu/main.c: Likewise.
2292         * efiemu/i386/pc/cfgtables.c: Likewise.
2293         * efiemu/i386/loadcore64.c: Likewise.
2294         * efiemu/i386/loadcore32.c: Likewise.
2295         * efiemu/loadcore.c: Likewise.
2296         * efiemu/symbols.c: Likewise.
2297         * efiemu/mm.c: Likewise.
2298         * include/grub/autoefi.h: Likewise.
2299         * include/grub/datetime.h: Likewise.
2300         * include/grub/term.h: Likewise.
2301         * include/grub/hfs.h: Likewise.
2302         * include/grub/lvm.h: Likewise.
2303         * include/grub/i386/tsc.h: Likewise.
2304         * include/grub/i386/linux.h: Likewise.
2305         * include/grub/i386/xnu.h: Likewise.
2306         * include/grub/i386/efiemu.h: Likewise.
2307         * include/grub/i386/pc/biosdisk.h: Likewise.
2308         * include/grub/i386/pc/memory.h: Likewise.
2309         * include/grub/i386/pc/vbe.h: Likewise.
2310         * include/grub/parttool.h: Likewise.
2311         * include/grub/video.h: Likewise.
2312         * include/grub/memory.h: Likewise.
2313         * include/grub/fs.h: Likewise.
2314         * include/grub/partition.h: Likewise.
2315         * include/grub/xnu.h: Likewise.
2316         * include/grub/efi/api.h: Likewise.
2317         * include/grub/efi/pe32.h: Likewise.
2318         * include/grub/efi/memory.h: Likewise.
2319         * include/grub/multiboot.h: Likewise.
2320         * include/grub/usbdesc.h: Likewise.
2321         * include/grub/multiboot2.h: Likewise.
2322         * include/grub/acpi.h: Likewise.
2323         * include/grub/efiemu/efiemu.h: Likewise.
2324         * include/grub/disk.h: Likewise.
2325         * include/grub/ieee1275/ieee1275.h: Likewise.
2326         * include/grub/net.h: Likewise.
2327         * include/grub/machoload.h: Likewise.
2328         * include/grub/macho.h: Likewise.
2329         * include/multiboot.h: Likewise.
2330         * genmoddep.awk: Likewise.
2331         * normal/main.c: Likewise.
2332         * normal/menu_entry.c: Likewise.
2333         * normal/menu_viewer.c: Likewise.
2334         * normal/completion.c: Likewise.
2335         * normal/cmdline.c: Likewise.
2336         * normal/misc.c: Likewise.
2337         * normal/datetime.c: Likewise.
2338         * bus/usb/usbtrans.c: Likewise.
2339         * bus/usb/ohci.c: Likewise.
2340         * bus/usb/uhci.c: Likewise.
2341         * bus/usb/usb.c: Likewise.
2342         * mmap/efi/mmap.c: Likewise.
2343         * mmap/i386/pc/mmap_helper.S: Likewise.
2344         * mmap/i386/pc/mmap.c: Likewise.
2345         * mmap/i386/mmap.c: Likewise.
2346         * mmap/i386/uppermem.c: Likewise.
2347         * mmap/mmap.c: Likewise.
2348         * commands/acpi.c: Likewise.
2349         * commands/echo.c: Likewise.
2350         * commands/blocklist.c: Likewise.
2351         * commands/loadenv.c: Likewise.
2352         * commands/usbtest.c: Likewise.
2353         * commands/boot.c: Likewise.
2354         * commands/parttool.c: Likewise.
2355         * commands/search.c: Likewise.
2356         * commands/cat.c: Likewise.
2357         * commands/i386/pc/play.c: Likewise.
2358         * commands/i386/pc/drivemap.c: Likewise.
2359         * commands/i386/pc/vbeinfo.c: Likewise.
2360         * commands/i386/pc/acpi.c: Likewise.
2361         * commands/i386/pc/vbetest.c: Likewise.
2362         * commands/ls.c: Likewise.
2363         * commands/cmp.c: Likewise.
2364         * commands/test.c: Likewise.
2365         * commands/efi/acpi.c: Likewise.
2366         * commands/gptsync.c: Likewise.
2367         * commands/help.c: Likewise.
2368         * partmap/amiga.c: Likewise.
2369         * partmap/apple.c: Likewise.
2370         * partmap/acorn.c: Likewise.
2371         * partmap/pc.c: Likewise.
2372         * partmap/sun.c: Likewise.
2373         * partmap/gpt.c: Likewise.
2374         * script/sh/lexer.c: Likewise.
2375         * script/sh/function.c: Likewise.
2376         * font/font.c: Likewise.
2377         * font/font_cmd.c: Likewise.
2378         * loader/powerpc/ieee1275/linux.c: Likewise.
2379         * loader/efi/chainloader.c: Likewise.
2380         * loader/multiboot_loader.c: Likewise.
2381         * loader/macho.c: Likewise.
2382         * loader/i386/multiboot.c: Likewise.
2383         * loader/i386/linux.c: Likewise.
2384         * loader/i386/pc/linux.c: Likewise.
2385         * loader/i386/pc/multiboot2.c: Likewise.
2386         * loader/i386/pc/chainloader.c: Likewise.
2387         * loader/i386/pc/xnu.c: Likewise.
2388         * loader/i386/bsd_trampoline.S: Likewise.
2389         * loader/i386/efi/linux.c: Likewise.
2390         * loader/i386/multiboot_elfxx.c: Likewise.
2391         * loader/i386/bsd_helper.S: Likewise.
2392         * loader/i386/bsd.c: Likewise.
2393         * loader/i386/linux_trampoline.S: Likewise.
2394         * loader/i386/xnu_helper.S: Likewise.
2395         * loader/i386/xnu.c: Likewise.
2396         * loader/i386/bsd_pagetable.c: Likewise.
2397         * loader/i386/multiboot_helper.S: Likewise.
2398         * loader/xnu.c: Likewise.
2399         * loader/xnu_resume.c: Likewise.
2400         * io/gzio.c: Likewise.
2401         * term/efi/console.c: Likewise.
2402         * term/terminfo.c: Likewise.
2403         * term/ieee1275/ofconsole.c: Likewise.
2404         * term/i386/pc/serial.c: Likewise.
2405         * term/i386/pc/vesafb.c: Likewise.
2406         * term/i386/pc/vga.c: Likewise.
2407         * term/usb_keyboard.c: Likewise.
2408         * term/gfxterm.c: Likewise.
2409         * aclocal.m4: Likewise.
2410         * util/lvm.c: Likewise.
2411         * util/grub.d/30_os-prober.in: Likewise.
2412         * util/grub.d/10_hurd.in: Likewise.
2413         * util/console.c: Likewise.
2414         * util/grub-macho2img.c: Likewise.
2415         * util/grub-probe.c: Likewise.
2416         * util/hostfs.c: Likewise.
2417         * util/i386/pc/grub-mkimage.c: Likewise.
2418         * util/i386/pc/grub-setup.c: Likewise.
2419         * util/i386/efi/grub-mkimage.c: Likewise.
2420         * util/grub-mkconfig.in: Likewise.
2421         * util/raid.c: Likewise.
2422         * util/resolve.c: Likewise.
2423         * util/grub-mkdevicemap.c: Likewise.
2424         * util/grub-emu.c: Likewise.
2425         * util/getroot.c: Likewise.
2426         * util/hostdisk.c: Likewise.
2427         * util/usb.c: Likewise.
2428         * util/grub-editenv.c: Likewise.
2429         * util/misc.c: Likewise.
2431 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2433         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
2434         `genparttoollist.sh'.
2435         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
2436         Add `*.sh' to the list find searches for and change `mdate.sh'
2437         to `mdate-sh'.
2439 2009-06-10  Pavel Roskin  <proski@gnu.org>
2441         * include/grub/multiboot2.h: Provide compatibility defines for
2442         multiboot2.h.
2443         * include/multiboot2.h: Include stdint.h only if needed, using
2444         angle brackets.
2445         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
2446         grub/multiboot2.h.
2447         * loader/ieee1275/multiboot2.c: Likewise.
2448         * loader/multiboot2.c: Likewise.
2449         * loader/multiboot_loader.c: Likewise.
2451         * configure.ac: Use -nostdlib when probing for the target.  It
2452         should not be required to have libc for the target.
2454         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
2455         they fail without libc headers for the target.
2456         * include/grub/powerpc/libgcc.h: Use weak attribute for all
2457         exports.
2458         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
2459         preprocessor conditionals.
2461         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
2462         build system doesn't need to be aware of the tar.c internals.
2464 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
2466         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
2468 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
2470         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
2471         disk limit to 26 for IDE, Virtio, Xen and SCSI.
2473 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
2475         * util/i386/pc/grub-install.in: Change the error message if UUIDs
2476         aren't available if ata.mod gets used.
2478 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
2480         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
2481         initialising controller.
2482         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2484 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2486         * util/i386/pc/grub-install.in: Add a parameter --disk-module
2487         to choose between ata and biosdisk module on i386-pc.
2489 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
2491         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
2492         Subclass and Programming Interface fields in terms of the 3 byte
2493         Class Code register.
2494         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2496         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
2497         interface is OHCI.  Add grub_dprintf for symmetry with
2498         bus/usb/uhci.c.
2499         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
2500         interface is UHCI.  Add interf variable for programming
2501         interface.  Print interface with class/subclass.
2503         * bus/usb/ohci.c: Set interf with correct field.
2505         * bus/usb/uhci.c: Remove unneeded doubled lines.
2506         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
2507         Remove whitespace inside comment.
2509 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
2511         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
2512         as fallback an equivalent option without depth.
2514 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2516         Not fail if unable to retrieve C/H/S on LBA disks
2518         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
2519         if unable to retrieve C/H/S on LBA disks
2521 2009-06-08  Pavel Roskin  <proski@gnu.org>
2523         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
2524         about aliasing.
2526 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2528         * Makefile.in (uninstall): Remove all $lib_DATA files.
2530 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2532         Bugfix: install on partitionless device
2534         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
2535         is a whole disk
2537 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2539         * Makefile.in (uninstall): Remove all $include_DATA files.
2541 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2543         * commands/true.c: New file.  Implement the true and false commands.
2544         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
2545         (true_mod_SOURCES): New variable.
2546         (true_mod_CFLAGS): Likewise.
2547         (true_mod_LDFLAGS): Likewise.
2549 2009-06-05  Colin D Bennett  <colin@gibibit.com>
2551         Optimized font character lookup using binary search instead of linear
2552         search.  Fonts now are required to have the character index ordered by
2553         code point.
2555         * font/font.c (load_font_index): Verify that fonts have ordered
2556         character indices.
2557         (find_glyph): Use binary search instead of linear search to find a
2558         character in a font.
2560 2009-06-05  Michael Scherer  <misc@mandriva.org>
2562         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
2563         uses case sensitive btree.
2564         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
2565         only for case insensitive filesystems.
2567 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
2569         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
2570         * conf/common.rmk (search_mod_CFLAGS): likewise
2572 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2574         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
2575         compensate a compiler bug
2577 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2579         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
2580         instead of '\b'
2582 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2584         Definitions for creating asm symbols with Apple's CC
2586         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
2587         [APPLE_CC] (VARIABLE): likewise
2589 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2591         Disable lnxboot.img when compiled
2592         with Apple's CC
2594         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
2595         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
2596         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
2597         [! APPLE_CC] (CODE_LENG): skip
2598         [! APPLE_CC] (setup_sects): likewise
2599         [! APPLE_CC]: skip filling
2601 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2603         Address in trampolines based on 32-bit registers when compiled
2604         with Apple's CC
2606         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
2607         for addresses
2608         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
2610 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2612         Avoid aliases when compiling with Apple's CC for PCBIOS machine
2614         * kern/misc.c [APPLE_CC] (memcpy): new function
2615         [APPLE_CC] (memmove): likewise
2616         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
2617         (memcpy): define alias conditionally on !APPLE_CC
2618         (memset): likewise
2619         (abort): likewise
2620         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
2621         APPLE_CC are defined
2622         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
2623         (grub_assert_fail): make prototype conditional
2625 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2627         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
2629         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
2630         grub-macho2img
2631         (CLEANFILES): add grub-macho2img
2632         (grub_macho2img_SOURCES): new variable
2633         * kern/i386/pc/startup.S (bss_start): new variable
2634         (bss_end): likewise
2635         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
2636         * util/grub-macho2img.c: new file
2638 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2640         Use objconv when compiling with Apple's CC
2642         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
2643         (efiemu64.o): likewise
2644         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
2645         when compiling with Apple's CC
2646         (efiemu64_s.o): likewise
2647         * configure.ac: check for objconv when compiling with Apple's CC
2648         * genmk.rb: use objconv for modules when compiled with Apple's CC
2650 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2652         Define segment as well as section when compiling with
2653         Apple's CC
2655         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
2656         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
2657         (efiemu_convert_pointer): likewise
2658         (efiemu_set_virtual_address_map): likewise
2659         (efiemu_convert_pointer): likewise
2660         (efiemu_getcrc32): likewise
2661         (init_crc32_table): likewise
2662         (reflect): likewise
2663         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
2664         (GRUB_MOD_DEP): likewise
2666 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2668         Allow a compilation without -mcmodel=large
2670         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
2671         when compiled without -mcmodel=large
2672         (filter_memory_map): remove memory post 4 GiB when compiled
2673         without -mcmodel=large
2674         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
2675         TARGET_CFLAGS when -mcmodel=large isn't supported
2677 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2679         Remove nested functions in efiemu core
2681         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
2683 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2685         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
2687         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
2688         temporary storage
2689         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
2690         using Apple's CC
2691         (grub_cpu_is_tsc_supported): likewise
2692         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
2694 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2696         Absolute addressing through constant with Apple's cc
2698         * kern/i386/pc/startup.S: Define necessary constants
2699         and address through it when using ABS with Apple's CC
2700         * boot/i386/pc/diskboot.S: likewise
2701         * boot/i386/pc/boot.S: likewise
2702         * boot/i386/pc/lnxboot.S: likewise
2703         * boot/i386/pc/cdboot.S: likewise
2704         * mmap/i386/pc/mmap_helper.S: likewise
2705         * commands/i386/pc/drivemap_int13h.S: likewise
2707 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2709         Check if compiler is apple cc
2711         * Makefile.in (ASFLAGS): new variable
2712         (TARGET_ASFLAGS): likewise
2713         (TARGET_MODULE_FORMAT): likewise
2714         (TARGET_APPLE_CC): likewise
2715         (OBJCONV): likewise
2716         (TARGET_IMG_CFLAGS): likewise
2717         (TARGET_CPPFLAGS): add includedir
2718         * configure.ac: call grub_apple_cc and grub_apple_target_cc
2719         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
2720         Check for linker script only if compiler isn't Apple's CC
2721         (TARGET_MODULE_FORMAT): set
2722         (TARGET_APPLE_CC): likewise
2723         (TARGET_ASFLAGS): likewise
2724         (ASFLAGS): likewise
2725         Check for objcopy only if compiler isn't Apple's CC
2726         Check for BSS symbol only if compiler isn't Apple's CC
2727         * genmk.rb: adapt nm options if we use Apple's utils
2728         * aclocal.m4 (grub_apple_cc): new test
2729         (grub_apple_target_cc): likewise
2731 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2733         Simplify sed expressions and improve awk
2735         * Makefile.in (install-local): simplify sed expression
2736         * gencmdlist.sh: likewise
2737         * genmoddep.awk: avoid adding module as a dependency of itself
2739 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2741         Add missing start symbols
2743         * boot/i386/pc/boot.S: add start
2744         * boot/i386/pc/pxeboot.S: likewise
2746 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2748         Fix wrong assumptions with grub-mkimage on EFI
2750         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
2751         (relocate_addresses): consider both r_addend and value at offset
2752         (make_mods_section): zerofill modinfo and header
2753         (convert_elf): write prefix here
2755 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2757         Use .asciz instead of .string
2759         * i386/pc/diskboot.S: use .asciz instead of .string
2760         * i386/pc/boot.S: likewise
2761         * include/grub/dl.h (GRUB_MOD_DEP): likewise
2762         (GRUB_MOD_NAME): likewise
2764 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2766         gfxpayload support
2768         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
2769         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
2770         (grub_video_setup): remove
2771         (grub_video_set_mode): new prototype
2772         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
2773         (vid_mode): remove
2774         (linux_vesafb_res): compile only on PCBIOS
2775         (grub_linux_boot): support gfxpayload
2776         * loader/i386/pc/xnu.c (video_hook): new function
2777         (grub_xnu_set_video): support gfxpayload
2778         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
2779         (DEFAULT_VIDEO_HEIGHT): likewise
2780         (DEFAULT_VIDEO_FLAGS): likewise
2781         (DEFAULT_VIDEO_MODE): new definition
2782         (video_hook): new function
2783         (grub_gfxterm_init): use grub_video_set_mode
2784         * util/grub.d/30_os-prober.in: remove explicit modesetting before
2785         loading xnu
2786         * video/video.c (grub_video_setup): removed
2787         (grub_video_set_mode): new function based on grub_gfxterm_init and
2788         grub_video_setup
2790 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2792         Avoid calling biosdisk in drivemap
2794         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
2795         (revparse_biosdisk): likewise
2796         (list_mappings): derive name from id directly
2797         (grub_cmd_drivemap): use tryparse_diskstring
2799 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2801         Script fixes
2803         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
2804         (grub_lexer_param): add tokenonhold
2805         (grub_script_create_cmdline): remove cmdline. All callers updated
2806         (grub_script_function_create): make functionname
2807         grub_script_arg. All callers updated
2808         (grub_script_execute_argument_to_string): new prototype
2809         * kern/parser.c (state_transitions): reorder
2810         (grub_parser_cmdline_state): fix a bug and make more compact
2811         * script/sh/execute.c (grub_script_execute_argument_to_string):
2812         make global
2813         (grub_script_execute_cmdline): use new format
2814         * script/sh/function.c (grub_script_function_create): make functionname
2815         grub_script_arg. All callers updated
2816         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
2817         (grub_script_yylex): remove
2818         (grub_script_yylex2): renamed to ...
2819         (grub_script_yylex): ...renamed
2820         parse the expressions like a${b}c
2821         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
2822         (GRUB_PARSER_TOKEN_VAR): remove
2823         (GRUB_PARSER_TOKEN_NAME): likewise
2824         ("if"): declare as typeless
2825         ("while"): likewise
2826         ("function"): likewise
2827         ("else"): likewise
2828         ("then"): likewise
2829         ("fi"): likewise
2830         (text): remove
2831         (argument): likewise
2832         (script): accept empty scripts and make exit on error
2833         (arguments): use GRUB_PARSER_TOKEN_ARG
2834         (function): likewise
2835         (command): move error handling to script
2836         (menuentry): move grub_script_lexer_ref before
2837         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
2838         argument. All callers updated
2840 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2842         Prevent GRUB from probing floppies during boot.
2844         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
2845         * commands/search.c (options): Add --no-floppy.
2846         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
2847         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
2848         --no-floppy when searching for UUIDs.
2850 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2852         Simplify the code duplication in commands/search.c.
2854         * commands/search.c (search_label, search_fs_uuid): Merge into ...
2855         (search_fs): ... this.  Update all users.
2857 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
2859         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
2861 2009-05-28  Pavel Roskin  <proski@gnu.org>
2863         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
2864         Remove the original symlink explicitly.
2866         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
2867         just one slash.  That's how grub_fshelp_find_file() does it.
2869 2009-05-26  Pavel Roskin  <proski@gnu.org>
2871         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
2872         to `str'.
2874         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
2875         possibly unused.
2877 2009-05-25  Christian Franke  <franke@computer.org>
2879         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
2880         register.
2881         (grub_atapi_identify): Add wait after drive select.
2882         (grub_ata_identify): Do more strict status register check before
2883         calling grub_atapi_identify ().  Suppress error message if status
2884         register is 0x00 after command failure.  Add status register
2885         check after PIO read to avoid bogus identify due to stuck DRQ.
2886         Thanks to Pavel Roskin for testing.
2887         (grub_device_initialize): Remove unsafe status register check.
2888         Thanks to 'phcoder' for problem report and patch.
2889         Prevent sign extension in debug message.
2891 2009-05-23  Colin D Bennett  <colin@gibibit.com>
2893         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
2894         definition file, and functions defined in `normal/menu.c' have had
2895         their prototypes moved to `include/grub/menu.h' for consistency.
2897         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
2898         from normal.h.
2899         (grub_menu_get_entry): Likewise.
2900         (grub_menu_get_timeout): Likewise.
2901         (grub_menu_set_timeout): Likewise.
2902         (grub_menu_execute_entry): Likewise.
2903         (grub_menu_execute_with_fallback): Likewise.
2904         (grub_menu_entry_run): Likewise.
2906         * include/grub/normal.h: Re-ordered and grouped function
2907         prototypes by file that the function is defined in.
2908         (grub_menu_execute_callback): Removed; moved to menu.h.
2909         (grub_menu_get_entry): Likewise.
2910         (grub_menu_get_timeout): Likewise.
2911         (grub_menu_set_timeout): Likewise.
2912         (grub_menu_execute_entry): Likewise.
2913         (grub_menu_execute_with_fallback): Likewise.
2914         (grub_menu_entry_run): Likewise.
2915         (grub_menu_addentry): Renamed from this ...
2916         (grub_normal_add_menu_entry): ... to this.
2918         * normal/main.c (grub_menu_addentry): Renamed from this ...
2919         (grub_normal_add_menu_entry): ... to this.
2921         * script/sh/execute.c (grub_script_execute_menuentry): Update
2922         reference to renamed grub_menu_addentry function.
2924 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
2926         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
2928 2009-05-22  Pavel Roskin  <proski@gnu.org>
2930         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
2931         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
2932         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
2933         compiling for the i386 targets, but not for the utilities.
2935         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
2936         to grub_uint8_t.
2937         (grub_root_drive): Likewise.
2938         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
2939         remove alignment.
2940         (grub_root_drive): Change size to byte.
2941         (grub_start_addr): Remove.
2942         (grub_end_addr): Likewise.
2943         (grub_apm_bios_info): Likewise.
2945 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
2947         * normal/i386: Remove.
2948         * normal/powerpc: Likewise.
2949         * normal/sparc64: Likewise.
2950         * normal/x86_64: Likewise.
2952 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
2954         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
2955         * loader/i386/linux_trampoline.S: Fix indentation
2956         * loader/i386/xnu_helper.S: Likewise
2958 2009-05-18  Colin D Bennett  <colin@gibibit.com>
2960         Display error messages when parsing a Lua statement fails.
2961         Previously, executing a syntactically invalid statement like
2962         ")foo" or "bar;" would silently fail.
2964         * script/lua/grub_main.c (handle_lua_error): New function.
2965         (grub_lua_parse_line): Improved reporting of Lua parser and
2966         execution errors.
2968 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2970         Remove -Werror which causes build to fail on some systems
2972         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
2973         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
2974         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
2976 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2978         trampoline for linux on 64-bit platform
2980         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
2981         loader/i386/efi/linux_trampoline.S
2982         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
2983         declaration
2984         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
2985         here
2986         * loader/i386/linux_trampoline.S: moved here
2987         * loader/i386/efi/linux.c (allocate_pages): reserve space for
2988         trampoline
2989         (jumpvector): removed
2990         (grub_linux_trampoline_start): new declaration
2991         (grub_linux_trampoline_end): likewise
2992         (grub_linux_boot): use trampoline when on 64-bit platform
2993         * loader/i386/linux.c: likewise
2995 2009-05-16  Pavel Roskin  <proski@gnu.org>
2997         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
2998         const to avoid a warning.
2999         (grub_lua_setenv): Likewise.
3000         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
3001         lmsg to fix a warning.
3003 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
3005         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
3006         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3007         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
3008         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3009         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3010         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3011         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3012         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3014 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
3016         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
3018 2009-05-16  Bean  <bean123ch@gmail.com>
3020         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
3021         (lua_mod_SOURCES): New variable.
3022         (lua_mod_CFLAGS): Likewise.
3023         (lua_mod_LDFLAGS): Likewise.
3025         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
3026         (setjmp_mod_SOURCES): New variable.
3027         (setjmp_mod_CFLAGS): Likewise.
3028         (setjmp_LDFLAGS): Likewise.
3030         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
3031         (setjmp_mod_SOURCES): New variable.
3032         (setjmp_mod_CFLAGS): Likewise.
3033         (setjmp_LDFLAGS): Likewise.
3035         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3036         (setjmp_mod_SOURCES): New variable.
3037         (setjmp_mod_CFLAGS): Likewise.
3038         (setjmp_LDFLAGS): Likewise.
3040         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3041         (setjmp_mod_SOURCES): New variable.
3042         (setjmp_mod_CFLAGS): Likewise.
3043         (setjmp_LDFLAGS): Likewise.
3045         * normal/i386/setjmp.S: Moved from here ...
3046         * lib/i386/setjmp.S: ... Moved here
3047         * normal/x86_64/setjmp.S: Moved from here ...
3048         * lib/x86_64/setjmp.S: ... Moved here
3049         * normal/powerpc/setjmp.S: Moved from here ...
3050         * lib/powerpc/setjmp.S: ... Moved here
3051         * normal/sparc64/setjmp.S: Moved from here ...
3052         * lib/sparc64/setjmp.S: ... Moved here
3054         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
3055         returns_twice in mingw.
3057         * script/lua/grub_lib.c: New file.
3058         * script/lua/grub_lib.h: Likewise.
3059         * script/lua/grub_lua.h: Likewise.
3060         * script/lua/grub_main.c: Likewise.
3061         * script/lua/lapi.c: Likewise.
3062         * script/lua/lapi.h: Likewise.
3063         * script/lua/lauxlib.c: Likewise.
3064         * script/lua/lauxlib.h: Likewise.
3065         * script/lua/lbaselib.c: Likewise.
3066         * script/lua/lcode.c: Likewise.
3067         * script/lua/lcode.h: Likewise.
3068         * script/lua/ldblib.c: Likewise.
3069         * script/lua/ldebug.c: Likewise.
3070         * script/lua/ldebug.h: Likewise.
3071         * script/lua/ldo.c: Likewise.
3072         * script/lua/ldo.h: Likewise.
3073         * script/lua/ldump.c: Likewise.
3074         * script/lua/lfunc.c: Likewise.
3075         * script/lua/lfunc.h: Likewise.
3076         * script/lua/lgc.c: Likewise.
3077         * script/lua/lgc.h: Likewise.
3078         * script/lua/linit.c: Likewise.
3079         * script/lua/liolib.c: Likewise.
3080         * script/lua/llex.c: Likewise.
3081         * script/lua/llex.h: Likewise.
3082         * script/lua/llimits.h: Likewise.
3083         * script/lua/lmathlib.c: Likewise.
3084         * script/lua/lmem.c: Likewise.
3085         * script/lua/lmem.h: Likewise.
3086         * script/lua/loadlib.c: Likewise.
3087         * script/lua/lobject.c: Likewise.
3088         * script/lua/lobject.h: Likewise.
3089         * script/lua/lopcodes.c: Likewise.
3090         * script/lua/lopcodes.h: Likewise.
3091         * script/lua/loslib.c: Likewise.
3092         * script/lua/lparser.c: Likewise.
3093         * script/lua/lparser.h: Likewise.
3094         * script/lua/lstate.c: Likewise.
3095         * script/lua/lstate.h: Likewise.
3096         * script/lua/lstring.c: Likewise.
3097         * script/lua/lstring.h: Likewise.
3098         * script/lua/lstrlib.c: Likewise.
3099         * script/lua/ltable.c: Likewise.
3100         * script/lua/ltable.h: Likewise.
3101         * script/lua/ltablib.c: Likewise.
3102         * script/lua/ltm.c: Likewise.
3103         * script/lua/ltm.h: Likewise.
3104         * script/lua/lua.h: Likewise.
3105         * script/lua/luaconf.h: Likewise.
3106         * script/lua/lualib.h: Likewise.
3107         * script/lua/lundump.c: Likewise.
3108         * script/lua/lundump.h: Likewise.
3109         * script/lua/lvm.c: Likewise.
3110         * script/lua/lvm.h: Likewise.
3111         * script/lua/lzio.c: Likewise.
3112         * script/lua/lzio.h: Likewise.
3114 2009-05-16  Bean  <bean123ch@gmail.com>
3116         * include/grub/kernel.h (grub_module_header_types): Add type
3117         OBJ_TYPE_CONFIG.
3119         * kern/main.c (grub_load_config): New function.
3120         (grub_main): Call grub_load_config to read boot config.
3122         * grub-mkimage (generate_image): New parameter config_path.
3123         (options): New option --config.
3124         (main): Parse --config option, and pass it to generate_image.
3126 2009-05-14  Christian Franke  <franke@computer.org>
3128         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
3129         This fixes build on Cygwin.
3131 2009-05-14  Pavel Roskin  <proski@gnu.org>
3133         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
3134         jump.  This saves two bytes, so the typical case of 2 swapped
3135         drives would fit 32 bytes.
3137 2009-05-13  Pavel Roskin  <proski@gnu.org>
3139         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
3140         grub_uint32_t to avoid a warning.
3142         * loader/i386/linux.c (allocate_pages): When assigning
3143         real_mode_mem, cast through grub_size_t to fix a warning.  The
3144         code already makes sure that the value would fit a pointer.
3145         (grub_linux_setup_video): Cast render_target->data to
3146         grub_size_t to fix a warning.
3148 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
3150         * commands/i386/pc/drivemap.c: New file - implement drivemap
3151         command.
3152         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
3153         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
3155 2009-05-13  Pavel Roskin  <proski@gnu.org>
3157         * util/i386/pc/grub-setup.c (setup): Remove unused variable
3158         embedding_area_exists.
3160 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
3162         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
3163         it easier to understand / work with.
3164         Improve warning messages for cases where there's no embedding area,
3165         or when it is too small (or core.img too large).
3167 2009-05-13  Pavel Roskin  <proski@gnu.org>
3169         * loader/i386/pc/multiboot2.c: Add necessary includes for
3170         grub_multiboot2_real_boot().
3172         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
3173         PX record is always little-endian.  We only need the lower 2
3174         bytes of the mode.
3176         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
3177         facilitate code reuse.
3178         (grub_cpio_mount): Use "struct head", not a char buffer.  This
3179         fixes a warning reported by gcc 4.4.
3181         * kernel/disk.c (grub_disk_read): Use void pointer for the
3182         buffer.
3183         (grub_disk_write): Use const void pointer for the buffer.
3184         Adjust all callers.  Remove unnecessary casts.
3186 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
3188         * util/i386/pc/grub-install.in: Update copyright year.
3190 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3192         gptsync
3194         * commands/gptsync.c: new file
3195         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
3196         (gptsync_mod_SOURCES): new variable
3197         (gptsync_mod_CFLAGS): likewise
3198         (gptsync_mod_LDFLAGS): likewise
3199         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
3200         new definition
3201         (GRUB_PC_PARTITION_TYPE_HFS): likewise
3202         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
3203         * conf/i386-ieee1275.rmk: likewise
3204         * conf/i386-pc.rmk: likewise
3205         * conf/powerpc-ieee1275.rmk: likewise
3207 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3209         Fixed grub-emu
3211         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
3212         (grub_dl_ref): likewise
3214 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
3216         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
3217         split in two functions (one for msdos and one for gpt).
3219 2009-05-08  Pavel Roskin  <proski@gnu.org>
3221         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
3222         not modified.
3224         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
3225         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
3226         Initialize them with -1.  Add sanity check for bad1.  Eliminate
3227         nerr variable.
3229 2009-05-08  David S. Miller  <davem@davemloft.net>
3231         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
3233 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
3235         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
3236         existence.
3238 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
3240         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3241         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
3243 2009-05-05  David S. Miller  <davem@davemloft.net>
3245         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
3247 2009-05-05  Pavel Roskin  <proski@gnu.org>
3249         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
3250         of grub_dl_ref() and grub_dl_unref().
3251         * commands/parttool.c: Remove preprocessor conditionals around
3252         grub_dl_ref() and grub_dl_unref().
3253         * fs/affs.c: Likewise.
3254         * fs/afs.c: Likewise.
3255         * fs/cpio.c: Likewise.
3256         * fs/ext2.c: Likewise.
3257         * fs/fat.c: Likewise.
3258         * fs/hfs.c: Likewise.
3259         * fs/hfsplus.c: Likewise.
3260         * fs/iso9660.c: Likewise.
3261         * fs/jfs.c: Likewise.
3262         * fs/minix.c: Likewise.
3263         * fs/ntfs.c: Likewise.
3264         * fs/reiserfs.c: Likewise.
3265         * fs/sfs.c: Likewise.
3266         * fs/udf.c: Likewise.
3267         * fs/ufs.c: Likewise.
3268         * fs/xfs.c: Likewise.
3269         * include/grub/dl.h: Likewise.
3270         * loader/xnu.c: Likewise.
3272 2009-05-04  Pavel Roskin  <proski@gnu.org>
3274         * commands/acpi.c: Remove unused variable my_mod.
3275         * partmap/amiga.c: Likewise.
3276         * partmap/apple.c: Likewise.
3277         * partmap/gpt.c: Likewise.
3278         * partmap/pc.c: Likewise.
3279         * partmap/sun.c: Likewise.
3280         * term/gfxterm.c: Likewise.
3281         * term/i386/pc/vesafb.c: Likewise.
3282         * term/i386/pc/vga.c: Likewise.
3284 2009-05-04  David S. Miller  <davem@davemloft.net>
3286         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
3287         pointer args to grub_ieee1275_get_property().
3289         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
3291         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
3292         devices, and do not traverse down under controller nodes.
3294         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
3295         (grub_ofdisk_open): Use it to un-escape "," characters.
3296         * kern/disk.c (find_part_sep): New.
3297         (grub_disk_open): Use it to find the first non-escaped ','
3298         character in the disk name.
3299         * util/ieee1275/devicemap.c (escape_of_path): New.
3300         (grub_util_emit_devicemap_entry): Use it.
3301         * util/sparc64/ieee1275/grub-install.in: Update script to
3302         strip partition specifiers properly by not triggering on
3303         '\' escaped ',' characters.
3305 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3307         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
3308         to 0x300.
3309         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
3310         resolutions.
3311         (linux_vesafb_modes): Add a lot of additional modes to the list (based
3312         on documentation from Wikipedia).
3314 2009-05-04  Pavel Roskin  <proski@gnu.org>
3316         * disk/ata.c: Spelling fixes.
3317         * disk/raid.c: Likewise.
3318         * disk/usbms.c: Likewise.
3319         * disk/dmraid_nvidia.c: Likewise.
3320         * kern/ieee1275/openfw.c: Likewise.
3321         * kern/ieee1275/init.c: Likewise.
3322         * kern/ieee1275/cmain.c: Likewise.
3323         * boot/i386/pc/cdboot.S: Likewise.
3324         * video/readers/png.c: Likewise.
3325         * video/i386/pc/vbe.c: Likewise.
3326         * fs/udf.c: Likewise.
3327         * fs/hfs.c: Likewise.
3328         * fs/reiserfs.c: Likewise.
3329         * efiemu/runtime/efiemu.c: Likewise.
3330         * efiemu/main.c: Likewise.
3331         * efiemu/mm.c: Likewise.
3332         * include/grub/elf.h: Likewise.
3333         * include/grub/xnu.h: Likewise.
3334         * include/grub/usbdesc.h: Likewise.
3335         * include/grub/usb.h: Likewise.
3336         * include/grub/script_sh.h: Likewise.
3337         * include/grub/lib/LzmaEnc.h: Likewise.
3338         * include/grub/efiemu/efiemu.h: Likewise.
3339         * include/grub/command.h: Likewise.
3340         * normal/menu.c: Likewise.
3341         * normal/main.c: Likewise.
3342         * normal/datetime.c: Likewise.
3343         * bus/usb/uhci.c: Likewise.
3344         * mmap/i386/uppermem.c: Likewise.
3345         * mmap/mmap.c: Likewise.
3346         * commands/acpi.c: Likewise.
3347         * commands/test.c: Likewise.
3348         * partmap/apple.c: Likewise.
3349         * font/font.c: Likewise.
3350         * loader/sparc64/ieee1275/linux.c: Likewise.
3351         * loader/macho.c: Likewise.
3352         * loader/i386/bsd_trampoline.S: Likewise.
3353         * loader/i386/bsd.c: Likewise.
3354         * loader/xnu.c: Likewise.
3355         * term/i386/pc/vesafb.c: Likewise.
3356         * term/usb_keyboard.c: Likewise.
3357         * util/resolve.c: Likewise.
3358         * util/getroot.c: Likewise.
3360 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3362         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
3364 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3366         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
3367         build error.
3369 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3371         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
3372         parameter only available on BIOS.
3374 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3376         Removed wrong semicolon in declaration
3378         * grub/misc.h (grub_dprintf): remove semicolon
3380 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3382         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
3383         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
3384         is done by grub_cmd_linux() now).
3385         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
3386         restore video to text mode.
3387         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
3388         indicates lack of "vga=" parameter.  "vga=0" is mapped to
3389         `GRUB_LINUX_VID_MODE_NORMAL'.
3391 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3393         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
3394         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
3395         and `normal/script.c'.  Add `kern/rescue_reader.c',
3396         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
3397         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
3398         `grub_script.tab.c'.
3400         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3401         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3402         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3403         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3404         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3406         * Makefile.in: Remove duplicated 2008 in Copyright line.
3408 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3410         * util/misc.c (grub_util_warn): New function.  Emits a warning
3411         unconditionally.
3412         * include/grub/util/misc.h (grub_util_warn): New declaration.
3414         * util/i386/pc/grub-install.in: Understand --force and pass it down
3415         to grub-setup.
3417         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
3418         down to setup().
3419         (setup): Improve error messages and add warnings when requested to
3420         install in odd layouts.  Refuse to install using blocklists unless
3421         --force was set.
3423 2009-05-04  martin f. krafft  <madduck@madduck.net>
3425         * disk/raid.c (grub_raid_scan_device): Improve debug message.
3427 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3429         Updated copyright year
3431         * fs/hfsplus.c: updated copyright year
3433 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3435         HFS+ UUID
3437         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
3438         in the space previously used by unused3
3439         (grub_hfsplus_uuid): new function
3440         (grub_hfsplus_fs): added uuid field
3442 2009-05-03  Pavel Roskin  <proski@gnu.org>
3444         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
3445         suppress warnings.  It's no longer needed.
3446         * disk/host.c: Likewise.
3447         * disk/ata_pthru.c: Likewise.
3448         * disk/loopback.c: Likewise.
3449         * hook/datehook.c: Likewise.
3450         * parttool/pcpart.c: Likewise.
3451         * fs/i386/pc/pxe.c: Likewise.
3452         * fs/ntfscomp.c: Likewise.
3453         * efiemu/main.c: Likewise.
3454         * mmap/mmap.c: Likewise.
3455         * commands/crc.c: Likewise.
3456         * commands/hexdump.c: Likewise.
3457         * commands/hdparm.c: Likewise.
3458         * commands/acpi.c: Likewise.
3459         * commands/echo.c: Likewise.
3460         * commands/minicmd.c: Likewise.
3461         * commands/blocklist.c: Likewise.
3462         * commands/memrw.c: Likewise.
3463         * commands/loadenv.c: Likewise.
3464         * commands/usbtest.c: Likewise.
3465         * commands/lsmmap.c: Likewise.
3466         * commands/boot.c: Likewise.
3467         * commands/parttool.c: Likewise.
3468         * commands/configfile.c: Likewise.
3469         * commands/search.c: Likewise.
3470         * commands/ieee1275/suspend.c: Likewise.
3471         * commands/cat.c: Likewise.
3472         * commands/i386/pc/pxecmd.c: Likewise.
3473         * commands/i386/pc/play.c: Likewise.
3474         * commands/i386/pc/halt.c: Likewise.
3475         * commands/i386/pc/vbeinfo.c: Likewise.
3476         * commands/i386/pc/vbetest.c: Likewise.
3477         * commands/lspci.c: Likewise.
3478         * commands/date.c: Likewise.
3479         * commands/handler.c: Likewise.
3480         * commands/ls.c: Likewise.
3481         * commands/test.c: Likewise.
3482         * commands/cmp.c: Likewise.
3483         * commands/efi/loadbios.c: Likewise.
3484         * commands/efi/fixvideo.c: Likewise.
3485         * commands/halt.c: Likewise.
3486         * commands/help.c: Likewise.
3487         * commands/reboot.c: Likewise.
3488         * hello/hello.c: Likewise.
3489         * script/sh/main.c: Likewise.
3490         * loader/xnu.c: Likewise.
3491         * term/terminfo.c: Likewise.
3492         * term/i386/pc/serial.c: Likewise.
3493         * term/usb_keyboard.c: Likewise.
3495 2009-05-03  David S. Miller  <davem@davemloft.net>
3497         * normal/menu.c: Include grub/parser.h
3499 2009-05-03  Pavel Roskin  <proski@gnu.org>
3501         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
3502         not char*.
3503         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
3504         Suggested by Javier Martín <lordhabbit@gmail.com>
3506         * util/i386/pc/grub-mkrescue.in: Allow for the case when
3507         efiemu??.o doesn't exist.
3508         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
3509         copying.
3511 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
3513         FreeBSD 64-bit support
3515         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
3516         and loader/i386/bsd_trampoline.S
3517         (bsd_mod_ASFLAGS): new variable
3518         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
3519         (FREEBSD_MODTYPE_KERNEL64): likewise
3520         (grub_bsd64_trampoline_start): likewise
3521         (grub_bsd64_trampoline_end): likewise
3522         (grub_bsd64_trampoline_selfjump): likewise
3523         (grub_bsd64_trampoline_gdt): likewise
3524         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
3525         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
3526         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
3527         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
3528         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3529         of "attrib" member
3530         * loader/i386/bsd_pagetable.c: new file
3531         * loader/i386/bsd_trampoline.S: likewise
3532         * loader/i386/bsd.c (ALIGN_QWORD): new macro
3533         (ALIGN_VAR): likewise
3534         (entry_hi): new variable
3535         (kern_end_mdofs): likewise
3536         (is_64bit): likewise
3537         (grub_freebsd_add_meta): use ALIGN_VAR
3538         (grub_e820_mmap): new declaration
3539         (grub_freebsd_add_mmap): new function
3540         (grub_freebsd_add_meta_module): support 64 bit kernels
3541         (grub_freebsd_list_modules): use ALIGN_VAR
3542         (gdt_descriptor): new declaration
3543         (grub_freebsd_boot): support 64 bit kernels
3544         (grub_bsd_elf64_hook): new function
3545         (grub_bsd_load_elf): support elf64
3547 2009-05-03  Bean  <bean123ch@gmail.com>
3549         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
3550         after we get the result of if statement.
3552 2009-05-03  Bean  <bean123ch@gmail.com>
3554         * Makefile.in (enable_efiemu): New variable.
3556         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
3557         set.
3558         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
3559         path.
3560         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
3561         path, add -mno-red-zone option.
3562         (efiemu64_s.o): Likewise.
3563         (efiemu64.o): Use macro $^ for source file.
3565         * configure.ac (--enable-efiemu): New option.
3567 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
3569         xnu support
3571         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
3572         (pkglib_MODULES): add xnu.mod
3573         (xnu_mod_SOURCES): new variable
3574         (xnu_mod_CFLAGS): likewise
3575         (xnu_mod_LDFLAGS): likewise
3576         (xnu_mod_ASFLAGS): likewise
3577         * conf/i386-pc.rmk: likewise
3578         * conf/x86_64-efi.rmk: likewise
3579         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
3580         new declaration
3581         * include/grub/i386/macho.h: new file
3582         * include/grub/i386/xnu.h: likewise
3583         * include/grub/macho.h: likewise
3584         * include/grub/machoload.h: likewise
3585         * include/grub/x86_64/macho.h: likewise
3586         * include/grub/x86_64/xnu.h: likewise
3587         * include/grub/xnu.h: likewise
3588         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
3589         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
3590         * loader/i386/efi/xnu.c: new file
3591         * loader/i386/pc/xnu.c: likewise
3592         * loader/i386/xnu.c: likewise
3593         * loader/i386/xnu_helper.S: likewise
3594         * loader/macho.c: likewise
3595         * loader/xnu.c: likewise
3596         * loader/xnu_resume.c: likewise
3597         * util/grub-dumpdevtree: likewise
3598         * include/grub/i386/pit.h: include grub/err.h
3599         (grub_pit_wait): export
3600         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
3602 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3604         Efiemu
3606         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
3607         _linux_efi, linux_efi.
3608         new files in grub-emu
3609         new targets efiemu32.o and efiemu64.o
3610         * loader/linux_normal_efiemu.c: likewise
3611         * loader/i386/efi/linux.c: added preliminary efiemu support
3612         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
3613         files to copy
3614         * include/grub/autoefi.h: new file
3615         * include/grub/i386/efiemu.h: likewise
3616         * include/grub/i386/pc/efiemu.h: likewise
3617         * include/grub/efi/api.h: add LL suffix when necessary
3618         new definitions relating to tables
3619         * include/grub/efiemu/efiemu.h: new file
3620         * include/grub/efiemu/runtime.h: likewise
3621         * efiemu/prepare.c: likewise
3622         * efiemu/loadcore_common.c: likewise
3623         * efiemu/loadcore64.c: likewise
3624         * efiemu/runtime/efiemu.sh: likewise
3625         * efiemu/runtime/efiemu.S: likewise
3626         * efiemu/runtime/efiemu.c: likewise
3627         * efiemu/runtime/config.h: likewise
3628         * efiemu/prepare32.c: likewise
3629         * efiemu/main.c: likewise
3630         * efiemu/modules/pnvram.c: likewise
3631         * efiemu/modules/i386: likewise
3632         * efiemu/modules/i386/pc: likewise
3633         * efiemu/modules/acpi.c: likewise
3634         * efiemu/i386/pc/cfgtables.c: likewise
3635         * efiemu/i386/loadcore64.c: likewise
3636         * efiemu/i386/loadcore32.c: likewise
3637         * efiemu/prepare64.c: likewise
3638         * efiemu/loadcore.c: likewise
3639         * efiemu/symbols.c: likewise
3640         * efiemu/mm.c: likewise
3641         * efiemu/loadcore32.c: likewise
3643 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3645         ACPI spoofing
3647         * commands/acpi.c: new file
3648         * commands/i386/pc/acpi.c: likewise
3649         * commands/efi/acpi.c: likewise
3650         * include/grub/acpi.h: likewise
3651         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
3652         (acpi_mod_SOURCES): new variable
3653         (acpi_mod_CFLAGS): likewise
3654         (acpi_mod_LDFLAGS): likewise
3655         * conf/i386-efi.rmk: likewise
3656         * conf/x86_64-efi.rmk: likewise
3658 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3660         Missing part from mmap patch
3662         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
3663         (grub_mmap_unregister)
3664         (grub_mmap_free_and_unregister): use grub_mmap_register
3666 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3668         Mmap services
3670         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
3671         * loader/i386/linux.c (find_mmap_size): likewise
3672         (allocate_pages): likewise
3673         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
3674         (grub_fill_multiboot_mmap): likewise
3675         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
3676         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
3677         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
3678         (OPENBSD_MMAP_RESERVED): likewise
3679         * include/grub/i386/pc/memory.h: include grub/memory.h
3680         (grub_lower_mem): removed
3681         (grub_upper_mem): likewise
3682         (GRUB_MACHINE_MEMORY_ACPI): new definition
3683         (GRUB_MACHINE_MEMORY_NVS): likewise
3684         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
3685         (GRUB_MACHINE_MEMORY_HOLE): likewise
3686         (grub_machine_mmap_register): likewise
3687         (grub_machine_mmap_unregister): likewise
3688         (grub_machine_get_upper): likewise
3689         (grub_machine_get_lower): likewise
3690         (grub_machine_get_post64): likewise
3691         * include/grub/i386/efi/memory.h: new file
3692         * include/grub/x86_64/efi/memory.h: likewise
3693         * include/grub/efi/memory.h: likewise
3694         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
3695         (mmap_mod_SOURCES): new variable
3696         (mmap_mod_LDFLAGS): likewise
3697         (mmap_mod_ASFLAGS): likewise
3698         * conf/i386-coreboot.rmk: likewise
3699         * conf/i386-ieee1275.rmk: likewise
3700         * conf/i386-efi.rmk: likewise
3701         * conf/x86_64-efi.rmk: likewise
3702         * include/grub/types.h (UINT_TO_PTR): new macro
3703         (PTR_TO_UINT32): likewise
3704         (PTR_TO_UINT64): likewise
3705         * include/grub/memory.h: new file
3706         * mmap/i386/pc/mmap.c: likewise
3707         * mmap/i386/pc/mmap_helper.S: likewise
3708         * mmap/i386/uppermem.c: likewise
3709         * mmap/mmap.c: likewise
3710         * mmap/efi/mmap.c: likewise
3711         * kern/i386/coreboot/init.c (grub_machine_init): don't use
3712         grub_upper_mem
3713         * kern/i386/pc/init.c (grub_lower_mem): removed variable
3714         (grub_upper_mem): likewise
3715         (grub_machine_init): don't use grub_upper_mem,
3716         make grub_lower_mem local
3717         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
3718         grub_mmap_iterate and grub_mmap_get_upper
3719         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
3721 2009-05-02  Bean  <bean123ch@gmail.com>
3723         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
3724         script/sh/parser.y.
3725         (pkglib_MODULES): Add normal.mod and sh.mod.
3726         (normal_SOURCES): New variable.
3727         (normal_mod_CFLAGS): Likewise.
3728         (normal_mod_LDFLAGS): Likewise.
3729         (sh_mod_SOURCES): Likewise.
3730         (sh_mod_CFLAGS): Likewise.
3731         (sh_mod_LDFLAGS): Likewise.
3733         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
3734         script/sh/lexer.c_DEPENDENCIES.
3735         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
3736         kern/rescue_reader.c and kern/rescue_parser.c.
3737         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
3738         (grub_emu_SOURCES): Change source files.
3739         (pkglib_MODULES): Remove normal.mod.
3740         (normal_SOURCES): Removed.
3741         (normal_mod_CFLAGS): Likewise.
3742         (normal_mod_LDFLAGS): Likewise.
3743         * conf/i386-coreboot.rmk: Likewise.
3744         * conf/i386-efi.rmk: Likewise.
3745         * conf/i386-ieee1276.rmk: Likewise.
3746         * conf/powerpc-ieee1275.rmk: Likewise.
3747         * conf/sparc64-ieee1275.rmk: Likewise.
3748         * conf/x86_64-efi.rmk: Likewise.
3750         * include/grub/command.h (grub_command_execute): New inline function.
3752         * include/grub/menu.h (grub_menu_entry): Removed commands field.
3754         * include/grub/normal.h: Remove <grub/setjmp.h>.
3755         (grub_fs_module_list): Moved to normal/autofs.c.
3756         (grub_exit_env): Removed.
3757         (grub_command_execute): Likewise.
3758         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
3759         parameter script.
3760         (read_command_list): New function declaration.
3761         (read_fs_list): Likewise.
3763         * include/parser.h: Include <grub/reader.h>.
3764         (grub_parser_split_cmdline): Change type of getline parameter.
3765         (grub_parser): New structure.
3766         (grub_parser_class): New variable.
3767         (grub_parser_execute): New function declaration.
3768         (grub_register_rescue_parser): Likewise.
3769         (grub_parser_register): New inline function.
3770         (grub_parser_unregister): Likewise.
3771         (grub_parser_get_current): Likewise.
3772         (grub_parser_set_current): Likewise.
3774         * include/grub/reader.h: New file.
3775         * kern/reader.c: Likewise.
3776         * kern/rescue_parser.c: Likewise.
3777         * kern/rescue_reader.c: Likewise.
3778         * normal/autofs.c: Likewise.
3779         * normal/dyncmd.c: Likewise.
3781         * include/grub/rescue.h: Removed.
3782         * normal/command.h: Likewise.
3784         * include/grub/script.h: Moved to ...
3785         * include/grub/script_sh.h: ... Moved here.
3786         * normal/execute.c: Moved to ...
3787         * script/sh/execute.c: ... Moved here.
3788         * normal/function.c: Moved to ...
3789         * script/sh/function.c: ... Moved here.
3790         * normal/lexer.c: Moved to ...
3791         * script/sh/lexer.c: ... Moved here.
3792         * normal/parser.y: Moved to ...
3793         * script/sh/parser.y: ... Moved here.
3794         * normal/script.c: Moved to ...
3795         * script/sh/script.c: ... Moved here.
3797         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
3798         <grub/reader.h>.
3799         (grub_exit_env): Removed.
3800         (fs_module_list): Moved to normal/autofs.c.
3801         (grub_file_getline): Don't handle comment here.
3802         (free_menu): Skip removed field entry->commands.
3803         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
3804         script parameter.
3805         (read_config_file): Removed nested parameter, change getline function.
3806         (grub_enter_normal_mode): Removed.
3807         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
3808         (read_command_list): Likewise.
3809         (autoload_fs_module): Moved to normal/autofs.c.
3810         (read_fs_list): Likewise.
3811         (reader_nested): New variable.
3812         (grub_normal_execute): Run parser.sh to switch to sh parser.
3813         (grub_cmd_rescue): Removed.
3814         (cmd_normal): Removed.
3815         (grub_cmd_normal): Unregister itself at the beginning. Don't register
3816         rescue command.
3817         (grub_cmdline_run): New function.
3818         (grub_normal_reader_init): Likewise.
3819         (grub_normal_read_line): Likewise.
3820         (grub_env_write_pager): Likewise.
3821         (cmdline): New variable.
3822         (grub_normal_reader): Likewise.
3823         (GRUB_MOD_INIT): Register normal reader and set as current, register
3824         pager hook, register normal command with grub_register_command_prio,
3825         so that it won't show up in command.lst.
3826         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
3827         grub_fs_autoload_hook.
3829         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
3830         (grub_menu_execute_entry): Replace grub_script_execute with
3831         grub_parser_execute, change parameter to grub_command_execute.
3833         * normal/menu_text.c: Remove <grub/script.h>.
3835         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
3836         and <grub/parser.h>.
3837         (run): Change editor_getline to use new parser interface. Change
3838         parameter to grub_command_execute.
3840         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
3841         <grub/reader.h> and <grub/parser.h>.
3842         (grub_load_normal_mode): Execute normal command.
3843         (grub_main): Call grub_register_core_commands,
3844         grub_register_rescue_parser and grub_register_rescue_reader, use
3845         grub_reader_loop to enter input loop.
3847         * kern/parser.c (grub_parser_split_cmdline): Change type of
3848         getline parameter.
3849         (grub_parser_class): New variable.
3850         (grub_parser_execute): New function.
3852         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
3853         * loader/multiboot2.c: Likewise.
3854         * loader/sparc64/ieee1275/linux.c: Likewise.
3856         * util/grub-emu.c (read_command_list): New dummy function.
3858 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3860         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
3861         count to 16 for CCISS and IDA.
3863 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3865         * normal/menu_text.c  (grub_wait_after_message): Print a newline
3866         after waiting for user input.
3868         * loader/i386/linux.c: Include `<grub/normal.h>'.
3869         (grub_cmd_linux): Improve the error message about `ask' mode, by
3870         waiting for user input so it's not missed (we can do this, since
3871         user requested interaction).
3873 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3875         Added missing lst to grub-mkrescue
3877         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
3878         and ${input_dir}/parttool.lst
3880 2009-04-30  David S. Miller  <davem@davemloft.net>
3882         * util/hostdisk.c (device_is_wholedisk): New function.
3883         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
3884         zero only if device_is_wholedisk() returns true.
3886         * util/hostdisk.c (convert_system_partition_to_system_disk):
3887         Handle virtual disk devices named /dev/vdiskX as found on sparc
3888         and powerpc.
3890         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
3891         lettered partition specifier is found, convert to numbered.
3893 2009-04-29  David S. Miller  <davem@davemloft.net>
3895         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
3896         * include/grub/sparc64/ieee1275/memory.h: Likewise.
3898         * normal/command.c: Add missing newline at end of file.
3900         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
3901         warnings.
3902         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
3903         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
3904         grub_ofdisk_read): Likewise, and deal similarly with the fact that
3905         ihandles have a 32-bit type but need to be stored in a "void *".
3907 2009-04-28  Pavel Roskin  <proski@gnu.org>
3909         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
3910         not disk.  Adjust all dependencies.
3911         (grub_fs_uuid_close): Use grub_device_close(), not
3912         grub_disk_close().
3914         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
3915         parent's partition, don't copy it by reference, as it gets freed
3916         on close.
3918 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3920         Preboot hooks support
3922         * commands/boot.c (struct grub_preboot_t): new declaration
3923         (preboots_head): new variable
3924         (preboots_tail): likewise
3925         (grub_loader_register_preboot_hook): new function
3926         (grub_loader_unregister_preboot_hook): likewise
3927         (grub_loader_set): launch preboot hooks
3928         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
3929         (grub_loader_register_preboot_hook): new declaration
3930         (grub_loader_unregister_preboot_hook): likewise
3932 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3934         Warning fix
3936         * disk/scsi.c (grub_scsi_open): added missing cast when
3937         calling grub_dprintf
3939 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
3941         Bug and warning fixes
3943         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
3944         declaration
3945         * commands/test.c (test_parse): fixed bug with file tests and corrected
3946         declaration of find_file
3948 2009-04-26  Pavel Roskin  <proski@gnu.org>
3950         * Makefile.in: Don't install empty manual pages if help2man is
3951         missing.  Use help2man option for output, not shell redirection.
3953 2009-04-26  David S. Miller  <davem@davemloft.net>
3955         * util/grub-mkdevicemap.c (make_device_map): Add missing
3956         NESTED_FUNC_ATTR to process_device().
3958 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3960         Test command
3962         * commands/test.c: rewritten to use bash-like test
3964 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3966         Parttool autoloading and improvements
3968         * Makefile.in (pkglib_DATA): add parttool.lst
3969         (parttool.lst): new target
3970         * genmk.rb: generate parttool-*
3971         (CLEANFILES): add #{parttool}
3972         (PARTTOOLFILES): new variable
3973         * genparttoollist.sh: new file
3974         * parttool/pcpart.c (grub_pcpart_boot): more feedback
3975         (grub_pcpart_type): likewise
3976         * commands/parttool.c (helpmsg): new variable
3977         (grub_cmd_parttool): output help if not enough arguments are supplied
3978         autoload modules
3979         (GRUB_MOD_INIT(parttool)): use helpmsg
3981 2009-04-24  David S. Miller  <davem@davemloft.net>
3983         Avoiding opening same device multiple times in device iterator.
3985         * kern/device.c: (grub_device_iterate): Define struct part_ent,
3986         and use it to build a list of partitions in iterate_disk() and
3987         iterate_partition().
3989         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
3990         on disk->data.
3992         * disk/ieee1275/nand.c (grub_nand_iterate): Return
3993         grub_devalias_iterate() result instead of unconditional 0.
3994         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
3995         Also, capture hook return value, either directly or via
3996         grub_children_iterate(), and propagate to caller.
3997         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
3998         grub_children_iterate): Return value is now 'int' instead of
3999         'grub_err_t'.
4000         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
4001         like a proper iterator, stopping when hooks return non-zero.
4002         (grub_devalias_iterate): Likewise.
4004 2009-04-23  David S. Miller  <davem@davemloft.net>
4006         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
4008 2009-04-22  David S. Miller  <davem@davemloft.net>
4010         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
4011         is larger than address_cells, use that value for address_cells too.
4013         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
4014         IEEE1275_MAX_PATH_LEN): Define.
4015         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
4016         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
4017         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
4018         'devtype'.  Explicitly NULL terminate devalias expansion.
4020         * util/sparc64/ieee1275/misc.c: New file.
4021         * util/sparc64/ieee1275/grub-setup.c: New file.
4022         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
4023         * util/sparc64/ieee1275/grub-mkimage.c: New file.
4024         * util/sparc64/ieee1275/grub-install.in: New file.
4025         * util/ieee1275/ofpath.c: New file.
4026         * util/ieee1275/devicemap.c: New file.
4027         * util/devicemap.c: New file.
4028         * util/deviceiter.c: New file.
4029         * kern/sparc64/ieee1275/init.c: New file.
4030         * include/grub/util/ofpath.h: New file.
4031         * include/grub/util/deviceiter.h: New file.
4032         * util/grub-mkdevicemap.c: Include deviceiter.h.
4033         Implement using grub_util_emit_devicemap_entry and
4034         grub_util_iterate_devices.
4035         * conf/i386-corebook.rmk: Build util/deviceiter.c and
4036         util/devicemap.c into grub-mkdevicemap
4037         * conf/i386-efi.rmk: Likewise.
4038         * conf/i386-ieee1275.rmk: Likewise.
4039         * conf/i386-pc.rmk: Likewise.
4040         * conf/powerpc-ieee1275.rmk: Likewise.
4041         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
4042         images and installation utilities.  Build kernel as image
4043         instead of as elf binary.  Use common rules as much as possible.
4045 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
4047         Correct GPT definition
4049         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
4050         of "attrib" member
4052 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
4054         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
4056 2009-04-19  David S. Miller  <davem@davemloft.net>
4058         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
4059         (grub_rescue_cmd_linux): Rename to...
4060         (grub_cmd_linux): and fix prototype.
4061         (grub_rescue_cmd_initrd): Rename to...
4062         (grub_cmd_initrd): and fix prototype.
4063         (cmd_linux, cmd_initrd): New.
4064         (GRUB_MOD_INIT(linux)): Use grub_register_command().
4065         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
4067 2009-04-17  Pavel Roskin  <proski@gnu.org>
4069         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
4070         format.
4071         (grub_ohci_transfer): Likewise.
4073         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
4075         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
4076         return without a value.  Fix inconsistent indentation.
4078         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
4079         match struct grub_fs.
4081         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
4082         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
4083         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4084         * commands/lspci.c (grub_lspci_iter): Likewise.
4086 2009-04-16  Bean  <bean123ch@gmail.com>
4088         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
4089         value.
4091 2009-04-15  Pavel Roskin  <proski@gnu.org>
4093         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
4094         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
4095         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
4096         definitions.
4098 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4100         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
4101         that no multiple data or metadata areas are supported and `Unknown
4102         metadata header'.
4104 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4106         Move loader out of the kernel
4108         * kern/loader.c: moved to ...
4109         * commands/boot.c: ... moved here
4110         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
4111         * commands/boot.c (grub_cmd_boot): moved here. All users updated
4112         * include/grub/kernel.h (grub_machine_fini): export
4113         * include/grub/loader.h (grub_loader_is_loaded): update declaration
4114         (grub_loader_set): likewise
4115         (grub_loader_unset): likewise
4116         (grub_loader_boot): likewise
4117         * conf/common.rmk: new module boot.mod
4118         (pkglib_MODULES): add boot.mod
4119         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
4120         (grub_emu_SOURCES): likewise
4121         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
4122         (grub_emu_SOURCES): likewise
4123         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
4124         (grub_emu_SOURCES): likewise
4125         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
4126         (grub_emu_SOURCES): likewise
4127         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
4128         (grub_emu_SOURCES): likewise
4129         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
4130         (grub_emu_SOURCES): likewise
4131         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
4132         (grub_emu_SOURCES): likewise
4134 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4136         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
4138         * kern/misc.c (grub_itoa): Removed function
4139         (grub_ltoa): likewise
4140         (grub_vsprintf): use grub_lltoa
4142 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4144         Restore grub-emu
4146         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
4147         * conf/i386-coreboot.rmk: likewise
4148         * conf/i386-ieee1275.rmk: likewise
4149         * conf/powerpc-ieee1275.rmk: likewise
4151 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4153         * INSTALL: Add that `./autogen.sh' needs to be run before
4154         `./configure.'.
4156 2009-04-14  Bean  <bean123ch@gmail.com>
4158         * Makefile.in (pkglib_DATA): Add handler.lst.
4159         (handler.lst): New rule.
4161         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
4162         * conf/i386-coreboot.rmk: Likewise.
4163         * conf/i386-ieee1275.rmk: Likewise.
4164         * conf/i386-efi.rmk: Likewise.
4165         * conf/x86_64-efi.rmk: Likewise.
4166         * conf/powerpc-ieee1275.rmk: Likewise.
4167         * conf/sparc64-ieee1275.rmk: Likewise.
4169         * genhandlerlist.sh: New file.
4171         * genmk.rb: Add rules to generate handler.lst.
4173         * include/grub/normal.h (grub_file_getline): New function definition.
4174         (read_handler_list): Likewise.
4175         (free_handler_list): Likewise.
4177         * include/grub/term.h (grub_term_register_input): Add name parameter
4178         for auto generation of handler.lst.
4179         (grub_term_register_output): Likewise.
4181         * normal/handler.c: New file.
4183         * normal/main.c (get_line): Renamed to grub_file_getline.
4184         (read_config_file): Use the newly renamed grub_file_getline.
4185         (read_command_list): Likewise.
4186         (read_fs_list): Likewise.
4187         (grub_normal_execute): Call read_handler_list to parse handler.lst.
4188         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
4190         * term/efi/console.c (grub_console_init): Add name parameter for auto
4191         generation of handler.lst.
4192         * term/gfxterm.c: Likewise.
4193         * term/i386/pc/at_keyboard.c: Likewise.
4194         * term/i386/pc/console.c: Likewise.
4195         * term/i386/pc/serial.c: Likewise.
4196         * term/i386/pc/vesafb.c: Likewise.
4197         * term/i386/pc/vga.c: Likewise.
4198         * term/i386/pc/vga_text.c: Likewise.
4199         * term/ieee1275/ofconsole.c: Likewise.
4200         * term/usb_keyboard.c: Likewise.
4202 2009-04-14  Bean  <bean123ch@gmail.com>
4204         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
4205         properly with null character.
4207 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4209         * configure: Remove.
4210         * config.h.in: Likewise.
4211         * stamp-h.in: Likewise.
4212         * DISTLIST: Likewise.
4213         * conf/common.mk: Likewise.
4214         * conf/i386-coreboot.mk: Likewise.
4215         * conf/i386-efi.mk: Likewise.
4216         * conf/i386-ieee1275.mk: Likewise.
4217         * conf/i386.mk: Likewise.
4218         * conf/i386-pc.mk: Likewise.
4219         * conf/powerpc-ieee1275.mk: Likewise.
4220         * conf/sparc64-ieee1275.mk: Likewise.
4221         * conf/x86_64-efi.mk: Likewise.
4223         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
4224         develop on GRUB.
4226 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
4227             David S. Miller  <davem@davemloft.net>
4229         * util/hostdisk.c (make_device_name): Fix buffer length
4230         calculations.
4232 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4234         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
4235         <sys/param.h> and <sys/sysctl.h>.
4236         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
4237         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
4238         opening the device and reset them afterwards.
4240 2009-04-13  Pavel Roskin  <proski@gnu.org>
4242         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
4243         Reported by John Stanley <jpsinthemix@verizon.net>
4245 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4247         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
4248         that name for menuentries when appropriate.
4250 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4252         * util/grub.d/10_freebsd.in: Add a missing `fi'.
4254 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4256         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
4257         to Linux, simply abort telling the user it's no longer supported.
4259 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4261         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
4262         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
4263         `freebsd_loadenv' only when devices.hints exist.
4265 2009-04-13  Pavel Roskin  <proski@gnu.org>
4267         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
4269 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4271         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
4272         partition number.
4273         (grub_drive): Likewise.
4275 2009-04-13  David S. Miller  <davem@davemloft.net>
4277         * kern/sparc64/ieee1275/ieee1275.c: New file.
4278         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
4279         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
4280         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
4281         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
4282         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
4283         grub_ieee1275_alloc_physmem): Declare new exported functions.
4285         * include/grub/sparc64/ieee1275/loader.h: New file.
4286         * include/grub/sparc64/ieee1275/memory.h: Likewise.
4287         * include/grub/sparc64/kernel.h: Likewise.
4288         * loader/sparc64/ieee1275/linux.c: Likewise.
4290         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
4291         (grub_fstest_SOURCES): Likewise.
4293         * util/hostdisk.c (make_device_name): Do not make any assumptions
4294         about the length of drive names.
4296         * kern/dl.c (grub_dl_load_file): Close file immediately when
4297         we are done using it.
4299 2009-04-12  David S. Miller  <davem@davemloft.net>
4301         * kern/misc.c (grub_ltoa): Fix cast when handling negative
4302         values.  Noticed by Pavel Roskin.
4304         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
4305         target compiler.
4307         * genmk.rb: Add more flexible image type specification, also
4308         pass --strip-unneeded to objcopy.
4309         * conf/i386-pc.rmk: Use *_FORMAT.
4310         * conf/i386-pc.mk: Rebuilt.
4312         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
4313         (OFDISK_HASH_SZ): Define.
4314         (ofdisk_hash): New hash table.
4315         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
4316         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
4317         instead of device phandle which is not unique.
4319         * kern/sparc64/ieee1275/init.c: Delete, replace with...
4320         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
4321         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
4322         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
4323         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
4324         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
4325         GRUB_KERNEL_MACHINE_DATA_END): Define.
4326         (grub_kernel_image_size, grub_total_module_size): Declare.
4328 2009-04-12  Pavel Roskin  <proski@gnu.org>
4330          * configure.ac: Change the logic when we check for target tools.
4331          Do it when the target is specified and it's different from the
4332          specified value of the host.
4334 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
4336         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
4337         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
4338         GNU/kFreeBSD. Check if a device is a character device. Use
4339         DIOCGMEDIASIZE to get the size.
4340         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
4341         support for GNU/kFreeBSD.
4342         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
4343         is a character device instead of a block device. Add support for
4344         FreeBSD device names.
4346         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
4347         is a character device instead of a block device.
4349         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
4350         is a character device instead of a block device.
4352 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
4354         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
4355         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
4356         FreeBSD. Check if a device is a character device. Use
4357         DIOCGMEDIASIZE to get the size.
4358         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
4359         support for FreeBSD.
4360         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
4361         is a character device instead of a block device. Add support for
4362         FreeBSD device names.
4364         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
4365         a character device instead of a block device.
4366         (grub_util_check_char_device): New function.
4368         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
4369         a character device instead of a block device.
4371         * include/grub/util/getroot.h (grub_util_check_char_device): New
4372         prototype.
4374 2009-04-11  David S. Miller  <davem@davemloft.net>
4376         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
4377         static libgcc.
4378         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
4379         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
4380         function, if present.
4381         (__bswapdi2): Likewise.
4383         * include/grub/sparc64/ieee1275/boot.h: New file.
4384         * boot/sparc64/ieee1275/boot.S: Likewise.
4385         * boot/sparc64/ieee1275/diskboot.S: Likewise.
4387         * kern/misc.c (grub_ltoa): New function.
4388         (grub_vsprintf): Use it to format 'long' integers.
4390 2009-04-10  David S. Miller  <davem@davemloft.net>
4392         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
4393         slots are of type grub_ieee1275_cell_t.
4394         (grub_nand_read): Likewise.
4395         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
4396         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
4397         macros are used to compare values in arg/ret block of the call.
4398         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4399         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
4400         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
4401         grub_ieee1275_instance_to_path, grub_ieee1275_write,
4402         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
4403         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
4404         grub_ieee1275_close, grub_ieee1275_set_property,
4405         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
4406         grub_ieee1275_cell_t.
4407         * kern/ieee1275/openfw.c (grub_map): Likewise.
4408         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
4409         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
4411         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
4412         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
4413         (grub_devalias_iterate): Likewise.
4415 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
4417         UFS improvements
4419         * fs/ufs.c (INODE_NBLOCKS): new definition
4420         (struct grub_ufs_dirent): added fields for non-BSD dirents
4421         (grub_ufs_get_file_block): fixed double indirect handling
4422         (grub_ufs_lookup_symlink): use more robust way to determine whether
4423         symlink is inline
4424         (grub_ufs_find_file): support for non-BSD dirents
4425         (grub_ufs_dir): support for non-BSD dirents
4427 2009-04-10  Bean  <bean123ch@gnail.com>
4429         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
4430         attribute, otherwise the size would be wrong for i386 platform.
4432         * include/grub/pci.h (grub_pci_read_word): New inline function.
4433         (grub_pci_read_byte): Likewise.
4434         (grub_pci_write): Likewise.
4435         (grub_pci_write_word): Likewise.
4436         (grub_pci_write_byte): Likewise.
4438         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
4440         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
4441         (find_framebuf): Scan pci to locate the frame buffer address.
4443         * commands/efi/fixvideo.c: New file.
4445         * commands/efi/loadbios.c: Likewise.
4447         * commands/memrw.c: Likewise.
4449         * util/grub-dumpbios.in: Likewise.
4451         * conf/common.rmk (grub-dumpbios): New utility.
4452         (pkglib_MODULES): New module memrw.mod.
4453         (memrw_mod_SOURCE): New macro.
4454         (memrw_mod_CFLAGS): Likewise.
4455         (memrw_mod_LDFLAGS): Likewise.
4457         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
4458         fixvideo.mod.
4459         (loadbios_mod_SOURCE): New macro.
4460         (loadbios_mod_CFLAGS): Likewise.
4461         (loadbios_mod_LDFLAGS): Likewise.
4462         (fixvideo_mod_SOURCE): Likewise.
4463         (fixvideo_mod_CFLAGS): Likewise.
4464         (fixvideo_mod_LDFLAGS): Likewise.
4466         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
4467         fixvideo.mod.
4468         (loadbios_mod_SOURCE): New macro.
4469         (loadbios_mod_CFLAGS): Likewise.
4470         (loadbios_mod_LDFLAGS): Likewise.
4471         (fixvideo_mod_SOURCE): Likewise.
4472         (fixvideo_mod_CFLAGS): Likewise.
4473         (fixvideo_mod_LDFLAGS): Likewise.
4475 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
4477         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
4479 2009-04-07  David S. Miller  <davem@davemloft.net>
4481         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
4482         support for R_SPARC_OLO10 relocations.  Fix compile warning for
4483         R_SPARC_WDISP30 case.
4484         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
4486 2009-04-06  Pavel Roskin  <proski@gnu.org>
4488         * include/grub/misc.h (ARRAY_SIZE): New macro.
4489         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
4490         New macro.
4491         * loader/i386/linux.c (allocate_pages): Use free_pages().
4492         (grub_linux_unload): Don't use free_pages().
4493         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
4494         wrong index.  Treat all other modes as text modes.
4495         (grub_cmd_linux): Initialize vid_mode unconditionally to
4496         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
4498         * commands/help.c (print_command_help): Use cmd->prio, not
4499         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
4501 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
4503         Parttool
4505         * parttool/pcpart.c: new file
4506         * commands/parttool.c: likewise
4507         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
4508         (parttool_mod_SOURCES): new variable
4509         (parttool_mod_CFLAGS): likewise
4510         (parttool_mod_LDFLAGS): likewise
4511         (pcpart_mod_SOURCES): likewise
4512         (pcpart_mod_CFLAGS): likewise
4513         (pcpart_mod_LDFLAGS): likewise
4514         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
4515         and parttool/pcpart.c
4516         * conf/i386-efi.rmk: likewise
4517         * conf/i386-ieee1275.rmk: likewise
4518         * conf/i386-pc.rmk: likewise
4519         * conf/powerpc-ieee1275.rmk: likewise
4520         * conf/sparc64-ieee1275.rmk: likewise
4521         * conf/x86_64-ieee1275.rmk: likewise
4523 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4525         Support for mtime and further expandability of dir command
4527         * include/grub/lib/datetime.h: moved to ...
4528         * include/grub/datetime.h: ... moved here and added
4529         declaration of grub_unixtime2datetime. All users updated
4530         * include/grub/fs.h: new syntax for dir and mtime functions in
4531         struct grub_fs
4532         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
4533         and GRUB_FSHELP_FLAGS_MASK
4534         * commands/ls.c (grub_ls_list_files): Write mtime in long format
4535         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
4536         (grub_ext2_mtime): new function
4537         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
4538         (grub_hfsplus_mtime): new function
4539         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
4540         (GRUB_UFS_ATTR_FILE): likewise
4541         (GRUB_UFS_ATTR_LNK): likewise
4542         (struct grub_ufs_sblock): new fields mtime
4543         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
4544         all users updated
4545         (grub_ufs_dir): mtime support
4546         (grub_ufs_mtime): new function
4547         * fs/affs.c (grub_affs_dir): use new dir syntax
4548         * fs/afs.c (grub_afs_dir): likewise
4549         * fs/cpio.c (grub_cpio_dir): likewise
4550         * fs/fat.c (grub_fat_find_dir): likewise
4551         * fs/hfs.c (grub_hfs_dir): likewise
4552         * fs/iso9660.c (grub_iso9660_dir): likewise
4553         * fs/jfs.c (grub_jfs_dir): likewise
4554         * fs/minix.c (grub_minix_dir): likewise
4555         * fs/ntfs.c (grub_ntfs_dir): likewise
4556         * fs/reiserfs.c (grub_reiserfs_dir): likewise
4557         * fs/sfs.c (grub_sfs_dir): likewise
4558         * fs/xfs.c (grub_xfs_dir): likewise
4559         * util/hostfs.c (grub_hostfs_dir): likewise
4560         * lib/datetime.c: moved to ...
4561         * normal/datetime.c: ... moved here
4562         (grub_unixtime2datetime): new function
4563         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
4564         * normal/completion.c (iterate_dir): use new dir syntax
4565         * normal/misc.c (grub_normal_print_device_info): tell the
4566         last modification time of a volume
4567         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
4568         * conf/common.rmk: added lib/datetime.c to ls.mod
4569         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
4570         (normal_mod_SOURCES): likewise
4571         (datetime_mod_SOURCES): Removed lib/datetime.c
4572         * conf/i386-efi.rmk: likewise
4573         * conf/i386-ieee1275.rmk: likewise
4574         * conf/i386-pc.rmk: likewise
4575         * conf/powerpc-ieee1275.rmk: likewise
4576         * conf/sparc64-ieee1275.rmk: likewise
4577         * conf/x86_64-efi.rmk: likewise
4579 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4581         Trim trailing spaces in FAT label and support mtools-like labels
4583         * fs/fat.c (grub_fat_iterate_dir): New function based
4584         on grub_fat_find_dir
4585         (grub_fat_find_dir): use grub_fat_iterate_dir
4586         (grub_fat_label): likewise
4588 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
4590         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
4591         and command.h
4592         remove extraneous kernel_elf_HEADERS
4594 2009-04-04  Bean  <bean123ch@gnail.com>
4596         * include/grub/util/misc.h: Add dummy function fsync for mingw.
4598         * util/misc.c: Likewise.
4600 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
4602         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
4603         instead of grub_printf.
4605 2009-04-03  Robert Millan  <rmh@aybabtu.com>
4607         * loader/i386/linux.c (grub_linux_setup_video): Fill
4608         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
4609         values from `mode info' structure instead of hardcoded
4610         values.
4612 2009-04-01  Pavel Roskin  <proski@gnu.org>
4614         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
4615         unused now.
4616         * genmk.rb: Likewise.
4617         * configure.ac: Likewise.
4619 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
4621         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
4622         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
4624 2009-04-01  David S. Miller  <davem@davemloft.net>
4626         * normal/sparc64/setjmp.S: Fix setjmp implementation.
4627         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
4628         (grub_setjmp): Mark with 'returns_twice' attribute.
4629         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
4630         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
4631         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
4633 2009-04-01  Robert Millan  <rmh@aybabtu.com>
4635         Reapply fix from 2008-07-28 which was accidentally reverted; also
4636         perform the same fix to a similar check in same function.
4638         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4639         with the same number are found, just use issue a warning with
4640         grub_dprintf(), as this error has been reported to be non-fatal.
4642 2009-03-31  Pavel Roskin  <proski@gnu.org>
4644         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
4645         for cross-compilation.
4647 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4649         Fix i386-ieee1275 build.
4651         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
4652         Remove declaration.
4654 2009-03-30  Pavel Roskin  <proski@gnu.org>
4656         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
4657         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
4658         zero-terminated, rely only on the strlen value.  Fix comparison
4659         of strings differing in length.
4661 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4663         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
4664         checking for abi version.  Improve error messages on BIOS to notify
4665         user about `linux16' command.
4667 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
4669         Leak fixes
4671         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
4672         in case of collision
4673         * disk/scsi.c (grub_scsi_open): free scsi in case of error
4675 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4677         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
4678         set `vid_mode' accordingly.
4679         (grub_linux_boot): Process `vid_mode' and set video mode.
4681 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4683         * util/grub.d/10_linux.in (linux_entry): New function.
4684         Factorize generation of Linux boot entries.
4686 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
4688         Make the format of Environment Block plain text. The boot loader
4689         part is not tested well yet.
4691         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
4692         (buffer): Removed.
4693         (envblk): Likewise.
4694         (usage): Remove "info" and "clear". Add "unset". Update the
4695         description of "set", as this does not delete variables any
4696         longer.
4697         (create_envblk_file): Complete rewrite.
4698         (open_envblk_file): Likewise.
4699         (cmd_info): Removed.
4700         (cmd_list): Likewise.
4701         (cmd_set): Likewise.
4702         (cmd_clear): Likewise.
4703         (list_variables): New function.
4704         (write_envblk): Likewise.
4705         (set_variables): Likewise.
4706         (unset_variables): Likewise.
4707         (main): Complete rewrite.
4709         * commands/loadenv.c (buffer): Removed.
4710         (envblk): Likewise.
4711         (open_envblk_file): New function.
4712         (read_envblk_file): Complete rewrite.
4713         (grub_cmd_load_env): Likewise.
4714         (grub_cmd_list_env): Likewise.
4715         (struct blocklist): New struct.
4716         (free_blocklists): New function.
4717         (check_blocklists): Likewise.
4718         (write_blocklists): Likewise.
4719         (grub_cmd_save_env): Complete rewrite.
4721         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
4722         a plain text signature.
4723         (GRUB_ENVBLK_MAXLEN): Removed.
4724         (struct grub_envblk): Complete rewrite.
4725         (grub_envblk_find): Removed.
4726         (grub_envblk_insert): Likewise.
4727         (grub_envblk_open): New prototype.
4728         (grub_envblk_set): Likewise.
4729         (grub_envblk_delete): Put const to VALUE.
4730         (grub_envblk_iterate): Put const to NAME and VALUE.
4731         (grub_envblk_close): New prototype.
4732         (grub_envblk_buffer): New inline function.
4733         (grub_envblk_size): Likewise.
4735         * lib/envblk.c: Include grub/mm.h.
4736         (grub_env_find): Removed.
4737         (grub_envblk_open): New function.
4738         (grub_envblk_close): Likewise.
4739         (escaped_value_len): Likewise.
4740         (find_next_line): Likewise.
4741         (grub_envblk_insert): Removed.
4742         (grub_envblk_set): New function.
4743         (grub_envblk_delete): Complete rewrite.
4744         (grub_envblk_iterate): Likewise.
4746 2009-03-28  Robert Millan  <rmh@aybabtu.com>
4748         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
4749         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
4750         variables.  Use 16-bit loader.
4751         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
4752         loader.
4753         * kern/i386/loader.S (grub_linux_boot): Rename to ...
4754         (grub_linux16_boot): ... this.  Update all users.
4755         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
4756         (grub_linux_boot): ... this.  Update all users.
4758         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
4759         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
4760         commands to `linux16' and `initrd16'.
4761         (GRUB_MOD_FINI(linux)): Rename to ...
4762         (GRUB_MOD_FINI(linux16)): ... this.
4764 2009-03-24  Pavel Roskin  <proski@gnu.org>
4766         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
4767         not just for compilation.
4769 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
4771         Move multiboot helper out of kernel
4773         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
4774         `loader/i386/multiboot_helper.S'.
4775         * conf/i386-coreboot.rmk: Likewise
4776         * conf/i386-ieee1275.rmk: Likewise
4778         * kern/i386/loader.S: Move multiboot helpers from here...
4779         * loader/i386/multiboot_helper.S: ...moved here
4780         * include/grub/i386/loader.h: Move declarations of multiboot
4781         helpers from here...
4782         * include/grub/i386/multiboot.h: ...moved here
4783         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
4785 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4787         * kern/env.c (grub_env_context_open): Added an argument to specify
4788         whether a new context inherits exported variables from current
4789         one. This is useful when making a sandbox to interpret a config
4790         file.
4791         All callers updated.
4793         * include/grub/env.h (grub_env_context_open): Updated the prototype.
4795 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4797         * kern/env.c (grub_env_context_close): Fix memory leaks.
4799 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4801         * normal/main.c (grub_normal_execute): Added an argument
4802         BATCH to specify if an interactive interface should be provided
4803         after reading a config file.
4804         All callers updated.
4805         (read_command_list): Prevent being executed twice.
4806         (read_fs_list): Likewise.
4808         * include/grub/normal.h (grub_normal_execute): Updated the
4809         prototype.
4811 2009-03-22  Pavel Roskin  <proski@gno.org>
4813         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
4814         _start.
4815         * kern/i386/pc/startup.S: Likewise.
4816         * kern/i386/efi/startup.S: Likewise.
4817         * kern/i386/ieee1275/startup.S: Likewise.
4818         * kern/i386/coreboot/startup.S: Likewise.
4819         * kern/x86_64/efi/startup.S: Likewise.
4821         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
4822         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
4823         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
4825 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
4827         Bugfixes in multiboot for bugs uncovered by solaris kernel.
4829         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
4830         limit detection.
4831         Use vaddr of correct segment for entry_point.
4833 2009-03-21  Bean  <bean123ch@gmail.com>
4835         * commands/blocklist.c: Add include file <grub/command.h>, remove
4836         <grub/normal.h> and <grub/arg.h>.
4837         (grub_cmd_blocklist): Use the new command interface.
4838         (GRUB_MOD_INIT): Likewise.
4839         (GRUB_MOD_FINI): Likewise.
4840         * commands/boot.c: Likewise.
4841         * commands/cat.c: Likewise.
4842         * commands/cmp.c: Likewise.
4843         * commands/configfile.c: Likewise.
4844         * commands/crc.c: Likewise.
4845         * commands/echo.c: Likewise.
4846         * commands/halt.c: Likewise.
4847         * commands/handler.c: Likewise.
4848         * commands/hdparm.c: Likewise.
4849         * commands/help.c: Likewise.
4850         * commands/hexdump.c: Likewise.
4851         * commands/loadenv.c: Likewise.
4852         * commands/ls.c: Likewise.
4853         * commands/lsmmap.c: Likewise.
4854         * commands/lspci.c: Likewise.
4855         * commands/loadenv.c: Likewise.
4856         * commands/read.c: Likewise.
4857         * commands/reboot.c: Likewise.
4858         * commands/search.c: Likewise.
4859         * commands/sleep.c: Likewise.
4860         * commands/test.c: Likewise.
4861         * commands/usbtest.c: Likewise.
4862         * commands/videotest.c: Likewise.
4863         * commands/i386/cpuid.c: Likewise.
4864         * commands/i386/pc/halt.c: Likewise.
4865         * commands/i386/pc/play.c: Likewise.
4866         * commands/i386/pc/pxecmd.c: Likewise.
4867         * commands/i386/pc/vbeinfo.c: Likewise.
4868         * commands/i386/pc/vbetest.c: Likewise.
4869         * commands/ieee1275/suspend.c: Likewise.
4870         * disk/loopback.c: Likewise.
4871         * font/font_cmd.c: Likewise.
4872         * hello/hello.c: Likewise.
4873         * loader/efi/appleloader.c: Likewise.
4874         * loader/efi/chainloader.c: Likewise.
4875         * loader/i386/bsd.c: Likewise.
4876         * loader/i386/efi/linux.c: Likewise.
4877         * loader/i386/ieee1275/linux.c: Likewise.
4878         * loader/i386/linux.c: Likewise.
4879         * loader/i386/pc/chainloader.c: Likewise.
4880         * loader/i386/pc/linux.c: Likewise.
4881         * loader/powerpc/ieee1275/linux.c: Likewise.
4882         * loader/multiboot_loader.c: Likewise.
4883         * term/gfxterm.c: Likewise.
4884         * term/i386/pc/serial.c: Likewise.
4885         * term/terminfo.c: Likewise.
4887         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
4888         * term/i386/pc/vga.c: Likewise.
4889         * video/readers/jpeg.c: Likewise.
4890         * video/readers/png.c: Likewise.
4891         * video/readers/tga.c: Likewise.
4893         * util/grub-fstest (cmd_loopback): Removed.
4894         (cmd_blocklist): Likewise.
4895         (cmd_ls): Likewise.
4896         (grub_register_command): Likewise.
4897         (grub_unregister_command): Likewise.
4898         (execute_command): Use grub_command_find to locate command and execute
4899         it.
4901         * include/grub/efi/chainloader.h: Removed.
4902         * loader/efi/chainloader_normal.c: Likewise.
4903         * loader/i386/bsd_normal.c: Likewise.
4904         * loader/i386/pc/chainloader_normal.c: Likewise.
4905         * loader/i386/pc/multiboot_normal.c: Likewise.
4906         * loader/linux_normal.c: Likewise.
4907         * loader/multiboot_loader_normal.c: Likewise.
4908         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4910         * gencmdlist.sh: Scan new registration command grub_register_extcmd
4911         and grub_register_command_p1.
4913         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
4914         kern/command.c, lib/arg.c and commands/extcmd.c.
4915         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
4916         (minicmd_mod_SOURCES): New variable.
4917         (minicmd_mod_CFLAGS): Likewise.
4918         (minicmd_mod_LDFLAGS): Likewise.
4919         (extcmd_mod_SOURCES): Likewise.
4920         (extcmd_mod_CFLAGS): Likewise.
4921         (extcmd_mod_LDFLAGS): Likewise.
4922         (boot_mod_SOURCES): Removed.
4923         (boot_mod_CFLAGS): Likewise.
4924         (boot_mod_LDFLAGS): Likewise.
4926         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
4927         kern/corecmd.c.
4928         (kernel_img_HEADERS): Add command.h.
4929         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
4930         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
4931         and lib/arg.c.
4932         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
4933         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
4934         remove the corresponding normal mode command.
4935         (normal_mod_SOURCES): Remove normal/arg.c.
4936         * conf/i386-coreboot.rmk: Likewise.
4937         * conf/i386-efi.rmk: Likewise.
4938         * conf/i386-ieee1275.rmk: Likewise.
4939         * conf/powerpc-ieee1275.rmk: Likewise.
4940         * conf/x86_64-efi.rmk: Likewise.
4942         * include/grub/arg.h: Move from here ...
4943         * include/grub/lib/arg.h: ... to here.
4945         * normal/arg.c: Move from here ...
4946         * lib/arg.c: ... to here.
4948         * commands/extcmd.c: New file.
4949         * commands/minicmd.c: Likewise.
4950         * include/grub/command.h: Likewise.
4951         * include/grub/extcmd.h: Likewise.
4952         * kern/command.c: Likewise.
4953         * kern/corecmd.c: Likewise.
4955         * kern/list.c (grub_list_iterate): Return int instead of void.
4956         (grub_list_insert): New function.
4957         (grub_prio_list_insert): Likewise.
4959         * kern/rescue.c (grub_rescue_command): Removed.
4960         (grub_rescue_command_list): Likewise.
4961         (grub_rescue_register_command): Likewise.
4962         (grub_rescue_unregister_command): Likewise.
4963         (grub_rescue_cmd_boot): Move to minicmd.c
4964         (grub_rescue_cmd_help): Likewise.
4965         (grub_rescue_cmd_info): Likewise.
4966         (grub_rescue_cmd_boot): Likewise.
4967         (grub_rescue_cmd_testload): Likewise.
4968         (grub_rescue_cmd_dump): Likewise.
4969         (grub_rescue_cmd_rmmod): Likewise.
4970         (grub_rescue_cmd_lsmod): Likewise.
4971         (grub_rescue_cmd_exit): Likewise.
4972         (grub_rescue_print_devices): Moved to corecmd.c.
4973         (grub_rescue_print_files): Likewise.
4974         (grub_rescue_cmd_ls): Likewise.
4975         (grub_rescue_cmd_insmod): Likewise.
4976         (grub_rescue_cmd_set): Likewise.
4977         (grub_rescue_cmd_unset): Likewise.
4978         (attempt_normal_mode): Use grub_command_find to get normal module.
4979         (grub_enter_rescue_mode): Use grub_register_core_commands to register
4980         commands, remove grub_rescue_register_command calls.
4982         * normal/command.c (grub_register_command): Removed.
4983         (grub_unregister_command): Likewise.
4984         (grub_command_find): Likewise.
4985         (grub_iterate_commands): Likewise.
4986         (rescue_command): Likewise.
4987         (export_command): Moved to corecmd.c.
4988         (set_command): Removed.
4989         (unset_command): Likewise.
4990         (insmod_command): Likewise.
4991         (rmmod_command): Likewise.
4992         (lsmod_command): Likewise.
4993         (grub_command_init): Likewise.
4995         * normal/completion.c (iterate_command): Use cmd->prio to check for
4996         active command.
4997         (complete_arguments): Use grub_extcmd_t structure to find options.
4998         (grub_normal_do_completion): Change function grub_iterate_commands to
4999         grub_command_iterate.
5001         * normal/execute.c (grub_script_execute_cmd): No need to parse
5002         argument here.
5004         * normal/main.c (grub_dyncmd_dispatcher): New function.
5005         (read_command_list): Register unload commands as dyncmd.
5006         (grub_cmd_normal): Use new command interface, register rescue,
5007         unregister normal at entry, register normal, unregister rescue at exit.
5009         * include/grub/list.h (grub_list_test_t): New type.
5010         (grub_list_iterate): Return int instead of void.
5011         (grub_list_insert): New function.
5012         (GRUB_AS_NAMED_LIST_P): New macro.
5013         (GRUB_AS_PRIO_LIST): Likewise.
5014         (GRUB_AS_PRIO_LIST_P): Likewise.
5015         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
5016         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
5017         (grub_prio_list): New structure.
5018         (grub_prio_list_insert): New function.
5019         (grub_prio_list_remove): New inline function.
5021         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
5022         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
5023         (GRUB_COMMAND_FLAG_MENU): Likewise.
5024         (GRUB_COMMAND_FLAG_BOTH): Likewise.
5025         (GRUB_COMMAND_FLAG_TITLE): Likewise.
5026         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
5027         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
5028         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
5029         (grub_command): Likewise.
5030         (grub_register_command): Likewise.
5031         (grub_command_find): Likewise.
5032         (grub_iterate_commands): Likewise.
5033         (grub_command_init): Likewise.
5034         (grub_arg_parse): Likewise.
5035         (grub_arg_show_help): Likewise.
5037         * include/grub/rescue.h (grub_rescue_register_command): Removed.
5038         (grub_rescue_unregister_command): Likewise.
5040         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
5041         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
5042         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
5044         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
5045         grub_rescue_cmd_initrd.
5046         * include/grub/i386/loader.h: Likewise.
5047         * include/grub/x86_64/loader.h: Likewise.
5049         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
5051 2009-03-21  Bean  <bean123ch@gmail.com>
5053         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
5054         instead of stat in mingw environment.
5056         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
5058         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
5060         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
5061         AC_CONFIG_LINKS.
5063 2009-03-21  Bean  <bean123ch@gmail.com>
5065         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
5066         out of range error.
5068 2009-03-18  Michel Dänzer  <michel@daenzer.net>
5070         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
5071         checking inode flags for EXT4_EXTENTS_FLAG.
5073 2009-03-18  Robert Millan  <rmh@aybabtu.com>
5075         * loader/i386/linux.c: Include `<grub/video.h>' and
5076         `<grub/i386/pc/vbe.h>'..
5077         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
5078         (grub_linux32_boot): Attempt to configure video settings with
5079         grub_linux_setup_video().
5080         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
5081         to avoid grub_console_fini() which would step out of graphical mode
5082         unconditionally.
5084 2009-03-14  Robert Millan  <rmh@aybabtu.com>
5086         Fix build on powerpc.
5087         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
5089 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
5091         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
5092         background image command.
5094 2009-03-12  Colin D Bennett  <colin@gibibit.com>
5096         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
5097         (grub_gfxterm_putchar): Extract pairs of identical calls to
5098         draw_cursor out of conditional blocks.
5100 2009-03-11  Pavel Roskin  <proski@gnu.org>
5102         * fs/hfs.c (grub_hfs_strncasecmp): New function.
5103         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
5105 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5107         * loader/i386/multiboot_elfxx.c
5108         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
5110 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
5112         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
5113         `kern/handler.c'.
5115 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5117         * loader/i386/multiboot.c (code_size): New variable.
5118         (grub_multiboot): Define offsets by adding to `code_size' rather
5119         than subtracting from `grub_multiboot_payload_size'.  Provide
5120         4-byte alignment to MBI and others by increasing
5121         `boot_loader_name_length' appropriately.
5123         * loader/i386/multiboot_elfxx.c
5124         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
5126 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
5128         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
5129         `fs/ext2.c'.
5131 2009-03-08  Robert Millan  <rmh@aybabtu.com>
5133         Make loader/i386/linux.c usable on i386-pc again.
5135         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
5136         memory to heap.
5137         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
5138         `#error' stanza.
5140 2009-03-07  Bean  <bean123ch@gmail.com>
5142         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
5143         allocation.
5145 2009-03-06  Robert Millan  <rmh@aybabtu.com>
5147         Fix display issue on terminals with screen size other than 80x25
5148         (e.g. gfxterm with resolution higher than 640x480).
5150         * normal/main.c (grub_normal_init_page): Display title text in a
5151         position relative to the center of the terminal instead of relying
5152         on a hardcoded offset.
5154 2009-03-04  Robert Millan  <rmh@aybabtu.com>
5156         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
5157         installed.
5159         * Makefile.in (host_kernel): New variable.
5160         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
5161         scripts instead of just the windows one.
5162         * configure.ac: Initialize and AC_SUBST `host_kernel'.
5164 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5166         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
5167         `kern/handler.c'.
5168         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5169         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5170         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5171         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5172         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5173         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5175 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5177         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
5178         or if there's no space for the disk label and print the partition number on a
5179         invalid magic.
5181 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5183         * util/misc.c: Include <time.h>.
5184         (grub_millisleep): New function.
5186 2009-03-04  Bean  <bean123ch@gmail.com>
5188         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
5189         another option -mno-red-zone.
5191         * commands/handler.c: Change module description.
5193         * kern/handler.c: Add missing space at the end of description line.
5195         * kern/list.c: Likewise.
5197 2009-03-03  Robert Millan  <rmh@aybabtu.com>
5199         Move more components to the relocation area, and fix mbi pointer
5200         handling to use the destination rather than the origin (thanks to
5201         Vladimir Serbinenko for spotting).
5203         * loader/i386/multiboot.c (mbi_dest): New variable.
5204         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
5205         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
5206         relocation area.
5208 2009-03-01  Bean  <bean123ch@gmail.com>
5210         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
5211         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
5212         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
5213         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
5215         * loader/i386/efi/linux.c (acpi_guid): New variable.
5216         (acpi_guid): Likewise.
5217         (EBDA_SEG_ADDR): New constant.
5218         (LOW_MEM_ADDR): Likewise.
5219         (FAKE_EBDA_SEG): Likewise.
5220         (fake_bios_data): New function.
5221         (grub_linux_boot): Call fake_bios_data.
5223 2009-03-01  Bean  <bean123ch@gmail.com>
5225         * commands/terminal.c: Removed.
5227         * commands/handler.c: New file.
5229         * include/grub/list.h: Likewise.
5231         * include/grub/handler.h: Likewise.
5233         * kern/list.c: Likewise.
5235         * kern/handler.c: Likewise.
5237         * kern/term.h: Include header file <grub/handler.h>.
5238         (grub_term_input): Move next field to the beginning.
5239         (grub_term_output): Likewise.
5240         (grub_term_input_class): New variable.
5241         (grub_term_output_class): Likewise.
5242         (grub_term_register_input): Changed to inline function.
5243         (grub_term_register_output): Likewise.
5244         (grub_term_unregister_input): Likewise.
5245         (grub_term_unregister_output): Likewise.
5246         (grub_term_set_current_input): Likewise.
5247         (grub_term_set_current_output): Likewise.
5248         (grub_term_get_current_input): Likewise.
5249         (grub_term_get_current_output): Likewise.
5250         (grub_term_iterate_input): Removed.
5251         (grub_term_iterate_output): Likewise.
5253         * kern/term.c (grub_term_list_input): Removed.
5254         (grub_term_list_output): Likewise.
5255         (grub_term_input_class): New variable.
5256         (grub_term_output_class): Likewise.
5257         (grub_cur_term_input): Change variable as macro.
5258         (grub_cur_term_output): Likewise.
5259         (grub_term_register_input): Removed.
5260         (grub_term_register_output): Likewise.
5261         (grub_term_unregister_input): Likewise.
5262         (grub_term_unregister_output): Likewise.
5263         (grub_term_set_current_input): Likewise.
5264         (grub_term_set_current_output): Likewise.
5265         (grub_term_iterate_input): Likewise.
5266         (grub_term_iterate_output): Likewise.
5267         (grub_term_get_current_input): Likewise.
5268         (grub_term_get_current_output): Likewise.
5270         * util/grub-editenv.c: Include header file <grub/handler.h>.
5271         (grub_term_get_current_input): Removed.
5272         (grub_term_get_current_output): Likewise.
5273         (grub_term_input_class): New variable.
5274         (grub_term_output_class): Likewise.
5276         * util/grub-fstest.c (grub_term_get_current_input): Removed.
5277         (grub_term_get_current_output): Likewise.
5278         (grub_term_input_class): New variable.
5279         (grub_term_output_class): Likewise.
5281         * util/grub-probe.c (grub_term_get_current_input): Removed.
5282         (grub_term_get_current_output): Likewise.
5283         (grub_term_input_class): New variable.
5284         (grub_term_output_class): Likewise.
5286         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
5287         (grub_term_get_current_output): Likewise.
5288         (grub_term_input_class): New variable.
5289         (grub_term_output_class): Likewise.
5291         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
5292         (terminal_mod_SOURCES): Likewise.
5293         (terminal_mod_CFLAGS): Likewise.
5294         (terminal_mod_LDFLAGS): Likewise.
5296         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
5297         handler.c.
5298         (kernel_img_SOURCES): Add list.c and handler.c.
5299         (kernel_img_HEADERS): Add list.h and handler.h.
5301         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5302         handler.c.
5303         (kernel_mod_SOURCES): Add list.c and handler.c.
5304         (kernel_mod_HEADERS): Add list.h and handler.h.
5306         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
5307         handler.c.
5308         (kernel_elf_SOURCES): Add list.c and handler.c.
5309         (kernel_elf_HEADERS): Add list.h and handler.h.
5311         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5312         handler.c.
5313         (kernel_elf_SOURCES): Add list.c and handler.c.
5314         (kernel_elf_HEADERS): Add list.h and handler.h.
5316         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5317         handler.c.
5318         (kernel_mod_SOURCES): Add list.c and handler.c.
5319         (kernel_mod_HEADERS): Add list.h and handler.h.
5321         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5322         handler.c.
5323         (kernel_elf_SOURCES): Add list.c and handler.c.
5324         (kernel_elf_HEADERS): Add list.h and handler.h.
5326 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5328         Factorize elf32 / elf64 code in Multiboot loader.  This will
5329         prevent it from getting out of sync again.
5331         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
5332         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
5333         grub_multiboot_load_elf64): Move from here ...
5334         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
5335         grub_multiboot_load_elf): ... to here (new file).
5337 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5339         * util/grub.d/10_linux.in: Rename "single-user mode" to
5340         "recovery mode".
5342 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
5344         Don't leak in SCSI code.
5345         * disk/scsi.c (grub_scsi_close): free `scsi'.
5347 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5349         * loader/i386/pc/multiboot.c: Move from here ...
5350         * loader/i386/multiboot.c: ... to here.  Update all users.
5352 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5354         Patch from Alexandre Bique <bique.alexandre@gmail.com>
5355         * util/i386/pc/grub-setup.c (setup): Fix directory path.
5357 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
5359         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
5360         b-tree.
5362 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5364         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
5365         `0x' qualifier as 0 when base is specified as parameter).
5367 2009-02-24  Bean  <bean123ch@gmail.com>
5369         * configure.ac: Check for -mcmodel=large in x86_64 target.
5371         * include/grub/efi/api.h (efi_call_10): New macro.
5372         (efi_wrap_10): New function.
5374         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
5375         (GRUB_PE32_REL_BASED_HIGH): Likewise.
5376         (GRUB_PE32_REL_BASED_LOW): Likewise.
5377         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
5378         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
5379         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
5380         (GRUB_PE32_REL_BASED_SECTION): Likewise.
5381         (GRUB_PE32_REL_BASED_REL): Likewise.
5382         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
5383         (GRUB_PE32_REL_BASED_DIR64): Likewise.
5384         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
5386         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
5387         issue.
5389         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
5390         (efi_wrap_10): New function.
5392         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
5394         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
5395         MB/MBP model (NV chipset).
5396         (devdata_devs): Add devpath_5 to the list.
5398         * load/i386/efi/linux.c (video_base): Remove variable.
5399         (RGB_MASK): New macro.
5400         (RGB_MAGIC): Likewise.
5401         (LINE_MIN): Likewise.
5402         (LINE_MAX): Likewise.
5403         (FBTEST_STEP): Likewise.
5404         (FBTEST_COUNT): Likewise.
5405         (fb_list): New variable.
5406         (grub_find_video_card): Remove function.
5407         (find_framebuf): New function.
5408         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
5409         line length.
5411         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
5412         problem for x86_64.
5414 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
5416         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
5418         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
5419         coding tool name.
5421 2009-02-22  Robert Millan  <rmh@aybabtu.com>
5423         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
5424         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
5425         in our relocation, instead of using it directly from heap.  Also
5426         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
5428 2009-02-21  Robert Millan  <rmh@aybabtu.com>
5430         Implement USB keyboard support (based on patch by Marco Gerards)
5432         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
5433         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
5434         (usb_keyboard_mod_LDFLAGS): New variables.
5436         * term/usb_keyboard.c: New file.
5438 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
5440         Corrected wrong declaration
5442         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
5444 2009-02-14  Christian Franke  <franke@computer.org>
5446         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
5447         (grub_lspci_iter): Print class code and programming interface byte.
5449 2009-02-14  Christian Franke  <franke@computer.org>
5451         * gendistlist.sh: Ignore `.svn' directories.
5453 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
5455         * fs/fat.c: Add 2009 to Copyright line.
5457 2009-02-14  Christian Franke  <franke@computer.org>
5459         * commands/hdparm.c: New file.  Provides `hdparm' command
5460         which sends ATA commands via grub_disk_ata_pass_through ().
5462         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
5464         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
5465         and <grub/cpu/io.h> to include/grub/ata.h.
5466         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
5467         (GRUB_CDROM_SECTOR_SIZE): Remove.
5468         (GRUB_ATA_*): Move to include/grub/ata.h.
5469         (GRUB_ATAPI_*): Likewise.
5470         (enum grub_ata_commands): Likewise.
5471         (enum grub_ata_timeout_milliseconds): Likewise.
5472         (struct grub_ata_device): Likewise.
5473         (grub_ata_regset): Likewise.
5474         (grub_ata_regget): Likewise.
5475         (grub_ata_regset2): Likewise.
5476         (grub_ata_regget2): Likewise.
5477         (grub_ata_check_ready): Likewise.
5478         (grub_ata_wait_not_busy): Remove static, exported in
5479         include/grub/ata.h.
5480         (grub_ata_wait_drq): Likewise.
5481         (grub_ata_pio_read): Likewise.
5483         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
5484         function for hdparm.mod.
5486         * include/grub/ata.h: New file, contains declarations from
5487         disk/ata.c.
5488         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
5490         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
5491         (grub_disk_ata_pass_through): New exported variable.
5493         * kern/disk.c (grub_disk_ata_pass_through): New variable.
5495 2009-02-13  Colin D Bennett  <colin@gibibit.com>
5497         Support multiple fallback entries, and provide an API to support
5498         executing default+fallback menu entries.  Renamed the `terminal' menu
5499         viewer to `text'.
5501         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
5502         variable declaration.
5503         (grub_menu_execute_callback): New structure declaration.
5504         (grub_menu_execute_callback_t): New typedef.
5505         (grub_menu_execute_with_fallback): New function declaration.
5506         (grub_menu_get_entry): Likewise.
5507         (grub_menu_get_timeout): Likewise.
5508         (grub_menu_set_timeout): Likewise.
5510         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
5512         * normal/menu.c (grub_wait_after_message): Moved to
5513         `normal/menu_text.c'.
5514         (draw_border): Likewise.
5515         (print_message): Likewise.
5516         (print_entry): Likewise.
5517         (print_entries): Likewise.
5518         (grub_menu_init_page): Likewise.
5519         (get_entry_number): Likewise.
5520         (print_timeout): Likewise.
5521         (run_menu): Likewise.
5522         (grub_menu_execute_entry): Likewise.
5523         (show_text_menu): Likewise.
5524         (get_and_remove_first_entry_number): New function.
5525         (grub_menu_execute_with_fallback): Likewise.
5526         (get_entry): Renamed to ...
5527         (grub_menu_get_entry): .. this and made it global.
5528         (get_timeout): Renamed to ...
5529         (grub_menu_get_timeout): ... this and made it global.
5530         (set_timeout): Renamed to ...
5531         (grub_menu_set_timeout): ... this and made it global.
5532         (grub_normal_terminal_menu_viewer): Renamed to ...
5533         (grub_normal_text_menu_viewer): ... this.
5535         * normal/menu_text.c: New file.  Extracted text-menu-specific code
5536         from normal/menu.c.
5538         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
5539         (normal_mod_SOURCES): Likewise.
5541         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5542         (normal_mod_SOURCES): Likewise.
5544         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5545         (normal_mod_SOURCES): Likewise.
5547         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
5548         (normal_mod_SOURCES): Likewise.
5550         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5551         (normal_mod_SOURCES): Likewise.
5553         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5554         (normal_mod_SOURCES): Likewise.
5556         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5557         (normal_mod_SOURCES): Likewise.
5559 2009-02-11  Robert Millan  <rmh@aybabtu.com>
5561         * util/grub.d/00_header.in: Update old reference to `font' command.
5563 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
5565         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
5567         Based on patch from Javier Martín.
5569 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5571         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
5572         to avoid false positives with FAT.
5573         (grub_fstest_SOURCES): Likewise.
5574         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5575         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5576         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5577         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5578         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5579         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5581 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5583         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
5584         bpb.version_specific.fat12_or_fat16.fstype and
5585         bpb.version_specific.fat32.fstype.
5587 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5589         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
5591 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5593         * Makefile.in (host_os, host_cpu): New variables.
5594         (target_os): Remove.  Update all users.
5596 2009-02-08  Marco Gerards  <marco@gnu.org>
5598         * Makefile.in (enable_grub_emu_usb): New variable.
5599         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
5600         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
5601         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
5602         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
5603         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
5604         `usbtest.mod' and `usbms.mod'.
5605         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
5606         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
5607         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
5608         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
5609         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
5610         variables.
5612         * disk/usbms.c: New file.
5614         * include/grub/usb.h: Likewise.
5616         * include/grub/usbtrans.h: Likewise.
5618         * include/grub/usbdesc.h: Likewise.
5620         * bus/usb/usbtrans.c: Likewise.
5622         * bus/usb/ohci.c: Likewise.
5624         * bus/usb/uhci.c: Likewise.
5626         * bus/usb/usbhub.c: Likewise.
5628         * bus/usb/usb.c: Likewise.
5630         * commands/usbtest.c: Likewise.
5632         * util/usb.c: Likewise.
5634         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
5636         * configure.ac: Test for libusb presence.
5638         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
5640 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
5642         * kern/mm.c: Add more comments.
5644 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5646         Patch from Javier Martín.
5647         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
5648         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
5650 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5652         * fs/cpio.c: Split tar functionality to ...
5653         * fs/tar.c: ... here (new file).  Update all users.
5655 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5657         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
5658         backward-incompatible features.
5660         Based on patch from Javier Martín, with some adjustments.
5662 2009-02-07  Michael Scherer  <misc@mandriva.org>
5664         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
5666 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5668         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
5669         position of `disk/lvm.c' to ensure grub_init_all() always picks it
5670         after the RAID stuff.
5672 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
5674         Fixes problem when running vbetest command as reported by
5675         Vladimir Serbinenko <phcoder@gmail.com>.
5677         * (grub_vbe_set_video_mode): Fixed problem with text modes.
5679 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
5681         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
5682         /dev/md/NpN style mdraid devices.
5684 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5686         * util/unifont2pff.rb: Remove.
5688 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5690         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
5691         `#'.
5693 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5695         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
5696         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5697         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5698         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5699         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5700         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5701         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5703 2009-02-02  Christian Franke  <franke@computer.org>
5705         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
5707 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
5709         * INSTALL: Note that we now require at least autoconf 2.59 and
5710         that LZO is optional.
5712 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5714         Base on patch on bug #24154 created by Tomas Tintera
5715         <trosos@seznam.cz>.
5717         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
5719 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5721         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
5722         <bero@arklinux.org>.
5724         * normal/parser.y (script_init): Add missing semicolon.
5726 2009-01-31  Colin D Bennett  <colin@gibibit.com>
5728         * normal/main.c: Add include to grub/menu_viewer.h.
5729         (free_menu_entry_classes): Added.
5730         (grub_normal_menu_addentry): Added class property handling.
5731         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
5732         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
5734         * normal/menu_viewer.c: New file.
5736         * normal/menu.c (run_menu_entry): Renamed to ...
5737         (grub_menu_execute_entry): ... this and made it as global.
5738         (grub_menu_run): Renamed to ...
5739         (show_text_menu): ... this and made it local.
5740         (show_text_menu): Adapt to new function names.
5741         (grub_normal_terminal_menu_viewer): New global variable.
5743         * include/grub/menu.h: New file.
5745         * include/grub/menu_viewer.h: New file.
5747         * include/grub/normal.h: Added include to grub/menu.h.
5748         (grub_menu_entry): Moved to include/grub/menu.h.
5749         (grub_menu_entry_t): Likewise.
5750         (grub_menu): Likewise.
5751         (grub_menu_t): Likewise.
5752         (grub_normal_terminal_menu_viewer): Added.
5753         (grub_menu_execute_entry): Likewise.
5754         (grub_menu_run): Removed.
5756         * DISTLIST: Added include/grub/menu.h.
5757         Added include/grub/menu_viewer.h.
5758         Added normal/menu_viewer.c.
5760 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
5762         * normal/execute.c (grub_script_execute_menuentry): Changed to use
5763         arglist for menutitle arguments.
5765         * normal/main.c (grub_normal_menu_addentry): Likewise.
5767         * normal/parser.y (menuentry): Likewise.
5769         * normal/script.c (grub_script_create_cmdmenu): Likewise.
5771         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
5772         (grub_script_create_cmdmenu): Likewise.
5774         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
5776         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
5777         changes.
5779         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
5781         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
5783         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
5785         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5787         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5789         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5791 2009-01-30  Christian Franke  <franke@computer.org>
5793         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
5794         in option help text.
5796 2009-01-27  Pavel Roskin  <proski@gnu.org>
5798         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
5800 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5802         * commands/lsmmap.c: Add include to grub/machine/memory.h.
5804         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
5806         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
5807         unregister function.
5809 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5811         * disk/scsi.c (grub_scsi_read): Fix sign problem.
5813         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
5815         * util/grub-mkfont.c (usage): Fix typo.
5817         * util/elf/grub-mkimage.c (load_modules): Fix warning.
5819 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
5821         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
5823         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
5825         * kern/misc.c (grub_strcasecmp): New function.
5826         (grub_strcasecmp): Use grub_size_t instead of int for length.
5827         Fix return value.
5828         * include/grub/misc.h: Update function prototypes.
5830 2009-01-26  Robert Millan  <rmh@aybabtu.com>
5832         * configure.ac: Fix cross-compilation check.
5834 2009-01-22  Christian Franke  <franke@computer.org>
5836         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
5837         (precision) digit string.  Allow `.format2' without `format1' (width).
5838         Limit input chars for `%s' output to `format2' if specified.  This is
5839         compatible with standard printf ().
5841 2009-01-22  Christian Franke  <franke@computer.org>
5843         * disk/ata.c (grub_ata_wait_status): Replace by ...
5844         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
5845         other status bits may be invalid while BSY is asserted.
5846         (grub_ata_check_ready): New function.
5847         (grub_ata_cmd): Removed.
5848         (grub_ata_wait_drq): New function.
5849         (grub_ata_strncpy): Remove inline.
5850         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
5851         and error check now done by grub_ata_wait_drq ().
5852         (grub_ata_pio_write): Likewise.
5853         (grub_atapi_identify): Set DEV before check for !BSY.  Use
5854         grub_ata_wait_drq () to wait for data.
5855         (grub_ata_device_initialize): Add status register check to
5856         detect missing SATA slave devices.  Add debug messages.
5857         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
5858         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
5859         transfer loop by grub_ata_pio_write ().
5860         (grub_ata_identify): Set DEV before check for !BSY. Use
5861         grub_ata_wait_drq () to wait for data.
5862         (grub_ata_setaddress): Set DEV before check for !BSY.
5863         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
5864         read/write in one loop.  Fix invalid command on write.  Fix incomplete
5865         command on (size % batch) == 0.  Add missing error check after write of
5866         last block.  Add debug messages.
5867         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
5869 2009-01-19  Christian Franke  <franke@computer.org>
5871         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
5872         (GRUB_ATAPI_IREASON_*): Likewise.
5873         (grub_ata_pio_write): Fix timeout error return.
5874         (grub_atapi_identify): Add grub_ata_wait () after cmd.
5875         (grub_atapi_wait_drq): New function.
5876         (grub_atapi_packet): New parameter `size'.
5877         Use grub_atapi_wait_drq () and direct write instead of
5878         grub_ata_pio_write ().
5879         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
5880         reads the number of bytes requested by the device for each DRQ
5881         assertion.
5882         (grub_atapi_write): Remove old implementation, return not
5883         implemented instead.
5885 2009-01-19  Christian Franke  <franke@computer.org>
5887         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
5888         of 512 to calculate data size.
5889         (grub_scsi_read12): Likewise.
5890         (grub_scsi_write10): Likewise.
5891         (grub_scsi_write12): Likewise.
5892         (grub_scsi_read): Adjust size according to blocksize.
5893         Add checks for invalid blocksize and unaligned transfer.
5895 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
5897         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
5899         * term/gfxterm.c (write_char): Fix background rendering for wide
5900         width glyphs.
5902 2009-01-19  Robert Millan  <rmh@aybabtu.com>
5904         * config.guess: Update to latest version from config git.
5905         * config.sub: Likewise.
5907 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
5909         * Makefile.in: Change font compilation to use new grub-mkfont instead
5910         of java version.
5912         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
5913         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5914         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5915         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5916         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5917         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5918         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5919         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5920         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5922 2009-01-16  Christian Franke  <franke@computer.org>
5924         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
5925         (enum grub_ata_timeout_milliseconds): New enum.
5926         (grub_ata_wait_status): Add parameter milliseconds.
5927         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
5928         recovery from timed-out commands.
5929         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
5930         return grub_errno instead of REG_ERROR.
5931         (grub_ata_pio_write): Add parameter milliseconds.
5932         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
5933         Pass milliseconds to grub_ata_wait_status () and
5934         grub_ata_pio_read ().
5935         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
5936         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
5937         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
5938         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
5939         It is not suitable for device detection, because DEV bit is ignored,
5940         the command may run too long, and not all devices set the signature
5941         properly.
5942         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
5943         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
5944         Fix device selection, DEV bit must be set first to address the registers
5945         of the correct device.
5946         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
5947         grub_ata_pio_read/write ().
5948         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
5949         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
5951 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
5953         * util/grub-editenv.c (main): Use fseeko(), not fseek().
5955 2009-01-13  Bean  <bean123ch@gmail.com>
5957         * util/grub-mkfont.c (write_font): forget to remove some debug code.
5959 2009-01-13  Bean  <bean123ch@gmail.com>
5961         * Makefile.in: (enable_grub_mkfont): New variable.
5962         (freetype_cflags): Likewise.
5963         (freetype_libs): Likewise.
5965         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
5966         (grub_mkfont_SOURCES): New variable.
5967         (grub_mkfont_CFLAGS): Likewise.
5968         (grub_mkfont_LDFLAGS): Likewise.
5970         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
5971         library if `--enable-grub-mkfont' is requested.
5972         (enable_grub_mkfont): New variable.
5973         (freetype_cflags): Likewise.
5974         (freetype_libs): Likewise.
5976         * util/grub-mkfont.c: New file.
5978 2009-01-12  Christian Franke  <franke@computer.org>
5980         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
5981         mode check.  Fix setting of compat_use[].
5983 2009-01-10  Robert Millan  <rmh@aybabtu.com>
5985         Update a few copyright years which we forgot to do in 2008 (only for
5986         files whose changes made in 2008 were copyright-significant)
5988         * Makefile.in: Add 2008 to Copyright line.
5989         * disk/ieee1275/ofdisk.c: Likewise.
5990         * disk/efi/efidisk.c: Likewise.
5991         * kern/dl.c: Likewise.
5992         * kern/sparc64/ieee1275/init.c: Likewise.
5993         * kern/mm.c: Likewise.
5994         * kern/efi/mm.c: Likewise.
5995         * boot/i386/pc/boot.S: Likewise.
5996         * genfslist.sh: Likewise.
5997         * fs/iso9660.c: Likewise.
5998         * fs/hfs.c: Likewise.
5999         * fs/jfs.c: Likewise.
6000         * fs/minix.c: Likewise.
6001         * fs/ufs.c: Likewise.
6002         * gensymlist.sh.in: Likewise.
6003         * genkernsyms.sh.in: Likewise.
6004         * include/grub/misc.h: Likewise.
6005         * include/grub/types.h: Likewise.
6006         * include/grub/symbol.h: Likewise.
6007         * include/grub/elf.h: Likewise.
6008         * include/grub/kernel.h: Likewise.
6009         * include/grub/disk.h: Likewise.
6010         * include/grub/dl.h: Likewise.
6011         * include/grub/i386/linux.h: Likewise.
6012         * include/grub/i386/pc/biosdisk.h: Likewise.
6013         * include/grub/efi/api.h: Likewise.
6014         * include/grub/efi/pe32.h: Likewise.
6015         * include/grub/util/misc.h: Likewise.
6016         * normal/execute.c: Likewise.
6017         * normal/arg.c: Likewise.
6018         * normal/completion.c: Likewise.
6019         * normal/lexer.c: Likewise.
6020         * normal/parser.y: Likewise.
6021         * normal/misc.c: Likewise.
6022         * commands/i386/pc/vbeinfo.c: Likewise.
6023         * commands/hexdump.c: Likewise.
6024         * commands/terminal.c: Likewise.
6025         * commands/ls.c: Likewise.
6026         * commands/help.c: Likewise.
6027         * partmap/pc.c: Likewise.
6028         * loader/efi/chainloader.c: Likewise.
6029         * loader/multiboot_loader.c: Likewise.
6030         * loader/i386/pc/multiboot2.c: Likewise.
6031         * term/efi/console.c: Likewise.
6032         * term/i386/pc/serial.c: Likewise.
6033         * util/lvm.c: Likewise.
6034         * util/console.c: Likewise.
6035         * util/i386/efi/grub-mkimage.c: Likewise.
6036         * util/raid.c: Likewise.
6038 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
6040         * commands/videotest.c: Removed include to grub/machine/memory.h.
6042         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
6043         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
6044         (video_mod_SOURCES): Removed.
6045         (video_mod_CFLAGS): Likewise.
6046         (video_mod_LDFLAGS): Likewise.
6047         (gfxterm_mod_SOURCES): Likewise.
6048         (gfxterm_mod_CFLAGS): Likewise.
6049         (gfxterm_mod_LDFLAGS): Likewise.
6050         (videotest_mod_SOURCES): Likewise.
6051         (videotest_mod_CFLAGS): Likewise.
6052         (videotest_mod_LDFLAGS): Likewise.
6053         (bitmap_mod_SOURCES): Likewise.
6054         (bitmap_mod_CFLAGS): Likewise.
6055         (bitmap_mod_LDFLAGS): Likewise.
6056         (tga_mod_SOURCES): Likewise.
6057         (tga_mod_CFLAGS): Likewise.
6058         (tga_mod_LDFLAGS): Likewise.
6059         (jpeg_mod_SOURCES): Likewise.
6060         (jpeg_mod_CFLAGS): Likewise.
6061         (jpeg_mod_LDFLAGS): Likewise.
6062         (png_mod_SOURCES): Likewise.
6063         (png_mod_CFLAGS): Likewise.
6064         (png_mod_LDFLAGS): Likewise.
6066         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
6067         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
6068         (video_mod_SOURCES): Added.
6069         (video_mod_CFLAGS): Likewise.
6070         (video_mod_LDFLAGS): Likewise.
6071         (videotest_mod_SOURCES): Likewise.
6072         (videotest_mod_CFLAGS): Likewise.
6073         (videotest_mod_LDFLAGS): Likewise.
6074         (bitmap_mod_SOURCES): Likewise.
6075         (bitmap_mod_CFLAGS): Likewise.
6076         (bitmap_mod_LDFLAGS): Likewise.
6077         (tga_mod_SOURCES): Likewise.
6078         (tga_mod_CFLAGS): Likewise.
6079         (tga_mod_LDFLAGS): Likewise.
6080         (jpeg_mod_SOURCES): Likewise.
6081         (jpeg_mod_CFLAGS): Likewise.
6082         (jpeg_mod_LDFLAGS): Likewise.
6083         (png_mod_SOURCES): Likewise.
6084         (png_mod_CFLAGS): Likewise.
6085         (png_mod_LDFLAGS): Likewise.
6086         (gfxterm_mod_SOURCES): Likewise.
6087         (gfxterm_mod_CFLAGS): Likewise.
6088         (gfxterm_mod_LDFLAGS): Likewise.
6090         * term/gfxterm.c: Removed include to grub/machine/memory.h,
6091         grub/machine/console.h.
6093 2009-01-04  Jerone Young  <jerone@gmail.com>
6095         Make on screen instructions clearer
6097         Based on patch created by Jidanni <jidanni@jidanni.org>
6099         * normal/menu.c: print clearer instructions on the screen
6101 2009-01-02  Colin D Bennett  <colin@gibibit.com>
6103         New font engine.
6105         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
6106         build system and fixed gfxterm.c to work with different sized fonts.
6108         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
6110         * configure: Re-generated.
6112         * DISTLIST: Removed font/manager.c.
6113         Added font/font.c.
6114         Added font/font_cmd.c.
6116         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
6117         compilation.
6119         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
6121         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
6123         * kern/term.c: Changed users of grub_utf8_to_ucs4.
6125         * normal/menu.c: Likewise.
6127         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
6128         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
6130         * include/grub/font.h: Replaced with new file.
6132         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
6133         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
6134         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
6135         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
6136         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
6137         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
6138         fg_red, fg_green, fg_blue, fg_alpha.
6139         (grub_video_adapter): Removed blit_glyph.
6140         (grub_video_blit_glyph): Removed.
6142         * font/manager.c: Removed file.
6144         * font/font.c: New file.
6146         * font/font_cmd.c: Likewise.
6148         * video/video.c (grub_video_blit_glyph): Removed.
6150         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
6151         (grub_video_vbe_map_rgba): Likewise.
6152         (grub_video_vbe_unmap_color_int): Likewise.
6153         (grub_video_vbe_blit_glyph): Removed.
6154         (grub_video_vbe_adapter): Removed blit_glyph.
6156         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
6157         (get_pixel): Likewise.
6158         (set_pixel): Likewise.
6160         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
6162         * term/gfxterm.c: Adapted to new font engine.
6164         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
6166         * term/i386/pc/vga.c: Likewise.
6168         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
6170         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6172         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6174         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6176         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6178         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6180         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6182         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6184         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6186         * util/grub.d/00_header.in: Changed to use new loadfont command.
6188         * util/grub-mkconfig_lib.in: Changed font extension.
6190 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
6192         * util/getroot.c (grub_util_get_grub_dev): Add support for
6193         /dev/md/dNNpNN style partitionable mdraid devices.
6195 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
6197         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
6198         at a time limit of the PXE TFTP API correctly.
6199         (grub_pxefs_close): Likewise.
6201 2008-11-29  Robert Millan  <rmh@aybabtu.com>
6203         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
6204         grub_ata_device_initialize() calls.
6206 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
6208         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
6209         iteration failed.
6210         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
6212 2008-11-28  Robert Millan  <rmh@aybabtu.com>
6214         Fix build on powerpc-ieee1275.  Based on patch created by
6215         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
6216         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6217         `kern/ieee1275/mmap.c'.
6218         * include/grub/powerpc/ieee1275/memory.h: New file.
6220         Provide grub-install on coreboot.
6221         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
6222         (grub_install_SOURCES): New variable.
6223         * util/i386/pc/grub-install.in: Add a few condition checks to make it
6224         usable on coreboot.
6226 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
6228         * util/grub-fstest.c (grub_term_get_current_input): Change return type
6229         to `grub_term_input_t'.
6230         (grub_term_get_current_output): Change return type to
6231         `grub_term_output_t'.
6233 2008-11-22  Robert Millan  <rmh@aybabtu.com>
6235         Fix breakage on coreboot due to declaration mismatch.
6236         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
6237         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
6238         grub_vga_text_cls().
6240         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
6241         comments.  Avoid copying one more byte than necessary (just in case).
6243         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
6244         to 0x200000 (avoids trouble with some OFW implementations, and matches
6245         with the one in Yaboot).
6246         Reported by Manoel Abranches
6248 2008-11-20  Robert Millan  <rmh@aybabtu.com>
6250         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
6251         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
6253         * util/grub-mkconfig_lib.in (grub_warn): New function.
6254         (convert_system_path_to_grub_path): Use grub_warn() when issuing
6255         warnings, to obtain consistent formatting.
6256         * util/grub.d/00_header.in: Likewise.
6257         * util/update-grub_lib.in: Likewise.
6259         * loader/i386/linux.c (allocate_pages): Fix a warning.
6260         Move comment text to `#error' stanza.
6262         Harmonize ieee1275's grub_available_iterate() with the generic
6263         grub_machine_mmap_iterate() interface (fixes a recently-introduced
6264         build problem on i386-ieee1275):
6265         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
6266         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
6267         parameter `type'.  Update all users of this function.
6268         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6269         `kern/ieee1275/mmap.c'.
6270         * kern/ieee1275/init.c
6271         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
6272         with ...
6273         (grub_machine_mmap_iterate): ... this.
6274         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
6275         return type to `grub_err_t'.  Update all implementations of this
6276         function prototype.
6277         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
6278         Likewise.
6280         Add `lsmmap' command (lists firmware-provided memory map):
6281         * commands/lsmmap.c: New file.
6282         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
6283         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
6284         variables.
6285         * conf/powerpc-ieee1275.rmk: Likewise.
6286         * conf/i386-coreboot.rmk: Likewise.
6287         * conf/i386-ieee1275.rmk: Likewise.
6289 2008-11-19  Robert Millan  <rmh@aybabtu.com>
6291         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
6292         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
6293         constraints to initrd allocation (based on code from
6294         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
6295         for Linux to find it.
6297 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6299         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
6300         order to cope with duplicate slashes.
6302 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6304         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
6305         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
6306         don't want to mess with lower memory, because it is used in the Linux
6307         loader.
6309         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
6310         an appropriate place in lower memory, between 0x10000 and 0x90000,
6311         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
6312         is in our heap (probably as a result of it being corrupted during
6313         decompression).  Add #error instance with comment to explain why this
6314         loader isn't currently usable on PC/BIOS.
6316 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6318         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
6319         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
6321 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6323         Make loader/i386/linux.c buildable on i386-pc (although disabled).
6325         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
6326         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
6327         from here ...
6328         * include/grub/i386/pc/memory.h: ... to here.
6330 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6332         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
6333         split).
6335         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
6336         (grub_console_cur_color, grub_console_real_putchar)
6337         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6338         (grub_console_setcolorstate, grub_console_setcolor)
6339         (grub_console_getcolor): Move from here ...
6340         * include/grub/i386/vga_common.h: ... to here (new file).
6342         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
6343         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
6344         `<grub/i386/io.h>'.
6345         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
6346         `<grub/i386/vga_common.h>'.
6348 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6350         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
6351         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
6352         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
6353         variables.
6354         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6355         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
6357         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
6358         grub_console_init() with call to grub_vga_text_init().
6359         (grub_machine_fini): Replace call to
6360         grub_console_fini() with call to grub_vga_text_fini() and
6361         grub_at_keyboard_fini().
6363         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
6364         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6365         (grub_console_setcolorstate, grub_console_setcolor)
6366         (grub_console_getcolor): New function prototypes.
6368         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
6369         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
6370         (grub_vga_text_setcursor): Static-ize.
6371         (grub_vga_text_term): New structure.
6372         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
6374         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
6375         (grub_console_cur_color, grub_console_standard_color)
6376         (grub_console_normal_color, grub_console_highlight_color)
6377         (map_char, grub_console_putchar, grub_console_getcharwidth)
6378         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
6379         (grub_console_getcolor): Move from here ...
6380         * term/i386/vga_common.c: ... to here (same function names).
6382 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6384         Use newly-added Multiboot support in coreboot.
6386         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6387         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
6389         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
6390         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
6391         (codestart): Store the MBI in `startup_multiboot_info' when we're
6392         being loaded using Multiboot.
6394         * kern/i386/coreboot/init.c (grub_machine_init): Move
6395         grub_at_keyboard_init() call to beginning of function (useful for
6396         debugging).  Call grub_machine_mmap_init() before attempting to use
6397         grub_machine_mmap_iterate().
6398         (grub_lower_mem, grub_upper_mem): Move from here ...
6399         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
6400         here (new file).
6402         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
6403         function prototype.
6405 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6407         Fix a regression introduced by the at_keyboard.mod split.  Because
6408         some terminals are default on some platforms and non-default on
6409         others, the first terminal being registered determines which is
6410         going to be default.
6412         * kern/term.c (grub_term_register_input): If this is the first
6413         terminal being registered, set it as the current one.
6414         (grub_term_register_output): Likewise.
6416         * term/efi/console.c (grub_console_init): Do not call
6417         grub_term_set_current_output() or grub_term_set_current_input().
6418         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
6419         * term/i386/pc/console.c (grub_console_init): Likewise.
6420         (grub_console_fini): Do not call grub_term_set_current_input()
6421         (but leave grub_term_set_current_output() to restore text mode).
6423 2008-11-10  Robert Millan  <rmh@aybabtu.com>
6425         * util/grub.d/00_header.in: Add backward compatibility check for
6426         versions of terminal.mod that don't understand `terminal_input' or
6427         `terminal_output'.
6429 2008-11-09  Robert Millan  <rmh@aybabtu.com>
6431         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
6432         `terminal_input' / `terminal_output', not `terminal'.
6434 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6436         * Makefile.in (include_DATA): Fix srcdir=. assumption.
6437         (DISTCLEANFILES): Add `build_env.mk'.
6439 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6441         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
6442         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
6443         members.  Update all users.
6444         * util/console.c (grub_ncurses_term): Split in ...
6445         (grub_ncurses_term_input): ... this, and ...
6446         (grub_ncurses_term_output): ... this.  Update all users.
6447         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
6449 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6451         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
6452         (PKGDATA): Add $(pkgdata_SRCDIR).
6453         (pkglib_BUILDDIR): New variable.
6454         (pkgdata_SRCDIR): New variable.
6455         (build_env.mk): New target.
6456         (include_DATA): New variable.
6457         (install-local): Install $(include_DATA) files in $(includedir).
6459 2008-11-07  Pavel Roskin  <proski@gnu.org>
6461         * gendistlist.sh: Use C locale for sorting to ensure consistent
6462         output on all systems.
6464         * util/grub.d/00_header.in: Remove incorrect space before
6465         "serial".
6467 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6469         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
6470         per specification.
6471         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
6472         * loader/multiboot_loader.c (find_multi_boot2_header): New function
6473         (based on find_multi_boot1_header).
6474         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
6475         using find_multi_boot2_header(), and abort if neither Multiboot or
6476         Multiboot headers were found.
6478 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6480         Modularize at_keyboard.mod:
6482         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
6483         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
6484         (at_keyboard_mod_LDFLAGS): New variables.
6486         Actual terminal split:
6488         * include/grub/term.h (struct grub_term): Split in ...
6489         (struct grub_term_input): ... this, and ...
6490         (struct grub_term_output): ... this.  Update all users.
6491         (grub_term_set_current): Split in ...
6492         (grub_term_set_current_input): ... this, and ...
6493         (grub_term_set_current_output): ... this.
6494         (grub_term_get_current): Split in ...
6495         (grub_term_get_current_input): ... this, and ...
6496         (grub_term_get_current_output): ... this.
6497         (grub_term_register): Split in ...
6498         (grub_term_register_input): ... this, and ...
6499         (grub_term_register_output): ... this.
6500         (grub_term_unregister): Split in ...
6501         (grub_term_unregister_input): ... this, and ...
6502         (grub_term_unregister_output): ... this.
6503         (grub_term_iterate): Split in ...
6504         (grub_term_iterate_input): ... this, and ...
6505         (grub_term_iterate_output): ... this.
6507         * kern/term.c (grub_term_list): Split in ...
6508         (grub_term_list_input): ... this, and ...
6509         (grub_term_list_output): ... this.  Update all users.
6510         (grub_cur_term): Split in ...
6511         (grub_cur_term_input): ... this, and ...
6512         (grub_cur_term_output): ... this.  Update all users.
6513         (grub_term_set_current): Split in ...
6514         (grub_term_set_current_input): ... this, and ...
6515         (grub_term_set_current_output): ... this.
6516         (grub_term_get_current): Split in ...
6517         (grub_term_get_current_input): ... this, and ...
6518         (grub_term_get_current_output): ... this.
6519         (grub_term_register): Split in ...
6520         (grub_term_register_input): ... this, and ...
6521         (grub_term_register_output): ... this.
6522         (grub_term_unregister): Split in ...
6523         (grub_term_unregister_input): ... this, and ...
6524         (grub_term_unregister_output): ... this.
6525         (grub_term_iterate): Split in ...
6526         (grub_term_iterate_input): ... this, and ...
6527         (grub_term_iterate_output): ... this.
6529         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
6530         a check for input and one for output (and only attempt to get keys
6531         from user when input works).
6533         * util/grub-probe.c (grub_term_get_current): Split in ...
6534         (grub_term_get_current_input): ... this, and ...
6535         (grub_term_get_current_output): ... this.
6536         * util/grub-fstest.c: Likewise.
6537         * util/i386/pc/grub-setup.c: Likewise.
6538         * util/grub-editenv.c: Likewise.
6540         Portability adjustments:
6542         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
6543         `term/i386/pc/at_keyboard.c'.
6544         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
6545         grub_keyboard_controller_init() (now handled by terminal .init).
6546         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
6547         grub_at_keyboard_init().
6548         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
6549         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
6550         at_keyboard.mod via input terminal interface).
6551         * include/grub/i386/coreboot/console.h: Convert into a stub for
6552         `<grub/i386/pc/console.h>'.
6554         Migrate full terminals to new API:
6556         * term/efi/console.c (grub_console_term): Split into ...
6557         (grub_console_term_input): ... this, and ...
6558         (grub_console_term_output): ... this.  Update all users.
6559         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
6560         (grub_ofconsole_init): Split into ...
6561         (grub_ofconsole_init_input): ... this, and ...
6562         (grub_ofconsole_init_output): ... this.
6563         (grub_ofconsole_term): Split into ...
6564         (grub_ofconsole_term_input): ... this, and ...
6565         (grub_ofconsole_term_output): ... this.  Update all users.
6566         * term/i386/pc/serial.c (grub_serial_term): Split into ...
6567         (grub_serial_term_input): ... this, and ...
6568         (grub_serial_term_output): ... this.  Update all users.
6569         * term/i386/pc/console.c (grub_console_term): Split into ...
6570         (grub_console_term_input): ... this, and ...
6571         (grub_console_term_output): ... this.  Update all users.
6572         (grub_console_term_input): Only enable it on PC/BIOS platform.
6573         (grub_console_init): Remove grub_keyboard_controller_init() call.
6575         Migrate input terminals to new API:
6577         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
6578         `i386' and `i386/pc' to enable build on x86_64 (this driver is
6579         i386-specific anyway).
6580         (grub_console_checkkey): Rename to ...
6581         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
6582         users.
6583         (grub_keyboard_controller_orig): New variable.
6584         (grub_console_getkey): Rename to ...
6585         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
6586         users.
6587         (grub_keyboard_controller_init): Static-ize.  Save original
6588         controller value so that it can be restored ...
6589         (grub_keyboard_controller_fini): ... here (new function).
6590         (grub_at_keyboard_term): New structure.
6591         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
6592         functions.
6594         Migrate output terminals to new API:
6596         * term/i386/pc/vga.c (grub_vga_term): Change type to
6597         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6598         members.  Update all users.
6599         * term/gfxterm.c (grub_video_term): Change type to
6600         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6601         members.  Update all users.
6602         * include/grub/i386/pc/console.h (grub_console_checkkey)
6603         (grub_console_getkey): Do not export (no longer needed by gfxterm,
6604         etc).
6606         Migrate `terminal' command and userland tools to new API:
6608         * commands/terminal.c (grub_cmd_terminal): Split into ...
6609         (grub_cmd_terminal_input): ... this, and ...
6610         (grub_cmd_terminal_output): ... this.
6611         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
6612         `terminal_input' and `terminal_output'.
6613         * util/grub.d/00_header.in: Adjust `terminal' calls to new
6614         `terminal_input' / `terminal_output' API.
6615         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
6616         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
6617         provided ${GRUB_TERMINAL}, convert it).
6619 2008-11-04  Robert Millan  <rmh@aybabtu.com>
6621         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
6622         for FreeBSD.
6623         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
6625 2008-11-03  Bean  <bean123ch@gmail.com>
6627         * kern/elf.c (grub_elf32_load): Revert to previous code.
6628         (grub_elf64_load): Likewise.
6630         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
6632 2008-11-01  Robert Millan  <rmh@aybabtu.com>
6634         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
6635         (TARGET_CPPFLAGS): Likewise.
6636         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
6638 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
6640         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
6642 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6644         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
6645         addition of objects until the code is not going to be able to fail.
6647 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6649         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
6650         (add a missing NULL check, and correct them by moving the pointer
6651         operations after the actual check).
6653 2008-10-29  Robert Millan  <rmh@aybabtu.com>
6655         * util/i386/pc/grub-install.in: Handle empty string as output from
6656         make_system_path_relative_to_its_root().
6658 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
6660         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
6661         circular metadata worst case scenario. If the metadata is circular
6662         then copy the wrap in place.
6663         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
6664         project lib/format_text/layout.h
6665         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
6667 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6669         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
6671 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6673         * util/update-grub_lib.in: Mention filename in warning message.
6675 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6677         * NEWS: Update for rename of update-grub to grub-mkconfig.
6679 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6681         * util/update-grub_lib.in: Copy to ...
6682         * util/grub-mkconfig_lib.in: ... this.  Update all users.
6683         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
6684         * util/update-grub.in: Rename to ...
6685         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
6686         option. Add `--output' option to allow users to specify the generated
6687         configuration file.  Default to stdout.
6688         (update_grub_dir): Rename to ...
6689         (grub_mkconfig_dir): ... this.
6690         (grub_cfg): Default to an empty string.
6691         * conf/common.rmk (update-grub): Rename to ...
6692         (grub-mkconfig): ... this.
6693         (update-grub_lib): Copy to ...
6694         (grub-mkconfig_lib): ... this.
6695         (update-grub_SCRIPTS): Copy to ...
6696         (grub-mkconfig_SCRIPTS): ... this. Update all users.
6697         (update-grub_DATA): Rename to ...
6698         (grub-mkconfig_DATA): ... this.
6700 2008-09-28  Robert Millan  <rmh@aybabtu.com>
6702         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
6703         to `modified'.  Add the real `created' field.
6704         (grub_iso9660_uuid): Use `modified' rather than `created' for
6705         constructing the UUID.
6707 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
6709         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
6710         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
6712 2008-09-28  Bean  <bean123ch@gmail.com>
6714         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
6715         Thanks to Christian Franke for finding this bug.
6717 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6719         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
6720         instances of grub_util_get_disk_name() (see previous commit).
6722 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6724         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
6725         `util/i386/get_disk_name.c'.
6726         * conf/i386-efi.rmk: Likewise.
6727         * conf/x86_64-efi.rmk: Likewise.
6728         * conf/i386-coreboot.rmk: Likewise.
6729         * conf/i386-ieee1275.rmk: Likewise.
6730         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
6731         `util/ieee1275/get_disk_name.c'.
6732         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
6733         * util/ieee1275/get_disk_name.c: Remove file.
6734         * util/i386/get_disk_name.c: Remove file.
6735         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
6736         "hd%d" for device.map entries, rather than using
6737         grub_util_get_disk_name().
6739 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6741         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
6742         warning.
6743         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
6745 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6747         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
6748         Changed to 0x5100.
6749         (GRUB_TERM_PPAGE): Changed to 0x4900.
6751 2008-09-24  Robert Millan  <rmh@aybabtu.com>
6753         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
6754         macros (they were i386-pc specific).
6755         * include/grub/sparc64/ieee1275/console.h: Likewise.
6756         * include/grub/efi/console.h: Likewise.
6758 2008-09-22  Bean  <bean123ch@gmail.com>
6760         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
6761         resident and in attribute list.
6763         * include/grub/ntfs.h (BMP_LEN): Removed.
6765 2008-09-22  Bean  <bean123ch@gmail.com>
6767         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
6768         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
6770         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
6771         error occurs, as grub_disk_open will call grub_disk_close, which will
6772         call p->close (scsi).
6774 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6776         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
6777         (AC_PREREQ): Bumped to 2.59.
6778         (AC_TRY_COMPILE): Replace obsolete macro with ...
6779         (AC_COMPILE_IFELSE): ... this.
6780         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
6781         (AC_LINK_IFELSE): ... this.
6783 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6785         * autogen.sh: Add a call to `gendistlist.sh'.
6787 2008-09-19  Christian Franke  <franke@computer.org>
6789         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
6790         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
6791         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
6792         Export __enable_execute_stack() to modules.
6793         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
6794         New function.
6796 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6798         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
6799         Sort the list.
6801 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6803         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
6804         #include <grub/util/hostdisk.h>.
6806 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6808         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
6809         segments when their filesz is zero (grub_file_read() interprets
6810         zero-size as "read until EOF", which results in memory corruption).
6811         Use `lowest_segment' rather than 0 for calculating the current
6812         segment load address.
6814 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6816         * util/hostdisk.c (open_device): Replace a grub_util_info() call
6817         with grub_dprintf("hostdisk", ...), as it was so verbose that it
6818         clobbered useful information.
6820 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6822         * include/grub/util/biosdisk.h: Move to ...
6823         * include/grub/util/hostdisk.h: ... here.  Update all users.
6824         * util/biosdisk.c: Move to ...
6825         * util/hostdisk.c: ... here.  Update all users.
6827 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6829         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
6830         variables.
6831         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
6832         and length can be stored directly in the `mbi->mmap_addr' and
6833         `mbi->mmap_length' struct fields.
6835 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6837         * conf/i386.rmk: New file.  Provides declaration for building
6838         `cpuid.mod'.
6839         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
6840         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
6841         variables.
6842         Include `conf/i386.mk'.
6843         * conf/i386-efi.rmk: Likewise.
6844         * conf/x86_64-efi.rmk: Likewise.
6845         * conf/i386-coreboot.rmk: Likewise.
6846         * conf/i386-ieee1275.rmk: Likewise.
6848 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
6850         Based on patch created by Colin D Bennett <colin@gibibit.com>.
6851         Adds optimization support for BGR based modes.
6853         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
6854         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6855         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6856         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6857         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6858         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6859         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6860         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6861         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6862         (grub_video_i386_vbeblit_index_index): Likewise.
6863         (grub_video_i386_vbeblit_replace_directN): Added.
6864         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6865         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6866         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6867         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6868         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6869         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6870         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6871         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6872         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6873         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6874         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6875         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6876         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6878         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
6879         (grub_video_i386_vbefill_R8G8B8): Likewise.
6880         (grub_video_i386_vbefill_index): Likewise.
6881         (grub_video_i386_vbefill_direct32): Added.
6882         (grub_video_i386_vbefill_direct24): Likewise.
6883         (grub_video_i386_vbefill_direct16): Likewise.
6884         (grub_video_i386_vbefill_direct8): Likewise.
6886         * include/grub/video.h (grub_video_blit_format): Removed
6887         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
6888         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
6889         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
6890         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
6891         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
6893         * video/video.c (grub_video_get_blit_format): Updated to use new
6894         blit formats.  Added handling for 16 bit color modes.
6896         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
6897         fillers.
6898         (common_blitter): Updated to use new blitters.
6900         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
6901         Removed.
6902         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6903         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6904         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6905         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6906         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6907         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6908         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6909         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6910         (grub_video_i386_vbeblit_index_index): Likewise.
6911         (grub_video_i386_vbeblit_replace_directN): Added.
6912         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6913         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6914         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6915         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6916         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6917         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6918         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6919         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6920         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6921         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6922         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6923         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6924         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6926         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
6927         (grub_video_i386_vbefill_R8G8B8): Likewise.
6928         (grub_video_i386_vbefill_index): Likewise.
6929         (grub_video_i386_vbefill_direct32): Added.
6930         (grub_video_i386_vbefill_direct24): Likewise.
6931         (grub_video_i386_vbefill_direct16): Likewise.
6932         (grub_video_i386_vbefill_direct8): Likewise.
6934         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
6935         types.
6937         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
6938         types.
6940         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
6941         blitter types.
6943         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
6944         types.
6946 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6948         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
6949         RAID level 1.
6951 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6953         * fs/iso9660.c (grub_iso9660_date): New structure.
6954         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
6955         (grub_iso9660_uuid): New function.
6957 2008-09-05  Bean  <bean123ch@gmail.com>
6959         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
6961         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
6962         insensitive bit for names in Win32 and Win32 & DOS namespace.
6964         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
6966         * include/grub/types.h (LONG_MAX): Likewise.
6968 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6970         * util/getroot.c: Include <config.h>.
6971         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
6972         add support for /dev/md/N devices and handle LVM double dash escaping.
6974 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6976         * config.guess: Update to latest version from config git.
6977         * config.sub: Likewise.
6979 2008-09-03  Robert Millan  <rmh@aybabtu.com>
6981         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
6982         `disk->total_sectors'.
6984 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6986         * include/grub/normal.h: Fixed incorrect comment for
6987         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
6989 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6991         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
6992         values with defines.
6994         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
6995         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
6996         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
6997         (GRUB_VBE_MODEATTR_COLOR): Likewise.
6998         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
6999         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
7000         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
7001         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
7002         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
7003         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
7004         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
7005         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
7006         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
7007         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
7008         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
7009         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
7010         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
7011         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
7012         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
7014 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7016         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
7017         declaration.
7018         (grub_multiboot): Fix a few warnings.
7020 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7022         * loader/i386/pc/multiboot.c: Update comment not to say that
7023         boot_device support is unimplemented.
7025 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7027         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
7028         or memory map support are unimplemented.
7030 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7032         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
7034 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7036         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
7037         total video memory in 'vbeinfo' output; show color format details for
7038         each video mode.
7040 2008-08-30  Pavel Roskin  <proski@gnu.org>
7042         * util/genmoddep.c: Remove for real this time.
7043         * DISTLIST: Remove util/genmoddep.c.
7045 2008-08-30  Robert Millan  <rmh@aybabtu.com>
7047         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
7048         as required by Multiboot spec (it was already 4-byte aligned, but
7049         only by chance).
7051 2008-08-29  Pavel Roskin  <proski@gnu.org>
7053         * kern/powerpc/ieee1275/crt0.S: Rename to ...
7054         * kern/powerpc/ieee1275/startup.S: ... this.
7055         * conf/powerpc-ieee1275.rmk: Adjust for the above.
7056         * DISTLIST: Likewise.
7058         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
7059         grub/cpu/kernel.h.  Add start label for consistency with other
7060         platforms.  Add grub_prefix immediately after start.  Add jump
7061         to the code after grub_prefix.
7062         * include/grub/powerpc/kernel.h: Provide valid values for
7063         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
7065 2008-08-29  Bean  <bean123ch@gmail.com>
7067         * configure.ac: Change host_os to cygwin for mingw.
7068         (asprintf): New check for function.
7070         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
7071         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
7073         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
7074         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
7075         sync, sleep and grub_util_get_disk_size for mingw.
7077         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
7078         to get size in mingw.
7079         (open_device): Use flag O_BINARY if it's defined.
7080         (find_root_device): Add dummy code for mingw.
7082         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
7083         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
7084         (get_scsi_disk_name): Return 0 for mingw.
7086         * util/hostfs.c: #include <grub/util/misc.h>.
7087         (grub_hostfs_open): Use "rb" flag to open file, use
7088         grub_util_get_disk_size to get disk size for mingw.
7090         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
7091         (asprintf): New function if HAVE_ASPRINTF is not set.
7092         (sync): New function for mingw.
7093         (sleep): Likewise.
7094         (grub_util_get_disk_size): Likewise.
7096 2008-08-28  Pavel Roskin  <proski@gnu.org>
7098         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7099         kern/time.c.
7101 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7103         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
7105 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7107         Change find_grub_drive() syntax so it doesn't prevent it from
7108         detecting NULL names as errors.
7110         * util/biosdisk.c (find_grub_drive): Move free slot search code
7111         from here ...
7112         (find_free_slot): ... to here.
7113         (read_device_map): Use find_free_slot() to search for free slots.
7115 2008-08-27  Marco Gerards  <marco@gnu.org>
7117         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
7118         (scsi_mod_SOURCES): New variable.
7119         (scsi_mod_CFLAGS): Likewise
7120         (scsi_mod_LDFLAGS): Likewise.
7122         * disk/scsi.c: New file.
7124         * include/grub/scsi.h: Likewise.
7126         * include/grub/scsicmd.h: Likewise.
7128         * disk/ata.c: Include <grub/scsi.h>.
7129         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
7130         instead.
7131         (grub_ata_iterate): Skip ATAPI devices.
7132         (grub_ata_open): Only handle ATAPI devices.
7133         (struct grub_atapi_read): Removed.
7134         (grub_atapi_readsector): Likewise.
7135         (grub_ata_read): No longer handle ATAPI devices.
7136         (grub_ata_write): Likewise.
7137         (grub_atapi_iterate): New function.
7138         (grub_atapi_read): Likewise.
7139         (grub_atapi_write): Likewise.
7140         (grub_atapi_open): Likewise.
7141         (grub_atapi_close): Likewise.
7142         (grub_atapi_dev): New variable.
7143         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
7144         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
7146         * include/grub/disk.h (enum grub_disk_dev_id): Add
7147         `GRUB_DISK_DEVICE_SCSI_ID'.
7149 2008-08-26  Robert Millan  <rmh@aybabtu.com>
7151         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
7152         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
7153         descriptive.
7155 2008-08-23  Bean  <bean123ch@gmail.com>
7157         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
7158         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
7159         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
7160         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
7161         dm_nv.mod.
7162         (raid5rec_mod_SOURCES): New macro.
7163         (raid5rec_mod_CFLAGS): Likewise.
7164         (raid5rec_mod_LDFLAGS): Likewise.
7165         (raid6rec_mod_SOURCES): Likewise.
7166         (raid6rec_mod_CFLAGS): Likewise.
7167         (raid6rec_mod_LDFLAGS): Likewise.
7168         (mdraid_mod_SOURCES): Likewise.
7169         (mdraid_mod_CFLAGS): Likewise.
7170         (mdraid_mod_LDFLAGS): Likewise.
7171         (dm_nv_mod_SOURCES): Likewise.
7172         (dm_nv_mod_CFLAGS): Likewise.
7173         (dm_nv_mod_LDFLAGS): Likewise.
7175         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
7176         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
7177         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7179         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
7180         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7182         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7184         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7186         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7188         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7190         * disk/raid5_recover.c: New file.
7192         * disk/raid6_recover.c: Likewise.
7194         * disk/mdraid_linux.c: Likewise.
7196         * disk/dmraid_nvidia.c: Likewise.
7198         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
7199         ULONG_MAX.
7201         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
7202         calculate the size of raid device.
7203         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
7204         different layout of raid5.
7205         (grub_raid_scan_device): Remove code specific to mdraid.
7206         (grub_raid_list): New variable.
7207         (free_array): New function.
7208         (grub_raid_register): Likewise.
7209         (grub_raid_unregister): Likewise.
7210         (grub_raid_rescan): Likewise.
7211         (GRUB_MOD_INIT): Don't iterate device here.
7212         (GRUB_MOD_FINI): Use free_array to release resource.
7214         * include/grub/raid.h: Remove macro and structure specific to mdraid.
7215         (grub_raid5_recover_func_t): New function variable type.
7216         (grub_raid6_recover_func_t): Likewise.
7217         (grub_raid5_recover_func): New variable.
7218         (grub_raid6_recover_func): Likewise.
7219         (grub_raid_register): New function.
7220         (grub_raid_unregister): Likewise.
7221         (grub_raid_rescan): Likewise.
7222         (grub_raid_block_xor): Likewise.
7224         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
7225         (CMD_CRC): New macro.
7226         (part): Removed.
7227         (read_file): Handle device as well as file.
7228         (cmd_crc): New function.
7229         (fstest): Handle multiple disks.
7230         (options): Remove part, raw and long, add root and diskcount.
7231         (usage): Add crc, remove -p, -r, -l, add -r and -c.
7232         (main): Find the first non option entry and ignore subsequent options,
7233         add handling for the new options, support multiple disks.
7235         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
7237 2008-08-23  Bean  <bean123ch@gmail.com>
7239         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
7241         * genfslist.sh: Ignore kernel.mod.
7243         * genpartmaplist.sh: Likewise.
7245 2008-08-23  Robert Millan  <rmh@aybabtu.com>
7247         * util/getroot.c (find_root_device): Skip anything that starts with
7248         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
7250 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
7252         * util/update-grub.in (GRUB_GFXMODE): Export variable.
7253         * util/grub.d/00_header.in: Allow the administrator to change default
7254         gfxmode via ${GRUB_GFXMODE}.
7256 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
7258         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
7260 2008-08-21  Robert Millan  <rmh@aybabtu.com>
7262         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
7263         loader.
7264         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
7265         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
7267 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
7269         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
7270         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
7272 2008-08-19  Robert Millan  <rmh@aybabtu.com>
7274         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
7275         (struct grub_virtual_screen): Remove `cursor_color'.
7276         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
7277         initialization.
7278         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
7280 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7282         Unify (identical) linux_normal.c files.
7283         * loader/i386/efi/linux_normal.c: Move from here ...
7284         * loader/linux_normal.c: ... to here.  Update all users.
7285         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
7286         * loader/i386/ieee1275/linux_normal.c: Likewise.
7288 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7290         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
7291         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
7292         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
7293         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
7294         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
7295         New macros.
7296         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
7297         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
7298         (GRUB_LINUX_CL_END_OFFSET): ... to here.
7299         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
7300         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
7301         (GRUB_EFI_CL_END_OFFSET): Rename to ...
7302         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
7303         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
7304         Initialize `params->video_cursor_x' and `params->video_cursor_y'
7305         portably using grub_getxy().
7306         Replace `-EFI' with `-bzImage' in boot message.
7308 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7310         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
7312 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7314         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
7316         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
7317         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
7318         (grub_machine_mmap_iterate): New function declaration.
7319         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
7320         structure.
7321         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
7322         macros.
7324         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
7325         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
7326         Move e820 parsing from here ...
7327         * kern/i386/pc/mmap.c: New file.
7328         (grub_machine_mmap_iterate): ... to here.
7330         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
7331         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
7332         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
7333         (grub_available_iterate): Redeclare to return `void', and redeclare
7334         its hook to use grub_uint64_t as addr and size parameters, and rename
7335         to ...
7336         (grub_machine_mmap_iterate): ... this.  Update all users.
7338         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
7339         to make it more readable.  Rename to ...
7340         (grub_machine_mmap_iterate): ... this.
7342         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
7343         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
7344         (grub_multiboot): Allocate an extra region after the payload, and fill
7345         it with a Multiboot memory map.  Adjust a.out loader to calculate size
7346         with the extra space.
7347         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
7348         with the extra space.
7350 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
7352         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
7354 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
7356         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
7357         mdate-sh to the list `find' searches for.
7358         * DISTLIST: Regenerated.
7360 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
7362         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
7363         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
7364         genmoddep.awk, gensymlist.sh.in.
7365         (DISTDIRS): Add bus, docs, hook, lib.
7366         * DISTLIST: Regenerated.
7367         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
7369 2008-08-16  Robert Millan  <rmh@aybabtu.com>
7371         * disk/raid.c (grub_raid_init): Handle/report errors set by
7372         grub_device_iterate().
7373         * disk/lvm.c (grub_lvm_init): Likewise.
7375 2008-08-15  Bean  <bean123ch@gmail.com>
7377         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7378         and datehook.mod.
7379         (datetime_mod_SOURCES): New macro.
7380         (datetime_mod_CFLAGS): Likewise.
7381         (datetime_mod_LDFLAGS): Likewise.
7382         (date_mod_SOURCES): Likewise.
7383         (date_mod_CFLAGS): Likewise.
7384         (date_mod_LDFLAGS): Likewise.
7385         (datehook_mod_SOURCES): Likewise.
7386         (datehook_mod_CFLAGS): Likewise.
7387         (datehook_mod_LDFLAGS): Likewise.
7389         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7390         and datehook.mod.
7391         (datetime_mod_SOURCES): New macro.
7392         (datetime_mod_CFLAGS): Likewise.
7393         (datetime_mod_LDFLAGS): Likewise.
7394         (date_mod_SOURCES): Likewise.
7395         (date_mod_CFLAGS): Likewise.
7396         (date_mod_LDFLAGS): Likewise.
7397         (datehook_mod_SOURCES): Likewise.
7398         (datehook_mod_CFLAGS): Likewise.
7399         (datehook_mod_LDFLAGS): Likewise.
7401         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7402         and datehook.mod.
7403         (datetime_mod_SOURCES): New macro.
7404         (datetime_mod_CFLAGS): Likewise.
7405         (datetime_mod_LDFLAGS): Likewise.
7406         (date_mod_SOURCES): Likewise.
7407         (date_mod_CFLAGS): Likewise.
7408         (date_mod_LDFLAGS): Likewise.
7409         (datehook_mod_SOURCES): Likewise.
7410         (datehook_mod_CFLAGS): Likewise.
7411         (datehook_mod_LDFLAGS): Likewise.
7413         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7414         and datehook.mod.
7415         (datetime_mod_SOURCES): New macro.
7416         (datetime_mod_CFLAGS): Likewise.
7417         (datetime_mod_LDFLAGS): Likewise.
7418         (date_mod_SOURCES): Likewise.
7419         (date_mod_CFLAGS): Likewise.
7420         (date_mod_LDFLAGS): Likewise.
7421         (datehook_mod_SOURCES): Likewise.
7422         (datehook_mod_CFLAGS): Likewise.
7423         (datehook_mod_LDFLAGS): Likewise.
7425         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7426         and datehook.mod.
7427         (datetime_mod_SOURCES): New macro.
7428         (datetime_mod_CFLAGS): Likewise.
7429         (datetime_mod_LDFLAGS): Likewise.
7430         (date_mod_SOURCES): Likewise.
7431         (date_mod_CFLAGS): Likewise.
7432         (date_mod_LDFLAGS): Likewise.
7433         (datehook_mod_SOURCES): Likewise.
7434         (datehook_mod_CFLAGS): Likewise.
7435         (datehook_mod_LDFLAGS): Likewise.
7437         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
7439         * commands/date.c: New file.
7441         * hook/datehook.c: Likewise.
7443         * include/grub/lib/datetime.h: Likewise.
7445         * include/grub/i386/cmos.h: Likewise.
7447         * lib/datetime.c: Likewise.
7449         * lib/i386/datetime.c: Likewise.
7451         * lib/efi/datetime.c: Likewise.
7453 2008-08-14  Robert Millan  <rmh@aybabtu.com>
7455         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
7456         (grub_mkelfimage_SOURCES): New variable.
7457         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
7459         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
7460         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
7461         * conf/powerpc-ieee1275.rmk: Likewise.
7462         * conf/i386-ieee1275.rmk: Likewise.
7464         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
7465         * kern/i386/coreboot/init.c: Likewise.
7467         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
7468         with `<grub/cpu/kernel.h>'.
7469         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
7470         to ...
7471         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
7472         * kern/i386/coreboot/startup.S: Likewise.
7474         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
7475         (GRUB_MOD_GAP): Remove.
7476         * include/grub/powerpc/kernel.h: New file.
7477         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
7478         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7479         * include/grub/i386/kernel.h: New file.
7480         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
7481         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
7482         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7484         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
7485         `grub-mkelfimage'.
7486         Use --directory when invoking grub_mkimage.
7488         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
7489         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
7490         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
7491         and GRUB_KERNEL_CPU_PREFIX.
7493 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
7495         * include/grub/err.h (grub_err_printf): New function prototype.
7496         * util/misc.c (grub_err_printf): New function.
7497         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
7498         grub_printf.
7499         * kern/err.c (grub_print_error): Use grub_err_printf.
7501 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7503         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
7505 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7507         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
7508         boot entry.
7510 2008-08-12  Robert Millan  <rmh@aybabtu.com>
7512         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
7513         of the relocation code from here ...
7514         (grub_multiboot): ... to here.
7515         (forward_relocator, backward_relocator): Move from here ...
7516         * kern/i386/loader.S (grub_multiboot_forward_relocator)
7517         (grub_multiboot_backward_relocator): ... to here.
7518         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
7519         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
7520         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
7521         (grub_multiboot_forward_relocator_end)
7522         (grub_multiboot_backward_relocator)
7523         (grub_multiboot_backward_relocator_end): New variables.
7525 2008-08-12  Bean  <bean123ch@gmail.com>
7527         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
7529 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7531         * kern/i386/linuxbios/startup.S: Move from here ...
7532         * kern/i386/coreboot/startup.S: ... to here.
7534         * kern/i386/linuxbios/init.c: Move from here ...
7535         * kern/i386/coreboot/init.c: ... to here.
7537         * kern/i386/linuxbios/table.c: Move from here ...
7538         * kern/i386/coreboot/mmap.c: ... to here.
7540         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
7542 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7544         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
7545         errors.  Leave it to the upper layer to handle them.
7547 2008-08-09  Christian Franke  <franke@computer.org>
7549         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
7550         * conf/common.rmk: Install `grub-pe2elf' only if requested.
7551         Install `grub.d/10_windows' only on Cygwin.
7552         * configure.ac: Add subst of `target_os'.
7553         Check `target_os' also before setting TARGET_OBJ2ELF.
7554         Add `--enable-grub-pe2elf'.
7556 2008-08-08  Robert Millan  <rmh@aybabtu.com>
7558         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7559         (grub_last_time): Change type to grub_uint64_t.
7560         (grub_disk_open): Migrate code from to using grub_get_time_ms().
7561         (grub_disk_close): Likewise.
7563         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7564         (run_menu): Migrate code from to using grub_get_time_ms().
7566         * util/misc.c (grub_get_time_ms): New function.
7568 2008-08-08  Marco Gerards  <marco@gnu.org>
7570         * disk/ata.c (grub_ata_regget): Change return type to
7571         `grub_uint8_t'.
7572         (grub_ata_regget2): Likewise.
7573         (grub_ata_wait_status): New function.
7574         (grub_ata_wait_busy): Removed function, updated all users to use
7575         `grub_ata_wait_status'.
7576         (grub_ata_wait_drq): Likewise.
7577         (grub_ata_cmd): New function.
7578         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
7579         error handling.
7580         (grub_ata_pio_write): Add error handling.
7581         (grub_atapi_identify): Likewise.
7582         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
7583         handling.
7584         (grub_ata_identify): Use `grub_ata_cmd' and improve error
7585         handling.  Actually use the detected registers.  Reorder the
7586         detection logic such that it is easier to read.
7587         (grub_ata_pciinit): Do not assign the same ID to each controller.
7588         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
7589         handling.
7590         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
7592         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
7594 2008-08-08  Marco Gerards  <marco@gnu.org>
7596         * NEWS: Update.
7598 2008-08-07  Bean  <bean123ch@gmail.com>
7600         * include/grub/x86_64/pci.h: New file.
7602 2008-08-07  Christian Franke  <franke@computer.org>
7604         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
7605         (TIMER2_GATE): Likewise.
7606         (grub_pit_wait): Add enable/disable of the timer2 gate
7607         bit of port 0x61.  This fixes a possible infinite loop.
7609 2008-08-07  Bean  <bean123ch@gmail.com>
7611         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
7612         kern/i386/tsc.c and kern/i386/pit.c.
7614         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
7615         x86_64 platform.
7617         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
7618         <grub/i386/tsc.h>.
7620         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
7622 2008-08-07  Bean  <bean123ch@gmail.com>
7624         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
7626         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
7628         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
7629         multiple inclusion. Add #include <grub/types.h>.
7631 2008-08-06  Christian Franke  <franke@computer.org>
7633         * conf/common.rmk: Build and install `10_windows'.
7634         * util/grub.d/10_windows.in: New script.
7636 2008-08-06  Pavel Roskin  <proski@gnu.org>
7638         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
7640 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7642         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
7643         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
7645 2008-08-06  Bean  <bean123ch@gmail.com>
7647         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
7648         (grub_pxefs_fs_int): Remove dummy definition.
7649         (grub_pxefs_open): Use data->block_size to store the current block
7650         size setting.
7651         (grub_pxefs_read): Use block size stored in data->block_size. As the
7652         value of grub_pxe_blksize can be changed after the file is opened.
7654 2008-08-06  Bean  <bean123ch@gmail.com>
7656         * fs/i386/pc/pxe.c (curr_file): new variable.
7657         (grub_pxefs_open): Simply the handling of pxe file system. Don't
7658         require the dummy internal file system anymore.
7659         (grub_pxefs_read): Removed.
7660         (grub_pxefs_close): Likewise.
7661         (grub_pxefs_fs_int): Likewise.
7662         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
7663         connection when we switch file.
7664         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
7666 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7668         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
7669         `halt.mod'.
7670         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
7671         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
7673         * kern/i386/halt.c: New file.
7674         * kern/i386/reboot.c: Likewise.
7675         * include/grub/i386/reboot.h: Likewise.
7676         * include/grub/i386/halt.h: Likewise.
7678         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
7679         Include `<grub/cpu/halt.h>'.
7680         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
7681         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
7683         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
7684         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
7685         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
7686         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
7687         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
7688         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
7689         from here ...
7690         * include/grub/i386/at_keyboard.h: ... to here.
7692 2008-08-05  Robert Millan  <rmh@aybabtu.com>
7694         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
7695         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
7696         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
7697         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7698         `kern/generic/millisleep.c'.
7700         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
7701         instead of grub_get_rtc().
7702         (grub_tsc_init): Initialize `tsc_boot_time'.
7704         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
7705         (grub_machine_init): Use grub_tsc_init() rather than
7706         installing an RTC-based handler via grub_install_get_time_ms().
7708         * kern/i386/pit.c: New file.
7709         * include/grub/i386/pit.h: Likewise.
7711 2008-08-05  Bean  <bean123ch@gmail.com>
7713         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
7715         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
7716         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
7717         (pxe_mod_SOURCES): New macro.
7718         (pxe_mod_CFLAGS): Likewise.
7719         (pxe_mod_LDFLAGS): Likewise.
7720         (pxecmd_mod_SOURCES): Likewise.
7721         (pxecmd_mod_CFLAGS): Likewise.
7722         (pxecmd_mod_LDFLAGS): Likewise.
7724         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
7725         (grub_pxe_call): Likewise.
7727         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
7729         * commands/i386/pc/pxecmd.c: New file.
7731         * fs/i386/pc/pxe.c: Likewise.
7733         * include/grub/i386/pc/pxe.h: Likewise.
7735 2008-08-05  Bean  <bean123ch@gmail.com>
7737         * util/console.c (grub_console_cur_color): New variable.
7738         (grub_console_standard_color): Likewise.
7739         (grub_console_normal_color): Likewise.
7740         (grub_console_highlight_color): Likewise.
7741         (color_map): Likewise.
7742         (use_color): Likewise.
7743         (NUM_COLORS): New macro.
7744         (grub_ncurses_setcolorstate): Handle color properly.
7745         (grub_ncurses_setcolor): Don't change color here, just remember the
7746         settings, color will be set in grub_ncurses_setcolorstate.
7747         (grub_ncurses_getcolor): New function.
7748         (grub_ncurses_init): Initialize color pairs.
7749         (grub_ncurses_term): New member grub_ncurses_getcolor.
7751 2008-08-05  Colin D Bennett  <colin@gibibit.com>
7753         High resolution timer support.  Implemented for x86 CPUs using TSC.
7754         Extracted generic grub_millisleep() so it's linked in only as needed.
7755         This requires a Pentium compatible CPU; if the RDTSC instruction is
7756         not supported, then it falls back on the generic grub_get_time_ms()
7757         implementation that uses the machine's RTC.
7759         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
7760         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7761         `kern/generic/millisleep.c'.
7763         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
7764         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
7766         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
7767         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
7769         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7771         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7772         `kern/generic/millisleep.c'.
7774         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7776         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
7778         * kern/generic/rtc_get_time_ms.c: New file.
7780         * kern/generic/millisleep.c: New file.
7782         * kern/misc.c: Don't include
7783         <kern/time.h> anymore.
7784         (grub_millisleep_generic): Removed.
7786         * commands/sleep.c (grub_interruptible_millisleep): Uses
7787         grub_get_time_ms() instead of grub_get_rtc().
7789         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
7790         function.
7791         (grub_cpu_is_cpuid_supported): New inline function.
7792         (grub_cpu_is_tsc_supported): New inline function.
7793         (grub_tsc_init): New function prototype.
7794         (grub_tsc_get_time_ms): New function prototype.
7796         * kern/i386/tsc.c (grub_get_time_ms): New file.
7798         * include/grub/time.h: Include <grub/types.h.
7799         (grub_millisleep_generic): Removed.
7800         (grub_get_time_ms): New prototype.
7801         (grub_install_get_time_ms): New prototype.
7802         (grub_rtc_get_time_ms): New prototype.
7804         * kern/time.c (grub_get_time_ms): New function.
7805         (grub_install_get_time_ms): New function.
7807         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
7808         <grub/time.h> anymore.
7809         (grub_millisleep): Removed.
7810         (grub_machine_init): Call grub_tsc_init.
7812         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
7813         get_time_ms() implementation.
7815         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
7816         (ieee1275_get_time_ms): New function.
7817         (grub_machine_init): Install get_time_ms() implementation.
7819         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
7820         (grub_machine_init): Call grub_tsc_init().
7821         (grub_millisleep): Removed.
7823         * kern/ieee1275/init.c (grub_millisleep): Removed.
7824         (grub_machine_init): Install ieee1275_get_time_ms()
7825         implementation.
7826         (ieee1275_get_time_ms): New function.
7827         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
7828         real work.
7830 2008-08-05  Marco Gerards  <marco@gnu.org>
7832         * disk/ata.c: Include <grub/pci.h>.
7833         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
7834         (grub_ata_initialize): Rewritten.
7835         (grub_ata_device_initialize): New function.
7837 2008-08-04  Pavel Roskin  <proski@gnu.org>
7839         * kern/main.c: Include grub/mm.h.
7841 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7843         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
7844         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
7845         corruption problem).
7847 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7849         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
7850         warnings introduced in my last commit.
7852 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7854         Make PCI available on all i386 architectures.
7856         * include/grub/i386/pc/pci.h: Move from here ...
7857         * include/grub/i386/pci.h: ... to here.
7859         * include/grub/i386/pc/pci.h: Remove.
7860         * include/grub/i386/efi/pci.h: Remove.
7861         * include/grub/x86_64/efi/pci.h: Remove.
7863         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
7864         `<grub/cpu/pci.h>'.
7866         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
7867         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
7868         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
7870         * conf/i386-ieee1275.rmk: Likewise.
7872 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7874         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
7875         (grub_console_setcursor): Make it possible to set cursor off.
7877 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7879         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
7880         of modules instead of assuming which platform provides what.
7881         * util/update-grub.in: Likewise.
7883 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7885         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
7886         instead of `grub_install_dos_part' to determine whether a drive needs
7887         to be prepended to prefix (`grub_install_dos_part' is not reliable,
7888         because it can be overridden when loading GRUB via Multiboot).
7890 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7892         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
7894 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7896         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
7897         of informational grub_dprintf() calls.
7899 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7901         * disk/memdisk.c (memdisk_size): Don't initialize.
7902         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
7904         * include/grub/i386/pc/kernel.h
7905         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
7906         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
7907         (grub_memdisk_image_size, grub_arch_memdisk_addr)
7908         (grub_arch_memdisk_size): Remove.
7910         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
7911         field (was only used to transfer a constant).  Add `type' field to
7912         support multiple module types.
7913         (grub_module_iterate): New function.
7915         * kern/device.c (grub_device_open): Do not hide error messages
7916         when grub_disk_open() fails.  Use grub_print_error() instead.
7918         * kern/i386/pc/init.c (grub_arch_modules_addr)
7919         (grub_arch_memdisk_size): Remove functions.
7920         (grub_arch_modules_addr): Return the module address in high memory
7921         (now that it isn't copied anymore).
7923         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
7924         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
7925         decompression routine (grub_total_module_size already includes that
7926         now).  Don't copy modules back to low memory.
7928         * kern/main.c: Include `<grub/mm.h>'.
7929         (grub_load_modules): Split out (and use) ...
7930         (grub_module_iterate): ... this function, which iterates through
7931         module objects and runs a hook.
7932         Comment out grub_mm_init_region() call, as it would cause non-ELF
7933         modules to be overwritten.
7935         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
7936         the memdisk image in its own region, make it part of the module list.
7937         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
7938         (main): Parse --memdisk|-m option, and pass user-provided path as
7939         parameter to generate_image().
7940         (add_segments): Pass `memdisk_path' down to load_modules().
7941         (load_modules): Embed memdisk image in module section when requested.
7942         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
7943         `header.type' instead of `header.offset'.
7945         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
7946         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
7947         (memdisk_mod_LDFLAGS): New variables.
7948         * conf/i386-coreboot.rmk: Likewise.
7949         * conf/i386-ieee1275.rmk: Likewise.
7951 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7953         * loader/i386/pc/multiboot.c (playground, forward_relocator)
7954         (backward_relocator): New variables.  Used to allocate and relocate
7955         the payload, respectively.
7956         (grub_multiboot_load_elf32): Load into heap instead of requested
7957         address, install the appropriate relocator code in each bound of
7958         the payload, and set the entry point such that
7959         grub_multiboot_real_boot() will jump to one of them.
7961         * kern/i386/loader.S (grub_multiboot_payload_size)
7962         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7963         (grub_multiboot_payload_entry_offset): New variables.
7964         (grub_multiboot_real_boot): Set cpu context to what the relocator
7965         expects, and jump to the relocator instead of the payload.
7967         * include/grub/i386/loader.h (grub_multiboot_payload_size)
7968         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7969         (grub_multiboot_payload_entry_offset): Export.
7971 2008-08-01  Bean  <bean123ch@gmail.com>
7973         * normal/menu_entry.c (editor_getline): Don't return the original
7974         string as result, as it will be released by lexer once it has done
7975         using it.
7977 2008-08-01  Robert Millan  <rmh@aybabtu.com>
7979         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
7980         within menuentries, not before them.
7981         util/grub.d/10_hurd.in: Likewise.
7983 2008-08-01  Bean  <bean123ch@gmail.com>
7985         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
7986         (bufio_mod_SOURCES): New macro.
7987         (bufio_mod_CFLAGS): Likewise.
7988         (bufio_mod_LDFLAGS): Likewise.
7990         * include/grub/bufio.h: New file.
7992         * io/bufio.c: Likewise.
7994         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
7995         (grub_video_reader_png): Use grub_buffile_open to open file.
7997         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
7998         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
8000         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
8001         (grub_video_reader_tga): Use grub_buffile_open to open file.
8003         * font/manager.c: Include <grub/bufio.h>.
8004         (add_font): Use grub_buffile_open to open file.
8006 2008-07-31  Robert Millan  <rmh@aybabtu.com>
8008         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
8009         ELF segments, use a macro for arbitrarily accessing any of them instead
8010         of preparing a pointer that allows access to one at a time.
8011         (grub_multiboot_load_elf64): Likewise.
8013 2008-07-31  Bean  <bean123ch@gmail.com>
8015         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
8016         GRUB_KERNEL_MACHINE_DATA_END.
8018 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8020         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
8021         Increase from 0x50 to 0x60.
8022         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
8023         use UUIDs to identify the root drive for them.  If that's not
8024         possible, abort.
8025         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
8026         check, for cross-disk installs.
8028 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8030         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
8031         is non-empty, use it to set the `prefix' environment variable instead
8032         of the usual approach.
8033         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
8034         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
8035         environment variable instead of dummy make_install_device().
8037         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
8038         (start): Insert a data section, with `grub_prefix' variable.
8039         * kern/i386/linuxbios/startup.S: Likewise.
8041         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
8042         New variable reference.
8043         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
8044         New macro.  Defines offset of `grub_prefix' within startup.S (relative
8045         to `start').
8046         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
8047         section within startup.S (relative to `start').
8048         * include/grub/i386/coreboot/kernel.h: Likewise.
8050         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
8051         Overwrite grub_prefix with its contents, at the beginning of the
8052         first segment.
8053         (main): Understand -p|--prefix.
8055 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8057         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
8059 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8061         * term/i386/pc/vga_text.c (grub_console_cls): Use
8062         grub_console_gotoxy() to go back to beginning of the screen.
8063         Found by Patrick Georgi <patrick.georgi@coresystems.de>
8065 2008-07-29  Christian Franke  <franke@computer.org>
8067         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8068         Add conversion of emulated mount points on Cygwin.
8070 2008-07-29  Christian Franke  <franke@computer.org>
8072         * util/update-grub.in: Add a check for admin
8073         group on Cygwin.
8074         Remove old `grub.cfg.new' before creation.
8075         Add `-f' to `mv' to handle the different filesystem
8076         semantics of Windows.
8078 2008-07-29  Bean  <bean123ch@gmail.com>
8080         * normal/main.c (get_line): Fix buffer overflow bug.
8082 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8084         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
8085         (struct grub_apple_header): New struct.  Describes the layout of
8086         the partmap header.
8087         (apple_partition_map_iterate): Check the header magic as well as the
8088         partition magic (which was already being checked).
8090 2008-07-28  Pavel Roskin  <proski@gnu.org>
8092         * genmk.rb: Add a warning to the beginning of the output that
8093         it's a generated file and should not be edited.
8095 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8097         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
8098         with the same number are found, just use issue a warning with
8099         grub_dprintf(), as this error has been reported to be non-fatal.
8101 2008-07-27  Robert Millan  <rmh@aybabtu.com>
8103         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
8104         information.
8106 2008-07-27  Bean  <bean123ch@gmail.com>
8108         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
8109         (grub_fat_find_dir): Ignore case when comparing filename.
8111 2008-07-27  Bean  <bean123ch@gmail.com>
8113         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
8114         smallino, as it's more descriptive, and i8count can be confused with
8115         the other field count.
8116         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
8117         inode type.
8119 2008-07-27  Bean  <bean123ch@gmail.com>
8121         * commands/crc.c: New file.
8123         * lib/crc.c: Likewise.
8125         * include/grub/lib/crc.h: Likewise.
8127         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
8129         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
8130         (hexdump): Move this function to ...
8132         * lib/hexdump.c: ... here.
8134         * include/grub/hexdump.h: Renamed to ...
8136         * include/grub/lib/hexdump.h: ... this.
8138         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
8140         * util/grub-editenv.c: Likewise.
8142         * include/envblk.h: Renamed to ...
8144         * include/lib/envblk.h: ... this.
8146         * util/envblk.c: Renamed to ...
8148         * lib/envblk.c: ... this.
8150         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
8151         lib/hexdump.c.
8152         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
8153         (pkglib_MODULES): Add crc.mod.
8154         (hexdump_mod_SOURCES): Add lib/hexdump.c.
8155         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
8156         (crc_mod_SOURCES): New macro.
8157         (crc_mod_CFLAGS): Likewise.
8158         (crc_mod_LDFLAGS): Likewise.
8160         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
8162         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8164         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8166         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8168         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8170 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
8172         * commands/help.c: Include <grub/term.h>.
8173         (TERM_WIDTH): Removed.  Updated all users.
8175 2008-07-27  Pavel Roskin  <proski@gnu.org>
8177         * util/getroot.c (find_root_device): Rephrase a comment to avoid
8178         spurious warnings about a comment within a comment.
8180 2008-07-25  Robert Millan  <rmh@aybabtu.com>
8182         * util/getroot.c (find_root_device): Skip devices that match
8183         /dev/dm-[0-9].  This lets the real device be found for any type of
8184         abstraction (LVM, EVMS, RAID..).
8185         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
8186         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
8187         device is found first, find_root_device() will now skip it.
8189 2008-07-24  Pavel Roskin  <proski@gnu.org>
8191         * include/grub/types.h: Use __builtin_bswap32() and
8192         __builtin_bswap64() with gcc 4.3 and newer.
8194 2008-07-24  Christian Franke  <franke@computer.org>
8196         * util/i386/pc/grub-install.in: If `--debug' is specified,
8197         pass `--verbose' to grub-setup.
8198         Abort script if make_system_path_relative_to_its_root() fails.
8200 2008-07-24  Bean  <bean123ch@gmail.com>
8202         * configure.ac: Fixed a bug caused by the previous cygwin patch,
8203         variable `target_platform' should be `platform'.
8205 2008-07-24  Bean  <bean123ch@gmail.com>
8207         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
8208         (grub_png_init_fixed_block): New function.
8209         (grub_png_decode_image_data): Handle fixed huffman code compression.
8211 2008-07-24  Bean  <bean123ch@gmail.com>
8213         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
8214         (grub_pe2elf_SOURCES): New macro.
8215         (CLEANFILES): Add grub-pe2elf.
8217         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
8218         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
8219         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
8220         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
8221         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
8222         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
8223         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
8224         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
8225         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
8226         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
8227         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
8228         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
8229         (GRUB_PE32_DT_FUNCTION): Likewise.
8230         (GRUB_PE32_REL_I386_DIR32): Likewise.
8231         (GRUB_PE32_REL_I386_REL32): Likewise.
8232         (grub_pe32_symbol): New structure.
8233         (grub_pe32_reloc): Likewise.
8235         * util/grub-pe2elf.c: New file.
8237         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
8238         start symbol in non pc platform.
8240         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
8242         The following patches are from Christian Franke.
8244         * include/grub/dl.h: Remove .previous, gas supports this only
8245         for ELF format.
8247         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
8248         Remove .type, gas supports this only for ELF format.
8250         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
8251         nullbytes in symbol table. This fixes an infinite loop if table is
8252         zero filled.
8254         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
8255         TARGET_IMG_LDFLAGS and EXEEXT.
8257         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
8258         TARGET_IMG_LDFLAGS_AC.
8259         (grub_CHECK_STACK_ARG_PROBE): New function.
8261         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
8263         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
8265         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
8266         to set TARGET_IMG_LD* accordingly.
8267         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
8268         Add call to grub_CHECK_STACK_ARG_PROBE.
8269         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
8271         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
8273         * genmk.rb: Add EXEEXT to CLEANFILES.
8275 2008-07-23  Robert Millan  <rmh@aybabtu.com>
8277         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
8278         define the codes for arrows and lines used for the menu).
8279         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
8280         as well.
8282         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
8283         fonts, because the latter are too slow.
8285 2008-07-21  Bean  <bean123ch@gmail.com>
8287         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
8288         a20. Run keyboard test last, as it will cause macbook to halt.
8290 2008-07-18  Pavel Roskin  <proski@gnu.org>
8292         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
8293         load foreign architecture modules correctly anyway.  Keep
8294         support for loading host architecture modules, whether we
8295         compile them or not.
8297 2008-07-17  Pavel Roskin  <proski@gnu.org>
8299         * configure.ac: Use -m32 or -m64 regardless of whether we had to
8300         change target_cpu.  The compiler default can mismatch target_cpu
8301         in any case.
8303         * disk/efi/efidisk.c: Fix format warnings on x86_64.
8304         * kern/efi/efi.c: Likewise.
8306         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
8307         target compiler is functional.
8308         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
8309         are set up.
8311         * configure.ac: Default to efi platform for x86_64-apple.  Allow
8312         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
8313         adjustments from the rest, only do them if target is not
8314         explicitly given.  Merge other adjustments with the final sanity
8315         check.  Remove an extraneous check for supported CPU.  Be
8316         specific which CPU and which platform is not supported.
8318         * configure.ac: Default to pc platform for x86_64.
8320 2008-07-17  Robert Millan  <rmh@aybabtu.com>
8322         Partial LinuxBIOS -> Coreboot rename.
8324         * conf/i386-linuxbios.rmk: Renamed to ...
8325         * conf/i386-coreboot.rmk: ... this.
8326         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
8327         * configure.ac: Accept "coreboot" as input platform (but maintain
8328         compatibility with "linuxbios").
8329         * include/grub/i386/linuxbios: Renamed to ...
8330         * include/grub/i386/coreboot: ... this.
8332 2008-07-17  Bean  <bean123ch@gmail.com>
8334         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
8335         (appleldr_mod_SOURCE): New variable.
8336         (appleldr_mod_CFLAGS): Likewise.
8337         (appleldr_mod_LDFLAGS): Likewise.
8338         (pci_mod_SOURCES): Likewise.
8339         (pci_mod_CFLAGS): Likewise.
8340         (pci_mod_LDFLAGS): Likewise.
8341         (lspci_mod_SOURCES): Likewise.
8342         (lspci_mod_CFLAGS): Likewise.
8343         (lspci_mod_LDFLAGS): Likewise.
8345         * conf/x86_64-efi.rmk: New file.
8347         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
8348         macro.
8349         (grub_efidisk_write): Likewise.
8351         * include/efi/api.h (efi_call_0): New macro.
8352         (efi_call_1): Likewise.
8353         (efi_call_2): Likewise.
8354         (efi_call_3): Likewise.
8355         (efi_call_4): Likewise.
8356         (efi_call_5): Likewise.
8357         (efi_call_6): Likewise.
8359         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
8360         grub_rescue_cmd_chainloader.
8362         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
8363         (grub_pe32_optional_header): Change some fields based on i386 or
8364         x86_64 platform.
8365         (GRUB_PE32_PE32_MAGIC): Likewise.
8367         * include/grub/efi/uga_draw.h: New file.
8369         * include/grub/elf.h (STN_ABS): New constant.
8370         (R_X86_64_NONE): Relocation constant for x86_64.
8371         (R_X86_64_64): Likewise.
8372         (R_X86_64_PC32): Likewise.
8373         (R_X86_64_GOT32): Likewise.
8374         (R_X86_64_PLT32): Likewise.
8375         (R_X86_64_COPY): Likewise.
8376         (R_X86_64_GLOB_DAT): Likewise.
8377         (R_X86_64_JUMP_SLOT): Likewise.
8378         (R_X86_64_RELATIVE): Likewise.
8379         (R_X86_64_GOTPCREL): Likewise.
8380         (R_X86_64_32): Likewise.
8381         (R_X86_64_32S): Likewise.
8382         (R_X86_64_16): Likewise.
8383         (R_X86_64_PC16): Likewise.
8384         (R_X86_64_8): Likewise.
8385         (R_X86_64_PC8): Likewise.
8387         * include/grub/i386/efi/pci.h: New file.
8389         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
8390         Change it value based on platform.
8391         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
8392         (GRUB_E820_RAM): Likewise.
8393         (GRUB_E820_RESERVED): Likewise.
8394         (GRUB_E820_ACPI): Likewise.
8395         (GRUB_E820_NVS): Likewise.
8396         (GRUB_E820_EXEC_CODE): Likewise.
8397         (GRUB_E820_MAX_ENTRY): Likewise.
8398         (grub_e820_mmap): New structure.
8399         (linux_kernel_header): Change the efi field according to different
8400         kernel version, also field from linux_kernel_header.
8402         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
8404         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
8405         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
8406         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
8407         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
8408         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
8409         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
8410         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
8411         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
8412         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
8413         (GRUB_PCI_ADDR_IO_MASK): Likewise.
8415         * include/grub/x86_64/efi/kernel.h: New file.
8417         * include/grub/x86_64/efi/loader.h: Likewise.
8419         * include/grub/x86_64/efi/machine.h: Likewise.
8421         * include/grub/x86_64/efi/pci.h: Likewise.
8423         * include/grub/x86_64/efi/time.h: Likewise.
8425         * include/grub/x86_64/linux.h: Likewise.
8427         * include/grub/x86_64/setjmp.h: Likewise.
8429         * include/grub/x86_64/time.h: Likewise.
8431         * include/grub/x86_64/types.h: Likewise.
8433         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
8434          GRUB_TARGET_SIZEOF_VOID_P.
8436         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
8437         (grub_efi_locate_handle): Likewise.
8438         (grub_efi_open_protocol): Likewise.
8439         (grub_efi_set_text_mode): Likewise.
8440         (grub_efi_stall): Likewise.
8441         (grub_exit): Likewise.
8442         (grub_reboot): Likewise.
8443         (grub_halt): Likewise.
8444         (grub_efi_exit_boot_services): Likewise.
8445         (grub_get_rtc): Likewise.
8447         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
8448         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
8449         (grub_efi_allocate_pages): Wrap efi calls.
8450         (grub_efi_free_pages): Wrap efi calls.
8451         (grub_efi_get_memory_map): Wrap efi calls.
8453         * kern/x86_64/dl.c: New file.
8455         * kern/x86_64/efi/callwrap.S: Likewise.
8457         * kern/x86_64/efi/startup.S: Likewise.
8459         * loader/efi/appleloader.c: Likewise.
8461         * loader/efi/chainloader.c (cmdline): New variable.
8462         (grub_chainloader_unload): Wrap efi calls.
8463         (grub_chainloader_boot): Likewise.
8464         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
8465         command line.
8467         * loader/efi/chainloader_normal.c (chainloader_command):
8468         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
8469         command line.
8471         * loader/i386/efi/linux.c (allocate_pages): Change allocation
8472         method.
8473         (grub_e820_add_region): New function.
8474         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
8475         booting.
8476         (grub_find_video_card): New function.
8477         (grub_linux_setup_video): New function.
8478         (grub_rescue_cmd_linux): Probe for video information.
8480         * normal/x86_64/setjmp.S: New file.
8482         * term/efi/console.c (map_char): New function.
8483         (grub_console_putchar): Map unicode char.
8484         (grub_console_checkkey): Wrap efi calls.
8485         (grub_console_getkey): Likewise.
8486         (grub_console_getwh): Likewise.
8487         (grub_console_gotoxy): Likewise.
8488         (grub_console_cls): Likewise.
8489         (grub_console_setcolorstate): Likewise.
8490         (grub_console_setcursor): Likewise.
8492         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
8494 2008-07-16  Pavel Roskin  <proski@gnu.org>
8496         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
8497         format strings.
8499         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
8500         pointer, not an integer.  This fixes a warning and prevents
8501         precision loss on 64-bit systems.
8502         (relocate_addresses): Remove unneeded cast.
8504 2008-07-15  Pavel Roskin  <proski@gnu.org>
8506         * kern/i386/ieee1275/init.c: Include grub/cache.h.
8508         * term/ieee1275/ofconsole.c: Disable code unused on i386.
8510         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
8511         Fix comparison between signed and unsigned.
8513         * include/grub/i386/ieee1275/console.h: Declare
8514         grub_console_init() and grub_console_fini().
8516         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
8517         It's empty and unused.
8519         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
8520         beginning to avoid warnings with some compilers.
8522         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
8523         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
8525 2008-07-14  Pavel Roskin  <proski@gnu.org>
8527         * kern/env.c (grub_register_variable_hook): Don't copy empty
8528         string, it leaks memory.  Pass "" to grub_env_set(), it should
8529         handle constant strings.
8531         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
8532         * commands/cmp.c (grub_cmd_cmp): Likewise.
8533         * kern/dl.c (grub_dl_flush_cache): Likewise.
8534         (grub_dl_load_core): Likewise.
8535         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
8536         (grub_elf64_load_phdrs): Likewise.
8538 2008-07-13  Pavel Roskin  <proski@gnu.org>
8540         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
8541         between signed and unsigned.
8542         (LzmaEnc_Finish): Fix warning about an unused parameter.
8544 2008-07-13  Bean  <bean123ch@gmail.com>
8546         * Makefile.in (enable_lzo): New rule.
8548         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
8550         * configure.ac (ENABLE_LZO): New option --enable-lzo.
8552         * boot/i386/pc/lnxboot.S: #include <config.h>.
8554         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
8555         its value according to the compression algorithm used, lzo or lzma.
8557         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
8558         compression algorithm according to configure macro.
8560         * kern/i386/pc/startup.S (codestart): Likewise.
8562         * kern/i386/pc/lzma_decode.S: New file.
8564         * include/grub/lib/LzFind.h: Likewise.
8566         * include/grub/lib/LzHash.h: Likewise.
8568         * include/grub/lib/LzmaDec.h: Likewise.
8570         * include/grub/lib/LzmaEnc.h: Likewise.
8572         * include/grub/lib/LzmaTypes.h: Likewise.
8574         * lib/LzFind.c: Likewise.
8576         * lib/LzmaDec.c: Likewise.
8578         * lib/LzmaEnc.c: Likewise.
8580 2008-07-13  Bean  <bean123ch@gmail.com>
8582         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
8583         (grub_ext4_extent_header): New structure.
8584         (grub_ext4_extent): Likewise.
8585         (grub_ext4_extent_idx): Likewise.
8586         (grub_ext4_find_leaf): New function.
8587         (grub_ext2_read_block): Handle extents.
8589 2008-07-12  Robert Millan  <rmh@aybabtu.com>
8591         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
8593 2008-07-11  Robert Millan  <rmh@aybabtu.com>
8595         * util/grub.d/40_custom.in: New file. Example on how to add custom
8596         entries to /etc/grub.d.
8597         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
8598         40_custom (implicitly, by merging all the grub.d rules).
8600 2008-07-11  Pavel Roskin  <proski@gnu.org>
8602         * commands/read.c (grub_getline): Fix invalid memory access.
8603         Don't add newline to the variable value.
8605         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
8606         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
8607         (serial_hw_get_port): Check validity of the port number.
8608         (grub_cmd_serial): Check return value of serial_hw_get_port().
8610 2008-07-07  Pavel Roskin  <proski@gnu.org>
8612         * boot/i386/pc/diskboot.S (notification_string): Replace
8613         "Loading kernel" with just "loading".  This is shorter, less
8614         confusing and saves a few bytes for possible future changes.
8616 2008-07-05  Pavel Roskin  <proski@gnu.org>
8618         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
8619         size for ATAPI devices, they are undefined.  Output sector
8620         number in decimal form.
8622         * disk/ata.c: Use named constants for status bits.
8624 2008-07-04  Pavel Roskin  <proski@gnu.org>
8626         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
8627         grub_addr_t before casting it to the void pointer to fix a
8628         warning.  Non-addressable regions are discarded earlier.
8629         (grub_arch_modules_addr): Cast _end to grub_addr_t.
8630         * kern/i386/linuxbios/table.c: Include grub/misc.h.
8631         (check_signature): Don't shadow table_header.
8632         (grub_linuxbios_table_iterate): Cast numeric constants to
8633         grub_linuxbios_table_header_t.
8634         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
8635         grub_stop().
8637         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
8638         prevent warnings.
8640         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
8641         pointer, which can cause warnings.  Support 64-bit addresses.
8643         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
8644         of sizeof(long).  This fixes PowerPC image generation on x86_64.
8646 2008-07-04  Robert Millan  <rmh@aybabtu.com>
8648         This fixes a performance issue when pc & gpt partmap iterators
8649         didn't abort iteration even after our hook found what it was
8650         looking for (often causing expensive probes of non-existent drives).
8652         Some callers relied on previous buggy behaviour, since they would
8653         raise an error when their own hooks caused early abortion of its
8654         iteration.
8656         * kern/device.c (grub_device_open): Improve error message.
8657         * disk/lvm.c (grub_lvm_open): Likewise.
8658         * disk/raid.c (grub_raid_open): Likewise.
8660         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
8661         when hook requests it, independently of grub_errno.
8662         (pc_partition_map_probe): Do not fail when find_func() caused
8663         early abortion of pc_partition_map_iterate().
8665         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
8666         when hook requests it, independently of grub_errno.
8667         (gpt_partition_map_probe): Do not fail when find_func() caused
8668         early abortion of gpt_partition_map_iterate().
8670         * kern/partition.c (grub_partition_iterate): Abort parent iteration
8671         when hook requests it, independently of grub_errno.  Do not fail when
8672         part_map_iterate_hook() caused early abortion of p->iterate().
8674         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
8675         when grub_partition_iterate() returned with non-zero.
8677 2008-07-03  Pavel Roskin  <proski@gnu.org>
8679         * disk/ata.c (grub_ata_pio_write): Check status before writing,
8680         like we do in grub_ata_pio_read().
8681         (grub_ata_readwrite): Always write individual sectors.  Fix the
8682         sector count for the remainder.
8683         (grub_ata_write): Enable writing to ATA devices.  Correctly
8684         report error for ATAPI devices.
8686 2008-07-02  Pavel Roskin  <proski@gnu.org>
8688         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
8689         warning.
8691         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
8692         for every read sector, we already increment it for the whole
8693         batch.  This fixes reading more than 256 sectors at once.
8695         * util/grub-editenv.c (cmd_info): Cast argument to long
8696         explicitly.  ptrdiff_t reduces to int on i386.
8698         * util/grub-editenv.c (main): Be specific which parameter is
8699         missing.
8701         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
8702         (memdisk): Make memdisk_orig_addr a pointer.
8704         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
8705         for file offsets, use grub_off_t instead.  Fix printf format
8706         warnings.
8708         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
8709         there.  Real unexpected warnings should not drown in the noise
8710         about known problems.
8712         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
8713         grub_disk_addr_t for memory addresses.
8715         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
8716         explicitly to fix a warning.
8718         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
8720         * Makefile.in (MODULE_LDFLAGS): New variable.
8721         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
8722         the linker accepts --build-id=none.
8723         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
8724         MODULE_LDFLAGS.
8725         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
8727         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
8728         those in Linux XFS code.  Provide a way to access 64-bit parent
8729         inode.
8730         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
8731         the end of struct grub_xfs_dir_header.
8733 2008-07-02  Bean  <bean123ch@gmail.com>
8735         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
8736         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8737         and GRUB_IEEE1275_FLAG_NO_ANSI.
8739         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
8740         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8741         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
8743         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
8744         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
8746         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
8747         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
8749         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
8750         esc sequence on non ANSI terminal.
8751         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
8753         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
8754         beginning of file.
8756 2008-07-02  Bean  <bean123ch@gmail.com>
8758         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
8759         (grub_editenv_SOURCES): New variable.
8760         (pkglib_MODULES): Add loadenv.mod.
8761         (loadenv_mod_SOURCES): New variable.
8762         (loadenv_mod_CFLAGS): Likewise.
8763         (loadenv_mod_LDFLAGS): Likewise.
8765         * include/grub/envblk.h: New file.
8767         * util/envblk.c: New file.
8769         * util/grub-editenv.c: New file.
8771         * commands/loadenv.c: New file.
8773 2008-07-01  Pavel Roskin  <proski@gnu.org>
8775         * include/multiboot2.h (struct multiboot_tag_module): Use char,
8776         not unsigned char.  This fixes warnings and is consistent with
8777         other tags.
8779         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
8781         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
8783         * term/tparm.c (analyze): Always set *popcount.
8785         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
8786         cast to fix a warning.
8788         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
8789         cast to suppress a warning.
8791         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
8792         grub_fshelp_read_file() expects.
8794         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
8795         write uuid as a 32-bit value in CPU byte order, so declare and
8796         use it as such.
8798         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
8799         long if the format specifier expects it.
8800         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
8801         * partmap/pc.c (pc_partition_map_iterate): Likewise.
8802         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
8803         long to fix a warning.
8804         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
8805         grub_dprintf() arguments to fix warnings.
8807 2008-06-30  Pavel Roskin  <proski@gnu.org>
8809         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
8810         install_bsd_part immediately before core.img is embedded or
8811         modified on disk.  This fixes core.img verification if core.img
8812         cannot be embedded.
8814         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
8815         core_path to calculate the blocklist.
8816         Patch from Javier Martín <lordhabbit@gmail.com>
8818 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8820         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
8821         block to disk block.
8822         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
8823         Patch from Niels Böhm <bitbucket@arcor.de>
8825 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8827         * util/update-grub_lib.in (font_path): Search for fonts in
8828         /boot/grub first, which is more likely to be readable (we aren't
8829         deciding where fonts live, just looking for them).
8831 2008-06-26  Pavel Roskin  <proski@gnu.org>
8833         * util/biosdisk.c (read_device_map): Don't leave dead map
8834         entries for devices failing stat() check.
8836         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
8837         core_path_dev for the core.img path on the target device.
8839 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8841         * disk/fs_uuid.c: New file.
8842         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
8843         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
8844         (fs_uuid_mod_LDFLAGS): New variables.
8845         * include/grub/disk.h (grub_disk_dev_id): Add
8846         `GRUB_DISK_DEVICE_UUID_ID'.
8847         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
8848         implement iterate().
8850 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8852         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
8853         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
8854         Linux image includes no initrd.
8856 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
8858         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
8859         call to resolve the core image location that effectively appended the
8860         name twice.
8862 2008-06-21  Robert Millan  <rmh@aybabtu.com>
8864         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
8865         call from here ...
8867         * util/grub.d/10_hurd.in: ... to here ...
8868         * util/grub.d/10_linux.in: ... and here.
8870 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8872         * kern/main.c (grub_main): Export `prefix' variable immediately
8873         after it has been set by grub_machine_set_prefix().
8875 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8877         * commands/search.c (search_label, search_fs_uuid, search_file): Print
8878         search result when not saving to variable, not the other way around.
8879         When saving to variable, abort iteration as soon as a match is found.
8881 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8883         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
8884         check for partition that provides /boot/grub.  Its logic is flawed,
8885         as it prevents prepare_grub_to_access_device() from being called
8886         multiple times.
8888 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8890         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
8891         "insmod" command directly when abstraction modules are needed,
8892         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
8893         since it had already been processed).
8895 2008-06-19  Pavel Roskin  <proski@gnu.org>
8897         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
8898         changed.  This is needed in case GRUB_LIBDIR changes.
8899         * conf/i386-ieee1275.rmk: Likewise.
8900         * conf/i386-linuxbios.rmk: Likewise.
8901         * conf/i386-pc.rmk: Likewise.
8902         * conf/powerpc-ieee1275.rmk: Likewise.
8904 2008-06-18  Pavel Roskin  <proski@gnu.org>
8906         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
8907         kernel_elf_symlist.c to symlist.c for consistency with other
8908         architectures.  Update all users.
8909         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8911 2008-06-18  Robert Millan  <rmh@aybabtu.com>
8913         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
8914         it in prefix.
8916         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
8917         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
8918         a RAID device, run setup() for all members independently on whether
8919         LVM abstraction is being used.
8920         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
8921         If grub-mkimage has set `*install_dos_part == -2', don't override this
8922         value.
8923         Perform *install_dos_part adjustments independently on whether
8924         we're embedding or not.
8925         Clarify error message when image is too big for embedding.
8926         Remove duplicate *install_dos_part stanza.
8928 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8930         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
8931         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
8932         variables.
8933         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
8934         values in grub_ofconsole_normal_color and
8935         grub_ofconsole_highlight_color (they're not directly related to
8936         background and foreground).
8937         (grub_ofconsole_setcolorstate): Extract background and foreground
8938         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
8940 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8942         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
8943         /boot/grub for the check in last commit, not /boot (they could be
8944         different partitions).
8946 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8948         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
8949         asked to setup access for the same partition that provides /boot,
8950         don't bother using UUIDs since our root already has the value we
8951         want.
8953 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8955         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
8956         I2O devices.
8957         Patch from Sven Mueller <sven@debian.org>.
8959 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8961         * util/update-grub.in: Check for $EUID instead of $UID.
8962         Reported by Vincent Zweije.
8964 2008-06-16  Bean  <bean123ch@gmail.com>
8966         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
8967         (grub_ext2_read_block): Likewise.
8968         (grub_ext2_read_inode): Likewise.
8969         (grub_ext2_mount): Likewise.
8970         (grub_ext2_close): Likewise.
8971         (grub_ext3_get_journal): Removed.
8973         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
8974         (grub_reiserfs_read_symlink): Likewise.
8975         (grub_reiserfs_mount): Likewise.
8976         (grub_reiserfs_open): Likewise.
8977         (grub_reiserfs_read): Likewise.
8978         (grub_reiserfs_close): Likewise.
8979         (grub_reiserfs_get_journal): Removed.
8981         * fs/fshelp.c (grub_fshelp_read): Removed.
8982         (grub_fshelp_map_block): Likewise.
8984         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
8985         (grub_fshelp_journal): Likewise.
8986         (grub_fshelp_read): Likewise.
8987         (grub_fshelp_map_block): Likewise.
8989 2008-06-16  Pavel Roskin  <proski@gnu.org>
8991         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
8992         floating point anymore.
8993         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
8995 2008-06-15  Pavel Roskin  <proski@gnu.org>
8997         * commands/ls.c (grub_ls_list_files): Use integer calculations
8998         for human readable format, avoid floating point use.
8999         * kern/misc.c (grub_ftoa): Remove.
9000         (grub_vsprintf): Remove floating point support.
9002 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9004         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
9005         devices.
9006         Reported by Max Vozeler.
9008 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9010         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
9011         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
9012         skipped later.
9013         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
9014         the beginning of the prefix.
9016         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
9017         It is assumed that if we have a memdisk, grub-mkimage has set
9018         grub_prefix to include the "(memdisk)" drive in it.
9020 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9022         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
9023         Initialize keyboard controller after registering the terminal, so that
9024         grub_printf() can be called from grub_keyboard_controller_init().
9026 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9028         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
9029         extent-btree which is written as big endian on disk.
9030         Reported by Alain Greppin  <al@chilibi.org>.
9032 2008-06-14  Robert Millan  <rmh@aybabtu.com>
9034         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
9035         * util/i386/pc/grub-install.in (modules): Likewise.
9037 2008-06-13  Pavel Roskin  <proski@gnu.org>
9039         * commands/ls.c (grub_ls_list_files): Fix format warnings.
9041 2008-06-13  Bean  <bean123ch@gmail.com>
9043         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
9045         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
9047         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
9048         to indicate sparse block.
9050 2008-06-12  Pavel Roskin  <proski@gnu.org>
9052         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
9053         number, grub_fshelp_read() does it for us.
9055         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
9056         linear disk read with journal translation.
9057         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
9058         * include/grub/fshelp.h: Declare grub_fshelp_read().
9060 2008-06-09  Pavel Roskin  <proski@gnu.org>
9062         * fs/minix.c (grub_minix_mount): Handle error reading
9063         superblock.
9065 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9067         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
9068         don't append the RAID prefix afterwards.
9069         Reported by Clint Adams.
9071 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9073         Based on description from Pavel:
9074         * kern/disk.c (grub_disk_check_range): Rename to ...
9075         (grub_disk_adjust_range): ... this.  Add a comment explaining the
9076         tasks performed by this function.
9078 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9080         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
9081         `num_serial' (for consistency with other variables).
9082         (struct grub_ntfs_data): Add `uuid' member.
9083         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
9084         (grub_ntfs_uuid): New function.
9085         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
9087 2008-06-07  Pavel Roskin  <proski@gnu.org>
9089         * util/biosdisk.c (open_device): Revert last change to the
9090         function, it broke installation.  The sector needs to be
9091         different dependent on which device is opened.
9093 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9095         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
9096         rest of GRUB, and breakage doesn't happen if its value were modified.
9098         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9099         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
9100         a constant (same value).
9101         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
9102         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
9104 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9106         * util/biosdisk.c (open_device): Do not modify sector offset when
9107         accessing a partition.  kern/disk.c already handles this for us.
9109 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9111         * util/grub-emu.c (grub_machine_init): Move code in this function from
9112         here ...
9113         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
9114         segfault in case grub_printf() is called).
9116         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
9117         grub_probe.  Update all users not to explicitly add it again.
9118         (grub_device): New variable; contains corresponding device for grubdir.
9119         (fs_module, partmap_module, devabstraction_module): Pass
9120         `--device ${grub_device}' to grub_probe to avoid traversing /dev
9121         every time.
9123 2008-06-05  Robert Millan  <rmh@aybabtu.com>
9125         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
9126         is found, print it (same layout as with labels).
9128 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9130         * util/biosdisk.c (get_drive): Rename to ...
9131         (find_grub_drive): ... this.  Update all users.
9133         (get_os_disk): Rename to ...
9134         (convert_system_partition_to_system_disk): ... this.  Update all users.
9136         (find_drive): Rename to ...
9137         (find_system_device): ... this.  Update all users.
9139 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9141         * util/biosdisk.c (get_os_disk): Handle IDA devices.
9142         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9143         (make_device_map): Likewise.
9145 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9147         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
9148         before dereferencing it.
9150         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
9151         union with fat12/fat16-specific ones.  Add some new fields, including
9152         `num_serial' for both versions.
9153         (struct grub_fat_data): Add `uuid' member.
9154         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
9155         names.  Initialize `data->uuid' using `num_serial'.
9156         (grub_fat_uuid): New function.
9157         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
9159         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
9160         (grub_reiserfs_uuid): New function.
9161         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
9162         member.
9164         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
9165         (grub_xfs_uuid): New function.
9166         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
9168 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9170         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
9171         code that is backward compatible with pre-uuid search command.
9173 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9175         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
9176         floppies after everything else, to ensure floppy drive isn't accessed
9177         unnecessarily (patch from Bean).
9179 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9181         * commands/search.c (search_label, search_fs_uuid, search_file): Do
9182         not print device names when we were asked to set a variable.
9184 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9186         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
9187         using "cursor-on" and "cursor-off" commands (understood at least by
9188         the Open Firmware flavour on OLPC).
9190 2008-05-31  Michael Gorven  <michael@gorven.za.net>
9192         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
9193         on and off sequences.
9195 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9197         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
9198         * util/update-grub.in: Likewise.
9200 2008-05-30  Pavel Roskin  <proski@gnu.org>
9202         * util/biosdisk.c (linux_find_partition): Simplify logic and
9203         make the code more universal.  Keep special processing for
9204         devfs, but use a simple rule for all other devices.  If the
9205         device ends with a number, append 'p' and the partition number.
9206         Otherwise, append only the partition number.
9208 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9210         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
9211         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
9212         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
9213         the `root' parameter to Linux.
9215 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9217         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
9218         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
9219         --fs_uuid with --fs-uuid.
9220         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
9221         all filesystems support them).
9223 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9225         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
9226         grub_printf() flags, since we're printing in units of 2 bytes.
9228 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9230         * util/grub.d/00_header.in: Remove obsolete comment referencing
9231         convert_system_path_to_grub_path().
9232         * util/update-grub.in: Likewise.
9233         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
9234         (convert_system_path_to_grub_path): Add a warning message explaining
9235         that this function is deprecated.  Rely on is_path_readable_by_grub()
9236         for the readability checks.
9237         (font_path): Use is_path_readable_by_grub() for the readability
9238         check rather than convert_system_path_to_grub_path().
9240 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9242         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
9243         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
9244         converting it first.
9245         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
9246         grub.cfg for access to font file, and afterwards call it again to set
9247         the root device.
9249 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9251         * commands/search.c (options): Add --fs_uuid option.
9252         (search_fs_uuid): New function.
9253         (grub_cmd_search): Fix --set argument passing.
9254         Use search_fs_uuid() when requested via --fs_uuid.
9255         (grub_search_init): Update help message.
9256         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
9257         and redeclare it as an array of 16-bit words.
9258         (grub_ext2_uuid): New function.
9259         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
9260         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
9261         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
9262         (GRUB_DEVICE_BOOT_UUID): New variables.
9263         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
9264         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
9265         whenever possible.
9266         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
9267         just assume `root' variable has the right value.
9268         * util/grub.d/10_linux.in: Likewise.
9269         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
9270         via PRINT_FS_UUID.
9271         (main): Recognise `-t fs_uuid' argument.
9273 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9275         * util/biosdisk.c (map): Redefine structure to hold information
9276         about GRUB drive name.
9277         (get_drive): Reimplement without assuming (and verifying) BIOS-like
9278         drive names.
9279         (call_hook): Remove.
9280         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
9281         member.  Assume drive has partitions.
9282         (grub_util_biosdisk_open): Access device names via `.device' struct
9283         member.
9284         (open_device): Likewise.
9285         (find_drive): Likewise.
9286         (read_device_map): Adjust map[] usage to match the new struct
9287         definition.  Don't check for duplicates (still possible, but not cheap
9288         anymore).
9289         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
9290         (make_device_name): Remove assumption of BIOS-like drive names.
9292 2008-05-30  Pavel Roskin  <proski@gnu.org>
9294         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
9295         compiling execute.c doesn't need grub_script.tab.h anymore.
9296         (normal/command.c_DEPENDENCIES): Likewise.
9297         (normal/function.c_DEPENDENCIES): Likewise.
9298         * conf/i386-ieee1275.rmk: Likewise.
9299         * conf/i386-linuxbios.rmk: Likewise.
9300         * conf/i386-pc.rmk: Likewise.
9301         * conf/powerpc-ieee1275.rmk: Likewise.
9302         * conf/sparc64-ieee1275.rmk: Likewise.
9304 2008-05-29  Pavel Roskin  <proski@gnu.org>
9306         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
9307         when scanning metadata for volume group name.
9309         * include/grub/script.h: Don't include grub_script.tab.h.  It's
9310         a generated file, which may only be included from the files with
9311         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
9312         use union YYSTYPE, as the later allows forward declaration.
9313         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
9315 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9317         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
9318         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
9319         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
9320         (grub_console_checkkey): Add grub_dprintf() call to report unknown
9321         scan codes.
9323 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9325         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
9326         control key combinations.
9328 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9330         * util/powerpc/ieee1275/grub-install.in: Move from here ...
9331         * util/ieee1275/grub-install.in: ... to here.
9332         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
9333         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
9334         (grub_install_SOURCES): Likewise.
9336 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9338         * fs/affs.c: Update copyright year.
9339         * fs/ext2.c: Likewise.
9340         * fs/fshelp.c: Likewise.
9341         * fs/hfsplus.c: Likewise.
9342         * fs/ntfs.c: Likewise.
9343         * fs/xfs.c: Likewise.
9344         * include/grub/fshelp.h: Likewise.
9345         * util/grub-mkdevicemap.c: Likewise.
9347 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9349         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
9350         might need to be fatfs to support some firmware implementations
9351         (e.g. OFW or EFI).
9353 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9355         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
9356         devices.
9357         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9358         (make_device_map): Likewise.
9360 2008-05-20  Bean  <bean123ch@gmail.com>
9362         * fs/fshelp.c (grub_fshelp_map_block): New function.
9363         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
9364         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
9366         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
9367         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
9368         (grub_fshelp_journal): New structure.
9369         (grub_fshelp_map_block): New function prototype.
9370         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
9371         (grub_fshelp_map_block): Likewise.
9373         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
9374         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
9375         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
9376         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
9377         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
9378         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
9379         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
9380         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
9381         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
9382         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
9383         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
9384         (grub_ext2_sblock): New members for journal support.
9385         (grub_ext3_journal_header): New structure.
9386         (grub_ext3_journal_revoke_header): Likewise.
9387         (grub_ext3_journal_block_tag): Likewise.
9388         (grub_ext3_journal_sblock): Likewise.
9389         (grub_fshelp_node): New members logfile and journal.
9390         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
9391         grub_fshelp_map_block to get real block number.
9392         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
9393         number.
9394         (grub_ext2_read_inode): Likewise.
9395         (grub_ext3_get_journal): New function.
9396         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
9397         (grub_ext2_close): Release memory used by journal.
9399         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
9400         (REISERFS_MAGIC_DESC_BLOCK): New macro.
9401         (grub_reiserfs_transaction_header): Renamed to
9402         grub_reiserfs_description_block, replace field data with real_blocks.
9403         (grub_reiserfs_commit_block): New structure.
9404         (grub_reiserfs_data): New member journal.
9405         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
9406         number.
9407         (grub_reiserfs_read_symlink): Likewise.
9408         (grub_reiserfs_iterate_dir): Likewise.
9409         (grub_reiserfs_open): Likewise.
9410         (grub_reiserfs_read): Likewise.
9411         (grub_reiserfs_get_journal): New function.
9412         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
9413         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
9414         using grub_reiserfs_get_journal.
9415         (grub_reiserfs_close): Release memory used by journal.
9417         * fs/affs.c (grub_affs_read_block): Change block type to
9418         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
9420         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
9422         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
9424         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
9426         * fs/udf.c (grub_udf_read_block): Change block type to
9427         grub_disk_addr_t. Use type cast to avoid warning.
9429         * fs/xfs.c (grub_xfs_read_block): Likewise.
9431 2008-05-16  Christian Franke  <franke@computer.org>
9433         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
9434         to ensure that break with ESC will always work.
9435         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
9436         Remove ESC from keyboard queue.
9438 2008-05-16  Christian Franke  <franke@computer.org>
9440         * util/biosdisk.c: [__CYGWIN__] Add includes.
9441         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
9442         (get_os_disk): Move variable declarations to OS specific
9443         parts to avoid warning.
9444         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
9445         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
9446         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
9447         Cygwin.
9448         * util/getroot.c: [__CYGWIN__] Add includes.
9449         (strip_extra_slashes): Fix "/" case.
9450         [__CYGWIN__] (get_win32_path): New function.
9451         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
9452         [__CYGWIN__] (find_root_device): Disable.
9453         [__CYGWIN__] (get_bootsec_serial): New function.
9454         [__CYGWIN__] (find_cygwin_root_device): Likewise.
9455         [__linux__] (grub_guess_root_device): Add early returns to simplify
9456         structure.
9457         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
9458         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
9459         check for Linux only.
9461 2008-05-15  Bean  <bean123ch@gmail.com>
9463         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
9464         keyboard hang problem in apple's intel mac.
9466 2008-05-09  Robert Millan  <rmh@aybabtu.com>
9468         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
9469         devices.
9470         * util/grub-mkdevicemap.c (get_virtio_disk_name)
9471         (make_device_map): Likewise.
9472         Reported by Aurelien Jarno <aurel32@debian.org>
9474 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
9476         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
9477         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
9478         (make_device_map): Output entries for xvd type disks.
9480 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9482         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
9483         devices.
9484         * util/grub-mkdevicemap.c (get_cciss_disk_name)
9485         (make_device_map): Likewise.
9486         Reported by Roland Dreier <rdreier@cisco.com>
9488 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9490         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
9491         grub_strstr() call.  Correct a few mistakes in failure path handling.
9493 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9495         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9496         Do not print a trailing slash (therefore, the root directory is an
9497         empty string).
9498         (convert_system_path_to_grub_path): Do not remove trailing slash
9499         from make_system_path_relative_to_its_root() output.
9501         * util/i386/pc/grub-install.in: Add trailing slash to output from
9502         make_system_path_relative_to_its_root().
9504 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9506         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
9507         ensures that output lines aren't intermangled with those sent to
9508         stderr (via grub_util_info()).
9509         * util/grub-probe.c (grub_refresh): Likewise.
9510         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
9512 2008-05-05  Christian Franke  <franke@computer.org>
9514         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
9515         Add Cygwin device names.
9516         (get_ide_disk_name) [__CYGWIN__]: Likewise.
9517         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
9518         (check_device): Return error instead of success on empty name.
9519         (make_device_map): Move label inside linux specific code to
9520         prevent compiler warning.
9522 2008-04-30  Robert Millan  <rmh@aybabtu.com>
9524         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
9525         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
9526         first boot option.
9527         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
9529 2008-04-29  Robert Millan  <rmh@aybabtu.com>
9531         * docs/grub.cfg: New file (example GRUB configuration).
9533 2008-04-26  Robert Millan  <rmh@aybabtu.com>
9535         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
9536         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
9537         and `disk/ieee1275/nand.c'.
9539 2008-04-25  Bean  <bean123ch@gmail.com>
9541         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
9542         i386-linuxbios.
9544         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
9545         change the buffer size to 4096 for cdrom device.
9547         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
9548         and nand.mod.
9549         (_linux_mod_SOURCES): New variable.
9550         (_linux_mod_CFLAGS): Likewise.
9551         (_linux_mod_LDFLAGS): Likewise.
9552         (linux_mod_SOURCES): Likewise.
9553         (linux_mod_CFLAGS): Likewise.
9554         (linux_mod_LDFLAGS): Likewise.
9555         (nand_mod_SOURCES): Likewise.
9556         (nand_mod_CFLAGS): Likewise.
9557         (nand_mod_LDFLAGS): Likewise.
9559         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
9560         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
9561         type property. (nand device in olpc don't have this property)
9563         * include/grub/disk.h (grub_disk_dev_id): New macro
9564         GRUB_DISK_DEVICE_NAND_ID.
9566         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
9567         function prototype.
9568         (grub_rescue_cmd_initrd): Likewise.
9570         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
9571         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
9572         ofw_cif_handler and ofw_idt, adjust padding number.
9574         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
9575         GRUB_MACHINE_IEEE1275 is defined.
9577         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
9578         Use NESTED_FUNC_ATTR attribute on the hook parameter.
9580         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
9581         on nested function heap_init.
9582         (grub_upper_mem): New variable for i386-ieee1275.
9583         (grub_get_extended_memory): New function for i386-ieee1275.
9584         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
9586         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
9587         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
9588         property.
9590         * loader/i386/ieee1275/linux.c: New file.
9592         * loader/i386/ieee1275/linux_normal.c: New file.
9594         * disk/ieee1275/nand.c: New file.
9596 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
9598         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
9599         value.
9600         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
9602 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9604         Restructures early code path on ieee1275 to unify grub_main() as
9605         the first C function that is executed in every platform.
9607         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
9608         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
9609         cmain().
9610         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
9611         * kern/ieee1275/cmain.c (cmain): Rename to ...
9612         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
9613         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
9614         at the beginning.
9616 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9618         * util/update-grub.in: Fix syntax error when setting
9619         `GRUB_PRELOAD_MODULES'.
9620         Reported by Stephane Chazelas <stephane@artesyncp.com>
9622 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
9624         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
9625         section into account, newer toolchains generate unique build ids
9626         * configure.ac: remove the test for --build-id=none acceptance,
9627         we want build ids to be preserved
9628         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
9629         far from other sections don't cause the raw binary images grow
9630         size
9632 2008-04-15  Robert Millan  <rmh@aybabtu.com>
9634         * disk/lvm.c: Update copyright year.
9635         * kern/misc.c: Likewise.
9637 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9639         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
9640         there is no memory left for physical volume name.
9642 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9644         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
9645         volume name mapping to support bigger than 9 character names properly.
9647 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9649         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
9650         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
9652 2008-04-13  Christian Franke  <franke@computer.org>
9654         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
9655         to create a floppy emulation boot CD when non emulation mode
9656         does not work.
9657         Enable Joliet CD filesystem extension.
9659 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9661         * kern/misc.c (grub_strncat): Fix off-by-one error.
9662         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
9664         * kern/env.c (grub_env_context_close): Clear current context, not
9665         previous one.
9666         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
9668         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
9670 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9672         Improve robustness when handling LVM.
9674         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
9675         (and leave `*p' unmodified).
9676         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
9677         through it.
9678         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
9679         iterating through it.
9680         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
9681         through it.
9682         (grub_lvm_scan_device): Check the return value (and fail gracefully
9683         when due) on each grub_lvm_getvalue() or grub_strstr() call.
9684         Don't assume `vg->pvs != NULL' when iterating through it.
9686 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9688         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
9689         * genmk.rb (partmap): New variable.
9690         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
9691         (#{partmap}): New target rule.
9692         * genpartmaplist.sh: New file.
9693         * Makefile.in (pkglib_DATA): Add partmap.lst.
9694         (partmap.lst): New target rule.
9695         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
9696         modules (including all partition maps), instead of preloading them.
9698 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
9700         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
9701         `linux-boot-prober' (if installed) to detect other operating
9702         systems which are installed on the computer and add them to
9703         the boot menu.
9704         * conf/common.rmk: Build and install 30_os-prober.
9706 2008-04-12  Robert Millan  <rmh@aybabtu.com>
9708         * kern/powerpc/ieee1275/init.c: Move from here ...
9709         * kern/ieee1275/init.c: ... to here.  Update all users.
9711         * kern/powerpc/ieee1275/cmain.c: Move from here ...
9712         * kern/ieee1275/cmain.c: ... to here.  Update all users.
9714         * kern/powerpc/ieee1275/openfw.c: Move from here ...
9715         * kern/ieee1275/openfw.c: ... to here.  Update all users.
9717         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
9718         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
9720 2008-04-10  Pavel Roskin  <proski@gnu.org>
9722         * configure.ac: Always use "_cv_" in cache variables for
9723         compatibility with Autoconf 2.62.
9725 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9727         Revert grub/machine/init.h addition by Pavel (since it breaks on
9728         i386-ieee1275 and others):
9729         * util/i386/pc/misc.c: Remove grub/machine/init.h.
9730         * util/powerpc/ieee1275/misc.c: Likewise.
9732 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9734         * util/grub-probe.c (probe): Improve error message.
9736 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9738         * util/biosdisk.c (read_device_map): Skip devices that don't exist
9739         (this prevents the presence of a bogus entry from ruining the whole
9740         thing).
9742 2008-04-06  Pavel Roskin  <proski@gnu.org>
9744         * util/biosdisk.c: Include grub/util/biosdisk.h.
9745         * util/grub-fstest.c (execute_command): Make static.
9746         * util/grub-mkdevicemap.c (check_device): Likewise.
9747         * util/i386/pc/misc.c: Include grub/machine/init.h.
9748         * util/powerpc/ieee1275/misc.c: Likewise.
9749         * util/lvm.c: Include grub/util/lvm.h.
9750         * util/misc.c: Include grub/kernel.h, grub/misc.h and
9751         grub/cache.h.
9752         * util/raid.c: Include grub/util/raid.h.
9753         (grub_util_getdiskname): Make static.
9755         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
9756         grub_hostfs_fini(), as they are called from grub_init_all() and
9757         grub_fini_all() respectively.  This fixes an infinite loop in
9758         grub-fstest due to double registration of hostfs.
9759         Reported by Christian Franke <Christian.Franke@t-online.de>
9761 2008-04-05  Pavel Roskin  <proski@gnu.org>
9763         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
9764         all 8 functions.  Otherwise, probe function 0 only.
9766 2008-04-04  Pavel Roskin  <proski@gnu.org>
9768         * commands/lspci.c (grub_lspci_iter): Print the bus number
9769         correctly.
9771         * commands/lspci.c (grub_pci_classes): Fix typos.
9772         (grub_lspci_iter): Don't print func twice.  Print vendor ID
9773         before device ID, as it's normally done.
9775         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9776         Fix signedness warnings.
9777         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
9778         Likewise.
9779         * util/ieee1275/get_disk_name.c: Include config.h so that
9780         _GNU_SOURCE is defined and getline() is declared.  Mark an
9781         unused argument as such.  Fix a signedness warning.
9783 2008-04-02  Pavel Roskin  <proski@gnu.org>
9785         * genkernsyms.sh.in: Use more robust assignments for CC and
9786         srcdir.  Quote srcdir.
9787         * gensymlist.sh.in: Likewise.  Assert at the compile time that
9788         the symbol table is not empty.
9790         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
9791         * fs/cpio.c (grub_cpio_read): Likewise.
9793 2008-04-01  Pavel Roskin  <proski@gnu.org>
9795         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
9796         * disk/host.c (grub_host_open): Likewise.
9797         * disk/loopback.c (grub_loopback_open): Likewise.
9798         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
9799         disk->id as in disk/host.c, not a multi-character constant.
9801         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
9802         later is obsolete, potentially dangerous and sets a bad example.
9803         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
9804         * util/misc.c (grub_util_get_image_size): Likewise.
9806         * disk/loopback.c (options): Improve help for "--partitions".
9808         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
9809         options to align them with the short options, e.g. "echo -e".
9811 2008-03-31  Bean  <bean123ch@gmail.com>
9813         * video/reader/png.c (grub_png_data): New member is_16bit and
9814         image_data.
9815         (grub_png_decode_image_header): Detect 16 bit png image.
9816         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
9817         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
9818         (grub_video_reader_png): Release memory occupied by image_data.
9820         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
9821         4096 bytes.
9822         (grub_nfs_mount): Skip the test for sector per cluster.
9824         * include/grub/ntfs.h (MAX_SPC): Removed.
9826 2008-03-31  Bean  <bean123ch@gmail.com>
9828         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
9829         (grub_probe_SOURCES): Add fs/afs.c.
9830         (grub_fstest_SOURCES): Likewise.
9831         (afs_mod_SOURCES): New variable.
9832         (afs_mod_CFLAGS): Likewise.
9833         (afs_mod_LDFLAGS): Likewise.
9835         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
9836         (grub_emu_SOURCES): Likewise.
9838         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9840         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9842         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9844         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9846         * fs/afs.c: New file.
9848 2008-03-30  Pavel Roskin  <proski@gnu.org>
9850         * disk/host.c: Include grub/misc.h to fix a warning.
9851         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
9852         warnings about implicit declarations.
9854         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
9855         variable.
9856         * include/grub/i386/loader.h: Change declaration of
9857         grub_linux_boot() to match what grub_loader_set() expects.
9858         * util/getroot.c (grub_guess_root_device): Return const char* to
9859         fix a warning.
9860         * util/grub-probe.c (probe): Fix a warning about uninitialized
9861         abstraction_name variable.
9862         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
9863         second argument as unused to fix a warning.
9865         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
9866         missing grub_error() call.
9868         * util/update-grub_lib.in: Define datarootdir, since Autoconf
9869         2.60 and newer uses it to define datadir.
9871         * commands/sleep.c: Fix warning about implicit declaration.
9872         * disk/memdisk.c: Likewise.
9873         * loader/aout.c: Likewise.
9874         * loader/i386/bsd_normal.c: Likewise.
9875         * util/grub-probe.c: Likewise.
9877         * commands/i386/cpuid.c (has_longmode): Make static.
9878         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
9879         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
9881         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
9882         GDT.  This is more robust, as %ds can change.
9883         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
9884         calling real_to_prot().
9885         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
9887 2008-03-28  Pavel Roskin  <proski@gnu.org>
9889         * kern/i386/pc/startup.S: Assert that uncompressed functions
9890         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
9891         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
9892         code, as they push parts of the code (error handlers) beyond
9893         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
9894         code as correctness and size.
9896 2008-03-28  Pavel Roskin  <proski@gnu.org>
9898         * kern/i386/pc/startup.S
9899         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
9900         data block address to the real mode, keep offset minimal.  This
9901         works around a bug in AWARD BIOS on old Athlon systems, which
9902         makes CD detection hang.
9904 2008-03-26  Pavel Roskin  <proski@gnu.org>
9906         * normal/color.c (grub_parse_color_name_pair): Make `name' a
9907         const.
9908         * include/grub/normal.h: Add grub_parse_color_name_pair()
9909         declaration.
9911 2008-03-24  Bean  <bean123ch@gmail.com>
9913         * disk/i386/pc/biosdisk.c (cd_start): Removed.
9914         (cd_count): Removed.
9915         (cd_drive): New variable.
9916         (grub_biosdisk_get_drive): Don't check for (cdN) device.
9917         (grub_biosdisk_call_hook): Likewise.
9918         (grub_biosdisk_iterate): Change cdrom detection method.
9919         (grub_biosdisk_open): Replace cd_start with cd_drive.
9920         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
9921         detect cdrom device.
9923         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
9924         Removed.
9925         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
9926         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
9927         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
9928         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
9929         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
9930         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
9931         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
9932         (grub_biosdisk_cdrp): New structure.
9933         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
9935         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
9937         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
9938         device.
9940         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
9941         New function.
9943 2008-03-20  Robert Millan  <rmh@aybabtu.com>
9945         Remove 2 TiB limit in ata.mod.
9946         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
9947         (grub_ata_dumpinfo): Print sector count with 0x%llx.
9948         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
9949         grub_uint64_t instead of grub_uint32_t.
9951 2008-03-05  Bean  <bean123ch@gmail.com>
9953         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
9954         (grub_multiboot): Set boot device.
9956         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
9958 2008-03-02  Bean  <bean123ch@gmail.com>
9960         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
9961         symlink_buffer.
9963 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
9965         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
9966         texinfo.tex.
9968         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
9969         modified.
9971         * docs/fdl.texi: New file.
9973         * docs/mdate-sh: New file. Copied from gnulib.
9974         * docs/texinfo.tex: Likewise.
9976         * config.guess: Updated from gnulib.
9977         * install-sh: Likewise.
9979 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9981         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
9982         (aout_mod_SOURCES): New variable.
9983         (aout_mod_CFLAGS): Likewise.
9984         (aout_mod_LDFLAGS): Likewise.
9986         * conf/i386-ieee1275.rmk: Likewise.
9988 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9990         * util/update-grub.in: Reorganise terminal validity check.  Accept
9991         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
9992         Based on suggestion by Franklin PIAT.
9994 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
9996         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
9997         function.
9998         * util/getroot.c (grub_util_check_block_device): New function that
9999         returns the given argument if it is a block device and returns NULL else.
10000         * util/grub-probe.c (argument_is_device): New variable.
10001         (probe): Promote device_name from a variable to an argument. Receive
10002         device_name from grub_util_check_block_device() if path is NULL and from
10003         grub_guess_root_device() else. Do not free() device_name anymore.
10004         (options): Introduce new parameter '-d, --device'.
10005         (main): Add description of the new parameter to the help screen.
10006         Rename path variable to argument. Set argument_is_device if the '-d'
10007         option is given. Pass argument to probe() depending on
10008         argument_is_device.
10010 2008-02-24  Bean  <bean123ch@gmail.com>
10012         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
10013         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
10014         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
10015         (GRUB_ISO9660_VOLDESC_PART): Likewise.
10016         (GRUB_ISO9660_VOLDESC_END): Likewise.
10017         (grub_iso9660_primary_voldesc): New member escape.
10018         (grub_iso9660_data): New member joliet.
10019         (grub_iso9660_convert_string): New function.
10020         (grub_iso9660_mount): Detect joliet extension.
10021         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
10022         (grub_iso9660_iso9660_label): Likewise.
10024         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
10025         (grub_setup_SOURCES): Add fs/udf.c.
10026         (grub_fstest_SOURCES): Likewise.
10027         (udf_mod_SOURCES): New variable.
10028         (udf_mod_CFLAGS): Likewise.
10029         (udf_mod_LDFLAGS): Likewise.
10031         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
10032         (grub_emu_SOURCES): Likewise.
10034         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10036         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10038         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10040         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10042         * fs/udf.c: New file.
10044 2008-02-24  Robert Millan  <rmh@aybabtu.com>
10046         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
10047         (normal/lexer.c_DEPENDENCIES): New variables.
10048         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10049         (normal/lexer.c_DEPENDENCIES): Likewise.
10050         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
10051         (normal/lexer.c_DEPENDENCIES): Likewise.
10052         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
10053         (normal/lexer.c_DEPENDENCIES): Likewise.
10054         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10055         (normal/lexer.c_DEPENDENCIES): Likewise.
10056         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10057         (normal/lexer.c_DEPENDENCIES): Likewise.
10059 2008-02-23  Robert Millan  <rmh@aybabtu.com>
10061         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
10062         since they were intended to be in hex.  This didn't break previously
10063         because of a bug in gpt_partition_map_iterate() (see below).
10065         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
10066         when checking the validity of GPT header.
10067         Remove `partno', since it always provides the same information as `i'.
10069 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
10071         * include/grub/efi/time.h: Fix a wrong comment.
10073 2008-02-19  Pavel Roskin  <proski@gnu.org>
10075         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
10076         message.
10078 2008-02-19  Bean  <bean123ch@gmail.com>
10080         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
10081         (aout_mod_SOURCES): New variable.
10082         (aout_mod_CFLAGS): Likewise.
10083         (aout_mod_LDFLAGS): Likewise.
10084         (_bsd_mod_SOURCES): New variable.
10085         (_bsd_mod_CFLAGS): Likewise.
10086         (_bsd_mod_LDFLAGS): Likewise.
10087         (bsd_mod_SOURCES): New variable.
10088         (bsd_mod_CFLAGS): Likewise.
10089         (bsd_mod_LDFLAGS): Likewise.
10091         * include/grub/aout.h: New file.
10093         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
10095         * include/grub/i386/bsd.h: New file.
10097         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
10098         to make it public.
10100         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
10101         function is called, so that it's possible to change it inside the hook.
10102         (grub_elf64_load): Likewise.
10103         (grub_elf_file): Don't close the file if elf header is not found.
10104         (grub_elf_close): Close the file if grub_elf_file fails (The new
10105         grub_elf_file won't close it).
10106         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
10107         (grub_elf64_size): Likewise.
10109         * kern/i386/loader.S (grub_unix_real_boot): New function.
10111         * loader/aout.c: New file.
10113         * loader/i386/bsd.c: New file.
10115         * loader/i386/bsd_normal.c: New file.
10117         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
10119         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
10120         can test other formats.
10122 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10124         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
10125         (grub_gpt_partition_type_empty): Redefine with macro from
10126         `<grub/gpt_partition.h>'.
10127         (gpt_partition_map_iterate): Adjust partition type comparison.
10129         Export `entry' as partmap-specific `part.data' struct.
10130         (grub_gpt_header, grub_gpt_partentry): Move from here ...
10132         * include/grub/gpt_partition.h (grub_gpt_header)
10133         (grub_gpt_partentry): ... to here (new file).
10135         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
10137         (grub_gpt_partition_type_bios_boot): New const variable, defined
10138         with macro from `<grub/gpt_partition.h>'.
10140         (setup): Replace `first_start' with `embed_region', which keeps
10141         track of the embed region (and is partmap-agnostic).
10143         Replace find_first_partition_start() with find_usable_region(),
10144         which finds a usable region for embedding using partmap-specific
10145         knowledge (supports PC/MSDOS and GPT).
10147         Fix all assumptions that the embed region start at sector 1, using
10148         `embed_region.start' from now on.  Similarly, use `embed_region.end'
10149         rather than `first_start' to calculate available size.
10151         In grub_util_info() message, replace "into after the MBR" with an
10152         indication of the specific sector our embed region starts at.
10154 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10156         * DISTLIST: Replace `commands/ieee1275/halt.c' and
10157         `commands/ieee1275/reboot.c' with `commands/halt.c' and
10158         `commands/reboot.c'.
10159         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10160         (halt_mod_SOURCES): Likewise.
10161         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10162         (halt_mod_SOURCES): Likewise.
10164 2008-02-17  Christian Franke  <franke@computer.org>
10166         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
10168 2008-02-17  Robert Millan  <rmh@aybabtu.com>
10170         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10171         set `first_start' to 0 for non-PC/MSDOS partition maps.
10173 2008-02-16  Robert Millan  <rmh@aybabtu.com>
10175         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10176         do not assume partition map is PC/MSDOS before performing checks that
10177         are specific to that layout.
10179 2008-02-13  Robert Millan  <rmh@aybabtu.com>
10181         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
10182         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
10183         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
10185 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
10187         * configure.ac: Only a cosmetic change on the handling of
10188         -fno-stack-protector.
10190 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
10192         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
10193         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
10194         reboot.c.
10195         (grub_install_SOURCES): Add halt.mod and reboot.mod.
10196         (halt_mod_SOURCES): New variable.
10197         (halt_mod_CFLAGS): Likewise.
10198         (halt_mod_LDFLAGS): Likewise.
10199         (reboot_mod_SOURCES): Likewise.
10200         (reboot_mod_CFLAGS): Likewise.
10201         (reboot_mod_LDFLAGS): Likewise.
10203         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
10204         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
10205         reboot.c.
10206         (halt_mod_SOURCES): Likewise.
10207         (reboot_mod_SOURCES): Likewise.
10209         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
10210         commands/i386/pc/reboot.c by commands/reboot.c.
10211         (reboot_mod_SOURCES): Likewise.
10213         * commands/i386/pc/reboot.c: merge this file ...
10215         * commands/ieee1275/reboot.c: ... and this file ...
10217         * commands/reboot.c: ... to this file.
10218         Add some precompiler directive to include the correct header for
10219         each machine.
10221         * commands/ieee1275/halt.c: move this file ...
10223         * commands/halt.c: ... to here.
10224         Add some precompiler directive to include the correct header for
10225         each machine.
10227         * include/grub/efi/efi.h (grub_reboot): New function declaration.
10228         (grub_halt): Likewise.
10230         * kern/efi/efi.c (grub_reboot): New function.
10231         (grub_halt): Likewise.
10233 2008-02-12  Robert Millan  <rmh@aybabtu.com>
10235         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
10236         /dev (like it is done for /dev/mapper).  This doesn't provide support
10237         for EVMS, but at least it is now easy to identify the problem when it
10238         arises.
10240 2008-02-11  Robert Millan  <rmh@aybabtu.com>
10242         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
10243         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
10244         comparing it with -1, not 0.
10246 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10248         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
10249         `disk/lvm.c'.
10250         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10251         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
10253         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
10254         `disk/lvm.c' to the end of the list.
10255         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10256         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10258 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10260         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
10261         grub_print_error() instead.  This will let user know why we're entering
10262         rescue mode.
10263         Based on suggestions from Sam Morris.
10265 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
10267         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
10268         on remaining N args, instead of "--" arg N times.
10270 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
10272         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
10273         (fill_with_default_glyph): Changed to use unknown_glyph for fill
10274         pattern for unknown glyphs.
10276 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10278         * configure.ac: Probe for `help2man'.
10279         * Makefile.in (builddir): New variable.
10280         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
10281         or otherwise add a few flags/options to it.
10282         (install-local): For every executable utility or script that is
10283         installed, invoke $(HELP2MAN) to install a manpage based on --help
10284         output.
10286         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
10287         that it doesn't prevent --help from working in build tree.
10289         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
10290         with `bug-grub@gnu.org'.
10291         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
10292         * util/update-grub.in (usage): New function.
10293         Implement proper argument check, with support for --help and --version
10294         (as well as existing -y).
10296 2008-02-09  Christian Franke  <franke@computer.org>
10298         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
10299         avoid overwriting previous output.
10300         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
10302 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10304         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
10305         drawing the menu.
10307 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10309         * commands/sleep.c: New file.
10310         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
10311         (sleep_mod_SOURCES): New variable.
10312         (sleep_mod_CFLAGS): Likewise.
10313         (sleep_mod_LDFLAGS): Likewise.
10315 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10317         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
10318         situations in which we can deduce the RAID size and the superblock
10319         doesn't match it.
10321 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10323         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
10324         and return a grub_diskmemberlist_t composed of LVM physical volumes.
10325         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
10327         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
10328         and return a grub_diskmemberlist_t composed of physical array members.
10329         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
10331         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
10332         prototype.
10333         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
10334         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
10335         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
10337         * util/grub-probe.c (probe): Move partmap probing code from here ...
10338         (probe_partmap): ... to here.
10339         (probe): Use probe_partmap() once for the disk we're probing, and
10340         additionally, when such disk contains a memberlist() struct member,
10341         once for each disk that is contained in the structure returned by
10342         memberlist().
10344 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10346         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
10347         environment variable to 'all' in order to obtain debug output from
10348         non-util/ code.
10349         * util/i386/pc/grub-setup.c (main): Likewise.
10351 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10353         * disk/raid.c (grub_raid_scan_device): Check for
10354         `array->device[sb.this_disk.number]' rather than for
10355         `array->device[sb.this_disk.number]->name', since the latter is not
10356         guaranteed to be accessible.
10358 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10360         * disk/raid.c: Update copyright.
10361         * fs/cpio.c: Likewise.
10362         * include/grub/raid.h: Likewise.
10363         * loader/i386/pc/multiboot.c: Likewise.
10364         * util/hostfs.c: Likewise.
10366 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10368         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
10369         to a grub_disk_t array.
10370         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
10371         `device[x]'.
10372         (grub_raid_scan_device): Replace `device[x].name' accesses with
10373         `device[x]->name'.  Simplify initialization of `array->device[x]'.
10375 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10377         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
10378         grub_dprintf() calls.
10379         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
10380         error message.
10382 2008-02-07  Christian Franke  <franke@computer.org>
10384         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
10385         instead of fseek and ftell to support large files.
10386         (grub_hostfs_read): Likewise.
10388 2008-02-07  Robert Millan  <rmh@aybabtu.com>
10390         Patch from Jeroen Dekkers.
10391         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
10392         failure, since successfully reading all array members might not be
10393         required.
10395 2008-02-06  Robert Millan  <rmh@aybabtu.com>
10397         * util/grub-probe.c (probe): Simplify partmap probing (with the
10398         assumption that the first word up to the underscore equals to
10399         the module name).
10401 2008-02-06  Christian Franke  <franke@computer.org>
10403         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
10404         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
10405         last block of a cpio or tar stream.
10406         Check for "TRAILER!!!" instead of any empty data
10407         block to detect last block of a cpio stream.
10408         (grub_cpio_dir): Fix constness of variable np.
10409         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
10410         cpio or tar trailer is detected.  This fixes a crash
10411         on open of a non existing file.
10413 2008-02-05  Bean  <bean123ch@gmail.com>
10415         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
10416         address of entry.
10417         (grub_multiboot_load_elf64): Likewise.
10418         (grub_multiboot): Initialize mbi structure.
10420         * util/grub-fstest.c: Don't include unused header file script.h.
10422         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
10423         of file.
10424         (grub_fstest_SOURCES): Likewise.
10426 2008-02-05  Robert Millan  <rmh@aybabtu.com>
10428         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
10429         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
10430         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
10431         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
10433         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
10434         (translation_table): Replace hardcoded values with macros
10435         provided by `<grub/term.h>'.
10437         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
10438         (keyboard_map): Correct/add a few values, with macros provided
10439         by `<grub/term.h>'.
10440         (keyboard_map_shift): Zero values that don't differ from their
10441         `keyboard_map' equivalents.
10442         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
10443         Discard the second scan code that is always sent by Caps lock.
10444         Only use `keyboard_map_shift' when it provides a non-zero value,
10445         otherwise fallback to `keyboard_map'.
10447 2008-02-04  Bean  <bean123ch@gmail.com>
10449         * Makefile.in (enable_grub_fstest): New variable.
10451         * conf/common.rmk (grub_fstest_init.lst): New rule.
10452         (grub_fstest_init.h): Likewise.
10453         (grub_fstest_init.c): Likewise.
10454         (util/grub-fstest.c_DEPENDENCIES): New variable.
10455         (grub_fstest_SOURCES): Likewise.
10457         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
10459         * util/grub-fstest.c: New file.
10461 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10463         Make grub-setup handle a separate root device.
10465         * util/i386/pc/grub-setup.c (setup): Always open the root device,
10466         so that the root device can be compared with the destination
10467         device.
10468         When embedding the core image, if the root and destination devices
10469         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
10470         0xFF.
10471         When not embedding, set ROOT_DRIVE to 0xFF.
10473 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10475         Add support for having a grub directory in a different drive. This
10476         is still only the data handling part.
10478         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
10479         (codestart): Save %dh in GRUB_ROOT_DRIVE.
10480         (grub_root_drive): New variable.
10482         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
10483         instead of GRUB_BOOT_DRIVE to construct a device name. Set
10484         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
10485         as it was.
10487         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
10489         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
10490         macro.
10491         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
10493         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
10494         is bogus, because PXE booting does not specify any drive
10495         correctly.
10497         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
10498         am not sure if this is really correct.
10500         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
10501         is always identical to the boot drive when booting from a CD.
10503         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
10504         longer.
10505         (root_drive): New variable.
10506         (real_start): Unconditionally set %dh to ROOT_DRIVE.
10507         (setup_sectors): Push %dx right after popping it, because %dh will
10508         be modified later.
10509         (copy_buffer): Restore %dx.
10511 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10513         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
10514         use `cdboot.img' for cdrom images.
10516 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10518         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
10519         only setup gfxterm when `font' command has succeeded.
10521 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10523         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
10524         (grub_rescue_cmd_multiboot_loader)
10525         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
10527 2008-02-03  Pavel Roskin  <proski@gnu.org>
10529         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
10530         %edx and %esi from stack only after grub_gate_a20() is called.
10531         grub_gate_a20() clobbers %edx.
10533 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10535         * configure.ac (AC_INIT): Bumped to 1.96.
10537         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
10538         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
10539         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
10540         video/readers/png.c.
10542 2008-02-03  Bean  <bean123ch@gmail.com>
10544         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
10545         (cdboot_img_SOURCES): New variable.
10546         (cdboot_img_ASFLAGS): New variable.
10547         (cdboot_img_LDFLAGS): New variable.
10549         * boot/i386/pc/cdboot.S: New file.
10551         * disk/i386/pc/biosdisk.c (cd_start): New variable.
10552         (cd_count): Likewise.
10553         (grub_biosdisk_get_drive): Add support for cd device.
10554         (grub_biosdisk_call_hook): Likewise.
10555         (grub_biosdisk_iterate): Likewise.
10556         (grub_biosdisk_open): Likewise.
10557         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
10558         (grub_biosdisk_rw): Support reading from cd device.
10559         (GRUB_MOD_INIT): Iterate cd devices.
10561         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
10562         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
10563         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
10565         * kern/i386/pc/init.c (make_install_device): Check for cd device.
10567 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10569         * commands/read.c: New file.
10570         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
10571         (read_mod_SOURCES): New variable.
10572         (read_mod_CFLAGS): Likewise.
10573         (read_mod_LDFLAGS): Likewise.
10575 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10577         * normal/main.c (grub_normal_execute): Check for `menu->size' when
10578         determining whether menu has to be displayed.
10580 2008-02-02  Marco Gerards  <marco@gnu.org>
10582         * bus/pci.c: New file.
10584         * include/grub/pci.h: Likewise.
10586         * include/grub/i386/pc/pci.h: Likewise.
10588         * commands/lspci.c: Likewise.
10590         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
10591         `lspci.mod'.
10592         (pci_mod_SOURCES): New variable.
10593         (pci_mod_CFLAGS): Likewise.
10594         (pci_mod_LDFLAGS): Likewise.
10595         (lspci_mod_SOURCES): Likewise.
10596         (lspci_mod_CFLAGS): Likewise.
10597         (lspci_mod_LDFLAGS): Likewise.
10599 2008-02-02  Bean  <bean123ch@gmail.com>
10601         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
10602         (grub_ufs_get_file_block): Fix indirect block calculation problem.
10604         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
10605         (grub_xfs_btree_node): New structure.
10606         (grub_xfs_btree_root): New structure.
10607         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
10608         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
10609         (GRUB_XFS_EXTENT_BLOCK): Likewise.
10610         (GRUB_XFS_EXTENT_SIZE): Likewise.
10611         (grub_xfs_read_block): Support btree format type.
10612         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
10613         Use directory block as basic unit.
10615         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
10617         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
10618         __attribute__ ((__regparm__ (1))).
10620 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10622         Correct a mistake in previous commit.
10624         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
10625         top.
10626         (normal/command.c_DEPENDENCIES): New variable.
10628 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10630         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
10631         top.
10632         (normal/command.c_DEPENDENCIES): New variable.
10633         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
10634         * conf/i386-ieee1275.rmk: Likewise.
10635         * conf/i386-linuxbios.rmk: Likewise.
10636         * conf/i386-pc.rmk: Likewise.
10637         * conf/sparc64-ieee1275.rmk: Likewise.
10638         * conf/powerpc-ieee1275.rmk: Likewise.
10639         (grub_emu_SOURCES): Add `fs/fshelp.c'.
10641         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
10643 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10645         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
10646         call at beginning of function.
10648 2008-01-31  Pavel Roskin  <proski@gnu.org>
10650         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
10651         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
10652         (grub_mkrescue_SOURCES): Likewise.
10653         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
10655 2008-01-30  Robert Millan  <rmh@aybabtu.com>
10657         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
10658         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
10659         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
10660         (grub_probe_SOURCES): ... to here.
10662         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
10663         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
10664         * conf/i386-ieee1275.rmk: Likewise.
10665         * conf/i386-linuxbios.rmk: Likewise.
10666         * conf/powerpc-ieee1275.rmk: Likewise.
10668 2008-01-30  Tristan Gingold  <gingold@free.fr>
10670         * kern/rescue.c: Silently accept empty lines.
10672 2008-01-29  Bean  <bean123ch@gmail.com>
10674         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
10675         (real_code_2): Code cleanup and change comment style.
10676         (move_memory): Avoid using 32-bit address mode.
10678 2008-01-29  Bean  <bean123ch@gmail.com>
10680         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
10681         (png_mod_SOURCES): New variable.
10682         (png_mod_CFLAGS): Likewise.
10683         (png_mod_LDFLAGS): Likewise.
10685         * video/readers/png.c: New file.
10687 2008-01-28  Robert Millan  <rmh@aybabtu.com>
10689         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
10690         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
10691         `ifndef GRUB_MOD_GAP' hack.
10692         * util/elf/grub-mkimage.c (add_segments): Likewise.
10694 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10696         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
10697         `GRUB_MOD_GAP' for platforms in which it's not defined.
10698         * util/elf/grub-mkimage.c (add_segments): Likewise.
10700 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10702         Get grub-emu to build again (including parallel builds).
10704         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
10705         Split into ...
10706         (util/grub-emu.c_DEPENDENCIES): ... this, ...
10707         (normal/execute.c_DEPENDENCIES): ... this, ...
10708         (grub-emu_DEPENDENCIES): ... and this.
10710         * conf/i386-efi.rmk: Likewise.
10711         * conf/i386-linuxbios.rmk: Likewise.
10712         * conf/i386-ieee1275.rmk: Likewise.
10713         * conf/powerpc-ieee1275.rmk: Likewise.
10714         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
10716 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10718         * NEWS: Add a few items.
10720 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10722         Fix parallel builds with grub-emu.  Based on earlier commit for
10723         grub-probe and grub-setup.
10725         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10726         (util/grub-emu.c_DEPENDENCIES): ... this.
10727         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10728         (util/grub-emu.c_DEPENDENCIES): ... this.
10729         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10730         (util/grub-emu.c_DEPENDENCIES): ... this.
10731         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10732         (util/grub-emu.c_DEPENDENCIES): ... this.
10733         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10734         (util/grub-emu.c_DEPENDENCIES): ... this.
10736 2008-01-27  Pavel Roskin  <proski@gnu.org>
10738         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
10739         to create a gap between _end and the modules added to the image
10740         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
10741         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
10742         * util/elf/grub-mkimage.c (add_segments): Likewise.
10744 2008-01-26  Pavel Roskin  <proski@gnu.org>
10746         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
10747         just return an error.
10749 2008-01-26  Bean  <bean123ch@gmail.com>
10751         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
10752         (grub_reiserfs_get_item): Save offset of the next item.
10753         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
10755 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10757         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
10758         make all filesystem sources appear together (possibly fixing omissions
10759         while at it).
10760         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10761         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10762         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10763         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10765         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
10766         add `kern/file.c'.
10767         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
10768         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10769         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
10770         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10772         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
10773         (probe): Add a sanity check to make sure of our ability to read
10774         requested files when probing for filesystem type.
10776         * genmk.rb: Update copyright year (2007).
10778         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
10779         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
10780         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
10781         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
10782         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
10783         : Remove function prototypes.
10785 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10787         Revert my previous commits (based on wrong assumption of how grub_errno
10788         works).
10790         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
10791         * kern/file.c (grub_file_open): Likewise.
10793 2008-01-24  Pavel Roskin  <proski@gnu.org>
10795         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
10796         that hang if GRUB tries to setup colors.
10797         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
10798         colors for firmwares that don't support it.
10799         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
10800         Recognize Open Hack'Ware, set flags to work around its
10801         limitations.
10803 2008-01-24  Robert Millan  <rmh@aybabtu.com>
10805         * kern/file.c (grub_file_open): Do not account previous failures of
10806         unrelated functions when grub_errno is checked for.
10807         Reported by Oleg Strikov.
10809 2008-01-24  Bean  <bean123ch@gmail.com>
10811         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
10812         (grub_ufs_sblock): New member volume name.
10813         (grub_ufs_find_file): Fix string copy bug.
10814         (grub_ufs_label): Implement this function properly.
10816         * fs/hfs.c (grub_hfs_cnid_type): New enum.
10817         (grub_hfs_iterate_records): Use the correct file number for extents
10818         and catalog file. Fix problem in next index calculation.
10819         (grub_hfs_find_node): Replace recursive function call with loop.
10820         (grub_hfs_iterate_dir): Replace recursive function call with loop.
10822 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10824         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
10825         `<grub/symbol.h>' and `<grub/multiboot.h>'.
10826         (grub_multiboot2_real_boot): New function prototype.
10828         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
10829         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
10831         * kern/i386/ieee1275/init.c (grub_os_area_addr)
10832         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
10834 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10836         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
10837         #ifdef'ed out grub_printf().
10839 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10841         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
10842         grub_dprintf calls, since they make "debug=all" mode unusable.
10843         (grub_console_checkkey): Likewise.
10845 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10847         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
10848         `term/i386/pc/at_keyboard.c'.
10849         (pkglib_MODULES): Add `serial.mod'.
10850         (serial_mod_SOURCES): New variable.
10851         (serial_mod_CFLAGS): Likewise.
10852         (serial_mod_LDFLAGS): Likewise.
10854         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
10855         `<grub/powerpc/ieee1275/console.h>'.
10856         (grub_keyboard_controller_init): New function prototype.
10857         (grub_console_checkkey): Likewise.
10858         (grub_console_getkey): Likewise.
10860         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
10861         keyboard on i386.
10863         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
10864         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
10866 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10868         * kern/i386/pc/init.c (make_install_device): When memdisk image is
10869         present, "(memdisk)/boot/grub" becomes the default prefix.
10871         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
10872         a memdisk tarball with all the modules.  Add --overlay=DIR option that
10873         allows users to overlay additional files into the image.
10875 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10877         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
10878         and `machine/memory.h'.
10879         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
10880         (_multiboot_mod_SOURCES): New variable.
10881         (_multiboot_mod_CFLAGS): Likewise.
10882         (_multiboot_mod_LDFLAGS): Likewise.
10883         (multiboot_mod_SOURCES): Likewise.
10884         (multiboot_mod_CFLAGS): Likewise.
10885         (multiboot_mod_LDFLAGS): Likewise.
10887         * include/grub/i386/ieee1275/loader.h: New file.
10889         * include/grub/i386/ieee1275/machine.h: Likewise.
10891         * include/grub/i386/ieee1275/memory.h: Likewise.
10893         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
10894         variable declaration.
10895         (grub_os_area_size): Likewise.
10897         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
10898         (grub_lower_mem, grub_upper_mem): New variables.
10899         (grub_stop_floppy): New function (just to make
10900         grub_multiboot2_real_boot() happy).
10902         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
10903         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
10904         (grub_stop): New function.
10905         Include `"../realmode.S"' and `"../loader.S"'.
10907         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
10908         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
10910         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
10911         rely on grub_multiboot2_real_boot() for final boot.
10913 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10915         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
10916         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
10917         device that doesn't look like an SD card.
10918         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10919         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
10920         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
10921         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
10922         found.
10924 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10926         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
10927         avoid claiming over our own code.
10929 2008-01-22  Bean  <bean123ch@gmail.com>
10931         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
10932         (jpeg_mod_SOURCES): New variable.
10933         (jpeg_mod_CFLAGS): Likewise.
10934         (jpeg_mod_LDFLAGS): Likewise.
10936         * video/readers/jpeg.c : New file.
10938 2008-01-22  Bean  <bean123ch@gmail.com>
10940         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
10941         there are no more items.
10943 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10945         * kern/mm.c (grub_mm_init_region): Improve debug message.
10947 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10949         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
10950         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
10951         address.
10952         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
10953         a C macro.
10954         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
10955         Indicates start of upper memory.
10956         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
10957         (generate_image): Abort when image size is big enough to corrupt
10958         upper memory.
10960         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
10961         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
10962         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10963         instead of hardcoding 0xA0000.
10964         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
10965         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10966         instead of hardcoding 0xA0000.
10968 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10970         * disk/memdisk.c (memdisk_size): New variable.
10971         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
10972         `memdisk_size'.
10973         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
10974         image to dynamic memory.
10975         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
10976         `memdisk_size'.  Free memdisk block.
10978 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10980         Fix detection of very small filesystems (like tar).
10982         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
10983         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
10984         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
10985         a problem with this disk).
10987 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10989         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
10990         on grub_biosdisk_rw_standard() error.
10992 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10994         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
10995         recent changes.
10996         * kern/elf.c: Likewise.
10997         * kern/ieee1275/ieee1275.c: Likewise.
10998         * kern/powerpc/ieee1275/openfw.c: Likewise.
10999         * term/ieee1275/ofconsole.c: Likewise.
11001 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11003         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
11005         * include/grub/kernel.h (grub_arch_memdisk_addr)
11006         (grub_arch_memdisk_size): Moved from here ...
11008         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
11009         (grub_arch_memdisk_size): ... to here.
11011 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11013         Mostly based on bugfix from Bean.
11015         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
11016         attribute with hook() parameter.
11017         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
11018         declaration.
11019         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
11020         attribute with hook() parameter.
11021         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
11022         declaration.
11024 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11026         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
11027         (pkglib_MODULES): Add `memdisk.mod'.
11028         (memdisk_mod_SOURCES): New variable.
11029         (memdisk_mod_CFLAGS): Likewise.
11030         (memdisk_mod_LDFLAGS): Likewise.
11032         * disk/memdisk.c: New file.
11034         * include/grub/disk.h (grub_disk_dev_id): Add
11035         `GRUB_DISK_DEVICE_MEMDISK_ID'.
11037         * include/grub/i386/pc/kernel.h
11038         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
11039         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
11040         (grub_kernel_image_size): New variable declaration.
11041         (grub_total_module_size): Likewise.
11042         (grub_memdisk_image_size): Likewise.
11044         * include/grub/i386/pc/memory.h
11045         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
11047         * include/grub/kernel.h: Include `<grub/symbol.h>'.
11048         (grub_arch_memdisk_addr): New variable declaration.
11049         (grub_arch_memdisk_size): Likewise.
11051         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
11052         (grub_arch_memdisk_size): Likewise.
11054         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
11055         (codestart): Replace hardcoded `0x100000' with
11056         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
11058         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
11059         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
11060         not NULL, append the contents of the file it refers to, at the end of
11061         the compressed kernel image.  Initialize `grub_memdisk_image_size'
11062         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
11063         (options): Add "memdisk"|'m' option.
11064         (main): Parse --memdisk|-m option, and pass user-provided path as
11065         parameter to generate_image().
11067 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11069         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
11070         grub_dprintf() calls from here ...
11071         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
11073 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11075         Fix detection of "real mode" when /options/real-mode? doesn't exist.
11077         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
11078         declaration.
11079         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
11080         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
11081         `GRUB_IEEE1275_FLAG_REAL_MODE'.
11082         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
11083         property).
11084         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
11085         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
11087 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11089         Get rid of confusing function (superseded by
11090         `grub_ieee1275_get_integer_property')
11091         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
11092         prototype.
11093         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
11094         function.
11095         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
11096         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
11097         in native endianness from grub_ieee1275_get_integer_property().
11099 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11101         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
11102         command after "shut-down", since implementations differ on which
11103         the command for halt is.
11105 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11107         * include/grub/i386/linuxbios/console.h: Add header protection.
11108         (grub_keyboard_controller_init): New function prototype.
11109         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
11110         (KEYBOARD_COMMAND_READ): Likewise.
11111         (KEYBOARD_COMMAND_WRITE): Likewise.
11112         (KEYBOARD_SCANCODE_SET1): Likewise.
11113         (grub_keyboard_controller_write): New function.
11114         (grub_keyboard_controller_read): Likewise.
11115         (grub_keyboard_controller_init): Likewise.
11117         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
11118         (grub_console_init): On coreboot/LinuxBIOS, call
11119         grub_keyboard_controller_init().
11121 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11123         PowerPC changes provided by Pavel Roskin.
11125         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
11126         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
11127         don't rely on cmain() doing it.
11128         * kern/i386/ieee1275/startup.S (_start): Store %eax in
11129         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
11131 2008-01-16  Robert Millan  <rmh@aybabtu.com>
11133         * include/grub/i386/linuxbios/memory.h
11134         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
11135         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
11136         receive `table_header' as argument.  Instead, probe for it in the
11137         known memory ranges where it can be present.
11138         (grub_available_iterate): Do not pass a fixed `table_header' address
11139         to grub_linuxbios_table_iterate().
11141 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11143         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
11144         * conf/i386-ieee1275.rmk: New file.
11145         * include/grub/i386/ieee1275/console.h: Likewise.
11146         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
11147         * include/grub/i386/ieee1275/kernel.h: Likewise.
11148         * include/grub/i386/ieee1275/time.h: Likewise.
11149         * kern/i386/ieee1275/init.c: Likewise.
11150         * kern/i386/ieee1275/startup.S: Likewise.
11152 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11154         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
11155         when pointers are 32-bit (but still do set it to one when they are
11156         64-bit).
11158 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11160         * include/grub/ieee1275/ieee1275.h
11161         (grub_ieee1275_get_integer_property): New function prototype.
11163         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
11164         (grub_ieee1275_get_integer_property): New function.  Wraps around
11165         grub_ieee1275_get_property() to handle endianness.
11167         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
11168         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
11169         where appropriate.
11170         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
11171         (grub_map): Likewise.
11172         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
11174 2008-01-15  Bean  <bean123ch@gmail.com>
11176         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
11177         (grub_script_execute_cmdline): Reset grub_errno.
11179         * normal/main.c (read_config_file): Reset grub_errno.
11181         * normal/parse.y (script_init): New.
11182         (script): Move function and menuentry here.
11183         (delimiter): New.
11184         (command): Add delimiter at the end of command.
11185         (commands): Adjust to match the new command.
11186         (commandblock): Remove grub_script_lexer_record_start.
11187         (menuentry): Add grub_script_lexer_record_start, use the new commands.
11188         (if): Use the new commands.
11190         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
11192 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11194         * normal/menu.c (run_menu): Move timeout message from here ...
11195         (print_timeout): ... to here.
11196         (run_menu): Use print_timeout() once during initial draw to print
11197         the whole message, and again in every clock tick to update only
11198         the number of seconds.
11200 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11202         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
11203         actual size of `available' from grub_ieee1275_get_property(), and
11204         restrict parsing to that bound.
11206 2008-01-15  Christian Franke  <franke@computer.org>
11208         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
11209         (argp_program_version): Remove variable.
11210         (argp_program_bug_address): Likewise.
11211         (options): Convert from struct argp_option to struct option.
11212         (struct arguments): Remove.
11213         (parse_opt): Remove.
11214         (usage): New function.
11215         (main): Replace struct args members by simple variables.
11216         Replace argp_parse() by getopt_long().
11217         Add switch to evaluate options.
11218         Add missing "(...)" around root_dev in prefix string.
11220 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11222         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
11223         for grub_ieee1275_exit(), in order to improve portability.
11225 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11227         * util/grub.d/10_linux.in (prefix): Define.
11228         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
11230 2008-01-13  Pavel Roskin  <proski@gnu.org>
11232         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
11233         grub_errno if no errors have been detected.
11235 2008-01-12  Robert Millan  <rmh@aybabtu.com>
11237         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
11238         (grub_util_get_dev_abstraction): New function prototype.
11240         * util/getroot.c: Include `<grub/util/getroot.h>'
11241         (grub_util_get_grub_dev): Move detection of abstraction type to ...
11242         (grub_util_get_dev_abstraction): ... here (new function).
11244         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
11245         `PRINT_ABSTRACTION'.
11246         (probe): Probe for abstraction type when requested.
11247         (main): Understand `--target=abstraction'.
11249         * util/i386/efi/grub-install.in: Add abstraction module to core
11250         image when it is found to be necessary.
11251         * util/i386/pc/grub-install.in: Likewise.
11252         * util/powerpc/ieee1275/grub-install.in: Likewise.
11254         * util/update-grub_lib.in (font_path): Return system path without
11255         converting to GRUB path.
11256         * util/update-grub.in: Convert system path returned by font_path()
11257         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
11258         abstraction module is needed for loading fonts (if any).  Export
11259         that as `GRUB_PRELOAD_MODULES'.
11260         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
11261         insmod commands).
11263 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
11265         Remove some unused code from reiserfs.
11267         * fs/reiserfs.c (struct grub_reiserfs_key)
11268         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
11269         (struct grub_reiserfs_node_body): Removed.
11270         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11271         Likewise.
11272         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11273         Likewise.
11274         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11275         Likewise.
11276         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11277         Likewise.
11278         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11279         Likewise.
11280         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
11281         Likewise.
11282         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11283         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11284         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11286 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11288         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
11289         Determines if a file is garbage left by packaging systems, etc.
11290         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
11291         for processing /etc/grub.d scripts.
11292         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
11293         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
11294         as a condition for processing Linux images.
11296 2008-01-10  Pavel Roskin  <proski@gnu.org>
11298         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
11299         to compile reiserfs.c on PowerPC.
11301 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11303         * kern/device.c (grub_device_iterate): Do not abort device iteration
11304         when one of the devices cannot be opened.
11305         * kern/disk.c (grub_disk_open): Do not account previous failures of
11306         unrelated functions when grub_errno is checked for.
11308 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11310         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
11311         `! grub_linux_is_bzimage', change order of address comparison to make
11312         it more intuitive, and improve "too big zImage" error message.
11314 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11316         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
11317         `$(update-grub_DATA)'.
11318         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
11319         targets.
11321 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11323         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
11324         which instruction is modified by grub-setup during installation
11325         (since it wasn't obvious by only looking at this file).
11327 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11329         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
11330         listing actual TODO items.
11332 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11334         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
11335         correctly.
11336         (grub_reiserfs_get_key_offset): Likewise.
11337         (grub_reiserfs_set_key_offset): Likewise.
11338         (grub_reiserfs_set_key_type): Likewise.
11339         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
11341         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
11342         better to remove the bitfield version completely.
11344 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11346         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
11347         allocated from the heap, due to the fshelp implementation.
11348         (grub_reiserfs_dir): Free NODE, due to the same reason.
11350 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11352         Mostly from Vincent Pelletier:
11354         * fs/reiserfs.c: New file.
11356         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
11357         (reiserfs_mod_SOURCES): New variable.
11358         (reiserfs_mod_CFLAGS): Likewise.
11359         (reiserfs_mod_LDFLAGS): Likewise.
11361         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
11362         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
11363         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
11364         normal/color.c.
11366 2008-01-06  Robert Millan  <rmh@aybabtu.com>
11368         * normal/color.c: Remove `<grub/env.h>'.
11370 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
11372         * include/grub/normal.h: Include <grub/env.h>.
11374 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11376         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
11377         usage example with `(hd0,1)'.
11378         Reported by Samuel Thibault.
11380 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11382         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
11383         (grub_linux_boot_zimage): Rename to ...
11384         (grub_linux_boot): ... this.
11385         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
11386         (grub_linux_boot_zimage): Conditionalize zImage copy.
11388         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
11389         (grub_linux_boot_bzimage): Remove prototype.
11390         (grub_linux_boot_zimage): Rename to ...
11391         (grub_linux_boot): ... this.
11393         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
11394         (grub_linux_boot): Remove function.
11396 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11398         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
11399         (grub_env_write_color_highlight): Likewise.
11400         (grub_wait_after_message): Likewise.
11402         * normal/color.c: New file.
11404         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11405         (normal_mod_DEPENDENCIES): Likewise.
11407         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11408         (normal_mod_DEPENDENCIES): Likewise.
11410         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11411         (normal_mod_DEPENDENCIES): Likewise.
11413         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11414         (normal_mod_DEPENDENCIES): Likewise.
11416         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
11417         for waiting after a message is printed.
11418         * normal/main.c (read_config_file): Likewise.
11419         (grub_normal_init): Register grub_env_write_color_normal() and
11420         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
11421         `color_highlight' variables as global.
11423         * normal/menu.c (grub_wait_after_message): New function.
11424         (grub_color_menu_normal): New variable.  Replaces ...
11425         (GRUB_COLOR_MENU_NORMAL): ... this macro.
11426         (grub_color_menu_highlight): New variable.  Replaces ...
11427         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
11428         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
11429         `GRUB_TERM_COLOR_STANDARD'.
11430         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
11431         `normal_code' and `highlight_code' to `old_color_normal' and
11432         `old_color_highlight', respectively.
11433         (grub_menu_init_page): Update colors when drawing the menu, based on
11434         `menu_color_normal' and `menu_color_highlight' variables.
11435         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
11436         a message is printed.
11438 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11440         * kern/env.c (grub_env_context_open): Propagate hooks for global
11441         variables to new context.
11443         * kern/main.c (grub_set_root_dev): Export `root' variable.
11445 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11447         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
11448         discs unconditionally, since udev and others have options to provide
11449         them.
11451 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11453         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
11455 2008-01-04  Christian Franke  <franke@computer.org>
11457         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
11458         of eisa_mmap.
11460 2008-01-03  Pavel Roskin  <proski@gnu.org>
11462         * kern/i386/linuxbios/init.c: Put "void" to all function
11463         declarations with no arguments.
11464         * kern/powerpc/ieee1275/init.c: Likewise.
11465         * term/i386/pc/at_keyboard.c: Likewise.
11466         * term/i386/pc/vga_text.c: Likewise.
11467         * util/grub-mkdevicemap.c: Likewise.
11469 2008-01-02  Robert Millan  <rmh@aybabtu.com>
11471         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
11472         message when loaded image is out of bounds.
11473         (grub_multiboot_load_elf64): Likewise.
11475 2008-01-02  Pavel Roskin  <proski@gnu.org>
11477         * util/grub.d/10_linux.in: Try version without ".old" when
11478         looking for initrd.  It's better to use initrd from the newer
11479         kernel of the same version than no initrd at all.
11481 2008-01-01  Robert Millan  <rmh@aybabtu.com>
11483         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
11485 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
11487         * include/grub/video.h: Added grub_video_unmap_color and
11488         grub_video_get_active_render_target.
11489         (grub_video_adapter): Added unmap_color and get_active_render_target.
11491         * video/video.c: Added grub_video_unmap_color and
11492         grub_video_get_active_render_target.
11493         (grub_video_get_info): Changed method to accept NULL pointer as an
11494         argument to allow detection of active video adapter.
11496         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
11497         grub_video_vbe_unmap_color_int.
11498         Added grub_video_vbe_unmap_color and
11499         grub_video_vbe_get_active_render_target.
11500         (grub_video_vbe_adapter): Added unmap_color and
11501         get_active_render_target.
11503         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
11504         with grub_video_vbe_unmap_color_int.
11506         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
11507         (DEFAULT_NORMAL_COLOR): Likewise.
11508         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
11509         (DEFAULT_FG_COLOR): Removed.
11510         (DEFAULT_BG_COLOR): Likewise.
11511         (DEFAULT_CURSOR_COLOR): Changed value.
11512         (grub_virtual_screen): Added standard_color_setting,
11513         normal_color_setting, highlight_color_setting and term_color.
11514         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
11515         (bitmap_width): Added.
11516         (bitmap_height): Likewise.
11517         (bitmap): Likewise.
11518         (set_term_color): Likewise.
11519         (grub_virtual_screen_setup): Changed to use new terminal coloring
11520         settings.
11521         (grub_gfxterm_init): Added init for bitmap.
11522         (grub_gfxterm_fini): Added destroy for bitmap.
11523         (redraw_screen_rect): Updated to use background bitmap and new
11524         terminal coloring.
11525         (scroll_up): Added optimization for case when there is no bitmap.
11526         (grub_gfxterm_cls): Fixed to use correct background color.
11527         (grub_virtual_screen_setcolorstate): Changed to use new terminal
11528         coloring.
11529         (grub_virtual_screen_setcolor): Likewise.
11530         (grub_virtual_screen_getcolor): Added.
11531         (grub_gfxterm_background_image_cmd): Likewise.
11532         (grub_video_term): Added setcolor and getcolor.
11533         (MOD_INIT): Added registration of background_image command.
11534         (MOD_TERM): Added unregistration for background_image command.
11536 2007-12-30  Pavel Roskin  <proski@gnu.org>
11538         * loader/multiboot_loader.c: Fix multiboot command
11539         unregistration.  Fix all typos in the word "multiboot".
11541 2007-12-29  Pavel Roskin  <proski@gnu.org>
11543         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
11544         support for initrd names used in Fedora.
11546 2007-12-26  Bean  <bean123ch@gmail.com>
11548         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
11549         (cpio_mod_SOURCES): New variable.
11550         (cpio_mod_CFLAGS): Likewise.
11551         (cpio_mod_LDFLAGS): Likewise.
11553         * fs/cpio.c: New file.
11555         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
11557         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11559         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11561         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11563 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11565         * include/grub/term.h (struct grub_term): Add `getcolor' function.
11566         (grub_getcolor): New function.
11568         * kern/term.c (grub_getcolor): New function.
11569         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
11570         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
11571         (print_entry): Set normal and highlight colors to
11572         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
11573         respectively, before printing and restore them to old
11574         values afterwards.
11575         (grub_menu_init_page): Likewise.  Fill an additional colored space
11576         that would otherwise be left blank.
11578         * term/efi/console.c (grub_console_getcolor): New function.
11579         (struct grub_console_term.getcolor): New variable.
11580         * term/i386/pc/console.c (grub_console_getcolor): New function.
11581         (struct grub_console_term.getcolor): New variable.
11582         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
11583         (struct grub_console_term.getcolor): New variable.
11585         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
11586         (struct grub_console_term.setcolor): Remove variable.
11587         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
11588         (struct grub_console_term.setcolor): Remove variable.
11589         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
11590         (struct grub_console_term.setcolor): Remove variable.
11591         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
11592         (struct grub_console_term.setcolor): Remove variable.
11594 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11596         * configure.ac: Search for possible unifont.hex locations, and
11597         define UNIFONT_HEX if found.
11599         * Makefile.in (UNIFONT_HEX): Define variable.
11600         (DATA): Rename to ...
11601         (PKGLIB): ... this.  Update all users.
11602         (PKGDATA): New variable.
11603         (pkgdata_IMAGES): Rename to ...
11604         (pkglib_IMAGES): ... this. Update all users.
11605         (pkgdata_MODULES): Rename to ...
11606         (pkglib_MODULES): ... this. Update all users.
11607         (pkgdata_PROGRAMS): Rename to ...
11608         (pkglib_PROGRAMS): ... this. Update all users.
11609         (pkgdata_DATA): Rename to ...
11610         (pkglib_DATA): ... this. Update all users.
11611         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
11612         (unicode.pff, ascii.pff): New rules.
11613         (all-local): Add `$(PKGDATA)' dependency.
11614         (install-local): Process `$(PKGDATA)'.
11616         * util/update-grub_lib.in (font_path): Search for *.pff files in
11617         a few more locations, including `${pkgdata}'.
11619 2007-12-23  Robert Millan  <rmh@aybabtu.com>
11621         Patch from Bean  <bean123ch@gmail.com>:
11622         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
11623         `size'.
11625 2007-12-21  Bean  <bean123ch@gmail.com>
11627         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
11628         (ntfscomp_mod_SOURCES): New variable.
11629         (ntfscomp_mod_CFLAGS): Likewise.
11630         (ntfscomp_mod_LDFLAGS): Likewise.
11632         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
11633         (grub_probe_SOURCES): Likewise.
11634         (grub_emu_SOURCES): Likewise.
11636         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11637         (grub_emu_SOURCES): Likewise.
11639         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11640         (grub_emu_SOURCES): Likewise.
11642         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11643         (grub_emu_SOURCES): Likewise.
11645         * fs/ntfs.c (grub_ntfscomp_func): New variable.
11646         (read_run_list): Renamed to grub_ntfs_read_run_list.
11647         (decomp_nextvcn): Moved to ntfscomp.c.
11648         (decomp_getch): Likewise.
11649         (decomp_get16): Likewise.
11650         (decomp_block): Likewise.
11651         (read_block): Likewise.
11652         (read_data): Partially moved to ntfscomp.c.
11653         (fixup): Change unsigned to grub_uint16_t.
11654         (read_mft): Change unsigned long to grub_uint32_t.
11655         (read_attr): Likewise.
11656         (read_data): Likewise.
11657         (read_run_data): Likewise.
11658         (read_run_list): Likewise.
11659         (read_mft): Likewise.
11661         * fs/ntfscomp.c: New file.
11663         * include/grub/ntfs.h: New file.
11665 2007-12-16  Robert Millan  <rmh@aybabtu.com>
11667         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
11668         IDE disk check, since Linux is known to support 20 IDE disks.
11669         Reported by Colin Watson.
11671 2007-12-15  Bean  <bean123ch@gmail.com>
11673         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
11674         (lnxboot_img_SOURCES): New variable.
11675         (lnxboot_img_ASFLAGS): Likewise.
11676         (lnxboot_img_LDFLAGS): Likewise.
11678         * boot/i386/pc/lnxboot.S: New file.
11680 2007-11-24  Pavel Roskin  <proski@gnu.org>
11682         * configure.ac: Test if '--build-id=none' is supported by the
11683         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
11684         objcopy to generate incorrect binary files (binutils
11685         2.17.50.0.18-1 as shipped by Fedora 8).
11686         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
11687         linking, so that build ID doesn't break the test.
11689 2007-11-24  Pavel Roskin  <proski@gnu.org>
11691         * include/grub/i386/time.h: use "void" in the argument list
11692         of grub_cpu_idle().
11693         * include/grub/powerpc/time.h: Likewise.
11694         * include/grub/sparc64/time.h: Likewise.
11696 2007-11-18  Christian Franke  <franke@computer.org>
11698         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
11699         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
11700         This fixes the problem that function keys did not work in grub-emu.
11702 2007-11-18  Christian Franke  <franke@computer.org>
11704         * disk/host.c (grub_host_open): Remove attribute unused from
11705         name parameter. Add check for "host". This fixes the problem
11706         that grub-emu does not find partitions.
11708 2007-11-18  Christian Franke  <franke@computer.org>
11710         * util/hostfs.c (is_dir): New function.
11711         (grub_hostfs_dir):  Handle missing dirent.d_type case.
11712         (grub_hostfs_read): Add missing fseek().
11713         (grub_hostfs_label): Clear label pointer.  This fixes a crash
11714         of grub-emu on "ls (host)".
11716 2007-11-18  Christian Franke  <franke@computer.org>
11718         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
11719         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
11720         to 64 bit boundary by default.
11722 2007-11-18  Bean  <bean123ch@gmail.com>
11724         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
11725         (hexdump_mod_SOURCES): New variable.
11726         (hexdump_mod_CFLAGS): Likewise.
11727         (hexdump_mod_LDFLAGS): Likewise.
11729         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11731         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11733         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11735         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11737         * include/grub/hexdump.h: New file.
11739         * commands/hexdump.c: New file.
11741 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11743         * commands/i386/pc/play.c (beep_off): Switch order of arguments
11744         in grub_outb() calls.
11745         (beep_on): Likewise.
11747 2007-11-10  Christian Franke  <franke@computer.org>
11749         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
11750         (grub_menu_run): Likewise.
11752 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11754         * include/grub/i386/efi/machine.h: New file.
11755         * include/grub/i386/linuxbios/machine.h: Likewise.
11756         * include/grub/i386/pc/machine.h: Likewise.
11757         * include/grub/powerpc/ieee1275/machine.h: Likewise.
11758         * include/grub/sparc64/ieee1275/machine.h: Likewise.
11760         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
11761         (serial_hw_io_addr): New variable.
11762         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
11763         instead of `(unsigned short *) 0x400'.
11765 2007-11-10  Bean  <bean123ch@gmail.com>
11767         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
11769 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11771         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
11772         (vga_mod_SOURCES): Added.
11773         (vga_mod_CFLAGS): Likewise.
11774         (vga_mod_LDFLAGS): Likewise.
11776         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
11777         grub_outb() calls.
11778         (set_map_mask): Likewise.
11779         (set_read_map): Likewise.
11780         (set_read_address): Likewise.
11781         (vga_font): Removed variable.
11782         (get_vga_glyph): Removed function.
11783         (invalidate_char): Likewise.
11784         (write_char): Changed to use grub_font_get_glyph() for font
11785         information.
11786         (grub_vga_putchar): Likewise.
11787         (grub_vga_getcharwidth): Likewise.
11789 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11791         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
11792         flags.
11793         (pxeboot_img_LDFLAGS): Likewise.
11794         (diskboot_img_LDFLAGS): Likewise.
11795         (kernel_img_LDFLAGS): Likewise.
11797 2007-11-06  Robert Millan  <rmh@aybabtu.com>
11799         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
11800         in grub_outb() calls.
11801         (serial_hw_init): Likewise.
11803 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11805         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
11806         spaces.  Skip non-regular files.
11808 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11810         * kern/disk.c (grub_disk_firmware_fini)
11811         (grub_disk_firmware_is_tainted): New variables.
11813         * include/grub/disk.h (grub_disk_firmware_fini)
11814         (grub_disk_firmware_is_tainted): Likewise.
11816         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
11817         (grub_disk_biosdisk_fini): ... to here.
11818         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
11819         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
11820         is set.  Register grub_disk_biosdisk_fini() in
11821         `grub_disk_firmware_fini'.
11823         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
11824         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
11825         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
11826         to finish existing firmware disk interface.
11828         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
11829         (ata_mod_SOURCES): New variable.
11830         (ata_mod_CFLAGS): Likewise.
11831         (ata_mod_LDFLAGS): Likewise.
11833 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11835         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
11836         (grub_ata_wait): Reimplement using grub_millisleep().
11838         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
11839         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
11841 2007-11-03  Marco Gerards  <marco@gnu.org>
11843         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
11844         (CRTC_ADDR_PORT): New macro.
11845         (CRTC_DATA_PORT): Likewise.
11846         (CRTC_CURSOR): Likewise.
11847         (CRTC_CURSOR_ADDR_HIGH): Likewise.
11848         (CRTC_CURSOR_ADDR_LOW): Likewise.
11849         (update_cursor): New function.
11850         (grub_console_real_putchar): Call `update_cursor'.
11851         (grub_console_gotoxy): Likewise.
11852         (grub_console_cls): Set the default color when clearing the
11853         screen.
11854         (grub_console_setcursor): Implemented.
11856 2007-11-03  Marco Gerards  <marco@gnu.org>
11858         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
11859         become activate.
11860         (grub_ata_pio_write): Likewise.
11862         (grub_atapi_identify): Wait after issuing an ATA command.
11863         (grub_atapi_packet): Likewise.
11864         (grub_ata_identify): Likewise.
11865         (grub_ata_readwrite): Likewise.
11867 2007-11-03  Marco Gerards  <marco@gnu.org>
11869         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
11870         (grub_ata_pio_write): Likewise.
11871         (grub_ata_readwrite): Use `grub_error', instead of
11872         returning `grub_errno'.
11874 2007-11-03  Marco Gerards  <marco@gnu.org>
11876         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
11877         grub_ata_pio_write once for every single sector, instead of for
11878         multiple sectors.
11880 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11882         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
11884         * conf/i386-linuxbios.rmk: New file.
11886         * kern/i386/pc/hardware.c: Likewise.
11887         * term/i386/pc/at_keyboard.c: Likewise.
11888         * term/i386/pc/vga_text.c: Likewise.
11890         * include/grub/i386/linuxbios/boot.h: Likewise.
11891         * include/grub/i386/linuxbios/console.h: Likewise.
11892         * include/grub/i386/linuxbios/init.h: Likewise.
11893         * include/grub/i386/linuxbios/kernel.h: Likewise.
11894         * include/grub/i386/linuxbios/loader.h: Likewise.
11895         * include/grub/i386/linuxbios/memory.h: Likewise.
11896         * include/grub/i386/linuxbios/serial.h: Likewise.
11897         * include/grub/i386/linuxbios/time.h: Likewise.
11899         * kern/i386/linuxbios/init.c: Likewise.
11900         * kern/i386/linuxbios/startup.S: Likewise.
11901         * kern/i386/linuxbios/table.c: Likewise.
11903 2007-10-31  Marco Gerards  <marco@gnu.org>
11905         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
11906         (ata_mod_SOURCES): New variable.
11907         (ata_mod_CFLAGS): Likewise.
11908         (ata_mod_LDFLAGS): Likewise.
11910         * disk/ata.c: New file.
11912         * include/grub/disk.h (grub_disk_dev_id): Add
11913         `GRUB_DISK_DEV_ATA_ID'.
11915 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11917         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
11918         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
11920         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
11921         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
11923         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
11924         `<grub/types.h>'.
11926         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
11928 2007-10-27  Robert Millan  <rmh@aybabtu.com>
11930         * include/grub/types.h (ULONG_MAX): Define macro.
11932 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11934         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
11935         `"../realmode.S"'.
11936         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
11938 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11940         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
11941         (pkgdata_MODULES): Add `biosdisk.mod'.
11942         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
11943         variables.
11945         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
11946         (grub_biosdisk_init): Replace with ...
11947         (GRUB_MOD_INIT(biosdisk)): ... this.
11948         (grub_biosdisk_fini): Replace with ...
11949         (GRUB_MOD_FINI(biosdisk)): ... this.
11951         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
11952         (grub_machine_init): Remove call to grub_biosdisk_init().
11953         (grub_machine_fini): Remove call to grub_machine_fini().
11955         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
11957 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11959         * include/grub/time.h: New file.
11960         * include/grub/i386/time.h: Likewise.
11961         * include/grub/powerpc/time.h: Likewise.
11962         * include/grub/sparc64/time.h: Likewise.
11964         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
11965         instances to ...
11966         (KERNEL_MACHINE_TIME_HEADER): ... this.
11967         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11968         instances to ...
11969         (KERNEL_MACHINE_TIME_HEADER): ... this.
11970         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11971         instances to ...
11972         (KERNEL_MACHINE_TIME_HEADER): ... this.
11974         * kern/i386/efi/init.c: Include `<grub/time.h>'.
11975         (grub_millisleep): New function.
11976         * kern/i386/pc/init.c: Include `<grub/time.h>'.
11977         (grub_millisleep): New function.
11978         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
11979         Remove `grub/machine/time.h' include.
11980         (grub_millisleep): New function.
11981         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
11982         Remove `grub/machine/time.h' include.
11983         (grub_millisleep): New function.
11985         * include/grub/misc.h (grub_div_roundup): New function.
11987         * kern/misc.c: Include `<grub/time.h>'.
11988         (grub_millisleep_generic): New function.
11990         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
11991         Add `time.h'.
11992         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
11993         Add `time.h'.
11994         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
11995         `machine/time.h'.  Add `time.h'.
11996         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11998 2007-10-21  Robert Millan  <rmh@aybabtu.com>
12000         * include/grub/misc.h (grub_max): New function.
12002 2007-10-21  Robert Millan  <rmh@aybabtu.com>
12004         * util/misc.c (grub_util_info): Call fflush() before returning.
12006 2007-10-20  Robert Millan  <rmh@aybabtu.com>
12008         * genmk.rb (Image): Copy `extra_flags' from here ...
12009         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
12011         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
12012         to `argc' and `args' arguments.
12014 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12016         * kern/i386/loader.S: New file.
12018         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
12019         * kern/i386/loader.S (grub_linux_prot_size)... to here.
12020         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
12021         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
12022         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
12023         * kern/i386/loader.S (grub_linux_real_addr)... to here.
12024         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
12025         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
12026         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
12027         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
12028         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
12029         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
12030         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
12031         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
12033         * kern/i386/realmode.S: New file.
12035         * kern/i386/pc/startup.S (protstack): Moved from here ...
12036         * kern/i386/realmode.S (protstack)... to here.
12037         * kern/i386/pc/startup.S (gdt): Moved from here ...
12038         * kern/i386/realmode.S (gdt)... to here.
12039         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
12040         * kern/i386/realmode.S (prot_to_real)... to here.
12042         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
12043         `kern/i386/realmode.S'.
12045 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12047         * include/grub/i386/loader.h: New file.
12049         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
12050         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12051         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12052         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12053         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
12054         * include/grub/i386/loader.h (grub_linux_prot_size)
12055         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12056         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12057         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12058         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
12060         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
12062 2007-10-15  Robert Millan  <rmh@aybabtu.com>
12064         * normal/misc.c (grub_normal_print_device_info): Do not probe for
12065         filesystem when dev->disk is unset.
12066         Do probe for filesystem even when dev->disk->has_partitions is set.
12067         In case a filesystem is found, always report it.
12068         In case it isn't, if dev->disk->has_partitions is set, report that
12069         a partition table was found instead of reporting that no filesystem
12070         could be identified.
12072 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12074         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
12075         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
12077         * include/grub/types.h (grub_host_to_target16): New macro.
12078         (grub_host_to_target32): Likewise.
12079         (grub_host_to_target64): Likewise.
12080         (grub_target_to_host16): Likewise.
12081         (grub_target_to_host32): Likewise.
12082         (grub_target_to_host64): Likewise.
12084         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12085         Renamed from to ...
12086         (GRUB_MOD_ALIGN): ...this.  Update all users.
12088         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
12089         grub_host_to_target32.
12090         Replace grub_be_to_cpu32 with grub_target_to_host32.
12091         (load_modules): Likewise.
12092         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
12093         Replace grub_be_to_cpu32 with grub_target_to_host32.
12094         Replace grub_cpu_to_be16 with grub_host_to_target16.
12095         Replace grub_cpu_to_be32 grub_host_to_target32.
12097 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12099         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
12100         * util/elf/grub-mkimage.c: ... here.
12102         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
12103         `util/powerpc/ieee1275/grub-mkimage.c'.
12105 2007-10-07  Robert Millan  <rmh@aybabtu.com>
12107         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
12108         and make it easier to figure out.
12109         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
12110         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
12111         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
12112         leave us with less than HEAP_MIN_SIZE total heap.
12113         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
12115 2007-10-03  Robert Millan  <rmh@aybabtu.com>
12117         * include/grub/i386/io.h: New file.
12118         * commands/i386/pc/play.c (inb): Removed.
12119         (outb): Removed.
12120         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12121         with grub_outb().
12122         * term/i386/pc/serial.c  (inb): Removed.
12123         (outb): Removed.
12124         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12125         with grub_outb().
12126         * term/i386/pc/vga.c  (inb): Removed.
12127         (outb): Removed.
12128         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12129         with grub_outb().
12131 2007-10-02  Robert Millan  <rmh@aybabtu.com>
12133         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
12134         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12135         Reported by Marcin Kurek.
12137 2007-09-07  Robert Millan  <rmh@aybabtu.com>
12139         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
12140         SmartFirmware version updates (as released by Sven Luther), and avoid
12141         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
12142         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
12143         known broken.
12145 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12147         From Hitoshi Ozeki:
12148         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
12149         when merging two regions.
12151 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12153         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
12154         * normal/completion.c (grub_normal_do_completion): Likewise.
12155         Reported by Hitoshi Ozeki.
12157 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12159         Do not use devices at boot in chainloading.
12161         * loader/i386/pc/chainloader.c (boot_drive): New variable.
12162         (boot_part_addr): Likewise.
12163         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
12164         with BOOT_DRIVE and BOOT_PART_ADDR.
12165         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
12166         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
12168 2007-08-29  Robert Millan  <rmh@aybabtu.com>
12170         Patch from Simon Peter <dn.tlp@gmx.net>:
12171         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
12172         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
12173         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
12174         util/i386/pc/grub-setup.c_DEPENDENCIES.
12175         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
12176         util/grub-probe.c_DEPENDENCIES.
12177         * conf/powerpc-ieee1275.rmk: Likewise.
12179 2007-08-28  Robert Millan  <rmh@aybabtu.com>
12181         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
12182         to tell grub-mkdevicemap how to name devices.
12183         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
12184         feature).
12186         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
12187         util/i386/get_disk_name.c.
12188         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
12189         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
12190         util/ieee1275/get_disk_name.c.
12192         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
12194         * DISTLIST: Add util/i386/get_disk_name.c and
12195         util/ieee1275/get_disk_name.c.
12197         * util/grub-mkdevicemap.c: Replace device naming logic with
12198         grub_util_get_disk_name() calls.
12200 2007-08-20  Robert Millan  <rmh@aybabtu.com>
12202         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
12203         (so that it works for both plural and singular quantities).
12205 2007-08-05  Robert Millan  <rmh@aybabtu.com>
12207         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
12208         so that [xz] isn't taken into account when determining order.
12210 2007-08-02  Marco Gerards  <marco@gnu.org>
12212         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
12213         `include/multiboot2.h', `include/grub/elfload.h',
12214         `include/multiboot.h', `include/grub/multiboot.h',
12215         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
12216         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
12217         `kern/elf.c', `loader/multiboot_loader.c',
12218         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
12219         `loader/i386/pc/multiboot2.c',
12220         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
12221         `util/i386/pc/grub-mkrescue.in'.  Remove
12222         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
12223         `include/grub/i386/pc/util/biosdisk.h' and
12224         `include/grub/powerpc/ieee1275/multiboot.h'.
12226 2007-08-02  Bean  <bean123ch@gmail.com>
12228         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
12229         (ntfs_mod_SOURCES): New variable.
12230         (ntfs_mod_CFLAGS): Likewise.
12231         (ntfs_mod_LDFLAGS): Likewise.
12233         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
12234         (grub_probe_SOURCES): Likewise.
12235         (grub_emu_SOURCES): Likewise.
12237         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12238         (grub_emu_SOURCES): Likewise.
12240         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12241         (grub_emu_SOURCES): Likewise.
12243         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
12245         * fs/ntfs.c: New file.
12247 2007-08-02  Bean  <bean123ch@gmail.com>
12249         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
12251         * file.h (grub_file): Likewise.
12253         * fshelp.h (grub_fshelp_read_file): Likewise.
12255         * util/i386/pc/grub-setup.c (setup): Likewise.
12256         (save_first_sector): Likewise.
12257         (save_blocklists): Likewise.
12259         * fs/affs.c (grub_affs_read_file): Likewise.
12261         * fs/ext2.c (grub_ext2_read_file): Likewise.
12263         * fs/fat.c (grub_fat_read_data): Likewise.
12265         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
12267         * fs/hfs.c (grub_hfs_read_file): Likewise.
12269         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12271         * fs/jfs.c (grub_jfs_read_file): Likewise.
12273         * fs/minix.c (grub_minix_read_file): Likewise.
12275         * fs/sfs.c (grub_sfs_read_file): Likewise.
12277         * fs/ufs.c (grub_ufs_read_file): Likewise.
12279         * fs/xfs.c (grub_xfs_read_file): Likewise.
12281         * command/blocklist.c (read_blocklist): Likewise.
12282         (print_blocklist): Likewise.
12284 2007-08-02  Marco Gerards  <marco@gnu.org>
12286         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
12287         `util/hostfs.c'.
12289         * disk/host.c: New file.
12291         * util/hostfs.c: Likewise.
12293         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
12294         return `GRUB_ERR_BAD_FS'.
12295         * fs/sfs.c (grub_sfs_mount): Likewise.
12296         * fs/xfs.c (grub_xfs_mount): Likewise.
12298         * include/grub/disk.h (enum grub_disk_dev_id): Add
12299         `GRUB_DISK_DEVICE_HOST_ID'.
12301         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
12303 2007-07-24  Jerone Young  <jerone@gmail.com>
12305         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
12306         modules for compilation.
12307         * conf/powerpc-ieee1275.rmk: Likewise.
12309         * include/multiboot.h: Move multiboot definitions to one file. Rename
12310         many definitions to not get grub specific.
12311         * include/multiboot2.h: Create header with multiboot 2 definitions.
12312         * include/grub/multiboot.h: Header for grub specific function
12313         prototypes and definitions.
12314         * include/grub/multiboot2.h: Likewise.
12315         * include/grub/multiboot_loader.h: Likewise.
12316         * include/grub/i386/pc/multiboot.h: Removed.
12317         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
12319         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
12320         and 2 to allow for one multiboot and module commands.
12321         * loader/multiboot2.c: Add multiboot2 functionality.
12322         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
12323         and definition names.
12324         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
12325         2 functions.
12326         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
12327         ieee1275 specific multiboot2 code.
12329         * kern/i386/pc/startup.S: Change headers and definition names for
12330         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
12332 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12334         * geninitheader.sh: Process file specified in first parameter rather
12335         than hardcoding grub_modules_init.lst.
12336         * geninit.sh: Likewise.  Also, construct header name dynamically rather
12337         than hardcoding grub_modules_init.h.
12339         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
12340         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
12341         grub_probe_init.[ch] and grub_setup_init.[ch].
12343         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
12344         grub_modules_init.h with grub_emu_init.h.
12345         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
12346         grub_probe_init.[ch] files.
12347         * conf/i386-efi.rmk: Likewise.
12348         * conf/i386-pc.rmk: Likewise.
12349         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
12350         grub_setup_init.[ch] files.
12352         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
12353         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
12354         to initialize modules rather than a list of hardcoded functions.
12355         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
12356         grub_init_all() to initialize modules rather than a list of hardcoded
12357         functions.
12359 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12361         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
12362         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
12364 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12366         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12367         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
12368         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
12369         flag when running on SmartFirmware.
12370         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
12371         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
12372         was set.
12374         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12375         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
12376         rather than decreasing it.
12378         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
12379         there's not enough space to do it, fail in the same way as when it
12380         can't be done because there are no partitions.
12382         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
12383         when nvsetenv failed.
12385 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12387         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
12388         because this rule is automatically generated.
12389         (grub-mkrescue): Removed for the same reason as above.
12391 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12393         Migrate to GNU General Public License Version 3.
12395         * COPYING: Replaced with the plain text version of GPLv3.
12397         * config.guess: Updated from gnulib.
12398         * config.sub: Likewise.
12400         * geninit.sh: Output a GPLv3 copyright notice.
12401         * geninitheader.sh: Likewise.
12402         * genmodsrc.sh: Likewise.
12403         * gensymlist.sh.in: Likewise.
12405         * boot/i386/pc/boot.S: Upgraded to GPLv3.
12406         * boot/i386/pc/diskboot.S: Likewise.
12407         * boot/i386/pc/pxeboot.S: Likewise.
12408         * commands/blocklist.c: Likewise.
12409         * commands/boot.c: Likewise.
12410         * commands/cat.c: Likewise.
12411         * commands/cmp.c: Likewise.
12412         * commands/configfile.c: Likewise.
12413         * commands/echo.c: Likewise.
12414         * commands/help.c: Likewise.
12415         * commands/ls.c: Likewise.
12416         * commands/search.c: Likewise.
12417         * commands/terminal.c: Likewise.
12418         * commands/test.c: Likewise.
12419         * commands/videotest.c: Likewise.
12420         * commands/i386/cpuid.c: Likewise.
12421         * commands/i386/pc/halt.c: Likewise.
12422         * commands/i386/pc/play.c: Likewise.
12423         * commands/i386/pc/reboot.c: Likewise.
12424         * commands/i386/pc/vbeinfo.c: Likewise.
12425         * commands/i386/pc/vbetest.c: Likewise.
12426         * commands/ieee1275/halt.c: Likewise.
12427         * commands/ieee1275/reboot.c: Likewise.
12428         * commands/ieee1275/suspend.c: Likewise.
12429         * disk/loopback.c: Likewise.
12430         * disk/lvm.c: Likewise.
12431         * disk/raid.c: Likewise.
12432         * disk/efi/efidisk.c: Likewise.
12433         * disk/i386/pc/biosdisk.c: Likewise.
12434         * disk/ieee1275/ofdisk.c: Likewise.
12435         * font/manager.c: Likewise.
12436         * fs/affs.c: Likewise.
12437         * fs/ext2.c: Likewise.
12438         * fs/fat.c: Likewise.
12439         * fs/fshelp.c: Likewise.
12440         * fs/hfs.c: Likewise.
12441         * fs/hfsplus.c: Likewise.
12442         * fs/iso9660.c: Likewise.
12443         * fs/jfs.c: Likewise.
12444         * fs/minix.c: Likewise.
12445         * fs/sfs.c: Likewise.
12446         * fs/ufs.c: Likewise.
12447         * fs/xfs.c: Likewise.
12448         * hello/hello.c: Likewise.
12449         * include/grub/acorn_filecore.h: Likewise.
12450         * include/grub/arg.h: Likewise.
12451         * include/grub/bitmap.h: Likewise.
12452         * include/grub/boot.h: Likewise.
12453         * include/grub/cache.h: Likewise.
12454         * include/grub/device.h: Likewise.
12455         * include/grub/disk.h: Likewise.
12456         * include/grub/dl.h: Likewise.
12457         * include/grub/elfload.h: Likewise.
12458         * include/grub/env.h: Likewise.
12459         * include/grub/err.h: Likewise.
12460         * include/grub/file.h: Likewise.
12461         * include/grub/font.h: Likewise.
12462         * include/grub/fs.h: Likewise.
12463         * include/grub/fshelp.h: Likewise.
12464         * include/grub/gzio.h: Likewise.
12465         * include/grub/hfs.h: Likewise.
12466         * include/grub/kernel.h: Likewise.
12467         * include/grub/loader.h: Likewise.
12468         * include/grub/lvm.h: Likewise.
12469         * include/grub/misc.h: Likewise.
12470         * include/grub/mm.h: Likewise.
12471         * include/grub/net.h: Likewise.
12472         * include/grub/normal.h: Likewise.
12473         * include/grub/parser.h: Likewise.
12474         * include/grub/partition.h: Likewise.
12475         * include/grub/pc_partition.h: Likewise.
12476         * include/grub/raid.h: Likewise.
12477         * include/grub/rescue.h: Likewise.
12478         * include/grub/script.h: Likewise.
12479         * include/grub/setjmp.h: Likewise.
12480         * include/grub/symbol.h: Likewise.
12481         * include/grub/term.h: Likewise.
12482         * include/grub/terminfo.h: Likewise.
12483         * include/grub/tparm.h: Likewise.
12484         * include/grub/types.h: Likewise.
12485         * include/grub/video.h: Likewise.
12486         * include/grub/efi/api.h: Likewise.
12487         * include/grub/efi/chainloader.h: Likewise.
12488         * include/grub/efi/console.h: Likewise.
12489         * include/grub/efi/console_control.h: Likewise.
12490         * include/grub/efi/disk.h: Likewise.
12491         * include/grub/efi/efi.h: Likewise.
12492         * include/grub/efi/pe32.h: Likewise.
12493         * include/grub/efi/time.h: Likewise.
12494         * include/grub/i386/linux.h: Likewise.
12495         * include/grub/i386/setjmp.h: Likewise.
12496         * include/grub/i386/types.h: Likewise.
12497         * include/grub/i386/efi/kernel.h: Likewise.
12498         * include/grub/i386/efi/loader.h: Likewise.
12499         * include/grub/i386/efi/time.h: Likewise.
12500         * include/grub/i386/pc/biosdisk.h: Likewise.
12501         * include/grub/i386/pc/boot.h: Likewise.
12502         * include/grub/i386/pc/chainloader.h: Likewise.
12503         * include/grub/i386/pc/console.h: Likewise.
12504         * include/grub/i386/pc/init.h: Likewise.
12505         * include/grub/i386/pc/kernel.h: Likewise.
12506         * include/grub/i386/pc/loader.h: Likewise.
12507         * include/grub/i386/pc/memory.h: Likewise.
12508         * include/grub/i386/pc/multiboot.h: Likewise.
12509         * include/grub/i386/pc/serial.h: Likewise.
12510         * include/grub/i386/pc/time.h: Likewise.
12511         * include/grub/i386/pc/vbe.h: Likewise.
12512         * include/grub/i386/pc/vbeblit.h: Likewise.
12513         * include/grub/i386/pc/vbefill.h: Likewise.
12514         * include/grub/i386/pc/vbeutil.h: Likewise.
12515         * include/grub/i386/pc/vga.h: Likewise.
12516         * include/grub/ieee1275/ieee1275.h: Likewise.
12517         * include/grub/ieee1275/ofdisk.h: Likewise.
12518         * include/grub/powerpc/libgcc.h: Likewise.
12519         * include/grub/powerpc/setjmp.h: Likewise.
12520         * include/grub/powerpc/types.h: Likewise.
12521         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
12522         * include/grub/powerpc/ieee1275/console.h: Likewise.
12523         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
12524         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
12525         * include/grub/powerpc/ieee1275/loader.h: Likewise.
12526         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
12527         * include/grub/powerpc/ieee1275/time.h: Likewise.
12528         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
12529         * include/grub/sparc64/libgcc.h: Likewise.
12530         * include/grub/sparc64/setjmp.h: Likewise.
12531         * include/grub/sparc64/types.h: Likewise.
12532         * include/grub/sparc64/ieee1275/console.h: Likewise.
12533         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12534         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12535         * include/grub/sparc64/ieee1275/time.h: Likewise.
12536         * include/grub/util/biosdisk.h: Likewise.
12537         * include/grub/util/getroot.h: Likewise.
12538         * include/grub/util/lvm.h: Likewise.
12539         * include/grub/util/misc.h: Likewise.
12540         * include/grub/util/raid.h: Likewise.
12541         * include/grub/util/resolve.h: Likewise.
12542         * io/gzio.c: Likewise.
12543         * kern/device.c: Likewise.
12544         * kern/disk.c: Likewise.
12545         * kern/dl.c: Likewise.
12546         * kern/elf.c: Likewise.
12547         * kern/env.c: Likewise.
12548         * kern/err.c: Likewise.
12549         * kern/file.c: Likewise.
12550         * kern/fs.c: Likewise.
12551         * kern/loader.c: Likewise.
12552         * kern/main.c: Likewise.
12553         * kern/misc.c: Likewise.
12554         * kern/mm.c: Likewise.
12555         * kern/parser.c: Likewise.
12556         * kern/partition.c: Likewise.
12557         * kern/rescue.c: Likewise.
12558         * kern/term.c: Likewise.
12559         * kern/efi/efi.c: Likewise.
12560         * kern/efi/init.c: Likewise.
12561         * kern/efi/mm.c: Likewise.
12562         * kern/i386/dl.c: Likewise.
12563         * kern/i386/efi/init.c: Likewise.
12564         * kern/i386/efi/startup.S: Likewise.
12565         * kern/i386/pc/init.c: Likewise.
12566         * kern/i386/pc/lzo1x.S: Likewise.
12567         * kern/i386/pc/startup.S: Likewise.
12568         * kern/ieee1275/ieee1275.c: Likewise.
12569         * kern/powerpc/cache.S: Likewise.
12570         * kern/powerpc/dl.c: Likewise.
12571         * kern/powerpc/ieee1275/cmain.c: Likewise.
12572         * kern/powerpc/ieee1275/crt0.S: Likewise.
12573         * kern/powerpc/ieee1275/init.c: Likewise.
12574         * kern/powerpc/ieee1275/openfw.c: Likewise.
12575         * kern/sparc64/cache.S: Likewise.
12576         * kern/sparc64/dl.c: Likewise.
12577         * kern/sparc64/ieee1275/init.c: Likewise.
12578         * kern/sparc64/ieee1275/openfw.c: Likewise.
12579         * loader/efi/chainloader.c: Likewise.
12580         * loader/efi/chainloader_normal.c: Likewise.
12581         * loader/i386/efi/linux.c: Likewise.
12582         * loader/i386/efi/linux_normal.c: Likewise.
12583         * loader/i386/pc/chainloader.c: Likewise.
12584         * loader/i386/pc/chainloader_normal.c: Likewise.
12585         * loader/i386/pc/linux.c: Likewise.
12586         * loader/i386/pc/linux_normal.c: Likewise.
12587         * loader/i386/pc/multiboot.c: Likewise.
12588         * loader/i386/pc/multiboot_normal.c: Likewise.
12589         * loader/powerpc/ieee1275/linux.c: Likewise.
12590         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12591         * normal/arg.c: Likewise.
12592         * normal/cmdline.c: Likewise.
12593         * normal/command.c: Likewise.
12594         * normal/completion.c: Likewise.
12595         * normal/execute.c: Likewise.
12596         * normal/function.c: Likewise.
12597         * normal/lexer.c: Likewise.
12598         * normal/main.c: Likewise.
12599         * normal/menu.c: Likewise.
12600         * normal/menu_entry.c: Likewise.
12601         * normal/misc.c: Likewise.
12602         * normal/parser.y: Likewise.
12603         * normal/script.c: Likewise.
12604         * normal/i386/setjmp.S: Likewise.
12605         * normal/powerpc/setjmp.S: Likewise.
12606         * normal/sparc64/setjmp.S: Likewise.
12607         * partmap/acorn.c: Likewise.
12608         * partmap/amiga.c: Likewise.
12609         * partmap/apple.c: Likewise.
12610         * partmap/gpt.c: Likewise.
12611         * partmap/pc.c: Likewise.
12612         * partmap/sun.c: Likewise.
12613         * term/gfxterm.c: Likewise.
12614         * term/terminfo.c: Likewise.
12615         * term/efi/console.c: Likewise.
12616         * term/i386/pc/console.c: Likewise.
12617         * term/i386/pc/serial.c: Likewise.
12618         * term/i386/pc/vesafb.c: Likewise.
12619         * term/i386/pc/vga.c: Likewise.
12620         * term/ieee1275/ofconsole.c: Likewise.
12621         * util/biosdisk.c: Likewise.
12622         * util/console.c: Likewise.
12623         * util/genmoddep.c: Likewise.
12624         * util/getroot.c: Likewise.
12625         * util/grub-emu.c: Likewise.
12626         * util/grub-mkdevicemap.c: Likewise.
12627         * util/grub-probe.c: Likewise.
12628         * util/lvm.c: Likewise.
12629         * util/misc.c: Likewise.
12630         * util/raid.c: Likewise.
12631         * util/resolve.c: Likewise.
12632         * util/update-grub.in: Likewise.
12633         * util/update-grub_lib.in: Likewise.
12634         * util/grub.d/00_header.in: Likewise.
12635         * util/grub.d/10_hurd.in: Likewise.
12636         * util/grub.d/10_linux.in: Likewise.
12637         * util/i386/efi/grub-install.in: Likewise.
12638         * util/i386/efi/grub-mkimage.c: Likewise.
12639         * util/i386/pc/grub-install.in: Likewise.
12640         * util/i386/pc/grub-mkimage.c: Likewise.
12641         * util/i386/pc/grub-mkrescue.in: Likewise.
12642         * util/i386/pc/grub-setup.c: Likewise.
12643         * util/i386/pc/misc.c: Likewise.
12644         * util/powerpc/ieee1275/grub-install.in: Likewise.
12645         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
12646         * util/powerpc/ieee1275/misc.c: Likewise.
12647         * video/bitmap.c: Likewise.
12648         * video/video.c: Likewise.
12649         * video/i386/pc/vbe.c: Likewise.
12650         * video/i386/pc/vbeblit.c: Likewise.
12651         * video/i386/pc/vbefill.c: Likewise.
12652         * video/i386/pc/vbeutil.c: Likewise.
12653         * video/readers/tga.c: Likewise.
12655 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12657         * conf/i386-efi.rmk: Replace obsolete reference to
12658         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
12659         with util/getroot.c.
12660         * conf/powerpc-ieee1275.rmk: Likewise.
12661         * conf/sparc64-ieee1275.rmk: Likewise.
12663         * util/grub-emu.c (main): Fix unchecked pointer handling.
12665 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12667         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
12668         invocation to fail, in order to support partition-less media.
12670         * util/i386/pc/grub-install.in: Likewise.
12672         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
12673         which fs or partmap modules are needed (akin to its sister scripts).
12675         Also use grub-probe to get rid of unportable /proc/mounts check.
12677         Print the same informational message that the other scripts do, before
12678         exiting.
12680 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12682         * util/update-grub_lib.in (font_path): New function.  Determine whether
12683         a font file can be found and, if so, echo the GRUB path to it.
12685         * util/update-grub.in: Handle multiple terminals depending on user
12686         input, platform availability and font file presence.  Propagate
12687         variables of our findings to /etc/grub.d/ children.
12689         * util/grub.d/00_header.in: Handle multiple terminals, based on
12690         environment setup by update-grub.
12692 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12694         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
12696 2007-06-21  Robert Millan  <rmh@aybabtu.com>
12698         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
12699         indicate end of data section in kernel image.
12700         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
12701         GRUB_KERNEL_MACHINE_DATA_END.
12703         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
12704         space for it.
12705         * kern/i386/efi/startup.S: Likewise.
12707         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
12708         during image generation.  Implement --prefix option to override this
12709         patch.
12710         * util/i386/efi/grub-mkimage.c: Likewise.
12712         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
12713         code to make path relative to its root into a separate function.
12715         * util/i386/pc/grub-install.in: Use newly provided
12716         make_system_path_relative_to_its_root() to convert ${grubdir}, then
12717         pass the result to grub-install --prefix.
12719 2007-06-13  Robert Millan  <rmh@aybabtu.com>
12721         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
12722         DEFAULT_DEVICE_MAP.
12723         * util/grub-emu.c: Use above definitions from misc.h instead of
12724         defining them.
12725         * util/grub-mkdevicemap.c: Likewise.
12726         * util/i386/pc/grub-setup.c: Likewise.
12727         * util/grub-probe.c: Likewise.
12728         (probe): Abort with grub_util_error() when either
12729         grub_guess_root_device or grub_util_get_grub_dev fails.
12731 2007-06-12  Robert Millan  <rmh@aybabtu.com>
12733         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
12734         "pager" assignment.
12735         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
12736         "pcdata".
12737         * util/grub-probe.c (probe): Likewise for "drive_name".
12739 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12741         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
12742         not just the cdrom one.
12744 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12746         * util/i386/pc/grub-mkrescue.in: Add "set -e".
12747         Add --pkglibdir=DIR option to override pkglibdir.
12748         Mention --image-type=TYPE in help output.
12749         Fix --grub-mkimage (it was a no-op).
12750         Abort gracefully when no parameter is given.
12752 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12754         * util/i386/pc/grub-mkrescue.in: New file.
12755         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
12756         * Makefile.in: Handle bin_SCRIPTS.
12758 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
12760         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
12761         list of video modes.
12763 2007-06-06  Robert Millan  <rmh@aybabtu.com>
12765         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
12766         file doesn't exist, or if it is in a filesystem grub can't read.
12768         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
12769         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
12770         header comment to fit in 80 columns when the variables are resolved.
12772         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
12773         could be identified by update-grub.  Remove redundant check for
12774         unifont.pff existence (since convert_system_path_to_grub_path now
12775         handles that).
12777 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12779         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
12781         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
12783         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
12785 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12787         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
12789         * include/grub/partition.h: Declare grub_apple_partition_map_init and
12790         grub_apple_partition_map_fini.
12792         * util/biosdisk.c
12793         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
12794         to access >2 TiB disks).
12796         Print disk->total_sectors with %llu instead of %lu, since this
12797         variable is always 64-bit (prevents wrong disk size from being displayed
12798         on either >2 TiB disk or big-endian CPU).
12800         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
12801         into a generic case that supports all (sane) partition maps.
12803         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
12804         breaks big-endian.
12806         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
12807         and grub_apple_partition_map_fini() after that.
12809 2007-06-01  Robert Millan  <rmh@aybabtu.com>
12811         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
12813         * util/grub.d/00_header.in: Only enable gfxterm when
12814         convert_system_path_to_grub_path() succeeds.
12816 2007-05-20  Robert Millan  <rmh@aybabtu.com>
12818         * util/update-grub_lib.in: New file.
12819         * DISTLIST: Add update-grub_lib.in.
12820         * conf/common.rmk: Generate update-grub_lib and install it in
12821         $(lib_DATA).
12822         * Makefile.in: Add install routine for $(lib_DATA).
12824         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
12825         function provided by update-grub_lib to support arbitrary paths of
12826         unifont.pff.
12827         * util/update-grub.in: Use convert_system_path_to_grub_path() to
12828         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
12830 2007-05-19  Robert Millan  <rmh@aybabtu.com>
12832         * commands/i386/cpuid.c: New module.
12833         * DISTLIST: Add it.
12834         * conf/i386-efi.rmk: Enable cpuid.mod.
12835         * conf/i386-pc.rmk: Likewise.
12837 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12839         * kern/disk.c (grub_disk_read): Check return value of
12840         grub_realloc().
12842 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12844         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
12845         arrays.
12846         * disk/raid.c (grub_raid_open): Likewise.
12848 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12850         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
12851         stack instead of on the heap.
12853         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
12854         before doing a read on it.
12856         * configure.ac: Only use -fno-stack-protector for the target
12857         environment.
12859 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12861         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
12862         __attribute_ ((unused)) to mode_type argument.
12864         * util/getroot.c (grub_guess_root_device): Fix #endif.
12866         * kern/misc.c (memcmp): Fix prototype.
12868         * include/grub/partition.h [GRUB_UTIL]
12869         (grub_gpt_partition_map_init): Add prototype.
12870         (grub_gpt_partition_map_fini): Likewise.
12872         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
12873         at the right place.
12875         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
12876         (grub_fat_read_data): Likewise.
12877         (grub_fat_find_dir): Likewise.
12879         * font/manager.c (find_glyph): Make table a const.
12880         (grub_font_get_glyph): Remove bitmap from if statement.
12882 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
12884         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
12885         code, first search for device in /dev/mapper, then in /dev.
12886         (grub_util_get_grub_dev): New function.
12887         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
12888         prototype.
12889         * util/grub-probe.c (probe): Remove check for RAID, call
12890         grub_util_get_grub_dev() instead of
12891         grub_util_biosdisk_get_grub_dev().
12892         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
12893         grub_util_biosdisk_get_grub_dev().
12894         * util/i386/pc/grub-setup.c (main): Likewise.
12896 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12898         * DISTLIST: Update for the latest changes.
12899         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
12900         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
12901         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
12902         grub/util/biosdisk.h.
12903         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
12904         grub/util/biosdisk.h.
12906 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12908         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
12910 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12912         * util/i386/efi/grub-install.in: New.
12913         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
12914         newly added grub-install.
12915         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
12916         include.
12917         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
12918         grub/util/biosdisk.h.
12919         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
12920         grub/util/biosdisk.h.
12922 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12924         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
12925         * include/grub/util/biosdisk.h: ... here.
12926         * util/i386/pc/biosdisk.c: Moved to ...
12927         * util/biosdisk.c: ... here.
12928         * util/i386/pc/getroot.c: Moved to ...
12929         * util/getroot.c: ... here.
12930         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
12931         * util/grub-mkdevicemap.c: ... here.
12932         * util/i386/pc/grub-probe.c: Moved to ...
12933         * util/grub-probe.c: ... here.
12935 2007-05-15  Robert Millan  <rmh@aybabtu.com>
12937         * util/update-grub.in: Remove duplicated line in grub.cfg header
12938         message.
12940 2007-05-13  Robert Millan  <rmh@aybabtu.com>
12942         * util/update-grub.in: Fix a few assumptions about the devices holding
12943         /, /boot and /boot/grub being the same.
12944         * util/grub.d/00_header.in: Likewise.
12945         * util/grub.d/10_hurd.in: Likewise.
12946         * util/grub.d/10_linux.in: Likewise.
12948         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
12949         patterns.  Use that to define the `.old' suffix as older than `'.
12951         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
12953         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
12954         the grub.cfg header message.
12956 2007-05-11  Robert Millan  <rmh@aybabtu.com>
12958         * util/update-grub.in: Create device.map if it doesn't already exist,
12959         before attempting to run grub-probe.
12960         Check for grub-probe and grub-mkdevicemap with the same code
12961         grub-install is using.
12962         Remove test mode.
12964 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
12966         * Makefile.in: Add the datarootdir autoconf variable.
12968 2007-05-09  Robert Millan  <rmh@aybabtu.com>
12970         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
12971         fail gracefully if dev->disk->partition == NULL.
12973 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12975         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
12976         determine partition map module.
12977         * util/i386/pc/grub-install.in: Use this feature to decide which
12978         partition module to load, instead of hardcoding pc and gpt.
12980 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12982         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
12983         source directory differs from build directory.
12985 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12987         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
12988         initialisation.
12990 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12992         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
12994 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12996         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
12997         command-line arguments via ${GRUB_CMDLINE_LINUX}.
12999 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13001         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
13002         (grub_probe_SOURCES): Likewise.
13003         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
13004         GPT and initialize dos_part and bsd_part accordingly.
13005         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
13006         install_bsd_part.
13007         (main): Activate gpt module for use during partition identification,
13008         and deactivate it afterwards.
13009         * util/i386/pc/grub-install.in: Add gpt module to core.img.
13010         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
13011         partition identification, and deactivate it afterwards.
13013 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13015         * term/i386/pc/console.c (grub_console_fini): Call
13016         grub_term_set_current() before grub_term_unregister().
13018 2007-05-04  Robert Millan  <rmh@aybabtu.com>
13020         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
13021         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
13022         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
13023         and update-grub_DATA.
13024         * conf/common.rmk: Build and install update-grub components.
13025         * conf/common.mk: Regenerate.
13026         * util/update-grub.in: New.  Core of update-grub.
13027         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
13028         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
13029         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
13030         * util/grub.d/README: New.  Document grub.d directory layout.
13032 2007-05-01  Robert Millan  <rmh@aybabtu.com>
13034         * util/grub-emu.c: Move initialization functions
13035         grub_util_biosdisk_init() and grub_init_all() before
13036         grub_util_biosdisk_get_grub_dev(), which relies on them.
13038 2007-04-19  Robert Millan  <rmh@aybabtu.com>
13040         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
13041         it is used later.
13043 2007-04-18  Jerone Young  <jerone@gmail.com>
13045         * kernel/elf.c: Add missing parenthesis for conditional statement
13046         stanza.
13048 2007-04-10  Jerone Young  <jerone@gmail.com>
13050         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
13051         continue on and look for device node with real device name.
13053 2007-04-10  Jerone Young  <jerone@gmail.com>
13055         * configure.ac: Add argument for autoconf to use transformation
13056         ability.
13057         * Makefile.in: Add autoconf package transformation code.
13058         * util/i386/pc/grub-install.in: Likewise.
13059         * util/powerpc/ieee1275/grub-install.in: Likewise.
13061 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
13063         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
13064         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
13065         (EXT2_REVISION): Likewise.
13066         (EXT2_INODE_SIZE): Likewise.
13067         (struct grub_ext2_block_group): Added a missing member
13068         "used_dirs".
13069         (grub_ext2_read_inode): Divide by the inode size in a superblock
13070         instead of 128 to obtain INODES_PER_BLOCK.
13071         Use the macro EXT2_INODE_SIZE instead of directly using
13072         SBLOCK->INODE_SIZE.
13074 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
13076         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
13077         superblock instead of the structure size to compute an
13078         offset. This fixes the problem that GRUB could not read a
13079         filesystem when inode size is different from 128-byte.
13081 2007-03-05  Marco Gerards  <marco@gnu.org>
13083         * normal/main.c (read_config_file): When "menu" is not set, create
13084         an initial context.
13086 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13088         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
13089         (HEAP_LIMIT): New macro.
13090         (grub_claim_heap): Claim memory up to `heaplimit'.
13092 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13094         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
13095         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
13096         (_start): Likewise.
13097         (grub_arch_modules_addr): Return address after `_end'.
13098         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
13099         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
13100         (add_segments): Calculate `_end' from phdr size and location.
13101         (ALIGN_UP): Moved to ...
13102         * include/grub/misc.h: here.
13103         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13104         New macro.
13105         (GRUB_IEEE1275_MODULE_BASE): Removed.
13107 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13109         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
13110         loop boundary.
13112 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13114         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
13115         All users updated.
13116         (grub_elf64_load_hook_t): Likewise.
13117         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
13118         debug output.
13120 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13122         * kern/mm.c: Update copyright.
13123         (grub_mm_debug): Correct syntax error.
13124         (grub_mm_dump_free): New function.
13125         (grub_debug_free): Call `grub_free'.
13126         * include/grub/mm.h: Update copyright.
13127         (grub_mm_dump_free): Add declaration.
13129 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13131         * include/grub/ieee1275/ieee1275.h: Update copyright.
13132         * kern/powerpc/ieee1275/init.c: Likewise.
13133         * kern/powerpc/ieee1275/openfw.c: Likewise.
13135         * loader/powerpc/ieee1275/linux.c: Likewise.
13136         * include/grub/elfload.h: Likewise.
13137         * kern/elf.c: Likewise.
13138         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
13139         callers.
13140         (grub_elf64_load): Likewise.
13141         (grub_elf32_load_segment): Move to a nested function.
13142         (grub_elf64_load_segment): Likewise.
13144 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13146         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
13147         prototype.
13148         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
13149         (grub_heap_len): Likewise.
13150         (HEAP_SIZE): New macro.
13151         (grub_claim_heap): New function.
13152         (grub_machine_init): Don't claim heap directly.  Call
13153         `grub_claim_heap'.
13154         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
13155         (grub_available_iterate): New function.
13157 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
13159         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
13160         * configure.ac: Use it for testing the HOST and TARGET compilers.
13162 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
13164         * Makefile.in (enable_grub_emu): New variable.
13165         * configure.ac (--enable-grub-emu): New option.
13166         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
13167         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
13168         * conf/i386-pc.rmk: Likewise.
13169         * conf/powerpc-ieee1275.rmk: Likewise.
13170         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
13172 2006-12-12  Marco Gerards  <marco@gnu.org>
13174         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
13176         * kern/env.c (grub_env_unset): Don't free the member `value' when
13177         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
13178         pointer.
13180         * normal/main.c (current_menu): Removed.
13181         (free_menu): Unset the `menu' environment variable.
13182         (grub_normal_menu_addentry): Make use of the environment variable
13183         `menu', instead of using the global `current_menu'.  Allocate
13184         memory for the sourcecode of this entry.
13185         (read_config_file): New argument `nested', changed all callers.
13186         Only in the case of a new context, initialize a new menu.  Set the
13187         `menu' environment variable.
13188         (grub_normal_execute): Don't set and unset the environment
13189         variable `menu' here anymore.  Only free the menu when leaving the
13190         context.
13192         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
13193         leak.
13195 2006-12-11  Marco Gerards  <marco@gnu.org>
13197         * normal/menu_entry.c (run): Fix off by one bug so the last line
13198         is executed.  Move the loader check to outside the loop.
13200 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
13202         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
13204 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
13206         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
13207         the number of sectors.  Reported by Andrey Shuvikov
13208         <mr_hyro@yahoo.com>.
13210 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
13212         * kern/disk.c (grub_disk_read): When there is a read error, always
13213         try to read only the necessary data.
13215         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
13216         disk/raid.c.
13217         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
13218         prototype.
13219         [GRUB_UTIL] (grub_raid_fini): Likewise.
13220         [GRUB_UTIL] (grub_lvm_init): Likewise.
13221         [GRUB_UTIL] (grub_lvm_fini): Likewise.
13222         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
13223         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
13224         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
13225         and grub_raid_fini().
13227 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13229         * include/grub/types.h (__unused): Rename to UNUSED.
13230         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
13231         (grub_elf64_size): Likewise.
13233 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13235         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
13236         grub_error_push and grub_error_pop in the error-handling path.
13237         (grub_elf32_load_segment): Only call grub_file_read with non-zero
13238         length.
13240 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13242         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
13243         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13244         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13245         (kernel_elf_SOURCES): Likewise.
13246         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
13247         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
13248         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13249         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13250         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
13251         (elf_mod_SOURCES): New variable.
13252         (elf_mod_CFLAGS): Likewise.
13253         (elf_mod_LDFLAGS): Likewise.
13254         * include/grub/types.h (__unused): New macro.
13255         * include/grub/elfload.h: New file.
13256         * kern/elf.c: Likewise.
13257         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
13258         (ELF32_LOADMASK): New macro.
13259         (ELF64_LOADMASK): Likewise.
13260         (vmlinux): Removed.
13261         (grub_linux_load32): New function.
13262         (grub_linux_load64): Likewise.
13263         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
13264         Use grub_elf_t instead of grub_file_t.
13266 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13268         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
13269         `catch_result' to struct set_color_args.
13271 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13273         * normal/menu.c: Include grub/script.h.
13274         * normal/menu_entry.c: Likewise.
13275         * include/grub/normal.h: Do not include grub/script.h.
13277 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13279         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
13281 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13283         * kern/disk.c (grub_disk_open): Print debug messages when opening a
13284         disk.
13285         (grub_disk_close): Print debug messages when closing a disk.
13286         (grub_disk_read): Print debug messages when disk read fails.
13287         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
13288         filesystem type.
13289         * kern/partition.c: Include misc.h.
13290         (grub_partition_iterate): Print debug messages when detecting
13291         partition type.
13293 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13295         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
13296         is negative.
13297         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
13299 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
13301         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13302         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
13304 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
13306         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
13307         instead of sizeof(lv). Patch by Michael Guntsche.
13309 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13311         * disk/lvm.c: Rename VGS to VG_LIST.
13312         (grub_lvm_iterate): Change VGS->LV to VG-LV.
13313         (grub_lvm_open): Likewise.
13314         Thanks to Michael Guntsche for finding this bug.
13316 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13318         * configure.ac (AC_INIT): Bumped to 1.95.
13320 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13322         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
13323         with "/dev/.static/dev/md".
13325 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13327         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
13328         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
13329         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
13330         DRIVE_NAME are always freed.
13332         * util/i386/pc/biosdisk.c (make_device_name): Add one into
13333         DOS_PART, as a DOS partition is counted from one instead of zero
13334         now. Reported by Robert Millan.
13336 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13338         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
13339         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
13340         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
13341         string returned by grub_guess_root_device.
13342         * util/i386/pc/grub-setup.c: Likewise.
13343         * util/i386/pc/grub-probefs.c: Likewise.
13345         * util/i386/pc/grub-probefs.c: Rename to ...
13346         * util/i386/pc/grub-probe.c: ... this.
13347         * DISTLIST: Remove grub-probefs, add grub-probe.
13348         * conf/i386-efi.rmk: Likewise.
13349         * conf/i386-pc.rmk: Likewise.
13350         * util/i386/pc/grub-install.in: Likewise.
13352         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
13353         choose which information we want to print.
13355 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13357         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
13358         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
13359         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
13360         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
13361         video/readers/tga.c and video/i386/pc/vbeutil.c.
13363 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
13365         Added support for RAID and LVM.
13367         * disk/lvm.c: New file.
13368         * disk/raid.c: Likewise.
13369         * include/grub/lvm.h: Likewise.
13370         * include/grub/raid.h: Likewise.
13371         * include/grub/util/lvm.h: Likewise.
13372         * include/grub/util/raid.h: Likewise.
13373         * util/lvm.c: Likewise.
13374         * util/raid.c: Likewise.
13376         * include/grub/disk.h (grub_disk_dev_id): Add
13377         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
13378         (grub_disk_get_size): New prototype.
13379         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
13380         returns a partition.
13381         (grub_disk_get_size): New function.
13383         * kern/i386/pc/init.c (make_install_device): Copy the prefix
13384         verbatim if grub_install_dos_part is -2.
13386         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
13387         and LVM devices.
13389         * util/i386/pc/grub-setup.c (setup): New argument
13390         MUST_EMBED. Force embedding of GRUB when the argument is
13391         true. Close FILE before returning.
13392         (main): Add support for RAID and LVM.
13394         * conf/common.rmk: Add RAID and LVM modules.
13395         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
13396         util/lvm.c.
13397         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
13399         * kern/misc.c (grub_strstr): New function.
13400         * include/grub/misc.h (grub_strstr): New prototype.
13402 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
13404         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
13406 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
13408         * kern/misc.c (grub_strtoull): Guess the base only if not
13409         specified.
13411 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13413         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
13414         PowerMac support.
13416 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13418         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
13420         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
13421         Remove `flags' argument.  All callers changed.
13422         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
13423         (IEEE1275_IHANDLE_INVALID): New variable.
13424         (IEEE1275_CELL_INVALID): New variable.
13425         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
13426         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
13427         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
13428         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
13429         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
13430         codes from Open Firmware.  All callers updated.
13431         (grub_ieee1275_next_property): Directly return Open Firmware return
13432         code.
13433         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
13434         Standardize error checking from `grub_ieee1275_get_property'.
13435         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
13436         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
13438 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13440         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
13441         `instance_to_package_args' to `instance_to_path_args'.
13443         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
13444         `grub_ieee1275_chosen'.
13446         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
13447         `grub_ieee1275_interpret'.
13449 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13451         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
13453 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13455         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
13456         (__cmpdi): Likewise.
13458         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
13459         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
13460         `grub_ssize_t'.
13462         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
13464         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
13465         to type `grub_ssize_t'.
13466         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
13468 2006-09-22  Marco Gerards  <marco@gnu.org>
13470         * normal/script.c (grub_script_create_cmdmenu): Skip leading
13471         newlines.
13473 2006-09-22  Marco Gerards  <marco@gnu.org>
13475         * commands/echo.c: New file.
13477         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
13479         * conf/common.rmk (echo_mod_SOURCES): New variable.
13480         (echo_mod_CFLAGS): Likewise.
13481         (echo_mod_LDFLAGS): Likewise.
13483 2006-09-22  Marco Gerards  <marco@gnu.org>
13485         * normal/main.c (get_line): Malloc memory instead of using
13486         preallocated memory.  Removed the arguments `cmdline' and
13487         `max_len'.  Updated all callers.
13489 2006-09-22  Marco Gerards  <marco@gnu.org>
13491         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
13492         (normal_mod_DEPENDENCIES): Likewise.
13494         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
13495         (normal_mod_DEPENDENCIES): Likewise.
13497         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
13499 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
13501         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
13502         programs.
13503         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
13504         (normal_mod_DEPENDENCIES): Likewise.
13505         * conf/i386-pc.mk: Regenerate.
13506         * conf/i386-efi.mk: Likewise
13507         * conf/common.mk: Likewise.
13508         * conf/powerpc-ieee1275.mk: Likewise.
13509         * conf/sparc64-ieee1275.mk: Likewise.
13511 2006-09-22  Robert Millan  <rmh@aybabtu.com>
13513         Sync with i386 version.
13514         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
13515         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
13517 2006-09-21  Robert Millan  <rmh@aybabtu.com>
13519         Import from GRUB Legacy (lib/device.c):
13520         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
13521         (init_device_map) [__linux__]: Add support for I2O devices.
13523 2006-09-14  Marco Gerards  <marco@gnu.org>
13525         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
13526         `-melf_i386'.
13528 2006-09-14  Robert Millan  <rmh@aybabtu.com>
13530         * util/i386/pc/grub-install.in: Skip menu.lst when removing
13531         /boot/grub/*.lst.
13533         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
13535         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
13536         before adding it to device.map.
13538 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
13540         * genmk.rb: Let GCC generate dependencies the first time it
13541         compiles a file; using the -MD option.
13542         * conf/common.mk: Regenerate.
13543         * conf/i386-pc.mk: Likewise.
13544         * conf/i386-efi.mk: Likewise.
13545         * conf/powerpc-ieee1275.mk: Likewise.
13546         * conf/sparc64-ieee1275.mk: Likewise.
13548 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
13550         Move the prototypes of grub_setjmp and grub_longjmp to
13551         cpu/setjmp.h, so that each architecture may specify different
13552         attributes.
13554         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
13555         (grub_longjmp): Likewise.
13556         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
13557         (grub_longjmp): Likewise.
13558         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
13559         (grub_longjmp): Likewise.
13561         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
13562         [!GRUB_UTIL] (grub_longjmp): Removed.
13564 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
13566         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
13567         "color!" method does not return any value.
13569 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13571         * include/grub/bitmap.h: New file.
13573         * include/grub/i386/pc/vbeutil.h: Likewise.
13575         * video/bitmap.c: Likewise.
13577         * video/readers/tga.c: Likewise.
13579         * video/i386/pc/vbeutil.c: Likewise.
13581         * commands/videotest.c: Code cleanup and updated to reflect to new
13582         video API.
13584         * term/gfxterm.c: Likewise.
13586         * video/video.c: Likewise.
13588         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
13589         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
13590         (bitmap_mod_SOURCES): New entry.
13591         (bitmap_mod_CFLAGS): Likewise.
13592         (bitmap_mod_LDFLAGS): Likewise.
13593         (tga_mod_SOURCES): Likewise.
13594         (tga_mod_CFLAGS): Likewise.
13595         (tga_mod_LDFLAGS): Likewise.
13597         * include/grub/video.h (grub_video_blit_operators): New enum type.
13598         (grub_video_render_target): Changed as forward declaration and moved
13599         actual definition to be video driver specific.
13600         (grub_video_adapter.blit_bitmap): Added blitting operator.
13601         (grub_video_adapter.blit_render_target): Likewise.
13602         (grub_video_blit_bitmap): Likewise.
13603         (grub_video_blit_render_target): Likewise.
13605         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
13606         driver specific render target definition.
13607         (grub_video_vbe_map_rgba): Added driver internal helper.
13608         (grub_video_vbe_unmap_color): Updated to use
13609         grub_video_i386_vbeblit_info.
13610         (grub_video_vbe_get_video_ptr): Likewise.
13612         * include/grub/i386/pc/vbeblit.h
13613         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
13614         grub_video_i386_vbeblit_info.
13615         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
13616         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
13617         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
13618         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
13619         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
13620         (grub_video_i386_vbeblit_index_index): Likewise.
13621         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
13622         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
13623         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
13624         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
13625         operator.
13626         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
13627         operator.
13629         * video/i386/pc/vbeblit.c: Updated to reflect changes on
13630         include/grub/i386/pc/vbeblit.h.
13632         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
13633         Updated to use grub_video_i386_vbeblit_info.
13634         (grub_video_i386_vbefill_R8G8B8): Likewise.
13635         (grub_video_i386_vbefill_index): Likewise.
13636         (grub_video_i386_vbefill): Added generic filler.
13638         * video/i386/pc/vbefill.c: Updated to reflect changes on
13639         include/grub/i386/pc/vbefill.h.
13641         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
13642         grub_video_i386_vbeblit_info.
13643         (grub_video_vbe_unmap_color): Likewise.
13644         (grub_video_vbe_blit_glyph): Likewise.
13645         (grub_video_vbe_scroll): Likewise.
13646         (grub_video_vbe_draw_pixel): Removed function.
13647         (grub_video_vbe_get_pixel): Likewise.
13648         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
13649         updated code to use it.
13650         (common_blitter): Added common blitter for render target and bitmap.
13651         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
13652         (grub_video_vbe_blit_render_target): Likewise.
13654 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
13656         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
13657         is in text mode if there is no console control protocol instance
13658         available.
13660 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13662         * include/grub/video.h: Code cleanup.
13664         * include/grub/i386/pc/vbe.h: Likewise.
13666         * video/i386/pc/vbe.c: Likewise.
13668         * video/i386/pc/vbeblit.c: Likewise.
13670         * video/i386/pc/vbefill.c: Likewise.
13672         * video/video.c: Likewise.  Also added more comments.
13674 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13676         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
13677         (struct grub_biosdisk_dap): Likewise.
13679         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
13680         linkage settings for all functions.
13682 2006-07-12  Marco Gerards  <marco@gnu.org>
13684         * configure.ac (--enable-mm-debug): Fix typo.
13686         * genkernsyms.sh.in: Use proper quoting for `CC'.
13688 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
13690         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
13691         (normal_mod_ASFLAGS): Remove "-m32".
13693 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
13695         * util/misc.c: Include config.h.
13696         [!HAVE_MEMALIGN]: Do not include malloc.h.
13697         (grub_memalign): Use posix_memalign, if present. Then, use
13698         memalign, if present. Otherwise, emit an error.
13700         * util/grub-emu.c: Do not include malloc.h.
13702         * include/grub/util/misc.h: Include unistd.h. This is required for
13703         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
13704         D. Eades III <hde@foobar-qux.org>.
13706         * configure.ac (AC_GNU_SOURCE): Added.
13707         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
13708         type.
13710 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
13712         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
13713         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
13715 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
13717         * include/grub/types.h (grub_host_addr_t): Rename to
13718         grub_target_addr_t.
13719         (grub_host_off_t): Rename to grub_target_off_t.
13720         (grub_host_size_t): Rename to grub_target_size_t.
13721         (grub_host_ssize_t): Rename to grub_target_ssize_t.
13722         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
13724         * include/grub/kernel.h (struct grub_module_header): Change type
13725         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
13726         (grub_module_info): Likewise.
13728 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13730         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
13731         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
13732         Velazquez <jesus.velazquez@gmail.com>.
13734 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13736         Count partitions from 1 instead of 0 in the string representation
13737         of partitions. Still use 0-based internally.
13739         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
13740         (sun_partition_map_iterate): Use grub_partition_t instead of
13741         struct grub_partition *. Cast DESC->START_CYLINDER to
13742         grub_uint64_t after converting the endian.
13743         (sun_partition_map_probe): Subtract 1 for PARTNUM.
13744         (sun_partition_map_get_name): Add 1 to P->INDEX.
13746         * partmap/pc.c (grub_partition_parse): Subtract 1 for
13747         PCDATA->DOS_PART.
13748         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
13750         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
13751         zero instead of one.
13752         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
13753         (gpt_partition_map_get_name): Add 1 into P->INDEX.
13755         * partmap/apple.c (apple_partition_map_iterate): Change the type
13756         of POS to unsigned.
13757         (apple_partition_map_probe): Subtract 1 for PARTNUM.
13758         (apple_partition_map_get_name): Add 1 into P->INDEX.
13760         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
13761         of POS to unsigned.
13762         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
13763         calculate the offset of a partition.
13764         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
13765         (amiga_partition_map_get_name): Add 1 into P->INDEX.
13767         * partmap/acorn.c (acorn_partition_map_find): Change the type of
13768         SECTOR to grub_disk_addr_t.
13769         (acorn_partition_map_iterate): Likewise.
13770         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
13771         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
13772         top.
13773         (acorn_partition_map_get_name): Add 1 into P->INDEX.
13775         * kern/i386/pc/init.c (make_install_device): Add 1 into
13776         GRUB_INSTALL_DOS_PART.
13778         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
13779         conditional.
13781 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
13783         Clean up the code to support 64-bit addressing in disks and
13784         files. This change is not enough for filesystems yet.
13786         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
13787         type of "start" to grub_uint64_t.
13788         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
13789         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
13790         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
13791         convert addresses.
13793         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
13794         to grub_disk_addr_t.
13796         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
13797         string.
13799         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13801         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
13802         to char *.
13804         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
13806         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
13808         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
13810         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
13811         to grub_off_t, to detect an error from grub_file_seek.
13812         (grub_multiboot_load_elf32): Likewise.
13814         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
13815         maximum unsigned long value when an overflow is detected.
13816         (grub_strtoull): New function.
13817         (grub_divmod64): Likewise.
13818         (grub_lltoa): use grub_divmod64.
13820         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
13821         grub_disk_addr_t.
13822         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
13823         the pointer to next character. Use grub_strtoull instead of
13824         grub_strtoul.
13825         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
13826         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
13827         respectively.
13829         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
13830         return value is signed.
13831         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
13832         test if OFFSET is less than zero, as OFFSET is unsigned now.
13834         * kern/disk.c (struct grub_disk_cache): Change the type of
13835         "sector" to grub_disk_addr_t.
13836         (grub_disk_cache_get_index): Change the type of SECTOR to
13837         grub_disk_addr_t. Calculate the hash with SECTOR casted to
13838         unsigned after shifting.
13839         (grub_disk_cache_invalidate): Change the type of SECTOR to
13840         grub_disk_addr_t.
13841         (grub_disk_cache_unlock): Likewise.
13842         (grub_disk_cache_store): Likewise.
13843         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
13844         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
13845         grub_disk_addr_t and grub_uint64_t, respectively.
13846         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
13847         body, as the value of OFFSET is tweaked by
13848         grub_disk_check_range. Change the types of START_SECTOR, LEN and
13849         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
13850         respectively.
13851         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
13852         body, as the value of OFFSET is tweaked by
13853         grub_disk_check_range. Change the types of LEN and N to
13854         grub_size_t.
13856         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
13857         and "saved_offset" to grub_off_t.
13858         (test_header): Cast BUF to char *.
13859         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
13860         to char *.
13861         (grub_gzio_read): Change the types of OFFSET and SIZE to
13862         grub_off_t and grub_size_t, respectively.
13864         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
13865         Removed.
13866         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
13867         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
13868         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
13869         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
13870         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
13872         * include/grub/types.h (grub_off_t): Unconditionally set to
13873         grub_uint64_t.
13874         (grub_disk_addr_t): Changed to grub_uint64_t.
13876         * include/grub/partition.h (struct grub_partition): Change the
13877         types of "start", "len" and "offset" to grub_disk_addr_t,
13878         grub_uint64_t and grub_disk_addr_t, respectively.
13879         (grub_partition_get_start): Return grub_disk_addr_t.
13880         (grub_partition_get_len): Return grub_uint64_t.
13882         * include/grub/misc.h (grub_strtoull): New prototype.
13883         (grub_divmod64): Likewise.
13885         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
13886         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
13887         grub_off_t, respectively.
13888         All callers and references changed.
13890         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
13891         grub_size_t in "read".
13892         All callers and references changed.
13894         * include/grub/file.h (struct grub_file): Change the types of
13895         "offset" and "size" to grub_off_t and grub_off_t,
13896         respectively. Change the type of SECTOR to grub_disk_addr_t in
13897         "read_hook".
13898         (grub_file_read): Change the type of LEN to grub_size_t.
13899         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
13900         grub_off_t.
13901         (grub_file_size): Return grub_off_t.
13902         (grub_file_tell): Likewise.
13903         All callers and references changed.
13905         * include/grub/disk.h (struct grub_disk_dev): Change the types of
13906         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
13907         "write".
13908         (struct grub_disk): Change the type of "total_sectors" to
13909         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
13910         "read_hook".
13911         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
13912         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
13913         (grub_disk_write): Likewise.
13914         All callers and references changed.
13916         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
13917         char * for grub_strncmp to silence gcc.
13918         (grub_iso9660_mount): Likewise.
13919         (grub_iso9660_mount): Likewise.
13920         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
13921         return statement.
13922         (grub_iso9660_iterate_dir): Likewise.
13923         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
13925         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
13926         LEN to grub_disk_addr_t and grub_size_t, respectively.
13928         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13930         * fs/jfs.c (grub_jfs_read_file): Likewise.
13932         * fs/minix.c (grub_jfs_read_file): Likewise.
13934         * fs/sfs.c (grub_jfs_read_file): Likewise.
13936         * fs/ufs.c (grub_jfs_read_file): Likewise.
13938         * fs/xfs.c (grub_jfs_read_file): Likewise.
13940         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
13941         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
13942         respectively.
13944         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
13945         BLKNR to -1 instead of returning GRUB_ERRNO.
13946         (grub_ext2_read_file): Change the types of SECTOR and
13947         LEN to grub_disk_addr_t and grub_size_t, respectively.
13949         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
13950         LEN to grub_disk_addr_t and grub_size_t, respectively.
13952         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
13953         grub_file_read.
13955         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
13956         string. Do not cast SECTOR explicitly.
13958         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
13959         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
13960         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
13961         grub_disk_addr_t and grub_size_t, respectively. If the sector is
13962         over 2TB and LBA mode is not supported, raise an error.
13963         (get_safe_sectors): New function.
13964         (grub_biosdisk_read): Use get_safe_sectors.
13965         (grub_biosdisk_write): Likewise.
13967         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
13968         (grub_efidisk_write): Likewise.
13970         * disk/loopback.c (delete_loopback): Cosmetic changes.
13971         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
13972         correctly.
13973         (grub_loopback_open): Likewise.
13974         (grub_loopback_read): Likewise. Also, change the type of POS to
13975         grub_off_t, and fix the usage of grub_memset.
13977         * commands/i386/pc/play.c: Include grub/machine/time.h.
13979         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
13980         print FILE->SIZE.
13982         * commands/configfile.c: Include grub/env.h.
13984         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
13985         GRUB_ERRNO directly instead. Change the type of POS to
13986         grub_off_t. Follow the coding standard.
13988         * commands/blocklist.c: Include grub/partition.h.
13989         (grub_cmd_blocklist): Return an error if the underlying device is
13990         not a disk. Take the starting sector of a partition into account,
13991         if a partition is used.
13993         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
13994         a length field.
13995         (lba_mode): Support 64-bit addresses.
13996         (chs_mode): Likewise.
13997         (copy_buffer): Adapted to the new offsets of a length field and a
13998         segment field.
13999         (blocklist_default_start): Allocate 64-bit space.
14001         * boot/i386/pc/boot.S (force_lba): Removed.
14002         (boot_drive): Moved to under KERNEL_SECTOR.
14003         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
14004         space.
14005         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
14006         is useless.
14007         (lba_mode): Refactored to support a 64-bit address. More size
14008         optimization.
14009         (setup_sectors): Likewise.
14011 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
14013         * DISTLIST: Added include/grub/i386/linux.h. Removed
14014         include/grub/i386/pc/linux.h
14016         * configure.ac (AC_INIT): Bumped to 1.94.
14018         * config.guess: Updated from gnulib.
14019         * config.sub: Likewise.
14020         * install-sh: Likewise.
14021         * mkinstalldirs: Likewise.
14023 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14025         * conf/common.rmk (grub_modules_init.lst): Depended on
14026         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
14027         MODSRCFILES.
14029         * genmk.rb (PModule::rule): Reverted the previous change.
14031 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14033         * conf/common.rmk (grub_modules_init.lst): Depends on
14034         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
14035         that the target does not exist before producing.
14036         (grub_modules_init.h): Remove the target before generating.
14037         (grub_emu_init.c): Likewise.
14039         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
14041 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
14043         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
14044         for the target-specific tests. Make sure that we also have the
14045         up-to-date target variables for those tests.
14047 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14049         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
14050         (PModule::rule): Likewise.
14052 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14054         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
14055         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
14056         target-specific flags should be prefixed.
14057         (PModule::rule): Likewise.
14059 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
14061         * configure.ac (CMP): Check if cmp is available explicitly.
14063 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
14065         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
14066         (target_cpu): New variable.
14067         (pkglibdir): Use target_cpu instead of host_cpu.
14069         * util/i386/pc/grub-install.in (host_cpu): Removed.
14070         (target_cpu): New variable.
14071         (pkglibdir): Use target_cpu instead of host_cpu.
14073         * util/genmoddep.c: Removed.
14075         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
14076         instead of GRUB_HOST_SIZEOF_VOID_P.
14077         * kern/dl.c: Likewise.
14079         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
14080         ...
14081         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14082         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14083         (GRUB_TARGET_SIZEOF_LONG): ... this.
14084         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14085         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14086         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14087         to ...
14088         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14089         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14090         (GRUB_TARGET_SIZEOF_LONG): ... this.
14091         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14092         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14093         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14094         to ...
14095         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14096         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14097         (GRUB_TARGET_SIZEOF_LONG): ... this.
14098         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14099         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14101         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
14102         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
14103         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
14104         instead of GRUB_HOST_SIZEOF_LONG.
14105         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
14106         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
14107         GRUB_CPU_WORDS_BIGENDIAN.
14108         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
14109         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
14110         grub_host_ssize_t.
14112         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
14113         (genmoddep_SOURCES): Likewise.
14114         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
14115         (genmoddep_SOURCES): Likewise.
14116         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
14117         (genmoddep_SOURCES): Likewise.
14118         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
14119         Likewise.
14120         (genmoddep_SOURCES): Likewise.
14122         * genmoddep.awk: New file.
14124         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
14125         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
14126         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
14127         (PModule::rule): Likewise.
14128         (Program::rule): Likewise.
14129         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
14130         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
14131         respectively.
14133         * configure.ac: Rewritten intensively to use host and target
14134         instead of build and host, respectively.
14136         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
14137         (host_cpu): Removed.
14138         (target_cpu): New variable.
14139         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
14140         (BUILD_CC): Removed.
14141         (BUILD_CFLAGS): Likewise.
14142         (BUILD_CPPFLAGS): Likewise.
14143         (TARGET_CC): New variable.
14144         (TARGET_CFLAGS): Likewise.
14145         (TARGET_CPPFLAGS): Likewise.
14146         (TARGET_LDFLAGS): Likewise.
14147         (AWK): Likewise.
14148         (include): Use target_cpu instead of host_cpu.
14149         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
14151         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
14153 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
14155         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
14156         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
14157         field 'false' to 'exec_on_false'.
14158         (grub_script_create_cmdif): Renamed argument names to reflect above
14159         changes.
14161         * normal/execute.c (grub_script_execute_cmdif): Likewise.
14163         * normal/script.c (grub_script_create_cmdif): Likewise.
14165 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
14167         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
14168         top.
14169         (grub_hfsplus_btree_recptr): Likewise.
14170         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
14171         FILEBLOCK both to pass a block number and store next block
14172         number.
14173         (grub_hfsplus_read_block): Rewritten heavily to support an extent
14174         overflow file correctly. Specify errors appropriately, because
14175         fshelp expects that GRUB_ERRNO is set when fails. Reuse
14176         grub_hfsplus_btree_recptr to get the pointer to a found key.
14177         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
14178         is found.
14180         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
14181         linux.mod.
14182         (_linux_mod_SOURCES): New variable.
14183         (_linux_mod_CFLAGS): Likewise.
14184         (_linux_mod_LDFLAGS): Likewise.
14185         (linux_mod_SOURCES): Likewise.
14186         (linux_mod_CFLAGS): Likewise.
14187         (linux_mod_LDFLAGS): Likewise.
14189         * DISTLIST: Added loader/i386/efi/linux.c,
14190         loader/i386/efi/linux_normal.c and
14191         include/grub/i386/efi/loader.h.
14193         * loader/i386/efi/linux.c: New file.
14194         * loader/i386/efi/linux_normal.c: Likewise.
14195         * include/grub/i386/efi/loader.h: Likewise.
14197 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
14199         * commands/blocklist.c: New file.
14201         * DISTLIST: Added commands/blocklist.c.
14203         * term/efi/console.c (grub_console_highlight_color): Use a lighter
14204         color for the background, and a darker color for the foreground.
14205         (grub_console_checkkey): Return READ_KEY.
14206         (grub_console_cls): Set the background to
14207         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
14209         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
14211         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
14212         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
14214         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
14215         prototype.
14217         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
14218         BG. The spec is wrong again.
14220         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
14221         prototype.
14222         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
14224         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14225         commands/blocklist.c.
14226         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14228         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
14229         (blocklist_mod_SOURCES): New variable.
14230         (blocklist_mod_CFLAGS): Likewise.
14231         (blocklist_mod_LDFLAGS): Likewise.
14233 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
14235         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
14236         duplication.
14237         (lba_mode): Use %eax more intensively to reduce the code size.
14239 2006-05-20  Marco Gerards  <marco@gnu.org>
14241         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
14243         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
14244         for `menuentry'.
14245         (script): Accept leading newlines.
14246         (newlines): New rule to describe 0 or more newlines.
14247         (commands): Accept `command' with trailing newline.  Fixed the
14248         order in which arguments were passed to `grub_script_add_cmd'.
14249         Accept commands separated by newlines.
14250         (function): Changed to accept newlines.
14251         (menuentry) Rewritten.
14253         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
14254         front of the list, instead of to the end.
14256 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
14258         * util/i386/pc/grub-install.in (bindir): New variable.
14259         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
14260         Shaver <lbgwjl@gmail.com>.
14262 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
14264         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
14265         grub/machine/linux.h
14266         * loader/i386/pc/linux.c: Likewise.
14268         * include/grub/i386/pc/linux.h: Moved to ...
14269         * include/grub/i386/linux.h: ... here.
14271         * include/grub/i386/linux.h (struct linux_kernel_params): New
14272         struct.
14274 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
14276         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
14277         checking.
14278         (grub_video_vbe_blit_glyph): Likewise.
14279         (grub_video_vbe_blit_bitmap): Likewise.
14280         (grub_video_vbe_blit_render_target): Likewise.
14282 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
14284         * configure.ac (--with-platform): Properly quote the square
14285         brackets.
14287 2006-05-08  Marco Gerards  <marco@gnu.org>
14289         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
14290         this...
14291         (kernel_elf_HEADERS): ...to this.  Updated all users.
14292         (grubof_symlist.c): Renamed from this...
14293         (kernel_elf_symlist.c): ...to this.  Updated all users.
14294         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14295         (grubof_SOURCES): Renamed from this...
14296         (kernel_elf_SOURCES): ...to this.
14297         (grubof_HEADERS): Renamed from this...
14298         (kernel_elf_HEADERS): ...to this.
14299         (grubof_CFLAGS): Renamed from this...
14300         (kernel_elf_CFLAGS): ...to this.
14301         (grubof_ASFLAGS): Renamed from this...
14302         (kernel_elf_ASFLAGS): ...to this.
14303         (grubof_LDFLAGS): Renamed from this...
14304         (kernel_elf_LDFLAGS): ...to this.
14306         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
14307         this...
14308         (kernel_elf_HEADERS): ...to this.  Updated all users.
14309         (grubof_symlist.c): Renamed from this...
14310         (kernel_elf_symlist.c): ...to this.  Updated all users.
14311         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14312         (grubof_SOURCES): Renamed from this...
14313         (kernel_elf_SOURCES): ...to this.
14314         (grubof_HEADERS): Renamed from this...
14315         (kernel_elf_HEADERS): ...to this.
14316         (grubof_CFLAGS): Renamed from this...
14317         (kernel_elf_CFLAGS): ...to this.
14318         (grubof_ASFLAGS): Renamed from this...
14319         (kernel_elf_ASFLAGS): ...to this.
14320         (grubof_LDFLAGS): Renamed from this...
14321         (kernel_elf_LDFLAGS): ...to this.
14323         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
14324         `kernel.elf' instead of `grubof'.
14326 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
14328         Add --with-platform to configure. Use pkglibdir instead of
14329         pkgdatadir. This is reported by Roger Leigh.
14331         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
14332         (host_vendor): Likewise.
14333         (host_os): Likewise.
14334         (pkgdatadir): Likewise.
14335         (platform): New variable.
14336         (pkglibdir): Likewise.
14337         Use PKGLIBDIR instead of PKGDATADIR.
14339         * util/i386/pc/grub-install.in (datadir): Removed.
14340         (host_vendor): Likewise.
14341         (host_os): Likewise.
14342         (pkgdatadir): Likewise.
14343         (platform): New variable.
14344         (pkglibdir): Likewise.
14345         Use PKGLIBDIR instead of PKGDATADIR.
14347         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
14348         instead of GRUB_DATADIR.
14349         (main): Likewise.
14350         * util/i386/pc/grub-mkimage.c (usage): Likewise.
14351         (main): Likewise.
14352         * util/i386/efi/grub-mkimage.c (usage): Likewise.
14353         (main): Likewise.
14355         * configure.ac (--with-platform): New option.
14356         Use PLATFORM instead of HOST_VENDOR to specify a platform.
14358         * Makefile.in: Include a makefile based on PLATFORM instead of
14359         HOST_VENDOR.
14360         (pkgdatadir): Not appended by the machine type.
14361         (pkglibdir): Appended by the machine type.
14362         (host_vendor): Removed.
14363         (platform): New variable.
14364         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
14365         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
14366         (uninstall): Likewise.
14368 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
14370         Use the environment context in the menu. Remove the commands
14371         "default" and "timeout", and use variables instead.
14373         * normal/menu.c: Include grub/env.h.
14374         (print_entry): Cast TITLE to silence gcc.
14375         (get_timeout): New function.
14376         (set_timeout): Likewise.
14377         (get_entry_number): Likewise.
14378         (run_menu): Use a default entry, a fallback entry and a timeout
14379         in the environment variables "default", "fallback" and
14380         "timeout". Also, tweak the default entry if it is not within the
14381         current menu entries.
14382         (grub_menu_run): Use a fallback entry in the environment variable
14383         "fallback".
14385         * normal/main.c (read_config_file): Do not initialize
14386         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
14387         NEWMENU->TIMEOUT.
14388         (grub_normal_execute): Use a data slot to store the menu.
14390         * include/grub/normal.h (struct grub_menu): Removed default_entry,
14391         fallback_entry and timeout.
14392         (struct grub_menu_list): Removed.
14393         (grub_menu_list_t): Likewise.
14394         (struct grub_context): Likewise.
14395         (grub_context_t): Likewise.
14396         (grub_context_get): Likewise.
14397         (grub_context_get_current_menu): Likewise.
14398         (grub_context_push_menu): Likewise.
14399         (grub_context_pop_menu): Likewise.
14400         (grub_default_init): Likewise.
14401         (grub_default_fini): Likewise.
14402         (grub_timeout_init): Likewise.
14403         (grub_timeout_fini): Likewise.
14405         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
14406         and timeout.mod.
14407         (normal_mod_SOURCES): Removed normal/context.c.
14409         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
14410         commands/default.c, commands/timeout.c and normal/context.c.
14411         (normal_mod_SOURCES): Removed normal/context.c.
14413         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
14414         commands/timeout.c and normal/context.c.
14415         (normal_mod_SOURCES): Removed normal/context.c.
14417         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
14418         commands/default.c, commands/timeout.c and normal/context.c.
14419         (normal_mod_SOURCES): Removed normal/context.c.
14421         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
14422         timeout.mod.
14423         (default_mod_SOURCES): Removed.
14424         (default_mod_CFLAGS): Likewise.
14425         (default_mod_LDFLAGS): Likewise.
14426         (timeout_mod_SOURCES): Removed.
14427         (timeout_mod_CFLAGS): Likewise.
14428         (timeout_mod_LDFLAGS): Likewise.
14430         * DISTLIST: Removed commands/default.c, commands/timeout.c and
14431         normal/context.c.
14433         * commands/default.c: Removed.
14434         * commands/timeout.c: Likewise.
14435         * normal/context.c: Likewise.
14437 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
14439         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
14441 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
14443         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
14444         "next" to "prev" for readability.
14445         (struct grub_env_sorted_var): New struct.
14446         (grub_env_context): Renamed to ...
14447         (initial_context): ... this.
14448         (grub_env_var_context): Renamed to ...
14449         (current_context): ... this.
14450         (grub_env_find): Look only at CURRENT_CONTEXT.
14451         (grub_env_context_open): Rewritten to copy exported variables from
14452         previous context.
14453         (grub_env_context_close): Rewritten according to the new
14454         scheme. Also, add an assertion to prevent the initial context from
14455         removed.
14456         (grub_env_insert): Removed the code for the sorted list.
14457         (grub_env_remove): Likewise.
14458         (grub_env_export): Simply mark the variable with
14459         GRUB_ENV_VAR_GLOBAL.
14460         (grub_env_set): A cosmetic change for naming consistency.
14461         (grub_env_get): Likewise.
14462         (grub_env_unset): Likewise.
14463         (grub_env_iterate): Rewritten to sort variables within this
14464         function.
14465         (grub_register_variable_hook): Fixed for naming consistency. Call
14466         grub_env_find again, only if NAME is not found at the first time.
14467         (mangle_data_slot_name): New function.
14468         (grub_env_set_data_slot): Likewise.
14469         (grub_env_get_data_slot): Likewise.
14470         (grub_env_unset_data_slot): Likewise.
14472         * include/grub/env.h (grub_env_var_type): New enum.
14473         (GRUB_ENV_VAR_LOCAL): New constant.
14474         (GRUB_ENV_VAR_GLOBAL): Likewise.
14475         (GRUB_ENV_VAR_DATA): Likewise.
14476         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
14477         "type".
14478         (grub_env_set): Replace VAR with NAME for consistency.
14479         (grub_register_variable_hook): Likewise.
14480         (grub_env_export): Specify the name of the argument.
14481         (grub_env_set_data_slot): New prototype.
14482         (grub_env_get_data_slot): Likewise.
14483         (grub_env_unset_data_slot): Likewise.
14485 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14487         Extend the loader so that GRUB can accept a loader which comes
14488         back to GRUB when a loaded image exits. Also, this change adds
14489         support for a chainloader on EFI.
14491         * term/efi/console.c: Include grub/misc.h.
14492         (grub_console_checkkey): Display a scan code on the top for
14493         debugging. This will be removed once the EFI port gets stable.
14494         Correct the scan code mapping.
14496         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
14497         allocate memory from larger regions, in order to reduce the number
14498         of allocated regions. Otherwise, the MacOSX loader panics.
14499         (filter_memory_map): Avoid less than 1MB for compatibility with
14500         other loaders.
14501         (add_memory_regions): Allocate from the tail of a region, if
14502         possible, to avoid allocating a region near to 1MB, for the MacOSX
14503         loader.
14505         * kern/efi/init.c (grub_efi_set_prefix): Specify
14506         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
14508         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
14509         argument IMAGE_HANDLE and specify it to get a loaded image.
14510         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
14511         grub_efi_get_loaded_image.
14512         (grub_efi_get_filename): Divide the length by the size of
14513         grub_efi_char16_t.
14514         (grub_efi_get_device_path): New function.
14515         (grub_efi_print_device_path): Print End Device Path nodes. Divide
14516         the length by the size of grub_efi_char16_t for a file path device
14517         path node.
14519         * kern/loader.c (grub_loader_noreturn): New variable.
14520         (grub_loader_set): Accept a new argument NORETURN. Set
14521         GRUB_LOADER_NORETURN to NORETURN.
14522         All callers changed.
14523         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
14524         grub_machine_fini.
14526         * include/grub/efi/efi.h (grub_efi_get_device_path): New
14527         prototype.
14528         (grub_efi_get_loaded_image): Take an argument to specify an image
14529         handle.
14531         * include/grub/loader.h (grub_loader_set): Added one more argument
14532         NORETURN.
14534         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
14535         instead of grub_efi_open_protocol.
14536         (grub_efidisk_get_device_name): Likewise.
14537         (grub_efidisk_close): Print a newline.
14538         (grub_efidisk_get_device_handle): Fixed to use
14539         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
14540         GRUB_EFI_DEVICE_PATH_TYPE.
14542         * disk/efi/efidisk.c (device_path_guid): Moved to ...
14543         * kern/efi/efi.c (device_path_guid): ... here.
14545         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
14546         chain.mod.
14547         (kernel_mod_HEADERS): Added efi/disk.h.
14548         (_chain_mod_SOURCES): New variable.
14549         (_chain_mod_CFLAGS): Likewise.
14550         (_chain_mod_LDFLAGS): Likewise.
14551         (chain_mod_SOURCES): Likewise.
14552         (chain_mod_CFLAGS): Likewise.
14553         (chain_mod_LDFLAGS): Likewise.
14555         * DISTLIST: Added include/grub/efi/chainloader.h,
14556         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
14558         * include/grub/efi/chainloader.h: New file.
14559         * loader/efi/chainloader.c: Likewise.
14560         * loader/efi/chainloader_normal.c: Likewise.
14562 2006-04-30  Marco Gerards  <marco@gnu.org>
14564         * commands/configfile.c (grub_cmd_source): New function.
14565         (GRUB_MOD_INIT): Register the commands `source' and `.'.
14566         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
14568 2006-04-30  Marco Gerards  <marco@gnu.org>
14570         * normal/execute.c (grub_script_execute_cmd): Change the return
14571         type to `grub_err_t'.  Correctly return the error.
14572         (grub_script_execute_cmdline): In case a command line is not a
14573         command or a function, try to interpret it as an assignment.
14575 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14577         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
14578         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
14579         skip a node whose name is obviously invalid as UTF-16,
14580         i.e. contains a NUL character. Stop the iteration when the last
14581         directory entry is found. Instead of using the return value of
14582         grub_hfsplus_btree_iterate_node, store the value in RET and use
14583         it, because the iterator can be stopped by the last directory
14584         entry.
14586 2006-04-30  Marco Gerards  <marco@gnu.org>
14588         * include/grub/env.h (grub_env_export): New prototype.  Reported
14589         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
14591 2006-04-30  Marco Gerards  <marco@gnu.org>
14593         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
14594         size of the extents in a catalog file record.
14596 2006-04-29  Marco Gerards  <marco@gnu.org>
14598         * commands/configfile.c (grub_cmd_configfile): Execute the
14599         configfile within its own context.
14601         * include/grub/env.h (grub_env_context_open): New prototype.
14602         (grub_env_context_close): Likewise.
14604         * kern/env.c (grub_env): Removed.
14605         (grub_env_sorted): Likewise.
14606         (grub_env_context): New variable.
14607         (grub_env_var_context): Likewise.
14608         (grub_env_find): Search both the active context and the global
14609         context.
14610         (grub_env_context_open): New function.
14611         (grub_env_context_close): Likewise.
14612         (grub_env_insert): Likewise.
14613         (grub_env_remove): Likewise.
14614         (grub_env_export): Likewise.
14615         (grub_env_set): Changed to use helper functions to avoid code
14616         duplication.
14617         (grub_env_iterate): Rewritten so both the current context and the
14618         global context are being used.
14620         * normal/command.c (export_command): New function.
14621         (grub_command_init): Register the `export' function.
14623 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
14625         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
14626         explicitly to suppress gcc's warnings.
14627         * fs/fat.c (grub_fat_find_dir): Likewise.
14628         (grub_fat_label): Likewise.
14629         * fs/xfs.c (grub_xfs_read_inode): Likewise.
14630         (grub_xfs_mount): Likewise.
14631         (grub_xfs_label): Likewise.
14632         * fs/affs.c (grub_affs_mount): Likewise.
14633         (grub_affs_label): Likewise.
14634         (grub_affs_iterate_dir): Likewise.
14635         * fs/sfs.c (grub_sfs_mount): Likewise.
14636         (grub_sfs_iterate_dir): Likewise.
14637         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
14638         * fs/hfs.c (grub_hfs_mount): Likewise.
14639         (grub_hfs_cmp_catkeys): Likewise.
14640         (grub_hfs_find_dir): Likewise.
14641         (grub_hfs_dir): Likewise.
14642         (grub_hfs_label): Likewise.
14643         * fs/jfs.c (grub_jfs_mount): Likewise.
14644         (grub_jfs_opendir): Likewise.
14645         (grub_jfs_getent): Likewise.
14646         (grub_jfs_lookup_symlink): Likewise.
14647         (grub_jfs_label): Likewise.
14648         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
14649         (grub_hfsplus_iterate_dir): Likewise.
14650         (grub_hfsplus_btree_iterate_node): Made static.
14652         * util/grub-emu.c (prefix): New variable.
14653         (grub_machine_set_prefix): New function.
14654         (main): Do not set the environment variable "prefix" here. Only
14655         set PREFIX, which is used later by grub_machine_set_prefix.
14657         * include/grub/video.h: Do not include grub/symbol.h.
14658         (grub_video_register): Not exported. This symbol is not defined in
14659         the kernel.
14660         (grub_video_unregister): Likewise.
14661         (grub_video_iterate): Likewise.
14662         (grub_video_setup): Likewise.
14663         (grub_video_restore): Likewise.
14664         (grub_video_get_info): Likewise.
14665         (grub_video_get_blit_format): Likewise.
14666         (grub_video_set_palette): Likewise.
14667         (grub_video_get_palette): Likewise.
14668         (grub_video_set_viewport): Likewise.
14669         (grub_video_get_viewport): Likewise.
14670         (grub_video_map_color): Likewise.
14671         (grub_video_map_rgb): Likewise.
14672         (grub_video_map_rgba): Likewise.
14673         (grub_video_fill_rect): Likewise.
14674         (grub_video_blit_glyph): Likewise.
14675         (grub_video_blit_bitmap): Likewise.
14676         (grub_video_blit_render_target): Likewise.
14677         (grub_video_scroll): Likewise.
14678         (grub_video_swap_buffers): Likewise.
14679         (grub_video_create_render_target): Likewise.
14680         (grub_video_delete_render_target): Likewise.
14681         (grub_video_set_active_render_target): Likewise.
14683         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
14684         Undefined.
14685         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
14687         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
14688         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14689         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14690         instead of $(srcdir)/genkernsyms.sh.
14692         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
14693         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14694         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14695         instead of $(srcdir)/genkernsyms.sh.
14697         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
14698         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14699         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14700         instead of $(srcdir)/genkernsyms.sh.
14702         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
14703         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14704         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14705         instead of $(srcdir)/genkernsyms.sh.
14707         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
14708         genkernsyms.sh.
14710         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
14711         genkernsyms.sh.
14712         (gensymlist.sh): New target.
14713         (genkernsyms.sh): Likewise.
14715         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
14716         genkernsyms.sh.in and gensymlist.sh.in.
14718         * genkernsyms.sh: Removed.
14719         * gensymlist.sh: Likewise.
14721         * genkernsyms.sh.in: New file.
14722         * gensymlist.sh.in: Likewise.
14724 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14726         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
14727         clobber "prefix", since we may have already set it manually.
14729 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14731         * kern/misc.c (abort): New alias for grub_abort.
14733 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
14735         A new machine-specific function "grub_machine_set_prefix" is
14736         defined. This is called after loading modules, so that a prefix
14737         initialization can use modules. Also, this change adds an
14738         intensive debugging feature for the memory manager via the
14739         configure option "--enable-mm-debug".
14741         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
14742         PART.LEN.
14744         * kern/sparc64/ieee1275/init.c (abort): Removed.
14745         (grub_stop): Likewise.
14746         (grub_exit): New function.
14747         (grub_set_prefix): Renamed to ...
14748         (grub_machine_set_prefix): ... this.
14749         (grub_machine_init): Do not call grub_set_prefix.
14751         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
14752         (grub_machine_set_prefix): ... this.
14753         (grub_machine_init): Do not call grub_set_prefix.
14755         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
14756         (grub_machine_init): Do not set the prefix here.
14758         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
14760         * kern/efi/init.c: Include grub/mm.h.
14761         (grub_efi_set_prefix): New function.
14763         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
14764         (grub_efi_get_filename): New function.
14765         (grub_print_device_path): Renamed to ...
14766         (grub_efi_print_device_path): ... this.
14768         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
14769         [MM_DEBUG] (grub_realloc): Likewise.
14770         [MM_DEBUG] (grub_free): Likewise.
14771         [MM_DEBUG] (grub_memalign): Likewise.
14772         [MM_DEBUG] (grub_mm_debug): New variable.
14773         [MM_DEBUG] (grub_debug_malloc): New function.
14774         [MM_DEBUG] (grub_debug_free): New function.
14775         [MM_DEBUG] (grub_debug_realloc): New function.
14776         [MM_DEBUG] (grub_debug_memalign): New function.
14778         * kern/misc.c (grub_abort): Print a newline to distinguish
14779         the message.
14781         * kern/main.c (grub_main): Call grub_machine_set_prefix and
14782         grub_set_root_dev after loading modules. This is necessary when
14783         setting a prefix depends on modules.
14785         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
14786         (grub_efi_print_device_path): ... this.
14787         (grub_efi_get_filename): New prototype.
14788         (grub_efi_set_prefix): Likewise.
14790         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
14791         and grub/disk.h.
14792         (grub_efidisk_get_device_handle): New prototype.
14793         (grub_efidisk_get_device_name): Likewise.
14795         * include/grub/mm.h: Include config.h.
14796         (MM_DEBUG): Removed.
14797         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
14798         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
14799         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
14800         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
14801         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
14802         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
14803         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
14804         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
14805         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
14807         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
14809         * disk/efi/efidisk.c: Include grub/partition.h.
14810         (iterate_child_devices): New function.
14811         (add_device): First, compare only last device path nodes, so that
14812         devices are sorted by the types.
14813         (grub_efidisk_get_device_handle): New function.
14814         (grub_efidisk_get_device_name): Likewise.
14816         * configure.ac (--enable-mm-debug): New option to enable the
14817         memory manager debugging feature. This makes the binary much
14818         bigger, so is disabled by default.
14820 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
14822         Use grub_abort instead of grub_stop, and grub_exit must be
14823         define in each architecture now. Also, this change adds support
14824         for EFI disks.
14826         * util/i386/pc/grub-probefs.c: Include grub/term.h.
14827         (grub_getkey): New function.
14828         (grub_term_get_current): Likewise.
14830         * util/i386/pc/grub-setup.c: Include grub/term.h.
14831         (grub_getkey): New function.
14832         (grub_term_get_current): Likewise.
14834         * util/misc.c (grub_stop): Renamed to ...
14835         (grub_exit): ... this.
14837         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
14838         (grub_exit): ... this.
14839         (grub_machine_init): Use grub_abort instead of abort.
14840         (grub_stop): Removed.
14842         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
14843         abort.
14845         * kern/i386/pc/startup.S (grub_exit): New function.
14846         (cold_reboot): New label.
14848         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
14849         (grub_efi_init): Call grub_efidisk_init.
14850         (grub_efi_fini): Call grub_efidisk_fini.
14852         * kern/efi/efi.c: Include grub/mm.h.
14853         (grub_efi_console_control_guid): Renamed to ...
14854         (console_control_guid): ... this.
14855         (grub_efi_loaded_image_guid): Renamed to ...
14856         (loaded_image_guid): ... this.
14857         (grub_efi_locate_handle): New function.
14858         (grub_efi_open_protocol): Likewise.
14859         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
14860         GRUB_EFI_CONSOLE_CONTROL_GUID.
14861         (grub_efi_exit): Removed.
14862         (grub_stop): Likewise.
14863         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
14864         (grub_exit): New function.
14865         (grub_print_device_path): Likewise.
14867         * kern/rescue.c (grub_rescue_cmd_exit): New function.
14868         (grub_enter_rescue_mode): Register "exit".
14870         * kern/misc.c (grub_real_dprintf): A cosmetic change.
14871         (grub_abort): New function.
14873         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
14875         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
14877         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
14879         * include/grub/efi/efi.h (grub_efi_exit): Removed.
14880         (grub_print_device_path): New prototype.
14881         (grub_efi_locate_handle): Likewise.
14882         (grub_efi_open_protocol): Likewise.
14884         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
14885         * disk/efi/efidisk.c: Likewise.
14887         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
14889         * include/grub/efi/console_control.h
14890         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
14892         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
14893         last 8 bytes as an array.
14894         (GRUB_EFI_DISK_IO_GUID): New macro.
14895         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
14896         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
14897         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
14898         grub_uint8_t.
14899         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
14900         (struct grub_efi_device_path): Rename the member "sub_type" to
14901         "subtype".
14902         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
14903         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
14904         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
14905         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
14906         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
14907         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
14908         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
14909         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
14910         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
14911         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
14912         (struct grub_efi_pci_device_path): New structure.
14913         (grub_efi_pci_device_path_t): New type.
14914         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
14915         (struct grub_efi_pccard_device_path): New structure.
14916         (grub_efi_pccard_device_path_t): New type.
14917         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
14918         (struct grub_efi_memory_mapped_device_path): New structure.
14919         (grub_efi_memory_mapped_device_path_t): New type.
14920         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
14921         (struct grub_efi_vendor_device_path): New structure.
14922         (grub_efi_vendor_device_path_t): New type.
14923         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
14924         (struct grub_efi_controller_device_path): New structure.
14925         (grub_efi_controller_device_path_t): New type.
14926         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
14927         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
14928         (struct grub_efi_acpi_device_path): New structure.
14929         (grub_efi_acpi_device_path_t): New type.
14930         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
14931         (struct grub_efi_expanded_acpi_device_path): New structure.
14932         (grub_efi_expanded_acpi_device_path_t): New type.
14933         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
14934         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
14935         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
14936         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
14937         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
14938         (struct grub_efi_atapi_device_path): New structure.
14939         (grub_efi_atapi_device_path_t): New type.
14940         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
14941         (struct grub_efi_fibre_channel_device_path): New structure.
14942         (grub_efi_fibre_channel_device_path_t): New type.
14943         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
14944         (struct grub_efi_1394_device_path): New structure.
14945         (grub_efi_1394_device_path_t): New type.
14946         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
14947         (struct grub_efi_usb_device_path): New structure.
14948         (grub_efi_usb_device_path_t): New type.
14949         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
14950         (struct grub_efi_usb_class_device_path): New structure.
14951         (grub_efi_usb_class_device_path_t): New type.
14952         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
14953         (struct grub_efi_i2o_device_path): New structure.
14954         (grub_efi_i2o_device_path_t): New type.
14955         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
14956         (struct grub_efi_mac_address_device_path): New structure.
14957         (grub_efi_mac_address_device_path_t): New type.
14958         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
14959         (struct grub_efi_ipv4_device_path): New structure.
14960         (grub_efi_ipv4_device_path_t): New type.
14961         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
14962         (struct grub_efi_ipv6_device_path): New structure.
14963         (grub_efi_ipv6_device_path_t): New type.
14964         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
14965         (struct grub_efi_infiniband_device_path): New structure.
14966         (grub_efi_infiniband_device_path_t): New type.
14967         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
14968         (struct grub_efi_uart_device_path): New structure.
14969         (grub_efi_uart_device_path_t): New type.
14970         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
14971         (struct grub_efi_vendor_messaging_device_path): New structure.
14972         (grub_efi_vendor_messaging_device_path_t): New type.
14973         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
14974         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
14975         (struct grub_efi_hard_drive_device_path): New structure.
14976         (grub_efi_hard_drive_device_path_t): New type.
14977         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
14978         (struct grub_efi_cdrom_device_path): New structure.
14979         (grub_efi_cdrom_device_path_t): New type.
14980         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
14981         (struct grub_efi_vendor_media_device_path): New structure.
14982         (grub_efi_vendor_media_device_path_t): New type.
14983         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
14984         (struct grub_efi_file_path_device_path): New structure.
14985         (grub_efi_file_path_device_path_t): New type.
14986         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
14987         (struct grub_efi_protocol_device_path): New structure.
14988         (grub_efi_protocol_device_path_t): New type.
14989         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
14990         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
14991         (struct grub_efi_bios_device_path): New structure.
14992         (grub_efi_bios_device_path_t): New type.
14993         (struct grub_efi_disk_io): New structure.
14994         (grub_efi_disk_io_t): New type.
14995         (struct grub_efi_block_io_media): New structure.
14996         (grub_efi_block_io_media_t): New type.
14997         (struct grub_efi_block_io): New structure.
14998         (grub_efi_block_io_t): New type.
15000         * include/grub/misc.h (grub_stop): Removed.
15001         (grub_exit): New prototype.
15002         (grub_abort): Likewise.
15004         * include/grub/disk.h (enum grub_disk_dev_id): Added
15005         GRUB_DISK_DEVICE_EFIDISK_ID.
15007         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
15008         disk/efi/efidisk.c.
15009         (kernel_syms.lst): Remove the target if an error occurs.
15011 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
15013         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
15014         as it was simply too buggy.
15016 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
15018         * kern/misc.c (grub_lltoa): New function.
15019         (grub_vsprintf): Added support for the long long suffix,
15020         i.e. "ll".
15022 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
15024         * Makefile.in (LDFLAGS): Add variable.
15025         (LD): Remove variable.
15026         * configure.ac: Add -m32 to LDFLAGS.
15027         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
15028         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
15029         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
15030         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
15031         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
15032         variables.
15033         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
15034         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
15035         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
15037 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
15039         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
15040         length for unknown glyph.
15042 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15044         Add support for pre-loaded modules into the EFI port.
15046         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
15047         completely. Accept one more argument DIR. The caller has changed.
15049         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
15051         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
15052         (grub_efi_loaded_image_guid): New variable.
15053         (grub_efi_get_loaded_image): New function.
15054         (grub_arch_modules_addr): Likewise.
15056         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
15057         prototype.
15059         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
15060         (struct grub_efi_loaded_image): New structure.
15061         (grub_efi_loaded_image_t): New type.
15063 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15065         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
15066         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
15067         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
15069 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
15071         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
15073 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
15075         * DISTLIST: Added include/grub/efi/console.h,
15076         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
15077         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15079         * include/grub/efi/console.h: New file.
15080         * include/grub/efi/time.h: Likewise.
15081         * include/grub/i386/efi/kernel.h: Likewise.
15082         * kern/efi/init.c: Likewise.
15083         * kern/efi/mm.c: Likewise.
15084         * term/efi/console.c: Likewise.
15086         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
15087         (grub_stop): Removed.
15088         (grub_get_rtc): Likewise.
15089         (grub_machine_init): Simply call grub_efi_init.
15090         (grub_machine_fini): Call grub_efi_fini.
15092         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
15093         (grub_efi_output_string): Removed.
15094         (grub_efi_stall): New function.
15095         (grub_stop): Likewise.
15096         (grub_get_rtc): Likewise.
15098         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
15099         (grub_efi_stall): New prototype.
15100         (grub_efi_allocate_pages): Likewise.
15101         (grub_efi_free_pages): Likewise.
15102         (grub_efi_get_memory_map): Likewise.
15103         (grub_efi_mm_init): Likewise.
15104         (grub_efi_mm_fini): Likewise.
15105         (grub_efi_init): Likewise.
15106         (grub_efi_fini): Likewise.
15108         * include/grub/i386/efi/time.h: Do not include
15109         grub/symbol.h. Include grub/efi/time.h.
15110         (GRUB_TICKS_PER_SECOND): Removed.
15111         (grub_get_rtc): Likewise.
15113         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
15114         Added padding. The EFI spec is buggy.
15115         (GRUB_EFI_BLACK): New macro.
15116         (GRUB_EFI_BLUE): Likewise.
15117         (GRUB_EFI_GREEN): Likewise.
15118         (GRUB_EFI_CYAN): Likewise.
15119         (GRUB_EFI_RED): Likewise.
15120         (GRUB_EFI_MAGENTA): Likewise.
15121         (GRUB_EFI_BROWN): Likewise.
15122         (GRUB_EFI_LIGHTGRAY): Likewise.
15123         (GRUB_EFI_BRIGHT): Likewise.
15124         (GRUB_EFI_DARKGRAY): Likewise.
15125         (GRUB_EFI_LIGHTBLUE): Likewise.
15126         (GRUB_EFI_LIGHTGREEN): Likewise.
15127         (GRUB_EFI_LIGHTCYAN): Likewise.
15128         (GRUB_EFI_LIGHTRED): Likewise.
15129         (GRUB_EFI_LIGHTMAGENTA): Likewise.
15130         (GRUB_EFI_YELLOW): Likewise.
15131         (GRUB_EFI_WHITE): Likewise.
15132         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
15133         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
15134         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
15135         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
15136         (GRUB_EFI_BACKGROUND_RED): Likewise.
15137         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
15138         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
15139         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
15140         (GRUB_EFI_TEXT_ATTR): Likewise.
15142         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
15143         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15144         (kernel_mod_HEADERS): Added efi/time.h.
15146 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
15148         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
15149         include/grub/efi/api.h, include/grub/efi/console_control.h,
15150         include/grub/efi/efi.h, include/grub/efi/pe32.h,
15151         include/grub/i386/efi/time.h, kern/efi/efi.c,
15152         kern/i386/efi/init.c, kern/i386/efi/startup.S,
15153         and util/i386/efi/grub-mkimage.c.
15155         * Makefile.in (RMKFILES): Added i386-efi.rmk.
15157         * genmk.rb (PModule#rule): Do not export symbols if
15158         #{prefix}_EXPORTS is set to "no".
15160         * conf/i386-efi.mk: New file.
15161         * conf/i386-efi.rmk: Likewise.
15162         * include/grub/efi/api.h: Likewise.
15163         * include/grub/efi/console_control.h: Likewise.
15164         * include/grub/efi/efi.h: Likewise.
15165         * include/grub/efi/pe32.h: Likewise.
15166         * include/grub/i386/efi/time.h: Likewise.
15167         * kern/efi/efi.c: Likewise.
15168         * kern/i386/efi/init.c: Likewise.
15169         * kern/i386/efi/startup.S: Likewise.
15170         * util/i386/efi/grub-mkimage.c: Likewise.
15172 2006-04-17  Marco Gerards  <marco@gnu.org>
15174         * include/grub/script.h: Include <grub/parser.h> and
15175         "grub_script.tab.h".
15176         (struct grub_lexer_param): New struct.
15177         (struct grub_parser_param): Likewise.
15178         (grub_script_create_arglist): Pass the state in an argument.
15179         (grub_script_add_arglist): Likewise.
15180         (grub_script_create_cmdline): Likewise.
15181         (grub_script_create_cmdblock): Likewise.
15182         (grub_script_create_cmdif): Likewise.
15183         (grub_script_create_cmdmenu): Likewise.
15184         (grub_script_add_cmd): Likewise.
15185         (grub_script_arg_add): Likewise.
15186         (grub_script_lexer_ref): Likewise.
15187         (grub_script_lexer_deref): Likewise.
15188         (grub_script_lexer_record_start): Likewise.
15189         (grub_script_lexer_record_stop): Likewise.
15190         (grub_script_mem_record): Likewise.
15191         (grub_script_mem_record_stop): Likewise.
15192         (grub_script_malloc): Likewise.
15193         (grub_script_yylex): Likewise.
15194         (grub_script_yyparse): Likewise.
15195         (grub_script_yyerror): Likewise.
15196         (grub_script_yylex): Likewise.
15197         (grub_script_lexer_init): Return the state.
15199         * normal/lexer.c (grub_script_lexer_state): Removed variable.
15200         (grub_script_lexer_done): Likewise.
15201         (grub_script_lexer_getline): Likewise.
15202         (grub_script_lexer_refs): Likewise.
15203         (script): Likewise.
15204         (newscript): Likewise.
15205         (record): Likewise.
15206         (recording): Likewise.
15207         (recordpos): Likewise.
15208         (recordlen): Likewise.
15209         (grub_script_lexer_init): Return the state instead of setting
15210         global variables.
15211         (grub_script_lexer_ref): Use the newly added argument for state
15212         instead of globals.
15213         (grub_script_lexer_deref): Likewise.
15214         (grub_script_lexer_record_start): Likewise.
15215         (grub_script_lexer_record_stop): Likewise.
15216         (recordchar): Likewise.
15217         (nextchar): Likewise.
15218         (grub_script_yylex2): Likewise.
15219         (grub_script_yylex): Likewise.
15220         (grub_script_yyerror): Likewise.
15222         * normal/parser.y (func_mem): Removed variable.
15223         (menu_entry): Likewise.
15224         (err): Likewise.
15225         (%lex-param): New parser option.
15226         (%parse-param): Likewise.
15227         (script): Always return the AST.
15228         (argument): Pass the state around.
15229         (arguments): Likewise.
15230         (grubcmd): Likewise.
15231         (commands): Likewise.
15232         (function): Likewise.
15233         (menuentry): Likewise.
15234         (if_statement): Likewise.
15235         (if): Likewise.
15237         * normal/script.c (grub_script_memused): Removed variable.
15238         (grub_script_parsed): Likewise.
15239         (grub_script_malloc): Added a state argument.  Use that instead of
15240         global variables.
15241         (grub_script_mem_record): Likewise.
15242         (grub_script_mem_record_stop): Likewise.
15243         (grub_script_arg_add): Likewise.
15244         (grub_script_add_arglist): Likewise.
15245         (grub_script_create_cmdline): Likewise.
15246         (grub_script_create_cmdif): Likewise.
15247         (grub_script_create_cmdmenu): Likewise.
15248         (grub_script_add_cmd): Likewise.
15249         (grub_script_parse): Setup the state before calling the parser.
15251 2006-04-16  Marco Gerards  <marco@gnu.org>
15253         * normal/command.c (grub_command_init): Remove the title command.
15255         * normal/lexer.c (grub_script_yylex): Renamed from this...
15256         (grub_script_yylex2): ... to this.
15257         (grub_script_yylex): New function.  Temporary
15258         introduced to filter some tokens.
15259         (grub_script_yyerror): Print a newline.
15261         * normal/main.c (read_config_file): Output information about the
15262         lines that contain errors.  Wait for a key after all lines have
15263         been processed.  Don't return an empty menu.
15265         * normal/parser.y (func_mem): Don't initialize.
15266         (menu_entry): Likewise.
15267         (err): New variable.
15268         (script): Don't return anything when an error was encountered.
15269         (ws, returns): Removed rules.
15270         (argument): Disabled concatenated variable support.
15271         (arguments): Remove explicit separators.
15272         (grubcmd): Likewise.
15273         (function): Likewise.
15274         (menuentry): Likewise.
15275         (if): Likewise.
15276         (commands): Likewise.  Add error handling.
15278         * normal/script.c (grub_script_create_cmdline): If
15279         `grub_script_parsed' is 0, assume the parser encountered an error.
15281 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
15283         * configure.ac: Add support for EFI. Fix the typo
15284         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
15286 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15288         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
15289         foreign multibyte characters should be shown correctly.
15291 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15293         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
15294         calculation.
15295         (read_config_file): Made it to close file before returning.
15297 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
15299         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
15300         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
15301         video/i386/pc/vbefill.c.
15303         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
15304         video/i386/pc/vbefill.c.
15306         * include/grub/video.h (grub_video_blit_format): New enum.
15307         (grub_video_mode_info): Added new member blit_format.
15308         (grub_video_get_blit_format): New function prototype.
15310         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
15311         function prototype.
15312         (grub_video_vbe_map_rgb): Likewise.
15313         (grub_video_vbe_unmap_color): Likewise.
15315         * include/grub/i386/pc/vbeblit.h: New file.
15317         * include/grub/i386/pc/vbefill.h: New file.
15319         * video/video.c (grub_video_get_blit_format): New function.
15320         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
15321         (grub_video_vbe_map_rgb): Likewise.
15322         (grub_video_vbe_unmap_color): Likewise.
15324         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
15325         optimized fills.
15326         (grub_video_vbe_blit_render_target): Changed to use more optimized
15327         blits.
15328         (grub_video_vbe_setup): Added detection for optimized settings.
15329         (grub_video_vbe_create_render_target): Likewise.
15331         * video/i386/pc/vbeblit.c: New file.
15333         * video/i386/pc/vbefill.c: New file.
15335 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
15337         * font/manager.c (grub_font_get_glyph): Removed font fixup from
15338         here...
15340         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
15341         parsing to support both hex and dec ranges.  If filename was missing
15342         show usage information.
15344 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
15346         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
15347         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
15349         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
15350         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
15351         (video_mod_SOURCES): Added.
15352         (video_mod_CFLAGS): Likewise.
15353         (video_mod_LDFLAGS): Likewise.
15354         (gfxterm_mod_SOURCES): Likewise.
15355         (gfxterm_mod_CFLAGS): Likewise.
15356         (gfxterm_mod_LDFLAGS): Likewise.
15357         (videotest_mod_SOURCES): Likewise.
15358         (videotest_mod_CFLAGS): Likewise.
15359         (videotest_mod_LDFLAGS): Likewise.
15360         (vesafb_mod_SOURCES): Removed.
15361         (vesafb_mod_CFLAGS): Likewise.
15362         (vesafb_mod_LDFLAGS): Likewise.
15363         (vga_mod_SOURCES): Likewise.
15364         (vga_mod_CFLAGS): Likewise.
15365         (vga_mod_LDFLAGS): Likewise.
15367         * commands/videotest.c: New file.
15369         * font/manager.c (fill_with_default_glyph): Modified to use
15370         grub_font_glyph.
15371         (grub_font_get_glyph): Likewise.
15372         (fontmanager): Renamed from this...
15373         (font_manager): ... to this.
15375         * include/grub/font.h (grub_font_glyph): Added new structure.
15376         (grub_font_get_glyph): Modified to use grub_font_glyph.
15378         * include/grub/misc.h (grub_abs): Added as inline function.
15380         * include/grub/video.h: New file.
15382         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
15383         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
15384         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
15385         (grub_vbe_get_controller_info): Renamed from this...
15386         (grub_vbe_bios_get_controller_info): ... to this.
15387         (grub_vbe_get_mode_info): Renamed from this...
15388         (grub_vbe_bios_get_mode_info): ... to this.
15389         (grub_vbe_set_mode): Renamed from this...
15390         (grub_vbe_bios_set_mode): ... to this.
15391         (grub_vbe_get_mode): Renamed from this...
15392         (grub_vbe_bios_get_mode): ... to this.
15393         (grub_vbe_set_memory_window): Renamed from this...
15394         (grub_vbe_bios_set_memory_window): ... to this.
15395         (grub_vbe_get_memory_window): Renamed from this...
15396         (grub_vbe_bios_get_memory_window): ... to this.
15397         (grub_vbe_set_scanline_length): Renamed from this...
15398         (grub_vbe_set_scanline_length): ... to this.
15399         (grub_vbe_get_scanline_length): Renamed from this...
15400         (grub_vbe_bios_get_scanline_length): ... to this.
15401         (grub_vbe_set_display_start): Renamed from this...
15402         (grub_vbe_bios_set_display_start): ... to this.
15403         (grub_vbe_get_display_start): Renamed from this...
15404         (grub_vbe_bios_get_display_start): ... to this.
15405         (grub_vbe_set_palette_data): Renamed from this...
15406         (grub_vbe_bios_set_palette_data): ... to this.
15407         (grub_vbe_set_pixel_rgb): Removed.
15408         (grub_vbe_set_pixel_index): Likewise.
15410         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
15411         from this...
15412         (grub_vbe_bios_get_controller_info): ... to this.
15413         (grub_vbe_get_mode_info): Renamed from this...
15414         (grub_vbe_bios_get_mode_info): ... to this.
15415         (grub_vbe_set_mode): Renamed from this...
15416         (grub_vbe_bios_set_mode): ... to this.
15417         (grub_vbe_get_mode): Renamed from this...
15418         (grub_vbe_bios_get_mode): ... to this.
15419         (grub_vbe_set_memory_window): Renamed from this...
15420         (grub_vbe_bios_set_memory_window): ... to this.
15421         (grub_vbe_get_memory_window): Renamed from this...
15422         (grub_vbe_bios_get_memory_window): ... to this.
15423         (grub_vbe_set_scanline_length): Renamed from this...
15424         (grub_vbe_set_scanline_length): ... to this.
15425         (grub_vbe_get_scanline_length): Renamed from this...
15426         (grub_vbe_bios_get_scanline_length): ... to this.
15427         (grub_vbe_set_display_start): Renamed from this...
15428         (grub_vbe_bios_set_display_start): ... to this.
15429         (grub_vbe_get_display_start): Renamed from this...
15430         (grub_vbe_bios_get_display_start): ... to this.
15431         (grub_vbe_set_palette_data): Renamed from this...
15432         (grub_vbe_bios_set_palette_data): ... to this.
15433         (grub_vbe_bios_get_controller_info): Fixed problem with registers
15434         getting corrupted after calling it.  Added more pushes and pops.
15435         (grub_vbe_bios_set_mode): Likewise.
15436         (grub_vbe_bios_get_mode): Likewise.
15437         (grub_vbe_bios_get_memory_window): Likewise.
15438         (grub_vbe_bios_set_scanline_length): Likewise.
15439         (grub_vbe_bios_get_scanline_length): Likewise.
15440         (grub_vbe_bios_get_display_start): Likewise.
15441         (grub_vbe_bios_set_palette_data): Likewise.
15443         * normal/cmdline.c (cl_set_pos): Refresh the screen.
15444         (cl_insert): Likewise.
15445         (cl_delete): Likewise.
15447         * term/gfxterm.c: New file.
15449         * term/i386/pc/vesafb.c: Removed file.
15451         * video/video.c: New file.
15453         * video/i386/pc/vbe.c (real2pm): Added new function.
15454         (grub_video_vbe_draw_pixel): Likewise.
15455         (grub_video_vbe_get_video_ptr): Likewise.
15456         (grub_video_vbe_get_pixel): Likewise
15457         (grub_video_vbe_init): Likewise.
15458         (grub_video_vbe_fini): Likewise.
15459         (grub_video_vbe_setup): Likewise.
15460         (grub_video_vbe_get_info): Likewise.
15461         (grub_video_vbe_set_palette): Likewise.
15462         (grub_video_vbe_get_palette): Likewise.
15463         (grub_video_vbe_set_viewport): Likewise.
15464         (grub_video_vbe_get_viewport): Likewise.
15465         (grub_video_vbe_map_color): Likewise.
15466         (grub_video_vbe_map_rgb): Likewise.
15467         (grub_video_vbe_map_rgba): Likewise.
15468         (grub_video_vbe_unmap_color): Likewise.
15469         (grub_video_vbe_fill_rect): Likewise.
15470         (grub_video_vbe_blit_glyph): Likewise.
15471         (grub_video_vbe_blit_bitmap): Likewise.
15472         (grub_video_vbe_blit_render_target): Likewise.
15473         (grub_video_vbe_scroll): Likewise.
15474         (grub_video_vbe_swap_buffers): Likewise.
15475         (grub_video_vbe_create_render_target): Likewise.
15476         (grub_video_vbe_delete_render_target): Likewise.
15477         (grub_video_vbe_set_active_render_target): Likewise.
15478         (grub_vbe_set_pixel_rgb): Remove function.
15479         (grub_vbe_set_pixel_index): Likewise.
15480         (index_color_mode): Remove static variable.
15481         (active_mode): Likewise.
15482         (framebuffer): Likewise.
15483         (bytes_per_scan_line): Likewise.
15484         (grub_video_vbe_adapter): Added new static variable.
15485         (framebuffer): Likewise.
15486         (render_target): Likewise.
15487         (initial_mode): Likewise.
15488         (mode_in_use): Likewise.
15489         (mode_list): Likewise.
15491 2006-03-10  Marco Gerards  <marco@gnu.org>
15493         * configure.ac (AC_INIT): Bumped to 1.93.
15495         * DISTLIST: Added `include/grub/hfs.h'.
15497 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
15499         * boot/i386/pc/boot.S (general_error): Before looping, try INT
15500         18H, which might help the BIOS falling back to next boot media.
15502 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
15504         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
15505         Poe Chen <poe.poechen@gmail.com>.
15507 2006-01-17  Marco Gerards  <marco@gnu.org>
15509         * include/grub/normal.h: Include <grub/script.h>.
15510         (grub_command_list): Removed struct.
15511         (grub_command_list_t): Removed type.
15512         (grub_menu_entry): Remove members `num' and `command_list'.  Add
15513         members `commands' and `sourcecode'.
15514         * include/grub/script.h: Add inclusion guards.
15515         (grub_script_cmd_menuentry): New struct.
15516         (grub_script_execute_menuentry): New prototype.
15517         (grub_script_lexer_record_start): Likewise.
15518         (grub_script_lexer_record_stop): Likewise.
15519         * normal/execute.c (grub_script_execute_menuentry): New function.
15520         * normal/lexer.c (record, recording, recordpos, recordlen): New
15521         variables.
15522         (grub_script_lexer_record_start): New function.
15523         (grub_script_lexer_record_stop): Likewise.
15524         (recordchar): Likewise.
15525         (nextchar): Likewise.
15526         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
15527         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
15528         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
15529         (current_menu): New variable.
15530         (free_menu): Mainly rewritten.
15531         (grub_normal_menu_addentry): New function.
15532         (read_config_file): Rewritten.
15533         * normal/menu.c (run_menu_entry): Mainly rewritten.
15534         * normal/menu_entry.c (make_screen): Rewritten the code to insert
15535         the menu entry.
15536         (run): Mainly rewritten.
15537         * normal/parser.y (menu_entry): New variable.
15538         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
15539         (menuentry): New rule.
15540         (command): Add `menuentry'.
15541         (if_statement): Allow additional returns before `fi'.
15542         * normal/script.c (grub_script_create_cmdmenu): New function.
15544 2006-01-03  Marco Gerards  <marco@gnu.org>
15546         * INSTALL: GNU Bison is required.
15547         * configure.ac: Rewritten the test to detect Bison.
15548         * Makefile.in (YACC): New variable.  Reported by Xun Sun
15549         <xun.sun.cn@gmail.com>.
15551 2006-01-03  Marco Gerards  <marco@gnu.org>
15553         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
15554         the HFS+ filesystem to filesystem blocks.
15555         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
15556         GCC warning is silenced.
15558 2006-01-03  Marco Gerards  <marco@gnu.org>
15560         * partmap/apple.c (apple_partition_map_iterate): Convert the data
15561         read from disk from big endian to host byte order.
15563 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15565         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
15566         documentation.
15567         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
15568         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
15569         embedded HFS+ filesystem.
15570         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
15571         (grub_hfs_sblock): Move from here...
15572         * include/grub/hfs.h: To here...  New file.
15573         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
15574         documentation.
15575         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
15576         New macros.
15577         (grub_hfsplus_volheader): Change type of member `magic' to
15578         `grub_uint16_t'.
15579         (grub_hfsplus_data): Add new member `embedded_offset'.
15580         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
15581         returned block.
15582         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
15583         Calculate the offset.
15585 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15587         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
15588         Removed.
15589         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
15591 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15593         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
15594         ENV->NAME is NULL after allocating ENV->VALUE.
15596 2005-12-25  Marco Gerards  <marco@gnu.org>
15598         * kern/env.c (grub_env_set): Rewritten the error handling code.
15600 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15602         * geninit.sh: Made more robust, and more portable.
15604 2005-12-25  Marco Gerards  <marco@gnu.org>
15606         Add support for Apple HFS+ filesystems.
15608         * fs/hfsplus.c: New file.
15610         * DISTLIST: Added `fs/hfsplus.c'.
15612         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
15613         (hfsplus_mod_SOURCES): New variable.
15614         (hfsplus_mod_CFLAGS): Likewise.
15615         (hfsplus_mod_LDFLAGS): Likewise.
15616         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
15617         (grub_setup_SOURCES): Likewise.
15618         (grub_mkdevicemap_SOURCES): Likewise.
15619         (grub_emu_SOURCES): Likewise.
15620         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15622         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
15624         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
15626 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15628         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
15629         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
15630         include/grub/parser.h, include/grub/script.h, kern/parser.c,
15631         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
15632         normal/lexer.c, normal/parser.y, normal/script.c, and
15633         partmap/gpt.c.
15634         Removed kern/sparc64/cache.c.
15636         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
15637         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
15638         grub_emu_init.c.
15640         * configure.ac (AC_INIT): Bumped to 1.92.
15642 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
15644         * kern/err.c (grub_error_push): Added new function to support error
15645         stacks.
15646         (grub_error_pop): Likewise.
15647         (grub_error_stack_items): New local variable to support error stacks.
15648         (grub_error_stack_pos): Likewise.
15649         (grub_error_stack_assert): Likewise.
15650         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
15651         stack depth.
15652         (grub_print_error): Added support to print errors from error stack.
15654         * include/grub/err.h (grub_error_push): Added function prototype.
15655         (grub_error_pop): Likewise.
15657 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
15659         * configure.ac: Accept `powerpc64' as host_cpu.
15660         (amd64): Rename to `biarch32'.
15662         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
15663         non-cacheline-aligned addresses.
15665         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
15666         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
15667         if `size' is non-zero.
15669 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
15671         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
15672         and `cd' to make sure the filename is not prefixed with a
15673         directory name.
15674         (pkgdata_MODULES): Add `gpt.mod'.
15675         (gpt_mod_SOURCES): New variable.
15676         (gpt_mod_CFLAGS): Likewise.
15677         (gpt_mod_LDFLAGS): Likewise.
15679         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
15681         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
15682         New macro.
15684         * partmap/gpt.c: New file.
15686         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
15687         GPT partition map is detected.
15689 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
15691         * commands/i386/pc/play.c: New file.
15692         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
15693         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
15694         macros.
15696 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
15698         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
15699         ((unused))' to silence gcc warning.
15701 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
15703         * configure.ac: Correct `AC_PROG_YACC' test.
15705 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15707         * util/powerpc/ieee1275/grub-install.in: Run the mount point
15708         check before installing files.
15710 2005-11-22  Mike Small  <smallm@panix.com>
15712         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
15713         number regex so multidigit numbers are recognized correctly.
15715 2005-11-22  Mike Small  <smallm@panix.com>
15717         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
15718         debugging message before attempting to claim memory.
15719         (grub_rescue_cmd_initrd): Add a claim debugging message and try
15720         multiple addresses in case of failure.
15722 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15724         * term/tparm.c (get_space): Remove empty `if' statement.
15726         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
15728         * kern/parser.c (check_varstate): Rename `state' to 's'.
15730 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15732         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
15733         variable definitions to the beginning of each function.  Sort stack
15734         variables by size.
15735         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
15736         `buf' argument to `char *'.
15738 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15740         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
15741         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15742         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15743         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15744         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15745         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15746         configfile.mod, search.mod, gzio.mod and test.mod.
15747         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15748         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15749         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15750         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15751         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15752         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15753         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15754         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15755         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15756         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15757         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15758         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15759         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15760         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15761         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15762         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15763         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15764         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15765         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15766         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15767         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15768         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15769         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
15771         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
15772         `grep --include'.
15773         (pkgdata_MODULES): Add test.mod.
15775 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15777         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
15778         appending to variables with "+=".
15779         (PModule): Use full pathname to generate *.lst filenames.
15781         * Makefile.in: Fixed list rules moved from genmk.rb.
15782         (.DELETE_ON_ERROR): New special target.
15783         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
15785         * conf/i386-pc.rmk: Include conf/common.mk.
15786         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15787         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15788         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15789         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15790         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15791         configfile.mod, search.mod, gzio.mod and test.mod.
15792         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15793         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15794         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15795         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15796         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15797         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15798         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15799         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15800         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15801         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15802         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15803         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15804         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15805         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15806         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15807         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15808         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15809         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15810         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15811         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15812         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15813         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15814         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
15815         here...
15816         * conf/common.rmk: ... to here.  New file.
15818         * conf/common.mk: New file.
15820 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
15822         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
15823         (grub_script.tab.c): ... here.
15825         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
15826         (grub_script.tab.c): ... here.
15828         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
15829         (grub_script.tab.c): ... here.
15831         * normal/command.c (grub_command_find): Fixed a memory leak of
15832         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
15834 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15836         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
15837         "@" which marks the start of a comment on ARM.
15838         (VARIABLE): Likewise.
15840 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15842         Add support for Linux/ADFS partition tables.
15844         * partmap/acorn.c: New file.
15846         * include/grub/acorn_filecore.h: Likewise.
15848         * DISTLIST: Added `partmap/acorn.c' and
15849         `include/grub/acorn_filecore.h'.
15851         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15852         `partmap/acorn.c'.
15853         (pkgdata_MODULES): Add `acorn.mod'.
15854         (acorn_mod_SOURCES): New variable.
15855         (acorn_mod_CFLAGS): Likewise.
15857         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15858         `partmap/acorn.c'.
15859         (pkgdata_MODULES): Add `acorn.mod'.
15860         (acorn_mod_SOURCES): New variable.
15861         (acorn_mod_CFLAGS): Likewise.
15863         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
15864         (pkgdata_MODULES): Add `acorn.mod'.
15865         (acorn_mod_SOURCES): New variable.
15866         (acorn_mod_CFLAGS): Likewise.
15867         (acorn_mod_LDFLAGS): Likewise.
15869         * include/types.h (grub_disk_addr_t): New typedef.
15871 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
15873         * geninit.sh: New file.
15875         * geninitheader.sh: Likewise.
15877         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
15878         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
15879         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
15880         * commands/configfile.c (grub_configfile_init)
15881         (grub_configfile_fini): Likewise.
15882         * commands/default.c (grub_default_init, grub_default_fini):
15883         Likewise.
15884         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
15885         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
15886         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
15887         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
15888         Likewise.
15889         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
15890         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
15891         Likewise.
15892         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
15893         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
15894         Likewise.
15895         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
15896         Likewise.
15897         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
15898         Likewise.
15899         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
15900         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
15901         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
15902         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
15903         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
15904         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
15905         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
15906         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
15907         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
15908         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
15909         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
15910         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
15911         * partmap/amiga.c (grub_amiga_partition_map_init)
15912         (grub_amiga_partition_map_fini): Likewise.
15913         * partmap/apple.c (grub_apple_partition_map_init)
15914         (grub_apple_partition_map_fini): Likewise.
15915         * partmap/pc.c (grub_pc_partition_map_init)
15916         (grub_pc_partition_map_fini): Likewise.
15917         * partmap/sun.c (grub_sun_partition_map_init,
15918         grub_sun_partition_map_fini): Likewise.
15919         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
15920         Likewise.
15922         * util/grub-emu.c: Include <grub_modules_init.h>.
15923         (main): Don't initialize and de-initialize any modules directly,
15924         use `grub_init_all' and `grub_fini_all' instead.
15926         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
15927         `grub_vesafb_mod_init'.
15928         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
15929         all users.
15930         * term/i386/pc/vga.c (grub_vga_init): Renamed to
15931         `grub_vga_mod_init'.  Updated all users.
15932         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
15934         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
15935         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
15936         rules.
15938         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
15939         Generate a function to initialize the module in utilities.
15940         Updated all callers.
15941         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
15942         initialize the module in utilities.  Updated all callers.
15944 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15946         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
15947         escape sequence and a literal ^L to clear the screen.
15949         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
15950         when returning from Open Firmware.
15952 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15954         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
15955         (grub_ofconsole_height): Likewise.
15956         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
15957         manually insert a '\n'.
15958         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
15959         `grub_ofconsole_height'.  Return early if these are already set.
15961 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
15963         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15964         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
15965         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
15966         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
15967         and `normal/script.c'.
15968         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15969         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15970         (test_mod_SOURCES): New variable.
15971         (test_mod_CFLAGS): Likewise.
15972         (test_mod_LDFLAGS): Likewise.
15973         (pkgdata_MODULES): Add `test.mod'.
15974         (grub_script.tab.c): New rule.
15975         (grub_script.tab.h): Likewise.
15977 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
15979         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15980         `commands/test.c', `normal/execute.c', `normal/lexer.c',
15981         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15982         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15983         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15984         (test_mod_SOURCES): New variable.
15985         (test_mod_CFLAGS): Likewise.
15986         (pkgdata_MODULES): Add `test.mod'.
15987         (grub_script.tab.c): New rule.
15988         (grub_script.tab.h): Likewise.
15990 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
15992         Add initial scripting support.
15994         * commands/test.c: New file.
15995         * include/grub/script.h: Likewise.
15996         * normal/execute.c: Likewise.
15997         * normal/function.c: Likewise.
15998         * normal/lexer.c: Likewise.
15999         * normal/parser.y: Likewise.
16000         * normal/script.c: Likewise.
16002         * configure.ac: Add `AC_PROG_YACC' test.
16004         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
16005         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
16006         `normal/function.c' and `normal/script.c'.
16007         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16008         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16009         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
16010         variables.
16011         (pkgdata_MODULES): Add `test.mod'.
16012         (grub_script.tab.c): New rule.
16013         (grub_script.tab.h): Likewise.
16015         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
16017         * include/grub/normal.h (grub_test_init): New prototype.
16018         (grub_test_fini): Likewise.
16020         * normal/command.c: Include <grub/script.h>.
16021         (grub_command_execute): Rewritten.
16023         * util/grub-emu.c (main): Call `grub_test_init' and
16024         `grub_test_fini'.
16026 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16028         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
16029         to 0.
16030         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
16031         there are no pending characters.
16033 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16035         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
16036         `grub_strndup' to drop device arguments. Replace unnecessary
16037         `grub_strndup' with `grub_strdup'.
16039 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16041         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
16042         `debug' environment variable has been set.
16044 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16046         * Makefile.in (install-local): Use $(DATA).
16047         (uninstall): Likewise.
16048         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
16049         (sbin_UTILITIES): ... to here.
16050         (sbin_SCRIPTS): New variable.
16051         (grub_install_SOURCES): New variable.
16052         * util/powerpc/ieee1275/grub-install.in: New file.
16053         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
16054         variable.
16055         (add_segments): Call `grub_util_get_path'.
16057 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
16059         From Timothy Baldwin:
16060         * commands/ls.c (grub_ls_list_files): Close FILE with
16061         grub_file_close.
16062         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
16064 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
16066         * include/grub/parser.h: New file.
16068         * kern/parser.c: Likewise.
16070         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
16071         (grub_setup_SOURCES): Likewise.
16072         (grub_probefs_SOURCES): Likewise.
16073         (grub_emu_SOURCES): Likewise.
16074         (kernel_img_HEADERS): Add `parser.h'.
16076         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16077         (grub_emu_SOURCES): Add `kern/parser.c'.
16078         (grubof_SOURCES): Likewise.
16080         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16081         (grubof_SOURCES): Add `kern/parser.c'.
16083         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
16085         * kern/misc.c (grub_split_cmdline): Removed function.
16087         * kern/rescue.c: Include <grub/parser.h>.
16088         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
16089         of `grub_split_cmdline'.
16091         * normal/command.c: Include <grub/parser.h>.
16092         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
16093         of `grub_split_cmdline'.
16095         * normal/completion.c: Include <grub/parser.h>.
16096         (cmdline_state): New variable.
16097         (iterate_dir): End the filename with a quote depending on the
16098         command line state.
16099         (get_state): new function.
16100         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
16101         split the arguments and determine the current argument.  When the
16102         argument string is not quoted, escape all spaces.
16104 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16106         * normal/sparc64/setjmp.S: New file.
16108 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16110         * include/grub/sparc64/libgcc.h: New file.
16111         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
16112         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
16113         normal/sparc64/setjmp.c.
16115 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16117         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
16118         * kern/sparc64/cache.S: New file.
16119         * kern/sparc64/cache.c: Removed.
16120         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
16121         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
16122         -mtune=ultrasparc.
16123         (COMMON_LDFLAGS): Add -melf64_sparc.
16124         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
16125         (grubof_SOURCES): Use cache.S instead of cache.c.
16126         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
16127         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
16128         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
16129         commented though.
16130         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
16131         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
16132         (linux_mod_CFLAGS): Commented out.
16133         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
16134         out because module isn't built.
16135         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
16136         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
16137         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
16138         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
16139         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
16140         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16141         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16142         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
16143         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
16144         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
16145         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16146         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16147         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
16148         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
16150 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
16152         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
16153         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
16154         longer, because HFS should not be used on PC.
16156 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16158         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
16159         consistently within the loop.
16161 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
16163         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
16164         directory can not be read.
16166 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16168         * configure.ac (AC_INIT): Increase the version number to 1.91.
16170         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
16171         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
16172         term/i386/pc/serial.c.
16174 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16176         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
16177         file size must be permitted.
16179         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
16180         between %ah and %al.
16182 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16184         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
16185         grub_uint64_t.
16186         Call the hook with a NUL-terminated filename.
16187         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
16188         grub_cpu_to_be32.
16190         * kern/term.c (cursor_state): New variable.
16191         (grub_term_set_current): Reset the cursor state on a new
16192         terminal.
16193         (grub_setcursor): Rewritten to use CURSOR_STATE.
16194         (grub_getcursor): New function.
16196         * include/grub/term.h (grub_getcursor): New prototype.
16198         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
16199         integers on ARM. Reported by Timothy Baldwin
16200         <T.E.Baldwin99@members.leeds.ac.uk>.
16202 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
16204         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
16205         allocated.
16206         (grub_sfs_dir): Likewise.
16208 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
16210         Add support for the SFS filesystem.
16212         * fs/sfs.c: New file.
16214         * DISTLIST: Added `fs/sfs.c'.
16216         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
16217         (grub_probefs_SOURCES): Likewise.
16218         (grub_emu_SOURCES): Likewise.
16219         (pkgdata_MODULES): Add `sfs.mod'.
16220         (sfs_mod_SOURCES): New variable.
16221         (sfs_mod_CFLAGS): Likewise.
16222         (sfs_mod_LDFLAGS): Likewise.
16224         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
16225         (pkgdata_MODULES): Add `sfs.mod'.
16226         (sfs_mod_SOURCES): New variable.
16227         (sfs_mod_CFLAGS): Likewise.
16229         * util/grub-emu.c (main): Call `grub_sfs_init' and
16230         `grub_sfs_fini'.
16232         * include/grub/fs.h (grub_sfs_init): New prototype.
16233         (grub_sfs_fini): Likewise.
16235 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
16237         Add support for the AFFS filesystem.
16239         * fs/affs.c: New file.
16241         * DISTLIST: Added `fs/affs.c'.
16243         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
16244         (grub_probefs_SOURCES): Likewise.
16245         (grub_emu_SOURCES): Likewise.
16246         (pkgdata_MODULES): Add `affs.mod'.
16247         (affs_mod_SOURCES): New variable.
16248         (affs_mod_CFLAGS): Likewise.
16249         (affs_mod_LDFLAGS): Likewise.
16251         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
16252         (pkgdata_MODULES): Add `affs.mod'.
16253         (affs_mod_SOURCES): New variable.
16254         (affs_mod_CFLAGS): Likewise.
16256         * util/grub-emu.c (main): Call `grub_affs_init' and
16257         `grub_affs_fini'.
16259         * include/grub/fs.h (grub_affs_init): New prototype.
16260         (grub_affs_fini): Likewise.
16262 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16264         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
16266 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16268         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
16269         `-m32' to CFLAGS.
16271         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
16272         linking.
16274         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
16275         (COMMON_LDFLAGS): New variable.
16276         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
16277         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
16278         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
16279         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
16280         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
16281         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
16282         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
16283         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
16284         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
16285         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
16286         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16287         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16288         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
16289         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
16290         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
16291         variables.
16292         (normal_mod_ASFLAGS): Add `-m32'.
16294         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
16295         (grub_host_size_t, grub_host_ssize_t): New types.
16296         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
16297         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
16298         `GRUB_HOST_SIZEOF_VOID_P'.
16300         * include/grub/kernel.h (struct grub_module_header): Type of
16301         member offset changed to `grub_host_off_t'.  Type of member size
16302         changed to `grub_host_size_t'.
16303         (struct grub_module_info): Type of member offset changed to
16304         `grub_host_off_t'.  Type of member size changed to
16305         `grub_host_size_t'.
16307 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
16309         Make GRUB's kernel compliant to Multiboot Specification.
16311         * kern/i386/pc/startup.S (multiboot_header): New label.
16312         (multiboot_entry): Likewise.
16313         (multiboot_trampoline): Likewise.
16315         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16316         Increased to 0x4A0.
16318         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
16319         put parentheses after a question mark.
16320         [!GRUB_UTIL] (my_mod): New variable.
16322         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
16324 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
16326         Adds support for the XFS filesystem.  Btrees are not supported
16327         yet.
16329         * fs/xfs.c: New file.
16331         * DISTLIST: Added `fs/xfs.c'.
16333         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
16334         (grub_probefs_SOURCES): Likewise.
16335         (grub_emu_SOURCES): Likewise.
16336         (pkgdata_MODULES): Add `xfs.mod'.
16337         (xfs_mod_SOURCES): New variable.
16338         (xfs_mod_CFLAGS): Likewise.
16340         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
16341         (pkgdata_MODULES): Add `xfs.mod'.
16342         (xfs_mod_SOURCES): New variable.
16343         (xfs_mod_CFLAGS): Likewise.
16345         * util/grub-emu.c (main): Call `grub_xfs_init' and
16346         `grub_xfs_fini'.
16348         * include/grub/fs.h (grub_xfs_init): New prototype.
16349         (grub_xfs_fini): Likewise.
16352 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
16354         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
16355         color modes, allow greater than 16 colors to be configured as
16356         a default palette.
16358 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
16360         * normal/completion.c (complete_arguments): Add the qualifier
16361         const into OPTIONS.
16363         From Omniflux <omniflux+lists@omniflux.com>:
16364         * include/grub/terminfo.h: New file.
16365         * include/grub/tparm.h: Likewise.
16366         * include/grub/i386/pc/serial.h: Likewise.
16367         * term/terminfo.c: Likewise.
16368         * term/tparm.c: Likewise.
16369         * term/i386/pc/serial.c: Likewise.
16370         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
16371         serial.mod.
16372         (terminfo_mod_SOURCES): New variable.
16373         (terminfo_mod_CFLAGS): Likewise.
16374         (serial_mod_SOURCES): Likewise.
16375         (serial_mod_CFLAGS): Likewise.
16377 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
16379         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
16380         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
16381         and kern/powerpc/ieee1275/cmain.c, respectively.
16383         * boot/powerpc/ieee1275/crt0.S: Moved to ...
16384         * kern/powerpc/ieee1275/crt0.S: ... here.
16386         * boot/powerpc/ieee1275/cmain.c: Moved to ...
16387         * kern/powerpc/ieee1275/cmain.c: ... here.
16389         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
16390         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
16391         instead of boot/powerpc/ieee1275/crt0.S and
16392         boot/powerpc/ieee1275/cmain.c, respectively.
16394         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
16395         sectors. It was not used anyway.
16397 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16399         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
16400         `unused parameter' warning.
16402 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16404         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
16405         function.
16406         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
16407         getcharwidth.
16409 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
16411         * include/grub/normal.h (enum grub_completion_type): Added
16412         `GRUB_COMPLETION_TYPE_ARGUMENT'.
16414         * normal/cmdline.c (print_completion): Handle
16415         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
16416         * normal/menu_entry.c (store_completion): Likewise.
16418         * normal/completion.c (complete_arguments): New function.
16419         (grub_normal_do_completion): Call `complete_arguments' when the
16420         current words start with a dash.
16422 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
16424         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
16425         `gzio.mod' instead of `io.mod').
16427 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
16429         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
16430         (DISTDIRS): Added io and video.
16431         Rewrite the search routine to make an output consistently.
16433         * DISTLIST: Added conf/sparc64-ieee1275.mk,
16434         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
16435         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
16436         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
16437         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
16438         util/powerpc/ieee1275/misc.c.
16440         * include/grub/gzio.h: New file.
16441         * io/gzio.c: Likewise.
16443         * kern/file.c (grub_file_close): Call grub_device_close only if
16444         FILE->DEVICE is not NULL.
16446         * include/grub/mm.h [!NULL] (NULL): New macro.
16448         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
16450         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
16451         (pkgdata_MODULES): Added gzio.mod.
16452         (gzio_mod_SOURCES): New variable.
16453         (gzio_mod_CFLAGS): Likewise.
16455         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
16456         (pkgdata_MODULES): Added gzio.mod.
16457         (gzio_mod_SOURCES): New variable.
16458         (gzio_mod_CFLAGS): Likewise.
16460         * commands/cat.c: Include grub/gzio.h.
16461         (grub_cmd_cat): Use grub_gzfile_open instead of
16462         grub_file_open.
16464         * commands/cmp.c: Include grub/gzio.h.
16465         (grub_cmd_cmp): Use grub_gzfile_open instead of
16466         grub_file_open.
16468         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
16469         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
16470         grub_file_open.
16471         (grub_rescue_cmd_module): Likewise.
16473 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16475         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
16476         kern/sparc64/ieee1275/init.c because it contains _start.
16477         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
16479 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16481         * configure.ac: Add support for sparc64 host with ieee1275
16482         firmware.
16483         * configure: Generated from configure.ac.
16484         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
16485         instead of int.
16486         (grub_ofdisk_read): Likewise.
16487         (grub_ofdisk_open): Use %p to print pointer values, and cast the
16488         pointers as (void *) to remove a warning.
16489         (grub_ofdisk_close): Likewise.
16490         (grub_ofdisk_read): Likewise.
16491         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
16492         returns, so make it return void to remove a warning.
16493         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
16494         Corresponding prototype change.
16495         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
16496         values, and cast the pointers as (void *) to remove a warning.
16497         (grub_mm_dump): Likewise.
16498         * conf/sparc64-ieee1275.mk: New file.
16499         * conf/sparc64-ieee1275.rmk: Likewise.
16500         * include/grub/sparc64/setjmp.h: Likewise.
16501         * include/grub/sparc64/types.h: Likewise.
16502         * include/grub/sparc64/ieee1275/console.h: Likewise.
16503         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
16504         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
16505         * include/grub/sparc64/ieee1275/time.h: Likewise.
16506         * kern/sparc64/cache.c: Likewise.
16507         * kern/sparc64/dl.c: Likewise.
16508         * kern/sparc64/ieee1275/init.c: Likewise.
16509         * kern/sparc64/ieee1275/openfw.c: Likewise.
16511 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16513         * util/console.c (grub_ncurses_putchar): If C is greater than
16514         0x7f, set C to a question mark.
16515         (grub_ncurses_getcharwidth): New function.
16516         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
16517         getcharwidth.
16519         * normal/menu.c (print_entry): Made aware of Unicode. First,
16520         convert TITLE to UCS-4, and predict the cursor position by
16521         grub_getcharwidth.
16523         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
16524         const to SRC.
16525         * kern/misc.c (grub_utf16_to_utf8): Likewise.
16527 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16529         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
16530         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16531         grub_strcat.
16533         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
16534         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16535         grub_strcpy and grub_strlen. Take it into account that a space
16536         character is inserted as a delimiter.
16538 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16540         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
16541         invalid magic in the error.
16543         * commands/search.c: New file.
16545         * util/grub-emu.c (main): Call grub_search_init and
16546         grub_search_fini.
16548         * kern/rescue.c (grub_rescue_print_disks): Removed.
16549         (grub_rescue_print_devices): New function.
16550         (grub_rescue_cmd_ls): Use grub_device_iterate with
16551         grub_rescue_print_devices instead of grub_disk_dev_iterate with
16552         grub_rescue_print_disks.
16554         * kern/partition.c (grub_partition_iterate): Return the result of
16555         PARTMAP->ITERATE instead of GRUB_ERRNO.
16557         * kern/device.c: Include grub/partition.h.
16558         (grub_device_iterate): New function.
16560         * include/grub/partition.h (grub_partition_iterate): Return int
16561         instead of grub_err_t.
16563         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
16564         prototype.
16565         [GRUB_UTIL] (grub_search_fini): Likewise.
16567         * include/grub/device.h (grub_device_iterate): New prototype.
16569         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16570         commands/search.c.
16571         (pkgdata_MODULES): Added search.mod.
16572         (search_mod_SOURCES): New variable.
16573         (search_mod_CFLAGS): Likewise.
16575         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
16576         (pkgdata_MODULES): Added search.mod.
16577         (search_mod_SOURCES): New variable.
16578         (search_mod_CFLAGS): Likewise.
16580         * commands/ls.c (grub_ls_list_disks): Renamed to ...
16581         (grub_ls_list_devices): ... this, and use grub_device_iterate.
16582         All callers changed.
16584         * DISTLIST: Added commands/search.c.
16586 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16588         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
16589         conversion.
16590         (grub_getcharwidth): New function.
16592         * kern/misc.c (grub_utf8_to_ucs4): New function.
16594         * include/grub/term.h (struct grub_term): Added a new member
16595         "getcharwidth".
16596         (grub_getcharwidth): New prototype.
16598         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
16600         * term/i386/pc/console.c (map_char): New function. Segregated from
16601         grub_console_putchar.
16602         (grub_console_putchar): Use map_char.
16603         (grub_console_getcharwidth): New function.
16604         (grub_console_term): Specified grub_console_getcharwidth as
16605         getcharwidth.
16607         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
16608         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
16610         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
16611         GRUB_ERRNO.
16612         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
16613         on grub_strtoul completely.
16614         (write_char): Declare local variables in the beginning of the
16615         function.
16616         (grub_vesafb_getcharwidth): New function.
16617         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
16618         getcharwidth.
16620 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
16622         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
16623         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
16624         commands/i386/pc/vbetest.c.
16626         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
16627         call grub_vbe_get_controller_info again, because the returned
16628         information is volatile.
16629         (grub_vbe_set_video_mode): Mostly rewritten.
16630         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
16631         grub_vbe_status_t correctly.
16632         (grub_vbe_get_video_mode_info): Likewise.
16633         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
16634         several if statements.
16636         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
16637         * commands/i386/pc/vbeinfo.c: ... this.
16639         * commands/i386/pc/vbe_test.c: Renamed to ...
16640         * commands/i386/pc/vbetest.c: ... this.
16642         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
16643         ...
16644         (grub_cmd_vbeinfo): ... this. Save video modes before
16645         iterating. Skip a video mode, if it is not available, not enough
16646         information is given or it is monochrome. Show the memory
16647         model. Leave the interpretation of MODEVAR to grub_strtoul
16648         completely.
16649         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
16650         (GRUB_MOD_FINI): Likewise.
16652         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
16653         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
16654         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
16655         duplicated grub_env_get. Leave the interpretation of MODEVAR to
16656         grub_strtoul completely.
16657         (real2pm): Removed.
16658         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
16659         (GRUB_MOD_FINI): Likewise.
16661         * normal/misc.c: Include grub/mm.h.
16663         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
16664         vbe_list_modes with vbetest.mod and vbeinfo.mod.
16665         (vbe_list_modes_mod_SOURCES): Removed.
16666         (vbe_list_modes_mod_CFLAGS): Likewise.
16667         (vbe_test_mod_SOURCES): Likewise.
16668         (vbe_test_mod_CFLAGS): Likewise.
16669         (vbeinfo_mod_SOURCES): New variable.
16670         (vbeinfo_mod_CFLAGS): Likewise.
16671         (vbetest_mod_SOURCES): Likewise.
16672         (vbetest_mod_CFLAGS): Likewise.
16674 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
16676         * normal/misc.c: New file.
16678         * DISTLIST: Added normal/misc.c.
16680         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
16681         DISK to HOOK. Call HOOK with DISK.
16682         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16683         * partmap/pc.c (pc_partition_map_iterate): Likewise.
16684         * partmap/sun.c (sun_partition_map_iterate): Likewise.
16686         * normal/menu_entry.c (struct screen): Added a new member
16687         "completion_shown".
16688         (completion_buffer): New global variable.
16689         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
16690         (store_completion): New function.
16691         (complete): Likewise.
16692         (clear_completions): Likewise.
16693         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
16694         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
16695         a tab, call complete.
16697         * normal/completion.c (disk_dev): Removed.
16698         (print_simple_completion): Likewise.
16699         (print_partition_completion): Likewise.
16700         (print_func): New global variable.
16701         (add_completion): Do not take the arguments WHAT or PRINT any
16702         longer. Added a new argument TYPE. Instead of printing directly,
16703         call PRINT_FUNC if not NULL.
16704         All callers changed.
16705         (complete_device): Use a local variable DEV instead of
16706         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
16707         (grub_normal_do_completion): Take a new argument HOOK. Do not
16708         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
16709         empty string, return NULL instead.
16710         All callers changed.
16712         * normal/cmdline.c (print_completion): New function.
16714         * kern/partition.c (grub_partition_iterate): Add an argument DISK
16715         to HOOK.
16716         All callers changed.
16718         * kern/disk.c (grub_print_partinfo): Removed.
16720         * include/grub/partition.h (struct grub_partition_map): Add a new
16721         argument DISK into HOOK of ITERATE.
16722         (grub_partition_iterate): Add a new argument DISK to HOOK.
16724         * include/grub/normal.h (enum grub_completion_type): New enum.
16725         (grub_completion_type_t): New type.
16726         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
16727         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
16728         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
16729         (GRUB_COMPLETION_TYPE_FILE): Likewise.
16730         (grub_normal_do_completion): Added a new argument HOOK.
16731         (grub_normal_print_device_info): New prototype.
16733         * include/grub/disk.h (grub_print_partinfo): Removed.
16735         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
16736         (normal_mod_SOURCES): Likewise.
16737         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16738         (normal_mod_SOURCES): Likewise.
16740         * commands/ls.c (grub_ls_list_disks): Use
16741         grub_normal_print_device_info instead of grub_print_partinfo. Free
16742         PNAME.
16743         (grub_ls_list_files): Use grub_normal_print_device_info instead of
16744         duplicating the code.
16746 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16748         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
16749         follow GCS more precisely.
16750         * commands/i386/pc/vbe_test.c: Likewise.
16751         * include/grub/i386/pc/vbe.h: Likewise.
16752         * term/i386/pc/vesafb.c: Likewise.
16753         * video/i386/pc/vbe.c: Likewise.
16755 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16757         * DISTLIST: Added term/i386/pc/vesafb.c
16758         DISTLIST: Added video/i386/pc/vbe.c
16759         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
16760         DISTLIST: Added commands/i386/pc/vbe_test.c.
16761         * commands/i386/pc/vbe_list_modes.c: New file.
16762         * commands/i386/pc/vbe_test.c: Likewise.
16763         * term/i386/pc/vesafb.c: Likewise.
16764         * video/i386/pc/vbe.c: Likewise.
16765         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
16766         (grub_vbe_probe) Added prototype.
16767         (grub_vbe_set_video_mode) Likewise.
16768         (grub_vbe_get_video_mode) Likewise.
16769         (grub_vbe_get_video_mode_info) Likewise.
16770         (grub_vbe_set_pixel_rgb) Likewise.
16771         (grub_vbe_set_pixel_index) Likewise.
16772         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
16773         (pkgdata_MODULES): Added vesafb.mod.
16774         (pkgdata_MODULES): Added vbe_list_modes.mod.
16775         (pkgdata_MODULES): Added vbe_test.mod.
16776         (vbe_mod_SOURCES): Added.
16777         (vbe_mod_CFLAGS): Likewise.
16778         (vesafb_mod_SOURCES): Likewise.
16779         (vesafb_mod_CFLAGS): Likewise.
16780         (vbe_list_modes_mod_SOURCES): Likewise.
16781         (vbe_list_modes_mod_CFLAGS): Likewise.
16782         (vbe_test_mod_SOURCES): Likewise.
16783         (vbe_test_mod_CFLAGS): Likewise.
16785 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
16787         * normal/command.c (grub_command_execute): If INTERACTIVE is
16788         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
16789         CMDLINE. Disable the pager if INTERACTIVE is true.
16790         All callers are changed.
16792         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
16793         before reading a config file.
16794         * normal/main.c (read_config_file): Even if a command is not
16795         found, register it if it is within an entry.
16797         * util/grub-emu.c: Include sys/types.h and unistd.h.
16798         (options): Added --hold.
16799         (struct arguments): Added a new member "hold".
16800         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
16801         missing.
16802         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
16803         cleared by a debugger, if it is not zero.
16805         * include/grub/normal.h (grub_command_execute): Add an argument
16806         INTERACTIVE.
16808 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
16810         * DISTLIST: Added include/grub/i386/pc/vbe.h.
16812 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
16814         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
16815         program with another one, because the old one didn't detect a bug
16816         in gcc-3.4. Always use regparm 2, because the new test is still
16817         not enough for gcc-4.0. Someone must investigate a simple test
16818         case which detects a bug in gcc-4.0.
16820 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
16822         * DISTLIST: Added normal/completion.c.
16824         * normal/completion.c: New file.
16826         * term/i386/pc/console.c (grub_console_getwh): New function.
16827         (grub_console_term): Assign grub_console_getwh to getwh.
16829         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
16830         function is defined in normal/completion.c as
16831         grub_normal_do_completion.
16832         (grub_cmdline_get): Use grub_normal_do_completion instead of
16833         grub_tab_complete.
16835         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
16836         returns non-zero, otherwise return 0.
16837         (grub_partition_iterate): First, probe the partition map. Then,
16838         call ITERATE only for this partition map.
16840         * kern/misc.c (grub_strncmp): Rewritten.
16842         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
16843         returns non-zero. Otherwise return 0.
16845         * include/grub/partition.h (grub_partition_map_iterate): Return
16846         int instead of void.
16848         * include/grub/normal.h (grub_normal_do_completion): New prototype.
16850         * include/grub/misc.h (grub_strncmp): Change the type of N to
16851         grub_size_t.
16853         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
16854         of void.
16856         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
16857         unsigned explicitly before comparing it with I.
16859         * kern/main.c (grub_env_write_root): Add the attribute unused into
16860         VAR.
16862         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16863         normal/completion.c.
16864         (normal_mod_SOURCES): Likewise.
16865         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
16866         (normal_mod_SOURCES): Likewise.
16868         * normal/command.c (grub_iterate_commands): If ITERATE returns
16869         non-zero, return one immediately.
16871 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
16873         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
16874         * kern/i386/pc/startup.S: Updated Global Descriptor table's
16875         descriptions.
16876         (grub_vbe_get_controller_info): New function.
16877         (grub_vbe_get_mode_info): Likewise.
16878         (grub_vbe_set_mode): Likewise.
16879         (grub_vbe_get_mode): Likewise.
16880         (grub_vbe_set_memory_window): Likewise.
16881         (grub_vbe_get_memory_window): Likewise.
16882         (grub_vbe_set_scanline_length): Likewise.
16883         (grub_vbe_get_scanline_length): Likewise.
16884         (grub_vbe_set_display_start): Likewise.
16885         (grub_vbe_get_display_start): Likewise.
16886         (grub_vbe_set_palette_data): Likewise.
16887         * include/grub/i386/pc/vbe.h: New file.
16889 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16891         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16892         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
16893         * DISTLIST: Likewise.
16894         * kern/ieee1275/of.c: Moved to ...
16895         * kern/ieee1275/ieee1275.c: ... here.
16897 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16899         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
16900         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
16901         Pass 0 as `end' parameter to grub_strtoul().
16903 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16905         * include/grub/powerpc/ieee1275/console.h: Do not include
16906         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
16907         ifdef.
16908         (grub_console_cur_color): Remove i386-specific prototype.
16909         (grub_console_real_putchar): Likewise.
16910         (grub_console_checkkey): Likewise.
16911         (grub_console_getkey): Likewise.
16912         (grub_console_getxy): Likewise.
16913         (grub_console_gotoxy): Likewise.
16914         (grub_console_cls): Likewise.
16915         (grub_console_setcursor): Likewise.
16916         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
16917         Include <grub/machine/console.h>.
16918         * term/ieee1275/ofconsole.c: Likewise.
16920 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
16922         * Makefile.in (LIBLZO): New variable.
16924         * configure.ac: Check for LZO version 2.
16926         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
16927         lzo/lzo1x.h instead of lzo1x.h.
16929         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
16930         of -llzo.
16932         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
16933         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
16935         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
16936         copying the data from PARTITION to P.
16938 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16940         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
16941         negative, unload the module.
16943         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
16944         map is "pc_partition_map" but not "pc".
16945         (usage): Fix the description. The options are --boot-image and
16946         --core-image but not --boot-file or --core-file.
16947         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
16948         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
16949         DEFAULT_DIRECTORY.
16951         * util/i386/pc/grub-install.in: Do not specify --boot-file or
16952         --core-file. Specify INSTALL_DEVICE as an argument.
16954         * util/console.c: Include config.h.
16955         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
16956         [HAVE_NCURSES_H]: Include ncurses.h.
16957         [HAVE_CURSES_H]: Include curses.h.
16958         [!A_NORMAL] (A_NORMAL): Defined as zero.
16959         [!A_STANDOUT] (A_STANDOUT): Likewise.
16961         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
16962         -lncurses.
16963         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
16965         * configure.ac: Check for curses libraries and headers.
16967         * Makefile.in (LIBCURSES): New variable.
16969         * genmk.rb (Script::rule): Set the executable bits.
16971         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
16972         name of the PC partition map is "pc_partition_map" but not "pc".
16974 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16976         * util/i386/pc/grub-install.in (grub_probefs): New variable.
16977         (modules): Likewise.
16978         (usage): Added descriptions for --modules and --grub-probefs.
16979         Handle --modules and --grub-probefs. Save the arguments in MODULES
16980         and GRUB_PROBEFS, respectively.
16981         Auto-detect a filesystem module against GRUBDIR. If the result is
16982         empty and modules are not specified explicitly, abort the
16983         installation. Add the result to MODULES.
16985         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
16986         disk/powerpc/ieee1275/ofdisk.c,
16987         include/grub/powerpc/ieee1275/init.h and
16988         term/powerpc/ieee1275/ofconsole.c.
16989         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
16990         term/ieee1275/ofconsole.c.
16992         * include/grub/powerpc/ieee1275/console.h: Resurrected.
16994         * COPYING: Upgraded to the latest version. Only the address of the
16995         FSF office has changed.
16997 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16999         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17000         kern/ieee1275.c with kern/ieee1275/of.c.
17002         * kern/ieee1275.c: Moved to ...
17003         * kern/ieee1275/of.c: ... here.
17005 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
17007         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
17008         readability.
17010         * config.guess: Updated to the latest version from gnulib.
17011         * config.sub: Likewise.
17012         * install.sh: Likewise.
17013         * mkinstalldirs: Likewise.
17015         * include/grub/console.h: Removed. This file is arch-specific. Do
17016         not put this in include/grub.
17018         * include/grub/i386/pc/console.h: Resurrected.
17020         * util/console.c: Include grub/machine/console.h instead of
17021         grub/console.h.
17022         * util/grub-emu.c: Likewise.
17024 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
17026         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
17027         hardcoded value.
17029         From Vincent Pelletier  <subdino2004@yahoo.fr>
17030         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
17031         Redefined to use grub_getwh.
17032         (grub_term): New member named getwh.
17033         (grub_getwh): New prototype.
17034         * kern/term.c (grub_getwh): New function.
17035         * term/i386/pc/console.c (grub_console_getwh): New function.
17036         (grub_console_term): New member `getwh'.
17037         * term/i386/pc/vga.c (grub_vga_getwh): New function.
17038         (grub_vga_term): New member `getwh'.
17039         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
17040         grub_ssize_t.
17041         (grub_ofconsole_getw): New function.
17042         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
17043         (grub_ofconsole_term): New field named getwh and new initial
17044         value.
17046 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
17048         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
17049         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
17050         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
17051         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
17052         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
17053         of <grub/machine/ieee1275.h>.
17054         * commands/ieee1275/reboot.c: Likewise.
17055         * boot/powerpc/ieee1275/ieee1275.c: Move ...
17056         * kern/ieee1275.c: ... to here.  All users updated.  Change all
17057         parameter structs to use new type `grub_ieee1275_cell_t'.
17058         * term/powerpc/ieee1275/ofconsole.c: Move ...
17059         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
17060         * disk/powerpc/ieee1275/ofdisk.c: Move ...
17061         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
17062         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
17063         to return int.
17064         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
17065         Remove unused prototypes.  All users updated.
17066         * include/grub/powerpc/ieee1275/console.h: Removed.
17067         * include/grub/powerpc/ieee1275/ieee1275.h: Define
17068         `grub_ieee1275_cell_t'.
17069         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
17070         Cast comparisons with -1 to the correct type.
17071         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
17072         type to match `grub_ieee1275_entry_fn'.
17074 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
17076         * DISTLIST: Added util/i386/pc/grub-probefs.c.
17078         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
17079         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
17080         partmap/sun.c.
17081         (grub_probefs_SOURCES): New variable.
17083         * util/i386/pc/grub-probefs.c: New file.
17085         * util/i386/pc/grub-setup.c (main): Call
17086         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
17087         grub_hfs_init and grub_jfs_init to initialize the system. Call
17088         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
17089         grub_pc_partition_map_fini to finish the system.
17091 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
17093         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
17094         function.
17095         (grub_multiboot_load_elf32): Likewise.
17096         (grub_multiboot_is_elf64): Likewise.
17097         (grub_multiboot_load_elf64): Likewise.
17098         (grub_multiboot_load_elf): Likewise.
17099         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
17100         an ELF32 or ELF64 file.
17101         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
17103         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
17104         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
17105         NULL before calling FS->LABEL.
17106         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
17107         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
17108         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
17109         before calling FS->LABEL.
17111 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
17113         * util/i386/pc/grub-install.in (datadir): New variable.
17114         (libdir): Removed.
17115         (pkgdatadir): New variable.
17116         (pkglibdir): Removed.
17118 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
17120         * DISTLIST: Added util/i386/pc/grub-install.in.
17122         * util/i386/pc/grub-install.in: New file.
17124         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
17125         (grub_install_SOURCES): Likewise.
17127         * genmk.rb: Added support for scripts.
17128         (Script): New class.
17129         (scripts): New variable.
17131         * Makefile.in (install-local): Install sbin_SCRIPTS by
17132         INSTALL_SCRIPT.
17133         (uninstall): Remove sbin_SCRIPTS.
17135         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
17136         device, try to get a GRUB device by
17137         grub_util_biosdisk_get_grub_dev.
17138         Free DEST_DEV.
17140         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
17141         description for --device-map.
17143 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17145         Change the semantics of variable hooks. They now return strings
17146         instead of error values.
17148         * util/i386/pc/grub-setup.c: Include grub/env.h.
17149         (setup): Use grub_device_set_root instead of grub_env_set.
17151         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
17152         grub_env_get instead of grub_device_set_root and
17153         grub_device_get_root, respectively.
17155         * kern/main.c (grub_env_write_root): New function.
17156         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
17157         grub_env_set instead of grub_device_set_root.
17159         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
17160         many variables.
17161         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
17162         rather than calling ENV->WRITE_HOOK afterwards.
17163         (grub_env_get): Return the result of ENV->READ_HOOK rather than
17164         passing a pointer of a pointer.
17165         (grub_register_variable_hook): Change the types of "read_hook" and
17166         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
17167         respectively.
17168         Allocate the default empty string on the heap, because this string
17169         may be freed later.
17171         * kern/device.c: Include grub/env.h.
17172         (grub_device_set_root): Removed.
17173         (grub_device_get_root): Likewise.
17174         (grub_device_open): Use grub_env_get instead of
17175         grub_device_get_root.
17177         * include/grub/env.h (grub_env_read_hook_t): New type.
17178         (grub_env_write_hook_t): Likewise.
17179         (grub_env_var): Change the types of "read_hook" and "write_hook"
17180         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
17181         (grub_register_variable_hook): Likewise.
17183         * include/grub/device.h (grub_device_set_root): Removed.
17184         (grub_device_set_root): Likewise.
17186         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
17187         make sure that DIRNAME terminates with '/', so that
17188         grub_fat_find_dir will fail if PATH is not a directory.
17190         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
17191         from DIRNAME.
17192         Use the qualifier auto for print_files and print_files_long.
17193         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
17194         as a regular file.
17195         Put a newline only if there is no error.
17196         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
17197         used.
17199 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17201         * kern/partition.c (grub_partition_probe): Initialize PART to
17202         NULL. Otherwise, when no partition map is registered, this returns
17203         a garbage.
17205 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
17207         * partmap/apple.c (apple_partition_map_iterate): Check if POS
17208         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
17209         valid.
17211 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
17213         * commands/ls.c (grub_ls_list_disks): Print the filesystem
17214         information on each device, if it does not have partitions. Print
17215         "Device" instead of "Disk", because this function is not specific
17216         to disk devices.
17218         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
17219         static to ensure that it is put on the memory rather than a
17220         register.
17222 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17224         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
17225         (grub_cat_init): Likewise.
17226         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
17227         (options): Likewise.
17228         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
17229         (grub_configfile_init): Likewise.
17230         * font/manager.c (GRUB_MOD_INIT): Likewise.
17231         * commands/help.c (GRUB_MOD_INIT): Likewise.
17232         (grub_help_init): Likewise.
17233         * normal/command.c (grub_command_init): Likewise.
17234         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
17235         * disk/loopback.c (grub_loop_init): Likewise.
17236         (GRUB_MOD_INIT): Likewise.
17237         * commands/ls.c (grub_ls_init): Likewise.
17238         (GRUB_MOD_INIT): Likewise.
17239         (options): Likewise.
17240         * commands/boot.c (grub_boot_init): Likewise.
17241         (GRUB_MOD_INIT): Likewise.
17242         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
17243         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
17244         (GRUB_MOD_INIT): Likewise.
17245         * commands/cmp.c (grub_cmp_init): Likewise.
17246         (GRUB_MOD_INIT): Likewise.
17248         * normal/arg.c: Use <> instead of "" to include header files.
17249         (SHORT_ARG_HELP): New macro.
17250         (SHORT_ARG_USAGE): Likewise.
17251         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
17252         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
17253         descriptions.
17254         (find_short): Check if C is 'h' or 'u' explicitly.
17255         (grub_arg_show_help): Use space characters instead of tabs. Treat
17256         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
17257         are shown with --help and --usage only if they are not used for
17258         the command itself.
17259         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
17260         'h' and 'u'.
17262         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
17263         const into "longarg". Change the type of "shortarg" to int.
17265 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17267         * boot/i386/pc/boot.S (boot_drive_check): New label.
17269         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
17270         macro.
17272         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
17273         which do not pass a boot drive correctly. Copied from GRUB Legacy.
17275 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17277         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
17278         When turning off Gate A20, skip the check and return immediately,
17279         because this is not fatal usually.
17281 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17283         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
17284         be 0x7C00 instead of 0x8000.
17286         * boot/i386/pc/pxeboot.S: Rewritten.
17288         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
17289         EXT_C.
17290         (gate_a20_check_state): Read a byte from 0x108000. Invert the
17291         result.
17293 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
17295         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
17296         robustness. This routine now supports a BIOS call and System
17297         Control Port A to modify the gate A20.
17299         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17300         Increased to 0x440.
17302 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
17304         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
17305         device path and resulting ihandle.
17306         (grub_ofdisk_close): dprintf the ihandle being closed.
17307         (grub_ofdisk_read): dprintf function parameters.
17308         * kern/mm.c (grub_mm_init_region): Likewise.
17309         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
17310         (grub_linux_boot): dprintf the Linux entry point, initrd address and
17311         size, and boot arguments.
17312         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
17313         before loading into memory.
17314         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
17315         before loading into memory.
17317 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
17319         * kern/mm.c: Added much documentation.
17320         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
17321         8, set to 5 instead of 8.
17323 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17325         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
17327         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
17328         (grub_mkdevicemap_SOURCES): New variable.
17330         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
17331         lib/device.c of GRUB Legacy.
17333 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17335         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
17336         instead of PATH is NULL.
17338 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
17340         * commands/cmp.c (BUFFER_SIZE): New macro.
17341         (grub_cmd_cmp): Close the right file at the right time.  Compare
17342         only data just read.  Don't report files of different  size as
17343         identical.  Dynamically allocate buffers.  Move variable
17344         declarations at the beginning of function.
17346 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
17348         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
17349         reverse.
17351 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
17353         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
17354         when backspace is pressed at beginning of line.
17356 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
17358         * DISTLIST: Added genfslist.sh.
17360         * normal/main.c (fs_module_list): New variable.
17361         (autoload_fs_module): New function.
17362         (read_fs_list): Likewise.
17363         (grub_normal_execute): Call read_fs_list.
17365         * kern/fs.c (grub_fs_autoload_hook): New variable.
17366         (grub_fs_probe): Added support for auto-loading.
17368         * include/grub/normal.h (struct grub_fs_module_list): New struct.
17369         (grub_fs_module_list_t): New type.
17371         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
17372         (grub_fs_autoload_hook): New prototype.
17374         * genfslist.sh: New file.
17376         * genmk.rb: Added a rule to generate a filesystem list.
17378 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
17380         * configure.ac: Fix the test for cross-compiling.
17382         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
17383         define GRUB_UTIL anymore.
17385         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
17386         so this function works on other systems than just big endian.
17387         (load_modules): Likewise.
17388         (add_segments): Likewise.
17390 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
17392         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
17393         contains `l' modifier, get a long from va_arg().
17395 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
17397         * kern/mm.c (grub_free): If the next free block which is being
17398         merged is the first free block, set the first block to the block
17399         being freed.
17400         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
17402 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17404         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
17405         `grub_ieee1275_chosen'.
17407 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17409         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
17410         (grub_ieee1275_chosen): New variable.
17411         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
17412         `chosen'.
17413         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
17414         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17415         Rename first argument to `phandle' for consistency.
17416         (grub_ieee1275_get_property_length): Likewise.
17417         (grub_ieee1275_next_property): Likewise.  Change type of first argument
17418         to grub_ieee1275_phandle_t.
17419         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
17420         Move export next to declaration.
17421         (grub_ieee1275_chosen): New variable.
17422         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
17423         Correct cosmetic typo.
17424         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
17425         `grub_ieee1275_chosen'.
17426         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
17427         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
17428         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
17429         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
17430         `grub_ieee1275_chosen'.
17432 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
17434         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
17435         /chosen/bootargs.
17436         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
17437         /chosen/bootargs as "variable=value" pairs.
17439 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
17441         * include/grub/misc.h (grub_dprintf): New macro.
17442         (grub_real_dprintf): New prototype.
17443         (grub_strword): Likewise.
17444         (grub_iswordseparator): Likewise.
17445         * kern/misc.c (grub_real_dprintf): New function.
17446         (grub_strword): Likewise.
17447         (grub_iswordseparator): Likewise.
17449 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
17451         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
17452         (roundup): Remove macro.
17453         (grub_ieee1275_flags): Make static.
17454         (grub_ieee1275_realmode): Remove.
17455         (grub_ieee1275_test_flag): New function.
17456         (grub_ieee1275_set_flag): Likewise.
17457         (find_options): Rename to `grub_ieee1275_find_options'; update
17458         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
17459         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
17460         (cmain): New prototype.
17461         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
17462         `grub_ieee1275_flags' directly.
17463         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
17464         machine/biosdisk.h.
17465         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
17466         Don't include grub/machine/init.h.
17467         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
17468         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17469         Remove prototype.
17470         (grub_ieee1275_realmode): Likewise.
17471         (grub_ieee1275_flag): New enum.
17472         (grub_ieee1275_test_flag): New prototype.
17473         (grub_ieee1275_set_flag): New prototype.
17474         * include/grub/powerpc/ieee1275/init.h: Remove file.
17475         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
17476         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
17477         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
17478         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
17479         comment.
17480         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
17481         `grub_ieee1275_test_flag'.
17482         (grub_ieee1275_encode_devname): Likewise.
17484 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
17486         * include/grub/powerpc/ieee1275/ieee1275.h
17487         (grub_ieee1275_encode_devname): New prototype.
17488         (grub_ieee1275_get_filename): Likewise.
17489         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
17490         function.
17491         (grub_set_prefix): Likewise.
17492         (grub_machine_init): Call grub_set_prefix.
17493         * kern/powerpc/ieee1275/openfw.c: Fix typos.
17494         (grub_parse_type): New enum.
17495         (grub_ieee1275_get_devargs): New function.
17496         (grub_ieee1275_get_devname): Likewise.
17497         (grub_ieee1275_parse_args): Likewise.
17498         (grub_ieee1275_get_filename): Likewise.
17499         (grub_ieee1275_encode_devname): Likewise.
17501 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
17503         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
17504         `grub_loader_unset'.
17506 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
17508         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
17509         instead of grub_ieee1275_interpret.
17510         (grub_halt_init): New function.
17511         (grub_halt_fini): Likewise.
17512         (GRUB_MOD_INIT): Correct message grammar.
17513         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
17514         instead of grub_ieee1275_interpret.
17515         (grub_reboot_init): New function.
17516         (grub_reboot_fini): Likewise.
17517         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
17518         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
17519         util/i386/pc/misc.c with commands/ieee1275/halt.c,
17520         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
17521         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
17522         function.
17523         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
17524         Add prototype.
17525         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
17526         prototype.
17527         (grub_halt): Likewise.
17528         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
17529         (cmain): Remove __attribute__((unused)).
17530         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
17531         (grub_heap_len): Likewise.
17532         (grub_machine_fini): New function.
17533         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
17534         (grub_halt): Likewise.
17535         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
17536         function.
17537         * util/powerpc/ieee1275/misc.c: New file.
17539 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
17541         * DISTLIST: New file.
17542         * gendistlist.sh: Likewise.
17544         * Makefile.in (COMMON_DISTFILES): Removed.
17545         (BOOT_DISTFILES): Likewise.
17546         (CONF_DISTFILES): Likewise.
17547         (DISK_DISTFILES): Likewise.
17548         (FS_DISTFILES): Likewise.
17549         (INCLUDE_DISTFILES): Likewise.
17550         (KERN_DISTFILES): Likewise.
17551         (LOADER_DISTFILES): Likewise.
17552         (TERM_DISTFILES): Likewise.
17553         (UTIL_DISTFILES): Likewise.
17554         (DISTFILES): Likewise.
17555         (uninstall): Uninstall files in $(pkgdata_DATA).
17556         (DISTLIST): New target.
17557         (distdir): Use the contents of the file DISTLIST to get a list of
17558         distributed files.
17560 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
17562         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
17563         descriptor. This is ported from GRUB Legacy.
17565         * gencmdlist.sh: Added an extra semicolon to make it work with
17566         old sed versions. Reported by Robert Bihlmeyer
17567         <robbe@orcus.priv.at>.
17569 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
17571         Automatic loading of commands is supported.
17573         * normal/main.c (read_command_list): New function.
17574         (grub_normal_execute): Call read_command_list.
17576         * normal/command.c (grub_register_command): Return zero or CMD.
17577         Allocate CMD->NAME from the heap.
17578         Initialize CMD->MODULE_NAME to zero.
17579         Find the same name as well. If the same command is found and it is
17580         a dummy command, overwrite members. If it is not a dummy command,
17581         return zero.
17582         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
17583         (grub_command_find): If a dummy command is found, load a module
17584         and retry to find a command only once.
17586         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
17587         make sure that each command is loaded.
17589         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
17590         macro.
17591         (struct grub_command): Remove const from the member `name'.
17592         Add a new member `module_name'.
17593         (grub_register_command): Return grub_command_t.
17595         * commands/help.c (grub_cmd_help): Call grub_command_find to make
17596         sure that each command is loaded.
17598         * genmk.rb (PModule::rule): Specify a module name without the
17599         suffix ".mod" to gencmdlist.sh.
17601 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17603         * gencmdlist.sh: New file.
17605         * genmk.rb (PModule::rule): Generate a rule for a command list.
17606         Clean command.lst.
17607         Generate command.lst from $(COMMANDFILES).
17609         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
17610         (DATA): Added $(pkgdata_DATA).
17611         (install-local): Install files in $(pkgdata_DATA).
17613 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17615         * term/i386/pc/vga.c (debug_command): Removed.
17616         (GRUB_MOD_INIT): Do not register the command "debug".
17618         From Hollis Blanchard:
17619         * commands/configfile.c: New file.
17620         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17621         commands/configfile.c.
17622         (pkgdata_MODULES): Added configfile.mod.
17623         (configfile_mod_SOURCES): New variable.
17624         (configfile_mod_CFLAGS): Likewise.
17625         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17626         commands/configfile.c.
17627         (pkgdata_MODULES): Added configfile.mod.
17628         (configfile_mod_SOURCES): New variable.
17629         (configfile_mod_CFLAGS): Likewise.
17630         * util/grub-emu.c (main): Call grub_configfile_init and
17631         grub_configfile_fini.
17632         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
17633         prototype.
17634         [GRUB_UTIL] (grub_configfile_fini): Likewise.
17636 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17638         * normal/arg.c (grub_arg_show_help): Do not show the bug report
17639         address.
17641         * commands/help.c (grub_cmd_help): Do not print newlines after
17642         the last command in print_command_help.
17644 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17646         * commands/default.h: New file.
17647         * commands/timeout.h: Likewise.
17648         * normal/context.c: Likewise.
17650         * util/misc.c: Do not include sys/times.h.
17651         Include sys/time.h and grub/machine/time.h.
17652         (grub_get_rtc): Rewritten with gettimeofday.
17654         * util/grub-emu.c (main): Call grub_default_init and
17655         grub_timeout_init before grub_normal_init, and call
17656         grub_timeout_fini and grub_default_fini after grub_main.
17658         * util/console.c (grub_ncurses_checkkey): Return the read
17659         character or -1.
17661         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
17662         timeouts.
17664         * normal/main.c (read_config_file): Push MENU. If this fails,
17665         print an error and wait for a user input.
17666         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
17667         If a menu is empty or an error occurs, pop MENU.
17668         (grub_normal_execute): Pop and free MENU after grub_menu_run
17669         returns.
17671         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
17673         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
17674         include time.h.
17675         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17676         without GRUB_UTIL.
17677         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
17678         time.h.
17679         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17680         without GRUB_UTIL.
17682         * include/grub/normal.h (struct grub_menu_list): New struct.
17683         (grub_menu_list_t): New type.
17684         (struct grub_context): New struct.
17685         (grub_context_t): New type.
17686         (grub_register_command): Got rid of EXPORT_FUNC.
17687         (grub_unregister_command): Likewise.
17688         (grub_context_get): New prototype.
17689         (grub_context_get_current_menu): Likewise.
17690         (grub_context_push_menu): Likewise.
17691         (grub_context_pop_menu): Likewise.
17692         [GRUB_UTIL] (grub_default_init): Likewise.
17693         [GRUB_UTIL] (grub_default_fini): Likewise.
17694         [GRUB_UTIL] (grub_timeout_init): Likewise.
17695         [GRUB_UTIL] (grub_timeout_fini): Likewise.
17697         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
17698         commands/timeout.c and normal/context.c.
17699         (pkgdata_MODULES): Added default.mod and timeout.mod.
17700         (normal_mod_SOURCES): Added normal/context.c.
17701         (default_mod_SOURCES): New variable.
17702         (default_mod_CFLAGS): Likewise.
17703         (timeout_mod_SOURCES): Likewise.
17704         (timeout_mod_CFLAGS): Likewise.
17705         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
17706         conf/i386-pc.rmk.
17707         (pkgdata_MODULES): Added default.mod and timeout.mod.
17708         (normal_mod_SOURCES): Added normal/context.c.
17709         (default_mod_SOURCES): New variable.
17710         (default_mod_CFLAGS): Likewise.
17711         (timeout_mod_SOURCES): Likewise.
17712         (timeout_mod_CFLAGS): Likewise.
17714         * Makefile.in (all-local): Added $(MKFILES).
17716 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
17718         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
17719         (grub_emu_SOURCES): Likewise.
17720         (pkgdata_MODULES): Add `sun.mod'.
17721         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17722         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17723         `partmap/sun.c'.
17724         (pkgdata_MODULES): Add `sun.mod'.
17725         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17726         * include/grub/partition.h (grub_sun_partition_map_init): New
17727         prototype.
17728         (grub_sun_partition_map_fini): Likewise.
17729         * partmap/sun.c: New file.
17730         * util/grub-emu.c (main): Initialize and de-initialize the sun
17731         partitionmap support.
17733 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
17735         This implements an Emacs-like menu entry editor.
17737         * normal/menu_entry.c: New file.
17739         * util/console.c (grub_ncurses_putchar): Translate some Unicode
17740         characters to ASCII.
17741         (saved_char): New variable.
17742         (grub_ncurses_checkkey): Rewritten completely.
17743         (grub_ncurses_getkey): Likewise.
17744         (grub_ncurses_init): Call raw instead of cbreak.
17746         * normal/menu.c (print_entry): Do not put a space.
17747         (init_page): Renamed to ...
17748         (grub_menu_init_page): ... this. All callers changed.
17749         (edit_menu_entry): Removed.
17750         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
17752         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
17754         * kern/misc.c (grub_vprintf): Call grub_refresh.
17756         * normal/menu.c (DISP_LEFT): Renamed to ...
17757         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
17758         * normal/menu.c (DISP_UP): Renamed to ...
17759         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
17760         * normal/menu.c (DISP_RIGHT): Renamed to ...
17761         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
17762         * normal/menu.c (DISP_DOWN): Renamed to ...
17763         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
17764         * normal/menu.c (DISP_HLINE): Renamed to ...
17765         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
17766         * normal/menu.c (DISP_VLINE): Renamed to ...
17767         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
17768         * normal/menu.c (DISP_UL): Renamed to ...
17769         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
17770         * normal/menu.c (DISP_UR): Renamed to ...
17771         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
17772         * normal/menu.c (DISP_LL): Renamed to ...
17773         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
17774         * normal/menu.c (DISP_LR): Renamed to ...
17775         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
17776         * normal/menu.c (TERM_WIDTH): Renamed to ...
17777         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
17778         * normal/menu.c (TERM_HEIGHT): Renamed to ...
17779         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
17780         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
17781         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
17782         * normal/menu.c (TERM_MARGIN): Renamed to ...
17783         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
17784         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
17785         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
17786         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
17787         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
17788         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
17789         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
17790         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
17791         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
17792         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
17793         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
17794         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
17795         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
17796         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
17797         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
17798         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
17799         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
17800         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
17801         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
17802         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
17803         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
17804         All callers changed.
17806         * include/grub/normal.h: New prototype.
17808         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17809         normal/menu_entry.c.
17810         (normal_mod_SOURCES): Likewise.
17811         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17812         (normal_mod_SOURCES): Likewise.
17814 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
17816         * include/grub/normal.h (grub_halt_init): New prototype.
17817         (grub_halt_fini): Likewise.
17818         (grub_reboot_init): Likewise.
17819         (grub_reboot_fini): Likewise.
17821         * util/grub-emu.c: Include signal.h.
17822         (main_env): New global variable.
17823         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
17824         catch C-c.
17825         (grub_machine_fini): New function.
17826         (main): Call grub_halt_init and grub_reboot_init before
17827         grub_main, and grub_reboot_fini and grub_halt_fini after it.
17828         Call setjmp with MAIN_ENV to go back afterwards.
17829         Call grub_machine_fini right before return.
17831         * include/grub/util/misc.h: Include setjmp.h.
17832         (main_env): New prototype.
17834         * include/grub/kernel.h (grub_machine_fini): New prototype.
17835         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
17836         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
17838         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
17839         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
17840         * term/i386/pc/console.c (grub_console_fini): Likewise.
17842         * util/i386/pc/misc.c: New file.
17844         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17845         util/i386/pc/misc.c, commands/i386/pc/halt.c and
17846         commands/i386/pc/reboot.c.
17848 2005-02-14  Guillem Jover  <guillem@hadrons.org>
17850         * include/grub/dl.h (grub_dl_check_header): New prototype.
17851         (grub_arch_dl_check_header): Change return type to grub_err_t,
17852         remove size parameter and export function.  Update all callers.
17853         * kern/dl.c (grub_dl_check_header): New function.
17854         (grub_dl_load_core): Use `grub_dl_check_header' instead of
17855         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
17856         are inside the core.
17857         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
17858         independent ELF header checks.
17859         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17860         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
17861         `grub_dl_check_header' instead of explicit checks.  Check for the
17862         ELF type.
17863         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
17864         `grub_dl_check_header' instead of explicit checks.  Remove arch
17865         specific ELF header checks.
17867         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
17868         argument SIZE.
17870 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
17872         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
17873         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
17875 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
17877         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
17878         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
17879         (part_map_iterate): Clear `grub_errno' and return 0 if
17880         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
17881         * partmap/amiga.c (amiga_partition_map_iterate): Return
17882         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
17883         * partmap/apple.c (apple_partition_map_iterate): Likewise.
17885 2005-02-01  Guillem Jover  <guillem@hadrons.org>
17887         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
17888         help info.
17890 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17892         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
17893         Removed prototype.
17894         (grub_rescue_cmd_linux): New prototype.
17895         (grub_rescue_cmd_initrd): Likewise.
17896         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
17897         `bi_rec'.
17898         (grub_linux_release_mem): Release the memory for the initrd.
17899         (grub_load_linux): Renamed from this...
17900         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
17901         Changed `entry' not to be static.  Loop over memory regions to
17902         find another one when the default fails.
17903         (grub_rescue_cmd_initrd): New function.
17904         (grub_linux_init): Remove function.
17905         (grub_linux_fini): Likewise.
17906         (GRUB_MOD_INIT): Register `initrd'.
17907         (GRUB_MOD_FINI): Unregister `initrd'.
17908         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
17909         Function removed.
17910         (grub_linux_normal_fini): Likewise.
17911         (GRUB_MOD_INIT): Register `initrd'.
17912         (GRUB_MOD_FINI): Unregister `initrd'.
17914 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17916         * commands/help.c: New file.
17917         * normal/arg.c (show_help): Renamed to...
17918         (grub_arg_show_help): ... this.
17919         * commands/i386/pc/halt.c: New file.
17920         * commands/i386/pc/reboot.c: Likewise.
17921         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
17922         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
17923         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
17924         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
17925         variables.
17926         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17927         `commands/help.c'.
17928         (pkgdata_MODULES): Add `help.mod'.
17929         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
17930         * grub/i386/pc/init.h (grub_reboot): New prototype.
17931         (grub_halt): Likewise.
17932         * include/grub/normal.h (grub_arg_show_help): New prototype.
17933         (grub_help_init): Likewise.
17934         (grub_help_fini): Likewise.
17935         * util/grub-emu.c (main): Initialize and deinitialize the help
17936         command.
17938         * normal/cmdline.c (grub_cmdline_get): Doc fix.
17940         * normal/command.c (grub_command_init): Fixed the description of
17941         the `set' and `unset' commands.
17943 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17945         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
17946         function.
17947         * commands/ieee1275/halt.c: New file.
17948         * commands/ieee1275/reboot.c: Likewise.
17949         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
17950         `__attribute__ ((unused))'.  Some GCS related fixed.
17951         (grub_suspend_init) [GRUB_UTIL]: Function removed.
17952         (grub_suspend_fini): Likewise.
17953         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
17954         and `halt.mod'.
17955         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
17956         (halt_mod_CFLAGS): New variables.
17957         * include/grub/powerpc/ieee1275/ieee1275.h
17958         (grub_ieee1275_interpret): New prototype.
17960 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
17962         * include/grub/misc.h (memmove): New prototype.
17963         (memcpy): Likewise.
17965 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
17967         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
17968         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
17970 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
17972         * kern/misc.c (grub_strndup): Function rewritten.
17974 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
17976         * normal/menu.c (TERM_WIDTH): Macro redefined.
17977         (TERM_TOP_BORDER_Y): Likewise.
17978         (draw_border): Replaced while-loop by a for-loop.  Make the number
17979         of lines consistent with the number of lines displayed in
17980         print_entries.  Added a margin below the rectangle.
17981         (print_entry): Make the entry fit in the rectangle.
17982         (print_entries): Display the scroll arrows next to the right
17983         border.
17985 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17987         * fs/minix.c (grub_minix_find_file): Reserve more space for
17988         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
17989         `grub_strncpy' to copy `path' into it.
17991 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17993         Add the loopback device, a device via which files can be accessed
17994         as devices.
17996         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
17997         (pkgdata_MODULES): Add loopback.mod.
17998         (loopback_mod_SOURCES): New variable.
17999         (loopback_mod_CFLAGS): Likewise.
18000         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18001         `disk/loopback.c'.
18002         (pkgdata_MODULES): Add loopback.mod.
18003         (loopback_mod_SOURCES): New variable.
18004         (loopback_mod_CFLAGS): Likewise.
18005         * disk/loopback.c: new file.
18006         * include/grub/normal.h (grub_loop_init): New prototype.
18007         (grub_loop_fini): New prototype.
18008         * util/grub-emu.c (main): Initialize and de-initialize loopback
18009         support.
18010         * include/grub/disk.h (grub_disk_dev_id): Add
18011         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
18013 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
18015         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
18016         function.
18017         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
18018         (suspend_mod_SOURCES): New variable.
18019         (suspend_mod_CFLAGS): Likewise.
18020         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
18021         New prototype.
18022         * commands/ieee1275/suspend.c: New file.
18024 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
18026         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
18027         ((unused))' to `__attribute__ ((used))'.
18028         (GRUB_MOD_FINI): Likewise.
18029         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
18030         * genmk.rb (PModule): Assign space to common symbols when linking
18031         modules.
18033 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
18035         * include/grub/mm.h (grub_mm_init_region): Change the type of the
18036         `unsigned' arguments to `grub_size_t'.
18037         (grub_malloc): Likewise.
18038         (grub_realloc): Likewise.
18039         (grub_memalign): Likewise.
18040         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
18041         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18042         * util/misc.c (grub_malloc): Likewise.
18043         (grub_realloc): Likewise.
18044         * kern/mm.c (get_header_from_pointer): Change the casts to
18045         `unsigned' into a cast to `grub_size_t'.
18047         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
18048         point to `currnode' when `currnode' is changed.
18050         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
18051         Schottelius <nico-linux@schottelius.org>.
18053 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
18055         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
18056         (note_path): Remove variable.
18057         (GRUB_IEEE1275_NOTE_NAME): New macro.
18058         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
18059         (grub_ieee1275_note_hdr): New structure.
18060         (grub_ieee1275_note_desc): Likewise.
18061         (grub_ieee1275_note): Likewise.
18062         (load_note): Remove `dir' argument.  All callers updated.  Remove
18063         `note_img' and `path'.  Do not load a file from `note_path'.
18064         Initialize a struct grub_ieee1275_note and write that to `out'.
18065         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
18067 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
18069         * util/misc.c (grub_util_read_image): Revert last change.  It
18070         called `grub_util_read_at', which seeks from the beginning of the
18071         file.
18073 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
18075         * TODO: Add note about endianness in grub-mkimage.
18076         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
18077         section.
18078         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
18079         (grub_mkimage_SOURCES): New target.
18080         * include/grub/kernel.h (grub_start_addr): Remove variable.
18081         (grub_end_addr): Likewise.
18082         (grub_total_module_size): Likewise.
18083         (grub_kernel_image_size): Likewise.
18084         (GRUB_MODULE_MAGIC): New constant.
18085         (grub_module_info): New structure.
18086         (grub_arch_modules_addr): New prototype.
18087         (grub_get_end_addr): Remove prototype.
18088         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
18089         * include/grub/powerpc/ieee1275/kernel.h: New file.
18090         * include/grub/util/misc.h (grub_util_get_fp_size): New
18091         prototype.
18092         (grub_util_read_at): Likewise.
18093         (grub_util_write_image_at): Likewise.
18094         * kern/main.c (grub_get_end_addr): Remove function.
18095         (grub_load_modules): Call grub_arch_modules_addr instead of using
18096         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
18097         the grub_module_info fields instead of calling grub_get_end_addr
18098         as loop conditions.  Move grub_add_unused_region code here.
18099         (grub_add_unused_region): Remove function.
18100         * kern/i386/pc/init.c: Include grub/cache.h.
18101         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
18102         one call to add_mem_region.
18103         (grub_arch_modules_addr): New function.
18104         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
18105         (grub_total_module_size): Likewise.
18106         Include grub/machine/kernel.h.
18107         (grub_arch_modules_addr): New function.
18108         * util/grub-emu.c (grub_end_addr): Remove variable.
18109         (grub_total_module_size): Likewise.
18110         (grub_arch_modules_addr): New function.
18111         * util/misc.c: Include unistd.h.
18112         (grub_util_get_fp_size): New function.
18113         (grub_util_read_at): Likewise.
18114         (grub_util_write_image_at): Likewise.
18115         (grub_util_read_image): Call grub_util_read_at.
18116         (grub_util_write_image): Call grub_util_write_image_at.
18117         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
18118         additional memory in kernel_img for a struct grub_module_info.
18119         Fill in that grub_module_info.
18120         * util/powerpc/ieee1275/grub-mkimage.c: New file.
18122 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18124         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
18125         New function.
18126         * include/grub/powerpc/ieee1275/ieee1275.h
18127         (grub_ieee1275_milliseconds): New prototype.
18128         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
18129         Change to 1000.
18130         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
18131         grub_ieee1275_milliseconds.
18133 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18135         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
18136         variable.
18137         (find_options): New function.
18138         (cmain): Call find_options.
18139         * include/grub/powerpc/ieee1275/ieee1275.h
18140         (grub_ieee1275_realmode): New extern variable.
18141         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
18142         grub_map if grub_ieee1275_realmode is false.
18144 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
18146         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
18147         lines are inserted and make it work like readline.  Reported by
18148         Vincent Pelletier <subdino2004@yahoo.fr>.
18150 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
18152         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
18154         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
18155         `kern/powerpc/cache.S'.
18157 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
18159         * genmk.rb: Handle the `Program' class in the main loop.  Written
18160         by Johan Rydberg <jrydberg@gnu.org>.
18161         (Program): New class.
18162         (programs): New variable.
18163         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
18164         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
18165         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
18166         (help_arch): Function removed.
18167         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
18168         `powerpc/libgcc.h' and `loader.h'.
18169         (pkgdata_PROGRAMS): New variable.
18170         (sbin_UTILITIES): Variable removed.
18171         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
18172         (grubof_SOURCES): Variable re-defined so it only includes the
18173         core functionality.
18174         (grubof_CFLAGS): Remove `-DGRUBOF'.
18175         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
18176         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
18177         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
18178         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
18179         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
18180         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
18181         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
18182         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
18183         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
18184         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
18185         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
18186         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
18187         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
18188         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
18189         (pc_mod_CFLAGS): New variables.
18190         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
18191         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
18192         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
18193         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
18194         Moved from here...
18195         * include/grub/i386/pc/init.h (grub_os_area_addr)
18196         (rub_os_area_size): ... to here.
18197         * include/grub/powerpc/ieee1275/ieee1275.h
18198         (grub_ieee1275_entry_fn): Export symbol.
18199         * include/grub/powerpc/ieee1275/init.h: New file.
18200         * include/grub/powerpc/libgcc.h: Likewise.
18201         * include/grub/cache.h: Likewise.
18202         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
18203         <hollis@penguinppc.org>.
18204         * kern/dl.c: Include <grub/cache.h>.
18205         (grub_dl_flush_cache): New function.
18206         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
18207         for this module.
18208         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
18209         (grub_console_init): Removed prototypes.
18210         (grub_machine_init): Don't initialize the modules anymore.
18211         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
18212         static.
18213         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
18214         Macro undef removed.
18215         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
18216         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
18217         relocation `R_PPC_REL32'.  Return an error when the relocation is
18218         unknown.
18219         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
18220         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
18221         * util/misc.c (grub_arch_sync_caches): Likewise.
18223 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
18225         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
18226         `symlist.c', add `grubof_symlist.c'.
18227         (symlist.c): Variable removed.
18228         (grubof_HEADERS): Variable added.
18229         (grubof_symlist.c): New target.
18230         (kernel_syms.lst): Use `grubof_HEADERS' instead of
18231         `kernel_img_HEADERS'.
18232         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
18233         * kern/powerpc/dl.c: New file.
18234         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
18235         Function removed.
18236         (grub_arch_dl_relocate_symbols): Likewise.
18237         (grub_register_exported_symbols): Likewise.
18239 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
18241         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
18242         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
18243         to fail instead.  Reported by Vincent Pelletier
18244         <subdino2004@yahoo.fr>.
18246         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
18247         it is not allocated.  Reported by Vincent Pelletier
18248         <subdino2004@yahoo.fr>.
18250         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
18251         output so the output looks better.
18253 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
18255         Modulize the partition map support and add support for the amiga
18256         partition map.
18258         * commands/ls.c: Include <grub/partition.h> instead of
18259         <grub/machine/partition.h>.
18260         * kern/disk.c: Likewise.
18261         * kern/rescue.c: Likewise.
18262         * loader/i386/pc/chainloader.c: Likewise.
18263         * normal/cmdline.c: Likewise.
18264         * kern/powerpc/ieee1275/init.c: Likewise.
18265         (grub_machine_init): Call `grub_pc_partition_map_init',
18266         `grub_amiga_partition_map_init' and
18267         `grub_apple_partition_map_init'.
18268         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
18269         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
18270         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
18271         `partition.h' and `pc_partition.h'.
18272         (grub_setup_SOURCES): Remove
18273         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
18274         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18275         (grub_emu_SOURCES): Likewise.
18276         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
18277         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
18278         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
18279         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18280         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
18281         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18282         (grubof_SOURCES): Likewise.
18283         * disk/i386/pc/partition.c: File removed.
18284         * disk/powerpc/ieee1275/partition.c: Likewise.
18285         * include/grub/powerpc/ieee1275/partition.h: Likewise.
18286         * include/grub/i386/pc/partition.h: Likewise.
18287         * kern/partition.c: New file.
18288         * partmap/amiga.c: Likewise.
18289         * partmap/apple.c: Likewise.
18290         * partmap/pc.c: Likewise.
18291         * include/grub/partition.h: Likewise..
18292         * include/grub/pc_partition.h: Likewise.
18293         * util/grub-emu.c: Include <grub/partition.h> instead of
18294         <grub/machine/partition.h>.
18295         (main): Call `grub_pc_partition_map_init',
18296         `grub_amiga_partition_map_init' and
18297         `grub_apple_partition_map_init' and deinitialize afterwards.
18298         * util/i386/pc/biosdisk.c: Include `#include
18299         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18300         `<grub/machine/partition.h>'.
18301         * util/i386/pc/grub-setup.c: Likewise.
18302         * util/i386/pc/biosdisk.c: Likewise.
18303         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
18304         partition information in case of a PC partition.
18305         * util/i386/pc/grub-setup.c: Include `#include
18306         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18307         `<grub/machine/partition.h>'.
18308         (setup): Only access the PC specific partition information in case
18309         of a PC partition.
18311 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
18313         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
18314         (grub_longjmp): Likewise.
18315         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
18316         20.
18317         * normal/powerpc/setjmp.S: New file.
18318         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18319         `normal/powerpc/setjmp.S'.
18320         (grubof_CFLAGS): Add `-DGRUBOF'.
18321         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
18322         [GRUB_UTIL && !GRUBOF].
18324 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
18326         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
18327         property named `name'.  Correctly handle the error returned by
18328         `grub_ieee1275_finddevice' if a device can not be opened.
18330 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
18332         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
18333         `actual' for negativity.
18334         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18335         kern/fshelp.c.
18337 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18339         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
18340         (PAGE_OFFSET): New macro.
18341         (CRTC_ADDR_PORT): Likewise.
18342         (CRTC_DATA_PORT): Likewise.
18343         (START_ADDR_HIGH_REGISTER): Likewise.
18344         (START_ADDR_LOW_REGISTER): Likewise.
18345         (GRAPHICS_ADDR_PORT): Likewise.
18346         (GRAPHICS_DATA_PORT): Likewise.
18347         (READ_MAP_REGISTER): Likewise.
18348         (INPUT_STATUS1_REGISTER): Likewise.
18349         (INPUT_STATUS1_VERTR_BIT): Likewise.
18350         (page): New variable.
18351         (wait_vretrace): New function.
18352         (set_read_map): Likewise.
18353         (set_start_address): Likewise.
18354         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
18355         the right page.
18356         (check_vga_mem): Take the page into account.
18357         (write_char): Likewise.
18358         (write_cursor): Likewise.
18359         (scroll_up): Likewise.  Copy the page to the page that is not
18360         shown and switch between both pages.
18361         (grub_vga_putchar): Fix off by one error.
18362         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
18363         account.
18365 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18367         Add support for iso9660 (including rockridge).
18369         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18370         (iso9660_mod_SOURCES): New variable.
18371         (iso9660_mod_CFLAGS): Likewise.
18372         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18373         * include/grub/fs.h (grub_iso9660_init): New prototype.
18374         * util/grub-emu.c (main): Call `grub_iso9660_init'.
18375         * fs/iso9660.c: New file.
18377         * include/grub/misc.h (grub_strncat): New prototype.
18378         * kern/misc.c (grub_strncat): New function.
18380         * fs/hfs.c (grub_hfs_mount): Translate the error
18381         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
18382         * fs/jfs.c (grub_jfs_mount): Likewise.
18383         * fs/ufs.c (grub_ufs_mount): Likewise.
18385 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
18387         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
18388         which initialized BAT registers.
18389         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
18390         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18391         Move from here...
18392         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
18393         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18394         ... to here.
18395         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
18396         (grub_mapclaim): Likewise.
18397         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
18398         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
18399         hand.
18401 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
18403         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
18404         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
18405         -ffreestanding and -msoft-float.
18407 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
18409         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
18410         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
18411         set in grub_ieee1275_flags.
18413 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
18415         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
18416         prototype.
18417         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
18418         grub_console_init first.
18419         Change the memory range used for grub_ieee1275_claim and
18420         grub_mm_init_region.
18421         Print an error message if the claim fails.
18422         Include <grub/misc.h>.
18424 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
18426         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
18427         Call grub_children_iterate for device nodes of type `scsi',
18428         `ide', or `ata'.
18429         (grub_ofdisk_open): Remove manual device alias resolution.
18430         Fix memory leak when device cannot be opened.
18431         * include/grub/powerpc/ieee1275/ieee1275.h
18432         (grub_children_iterate): New prototype.
18433         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
18434         New function.
18435         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18436         Return -1 if args.size was -1.
18438 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18440         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
18441         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
18442         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
18443         Open Firmware's memory for it; claim memory from _start to _end.
18444         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
18445         (_end): New extern.
18446         (_start): Zero BSS from __bss_start to _end.
18447         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18448         New extern.
18449         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
18451 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18453         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
18454         -1 if args.base was -1.
18456 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
18458         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
18459         escape sequence instead of a literal ^L. Also call
18460         grub_ofconsole_gotoxy.
18462 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
18464         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
18465         void *  arguments to grub_addr_t.  All callers updated.  Also make
18466         the `result' argument optional.
18467         (grub_ieee1275_release): change void * arguments to grub_addr_t.
18468         All callers updated.
18470 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
18472         * commands/ls.c (grub_ls_list_files): Use the string following the
18473         initial ')', if present, as the filesystem path.
18474         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
18476         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
18478 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
18480         Make the source code of the menu interface more readable.
18482         * normal/menu.c: Include grub/mm.h.
18483         (TERM_WIDTH): New macro.
18484         (TERM_HEIGHT): Likewise.
18485         (TERM_INFO_HEIGHT): Likewise.
18486         (TERM_MARGIN): Likewise.
18487         (TERM_SCROLL_WIDTH): Likewise.
18488         (TERM_TOP_BORDER_Y): Likewise.
18489         (TERM_LEFT_BORDER_X): Likewise.
18490         (TERM_BORDER_WIDTH): Likewise.
18491         (TERM_MESSAGE_HEIGHT): Likewise.
18492         (TERM_BORDER_HEIGHT): Likewise.
18493         (TERM_NUM_ENTRIES): Likewise.
18494         (TERM_FIRST_ENTRY_Y): Likewise.
18495         (TERM_ENTRY_WIDTH): Likewise.
18496         (TERM_CURSOR_X): Likewise.
18497         (draw_border): Use macros instead of magic numbers.
18498         (print_entry): Likewise.
18499         (print_entries): Likewise.
18500         (run_menu): Likewise. Also, handle the key 'e'.
18501         (run_menu_entry): Ignore empty command lines.
18502         (print_message): Added a new argument EDIT. If EDIT is true,
18503         print a different message.
18504         (init_page): Likewise.
18505         (edit_menu_entry): New function. Not implemented yet.
18507 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
18509         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
18510         can be loaded from normal mode.
18512         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
18513         `multiboot.mod'.
18514         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
18515         (multiboot_mod_CFLAGS): New variables.
18516         * loader/i386/pc/linux_normal.c: New file.
18517         * loader/i386/pc/multiboot_normal.c: Likewise.
18519         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
18520         attribute `unused'.
18522         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
18523         `fdiro' to read the mode information from instead of `diro'.
18525         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
18526         looking up a symlink.
18528         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
18529         macro.
18530         * normal/command.c (grub_command_execute): Don't parse the
18531         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
18532         flags of the command.
18534         * normal/menu.c (grub_menu_run): Fix typo.
18536 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
18538         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
18540         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
18541         `y + 1' instead of `y - 1'.
18543         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
18545 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
18547         From Hollis Blanchard <hollis@penguinppc.org>:
18548         * kern/misc.c (memmove): New alias for grub_memmove.
18549         (memcmp): New alias for grub_memcmp.
18550         (memset): New alias for grub_memset.
18551         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18552         Change "int handle" to "grub_ieee1275_phandle_t handle".
18553         * include/grub/powerpc/ieee1275/ieee1275.h
18554         (grub_ieee1275_get_property): Likewise.
18556 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
18558         Added normal mode command `chainloader' as module chain.mod, which
18559         depends on normal.mod and _chain.mod.
18561         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
18562         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
18563         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
18564         Deleted prototype.
18565         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
18566         but arguments parsing moved to ...
18567         (grub_chainloader_cmd): ... here.  New function.
18568         * include/grub/i386/pc/chainloader.h: New file.
18569         * loader/i386/pc/chainloader_normal.c: Likewise.
18571 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
18573         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
18574         (grub_mkimage_LDFLAGS): Likewise.
18575         (grub_emu_SOURCES): Likewise.
18576         (kernel_img_HEADERS): Added fshelp.h.
18577         * fs/ext2.c: Include <grub/fshelp.h>.
18578         (FILETYPE_REG): New macro.
18579         (FILETYPE_INO_REG): Likewise.
18580         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
18581         Changed all users.
18582         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
18583         all users.
18584         (grub_fshelp_node): New struct.
18585         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
18586         to a pointer.
18587         (grub_ext2_get_file_block): Removed function.
18588         (grub_ext2_read_block): New function.
18589         (grub_ext2_read_file): Replaced parameter `data' by `node'.
18590         This function was written.
18591         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
18592         (grub_ext2_find_file): Removed function.
18593         (grub_ext2_read_symlink): New function.
18594         (grub_ext2_iterate_dir): Likewise.
18595         (grub_ext2_open): Rewritten.
18596         (grub_ext2_dir): Rewritten.
18597         * include/grub/fshelp.h: New file.
18598         * fs/fshelp.c: Likewise.
18600 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
18602         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
18603         (print_message): Add a missing newline.
18604         (run_menu): Added timeout support.
18605         (run_menu_entry): New local function.
18606         (grub_menu_run): Added support for booting.
18608         * kern/loader.c (grub_loader_is_loaded): New function.
18610         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
18611         (grub_get_rtc): Exported.
18613         * include/grub/i386/pc/time.h: Include grub/symbol.h.
18614         (grub_get_rtc): Exported.
18616         * include/grub/normal.h (struct grub_command_list): Remove
18617         constant from the member `command'.
18619         * include/grub/loader.h (grub_loader_is_loaded): Declared.
18621         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
18623         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
18625 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
18627         Add support for the JFS filesystem.
18629         * fs/jfs.c: New file.
18630         * include/grub/fs.h (grub_jfs_init): New prototype.
18631         (grub_jfs_fini): New prototype.
18632         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
18633         (grub_emu_SOURCES): Likewise.
18634         (pkgdata_MODULES): Add jfs.mod.
18635         (jfs_mod_SOURCES): New variable.
18636         (jfs_mod_CFLAGS): Likewise.
18637         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
18638         (grubof_SOURCES): Likewise.
18639         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
18641         * fs/fat.c (grub_fat_find_dir): Convert the filename little
18642         endian to the host endian.
18643         (grub_fat_utf16_to_utf8): Move function from there...
18644         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
18645         the endianness of the source string anymore.
18646         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
18648 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
18650         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
18651         (grub_boot_fini) [GRUB_UTIL]: Likewise.
18652         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
18653         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
18655         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
18656         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
18657         for `node_found' and `it_dir'.
18658         (grub_hfs_dir): Add prototype for `dir_hook'.
18660         * fs/minix.c (grub_minix_get_file_block): Add prototype for
18661         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
18662         and `indir32' to silence a gcc warning.
18664         * include/grub/fs.h (grub_hfs_init): New prototype.
18665         (grub_hfs_fini): Likewise.
18668 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
18670         Each disk device has its own id now. This is useful to make use
18671         of multiple disk devices.
18673         * include/grub/disk.h (grub_disk_dev_id): New enum.
18674         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
18675         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
18677         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
18678         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18680         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
18681         GRUB_DISK_DEVICE_OFDISK_ID as an id.
18683         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
18684         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18686         * include/grub/disk.h (struct grub_disk_dev): Added a new member
18687         "id" which is used by the cache manager.
18689         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
18690         of just "GRUB".
18692 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
18694         * fs/hfs.c: New file.
18695         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
18696         (grub_emu_SOURCES): Likewise.
18697         (pkgdata_MODULES): Add hfs.mod.
18698         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
18699         (grubof_SOURCES): Likewise.
18700         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
18702         * include/grub/misc.h (grub_strncasecmp): Add prototype.
18703         * kern/misc.c (grub_strncasecmp): Add function.
18705 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
18707         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
18708         with parentheses.
18710         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
18711         (grub_ext2_dir): In case the directory entry type is unknown, read
18712         it from the inode.
18714 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
18716         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
18717         grub_load_linux instead of grub_rescue_cmd_linux as second
18718         argument of grub_rescue_register_command.
18720         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
18722 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
18724         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
18725         function.
18726         * commands/boot.c: Remove the check for `GRUB_UTIL'.
18727         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18728         `loader/powerpc/ieee1275/linux.c',
18729         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
18730         * include/grub/powerpc/ieee1275/ieee1275.h
18731         (grub_ieee1275_release): New prototype.
18732         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
18733         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
18734         normal, boot, linux and linux_normal.
18735         * loader/powerpc/ieee1275/linux.c: New file.
18736         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
18738 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
18740         * normal/arg.c (grub_arg_parse): Correct error handling after
18741         reallocating the argumentlist (check if `argl' is not null instead
18742         of checking if `args' is not null).
18743         * kern/mm.c (grub_realloc): Return the same pointer when using the
18744         same region, instead of returning the header address.
18746 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18748         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
18749         one block instead of two when looking for the initial partition.
18750         (grub_partition_probe): Initialize the local variable `p' with 0.
18751         Use base 10 for the grub_strtoul call.
18752         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
18753         need for one local variable.
18754         (grub_strtoul): Don't add the new value to `num', instead of that
18755         just assign it.
18757 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18759         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
18760         (pxeboot_img_SOURCES): New variable.
18761         (pxeboot_img_ASFLAGS): Likewise.
18762         (pxeboot_img_LDFLAGS): Likewise.
18763         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
18764         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
18765         <lode_leroy@hotmail.com>.
18767 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18769         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
18770         there was no input.
18772 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18774         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
18775         the history buffer logic.
18777 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18779         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
18780         (FILETYPE_INO_SYMLINK): New macros.
18781         (grub_ext2_find_file): Check if the node is a directory using the
18782         inode stat information instead of using the filetype in the
18783         dirent.  Exclude the first character of an absolute symlink.
18784         (grub_ext2_dir): Mask out the filetype part of the mode member of
18785         the inode.
18787 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
18789         Add support for UFS version 1 and 2.  Add support for the minix
18790         filesystem version 1 and 2, both the variants with 14 and 30 long
18791         filenames.
18793         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
18794         fs/minix.c.
18795         (grub_emu_SOURCES): Likewise.
18796         (pkgdata_MODULES): Add ufs.mod and minix.mod.
18797         (ufs_mod_SOURCES): New variable.
18798         (ufs_mod_CFLAGS): Likewise.
18799         (minix_mod_SOURCES): Likewise.
18800         (minix_mod_CFLAGS): Likewise.
18801         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
18802         fs/minix.c.
18803         (grubof_SOURCES): Likewise.
18804         * fs/ufs.c: New file.
18805         * fs/minix.c: New file.
18806         * include/grub/fs.h (grub_ufs_init): New prototype.
18807         (grub_ufs_fini): Likewise.
18808         (grub_minix_init): Likewise.
18809         (grub_minix_fini): Likewise.
18810         * util/grub-emu.c (main): Initialize and deinitialize UFS and
18811         minix fs.
18813 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
18815         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
18816         commands/ls.c, commands/terminal.c, commands/boot.c,
18817         commands/cmp.c and commands/cat.c.
18818         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
18820         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
18821         "env.h"
18823 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18825         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
18826         and grub_, respectively. Because the conversion is trivial and
18827         mechanical, I omit the details here. Please refer to the CVS
18828         if you need more information.
18830 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18832         * include/pupa: Renamed to ...
18833         * include/grub: ... this.
18834         * util/i386/pc/pupa-mkimage.c: Renamed to ...
18835         * util/i386/pc/grub-mkimage.c: ... this.
18836         * util/i386/pc/pupa-setup.c: Renamed to ...
18837         * util/i386/pc/grub-setup.c: ... this.
18838         * util/pupa-emu.c: Renamed to ...
18839         * util/grub-emu.c: ... this.
18841 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
18843         Add support for the newworld apple macintosh (PPC).  This has been
18844         tested on the powerbook 2000 only.  It only adds support for
18845         generic ieee1275 functions, console and disk support.  This should
18846         be easy to port to other architectures with support for Open
18847         Firmware.
18849         * configure.ac: Accept the powerpc as host_cpu.  In the case of
18850         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
18851         specific tests are only executed while building for the i386.
18852         Inverse test for crosscompile.
18853         * genmk.rb (Utility): Allow assembler files.
18854         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
18855         * conf/powerpc-ieee1275.rmk: New file.
18856         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
18857         * disk/powerpc/ieee1275/partition.c: Likewise.
18858         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
18859         * include/pupa/powerpc/ieee1275/console.h: Likewise.
18860         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
18861         * include/pupa/powerpc/ieee1275/time.h: Likewise.
18862         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
18863         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
18864         * include/pupa/powerpc/ieee1275/loader.h
18865         * include/pupa/powerpc/setjmp.h: Likewise.
18866         * include/pupa/powerpc/types.h: Likewise.
18867         * kern/powerpc/ieee1275/init.c: Likewise.
18868         * kern/powerpc/ieee1275/openfw.c: Likewise.
18869         * term/powerpc/ieee1275/ofconsole.c: Likewise.
18871         These files were written by Johan Rydberg
18872         (jrydberg@night.trouble.net) and I only modified them slightly.
18874         * boot/powerpc/ieee1275/cmain.c: New file.
18875         * boot/powerpc/ieee1275/crt0.S: Likewise.
18876         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
18877         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
18879 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
18881         * Makefile.in: Update copyright.
18882         * genmodsrc.sh: Likewise.
18883         * gensymlist.sh: Likewise.
18884         * term/i386/pc/vga.c: Indent correctly.
18886         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
18887         bugreporting address.
18888         * util/i386/pc/pupa-setup.c (usage): Likewise,
18889         (main): Call pupa_ext2_init and pupa_ext2_fini.
18891         * fs/fat.c (log2): Renamed to ...
18892         (fat_log2): ... this.
18893         All callers changed.
18894         * kern/misc.c (memcpy): Alias to pupa_memmove.
18895         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
18896         lvalue cast.
18897         * util/console.c (pupa_ncurses_fini): Return 0.
18899         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
18900         Move fail label here.
18901         [__GNU__]: Don't warn when using stat.
18902         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
18903         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
18904         long int. Use strtol instead of strtoul.
18906 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
18908         * commands/boot.c: New file.
18909         * commands/cat.c: Likewise.
18910         * commands/cmp.c: Likewise.
18911         * commands/ls.c: Likewise.
18912         * commands/terminal.c: Likewise.
18913         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
18914         (pupa_register_command): Changed interface to match the new
18915         argument parser.
18916         (pupa_command_execute): Changed (almost rewritten) so it uses
18917         pupa_split_command.  Added support for setting variables using the
18918         syntax `foo=bar'.
18919         (rescue_command): Changed to work with the new argument parser.
18920         (terminal_command): Moved from here to commands/terminal.c.
18921         (set_command): New function.
18922         (unset_command): New function.
18923         (insmod_command): New function.
18924         (rmmod_command): New function.
18925         (lsmod_command): New function.
18926         (pupa_command_init): Don't initialize the command terminal
18927         anymore.  Initialize the commands set, unset, insmod, rmmod and
18928         lsmod.
18929         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
18930         (kernel_img_HEADERS): Add arg.h and env.h.
18931         (pupa_mkimage_LDFLAGS): Add kern/env.c.
18932         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
18933         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
18934         normal/arg.c.
18935         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
18936         terminal.mod.
18937         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
18938         (boot_mod_SOURCES): New variable.
18939         (terminal_mod_SOURCES): Likewise.
18940         (ls_mod_SOURCES): Likewise.
18941         (cmp_mod_SOURCES): Likewise.
18942         (cat_mod_SOURCES): Likewise.
18944         * normal/arg.c: New file.
18945         * kern/env.c: Likewise.
18946         * include/pupa/arg.h: Likewise.
18947         * include/pupa/env.h: Likewise.
18948         * font/manager.c (font_command): Changed to match argument parsing
18949         interface changes.
18950         (PUPA_MOD_INIT): Likewise.
18951         * hello/hello.c (pupa_cmd_hello): Likewise.
18952         (PUPA_MOD_INIT): Likewise.
18953         * include/pupa/disk.h: Include <pupa/device.h>.
18954         (pupa_print_partinfo): New prototype.
18955         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
18956         (pupa_dl_get_prefix): Likewise.
18957         * include/pupa/misc.h: Include <pupa/err.h>.
18958         (pupa_isgraph): New prototype.
18959         (pupa_isdigit): Likewise.
18960         (pupa_split_cmdline): Likewise.
18961         * include/pupa/normal.h: Include <pupa/arg.h>.
18962         (pupa_command): Changed the prototype of the member `func' to
18963         match the argument parsing interface.  Added member `options'.
18964         (pupa_register_command): Updated to match function.
18965         (pupa_arg_parse): New prototype.
18966         (pupa_hello_init) [PUPA_UTIL]: New prototype.
18967         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
18968         (pupa_ls_init) [PUPA_UTIL]: Likewise.
18969         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
18970         (pupa_cat_init) [PUPA_UTIL]: Likewise.
18971         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
18972         (pupa_boot_init) [PUPA_UTIL]: Likewise.
18973         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
18974         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
18975         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
18976         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
18977         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
18978         * kern/disk.c: Include <pupa/file.h>.
18979         (pupa_print_partinfo): New function.
18980         * kern/dl.c: Include <pupa/env.h>.
18981         (pupa_dl_dir): Variable removed.
18982         (pupa_dl_load): Use the environment variable `prefix' instead of
18983         the variable pupa_dl_dir.
18984         (pupa_dl_set_prefix): Function removed.
18985         (pupa_dl_get_prefix): Likewise.
18986         * kern/i386/pc/init.c: Include <pupa/env.h>.
18987         (pupa_machine_init): Use the environment variable `prefix' instead of
18988         using pupa_dl_set_prefix to set the prefix.
18989         * kern/main.c: Include <pupa/env.h>.
18990         (pupa_set_root_dev): Use the environment variable `prefix' instead of
18991         using pupa_dl_get_prefix to get the prefix.
18992         * kern/misc.c: Include <pupa/env.h>.
18993         (pupa_isdigit): New function.
18994         (pupa_isgraph): Likewise.
18995         (pupa_ftoa): Likewise.
18996         (pupa_vsprintf): Added support for printing values of the type
18997         `double'.  Make it possible to format variable output when using
18998         formatting like `%1.2%f'.
18999         (pupa_split_cmdline): New function.
19000         * kern/rescue.c: Include <pupa/env.h>.
19001         (next_word): Removed function.
19002         (pupa_rescue_cmd_prefix): Likewise.
19003         (pupa_rescue_cmd_set): New function.
19004         (pupa_rescue_cmd_unset): New function.
19005         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
19006         split the command line instead of splitting it here.  Added
19007         support for setting variables using the syntax `foo=bar'.  Don't
19008         initialize the prefix command anymore.  Initialized the set and
19009         unset commands.
19010         * normal/cmdline.c: Include <pupa/env.h>.
19011         (pupa_tab_complete): Added prototypes for print_simple_completion,
19012         print_partition_completion, add_completion, iterate_commands,
19013         iterate_dev, iterate_part and iterate_dir. Moved code to print
19014         partition information from here to kern/disk.c.
19015         (pupa_cmdline_run): Don't check if the function exists anymore.
19016         * normal/main.c: Include <pupa/env.h>.
19017         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
19018         instead of using pupa_dl_get_prefix to get the prefix.
19019         * term/i386/pc/vga.c: Include <pupa/arg.h>.
19020         (check_vga_mem): Cast pointers to `void *' to silence a gcc
19021         warning.
19022         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
19023         (pupa_vga_setcolor): Declare unused variables with `__attribute__
19024         ((unused))' to silence a gcc warning.
19025         (pupa_vga_setcolor): Likewise.
19026         (debug_command): Changed to match argument parsing
19027         interface changes.
19028         * util/pupa-emu.c: Include <pupa/env.h>.
19029         (options): Added 0's for unused fields to silence a gcc warning.
19030         (argp): Likewise.
19031         (main): Use the environment variable `prefix' instead of using
19032         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
19033         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
19034         and terminal.
19036         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
19037         * util/misc.c: Include <malloc.h>.
19038         (pupa_malloc): Rewritten so errors are correctly reported.
19039         (pupa_realloc): Likewise.
19040         (pupa_memalign): Likewise.
19041         (pupa_mm_init_region): Declare unused variables with
19042         `__attribute__ ((unused))' to silence a gcc warning.
19043         * normal/i386/setjmp.S: Remove tab at the end of the file to
19044         silence a gcc warning.
19045         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
19046         variables with `__attribute__ ((unused))' to silence a gcc
19047         warning.
19048         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
19049         local variable i unsigned to silence a gcc warning.
19051         * kern/term.c: Include <pupa/misc.h>.
19052         (pupa_more_lines): New variable.
19053         (pupa_more): Likewise.
19054         (pupa_putcode): When the pager is active pause at the end of every
19055         screen.
19056         (pupa_set_more): New function.
19057         * include/pupa/term.h (pupa_set_more): New prototype.
19060 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
19062         Now this project is GRUB 2 rather than PUPA. The location of
19063         the CVS repository was moved to GRUB's.
19065         * configure.ac: Use bug-grub as the reporting address.
19066         Use GRUB instead of PUPA.
19067         Change the version number to 1.90.
19069 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
19071         * genkernsyms.sh: Updated copyright information.
19072         * genmk.rb: Likewise.
19073         * genmodsrc.sh: Likewise.
19074         * gensymlist.sh: Likewise.
19075         * boot/i386/pc/boot.S: Likewise.
19076         * boot/i386/pc/diskboot.S: Likewise.
19077         * disk/i386/pc/biosdisk.c: Likewise.
19078         * disk/i386/pc/partition.c: Likewise.
19079         * font/manager.c: Likewise.
19080         * fs/ext2.c: Likewise.
19081         * fs/fat.c: Likewise.
19082         * include/pupa/boot.h: Likewise.
19083         * include/pupa/device.h: Likewise.
19084         * include/pupa/disk.h: Likewise.
19085         * include/pupa/dl.h: Likewise.
19086         * include/pupa/elf.h: Likewise.
19087         * include/pupa/err.h: Likewise.
19088         * include/pupa/file.h: Likewise.
19089         * include/pupa/font.h: Likewise.
19090         * include/pupa/fs.h: Likewise.
19091         * include/pupa/kernel.h: Likewise.
19092         * include/pupa/loader.h: Likewise.
19093         * include/pupa/misc.h: Likewise.
19094         * include/pupa/mm.h: Likewise.
19095         * include/pupa/net.h: Likewise.
19096         * include/pupa/normal.h: Likewise.
19097         * include/pupa/rescue.h: Likewise.
19098         * include/pupa/setjmp.h: Likewise.
19099         * include/pupa/symbol.h: Likewise.
19100         * include/pupa/term.h: Likewise.
19101         * include/pupa/types.h: Likewise.
19102         * include/pupa/i386/setjmp.h: Likewise.
19103         * include/pupa/i386/types.h: Likewise.
19104         * include/pupa/i386/pc/biosdisk.h: Likewise.
19105         * include/pupa/i386/pc/boot.h: Likewise.
19106         * include/pupa/i386/pc/console.h: Likewise.
19107         * include/pupa/i386/pc/init.h: Likewise.
19108         * include/pupa/i386/pc/kernel.h: Likewise.
19109         * include/pupa/i386/pc/linux.h: Likewise.
19110         * include/pupa/i386/pc/loader.h: Likewise.
19111         * include/pupa/i386/pc/memory.h: Likewise.
19112         * include/pupa/i386/pc/multiboot.h: Likewise.
19113         * include/pupa/i386/pc/partition.h: Likewise.
19114         * include/pupa/i386/pc/time.h: Likewise.
19115         * include/pupa/i386/pc/vga.h: Likewise.
19116         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
19117         * include/pupa/util/getroot.h: Likewise.
19118         * include/pupa/util/misc.h: Likewise.
19119         * include/pupa/util/resolve.h: Likewise.
19120         * kern/device.c: Likewise.
19121         * kern/disk.c: Likewise.
19122         * kern/dl.c: Likewise.
19123         * kern/err.c: Likewise.
19124         * kern/file.c: Likewise.
19125         * kern/fs.c: Likewise.
19126         * kern/loader.c: Likewise.
19127         * kern/main.c: Likewise.
19128         * kern/misc.c: Likewise.
19129         * kern/mm.c: Likewise.
19130         * kern/rescue.c: Likewise.
19131         * kern/term.c: Likewise.
19132         * kern/i386/dl.c: Likewise.
19133         * kern/i386/pc/init.c: Likewise.
19134         * kern/i386/pc/lzo1x.S: Likewise.
19135         * kern/i386/pc/startup.S: Likewise.
19136         * loader/i386/pc/chainloader.c: Likewise.
19137         * loader/i386/pc/linux.c: Likewise.
19138         * loader/i386/pc/multiboot.c: Likewise.
19139         * normal/cmdline.c: Likewise.
19140         * normal/command.c: Likewise.
19141         * normal/main.c: Likewise.
19142         * normal/menu.c: Likewise.
19143         * normal/i386/setjmp.S: Likewise.
19144         * term/i386/pc/console.c: Likewise.
19145         * term/i386/pc/vga.c: Likewise.
19146         * util/console.c: Likewise.
19147         * util/genmoddep.c: Likewise.
19148         * util/misc.c: Likewise.
19149         * util/pupa-emu.c: Likewise.
19150         * util/resolve.c: Likewise.
19151         * util/unifont2pff.rb: Likewise.
19152         * util/i386/pc/biosdisk.c: Likewise.
19153         * util/i386/pc/getroot.c: Likewise.
19154         * util/i386/pc/pupa-mkimage.c: Likewise.
19155         * util/i386/pc/pupa-setup.c: Likewise.
19157 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
19159         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
19160         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
19161         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
19162         reading and reset it after reading.
19163         (pupa_ext2_close): Return PUPA_ERR_NONE.
19165         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
19166         Correct value.
19167         (struct linux_kernel_header): Add kernel_version and
19168         initrd_addr_max.
19169         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
19170         pupa_file_read succeeds.
19171         (pupa_rescue_cmd_initrd): Implement.
19173 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
19175         * fs/ext2.c (pupa_ext2_label): New function.
19176         (pupa_ext2_fs): Added label.
19177         * fs/fat.c (pupa_fat_label): New function.
19178         (pupa_fat_fs): Added label.
19179         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
19181         * kern/misc.c (pupa_strndup): New function.
19182         * include/pupa/misc.h (pupa_strndup): New prototype.
19184         * include/pupa/normal.h: Include <pupa/err.h>.
19185         (pupa_set_history): New prototype.
19186         (pupa_iterate_commands): New prototype.
19187         * normal/cmdline.c: Include <pupa/machine/partition.h>,
19188         <pupa/disk.h>, <pupa/file.h>.
19189         (hist_size): New variable.
19190         (hist_lines): Likewise.
19191         (hist_end): Likewise.
19192         (hist_used): Likewise.
19193         (pupa_set_history): New function.
19194         (pupa_history_get): Likewise.
19195         (pupa_history_add): Likewise.
19196         (pupa_history_replace): Likewise.
19197         (pupa_tab_complete): Likewise.
19198         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
19199         completion shows partitionnames while completing partitions, this
19200         feature was suggested by Jeff Bailey.
19201         * normal/command.c (pupa_iterate_commands): New function.
19202         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
19203         (pupa_normal_init): Initialize history buffer.
19204         (PUPA_MOD_INIT): Likewise.
19205         (pupa_normal_fini): Free the history buffer.
19206         (PUPA_MOD_FINI): Likewise.
19208         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
19209         key.
19211         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
19212         * configure.ac [i386]: Check for regparam bug.
19213         (NESTED_FUNC_ATTR) [! i386]: Defined.
19215 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
19217         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
19218         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
19219         (pupa_emu_SOURCES): New variable.
19220         (pupa_emu_LDFLAGS): Likewise.
19221         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
19222         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
19223         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
19224         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19225         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
19226         (pupa_jmp_buf): New typedef.
19227         (pupa_setjmp) [PUPA_UTIL]: New macro.
19228         (pupa_longjmp) [PUPA_UTIL]: Likewise.
19229         * include/pupa/term.h (struct pupa_term): New member `refresh'.
19230         (pupa_refresh): New prototype.
19231         * include/pupa/util/getroot.h: New file.
19232         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
19233         it.
19234         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
19235         (pupa_rescue_cmd_cat): Likewise.
19236         (pupa_rescue_cmd_ls): Likewise.
19237         (pupa_rescue_cmd_testload): Likewise.
19238         (pupa_rescue_cmd_lsmod): Likewise.
19239         * normal/cmdline.c (pupa_cmdline_get): Likewise.
19240         * normal/menu.c (run_menu): Likewise.
19241         * kern/term.c (pupa_cls): Likewise.
19242         (pupa_refresh): New function.
19243         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
19244         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19245         * util/console.c: New file.
19247         * util/i386/pc/getroot.c: New file.
19248         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
19249         (pupa_putchar): New function.
19250         (pupa_refresh): Likewise.
19251         (xgetcwd): Function moved to ...
19252         (strip_extra_slashes): Likewise.
19253         (get_prefix): Likewise.
19254         * util/i386/pc/getroot.c: ... here.
19255         (find_root_device): Function moved and renamed to...
19256         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
19257         Changed all callers.
19258         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
19259         and renamed to...
19260         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
19261         Changed all callers.
19262         * util/misc.c (pupa_memalign): New function.
19263         (pupa_mm_init_region): Likewise.
19264         (pupa_register_exported_symbols): Likewise.
19265         (pupa_putchar): Function removed.
19266         * util/pupa-emu.c: New file.
19268 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
19270         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
19271         (_multiboot_mod_SOURCES): New variable.
19272         (_multiboot_mod_CFLAGS): Likewise.
19273         * loader/i386/pc/multiboot.c: New file.
19274         * include/pupa/i386/pc/multiboot.h: Likewise.
19275         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
19276         (pupa_multiboot_real_boot): New function.
19277         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
19278         (pupa_multiboot_real_boot): New prototype.
19279         (pupa_rescue_cmd_multiboot): Likewise
19280         (pupa_rescue_cmd_module): Likewise.
19282         * kern/loader.c (pupa_loader_set): Continue when
19283         pupa_loader_unload_func() fails.
19284         (pupa_loader_unset): New function.
19285         * include/pupa/loader.h (pupa_loader_unset): New prototype.
19287         * kern/misc.c (pupa_stpcpy): New function.
19288         * include/pupa/misc.h (pupa_stpcpy): New prototype.
19290 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
19292         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
19293         for available extensions.
19295         * include/pupa/i386/pc/time.h: New file.
19296         * kern/disk.c: Include <pupa/machine/time.h>.
19297         (PUPA_CACHE_TIMEOUT): New macro.
19298         (pupa_last_time): New variable.
19299         (pupa_disk_open): Flush the cache when there was a timeout.
19300         (pupa_disk_close): Reset the timer.
19301         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
19302         pupa_currticks.
19303         * util/misc.c: Include <sys/times.h>
19304         (pupa_get_rtc): New function.
19306 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
19308         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
19309         as blocks.
19310         (pupa_ext2_get_file_block): Use blocks member.
19312         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
19313         first block. Return -1 instead of pupa_errno on error.
19315 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
19317         * README: In the pupa-mkimage example use _chain instead of chain
19318         and ext2 instead of fat.
19319         * TODO: Replace ext2fs with jfs as an example.  Add an item for
19320         adding journal playback for ext2fs.
19321         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
19322         (pkgdata_MODULES): Added ext2.mod.
19323         (ext2_mod_SOURCES): New variable.
19324         (ext2_mod_CFLAGS): Likewise.
19325         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
19326         * include/pupa/misc.h (pupa_strncpy): New prototype.
19327         (pupa_strcat): Likewise.
19328         (pupa_strncmp): Likewise.
19329         * kern/misc.c (pupa_strcat): Enable function.
19330         (pupa_strncpy): New function.
19331         (pupa_strncmp): Likewise.
19332         * fs/ext2.c: New file.
19334         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
19335         when the read failed before retrying.
19336         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
19337         (_FILE_OFFSET_BITS): Likewise.
19338         * configure.ac: Added AC_SYS_LARGEFILE.
19340 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19342         * genmk.rb (PModule#rule): Make sure to get only symbol names
19343         from the output of nm.
19344         Reported by Robert Millan <zeratul2@wanadoo.es>.
19346 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19348         I forgot to check in these changes for a long time. This adds
19349         incomplete support for VGA console, and this is still very
19350         buggy. Also, a lot of consideration is required for I18N,
19351         UNICODE, and VGA font issues. Therefore, assume that this is
19352         such that "better than nothing".
19354         * font/manager.c: New file.
19355         * include/pupa/font.h: Likewise.
19356         * include/pupa/i386/pc/vga.h: Likewise.
19357         * term/i386/pc/vga.c: Likewise.
19358         * util/unifont2pff.rb: Likewise.
19360         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
19361         (pkgdata_MODULES): Added vga.mod and font.mod.
19362         (vga_mod_SOURCES): New variables.
19363         (vga_mod_CFLAGS): Likewise.
19364         (font_mod_SOURCES): Likewise.
19365         (font_mod_CFLAGS): Likewise.
19367         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
19369         * include/pupa/term.h: Include pupa/err.h.
19370         (struct pupa_term): Added init and fini.
19371         Changed the argument of putchar to pupa_uint32_t.
19373         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
19374         (pupa_console_real_putchar): New prototype.
19375         (pupa_console_putchar): Removed.
19376         (pupa_console_checkkey): Exported.
19377         (pupa_console_getkey): Likewise.
19379         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
19380         characters.
19382         * kern/term.c (pupa_term_set_current): Rewritten.
19383         (pupa_putchar): Likewise.
19384         (pupa_putcode): New function.
19386         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
19387         (pupa_console_real_putchar): ... this.
19388         (pupa_vga_set_mode): New function.
19389         (pupa_vga_get_font): Likewise.
19391         * normal/command.c: Include pupa/term.h.
19392         (terminal_command): New function.
19393         (pupa_command_init): Register the command "terminal".
19395         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
19396         (DISP_UP): Likewise.
19397         (DISP_RIGHT): Likewise.
19398         (DISP_DOWN): Likewise.
19399         (DISP_HLINE): Likewise.
19400         (DISP_VLINE): Likewise.
19401         (DISP_UL): Likewise.
19402         (DISP_UR): Likewise.
19403         (DISP_LL): Likewise.
19404         (DISP_LR): Likewise.
19406         * term/i386/pc/console.c (pupa_console_putchar): New function.
19408 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
19410         * util/resolve.c (pupa_util_resolve_dependencies): BUG
19411         FIX. Reverse the path_list.
19413         * include/pupa/normal.h: Export pupa_register_command and
19414         pupa_unregister_command.
19416         * hello/hello.c (pupa_cmd_hello): New module.
19417         * conf/i386-pc.rmk: Added hello.mod.
19419 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
19421         * kern/i386/pc/lzo1x.S: New file.
19423         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
19424         (compress_kernel): New variable.
19425         (generate_image): Heavily modified to support compressing a
19426         large part of the core image.
19428         * util/misc.c (pupa_util_read_image): Fix a file descriptor
19429         leak.
19430         (pupa_util_load_image): New function.
19432         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
19433         (pupa_compressed_size): New variable.
19434         (codestart): Enable Gate A20 here.
19435         Decompress the compressed part of the core image.
19436         Rearrange the code to put functions and variables which are
19437         required for initialization in the non-compressed part.
19438         Include lzo1x.S.
19440         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
19441         here.
19443         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
19445         * include/pupa/i386/pc/kernel.h
19446         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
19447         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
19448         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19449         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19450         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
19452         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
19454         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
19455         (Utility#rule): Likewise.
19457         * configure.ac: Check if LZO is available.
19459 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
19461         * include/pupa/normal.h: New file.
19462         * include/pupa/setjmp.h: Likewise.
19463         * include/pupa/i386/setjmp.h: Likewise.
19464         * normal/cmdline.c: Likewise.
19465         * normal/command.c: Likewise.
19466         * normal/main.c: Likewise.
19467         * normal/menu.c: Likewise.
19468         * normal/i386/setjmp.S: Likewise.
19470         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
19471         (pupa_rescue_cmd_initrd): Likewise.
19473         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
19474         Likewise.
19476         * kern/i386/pc/startup.S (translation_table): New variable.
19477         (translate_keycode): New function.
19478         (pupa_console_getkey): Call translate_keycode.
19480         * kern/rescue.c (attempt_normal_mode): New function.
19481         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
19482         it failed, print a message.
19484         * kern/mm.c (pupa_real_malloc): Print more information when a
19485         free magic is broken.
19486         (pupa_free): If the first free header is not free actually, set
19487         it to P.
19489         * kern/main.c (pupa_load_normal_mode): Just load the module
19490         "normal".
19491         (pupa_main): Don't print the message
19492         "Entering into rescue mode..." here.
19494         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
19495         Declared.
19496         (pupa_rescue_cmd_initrd): Likewise.
19497         (pupa_rescue_cmd_initrd): Likewise.
19499         * include/pupa/symbol.h (FUNCTION): Specify the type.
19500         (VARIABLE): Likewise.
19502         * include/pupa/err.h (pupa_err_t): Added
19503         PUPA_ERR_UNKNOWN_COMMAND.
19505         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
19506         (pupa_dl_get_prefix): Likewise.
19508         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
19509         Added _chain.mod and _linux.mod instead of chain.mod and
19510         linux.mod.
19511         (chain_mod_SOURCES): Renamed to ...
19512         (_chain_mod_SOURCES): ... this.
19513         (chain_mod_CFLAGS): Renamed to ...
19514         (_chain_mod_CFLAGS): ... this.
19515         (linux_mod_SOURCES): Renamed to ...
19516         (_linux_mod_SOURCES): ... this.
19517         (linux_mod_CFLAGS): Renamed to ...
19518         (_linux_mod_CFLAGS): ... this.
19519         (normal_mod_SOURCES): New variable.
19520         (normal_mod_CFLAGS): Likewise.
19521         (normal_mod_ASFLAGS): Likewise.
19523 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
19525         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
19526         possible.
19528         * kern/dl.c (pupa_dl_ref): Refer depending modules
19529         recursively.
19530         (pupa_dl_unref): Unrefer depending modules recursively.
19531         Don't call pupa_dl_unload implicitly, because PUPA can crash if
19532         a module is unloaded before one depending on that module is
19533         unloaded.
19534         (pupa_dl_unload): Unload depending modules explicitly,
19535         if possible.
19537 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
19539         * include/pupa/i386/pc/linux.h: New file.
19540         * loader/i386/pc/linux.c: Likewise.
19542         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
19543         Removed.
19544         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
19545         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
19546         of PUPA_CHAINLOADER_BOOT_SECTOR.
19548         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
19549         (pupa_linux_prot_size): New variable.
19550         (pupa_linux_tmp_addr): Likewise.
19551         (pupa_linux_real_addr): Likewise.
19552         (pupa_linux_boot_zimage): New function.
19553         (pupa_linux_boot_bzimage): Likewise.
19555         * kern/i386/pc/init.c (struct mem_region): New structure.
19556         (MAX_REGIONS): New macro.
19557         (mem_regions): New variable.
19558         (num_regions): Likewise.
19559         (pupa_os_area_addr): Likewise.
19560         (pupa_os_area_size): Likewise.
19561         (pupa_lower_mem): Likewise.
19562         (pupa_upper_mem): Likewise.
19563         (add_mem_region): New function.
19564         (compact_mem_regions): Likewise.
19565         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
19566         the size of the conventional memory and that of so-called upper
19567         memory (before the first memory hole).
19568         Instead of adding each found region to free memory, use
19569         add_mem_region and add them after removing overlaps.
19570         Also, add only 1/4 of the upper memory to free memory. The rest
19571         is used for loading OS images. Maybe this is ad hoc, but this
19572         makes it much easier to relocate OS images when booting.
19574         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
19575         (pupa_enter_rescue_mode): Don't register initrd and module.
19577         * kern/mm.c: Include pupa/dl.h.
19579         * kern/main.c: Include pupa/file.h and pupa/device.h.
19581         * kern/loader.c (pupa_loader_load_module_func): Removed.
19582         (pupa_loader_load_module): Likewise.
19584         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
19585         ``.o''.
19587         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
19588         (pupa_linux_tmp_addr): Likewise.
19589         (pupa_linux_real_addr): Likewise.
19590         (pupa_linux_boot_zimage): Likewise.
19591         (pupa_linux_boot_bzimage): Likewise.
19593         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
19594         (pupa_upper_mem): Likewise.
19595         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
19596         module is too dangerous.
19598         * include/pupa/loader.h (pupa_os_area_addr): Declared.
19599         (pupa_os_area_size): Likewise.
19600         (pupa_loader_set): Remove the first argument. Loader doesn't
19601         manage modules or initrd any longer.
19602         (pupa_loader_load_module): Removed.
19604         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
19605         (linux_mod_SOURCES): New variable.
19606         (linux_mod_CFLAGS): Likewise.
19608 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
19610         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
19611         the length of a blocklist correctly.
19613         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
19614         Use ioctl only if the OS file is a block device.
19615         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
19616         not very useful for normal files.
19618         * kern/main.c (pupa_set_root_dev): New function.
19619         (pupa_load_normal_mode): Likewise.
19620         (pupa_main): Call those above.
19622         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
19623         pupa_uint16_t.
19625         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
19627 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
19629         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
19630         (setup): Configure the installed partition information and the
19631         dl prefix.
19633         * loader/i386/pc/chainloader.c (my_mod): New variable.
19634         (pupa_chainloader_unload): New function.
19635         (pupa_rescue_cmd_chainloader): Refer itself.
19636         (PUPA_MOD_INIT): Save its own module in MY_MOD.
19638         * kern/i386/pc/startup.S (install_partition): Removed.
19639         (version_string): Likewise.
19640         (config_file): Likewise.
19641         (pupa_install_dos_part): New variable.
19642         (pupa_install_bsd_part): Likewise.
19643         (pupa_prefix): Likewise.
19644         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
19646         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
19647         and pupa/misc.h.
19648         (make_install_device): New function.
19649         (pupa_machine_init): Set the dl prefix.
19651         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
19652         (buf): Renamed to ...
19653         (linebuf): ... this.
19654         (pupa_rescue_cmd_prefix): New function.
19655         (pupa_rescue_cmd_insmod): Likewise.
19656         (pupa_rescue_cmd_rmmod): Likewise.
19657         (pupa_rescue_cmd_lsmod): Likewise.
19658         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
19659         rmmod and lsmod.
19661         * kern/mm.c (pupa_memalign): If failed even after invalidating
19662         disk caches, unload unneeded modules and retry.
19664         * kern/misc.c (pupa_memmove): New function.
19665         (pupa_memcpy): Removed.
19666         (pupa_strcpy): New function.
19667         (pupa_itoa): Made static.
19669         * kern/dl.c (pupa_dl_iterate): New function.
19670         (pupa_dl_ref): Likewise.
19671         (pupa_dl_unref): Likewise.
19672         (pupa_dl_unload): Return if succeeded or not.
19673         (pupa_dl_unload_unneeded): New function.
19674         (pupa_dl_unload_all): Likewise.
19675         (pupa_dl_init): Renamed to ...
19676         (pupa_dl_set_prefix): ... this.
19677         (pupa_dl_get_prefix): New function.
19679         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
19680         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
19681         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19682         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19683         (pupa_install_dos_part): Declared.
19684         (pupa_install_bsd_part): Likewise.
19685         (pupa_prefix): Likewise.
19686         (pupa_boot_drive): Likewise.
19688         * include/pupa/types.h: Fix a typo.
19690         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
19691         pupa_memmove.
19692         (pupa_memmove): Declared.
19693         (pupa_strcpy): Likewise.
19695         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
19696         pupa_mod_init takes one argument, its own module.
19697         (pupa_dl_unload_unneeded): Declared.
19698         (pupa_dl_unload_all): Likewise.
19699         (pupa_dl_ref): Likewise.
19700         (pupa_dl_unref): Likewise.
19701         (pupa_dl_iterate): Likewise.
19702         (pupa_dl_init): Renamed to ...
19703         (pupa_dl_set_prefix): ... this.
19704         (pupa_dl_get_prefix): Declared.
19706         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
19707         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
19708         unloaded.
19709         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
19710         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
19712         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
19713         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
19715 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19717         * util/i386/pc/pupa-setup.c (setup): Define the internal
19718         function find_first_partition_start at the top level, because GCC
19719         3.0.x cannot compile internal functions in deeper scopes
19720         correctly.
19721         (find_root_device): Use lstat instead of stat.
19722         Don't follow symbolic links.
19723         Fix the path-constructing code.
19725         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
19726         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
19727         by a BLKGETSIZE ioctl first, because block devices don't fill
19728         the member st_mode of the structure stat on Linux.
19729         [__linux__] (linux_find_partition): Use a temporary buffer
19730         REAL_DEV for the working space. Copy it to DEV before returning.
19731         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
19732         buffer cache consistent.
19733         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
19734         strncmp. The previous value was merely wrong.
19735         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
19737         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
19738         FAT size is 12. The previous value was merely wrong.
19740         * kern/main.c (pupa_main): Don't split the starting message from
19741         newlines.
19743         * kern/term.c (pupa_putchar): Put CR after LF instead of before
19744         LF, because BIOS goes crazy about character attributes in this
19745         case.
19747 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19749         * include/i386/pc/util/biosdisk.h: New file.
19750         * util/i386/pc/biosdisk.c: Likewise.
19751         * util/i386/pc/pupa-setup.c: Likewise.
19753         * Makefile.in (INCLUDE_DISTFILES): Added
19754         include/pupa/i386/pc/util/biosdisk.h.
19755         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
19756         directory util/i386/pc.
19757         (install-local): Added a rule for sbin_UTILITIES.
19758         (uninstall): Likewise.
19760         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
19762         * util/misc.c (xrealloc): New function.
19763         (pupa_malloc): Likewise.
19764         (pupa_free): Likewise.
19765         (pupa_realloc): Likewise.
19766         (pupa_stop): Likewise.
19767         (pupa_putchar): Likewise.
19769         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
19771         * include/pupa/util/misc.h (xrealloc): Declared.
19773         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
19774         macro.
19775         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
19776         (PUPA_BOOT_MACHINE_BPB_END): ... this.
19778         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
19779         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19781         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
19782         way should be implemented.
19783         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19785         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
19786         the size of NAME for safety.
19787         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
19788         0x88.
19790         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
19791         (pupa_setup_SOURCES): Likewise.
19793         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
19795 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19797         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
19798         bunch of pushl's from pusha, because this destroys the return
19799         value.
19801 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19803         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
19804         This means that any missing prototypes could be fatal. Also, you
19805         must take care when writing assembly code. See the comments at
19806         the beginning of startup.S, for more details.
19808         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
19809         compilation mechanism.
19810         (pupa_chainloader_real_boot): Likewise.
19811         (pupa_biosdisk_rw_int13_extensions): Likewise.
19812         (pupa_biosdisk_rw_standard): Likewise.
19813         (pupa_biosdisk_check_int13_extensions): Likewise.
19814         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
19815         (pupa_biosdisk_get_diskinfo_standard): Likewise.
19816         (pupa_get_memsize): Likewise.
19817         (pupa_get_mmap_entry): Likewise.
19818         (pupa_console_putchar): Likewise.
19819         (pupa_console_setcursor): Likewise.
19820         (pupa_getrtsecs): Use pushl instead of push.
19822         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
19823         memory instead of the stack for a mmap entry, because some
19824         BIOSes may ignore the maximum size and overflow.
19826         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
19828         * genmk.rb (PModule#rule): Compile automatically generated
19829         sources with module-specific CFLAGS as well as other sources.
19831 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19833         * configure.ac: Check ld.
19834         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
19835         respectively, before checking endianness and sizes.
19837         * Makefile.in (LD): New variable.
19839 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19841         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
19843 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19845         * Changelog: New file.