2009-09-12 Robert Millan <rmh.grub@aybabtu.com>
[grub2/phcoder/solaris.git] / ChangeLog
blobc421ec6336ddbd2d098b59bf8817cdc61b58b73c
1 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
3         * configure.ac: Bump version to 1.97~beta3.
4         * docs/version.texi: Likewise.
6 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
8         * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
9         mode special handling (grub_vbe_bios_set_dac_palette_width() call)
10         from here ...
11         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
12         (grub_linux_setup_video): ... to here (with some adjustments).
14 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
16         Fix memory corruption issue (spotted by Colin Watson).
18         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
19         causing returned size to be stored in an incorrect memory location.
20         Fix use of uninitialized value when storing the returned size.
22 2009-09-12  Yves Blusseau  <blusseau@zetam.org>
24         Change clean rules to properly remove files
26         * genmk.rb: add new clean rules
27         * Makefile.in (clean): add the new targets
28         (mostlyclean): likewise
30 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
32         * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
33         to grub_uint64_t.
34         * fs/ntfs.c (init_file): Understand 64-bit sizes for
35         non-resident files.
37 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
39         * configure.ac: Don't look for help2man when cross-compiling.  Fixes
40         part of bug #27349.
42 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
44         * util/grub-mkconfig.in: Make the created config mode 400 and
45         print a warning if it fails.
47 2009-09-10  Robert Millan  <rmh.grub@aybabtu.com>
49         * util/grub.d/40_custom.in: Ask user to type custom entries below
50         comment, rather than below 'exec tail' line.
52 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
54         * util/grub.d/40_custom.in: Make sure that the explanatory text is
55         visible in grub.cfg.
57 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
59         * util/grub.d/40_custom.in: Make it a little clearer how to use this
60         file.
62 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
64         * docs/grub.cfg: Add an example menu entry for memtest86+.
66 2009-09-09  Felix Zielcke  <fzielcke@z-51.de>
68         * config.guess: Update to latest version from config git.
69         * config.sub: Likewise.
71 2009-09-08  Colin Watson  <cjwatson@ubuntu.com>
73         * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
74         unknown-command case.  Fixes bug #27320.
76 2009-09-08  Felix Zielcke  <fzielcke@z-51.de>
78         * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
79         `help' if the command exists.
81 2009-09-06  Robert Millan  <rmh.grub@aybabtu.com>
83         * INSTALL: Require GCC 4.1.3 or later.
85 2009-09-06  Yves Blusseau  <blusseau@zetam.org>
87         * Makefile.in (RMKFILES): add i386-qemu.rmk
88         (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
89         $(srcdir)/stamp-h.in
91 2009-09-05  Robert Millan  <rmh.grub@aybabtu.com>
93         * util/grub-probe.c (probe): Comment out buggy codepath, which
94         was unexpectedly enabled by Colin Watson's 2009-09-02 fix.  This
95         should be re-enabled after 1.97.
97 2009-09-05  Felix Zielcke  <fzielcke@z-51.de>
99         * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
100         find searches for.
102 2009-09-04  Vladimir Serbinenko  <phcoder@gmail.com>
104         * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
105         unnecessary calls to grub_error.
107 2009-09-04  Colin Watson  <cjwatson@ubuntu.com>
109         * NEWS: Mention `keystatus' and Unicode fonts.
111 2009-09-04  Robert Millan  <rmh.grub@aybabtu.com>
113         * configure.ac: Bump version to 1.97~beta2.
114         * docs/version.texi: Likewise.
116 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
118         * configure.ac: By default, GCC 4.4 generates .eh_frame sections
119         containing unwind information in some cases where it previously did
120         not. Use -fno-dwarf2-cfi-asm if available to restore the old
121         behaviour. See http://patchwork.kernel.org/patch/8555/ for related
122         discussion.
124 2009-09-02  Yves BLUSSEAU  <blusseau@zetam.org>
126         Embedding loadenv module into grub-emu
128         * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
129         commands/loadenv.c
130         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
131         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
132         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
133         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
134         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
135         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
137 2009-09-03  Magnus Granberg  <zorry@ume.nu>
139         * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
140         include -fPIE in the default specs.
141         * configure.ac: Check if pie_possible is yes and add -fno-PIE
142         to TARGET_CFLAGS.
144 2009-09-03  Felix Zielcke  <fzielcke@z-51.de>
146         * INSTALL: Note that GNU Bison 2.3 or later is required.
148 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
150         * kern/i386/pc/startup.S: Fix typo.
152 2009-09-02  Vladimir Serbinenko  <phcoder@gmail.com>
154         * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
155         according to GCS.
157 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
159         * docs/grub.texi (Naming convention): Describe one-based partition
160         numbering.
161         (Device syntax): Likewise.
162         (File name syntax): Likewise.
163         (Block list syntax): Likewise.
164         (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
165         menu.lst.
166         (File name syntax): Likewise.
167         (Command-line and menu entry commands): Document acpi, blocklist,
168         crc, export, insmod, keystatus, ls, set, and unset commands.
170 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
172         * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
173         to avoid implying that only one of --shift, --ctrl, or --alt may be
174         used.
176 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
178         * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
179         rather than comparing against S_IFREG, which will almost never work.
181 2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>
183         * commands/loadenv.c (check_blocklists): Fix off-by-one error.
184         (write_blocklists): Likewise.
186 2009-09-01  Colin Watson  <cjwatson@ubuntu.com>
188         * script/lua/grub_lua.h (fputs): Supply a format string as the first
189         argument to grub_printf.
191 2009-09-01  Felix Zielcke  <fzielcke@z-51.de>
193         * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
194          non GNU test.
196 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
198         * kern/file.c (grub_file_read): Spelling fix
200 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
202         * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
203         loading of headers in some cases.
205 2009-08-30  Robert Millan  <rmh.grub@aybabtu.com>
207         * configure.ac: Bump version to 1.97~beta1.
208         * docs/version.texi: Likewise.
210 2009-08-29  Vladimir Serbinenko  <phcoder@gmail.com>
212         * include/grub/i386/xnu.h: Add license header.
213         include grub/err.h explicitly.
215 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
217         * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
218         to `ufs' in the vfs.root.mountfrom kernel parameter.
220 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
222         * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
224         [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
225         value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
227         [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
228         `ARRAY_SIZE' macro.
230 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
232         * kern/file.c (grub_file_read): Check offset.
233         * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
234         * fs/jfs.c (grub_jfs_read_file): Likewise.
235         * fs/ntfs.c (grub_ntfs_read): Likewise.
236         * fs/reiserfs.c (grub_reiserfs_read): Likewise.
237         * fs/minix.c (grub_minix_read_file): Correct offset check.
238         * fs/ufs.c (grub_ufs_read_file): Likewise.
240 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
242         * term/i386/pc/console.c (bios_data_area): Cast
243         GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
245 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
247         1-bit optimised blitters.
249         * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
250         prototype.
251         (grub_video_fbblit_replace_24bit_1bit): Likewise.
252         (grub_video_fbblit_replace_16bit_1bit): Likewise.
253         (grub_video_fbblit_replace_8bit_1bit): Likewise.
254         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
255         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
256         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
257         * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
258         function.
259         (grub_video_fbblit_replace_24bit_1bit): Likewise.
260         (grub_video_fbblit_replace_16bit_1bit): Likewise.
261         (grub_video_fbblit_replace_8bit_1bit): Likewise.
262         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
263         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
264         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
265         * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
266         when possible.
267         * video/video.c (grub_video_get_blit_format): Return
268         GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
270 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
272         * normal/cmdline.c (grub_cmdline_get): Supply a format string as
273         the first argument to grub_printf.
275 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
276 2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>
278         Add `getkeystatus' terminal method.  Add a new `keystatus' command
279         to query it.
281         * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
282         GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
283         modifier key bitmasks.
284         (struct grub_term_input): Add `getkeystatus' member.
285         (grub_getkeystatus): Add prototype.
286         * kern/term.c (grub_getkeystatus): New function.
288         * include/grub/i386/pc/memory.h
289         (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
290         (struct grub_machine_bios_data_area): Define necessary parts of BIOS
291         Data Area layout.
292         * term/i386/pc/console.c (grub_console_getkeystatus): New function.
293         (grub_console_term_input): Set `getkeystatus' member.
294         * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
295         constants.
296         (grub_usb_keyboard_getreport): Likewise.
297         (grub_usb_keyboard_checkkey): Likewise.
298         (grub_usb_keyboard_getkeystatus): New function.
299         (grub_usb_keyboard_term): Set `getkeystatus' member.
301         * commands/keystatus.c: New file.
302         * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
303         (keystatus_mod_SOURCES): New variable.
304         (keystatus_mod_CFLAGS): Likewise.
305         (keystatus_mod_LDFLAGS): Likewise.
306         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
307         commands/keystatus.c.
308         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
309         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
310         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
311         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
312         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
313         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
315 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
317         Split befs.mod and afs.mod into *_be.mod and *.mod
319         * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
320         (grub_fstest_SOURCES): Likewise.
321         (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
322         (afs_be_mod_SOURCES): New variable.
323         (afs_be_mod_CFLAGS): Likewise.
324         (afs_be_mod_LDFLAGS): Likewise.
325         (befs_be_mod_SOURCES): Likewise.
326         (befs_be_mod_CFLAGS): Likewise.
327         (befs_be_mod_LDFLAGS): Likewise.
328         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
329         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
330         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
331         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
332         (grub_emu_SOURCES): Likewise.
333         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
334         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
335         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
336         * fs/afs_be.c: New file.
337         * fs/befs_be.c: New file.
338         * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
339         (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
340         (U16): Replaced with ...
341         (grub_afs_to_cpu16): ...this. All users updated.
342         (U32): Replaced with ...
343         (grub_afs_to_cpu32): ...this. All users updated.
344         (U64): Replaced with ...
345         (grub_afs_to_cpu64): ...this. All users updated.
346         (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
347         (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
348         (grub_afs_validate_sblock): Check only one endianness.
349         (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
350         (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
351         (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
352         (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
353         (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
354         (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
355         (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
356         (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
358 2009-08-26  Bean  <bean123ch@gmail.com>
360         * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
361         64-bit number.
362         (GRUB_XFS_FSB_TO_BLOCK): Likewise.
363         (grub_xfs_inode_block): Change return type to grub_uint64_t.
364         (grub_xfs_read_inode): Change type of block to grub_uint64_t.
366 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
368         NetBSD memory map support.
370         * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
371         (grub_netbsd_btinfo_mmap_header): New structure.
372         (grub_netbsd_btinfo_mmap_entry): Likewise.
373         * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
375 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
377         Enable bsd.mod on coreboot.
379         * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
380         (bsd_mod_SOURCES): New variable.
381         (bsd_mod_CFLAGS): Likewise.
382         (bsd_mod_LDFLAGS): Likewise.
383         (bsd_mod_ASFLAGS): Likewise.
384         * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
385         (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
387 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
389         Cleanup NetBSD root support.
391         * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
392         grub_bsd_get_device.
393         Fix typo.
395 2009-08-25  Felix Zielcke  <fzielcke@z-51.de>
397         * util/grub.d/00_header.in: Move check for the video backend of
398         gfxterm from here ...
399         * util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
400         a suitable video backend.
402 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
404         Fix breakage in grub-setup.
406         * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
407         "msdos_partition_map".
409 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
411         Fix breakage in normal/auth.c.
413         * normal/auth.c (grub_iswordseparator): New function.
415 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
417         Authentication support.
419         * commands/password.c: New file.
420         * conf/common.rmk (pkglib_MODULES): Add password.mod.
421         (password_mod_SOURCES): New variable.
422         (password_mod_CFLAGS): Likewise.
423         (password_mod_LDFLAGS): Likewise.
424         (normal_mod_SOURCES): Add normal/auth.c.
425         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
426         normal/auth.c.
427         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
428         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
429         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
430         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
431         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
432         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
433         * include/grub/auth.h: New file.
434         * include/grub/err.h (grub_err_t): New enum value
435         GRUB_ERR_ACCESS_DENIED.
436         * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
437         'users'.
438         * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
439         * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
440         users updated.
441         * normal/auth.c: New file.
442         * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
443         (grub_cmdline_run): Don't allow to go to command line without
444         authentication.
445         * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
446         * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
447         menuentry without superuser rights.
448         * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
449         user isn't a superuser.
451 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
453         Save space by inlining misc.c functions.
455         * kern/misc.c (grub_iswordseparator): Made static.
456         * kern/misc.c (grub_strcat): Moved from here ...
457         * include/grub/misc.h (grub_strcat): ... here. Inlined.
458         * kern/misc.c (grub_strncat): Moved from here ...
459         * include/grub/misc.h (grub_strncat): ... here. Inlined.
460         * kern/misc.c (grub_strcasecmp): Moved from here ...
461         * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
462         * kern/misc.c (grub_strncasecmp): Moved from here ...
463         * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
464         * kern/misc.c (grub_isalpha): Moved from here ...
465         * include/grub/misc.h (grub_isalpha): ... here. Inlined.
466         * kern/misc.c (grub_isdigit): Moved from here ...
467         * include/grub/misc.h (grub_isdigit): ... here. Inlined.
468         * kern/misc.c (grub_isgraph): Moved from here ...
469         * include/grub/misc.h (grub_isgraph): ... here. Inlined.
470         * kern/misc.c (grub_tolower): Moved from here ...
471         * include/grub/misc.h (grub_tolower): ... here. Inlined.
473 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
475         * script/sh/function.c (grub_script_function_find): Cut error message
476         not to flood terminal.
477         * script/sh/lexer.c (grub_script_yylex): Remove command line length
478         limit.
479         * script/sh/script.c (grub_script_arg_add): Duplicate string.
481 2009-08-24  Colin Watson  <cjwatson@ubuntu.com>
483         * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
484         `report' grub_uint8_t *.
485         (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
486         Use a 50-millisecond timeout rather than just repeating
487         grub_usb_keyboard_getreport 50 times.
488         (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
490 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
492         Rename *_partition_map to part_*
494         * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
495         * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
496         * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
497         * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
498         All users updated.
499         * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
500         All users updated.
501         * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
502         * util/grub-probe.c (probe_partmap): Don't transform partition name
503         to get module name.
505 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
507         Fix OpenBSD and NetBSD support.
509         * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
510         memory address conflict.
511         (OPENBSD_MMAP_ACPI): New definition.
512         (OPENBSD_MMAP_NVS): Likewise.
513         * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
514         and OPENBSD_MMAP_NVS.
515         Add memory map terminator
516         Explicit cast when calling grub_unix_real_boot.
517         (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
519 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
521         Let user specify NetBSD root device.
523         * loader/i386/bsd.c (netbsd_root): New variable.
524         (netbsd_opts): New option 'root'.
525         (NETBSD_ROOT_ARG): New macro.
526         (grub_netbsd_boot): Use 'netbsd_root'.
527         (grub_bsd_unload): Free 'netbsd_root'.
528         (grub_cmd_netbsd): Fill 'netbsd_root'.
530 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
532         Support for 64-bit NetBSD.
534         * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
535         point when booting non-FreeBSD.
537 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
539         Support --no-smp and --no-acpi for NetBSD.
541         * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
542         (NETBSD_AB_NOACPI): Likewise.
543         * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
544         (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
546 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
548         * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
549         errors.
550         (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
551         errors. Call grub_error when needed.
553 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
555         * commands/search.c (search_fs): Try searching without autoload first.
556         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
557         filesystem module explicitly for faster booting.
559 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
561         * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
563 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
565         * util/grub.d/30_os-prober.in: Disable os-prober if
566         `GRUB_DISABLE_OS_PROBER' was set to true.
568 2009-08-23  Robert Millan  <rmh.grub@aybabtu.com>
570         * partmap/pc.c: Rename to ...
571         * partmap/msdos.c: ... this.  Update all users.
572         (grub_pc_partition_map): Rename to ...
573         (grub_msdos_partition_map): ... this.  Update all users.
575         * parttool/pcpart.c: Rename to ...
576         * parttool/msdospart.c: ... this.  Update all users.
578         * include/grub/pc_partition.h: Rename to ...
579         * include/grub/msdos_partition.h: ... this.  Update all users.
580         (grub_pc_partition_bsd_entry): Rename to ...
581         (grub_msdos_partition_bsd_entry): ... this.  Update all users.
582         (grub_pc_partition_disk_label): Rename to ...
583         (grub_msdos_partition_disk_label): ... this.  Update all users.
584         (grub_pc_partition_entry): Rename to ...
585         (grub_msdos_partition_entry): ... this.  Update all users.
586         (grub_pc_partition_mbr): Rename to ...
587         (grub_msdos_partition_mbr): ... this.  Update all users.
588         (grub_pc_partition): Rename to ...
589         (grub_msdos_partition): ... this.  Update all users.
590         (grub_pc_partition_is_empty): Rename to ...
591         (grub_msdos_partition_is_empty): ... this.  Update all users.
592         (grub_pc_partition_is_extended): Rename to ...
593         (grub_msdos_partition_is_extended): ... this.  Update all users.
594         (grub_pc_partition_is_bsd): Rename to ...
595         (grub_msdos_partition_is_bsd): ... this.  Update all users.
597         * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
598         (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
599         (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
600         (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
601         (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
602         (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
603         (gpt_mod_LDFLAGS): Rename to ...
604         (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
605         (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
606         (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
607         (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
608         (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
609         (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
610         (part_gpt_mod_LDFLAGS): ... this.
611         (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
612         `pcpart.mod' to `msdospart.mod'.
613         (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
614         to ...
615         (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
616         (msdospart_mod_LDFLAGS): ... this.
618 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
620         * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
621         (openbsd_opts): Likewise.
622         (netbsd_opts): Likewise.
623         (freebsd_flags): Added 0 terminator.
624         (openbsd_flags): Likewise.
625         (netbsd_flags): Likewise.
626         (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
627         (grub_cmd_freebsd): Transformed into extended command.
628         (grub_cmd_openbsd): Likewise.
629         (grub_cmd_netbsd): Likewise.
630         (cmd_freebsd): Changed type to grub_extcmd_t.
631         (cmd_openbsd): Likewise.
632         (cmd_netbsd): Likewise.
633         (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
634         grub_cmd_openbsd as extended commands.
635         (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
636         cmd_netbsd and cmd_openbsd
638 2009-08-22  Vladimir Serbinenko  <phcoder@gmail.com>
640         * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
642 2009-08-21  Pavel Roskin  <proski@gnu.org>
644         * Makefile.in (install-local): When checking if a file is in the
645         build directory, use "test -e" to detect symlinks.
647         * Makefile.in (install-local): Remove all files in
648         $(DESTDIR)$(pkglibdir) before installing new files there.
650 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
652         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
653         grub-mkelfimage.
655 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
657         * util/grub-mkconfig.in: Don't use gfxterm by default if not
658         explicitly specified by the user.
660 2009-08-18  Pavel Roskin  <proski@gnu.org>
662         * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
663         grub_uint8_t pointer for data.
664         * include/grub/fbutil.h (struct grub_video_fbblit_info):
665         Likewise.
666         * video/fb/fbutil.c: Remove unnecessary casts.
668 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
670         VBE cleanup.
672         * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
673         (grub_vbe_set_video_mode): Save active mode info
674         only after setting the mode.
675         (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
676         second argument.
678 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
680         Rename variables for clarity.
682         * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
683         (active_vbe_mode_info): ... this. All users updated.
684         (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
685         All users updated.
686         (initial_mode): Rename to ...
687         (initial_vbe_mode): ... this. All users updated.
688         (mode_in_use): Rename to ..
689         (vbe_mode_in_use): ... this. All users updated.
690         (mode_list): Rename to ..
691         (vbe_mode_list): ... this. All users updated.
692         (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
693         'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
694         (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
695         'mode_list_size' to 'vbe_mode_list_size'.
696         (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
697         'best_mode_info' to 'best_vbe_mode_info' and
698         'best_mode' to 'best_vbe_mode'
700 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
702         Remove duplicate grub_video_fb_get_video_ptr.
704         * include/grub/fbutil.h (get_data_ptr): Rename to ...
705         (grub_video_fb_get_video_ptr): ... this.
706         * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
707         * video/fb/fbutil.c: Add comment about addressing.
708         (get_data_ptr): Rename to ...
709         (grub_video_fb_get_video_ptr): ... this. All users updated.
710         * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
712 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
714         * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
715         grub_dprintf() that was just added.
717 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
719         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
720         (DEFAULT_VIDEO_MODE): Remove macros.
721         (grub_linux_boot): Remove assumption that Linux has FB support,
722         and use "text" as default video mode.
724 2009-08-15  Vladimir Serbinenko  <phcoder@gmail.com>
726         * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
727         grub_dprintf.
728         * fs/fat.c (grub_fat_read_data): Likewise.
730 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
732         * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
733         payload.
734         (grub_module): Likewise.
736 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
738         * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
739         mbi->cmdline but free playground.
741 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
743         Handle group offset on UFS1.
745         * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
746         (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
748 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
750         Split ufs.mod into ufs1.mod and ufs2.mod.
752         * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
753         (grub_fstest_SOURCES): Likewise.
754         (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
755         (ufs_mod_SOURCES): Remove.
756         (ufs_mod_CFLAGS): Likewise.
757         (ufs_mod_LDFLAGS): Likewise.
758         (ufs1_mod_SOURCES): New variable.
759         (ufs1_mod_CFLAGS): Likewise.
760         (ufs1_mod_LDFLAGS): Likewise.
761         (ufs2_mod_SOURCES): New variable.
762         (ufs2_mod_CFLAGS): Likewise.
763         (ufs2_mod_LDFLAGS): Likewise.
764         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
765         * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
766         Likewise.
767         (grub_emu_SOURCES): Likewise.
768         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
769         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
770         (grub_setup_SOURCES): Likewise.
771         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
772         * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
773         (grub_setup_SOURCES): Likewise.
774         * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
775         Likewise.
776         * fs/ufs2.c: New file.
777         * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
779 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
781         Framebuffer split.
783         * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
784         subsystem at the end.
785         * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
786         (video_fb_mod_SOURCES): New variable.
787         (video_fb_mod_CFLAGS): Likewise.
788         (video_fb_mod_LDFLAGS): Likewise.
789         * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
790         video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
791         * video/i386/pc/vbeblit.c: Moved from here ...
792         * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
793         * video/i386/pc/vbefill.c: Moved from here ...
794         * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
795         * video/i386/pc/vbeutil.c: Moved from here ...
796         * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
797         * include/grub/i386/pc/vbeblit.h: Moved from here ...
798         * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
799         * include/grub/i386/pc/vbefill.h: Moved from here ...
800         * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
801         * include/grub/i386/pc/vbeutil.h: Moved from here ...
802         * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
803         * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
804         * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
805         * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
806         (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
807         (grub_video_adapter): Added 'get_info_and_fini'.
808         (grub_video_get_info_and_fini): New prototype.
809         (grub_video_set_mode): make modestring const char *.
810         * loader/i386/linux.c (grub_linux_setup_video): Use
811         grub_video_get_info_and_fini.
812         (grub_linux_boot): Move modesetting just before booting.
813         * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
814         grub_video_get_info_and_fini.
815         * video/i386/pc/vbe.c: Moved framebuffer part ...
816         * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
817         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
818         grub_video_fbstd_colors and grub_video_fb_set_palette.
819         (grub_video_vbe_init): Clear 'framebuffer' variable and use
820         grub_video_fb_init.
821         (grub_video_vbe_fini): Use grub_video_fb_fini.
822         (grub_video_vbe_setup): Use framebuffer.render_target instead of
823         render_target and use grub_video_fb_set_active_render_target and
824         grub_video_fb_set_palette.
825         (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
826         (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
827         (grub_video_vbe_adapter): Use framebuffer.
828         * video/video.c (grub_video_get_info_and_fini): New function.
829         (grub_video_set_mode): Make modestring const char *.
830         (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
831         values are already initialised.
833 2009-08-14  Pavel Roskin  <proski@gnu.org>
835         * boot/i386/pc/cdboot.S: Use LOCAL for local labels.  Eliminate
836         ABS and APPLE_CC.
837         * boot/i386/pc/diskboot.S: Likewise.
838         * boot/i386/pc/lnxboot.S: Likewise.  Hardcode the number of code
839         sectors allow compilation on MacOSX.
840         * conf/i386-pc.rmk: Enable unconditional compilation of
841         lnxboot.img.
843 2009-08-13  Colin Watson  <cjwatson@ubuntu.com>
845         * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
846         * util/grub.d/00_header.in: Enter interruptible sleep if
847         GRUB_HIDDEN_TIMEOUT is set.
849 2009-08-13  Yves Blusseau  <blusseau@zetam.org>
851         * include/grub/symbol.h: Add the LOCAL macro.
852         * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
853         starting with "L_".
855 2009-08-13  Pavel Roskin  <proski@gnu.org>
857         * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
858         any modern compilers we support.
860         * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
861         Use local labels starting with "L_" so that Apple assembler
862         knows they are local.
864 2009-08-10  Robert Millan  <rmh.grub@aybabtu.com>
866         * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
867         (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
868         (bsd_kernel_types): ... this enum.
870         * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
871         (grub_cmd_freebsd_module_elf): Abort with "You need to load the
872         kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
874         (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
875         (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
876         (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
877         messages.
879 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
881         * util/grub-dumpdevtree: Moved from here ...
882         * util/i386/efi/grub-dumpdevtree: ... to here.
883         (hexify): New function.  Converts a string to its hex version.
884         Generate hex versions of "efi" and "device-properties" by calling
885         hexify() on the ASCII strings rather than by hardcoding numbers.
887 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
889         * fs/jfs.c: Update copyright year.
891 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
893         * util/grub.d/00_header.in: Fix a comment.
894         * util/grub.d/10_linux.in: Likewise.
895         * util/grub.d/10_windows.in: Likewise.
896         * util/grub.d/10_hurd.in: Likewise.
898 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
900         * util/grub-mkconfig.in: Allow the user to specify the used font
901         with GRUB_FONT.
903 2009-08-08  Pavel Roskin  <proski@gnu.org>
905         * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
906         available, xfs.mod needs it now.
908         * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
909         the "g" modifier in sed when the intention is to strip something
910         once.  This fixes comparison of kernels with multiple dashes.
912         * util/grub-mkconfig.in: Define datarootdir, datadir may depend
913         on it.  Add missing space before closing bracket.  Fix
914         misleading formatting.
916 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
918         * docs/grub.texi: Major overhaul.  Remove all sections that are
919         specific to GRUB Legacy, or mostly composed of Legacy-specific
920         information.
922 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
924         * docs/version.texi: New file.  Provides version information for
925         grub.texi.
927 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
929         * docs/grub.texi: Update CVS information to SVN.
930         Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
932 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
934         * util/grub-mkconfig.in: Remove a wrong `fi'.
936 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
938         * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
939         (grub_jfs_uuid): New function.
940         (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
942 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
944         * util/grub-mkconfig_lib.in (font_path): Move the functionality
945         of it to ...
946         * util/grub-mkconfig.in: ... here.  Prefer unicode.pf2 and
947         unifont.pf2 over ascii.pf2.  Export LANG=C in case ascii.pf2 gets used.
949 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
951         * util/grub.d/10_linux.in (test_numeric): Moved from here ...
952         * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
953         Update all users.
955         * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
956         not just "vmlinu[zx]".
957         Moved from here ...
958         * util/grub-mkconfig_lib.in (version_test_gt): ... to here.  Update
959         all users.
961         * util/grub.d/10_linux.in (find_latest): Moved from here ...
962         * util/grub-mkconfig_lib.in (version_find_latest): ... to here.  Update
963         all users.
965 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
967         * util/grub.d/10_freebsd.in: Use an absolute device path for
968         `vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.
970 2009-08-06  Felix Zielcke  <fzielcke@z-51.de>
972         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
973         handling of multiple abstraction modules.
975 2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>
977         Fix a bug resulting in black screen when loading Linux using a
978         packed video mode.
980         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
981         function.
983         * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
984         (grub_vbe_bios_getset_dac_palette_width): New function.
985         (grub_vbe_bios_get_dac_palette_width)
986         (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
987         grub_vbe_bios_getset_dac_palette_width()).
989         * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
990         check for return status.
991         (grub_vbe_get_video_mode_info): When getting information for a packed
992         mode (<= 8 bpp), obtain DAC palette width using
993         grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
994         {red,green,blue}_mark_size.
996 2009-08-04  Felix Zielcke  <fzielcke@z-51.de>
998         * commands/search.c (options): Fix help output to match actual code.
1000 2009-08-02  Vladimir Serbinenko  <phcoder@gmail.com>
1002         * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
1003         of homegrown code.
1005 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1007         * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
1008         on XFS or ReiserFS.
1010 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1012         Support Apple partition map with sector size different from 512 bytes.
1014         * partmap/apple.c (grub_apple_header): New field 'blocksize'.
1015         (apple_partition_map_iterate): Respect 'aheader.blocksize'
1016         and 'apart.partmap_size'.
1018 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1019 2009-08-01  Robert Millan  <rmh.grub@aybabtu.com>
1021         Fix cpuid command.
1023         * commands/i386/cpuid.c (options): New variable.
1024         (grub_cmd_cpuid): Return real error.
1025         (GRUB_MOD_INIT(cpuid)): Declare options.
1027 2009-07-31  Vladimir Serbinenko  <phcoder@gmail.com>
1029         * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
1030         valid.
1032 2009-07-31  Bean  <bean123ch@gmail.com>
1034         * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
1035         log2_inode.
1036         (grub_fshelp_node): Move inode field to the end.
1037         (grub_xfs_data): Remove inode field.
1038         (grub_xfs_inode_block): Calculate inode size using sblock.
1039         (grub_xfs_inode_offset): Likewise.
1040         (grub_xfs_read_inode): Calculate inode size using sblock.
1041         (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
1042         (grub_xfs_iterate_dir): Calculate inode size using sblock.
1043         (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
1044         to match inode size.
1045         (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
1046         not accessible when data is null.
1047         (grub_xfs_open): Likewise.
1049 2009-07-31  Bean  <bean123ch@gmail.com>
1051         * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
1052         Don't change pv->disk if it's already set.
1054         * disk/raid.c (grub_raid_scan_device): Merge this function into ...
1055         (grub_raid_register): ... here.
1056         (grub_raid_rescan): Removed.
1058         * include/grub/raid.h (grub_raid_rescan): Removed.
1060         * util/grub-fstest.c: Remove include file <grub/raid.h>.
1061         (fstest): Replace grub_raid_rescan with module fini function followed
1062         by init function.
1064         * util/grub-probe.c: Add include file <grub/raid.h>.
1065         (probe_raid_level): New function.
1066         (probe): Detect abstraction by walking the disk device, support two
1067         level of abstraction (LVM on RAID) when detecting partition map.
1069 2009-07-31  Pavel Roskin  <proski@gnu.org>
1071         * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
1072         to grub_zalloc(), it was erroneous.
1073         Reported by Bean <bean123ch@gmail.com>
1075 2009-07-30  Vladimir Serbinenko  <phcoder@gmail.com>
1077         * util/i386/pc/grub-setup.c (setup): Check that no partition is in
1078         embedding zone, not only the first one.
1080 2009-07-29  Joe Auricchio  <jauricchio@gmail.com>
1082         * term/gfxterm.c (clear_char): New function.
1083         (grub_virtual_screen_setup): Use clear_char.
1084         (scroll_up): Likewise.
1085         (grub_virtual_screen_cls): Likewise.
1087 2009-07-29  Felix Zielcke  <fzielcke@z-51.de>
1089         * util/deviceiter.c (get_acceleraid_disk_name): New static
1090         function.
1091         (grub_util_iterate_devices): Handle Accelraid devices.
1092         * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
1094 2009-07-28  Robert Millan  <rmh.grub@aybabtu.com>
1096         * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
1097         separator for the suggested gfxpayload string (';' collides with the
1098         parser and needs escaping).
1100 2009-07-28  Vladimir Serbinenko  <phcoder@gmail.com>
1102         * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
1103         Clear direction flag before jumping to OS.
1104         (grub_multiboot2_real_boot): Likewise.
1106 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1108         * util/i386/pc/grub-install: Fix parsing of --disk-module
1109         option.
1111 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1113         * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
1114         when embedding.
1116 2009-07-26  Felix Zielcke  <fzielcke@z-51.de>
1118         * util/grub-mkconfig.in (package_version): New variable.
1119         Use it do display the version.
1121 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1123         * kern/file.c (grub_file_open): Revert to previous check with
1124         grub_errno.
1126 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1128         * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
1129         from help line. It's out of sync with code.
1131 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1133         * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
1134         entries on failed boot.
1136 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1138         * kern/file.c (grub_file_open): Fix an error check.
1140 2009-07-24  Vladimir Serbinenko  <phcoder@gmail.com>
1142         * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
1143         partition map couldn't be identified.
1145 2009-07-23  Pavel Roskin  <proski@gnu.org>
1147         * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
1148         instead of WORDS_BIGENDIAN.  Use grub_le_to_cpu32(), so that the
1149         case of little endian words becomes just an optimization.
1150         Respect const modifier.
1151         (md5_final): Use code that doesn't depend on endianness.
1153         * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
1154         to avoid loss of upper bits if align is unsigned and shorter
1155         than addr.
1157 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1159         UUID support for UFS
1161         * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
1162         (grub_ufs_uuid): New function.
1163         (grub_ufs_fs): add .uuid
1165 2009-07-21  Pavel Roskin  <proski@gnu.org>
1167         * kern/dl.c (grub_dl_check_header): Make static.
1169 2009-07-21  Felix Zielcke  <fzielcke@z-51.de>
1171         * util/grub.d/30_os-prober.in: Remove unused CHAINROOT.  Don't
1172         add drivemap for Vista.  It breaks Windows 7.
1174 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1176         * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
1177         128 bytes
1179 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1181         Add BFS support
1183         * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
1184         (grub_fstest_SOURCES): Likewise.
1185         (pkglib_MODULES): Add befs.mod.
1186         (befs_mod_SOURCES): New variable.
1187         (befs_mod_CFLAGS): Likewise.
1188         (befs_mod_LDFLAGS): Likewise.
1189         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1190         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1191         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1192         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1193         (grub_setup_SOURCES): Likewise.
1194         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1195         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1196         (grub_setup_SOURCES): Likewise.
1197         * fs/befs.c: New file.
1198         * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
1199         (GRUB_AFS_SBLOCK_SECTOR): Likewise.
1200         (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
1201         (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
1202         (B_KEY_INDEX_ALIGN): New declaration.
1203         (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
1204         (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
1205         (grub_afs_btree) [MODE_BFS]: New conditional declaration.
1206         (grub_afs_sblock) [MODE_BFS]: Remove link_count.
1207         (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
1208         (grub_afs_mount) [MODE_BFS]: Likewise.
1209         (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
1210         (grub_afs_fs): Use GRUB_AFS_FSNAME
1211         (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
1212         (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
1213         (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
1214         (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
1216 2009-07-19  Yves BLUSSEAU  <yves.grub-devel@zetam.org>
1218         * util/getroot.c (find_root_device): Add support for MacOSX.
1219         * util/hostdisk.c: Likewise.
1221 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1223         * font/font.c (find_glyph): Check whether a font is present to avoid
1224         segmentation fault.
1226 2009-07-20  Joe Auricchio  <jauricchio@gmail.com>
1228         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
1230 2009-07-20  Pavel Roskin  <proski@gnu.org>
1232         * configure.ac: Trim excessively wordy excuses.
1234 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1236         Add symlink, mtime and label support to AtheFS.
1238         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
1239         (grub_afs_iterate_dir): Handle symlinks.
1240         (grub_afs_open): Use grub_afs_read_symlink.
1241         (grub_afs_dir): Likewise.
1242         Pass mtime.
1243         (grub_afs_label): New function.
1244         (grub_afs_fs): Add grub_afs_label.
1245         (grub_afs_read_symlink): New function.
1247 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1249         Fix AtheFS support.
1251         * fs/afs.c: Fix comments style.
1252         (grub_afs_blockrun): Declare as packed.
1253         (grub_afs_datastream): Likewise.
1254         (grub_afs_bnode): Likewise.
1255         (grub_afs_btree): Likewise.
1256         (grub_afs_sblock): Likewise.
1257         Declare `name' as char.
1258         (grub_afs_inode): Declare as packed.
1259         Change void *vnode to grub_uint32_t unused.
1260         (grub_afs_iterate_dir): Check that key_size is positive.
1261         (grub_afs_mount): Don't read superblock twice.
1262         (grub_afs_dir): Don't free node in case of error,
1263         grub_fshelp_find_file already handles this.
1264         (grub_afs_open): Likewise.
1266 2009-07-19  Pavel Roskin  <proski@gnu.org>
1268         * Makefile.in: Remove LIBLZO and enable_lzo.
1269         * conf/i386-pc.rmk: Remove lzo support.
1270         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
1271         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
1272         support.
1273         * kern/i386/pc/lzo1x.S: Remove.
1274         * kern/i386/pc/startup.S: Remove lzo support.
1275         * util/i386/pc/grub-mkimage.c: Likewise.
1277 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
1279         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
1280         * fs/xfs.c (grub_xfs_dir): Likewise.
1281         * fs/afs.c (grub_afs_dir): Likewise.
1282         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
1283         (grub_iso9660_open): Likewise.
1284         * fs/jfs.c (grub_jfs_open): Likewise.
1285         * fs/ext2.c (grub_ext2_dir): Likewise.
1286         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
1287         * script/sh/lexer.c (grub_script_yylex): Likewise.
1289 2009-07-16  Pavel Roskin  <proski@gnu.org>
1291         * configure.ac: Never add "-c" to CFLAGS.
1293         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
1295         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
1296         grub_cv_cc_efiemu should be used.
1298         * configure.ac: Typo fixes.
1300         * kern/mm.c (grub_zalloc): New function.
1301         (grub_debug_zalloc): Likewise.
1302         * include/grub/mm.h: Declare grub_zalloc() and
1303         grub_debug_zalloc().
1304         * util/misc.c (grub_zalloc): New function.
1305         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
1306         instead of grub_malloc(), remove unneeded initializations.
1307         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
1308         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
1309         * commands/parttool.c (grub_cmd_parttool): Likewise.
1310         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
1311         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
1312         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
1313         * disk/usbms.c (grub_usbms_finddevs): Likewise.
1314         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
1315         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
1316         (grub_cmd_efiemu_pnvram): Likewise.
1317         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
1318         * fs/iso9660.c (grub_iso9660_mount): Likewise.
1319         (grub_iso9660_iterate_dir): Likewise.
1320         * fs/jfs.c (grub_jfs_opendir): Likewise.
1321         * fs/ntfs.c (list_file): Likewise.
1322         (grub_ntfs_mount): Likewise.
1323         * kern/disk.c (grub_disk_open): Likewise.
1324         * kern/dl.c (grub_dl_load_core): Likewise.
1325         * kern/elf.c (grub_elf_file): Likewise.
1326         * kern/env.c (grub_env_context_open): Likewise.
1327         (grub_env_set): Likewise.
1328         (grub_env_set_data_slot): Likewise.
1329         * kern/file.c (grub_file_open): Likewise.
1330         * kern/fs.c (grub_fs_blocklist_open): Likewise.
1331         * loader/i386/multiboot.c (grub_module): Likewise.
1332         * loader/xnu.c (grub_xnu_create_key): Likewise.
1333         (grub_xnu_create_value): Likewise.
1334         * normal/main.c (grub_normal_add_menu_entry): Likewise.
1335         (read_config_file): Likewise.
1336         * normal/menu_entry.c (make_screen): Likewise.
1337         * partmap/sun.c (sun_partition_map_iterate): Likewise.
1338         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
1339         * script/sh/script.c (grub_script_parse): Likewise.
1340         * video/bitmap.c (grub_video_bitmap_create): Likewise.
1341         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
1342         * video/readers/png.c (grub_png_output_byte): Likewise.
1343         (grub_video_reader_png): Likewise.
1345 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1347         Enable all targets that can be built by default
1349         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
1350         grub-mkfont and grub-fstest if they can be built
1352 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1354         Fix hang and segmentation fault in grub-emu-usb
1356         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
1357         * util/usb.c (grub_libusb_devices): likewise
1358         (grub_libusb_init): rename to ...
1359         (GRUB_MOD_INIT (libusb)):...this
1360         (grub_libusb_fini): rename to ..
1361         (GRUB_MOD_FINI (libusb)):...this
1362         * disk/usbms.c (grub_usbms_transfer): fix retry logic
1363         * include/grub/disk.h (grub_raid_init): removed, it's useless
1364         (grub_raid_fini): likewise
1365         (grub_lvm_init): likewise
1366         (grub_lvm_fini): likewise
1367         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
1368         by grub_init_all
1370 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1372         Fix libusb
1374         * Makefile.in (LIBUSB): new macro
1375         * genmk.rb (Utility/print_tail): new method
1376         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
1377         (top level): call util.print_tail at the end.
1379 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1381         Make FreeBSD accept zpool.cache
1383         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
1384         type is /boot/zfs/zpool.cache
1386 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1388         Fix 64-bit efiemu
1390         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
1391         correct wrong typedef
1392         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
1394 2009-07-15  Pavel Roskin  <proski@gnu.org>
1396         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
1397         * kern/disk.c (struct grub_disk_cache): Likewise.
1399         * commands/probe.c (options): Typo fix.
1401         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
1402         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
1403         accordingly.
1404         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
1406         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
1407         the end of "Error" to make the message more readable.
1409         * boot/i386/pc/boot.S (kernel_segment): Remove.
1410         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
1411         for destination.
1413         * boot/i386/pc/boot.S (boot_version): Remove.
1414         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
1415         Remove.
1417         * include/grub/i386/pc/boot.h: Sort all offsets.
1418         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
1419         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
1420         * boot/i386/pc/boot.S: Assert location of every offset listed in
1421         include/grub/i386/pc/boot.h.
1423 2009-07-13  Pavel Roskin  <proski@gnu.org>
1425         * include/grub/i386/coreboot/machine.h: Rename
1426         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
1427         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
1428         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
1430         * kern/dl.c: Force native word size to suppress warnings when
1431         compiling grub-emu.
1433         * kern/device.c (grub_device_iterate): Change struct part_ent to
1434         hold the name, not a pointer to it.  Use one grub_malloc() per
1435         partition, not two.  Free partition_name if grub_malloc() fails.
1436         Set ents to NULL only before grub_partition_iterate() is called.
1438 2009-07-11  Bean  <bean123ch@gmail.com>
1440         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
1441         childname.
1443 2009-07-10  Bean  <bean123ch@gmail.com>
1444 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
1446         * kern/ieee1275/openfw.c (grub_children_iterate)
1447         (grub_devalias_iterate): Fix size evaluation for property or path
1448         strings, which was broken since r2132.
1450 2009-07-07  Pavel Roskin  <proski@gnu.org>
1452         * commands/search.c (search_file): Merge into ...
1453         (search_fs): ... this.  Accept search type as argument.
1454         (grub_cmd_search): Pass search type to search_fs().
1456         * include/grub/util/console.h: New file.
1457         * util/console.c: Use it instead of grub/machine/console.h.
1458         * util/grub-emu.c: Likewise.
1460         * lib/arg.c (find_long_option): Remove.
1461         (find_long): Add `len' argument, make `s' const char *.
1462         (grub_arg_parse): Parse long options in place, not in a
1463         temporary buffer.
1465 2009-07-06  Pavel Roskin  <proski@gnu.org>
1467         * commands/search.c (search_fs): Fix potential NULL pointer
1468         dereference.
1470         * commands/search.c (search_fs): Replace QUID macro with quid_fn
1471         function pointer.
1473 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
1475         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
1476         comparison.
1478 2009-07-05  Pavel Roskin  <proski@gnu.org>
1480         * include/grub/i386/linux.h (struct linux_kernel_params):
1481         Restore padding3, it's still needed.
1483         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
1484         FreeBSD.
1485         * util/osdetect.lua: Likewise.
1487 2009-07-05  Bean  <bean123ch@gmail.com>
1489         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
1491         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
1492         (grub_lua_getenv): Likewise.
1493         (grub_lua_setenv): Likewise.
1494         (save_errno): New function.
1495         (push_result): Likewise.
1496         (grub_lua_enum_device): Likewise.
1497         (grub_lua_enum_file): Likewise.
1498         (grub_lua_file_open): Likewise.
1499         (grub_lua_file_close): Likewise.
1500         (grub_lua_file_seek): Likewise.
1501         (grub_lua_file_read): Likewise.
1502         (grub_lua_file_getline): Likewise.
1503         (grub_lua_file_getsize): Likewise.
1504         (grub_lua_file_getpos): Likewise.
1505         (grub_lua_file_eof): Likewise.
1506         (grub_lua_file_exist): Likewise.
1507         (grub_lua_add_menu): Likewise.
1509         * script/lua/grub_lua.h (isupper): New inline function.
1510         (islower): Likewise.
1511         (ispunct): Likewise.
1512         (isxdigit): Likewise.
1513         (strcspn): Change to normal function.
1514         (strpbkr): New function declaration.
1515         (memchr): Likewise.
1517         * script/lua/grub_main.c (scan_str): New function.
1518         (strcspn): Likewise.
1519         (strpbrk): Likewise.
1520         (memchr): Likewise.
1522         * script/lua/linit.c (lualibs): Enable the string library.
1524         * util/osdetect.lua: New file.
1526 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
1528         * include/grub/i386/linux.h (struct linux_kernel_params): Add
1529         `capabilities' member.
1531 2009-07-02  Pavel Roskin  <proski@gnu.org>
1533         * genparttoollist.sh: Add missing newline at the end.
1535 2009-07-01  Pavel Roskin  <proski@gnu.org>
1537         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
1539         * util/hostdisk.c (open_device): Remove `const' from
1540         `sysctl_size', as sysctlbyname() can change it (in this case it
1541         doesn't actually happen).
1543         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
1544         using signed long int constants.
1546         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
1547         constant to avoid a warning on FreeBSD.
1549         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
1550         where it's needed.
1552         * Makefile.in: Install include/grub/machine symlink.
1554         * Makefile.in: When installing symlinks, use "cp -fR", which
1555         works on FreeBSD and MacOSX.
1556         From Yves Blusseau <cl7m42e02@sneakemail.com>
1558         * kern/dl.c (grub_dl_resolve_symbol): Make static.
1559         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
1561         * util/misc.c: Move grub_reboot() and grub_halt() ...
1562         * util/grub-emu.c: ... here.  Make main_env static.
1563         * include/grub/util/misc.h: Remove main_env.
1565         * kern/mm.c: Use correct format to print size_t.
1567         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
1568         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
1569         * kern/powerpc/dl.c: Likewise.
1570         * kern/sparc64/dl.c: Likewise.
1571         * kern/x86_64/dl.c: Likewise.
1573 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1575         Fix grub-emu build on sparc64-ieee1275.
1577         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
1578         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
1580 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1582         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
1583         (grub_reboot, grub_halt): New functions.
1585         * util/i386/pc/misc.c: Delete.  Update all users.
1586         * util/sparc64/ieee1275/misc.c: Likewise.
1587         * util/powerpc/ieee1275/misc.c: Likewise.
1589 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1591         * conf/i386.rmk (setjmp_mod_SOURCES)
1592         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
1593         * conf/common.rmk (setjmp_mod_SOURCES)
1594         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
1595         to use $(target_cpu).
1596         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
1597         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
1598         * conf/powerpc-ieee1275.rmk: Likewise.
1599         * conf/sparc64-ieee1275.rmk: Likewise.
1601         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
1602         $(target_cpu) for kern/$(target_cpu)/dl.c.
1603         * conf/i386-efi.rmk: Likewise.
1604         * conf/i386-ieee1275.rmk: Likewise.
1605         * conf/x86_64-efi.rmk: Likewise.
1606         * conf/i386-coreboot.rmk: Likewise.
1607         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
1608         $(target_cpu) for kern/$(target_cpu)/dl.c and for
1609         kern/$(target_cpu)/cache.S.
1610         * conf/sparc64-ieee1275.rmk: Likewise.
1612 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1614         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
1615         type to `grub_uint8_t', and adjust `padding9' accordingly.
1617 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1619         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
1621         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
1622         assembly in final jump, using register constraints.
1624         (grub_linux_boot): For text mode, initialize `have_vga' using
1625         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
1627         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
1628         right before the final jump.
1630         Set `video_mode' to 0x3.
1632         Document initialization of `video_page', `video_mode' and
1633         `video_ega_bx'.
1635 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1637         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
1638         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
1639         and set GRUB_LINUX_FLAG_QUIET appropriately.
1641 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1643         Fix build on Debian / sparc.
1645         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
1647 2009-06-28  Pavel Roskin  <proski@gnu.org>
1649         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
1650         fix a warning.
1652         * util/grub.d/10_linux.in: Match SUSE style initrd names.
1654 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1656         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
1657         `err'.
1659 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1661         Revert r2338.
1663         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
1664         file can't be opened.  grub_file_open() is already supposed to set
1665         grub_errno / grub_errmsg appropriately.
1666         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1668 2009-06-27  Pavel Roskin  <proski@gnu.org>
1669 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1671         * include/grub/dl.h: Include grub/elf.h.
1672         (struct grub_dl): Add symtab field.
1673         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
1674         GRUB_MODULES_MACHINE_READONLY.
1675         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
1676         of the header for read-only modules.
1677         (grub_dl_unload): Free mod->symtab for read-only modules.
1678         * kern/i386/dl.c: Use mod->symtab.
1679         * kern/powerpc/dl.c: Likewise.
1680         * kern/sparc64/dl.c: Likewise.
1681         * kern/x86_64/dl.c: Likewise.
1683         * conf/i386-qemu.rmk: New file.
1684         * kern/i386/qemu/startup.S: Likewise.
1685         * kern/i386/qemu/mmap.c: Likewise.
1686         * boot/i386/qemu/boot.S: Likewise.
1687         * include/grub/i386/qemu/time.h: Likewise.
1688         * include/grub/i386/qemu/serial.h: Likewise.
1689         * include/grub/i386/qemu/kernel.h: Likewise.
1690         * include/grub/i386/qemu/console.h: Likewise.
1691         * include/grub/i386/qemu/boot.h: Likewise.
1692         * include/grub/i386/qemu/init.h: Likewise.
1693         * include/grub/i386/qemu/machine.h: Likewise.
1694         * include/grub/i386/qemu/loader.h: Likewise.
1695         * include/grub/i386/qemu/memory.h: Likewise.
1697         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
1698         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
1699         [qemu] (pkglib_IMAGES): Add `boot.img'.
1700         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
1701         [qemu] (boot_img_FORMAT): New variables.
1702         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
1703         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
1704         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
1705         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
1706         [qemu] (kernel_img_FORMAT): New variables.
1708         * configure.ac: Recognise `i386-qemu'.
1710         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
1711         (for no compression).
1712         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
1713         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
1714         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
1715         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
1716         ifdefs).
1718 2009-06-27  Pavel Roskin  <proski@gnu.org>
1720         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
1721         read.
1722         * efiemu/prepare32.c: Likewise.
1723         * efiemu/prepare64.c: Likewise.
1725 2009-06-26  Pavel Roskin  <proski@gnu.org>
1727         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
1728         * include/grub/elf.h: Define symbols without "32" or "64" based
1729         on GRUB_TARGET_WORDSIZE.
1730         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
1731         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
1732         ELF definitions.
1733         * efiemu/loadcore64.c: Likewise.
1734         * loader/i386/bsd32.c: Likewise.
1735         * loader/i386/bsd64.c: Likewise.
1736         * kern/dl.c: Remove own ELF definitions.
1737         * util/i386/efi/grub-mkimage.c: Likewise.
1739 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
1741         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
1742         segment 0x0 unconditionally, because the reference generated by
1743         GAS is an absolute address.
1745 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1747         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
1748         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
1750 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1752         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
1753         indexes.  Check for -f explicitly.
1754         (search_file): Improve error message.
1755         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
1757 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1759         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
1760         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
1762 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1764         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
1765         * conf/i386-ieee1275.rmk: Likewise.
1766         * conf/i386-coreboot.rmk: Likewise.
1768         * kern/i386/pc/startup.S (grub_stop): Remove function.
1769         * kern/i386/ieee1275/startup.S: Likewise.
1770         * kern/i386/coreboot/startup.S: Likewise.
1771         * kern/i386/misc.S (grub_stop): New function.
1773 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1775         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
1776         * kern/i386/realmode.S (real_to_prot): ... to here.
1778 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
1780         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
1781         with `kernel.img'.
1782         (kernel_elf_SOURCES): Rename to ...
1783         (kernel_img_SOURCES): ... this.
1784         (kernel_elf_HEADERS): Rename to ...
1785         (kernel_img_HEADERS): ... this.  Update all users.
1786         (kernel_elf_ASFLAGS): Rename to ...
1787         (kernel_img_ASFLAGS): ... this.
1788         (kernel_elf_CFLAGS): Rename to ...
1789         (kernel_img_CFLAGS): ... this.
1790         (kernel_elf_LDFLAGS): Rename to ...
1791         (kernel_img_LDFLAGS): ... this.
1792         * conf/i386-coreboot.rmk: Likewise.
1793         * conf/powerpc-ieee1275.rmk: Likewise.
1795         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
1796         with "kernel.img".
1798 2009-06-21  Pavel Roskin  <proski@gnu.org>
1800         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
1801         to match nested functions.
1802         * loader/sparc64/ieee1275/linux.c: Likewise.
1804         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
1806 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1808         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
1809         all i386 platforms.
1811 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
1813         Fix asm file handling on ELF, and remove workarounds.
1815         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
1816         and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
1817         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
1818         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
1820 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
1822         Load BSD ELF modules
1824         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
1825         and loader/i386/bsd64.c
1826         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
1827         (FREEBSD_MODTYPE_ELF_MODULE): New definition
1828         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
1829         (grub_freebsd_load_elfmodule32): New declaration
1830         (grub_freebsd_load_elfmoduleobj64): Likewise
1831         (grub_freebsd_load_elf_meta32): Likewise
1832         (grub_freebsd_load_elf_meta64): Likewise
1833         (grub_freebsd_add_meta): Likewise
1834         (grub_freebsd_add_meta_module): Likewise
1835         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
1836         (grub_freebsd_add_meta_module): Likewise and move module-specific
1837         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
1838         (grub_cmd_freebsd): Add elf-kernel specific parts
1839         based on grub_freebsd_add_meta_module
1840         (grub_cmd_freebsd_module): Add type parsing moved from
1841         grub_freebsd_add_meta_module
1842         (grub_cmd_freebsd_module_elf): New function
1843         (cmd_freebsd_module_elf): New variable
1844         (GRUB_MOD_INIT): Register freebsd_module_elf
1845         * loader/i386/bsd32.c: New file
1846         * loader/i386/bsd64.c: Likewise
1847         * loader/i386/bsdXX.c: Likewise
1848         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
1849         (grub_elf64_load): Likewise
1850         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
1851         All users updated
1852         (grub_elf64_load_hook_t): Likewise
1854 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
1856         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
1857         variable.
1858         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
1859         don't write a menu entry for recovery mode.
1861 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1863         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
1864         after it's no longer needed.
1866 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
1868         * include/grub/i386/loader.h (grub_linux_prot_size)
1869         (grub_linux_tmp_addr, grub_linux_real_addr)
1870         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
1871         GRUB_MACHINE_PCBIOS.
1872         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
1873         common grub_util_info() call to ...
1874         (generate_image): ... here.
1875         Fix use of uninitialized memory, comparison of signed with
1876         unsigned integers and memory leak.
1877         Remove bogus module address message.
1879 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
1881         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
1882         grub_raid_register
1883         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
1885 2009-06-19  Pavel Roskin  <proski@gnu.org>
1887         * configure.ac: Remove stray AC_MSG_CHECKING.
1889 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
1891         * disk/scsi.c (grub_scsi_open): use continue instead of big if
1893 2009-06-18  Pavel Roskin  <proski@gnu.org>
1895         * conf/common.rmk: Add fs_file.mod.
1896         * disk/fs_file.c: New file.
1897         * include/grub/disk.h (enum grub_disk_dev_id): Add
1898         GRUB_DISK_DEVICE_FILE_ID.
1900 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1902         Fix build with Apple's toolchain. Part 2
1904         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
1905         a fake start
1907 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1909         Fix build with Apple's toolchain. Part 1
1911         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
1912         for long calls
1913         * configure.ac: remove a leftover AC_MSG_RESULT
1914         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
1915         Apple's toolchain
1917 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
1919         Fix warnings
1921         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
1922         (decomp_block): initialize ch
1923         use grub_memcpy instead of memcpy
1925 2009-06-17  Pavel Roskin  <proski@gnu.org>
1927         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
1928         version, use declarations needed to use vga_text as the startup
1929         console.
1931         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
1932         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
1933         the kernel.
1934         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
1935         and grub_at_keyboard_fini(), it's done on module load and
1936         unload.
1938 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
1940         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
1941         file can't be found.
1942         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1944 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1946         Fix newline handling
1948         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
1949         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
1950         (grub_script_yylex): don't segfault on unterminated script
1951         newline terminates command and variable
1953 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
1955         avoid double grub_adjust_range call. Bug reported by David Simner
1957         * kern/disk.c (grub_disk_write): change to raw disk access before
1958         calling disk_read
1960 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
1962         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
1963         spaces, for the benefit of help2man.
1964         * util/i386/efi/grub-mkimage.c (usage): Likewise.
1966 2009-06-16  Pavel Roskin  <proski@gnu.org>
1968         * kern/i386/halt.c: Include grub/machine/init.h.
1969         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
1971 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
1973         * util/grub.d/30_os-prober.in: Use ${root} in the generated
1974         drivemap menuentry.
1976 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
1978         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
1979         `echo' command.
1981 2009-06-16  Pavel Roskin  <proski@gnu.org>
1983         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
1984         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
1985         save %dx, we only need %dl and we never change it.
1986         * boot/i386/pc/cdboot.S: Don't set the root drive.
1987         * boot/i386/pc/pxeboot.S: Likewise.
1988         * include/grub/i386/pc/boot.h: Remove
1989         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
1990         GRUB_BOOT_MACHINE_DRIVE_CHECK.
1991         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
1992         * kern/i386/pc/init.c (make_install_device): Remove references
1993         to grub_root_drive.
1994         * kern/i386/pc/startup.S: Likewise.
1995         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
1997 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
1999         xnu_uuid command
2001         * commands/xnu_uuid.c: new file
2002         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
2003         (xnu_uuid_mod_SOURCES): new variable
2004         (xnu_uuid_mod_CFLAGS): likewise
2005         (xnu_uuid_mod_LDFLAGS): likewise
2006         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2007         * conf/i386-ieee1275.rmk: likewise
2008         * conf/i386-pc.rmk: likewise
2009         * conf/powerpc-ieee1275.rmk: likewise
2010         * conf/sparc64-ieee1275.rmk: likewise
2011         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
2013 2009-06-16  Pavel Roskin  <proski@gnu.org>
2015         * configure.ac: Avoid '==' in test command, it's not portable.
2017 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2019         Probe command
2021         * commands/probe.c: new file
2022         * conf/common.rmk (pkglib_MODULES): add probe.mod
2023         (probe_mod_SOURCES): new variable
2024         (probe_mod_CFLAGS): likewise
2025         (probe_mod_LDFLAGS): likewise
2026         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2027         * conf/i386-ieee1275.rmk: likewise
2028         * conf/i386-pc.rmk: likewise
2029         * conf/powerpc-ieee1275.rmk: likewise
2030         * conf/sparc64-ieee1275.rmk: likewise
2032 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
2034         Fix handling of string like \"hello\" and "a
2035         b"
2037         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
2038         (grub_script_yylex): fix parsing of quoting, escaping and newline
2040 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
2042         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
2043         handling
2045 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
2047         * util/grub-mkconfig.in: Fix parsing of --output option.
2049 2009-06-12  Pavel Roskin  <proski@gnu.org>
2051         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
2052         genmk.rb don't need to be generated or installed.
2054 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
2056         * commands/i386/pc/drivemap_int13h.S: add more comments
2058 2009-06-11  Pavel Roskin  <proski@gnu.org>
2060         * Makefile.in (uninstall): Uninstall manuals.
2062         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
2063         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
2064         and update-grub_lib in two places.
2065         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
2067         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
2068         a compiler warning.
2070         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
2071         `entry_lo' to fix variable shadowing.
2073 2009-06-11  Christian Franke  <franke@computer.org>
2075         * kern/misc.c (__enable_execute_stack): Add missing return type
2076         to prevent gcc warning.
2078 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2080         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
2082 2009-06-11  Pavel Roskin  <proski@gnu.org>
2084         * Makefile.in: Don't rely on any scripts being executable.
2085         Always use $(SHELL) to run shell scripts.
2087         * configure.ac: Always define ___main if using -nostdlib.  This
2088         fixes tests on Cygwin.
2090 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
2092         UDF fix
2094         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
2095         is in bytes and not in blocks
2097 2009-06-11  Pavel Roskin  <proski@gnu.org>
2099         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
2100         warning.
2102 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2104         * util/grub.d/30_os-prober.in: Fix a comment. Source
2105         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
2106         to set the root device.  Place drivemap command in the generated
2107         chain entry.
2109 2009-06-11  Pavel Roskin  <proski@gnu.org>
2111         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
2112         have long been resolved.
2114 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
2116         * util/grub.d/10_linux.in: Capitalise "Linux".
2118         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
2120 2009-06-11  Pavel Roskin  <proski@gnu.org>
2122         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
2123         fix a gcc warning and ensure that the function won't ever exit.
2125         * kern/i386/ieee1275/init.c: Add missing prototype for
2126         grub_stop_floppy().
2128         * loader/ieee1275/multiboot2.c [__i386__]: Include
2129         grub/cpu/multiboot.h.
2131         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
2132         casts to short - they are not portable and cause warnings.  Fix
2133         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
2135 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
2137         Drivemap fixes
2139         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
2140         new function
2141         (grub_get_root_biosnumber_saved): new variable
2142         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
2143         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
2144         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
2145         %dx after the call if necessary
2146         * conf/common.rmk (pkglib_MODULES): remove boot.mod
2147         (boot_mod_SOURCES): remove
2148         (boot_mod_CFLAGS): remove
2149         (boot_mod_LDFLAGS): remove
2150         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
2151         (boot_mod_SOURCES): new variable
2152         (boot_mod_CFLAGS): likewise
2153         (boot_mod_LDFLAGS): likewise
2154         * conf/i386-efi.rmk: likewise
2155         * conf/i386-ieee1275.rmk: likewise
2156         * conf/i386-pc.rmk: likewise
2157         * conf/powerpc-ieee1275.rmk: likewise
2158         * conf/sparc64-ieee1275.rmk: likewise
2159         * conf/x86_64-efi.rmk: likewise
2160         * include/grub/i386/pc/biosnum.h: new file
2161         * lib/i386/pc/biosnum.c: likewise
2162         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
2163         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
2164         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2166 2009-06-10  Pavel Roskin  <proski@gnu.org>
2168         * io/gzio.c (test_header): Don't reuse one buffer for all data.
2169         Use separate variables.  Read only the file size at the end, but
2170         not the checksum that we don't use.
2172         * kern/file.c (grub_file_read): Use void pointer for the buffer.
2173         Adjust all callers.
2175         * kern/ieee1275/openfw.c: Remove libc includes.
2176         * kern/ieee1275/cmain.c: Likewise.
2177         * include/grub/ieee1275/ieee1275.h: Likewise.
2179         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
2180         compiler warnings.
2182 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2184         * Makefile.in: Remove all trailing whitespace.
2185         * conf/i386-pc.rmk: Likewise.
2186         * conf/powerpc-ieee1275.rmk: Likewise.
2187         * conf/sparc64-ieee1275.rmk: Likewise.
2188         * docs/grub.texi: Likewise.
2189         * docs/texinfo.tex: Likewise.
2190         * disk/fs_uuid.c: Likewise.
2191         * disk/lvm.c: Likewise.
2192         * disk/scsi.c: Likewise.
2193         * disk/ata.c: Likewise.
2194         * disk/ieee1275/ofdisk.c: Likewise.
2195         * disk/i386/pc/biosdisk.c: Likewise.
2196         * disk/host.c: Likewise.
2197         * disk/raid.c: Likewise.
2198         * disk/efi/efidisk.c: Likewise.
2199         * disk/usbms.c: Likewise.
2200         * disk/memdisk.c: Likewise.
2201         * disk/loopback.c: Likewise.
2202         * kern/powerpc/dl.c: Likewise.
2203         * kern/device.c: Likewise.
2204         * kern/dl.c: Likewise.
2205         * kern/sparc64/dl.c: Likewise.
2206         * kern/ieee1275/ieee1275.c: Likewise.
2207         * kern/term.c: Likewise.
2208         * kern/fs.c: Likewise.
2209         * kern/i386/dl.c: Likewise.
2210         * kern/i386/pc/startup.S: Likewise.
2211         * kern/i386/pc/init.c: Likewise.
2212         * kern/i386/pc/mmap.c: Likewise.
2213         * kern/i386/pc/lzo1x.S: Likewise.
2214         * kern/i386/ieee1275/init.c: Likewise.
2215         * kern/i386/realmode.S: Likewise.
2216         * kern/i386/tsc.c: Likewise.
2217         * kern/partition.c: Likewise.
2218         * kern/corecmd.c: Likewise.
2219         * kern/file.c: Likewise.
2220         * kern/efi/efi.c: Likewise.
2221         * kern/efi/init.c: Likewise.
2222         * kern/efi/mm.c: Likewise.
2223         * kern/main.c: Likewise.
2224         * kern/err.c: Likewise.
2225         * kern/env.c: Likewise.
2226         * kern/disk.c: Likewise.
2227         * kern/generic/millisleep.c: Likewise.
2228         * kern/generic/rtc_get_time_ms.c: Likewise.
2229         * kern/misc.c: Likewise.
2230         * kern/parser.c: Likewise.
2231         * genmk.rb: Likewise.
2232         * configure.ac: Likewise.
2233         * boot/i386/pc/diskboot.S: Likewise.
2234         * boot/i386/pc/pxeboot.S: Likewise.
2235         * boot/i386/pc/boot.S: Likewise.
2236         * boot/i386/pc/lnxboot.S: Likewise.
2237         * boot/i386/pc/cdboot.S: Likewise.
2238         * parttool/pcpart.c: Likewise.
2239         * video/readers/tga.c: Likewise.
2240         * video/video.c: Likewise.
2241         * video/bitmap.c: Likewise.
2242         * lib/envblk.c: Likewise.
2243         * lib/i386/setjmp.S: Likewise.
2244         * fs/xfs.c: Likewise.
2245         * fs/afs.c: Likewise.
2246         * fs/fat.c: Likewise.
2247         * fs/ntfs.c: Likewise.
2248         * fs/udf.c: Likewise.
2249         * fs/affs.c: Likewise.
2250         * fs/iso9660.c: Likewise.
2251         * fs/hfs.c: Likewise.
2252         * fs/fshelp.c: Likewise.
2253         * fs/ext2.c: Likewise.
2254         * fs/jfs.c: Likewise.
2255         * fs/reiserfs.c: Likewise.
2256         * fs/hfsplus.c: Likewise.
2257         * fs/minix.c: Likewise.
2258         * fs/cpio.c: Likewise.
2259         * fs/sfs.c: Likewise.
2260         * fs/ufs.c: Likewise.
2261         * efiemu/prepare.c: Likewise.
2262         * efiemu/loadcore_common.c: Likewise.
2263         * efiemu/runtime/efiemu.sh: Likewise.
2264         * efiemu/runtime/efiemu.S: Likewise.
2265         * efiemu/runtime/efiemu.c: Likewise.
2266         * efiemu/pnvram.c: Likewise.
2267         * efiemu/main.c: Likewise.
2268         * efiemu/i386/pc/cfgtables.c: Likewise.
2269         * efiemu/i386/loadcore64.c: Likewise.
2270         * efiemu/i386/loadcore32.c: Likewise.
2271         * efiemu/loadcore.c: Likewise.
2272         * efiemu/symbols.c: Likewise.
2273         * efiemu/mm.c: Likewise.
2274         * include/grub/autoefi.h: Likewise.
2275         * include/grub/datetime.h: Likewise.
2276         * include/grub/term.h: Likewise.
2277         * include/grub/hfs.h: Likewise.
2278         * include/grub/lvm.h: Likewise.
2279         * include/grub/i386/tsc.h: Likewise.
2280         * include/grub/i386/linux.h: Likewise.
2281         * include/grub/i386/xnu.h: Likewise.
2282         * include/grub/i386/efiemu.h: Likewise.
2283         * include/grub/i386/pc/biosdisk.h: Likewise.
2284         * include/grub/i386/pc/memory.h: Likewise.
2285         * include/grub/i386/pc/vbe.h: Likewise.
2286         * include/grub/parttool.h: Likewise.
2287         * include/grub/video.h: Likewise.
2288         * include/grub/memory.h: Likewise.
2289         * include/grub/fs.h: Likewise.
2290         * include/grub/partition.h: Likewise.
2291         * include/grub/xnu.h: Likewise.
2292         * include/grub/efi/api.h: Likewise.
2293         * include/grub/efi/pe32.h: Likewise.
2294         * include/grub/efi/memory.h: Likewise.
2295         * include/grub/multiboot.h: Likewise.
2296         * include/grub/usbdesc.h: Likewise.
2297         * include/grub/multiboot2.h: Likewise.
2298         * include/grub/acpi.h: Likewise.
2299         * include/grub/efiemu/efiemu.h: Likewise.
2300         * include/grub/disk.h: Likewise.
2301         * include/grub/ieee1275/ieee1275.h: Likewise.
2302         * include/grub/net.h: Likewise.
2303         * include/grub/machoload.h: Likewise.
2304         * include/grub/macho.h: Likewise.
2305         * include/multiboot.h: Likewise.
2306         * genmoddep.awk: Likewise.
2307         * normal/main.c: Likewise.
2308         * normal/menu_entry.c: Likewise.
2309         * normal/menu_viewer.c: Likewise.
2310         * normal/completion.c: Likewise.
2311         * normal/cmdline.c: Likewise.
2312         * normal/misc.c: Likewise.
2313         * normal/datetime.c: Likewise.
2314         * bus/usb/usbtrans.c: Likewise.
2315         * bus/usb/ohci.c: Likewise.
2316         * bus/usb/uhci.c: Likewise.
2317         * bus/usb/usb.c: Likewise.
2318         * mmap/efi/mmap.c: Likewise.
2319         * mmap/i386/pc/mmap_helper.S: Likewise.
2320         * mmap/i386/pc/mmap.c: Likewise.
2321         * mmap/i386/mmap.c: Likewise.
2322         * mmap/i386/uppermem.c: Likewise.
2323         * mmap/mmap.c: Likewise.
2324         * commands/acpi.c: Likewise.
2325         * commands/echo.c: Likewise.
2326         * commands/blocklist.c: Likewise.
2327         * commands/loadenv.c: Likewise.
2328         * commands/usbtest.c: Likewise.
2329         * commands/boot.c: Likewise.
2330         * commands/parttool.c: Likewise.
2331         * commands/search.c: Likewise.
2332         * commands/cat.c: Likewise.
2333         * commands/i386/pc/play.c: Likewise.
2334         * commands/i386/pc/drivemap.c: Likewise.
2335         * commands/i386/pc/vbeinfo.c: Likewise.
2336         * commands/i386/pc/acpi.c: Likewise.
2337         * commands/i386/pc/vbetest.c: Likewise.
2338         * commands/ls.c: Likewise.
2339         * commands/cmp.c: Likewise.
2340         * commands/test.c: Likewise.
2341         * commands/efi/acpi.c: Likewise.
2342         * commands/gptsync.c: Likewise.
2343         * commands/help.c: Likewise.
2344         * partmap/amiga.c: Likewise.
2345         * partmap/apple.c: Likewise.
2346         * partmap/acorn.c: Likewise.
2347         * partmap/pc.c: Likewise.
2348         * partmap/sun.c: Likewise.
2349         * partmap/gpt.c: Likewise.
2350         * script/sh/lexer.c: Likewise.
2351         * script/sh/function.c: Likewise.
2352         * font/font.c: Likewise.
2353         * font/font_cmd.c: Likewise.
2354         * loader/powerpc/ieee1275/linux.c: Likewise.
2355         * loader/efi/chainloader.c: Likewise.
2356         * loader/multiboot_loader.c: Likewise.
2357         * loader/macho.c: Likewise.
2358         * loader/i386/multiboot.c: Likewise.
2359         * loader/i386/linux.c: Likewise.
2360         * loader/i386/pc/linux.c: Likewise.
2361         * loader/i386/pc/multiboot2.c: Likewise.
2362         * loader/i386/pc/chainloader.c: Likewise.
2363         * loader/i386/pc/xnu.c: Likewise.
2364         * loader/i386/bsd_trampoline.S: Likewise.
2365         * loader/i386/efi/linux.c: Likewise.
2366         * loader/i386/multiboot_elfxx.c: Likewise.
2367         * loader/i386/bsd_helper.S: Likewise.
2368         * loader/i386/bsd.c: Likewise.
2369         * loader/i386/linux_trampoline.S: Likewise.
2370         * loader/i386/xnu_helper.S: Likewise.
2371         * loader/i386/xnu.c: Likewise.
2372         * loader/i386/bsd_pagetable.c: Likewise.
2373         * loader/i386/multiboot_helper.S: Likewise.
2374         * loader/xnu.c: Likewise.
2375         * loader/xnu_resume.c: Likewise.
2376         * io/gzio.c: Likewise.
2377         * term/efi/console.c: Likewise.
2378         * term/terminfo.c: Likewise.
2379         * term/ieee1275/ofconsole.c: Likewise.
2380         * term/i386/pc/serial.c: Likewise.
2381         * term/i386/pc/vesafb.c: Likewise.
2382         * term/i386/pc/vga.c: Likewise.
2383         * term/usb_keyboard.c: Likewise.
2384         * term/gfxterm.c: Likewise.
2385         * aclocal.m4: Likewise.
2386         * util/lvm.c: Likewise.
2387         * util/grub.d/30_os-prober.in: Likewise.
2388         * util/grub.d/10_hurd.in: Likewise.
2389         * util/console.c: Likewise.
2390         * util/grub-macho2img.c: Likewise.
2391         * util/grub-probe.c: Likewise.
2392         * util/hostfs.c: Likewise.
2393         * util/i386/pc/grub-mkimage.c: Likewise.
2394         * util/i386/pc/grub-setup.c: Likewise.
2395         * util/i386/efi/grub-mkimage.c: Likewise.
2396         * util/grub-mkconfig.in: Likewise.
2397         * util/raid.c: Likewise.
2398         * util/resolve.c: Likewise.
2399         * util/grub-mkdevicemap.c: Likewise.
2400         * util/grub-emu.c: Likewise.
2401         * util/getroot.c: Likewise.
2402         * util/hostdisk.c: Likewise.
2403         * util/usb.c: Likewise.
2404         * util/grub-editenv.c: Likewise.
2405         * util/misc.c: Likewise.
2407 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2409         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
2410         `genparttoollist.sh'.
2411         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
2412         Add `*.sh' to the list find searches for and change `mdate.sh'
2413         to `mdate-sh'.
2415 2009-06-10  Pavel Roskin  <proski@gnu.org>
2417         * include/grub/multiboot2.h: Provide compatibility defines for
2418         multiboot2.h.
2419         * include/multiboot2.h: Include stdint.h only if needed, using
2420         angle brackets.
2421         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
2422         grub/multiboot2.h.
2423         * loader/ieee1275/multiboot2.c: Likewise.
2424         * loader/multiboot2.c: Likewise.
2425         * loader/multiboot_loader.c: Likewise.
2427         * configure.ac: Use -nostdlib when probing for the target.  It
2428         should not be required to have libc for the target.
2430         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
2431         they fail without libc headers for the target.
2432         * include/grub/powerpc/libgcc.h: Use weak attribute for all
2433         exports.
2434         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
2435         preprocessor conditionals.
2437         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
2438         build system doesn't need to be aware of the tar.c internals.
2440 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
2442         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
2444 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
2446         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
2447         disk limit to 26 for IDE, Virtio, Xen and SCSI.
2449 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
2451         * util/i386/pc/grub-install.in: Change the error message if UUIDs
2452         aren't available if ata.mod gets used.
2454 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
2456         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
2457         initialising controller.
2458         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2460 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2462         * util/i386/pc/grub-install.in: Add a parameter --disk-module
2463         to choose between ata and biosdisk module on i386-pc.
2465 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
2467         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
2468         Subclass and Programming Interface fields in terms of the 3 byte
2469         Class Code register.
2470         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2472         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
2473         interface is OHCI.  Add grub_dprintf for symmetry with
2474         bus/usb/uhci.c.
2475         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
2476         interface is UHCI.  Add interf variable for programming
2477         interface.  Print interface with class/subclass.
2479         * bus/usb/ohci.c: Set interf with correct field.
2481         * bus/usb/uhci.c: Remove unneeded doubled lines.
2482         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
2483         Remove whitespace inside comment.
2485 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
2487         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
2488         as fallback an equivalent option without depth.
2490 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2492         Not fail if unable to retrieve C/H/S on LBA disks
2494         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
2495         if unable to retrieve C/H/S on LBA disks
2497 2009-06-08  Pavel Roskin  <proski@gnu.org>
2499         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
2500         about aliasing.
2502 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2504         * Makefile.in (uninstall): Remove all $lib_DATA files.
2506 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2508         Bugfix: install on partitionless device
2510         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
2511         is a whole disk
2513 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2515         * Makefile.in (uninstall): Remove all $include_DATA files.
2517 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2519         * commands/true.c: New file.  Implement the true and false commands.
2520         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
2521         (true_mod_SOURCES): New variable.
2522         (true_mod_CFLAGS): Likewise.
2523         (true_mod_LDFLAGS): Likewise.
2525 2009-06-05  Colin D Bennett  <colin@gibibit.com>
2527         Optimized font character lookup using binary search instead of linear
2528         search.  Fonts now are required to have the character index ordered by
2529         code point.
2531         * font/font.c (load_font_index): Verify that fonts have ordered
2532         character indices.
2533         (find_glyph): Use binary search instead of linear search to find a
2534         character in a font.
2536 2009-06-05  Michael Scherer  <misc@mandriva.org>
2538         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
2539         uses case sensitive btree.
2540         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
2541         only for case insensitive filesystems.
2543 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
2545         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
2546         * conf/common.rmk (search_mod_CFLAGS): likewise
2548 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2550         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
2551         compensate a compiler bug
2553 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2555         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
2556         instead of '\b'
2558 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2560         Definitions for creating asm symbols with Apple's CC
2562         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
2563         [APPLE_CC] (VARIABLE): likewise
2565 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2567         Disable lnxboot.img when compiled
2568         with Apple's CC
2570         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
2571         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
2572         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
2573         [! APPLE_CC] (CODE_LENG): skip
2574         [! APPLE_CC] (setup_sects): likewise
2575         [! APPLE_CC]: skip filling
2577 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2579         Address in trampolines based on 32-bit registers when compiled
2580         with Apple's CC
2582         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
2583         for addresses
2584         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
2586 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2588         Avoid aliases when compiling with Apple's CC for PCBIOS machine
2590         * kern/misc.c [APPLE_CC] (memcpy): new function
2591         [APPLE_CC] (memmove): likewise
2592         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
2593         (memcpy): define alias conditionally on !APPLE_CC
2594         (memset): likewise
2595         (abort): likewise
2596         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
2597         APPLE_CC are defined
2598         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
2599         (grub_assert_fail): make prototype conditional
2601 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2603         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
2605         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
2606         grub-macho2img
2607         (CLEANFILES): add grub-macho2img
2608         (grub_macho2img_SOURCES): new variable
2609         * kern/i386/pc/startup.S (bss_start): new variable
2610         (bss_end): likewise
2611         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
2612         * util/grub-macho2img.c: new file
2614 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2616         Use objconv when compiling with Apple's CC
2618         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
2619         (efiemu64.o): likewise
2620         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
2621         when compiling with Apple's CC
2622         (efiemu64_s.o): likewise
2623         * configure.ac: check for objconv when compiling with Apple's CC
2624         * genmk.rb: use objconv for modules when compiled with Apple's CC
2626 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2628         Define segment as well as section when compiling with
2629         Apple's CC
2631         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
2632         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
2633         (efiemu_convert_pointer): likewise
2634         (efiemu_set_virtual_address_map): likewise
2635         (efiemu_convert_pointer): likewise
2636         (efiemu_getcrc32): likewise
2637         (init_crc32_table): likewise
2638         (reflect): likewise
2639         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
2640         (GRUB_MOD_DEP): likewise
2642 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2644         Allow a compilation without -mcmodel=large
2646         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
2647         when compiled without -mcmodel=large
2648         (filter_memory_map): remove memory post 4 GiB when compiled
2649         without -mcmodel=large
2650         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
2651         TARGET_CFLAGS when -mcmodel=large isn't supported
2653 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2655         Remove nested functions in efiemu core
2657         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
2659 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2661         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
2663         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
2664         temporary storage
2665         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
2666         using Apple's CC
2667         (grub_cpu_is_tsc_supported): likewise
2668         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
2670 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2672         Absolute addressing through constant with Apple's cc
2674         * kern/i386/pc/startup.S: Define necessary constants
2675         and address through it when using ABS with Apple's CC
2676         * boot/i386/pc/diskboot.S: likewise
2677         * boot/i386/pc/boot.S: likewise
2678         * boot/i386/pc/lnxboot.S: likewise
2679         * boot/i386/pc/cdboot.S: likewise
2680         * mmap/i386/pc/mmap_helper.S: likewise
2681         * commands/i386/pc/drivemap_int13h.S: likewise
2683 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2685         Check if compiler is apple cc
2687         * Makefile.in (ASFLAGS): new variable
2688         (TARGET_ASFLAGS): likewise
2689         (TARGET_MODULE_FORMAT): likewise
2690         (TARGET_APPLE_CC): likewise
2691         (OBJCONV): likewise
2692         (TARGET_IMG_CFLAGS): likewise
2693         (TARGET_CPPFLAGS): add includedir
2694         * configure.ac: call grub_apple_cc and grub_apple_target_cc
2695         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
2696         Check for linker script only if compiler isn't Apple's CC
2697         (TARGET_MODULE_FORMAT): set
2698         (TARGET_APPLE_CC): likewise
2699         (TARGET_ASFLAGS): likewise
2700         (ASFLAGS): likewise
2701         Check for objcopy only if compiler isn't Apple's CC
2702         Check for BSS symbol only if compiler isn't Apple's CC
2703         * genmk.rb: adapt nm options if we use Apple's utils
2704         * aclocal.m4 (grub_apple_cc): new test
2705         (grub_apple_target_cc): likewise
2707 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2709         Simplify sed expressions and improve awk
2711         * Makefile.in (install-local): simplify sed expression
2712         * gencmdlist.sh: likewise
2713         * genmoddep.awk: avoid adding module as a dependency of itself
2715 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2717         Add missing start symbols
2719         * boot/i386/pc/boot.S: add start
2720         * boot/i386/pc/pxeboot.S: likewise
2722 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2724         Fix wrong assumptions with grub-mkimage on EFI
2726         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
2727         (relocate_addresses): consider both r_addend and value at offset
2728         (make_mods_section): zerofill modinfo and header
2729         (convert_elf): write prefix here
2731 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2733         Use .asciz instead of .string
2735         * i386/pc/diskboot.S: use .asciz instead of .string
2736         * i386/pc/boot.S: likewise
2737         * include/grub/dl.h (GRUB_MOD_DEP): likewise
2738         (GRUB_MOD_NAME): likewise
2740 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2742         gfxpayload support
2744         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
2745         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
2746         (grub_video_setup): remove
2747         (grub_video_set_mode): new prototype
2748         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
2749         (vid_mode): remove
2750         (linux_vesafb_res): compile only on PCBIOS
2751         (grub_linux_boot): support gfxpayload
2752         * loader/i386/pc/xnu.c (video_hook): new function
2753         (grub_xnu_set_video): support gfxpayload
2754         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
2755         (DEFAULT_VIDEO_HEIGHT): likewise
2756         (DEFAULT_VIDEO_FLAGS): likewise
2757         (DEFAULT_VIDEO_MODE): new definition
2758         (video_hook): new function
2759         (grub_gfxterm_init): use grub_video_set_mode
2760         * util/grub.d/30_os-prober.in: remove explicit modesetting before
2761         loading xnu
2762         * video/video.c (grub_video_setup): removed
2763         (grub_video_set_mode): new function based on grub_gfxterm_init and
2764         grub_video_setup
2766 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2768         Avoid calling biosdisk in drivemap
2770         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
2771         (revparse_biosdisk): likewise
2772         (list_mappings): derive name from id directly
2773         (grub_cmd_drivemap): use tryparse_diskstring
2775 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2777         Script fixes
2779         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
2780         (grub_lexer_param): add tokenonhold
2781         (grub_script_create_cmdline): remove cmdline. All callers updated
2782         (grub_script_function_create): make functionname
2783         grub_script_arg. All callers updated
2784         (grub_script_execute_argument_to_string): new prototype
2785         * kern/parser.c (state_transitions): reorder
2786         (grub_parser_cmdline_state): fix a bug and make more compact
2787         * script/sh/execute.c (grub_script_execute_argument_to_string):
2788         make global
2789         (grub_script_execute_cmdline): use new format
2790         * script/sh/function.c (grub_script_function_create): make functionname
2791         grub_script_arg. All callers updated
2792         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
2793         (grub_script_yylex): remove
2794         (grub_script_yylex2): renamed to ...
2795         (grub_script_yylex): ...renamed
2796         parse the expressions like a${b}c
2797         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
2798         (GRUB_PARSER_TOKEN_VAR): remove
2799         (GRUB_PARSER_TOKEN_NAME): likewise
2800         ("if"): declare as typeless
2801         ("while"): likewise
2802         ("function"): likewise
2803         ("else"): likewise
2804         ("then"): likewise
2805         ("fi"): likewise
2806         (text): remove
2807         (argument): likewise
2808         (script): accept empty scripts and make exit on error
2809         (arguments): use GRUB_PARSER_TOKEN_ARG
2810         (function): likewise
2811         (command): move error handling to script
2812         (menuentry): move grub_script_lexer_ref before
2813         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
2814         argument. All callers updated
2816 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2818         Prevent GRUB from probing floppies during boot.
2820         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
2821         * commands/search.c (options): Add --no-floppy.
2822         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
2823         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
2824         --no-floppy when searching for UUIDs.
2826 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
2828         Simplify the code duplication in commands/search.c.
2830         * commands/search.c (search_label, search_fs_uuid): Merge into ...
2831         (search_fs): ... this.  Update all users.
2833 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
2835         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
2837 2009-05-28  Pavel Roskin  <proski@gnu.org>
2839         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
2840         Remove the original symlink explicitly.
2842         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
2843         just one slash.  That's how grub_fshelp_find_file() does it.
2845 2009-05-26  Pavel Roskin  <proski@gnu.org>
2847         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
2848         to `str'.
2850         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
2851         possibly unused.
2853 2009-05-25  Christian Franke  <franke@computer.org>
2855         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
2856         register.
2857         (grub_atapi_identify): Add wait after drive select.
2858         (grub_ata_identify): Do more strict status register check before
2859         calling grub_atapi_identify ().  Suppress error message if status
2860         register is 0x00 after command failure.  Add status register
2861         check after PIO read to avoid bogus identify due to stuck DRQ.
2862         Thanks to Pavel Roskin for testing.
2863         (grub_device_initialize): Remove unsafe status register check.
2864         Thanks to 'phcoder' for problem report and patch.
2865         Prevent sign extension in debug message.
2867 2009-05-23  Colin D Bennett  <colin@gibibit.com>
2869         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
2870         definition file, and functions defined in `normal/menu.c' have had
2871         their prototypes moved to `include/grub/menu.h' for consistency.
2873         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
2874         from normal.h.
2875         (grub_menu_get_entry): Likewise.
2876         (grub_menu_get_timeout): Likewise.
2877         (grub_menu_set_timeout): Likewise.
2878         (grub_menu_execute_entry): Likewise.
2879         (grub_menu_execute_with_fallback): Likewise.
2880         (grub_menu_entry_run): Likewise.
2882         * include/grub/normal.h: Re-ordered and grouped function
2883         prototypes by file that the function is defined in.
2884         (grub_menu_execute_callback): Removed; moved to menu.h.
2885         (grub_menu_get_entry): Likewise.
2886         (grub_menu_get_timeout): Likewise.
2887         (grub_menu_set_timeout): Likewise.
2888         (grub_menu_execute_entry): Likewise.
2889         (grub_menu_execute_with_fallback): Likewise.
2890         (grub_menu_entry_run): Likewise.
2891         (grub_menu_addentry): Renamed from this ...
2892         (grub_normal_add_menu_entry): ... to this.
2894         * normal/main.c (grub_menu_addentry): Renamed from this ...
2895         (grub_normal_add_menu_entry): ... to this.
2897         * script/sh/execute.c (grub_script_execute_menuentry): Update
2898         reference to renamed grub_menu_addentry function.
2900 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
2902         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
2904 2009-05-22  Pavel Roskin  <proski@gnu.org>
2906         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
2907         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
2908         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
2909         compiling for the i386 targets, but not for the utilities.
2911         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
2912         to grub_uint8_t.
2913         (grub_root_drive): Likewise.
2914         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
2915         remove alignment.
2916         (grub_root_drive): Change size to byte.
2917         (grub_start_addr): Remove.
2918         (grub_end_addr): Likewise.
2919         (grub_apm_bios_info): Likewise.
2921 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
2923         * normal/i386: Remove.
2924         * normal/powerpc: Likewise.
2925         * normal/sparc64: Likewise.
2926         * normal/x86_64: Likewise.
2928 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
2930         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
2931         * loader/i386/linux_trampoline.S: Fix indentation
2932         * loader/i386/xnu_helper.S: Likewise
2934 2009-05-18  Colin D Bennett  <colin@gibibit.com>
2936         Display error messages when parsing a Lua statement fails.
2937         Previously, executing a syntactically invalid statement like
2938         ")foo" or "bar;" would silently fail.
2940         * script/lua/grub_main.c (handle_lua_error): New function.
2941         (grub_lua_parse_line): Improved reporting of Lua parser and
2942         execution errors.
2944 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2946         Remove -Werror which causes build to fail on some systems
2948         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
2949         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
2950         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
2952 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
2954         trampoline for linux on 64-bit platform
2956         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
2957         loader/i386/efi/linux_trampoline.S
2958         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
2959         declaration
2960         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
2961         here
2962         * loader/i386/linux_trampoline.S: moved here
2963         * loader/i386/efi/linux.c (allocate_pages): reserve space for
2964         trampoline
2965         (jumpvector): removed
2966         (grub_linux_trampoline_start): new declaration
2967         (grub_linux_trampoline_end): likewise
2968         (grub_linux_boot): use trampoline when on 64-bit platform
2969         * loader/i386/linux.c: likewise
2971 2009-05-16  Pavel Roskin  <proski@gnu.org>
2973         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
2974         const to avoid a warning.
2975         (grub_lua_setenv): Likewise.
2976         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
2977         lmsg to fix a warning.
2979 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
2981         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
2982         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2983         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
2984         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2985         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2986         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2987         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2988         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2990 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
2992         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
2994 2009-05-16  Bean  <bean123ch@gmail.com>
2996         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
2997         (lua_mod_SOURCES): New variable.
2998         (lua_mod_CFLAGS): Likewise.
2999         (lua_mod_LDFLAGS): Likewise.
3001         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
3002         (setjmp_mod_SOURCES): New variable.
3003         (setjmp_mod_CFLAGS): Likewise.
3004         (setjmp_LDFLAGS): Likewise.
3006         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
3007         (setjmp_mod_SOURCES): New variable.
3008         (setjmp_mod_CFLAGS): Likewise.
3009         (setjmp_LDFLAGS): Likewise.
3011         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3012         (setjmp_mod_SOURCES): New variable.
3013         (setjmp_mod_CFLAGS): Likewise.
3014         (setjmp_LDFLAGS): Likewise.
3016         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3017         (setjmp_mod_SOURCES): New variable.
3018         (setjmp_mod_CFLAGS): Likewise.
3019         (setjmp_LDFLAGS): Likewise.
3021         * normal/i386/setjmp.S: Moved from here ...
3022         * lib/i386/setjmp.S: ... Moved here
3023         * normal/x86_64/setjmp.S: Moved from here ...
3024         * lib/x86_64/setjmp.S: ... Moved here
3025         * normal/powerpc/setjmp.S: Moved from here ...
3026         * lib/powerpc/setjmp.S: ... Moved here
3027         * normal/sparc64/setjmp.S: Moved from here ...
3028         * lib/sparc64/setjmp.S: ... Moved here
3030         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
3031         returns_twice in mingw.
3033         * script/lua/grub_lib.c: New file.
3034         * script/lua/grub_lib.h: Likewise.
3035         * script/lua/grub_lua.h: Likewise.
3036         * script/lua/grub_main.c: Likewise.
3037         * script/lua/lapi.c: Likewise.
3038         * script/lua/lapi.h: Likewise.
3039         * script/lua/lauxlib.c: Likewise.
3040         * script/lua/lauxlib.h: Likewise.
3041         * script/lua/lbaselib.c: Likewise.
3042         * script/lua/lcode.c: Likewise.
3043         * script/lua/lcode.h: Likewise.
3044         * script/lua/ldblib.c: Likewise.
3045         * script/lua/ldebug.c: Likewise.
3046         * script/lua/ldebug.h: Likewise.
3047         * script/lua/ldo.c: Likewise.
3048         * script/lua/ldo.h: Likewise.
3049         * script/lua/ldump.c: Likewise.
3050         * script/lua/lfunc.c: Likewise.
3051         * script/lua/lfunc.h: Likewise.
3052         * script/lua/lgc.c: Likewise.
3053         * script/lua/lgc.h: Likewise.
3054         * script/lua/linit.c: Likewise.
3055         * script/lua/liolib.c: Likewise.
3056         * script/lua/llex.c: Likewise.
3057         * script/lua/llex.h: Likewise.
3058         * script/lua/llimits.h: Likewise.
3059         * script/lua/lmathlib.c: Likewise.
3060         * script/lua/lmem.c: Likewise.
3061         * script/lua/lmem.h: Likewise.
3062         * script/lua/loadlib.c: Likewise.
3063         * script/lua/lobject.c: Likewise.
3064         * script/lua/lobject.h: Likewise.
3065         * script/lua/lopcodes.c: Likewise.
3066         * script/lua/lopcodes.h: Likewise.
3067         * script/lua/loslib.c: Likewise.
3068         * script/lua/lparser.c: Likewise.
3069         * script/lua/lparser.h: Likewise.
3070         * script/lua/lstate.c: Likewise.
3071         * script/lua/lstate.h: Likewise.
3072         * script/lua/lstring.c: Likewise.
3073         * script/lua/lstring.h: Likewise.
3074         * script/lua/lstrlib.c: Likewise.
3075         * script/lua/ltable.c: Likewise.
3076         * script/lua/ltable.h: Likewise.
3077         * script/lua/ltablib.c: Likewise.
3078         * script/lua/ltm.c: Likewise.
3079         * script/lua/ltm.h: Likewise.
3080         * script/lua/lua.h: Likewise.
3081         * script/lua/luaconf.h: Likewise.
3082         * script/lua/lualib.h: Likewise.
3083         * script/lua/lundump.c: Likewise.
3084         * script/lua/lundump.h: Likewise.
3085         * script/lua/lvm.c: Likewise.
3086         * script/lua/lvm.h: Likewise.
3087         * script/lua/lzio.c: Likewise.
3088         * script/lua/lzio.h: Likewise.
3090 2009-05-16  Bean  <bean123ch@gmail.com>
3092         * include/grub/kernel.h (grub_module_header_types): Add type
3093         OBJ_TYPE_CONFIG.
3095         * kern/main.c (grub_load_config): New function.
3096         (grub_main): Call grub_load_config to read boot config.
3098         * grub-mkimage (generate_image): New parameter config_path.
3099         (options): New option --config.
3100         (main): Parse --config option, and pass it to generate_image.
3102 2009-05-14  Christian Franke  <franke@computer.org>
3104         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
3105         This fixes build on Cygwin.
3107 2009-05-14  Pavel Roskin  <proski@gnu.org>
3109         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
3110         jump.  This saves two bytes, so the typical case of 2 swapped
3111         drives would fit 32 bytes.
3113 2009-05-13  Pavel Roskin  <proski@gnu.org>
3115         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
3116         grub_uint32_t to avoid a warning.
3118         * loader/i386/linux.c (allocate_pages): When assigning
3119         real_mode_mem, cast through grub_size_t to fix a warning.  The
3120         code already makes sure that the value would fit a pointer.
3121         (grub_linux_setup_video): Cast render_target->data to
3122         grub_size_t to fix a warning.
3124 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
3126         * commands/i386/pc/drivemap.c: New file - implement drivemap
3127         command.
3128         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
3129         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
3131 2009-05-13  Pavel Roskin  <proski@gnu.org>
3133         * util/i386/pc/grub-setup.c (setup): Remove unused variable
3134         embedding_area_exists.
3136 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
3138         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
3139         it easier to understand / work with.
3140         Improve warning messages for cases where there's no embedding area,
3141         or when it is too small (or core.img too large).
3143 2009-05-13  Pavel Roskin  <proski@gnu.org>
3145         * loader/i386/pc/multiboot2.c: Add necessary includes for
3146         grub_multiboot2_real_boot().
3148         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
3149         PX record is always little-endian.  We only need the lower 2
3150         bytes of the mode.
3152         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
3153         facilitate code reuse.
3154         (grub_cpio_mount): Use "struct head", not a char buffer.  This
3155         fixes a warning reported by gcc 4.4.
3157         * kernel/disk.c (grub_disk_read): Use void pointer for the
3158         buffer.
3159         (grub_disk_write): Use const void pointer for the buffer.
3160         Adjust all callers.  Remove unnecessary casts.
3162 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
3164         * util/i386/pc/grub-install.in: Update copyright year.
3166 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3168         gptsync
3170         * commands/gptsync.c: new file
3171         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
3172         (gptsync_mod_SOURCES): new variable
3173         (gptsync_mod_CFLAGS): likewise
3174         (gptsync_mod_LDFLAGS): likewise
3175         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
3176         new definition
3177         (GRUB_PC_PARTITION_TYPE_HFS): likewise
3178         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
3179         * conf/i386-ieee1275.rmk: likewise
3180         * conf/i386-pc.rmk: likewise
3181         * conf/powerpc-ieee1275.rmk: likewise
3183 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3185         Fixed grub-emu
3187         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
3188         (grub_dl_ref): likewise
3190 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
3192         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
3193         split in two functions (one for msdos and one for gpt).
3195 2009-05-08  Pavel Roskin  <proski@gnu.org>
3197         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
3198         not modified.
3200         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
3201         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
3202         Initialize them with -1.  Add sanity check for bad1.  Eliminate
3203         nerr variable.
3205 2009-05-08  David S. Miller  <davem@davemloft.net>
3207         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
3209 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
3211         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
3212         existence.
3214 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
3216         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3217         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
3219 2009-05-05  David S. Miller  <davem@davemloft.net>
3221         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
3223 2009-05-05  Pavel Roskin  <proski@gnu.org>
3225         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
3226         of grub_dl_ref() and grub_dl_unref().
3227         * commands/parttool.c: Remove preprocessor conditionals around
3228         grub_dl_ref() and grub_dl_unref().
3229         * fs/affs.c: Likewise.
3230         * fs/afs.c: Likewise.
3231         * fs/cpio.c: Likewise.
3232         * fs/ext2.c: Likewise.
3233         * fs/fat.c: Likewise.
3234         * fs/hfs.c: Likewise.
3235         * fs/hfsplus.c: Likewise.
3236         * fs/iso9660.c: Likewise.
3237         * fs/jfs.c: Likewise.
3238         * fs/minix.c: Likewise.
3239         * fs/ntfs.c: Likewise.
3240         * fs/reiserfs.c: Likewise.
3241         * fs/sfs.c: Likewise.
3242         * fs/udf.c: Likewise.
3243         * fs/ufs.c: Likewise.
3244         * fs/xfs.c: Likewise.
3245         * include/grub/dl.h: Likewise.
3246         * loader/xnu.c: Likewise.
3248 2009-05-04  Pavel Roskin  <proski@gnu.org>
3250         * commands/acpi.c: Remove unused variable my_mod.
3251         * partmap/amiga.c: Likewise.
3252         * partmap/apple.c: Likewise.
3253         * partmap/gpt.c: Likewise.
3254         * partmap/pc.c: Likewise.
3255         * partmap/sun.c: Likewise.
3256         * term/gfxterm.c: Likewise.
3257         * term/i386/pc/vesafb.c: Likewise.
3258         * term/i386/pc/vga.c: Likewise.
3260 2009-05-04  David S. Miller  <davem@davemloft.net>
3262         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
3263         pointer args to grub_ieee1275_get_property().
3265         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
3267         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
3268         devices, and do not traverse down under controller nodes.
3270         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
3271         (grub_ofdisk_open): Use it to un-escape "," characters.
3272         * kern/disk.c (find_part_sep): New.
3273         (grub_disk_open): Use it to find the first non-escaped ','
3274         character in the disk name.
3275         * util/ieee1275/devicemap.c (escape_of_path): New.
3276         (grub_util_emit_devicemap_entry): Use it.
3277         * util/sparc64/ieee1275/grub-install.in: Update script to
3278         strip partition specifiers properly by not triggering on
3279         '\' escaped ',' characters.
3281 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3283         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
3284         to 0x300.
3285         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
3286         resolutions.
3287         (linux_vesafb_modes): Add a lot of additional modes to the list (based
3288         on documentation from Wikipedia).
3290 2009-05-04  Pavel Roskin  <proski@gnu.org>
3292         * disk/ata.c: Spelling fixes.
3293         * disk/raid.c: Likewise.
3294         * disk/usbms.c: Likewise.
3295         * disk/dmraid_nvidia.c: Likewise.
3296         * kern/ieee1275/openfw.c: Likewise.
3297         * kern/ieee1275/init.c: Likewise.
3298         * kern/ieee1275/cmain.c: Likewise.
3299         * boot/i386/pc/cdboot.S: Likewise.
3300         * video/readers/png.c: Likewise.
3301         * video/i386/pc/vbe.c: Likewise.
3302         * fs/udf.c: Likewise.
3303         * fs/hfs.c: Likewise.
3304         * fs/reiserfs.c: Likewise.
3305         * efiemu/runtime/efiemu.c: Likewise.
3306         * efiemu/main.c: Likewise.
3307         * efiemu/mm.c: Likewise.
3308         * include/grub/elf.h: Likewise.
3309         * include/grub/xnu.h: Likewise.
3310         * include/grub/usbdesc.h: Likewise.
3311         * include/grub/usb.h: Likewise.
3312         * include/grub/script_sh.h: Likewise.
3313         * include/grub/lib/LzmaEnc.h: Likewise.
3314         * include/grub/efiemu/efiemu.h: Likewise.
3315         * include/grub/command.h: Likewise.
3316         * normal/menu.c: Likewise.
3317         * normal/main.c: Likewise.
3318         * normal/datetime.c: Likewise.
3319         * bus/usb/uhci.c: Likewise.
3320         * mmap/i386/uppermem.c: Likewise.
3321         * mmap/mmap.c: Likewise.
3322         * commands/acpi.c: Likewise.
3323         * commands/test.c: Likewise.
3324         * partmap/apple.c: Likewise.
3325         * font/font.c: Likewise.
3326         * loader/sparc64/ieee1275/linux.c: Likewise.
3327         * loader/macho.c: Likewise.
3328         * loader/i386/bsd_trampoline.S: Likewise.
3329         * loader/i386/bsd.c: Likewise.
3330         * loader/xnu.c: Likewise.
3331         * term/i386/pc/vesafb.c: Likewise.
3332         * term/usb_keyboard.c: Likewise.
3333         * util/resolve.c: Likewise.
3334         * util/getroot.c: Likewise.
3336 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3338         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
3340 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3342         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
3343         build error.
3345 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3347         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
3348         parameter only available on BIOS.
3350 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3352         Removed wrong semicolon in declaration
3354         * grub/misc.h (grub_dprintf): remove semicolon
3356 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3358         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
3359         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
3360         is done by grub_cmd_linux() now).
3361         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
3362         restore video to text mode.
3363         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
3364         indicates lack of "vga=" parameter.  "vga=0" is mapped to
3365         `GRUB_LINUX_VID_MODE_NORMAL'.
3367 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3369         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
3370         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
3371         and `normal/script.c'.  Add `kern/rescue_reader.c',
3372         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
3373         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
3374         `grub_script.tab.c'.
3376         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3377         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3378         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3379         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3380         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3382         * Makefile.in: Remove duplicated 2008 in Copyright line.
3384 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3386         * util/misc.c (grub_util_warn): New function.  Emits a warning
3387         unconditionally.
3388         * include/grub/util/misc.h (grub_util_warn): New declaration.
3390         * util/i386/pc/grub-install.in: Understand --force and pass it down
3391         to grub-setup.
3393         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
3394         down to setup().
3395         (setup): Improve error messages and add warnings when requested to
3396         install in odd layouts.  Refuse to install using blocklists unless
3397         --force was set.
3399 2009-05-04  martin f. krafft  <madduck@madduck.net>
3401         * disk/raid.c (grub_raid_scan_device): Improve debug message.
3403 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3405         Updated copyright year
3407         * fs/hfsplus.c: updated copyright year
3409 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3411         HFS+ UUID
3413         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
3414         in the space previously used by unused3
3415         (grub_hfsplus_uuid): new function
3416         (grub_hfsplus_fs): added uuid field
3418 2009-05-03  Pavel Roskin  <proski@gnu.org>
3420         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
3421         suppress warnings.  It's no longer needed.
3422         * disk/host.c: Likewise.
3423         * disk/ata_pthru.c: Likewise.
3424         * disk/loopback.c: Likewise.
3425         * hook/datehook.c: Likewise.
3426         * parttool/pcpart.c: Likewise.
3427         * fs/i386/pc/pxe.c: Likewise.
3428         * fs/ntfscomp.c: Likewise.
3429         * efiemu/main.c: Likewise.
3430         * mmap/mmap.c: Likewise.
3431         * commands/crc.c: Likewise.
3432         * commands/hexdump.c: Likewise.
3433         * commands/hdparm.c: Likewise.
3434         * commands/acpi.c: Likewise.
3435         * commands/echo.c: Likewise.
3436         * commands/minicmd.c: Likewise.
3437         * commands/blocklist.c: Likewise.
3438         * commands/memrw.c: Likewise.
3439         * commands/loadenv.c: Likewise.
3440         * commands/usbtest.c: Likewise.
3441         * commands/lsmmap.c: Likewise.
3442         * commands/boot.c: Likewise.
3443         * commands/parttool.c: Likewise.
3444         * commands/configfile.c: Likewise.
3445         * commands/search.c: Likewise.
3446         * commands/ieee1275/suspend.c: Likewise.
3447         * commands/cat.c: Likewise.
3448         * commands/i386/pc/pxecmd.c: Likewise.
3449         * commands/i386/pc/play.c: Likewise.
3450         * commands/i386/pc/halt.c: Likewise.
3451         * commands/i386/pc/vbeinfo.c: Likewise.
3452         * commands/i386/pc/vbetest.c: Likewise.
3453         * commands/lspci.c: Likewise.
3454         * commands/date.c: Likewise.
3455         * commands/handler.c: Likewise.
3456         * commands/ls.c: Likewise.
3457         * commands/test.c: Likewise.
3458         * commands/cmp.c: Likewise.
3459         * commands/efi/loadbios.c: Likewise.
3460         * commands/efi/fixvideo.c: Likewise.
3461         * commands/halt.c: Likewise.
3462         * commands/help.c: Likewise.
3463         * commands/reboot.c: Likewise.
3464         * hello/hello.c: Likewise.
3465         * script/sh/main.c: Likewise.
3466         * loader/xnu.c: Likewise.
3467         * term/terminfo.c: Likewise.
3468         * term/i386/pc/serial.c: Likewise.
3469         * term/usb_keyboard.c: Likewise.
3471 2009-05-03  David S. Miller  <davem@davemloft.net>
3473         * normal/menu.c: Include grub/parser.h
3475 2009-05-03  Pavel Roskin  <proski@gnu.org>
3477         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
3478         not char*.
3479         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
3480         Suggested by Javier Martín <lordhabbit@gmail.com>
3482         * util/i386/pc/grub-mkrescue.in: Allow for the case when
3483         efiemu??.o doesn't exist.
3484         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
3485         copying.
3487 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
3489         FreeBSD 64-bit support
3491         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
3492         and loader/i386/bsd_trampoline.S
3493         (bsd_mod_ASFLAGS): new variable
3494         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
3495         (FREEBSD_MODTYPE_KERNEL64): likewise
3496         (grub_bsd64_trampoline_start): likewise
3497         (grub_bsd64_trampoline_end): likewise
3498         (grub_bsd64_trampoline_selfjump): likewise
3499         (grub_bsd64_trampoline_gdt): likewise
3500         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
3501         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
3502         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
3503         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
3504         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3505         of "attrib" member
3506         * loader/i386/bsd_pagetable.c: new file
3507         * loader/i386/bsd_trampoline.S: likewise
3508         * loader/i386/bsd.c (ALIGN_QWORD): new macro
3509         (ALIGN_VAR): likewise
3510         (entry_hi): new variable
3511         (kern_end_mdofs): likewise
3512         (is_64bit): likewise
3513         (grub_freebsd_add_meta): use ALIGN_VAR
3514         (grub_e820_mmap): new declaration
3515         (grub_freebsd_add_mmap): new function
3516         (grub_freebsd_add_meta_module): support 64 bit kernels
3517         (grub_freebsd_list_modules): use ALIGN_VAR
3518         (gdt_descriptor): new declaration
3519         (grub_freebsd_boot): support 64 bit kernels
3520         (grub_bsd_elf64_hook): new function
3521         (grub_bsd_load_elf): support elf64
3523 2009-05-03  Bean  <bean123ch@gmail.com>
3525         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
3526         after we get the result of if statement.
3528 2009-05-03  Bean  <bean123ch@gmail.com>
3530         * Makefile.in (enable_efiemu): New variable.
3532         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
3533         set.
3534         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
3535         path.
3536         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
3537         path, add -mno-red-zone option.
3538         (efiemu64_s.o): Likewise.
3539         (efiemu64.o): Use macro $^ for source file.
3541         * configure.ac (--enable-efiemu): New option.
3543 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
3545         xnu support
3547         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
3548         (pkglib_MODULES): add xnu.mod
3549         (xnu_mod_SOURCES): new variable
3550         (xnu_mod_CFLAGS): likewise
3551         (xnu_mod_LDFLAGS): likewise
3552         (xnu_mod_ASFLAGS): likewise
3553         * conf/i386-pc.rmk: likewise
3554         * conf/x86_64-efi.rmk: likewise
3555         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
3556         new declaration
3557         * include/grub/i386/macho.h: new file
3558         * include/grub/i386/xnu.h: likewise
3559         * include/grub/macho.h: likewise
3560         * include/grub/machoload.h: likewise
3561         * include/grub/x86_64/macho.h: likewise
3562         * include/grub/x86_64/xnu.h: likewise
3563         * include/grub/xnu.h: likewise
3564         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
3565         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
3566         * loader/i386/efi/xnu.c: new file
3567         * loader/i386/pc/xnu.c: likewise
3568         * loader/i386/xnu.c: likewise
3569         * loader/i386/xnu_helper.S: likewise
3570         * loader/macho.c: likewise
3571         * loader/xnu.c: likewise
3572         * loader/xnu_resume.c: likewise
3573         * util/grub-dumpdevtree: likewise
3574         * include/grub/i386/pit.h: include grub/err.h
3575         (grub_pit_wait): export
3576         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
3578 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3580         Efiemu
3582         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
3583         _linux_efi, linux_efi.
3584         new files in grub-emu
3585         new targets efiemu32.o and efiemu64.o
3586         * loader/linux_normal_efiemu.c: likewise
3587         * loader/i386/efi/linux.c: added preliminary efiemu support
3588         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
3589         files to copy
3590         * include/grub/autoefi.h: new file
3591         * include/grub/i386/efiemu.h: likewise
3592         * include/grub/i386/pc/efiemu.h: likewise
3593         * include/grub/efi/api.h: add LL suffix when necessary
3594         new definitions relating to tables
3595         * include/grub/efiemu/efiemu.h: new file
3596         * include/grub/efiemu/runtime.h: likewise
3597         * efiemu/prepare.c: likewise
3598         * efiemu/loadcore_common.c: likewise
3599         * efiemu/loadcore64.c: likewise
3600         * efiemu/runtime/efiemu.sh: likewise
3601         * efiemu/runtime/efiemu.S: likewise
3602         * efiemu/runtime/efiemu.c: likewise
3603         * efiemu/runtime/config.h: likewise
3604         * efiemu/prepare32.c: likewise
3605         * efiemu/main.c: likewise
3606         * efiemu/modules/pnvram.c: likewise
3607         * efiemu/modules/i386: likewise
3608         * efiemu/modules/i386/pc: likewise
3609         * efiemu/modules/acpi.c: likewise
3610         * efiemu/i386/pc/cfgtables.c: likewise
3611         * efiemu/i386/loadcore64.c: likewise
3612         * efiemu/i386/loadcore32.c: likewise
3613         * efiemu/prepare64.c: likewise
3614         * efiemu/loadcore.c: likewise
3615         * efiemu/symbols.c: likewise
3616         * efiemu/mm.c: likewise
3617         * efiemu/loadcore32.c: likewise
3619 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3621         ACPI spoofing
3623         * commands/acpi.c: new file
3624         * commands/i386/pc/acpi.c: likewise
3625         * commands/efi/acpi.c: likewise
3626         * include/grub/acpi.h: likewise
3627         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
3628         (acpi_mod_SOURCES): new variable
3629         (acpi_mod_CFLAGS): likewise
3630         (acpi_mod_LDFLAGS): likewise
3631         * conf/i386-efi.rmk: likewise
3632         * conf/x86_64-efi.rmk: likewise
3634 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3636         Missing part from mmap patch
3638         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
3639         (grub_mmap_unregister)
3640         (grub_mmap_free_and_unregister): use grub_mmap_register
3642 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3644         Mmap services
3646         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
3647         * loader/i386/linux.c (find_mmap_size): likewise
3648         (allocate_pages): likewise
3649         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
3650         (grub_fill_multiboot_mmap): likewise
3651         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
3652         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
3653         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
3654         (OPENBSD_MMAP_RESERVED): likewise
3655         * include/grub/i386/pc/memory.h: include grub/memory.h
3656         (grub_lower_mem): removed
3657         (grub_upper_mem): likewise
3658         (GRUB_MACHINE_MEMORY_ACPI): new definition
3659         (GRUB_MACHINE_MEMORY_NVS): likewise
3660         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
3661         (GRUB_MACHINE_MEMORY_HOLE): likewise
3662         (grub_machine_mmap_register): likewise
3663         (grub_machine_mmap_unregister): likewise
3664         (grub_machine_get_upper): likewise
3665         (grub_machine_get_lower): likewise
3666         (grub_machine_get_post64): likewise
3667         * include/grub/i386/efi/memory.h: new file
3668         * include/grub/x86_64/efi/memory.h: likewise
3669         * include/grub/efi/memory.h: likewise
3670         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
3671         (mmap_mod_SOURCES): new variable
3672         (mmap_mod_LDFLAGS): likewise
3673         (mmap_mod_ASFLAGS): likewise
3674         * conf/i386-coreboot.rmk: likewise
3675         * conf/i386-ieee1275.rmk: likewise
3676         * conf/i386-efi.rmk: likewise
3677         * conf/x86_64-efi.rmk: likewise
3678         * include/grub/types.h (UINT_TO_PTR): new macro
3679         (PTR_TO_UINT32): likewise
3680         (PTR_TO_UINT64): likewise
3681         * include/grub/memory.h: new file
3682         * mmap/i386/pc/mmap.c: likewise
3683         * mmap/i386/pc/mmap_helper.S: likewise
3684         * mmap/i386/uppermem.c: likewise
3685         * mmap/mmap.c: likewise
3686         * mmap/efi/mmap.c: likewise
3687         * kern/i386/coreboot/init.c (grub_machine_init): don't use
3688         grub_upper_mem
3689         * kern/i386/pc/init.c (grub_lower_mem): removed variable
3690         (grub_upper_mem): likewise
3691         (grub_machine_init): don't use grub_upper_mem,
3692         make grub_lower_mem local
3693         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
3694         grub_mmap_iterate and grub_mmap_get_upper
3695         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
3697 2009-05-02  Bean  <bean123ch@gmail.com>
3699         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
3700         script/sh/parser.y.
3701         (pkglib_MODULES): Add normal.mod and sh.mod.
3702         (normal_SOURCES): New variable.
3703         (normal_mod_CFLAGS): Likewise.
3704         (normal_mod_LDFLAGS): Likewise.
3705         (sh_mod_SOURCES): Likewise.
3706         (sh_mod_CFLAGS): Likewise.
3707         (sh_mod_LDFLAGS): Likewise.
3709         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
3710         script/sh/lexer.c_DEPENDENCIES.
3711         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
3712         kern/rescue_reader.c and kern/rescue_parser.c.
3713         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
3714         (grub_emu_SOURCES): Change source files.
3715         (pkglib_MODULES): Remove normal.mod.
3716         (normal_SOURCES): Removed.
3717         (normal_mod_CFLAGS): Likewise.
3718         (normal_mod_LDFLAGS): Likewise.
3719         * conf/i386-coreboot.rmk: Likewise.
3720         * conf/i386-efi.rmk: Likewise.
3721         * conf/i386-ieee1276.rmk: Likewise.
3722         * conf/powerpc-ieee1275.rmk: Likewise.
3723         * conf/sparc64-ieee1275.rmk: Likewise.
3724         * conf/x86_64-efi.rmk: Likewise.
3726         * include/grub/command.h (grub_command_execute): New inline function.
3728         * include/grub/menu.h (grub_menu_entry): Removed commands field.
3730         * include/grub/normal.h: Remove <grub/setjmp.h>.
3731         (grub_fs_module_list): Moved to normal/autofs.c.
3732         (grub_exit_env): Removed.
3733         (grub_command_execute): Likewise.
3734         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
3735         parameter script.
3736         (read_command_list): New function declaration.
3737         (read_fs_list): Likewise.
3739         * include/parser.h: Include <grub/reader.h>.
3740         (grub_parser_split_cmdline): Change type of getline parameter.
3741         (grub_parser): New structure.
3742         (grub_parser_class): New variable.
3743         (grub_parser_execute): New function declaration.
3744         (grub_register_rescue_parser): Likewise.
3745         (grub_parser_register): New inline function.
3746         (grub_parser_unregister): Likewise.
3747         (grub_parser_get_current): Likewise.
3748         (grub_parser_set_current): Likewise.
3750         * include/grub/reader.h: New file.
3751         * kern/reader.c: Likewise.
3752         * kern/rescue_parser.c: Likewise.
3753         * kern/rescue_reader.c: Likewise.
3754         * normal/autofs.c: Likewise.
3755         * normal/dyncmd.c: Likewise.
3757         * include/grub/rescue.h: Removed.
3758         * normal/command.h: Likewise.
3760         * include/grub/script.h: Moved to ...
3761         * include/grub/script_sh.h: ... Moved here.
3762         * normal/execute.c: Moved to ...
3763         * script/sh/execute.c: ... Moved here.
3764         * normal/function.c: Moved to ...
3765         * script/sh/function.c: ... Moved here.
3766         * normal/lexer.c: Moved to ...
3767         * script/sh/lexer.c: ... Moved here.
3768         * normal/parser.y: Moved to ...
3769         * script/sh/parser.y: ... Moved here.
3770         * normal/script.c: Moved to ...
3771         * script/sh/script.c: ... Moved here.
3773         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
3774         <grub/reader.h>.
3775         (grub_exit_env): Removed.
3776         (fs_module_list): Moved to normal/autofs.c.
3777         (grub_file_getline): Don't handle comment here.
3778         (free_menu): Skip removed field entry->commands.
3779         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
3780         script parameter.
3781         (read_config_file): Removed nested parameter, change getline function.
3782         (grub_enter_normal_mode): Removed.
3783         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
3784         (read_command_list): Likewise.
3785         (autoload_fs_module): Moved to normal/autofs.c.
3786         (read_fs_list): Likewise.
3787         (reader_nested): New variable.
3788         (grub_normal_execute): Run parser.sh to switch to sh parser.
3789         (grub_cmd_rescue): Removed.
3790         (cmd_normal): Removed.
3791         (grub_cmd_normal): Unregister itself at the beginning. Don't register
3792         rescue command.
3793         (grub_cmdline_run): New function.
3794         (grub_normal_reader_init): Likewise.
3795         (grub_normal_read_line): Likewise.
3796         (grub_env_write_pager): Likewise.
3797         (cmdline): New variable.
3798         (grub_normal_reader): Likewise.
3799         (GRUB_MOD_INIT): Register normal reader and set as current, register
3800         pager hook, register normal command with grub_register_command_prio,
3801         so that it won't show up in command.lst.
3802         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
3803         grub_fs_autoload_hook.
3805         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
3806         (grub_menu_execute_entry): Replace grub_script_execute with
3807         grub_parser_execute, change parameter to grub_command_execute.
3809         * normal/menu_text.c: Remove <grub/script.h>.
3811         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
3812         and <grub/parser.h>.
3813         (run): Change editor_getline to use new parser interface. Change
3814         parameter to grub_command_execute.
3816         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
3817         <grub/reader.h> and <grub/parser.h>.
3818         (grub_load_normal_mode): Execute normal command.
3819         (grub_main): Call grub_register_core_commands,
3820         grub_register_rescue_parser and grub_register_rescue_reader, use
3821         grub_reader_loop to enter input loop.
3823         * kern/parser.c (grub_parser_split_cmdline): Change type of
3824         getline parameter.
3825         (grub_parser_class): New variable.
3826         (grub_parser_execute): New function.
3828         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
3829         * loader/multiboot2.c: Likewise.
3830         * loader/sparc64/ieee1275/linux.c: Likewise.
3832         * util/grub-emu.c (read_command_list): New dummy function.
3834 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3836         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
3837         count to 16 for CCISS and IDA.
3839 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
3841         * normal/menu_text.c  (grub_wait_after_message): Print a newline
3842         after waiting for user input.
3844         * loader/i386/linux.c: Include `<grub/normal.h>'.
3845         (grub_cmd_linux): Improve the error message about `ask' mode, by
3846         waiting for user input so it's not missed (we can do this, since
3847         user requested interaction).
3849 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3851         Added missing lst to grub-mkrescue
3853         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
3854         and ${input_dir}/parttool.lst
3856 2009-04-30  David S. Miller  <davem@davemloft.net>
3858         * util/hostdisk.c (device_is_wholedisk): New function.
3859         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
3860         zero only if device_is_wholedisk() returns true.
3862         * util/hostdisk.c (convert_system_partition_to_system_disk):
3863         Handle virtual disk devices named /dev/vdiskX as found on sparc
3864         and powerpc.
3866         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
3867         lettered partition specifier is found, convert to numbered.
3869 2009-04-29  David S. Miller  <davem@davemloft.net>
3871         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
3872         * include/grub/sparc64/ieee1275/memory.h: Likewise.
3874         * normal/command.c: Add missing newline at end of file.
3876         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
3877         warnings.
3878         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
3879         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
3880         grub_ofdisk_read): Likewise, and deal similarly with the fact that
3881         ihandles have a 32-bit type but need to be stored in a "void *".
3883 2009-04-28  Pavel Roskin  <proski@gnu.org>
3885         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
3886         not disk.  Adjust all dependencies.
3887         (grub_fs_uuid_close): Use grub_device_close(), not
3888         grub_disk_close().
3890         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
3891         parent's partition, don't copy it by reference, as it gets freed
3892         on close.
3894 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3896         Preboot hooks support
3898         * commands/boot.c (struct grub_preboot_t): new declaration
3899         (preboots_head): new variable
3900         (preboots_tail): likewise
3901         (grub_loader_register_preboot_hook): new function
3902         (grub_loader_unregister_preboot_hook): likewise
3903         (grub_loader_set): launch preboot hooks
3904         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
3905         (grub_loader_register_preboot_hook): new declaration
3906         (grub_loader_unregister_preboot_hook): likewise
3908 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
3910         Warning fix
3912         * disk/scsi.c (grub_scsi_open): added missing cast when
3913         calling grub_dprintf
3915 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
3917         Bug and warning fixes
3919         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
3920         declaration
3921         * commands/test.c (test_parse): fixed bug with file tests and corrected
3922         declaration of find_file
3924 2009-04-26  Pavel Roskin  <proski@gnu.org>
3926         * Makefile.in: Don't install empty manual pages if help2man is
3927         missing.  Use help2man option for output, not shell redirection.
3929 2009-04-26  David S. Miller  <davem@davemloft.net>
3931         * util/grub-mkdevicemap.c (make_device_map): Add missing
3932         NESTED_FUNC_ATTR to process_device().
3934 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3936         Test command
3938         * commands/test.c: rewritten to use bash-like test
3940 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
3942         Parttool autoloading and improvements
3944         * Makefile.in (pkglib_DATA): add parttool.lst
3945         (parttool.lst): new target
3946         * genmk.rb: generate parttool-*
3947         (CLEANFILES): add #{parttool}
3948         (PARTTOOLFILES): new variable
3949         * genparttoollist.sh: new file
3950         * parttool/pcpart.c (grub_pcpart_boot): more feedback
3951         (grub_pcpart_type): likewise
3952         * commands/parttool.c (helpmsg): new variable
3953         (grub_cmd_parttool): output help if not enough arguments are supplied
3954         autoload modules
3955         (GRUB_MOD_INIT(parttool)): use helpmsg
3957 2009-04-24  David S. Miller  <davem@davemloft.net>
3959         Avoiding opening same device multiple times in device iterator.
3961         * kern/device.c: (grub_device_iterate): Define struct part_ent,
3962         and use it to build a list of partitions in iterate_disk() and
3963         iterate_partition().
3965         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
3966         on disk->data.
3968         * disk/ieee1275/nand.c (grub_nand_iterate): Return
3969         grub_devalias_iterate() result instead of unconditional 0.
3970         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
3971         Also, capture hook return value, either directly or via
3972         grub_children_iterate(), and propagate to caller.
3973         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
3974         grub_children_iterate): Return value is now 'int' instead of
3975         'grub_err_t'.
3976         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
3977         like a proper iterator, stopping when hooks return non-zero.
3978         (grub_devalias_iterate): Likewise.
3980 2009-04-23  David S. Miller  <davem@davemloft.net>
3982         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
3984 2009-04-22  David S. Miller  <davem@davemloft.net>
3986         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
3987         is larger than address_cells, use that value for address_cells too.
3989         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
3990         IEEE1275_MAX_PATH_LEN): Define.
3991         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
3992         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
3993         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
3994         'devtype'.  Explicitly NULL terminate devalias expansion.
3996         * util/sparc64/ieee1275/misc.c: New file.
3997         * util/sparc64/ieee1275/grub-setup.c: New file.
3998         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
3999         * util/sparc64/ieee1275/grub-mkimage.c: New file.
4000         * util/sparc64/ieee1275/grub-install.in: New file.
4001         * util/ieee1275/ofpath.c: New file.
4002         * util/ieee1275/devicemap.c: New file.
4003         * util/devicemap.c: New file.
4004         * util/deviceiter.c: New file.
4005         * kern/sparc64/ieee1275/init.c: New file.
4006         * include/grub/util/ofpath.h: New file.
4007         * include/grub/util/deviceiter.h: New file.
4008         * util/grub-mkdevicemap.c: Include deviceiter.h.
4009         Implement using grub_util_emit_devicemap_entry and
4010         grub_util_iterate_devices.
4011         * conf/i386-corebook.rmk: Build util/deviceiter.c and
4012         util/devicemap.c into grub-mkdevicemap
4013         * conf/i386-efi.rmk: Likewise.
4014         * conf/i386-ieee1275.rmk: Likewise.
4015         * conf/i386-pc.rmk: Likewise.
4016         * conf/powerpc-ieee1275.rmk: Likewise.
4017         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
4018         images and installation utilities.  Build kernel as image
4019         instead of as elf binary.  Use common rules as much as possible.
4021 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
4023         Correct GPT definition
4025         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
4026         of "attrib" member
4028 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
4030         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
4032 2009-04-19  David S. Miller  <davem@davemloft.net>
4034         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
4035         (grub_rescue_cmd_linux): Rename to...
4036         (grub_cmd_linux): and fix prototype.
4037         (grub_rescue_cmd_initrd): Rename to...
4038         (grub_cmd_initrd): and fix prototype.
4039         (cmd_linux, cmd_initrd): New.
4040         (GRUB_MOD_INIT(linux)): Use grub_register_command().
4041         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
4043 2009-04-17  Pavel Roskin  <proski@gnu.org>
4045         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
4046         format.
4047         (grub_ohci_transfer): Likewise.
4049         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
4051         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
4052         return without a value.  Fix inconsistent indentation.
4054         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
4055         match struct grub_fs.
4057         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
4058         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
4059         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4060         * commands/lspci.c (grub_lspci_iter): Likewise.
4062 2009-04-16  Bean  <bean123ch@gmail.com>
4064         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
4065         value.
4067 2009-04-15  Pavel Roskin  <proski@gnu.org>
4069         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
4070         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
4071         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
4072         definitions.
4074 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4076         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
4077         that no multiple data or metadata areas are supported and `Unknown
4078         metadata header'.
4080 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4082         Move loader out of the kernel
4084         * kern/loader.c: moved to ...
4085         * commands/boot.c: ... moved here
4086         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
4087         * commands/boot.c (grub_cmd_boot): moved here. All users updated
4088         * include/grub/kernel.h (grub_machine_fini): export
4089         * include/grub/loader.h (grub_loader_is_loaded): update declaration
4090         (grub_loader_set): likewise
4091         (grub_loader_unset): likewise
4092         (grub_loader_boot): likewise
4093         * conf/common.rmk: new module boot.mod
4094         (pkglib_MODULES): add boot.mod
4095         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
4096         (grub_emu_SOURCES): likewise
4097         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
4098         (grub_emu_SOURCES): likewise
4099         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
4100         (grub_emu_SOURCES): likewise
4101         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
4102         (grub_emu_SOURCES): likewise
4103         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
4104         (grub_emu_SOURCES): likewise
4105         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
4106         (grub_emu_SOURCES): likewise
4107         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
4108         (grub_emu_SOURCES): likewise
4110 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4112         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
4114         * kern/misc.c (grub_itoa): Removed function
4115         (grub_ltoa): likewise
4116         (grub_vsprintf): use grub_lltoa
4118 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4120         Restore grub-emu
4122         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
4123         * conf/i386-coreboot.rmk: likewise
4124         * conf/i386-ieee1275.rmk: likewise
4125         * conf/powerpc-ieee1275.rmk: likewise
4127 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4129         * INSTALL: Add that `./autogen.sh' needs to be run before
4130         `./configure.'.
4132 2009-04-14  Bean  <bean123ch@gmail.com>
4134         * Makefile.in (pkglib_DATA): Add handler.lst.
4135         (handler.lst): New rule.
4137         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
4138         * conf/i386-coreboot.rmk: Likewise.
4139         * conf/i386-ieee1275.rmk: Likewise.
4140         * conf/i386-efi.rmk: Likewise.
4141         * conf/x86_64-efi.rmk: Likewise.
4142         * conf/powerpc-ieee1275.rmk: Likewise.
4143         * conf/sparc64-ieee1275.rmk: Likewise.
4145         * genhandlerlist.sh: New file.
4147         * genmk.rb: Add rules to generate handler.lst.
4149         * include/grub/normal.h (grub_file_getline): New function definition.
4150         (read_handler_list): Likewise.
4151         (free_handler_list): Likewise.
4153         * include/grub/term.h (grub_term_register_input): Add name parameter
4154         for auto generation of handler.lst.
4155         (grub_term_register_output): Likewise.
4157         * normal/handler.c: New file.
4159         * normal/main.c (get_line): Renamed to grub_file_getline.
4160         (read_config_file): Use the newly renamed grub_file_getline.
4161         (read_command_list): Likewise.
4162         (read_fs_list): Likewise.
4163         (grub_normal_execute): Call read_handler_list to parse handler.lst.
4164         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
4166         * term/efi/console.c (grub_console_init): Add name parameter for auto
4167         generation of handler.lst.
4168         * term/gfxterm.c: Likewise.
4169         * term/i386/pc/at_keyboard.c: Likewise.
4170         * term/i386/pc/console.c: Likewise.
4171         * term/i386/pc/serial.c: Likewise.
4172         * term/i386/pc/vesafb.c: Likewise.
4173         * term/i386/pc/vga.c: Likewise.
4174         * term/i386/pc/vga_text.c: Likewise.
4175         * term/ieee1275/ofconsole.c: Likewise.
4176         * term/usb_keyboard.c: Likewise.
4178 2009-04-14  Bean  <bean123ch@gmail.com>
4180         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
4181         properly with null character.
4183 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4185         * configure: Remove.
4186         * config.h.in: Likewise.
4187         * stamp-h.in: Likewise.
4188         * DISTLIST: Likewise.
4189         * conf/common.mk: Likewise.
4190         * conf/i386-coreboot.mk: Likewise.
4191         * conf/i386-efi.mk: Likewise.
4192         * conf/i386-ieee1275.mk: Likewise.
4193         * conf/i386.mk: Likewise.
4194         * conf/i386-pc.mk: Likewise.
4195         * conf/powerpc-ieee1275.mk: Likewise.
4196         * conf/sparc64-ieee1275.mk: Likewise.
4197         * conf/x86_64-efi.mk: Likewise.
4199         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
4200         develop on GRUB.
4202 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
4203             David S. Miller  <davem@davemloft.net>
4205         * util/hostdisk.c (make_device_name): Fix buffer length
4206         calculations.
4208 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4210         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
4211         <sys/param.h> and <sys/sysctl.h>.
4212         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
4213         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
4214         opening the device and reset them afterwards.
4216 2009-04-13  Pavel Roskin  <proski@gnu.org>
4218         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
4219         Reported by John Stanley <jpsinthemix@verizon.net>
4221 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4223         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
4224         that name for menuentries when appropriate.
4226 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4228         * util/grub.d/10_freebsd.in: Add a missing `fi'.
4230 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4232         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
4233         to Linux, simply abort telling the user it's no longer supported.
4235 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4237         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
4238         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
4239         `freebsd_loadenv' only when devices.hints exist.
4241 2009-04-13  Pavel Roskin  <proski@gnu.org>
4243         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
4245 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4247         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
4248         partition number.
4249         (grub_drive): Likewise.
4251 2009-04-13  David S. Miller  <davem@davemloft.net>
4253         * kern/sparc64/ieee1275/ieee1275.c: New file.
4254         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
4255         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
4256         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
4257         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
4258         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
4259         grub_ieee1275_alloc_physmem): Declare new exported functions.
4261         * include/grub/sparc64/ieee1275/loader.h: New file.
4262         * include/grub/sparc64/ieee1275/memory.h: Likewise.
4263         * include/grub/sparc64/kernel.h: Likewise.
4264         * loader/sparc64/ieee1275/linux.c: Likewise.
4266         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
4267         (grub_fstest_SOURCES): Likewise.
4269         * util/hostdisk.c (make_device_name): Do not make any assumptions
4270         about the length of drive names.
4272         * kern/dl.c (grub_dl_load_file): Close file immediately when
4273         we are done using it.
4275 2009-04-12  David S. Miller  <davem@davemloft.net>
4277         * kern/misc.c (grub_ltoa): Fix cast when handling negative
4278         values.  Noticed by Pavel Roskin.
4280         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
4281         target compiler.
4283         * genmk.rb: Add more flexible image type specification, also
4284         pass --strip-unneeded to objcopy.
4285         * conf/i386-pc.rmk: Use *_FORMAT.
4286         * conf/i386-pc.mk: Rebuilt.
4288         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
4289         (OFDISK_HASH_SZ): Define.
4290         (ofdisk_hash): New hash table.
4291         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
4292         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
4293         instead of device phandle which is not unique.
4295         * kern/sparc64/ieee1275/init.c: Delete, replace with...
4296         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
4297         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
4298         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
4299         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
4300         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
4301         GRUB_KERNEL_MACHINE_DATA_END): Define.
4302         (grub_kernel_image_size, grub_total_module_size): Declare.
4304 2009-04-12  Pavel Roskin  <proski@gnu.org>
4306          * configure.ac: Change the logic when we check for target tools.
4307          Do it when the target is specified and it's different from the
4308          specified value of the host.
4310 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
4312         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
4313         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
4314         GNU/kFreeBSD. Check if a device is a character device. Use
4315         DIOCGMEDIASIZE to get the size.
4316         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
4317         support for GNU/kFreeBSD.
4318         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
4319         is a character device instead of a block device. Add support for
4320         FreeBSD device names.
4322         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
4323         is a character device instead of a block device.
4325         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
4326         is a character device instead of a block device.
4328 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
4330         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
4331         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
4332         FreeBSD. Check if a device is a character device. Use
4333         DIOCGMEDIASIZE to get the size.
4334         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
4335         support for FreeBSD.
4336         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
4337         is a character device instead of a block device. Add support for
4338         FreeBSD device names.
4340         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
4341         a character device instead of a block device.
4342         (grub_util_check_char_device): New function.
4344         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
4345         a character device instead of a block device.
4347         * include/grub/util/getroot.h (grub_util_check_char_device): New
4348         prototype.
4350 2009-04-11  David S. Miller  <davem@davemloft.net>
4352         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
4353         static libgcc.
4354         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
4355         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
4356         function, if present.
4357         (__bswapdi2): Likewise.
4359         * include/grub/sparc64/ieee1275/boot.h: New file.
4360         * boot/sparc64/ieee1275/boot.S: Likewise.
4361         * boot/sparc64/ieee1275/diskboot.S: Likewise.
4363         * kern/misc.c (grub_ltoa): New function.
4364         (grub_vsprintf): Use it to format 'long' integers.
4366 2009-04-10  David S. Miller  <davem@davemloft.net>
4368         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
4369         slots are of type grub_ieee1275_cell_t.
4370         (grub_nand_read): Likewise.
4371         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
4372         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
4373         macros are used to compare values in arg/ret block of the call.
4374         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4375         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
4376         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
4377         grub_ieee1275_instance_to_path, grub_ieee1275_write,
4378         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
4379         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
4380         grub_ieee1275_close, grub_ieee1275_set_property,
4381         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
4382         grub_ieee1275_cell_t.
4383         * kern/ieee1275/openfw.c (grub_map): Likewise.
4384         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
4385         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
4387         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
4388         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
4389         (grub_devalias_iterate): Likewise.
4391 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
4393         UFS improvements
4395         * fs/ufs.c (INODE_NBLOCKS): new definition
4396         (struct grub_ufs_dirent): added fields for non-BSD dirents
4397         (grub_ufs_get_file_block): fixed double indirect handling
4398         (grub_ufs_lookup_symlink): use more robust way to determine whether
4399         symlink is inline
4400         (grub_ufs_find_file): support for non-BSD dirents
4401         (grub_ufs_dir): support for non-BSD dirents
4403 2009-04-10  Bean  <bean123ch@gnail.com>
4405         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
4406         attribute, otherwise the size would be wrong for i386 platform.
4408         * include/grub/pci.h (grub_pci_read_word): New inline function.
4409         (grub_pci_read_byte): Likewise.
4410         (grub_pci_write): Likewise.
4411         (grub_pci_write_word): Likewise.
4412         (grub_pci_write_byte): Likewise.
4414         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
4416         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
4417         (find_framebuf): Scan pci to locate the frame buffer address.
4419         * commands/efi/fixvideo.c: New file.
4421         * commands/efi/loadbios.c: Likewise.
4423         * commands/memrw.c: Likewise.
4425         * util/grub-dumpbios.in: Likewise.
4427         * conf/common.rmk (grub-dumpbios): New utility.
4428         (pkglib_MODULES): New module memrw.mod.
4429         (memrw_mod_SOURCE): New macro.
4430         (memrw_mod_CFLAGS): Likewise.
4431         (memrw_mod_LDFLAGS): Likewise.
4433         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
4434         fixvideo.mod.
4435         (loadbios_mod_SOURCE): New macro.
4436         (loadbios_mod_CFLAGS): Likewise.
4437         (loadbios_mod_LDFLAGS): Likewise.
4438         (fixvideo_mod_SOURCE): Likewise.
4439         (fixvideo_mod_CFLAGS): Likewise.
4440         (fixvideo_mod_LDFLAGS): Likewise.
4442         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
4443         fixvideo.mod.
4444         (loadbios_mod_SOURCE): New macro.
4445         (loadbios_mod_CFLAGS): Likewise.
4446         (loadbios_mod_LDFLAGS): Likewise.
4447         (fixvideo_mod_SOURCE): Likewise.
4448         (fixvideo_mod_CFLAGS): Likewise.
4449         (fixvideo_mod_LDFLAGS): Likewise.
4451 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
4453         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
4455 2009-04-07  David S. Miller  <davem@davemloft.net>
4457         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
4458         support for R_SPARC_OLO10 relocations.  Fix compile warning for
4459         R_SPARC_WDISP30 case.
4460         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
4462 2009-04-06  Pavel Roskin  <proski@gnu.org>
4464         * include/grub/misc.h (ARRAY_SIZE): New macro.
4465         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
4466         New macro.
4467         * loader/i386/linux.c (allocate_pages): Use free_pages().
4468         (grub_linux_unload): Don't use free_pages().
4469         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
4470         wrong index.  Treat all other modes as text modes.
4471         (grub_cmd_linux): Initialize vid_mode unconditionally to
4472         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
4474         * commands/help.c (print_command_help): Use cmd->prio, not
4475         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
4477 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
4479         Parttool
4481         * parttool/pcpart.c: new file
4482         * commands/parttool.c: likewise
4483         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
4484         (parttool_mod_SOURCES): new variable
4485         (parttool_mod_CFLAGS): likewise
4486         (parttool_mod_LDFLAGS): likewise
4487         (pcpart_mod_SOURCES): likewise
4488         (pcpart_mod_CFLAGS): likewise
4489         (pcpart_mod_LDFLAGS): likewise
4490         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
4491         and parttool/pcpart.c
4492         * conf/i386-efi.rmk: likewise
4493         * conf/i386-ieee1275.rmk: likewise
4494         * conf/i386-pc.rmk: likewise
4495         * conf/powerpc-ieee1275.rmk: likewise
4496         * conf/sparc64-ieee1275.rmk: likewise
4497         * conf/x86_64-ieee1275.rmk: likewise
4499 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4501         Support for mtime and further expandability of dir command
4503         * include/grub/lib/datetime.h: moved to ...
4504         * include/grub/datetime.h: ... moved here and added
4505         declaration of grub_unixtime2datetime. All users updated
4506         * include/grub/fs.h: new syntax for dir and mtime functions in
4507         struct grub_fs
4508         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
4509         and GRUB_FSHELP_FLAGS_MASK
4510         * commands/ls.c (grub_ls_list_files): Write mtime in long format
4511         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
4512         (grub_ext2_mtime): new function
4513         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
4514         (grub_hfsplus_mtime): new function
4515         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
4516         (GRUB_UFS_ATTR_FILE): likewise
4517         (GRUB_UFS_ATTR_LNK): likewise
4518         (struct grub_ufs_sblock): new fields mtime
4519         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
4520         all users updated
4521         (grub_ufs_dir): mtime support
4522         (grub_ufs_mtime): new function
4523         * fs/affs.c (grub_affs_dir): use new dir syntax
4524         * fs/afs.c (grub_afs_dir): likewise
4525         * fs/cpio.c (grub_cpio_dir): likewise
4526         * fs/fat.c (grub_fat_find_dir): likewise
4527         * fs/hfs.c (grub_hfs_dir): likewise
4528         * fs/iso9660.c (grub_iso9660_dir): likewise
4529         * fs/jfs.c (grub_jfs_dir): likewise
4530         * fs/minix.c (grub_minix_dir): likewise
4531         * fs/ntfs.c (grub_ntfs_dir): likewise
4532         * fs/reiserfs.c (grub_reiserfs_dir): likewise
4533         * fs/sfs.c (grub_sfs_dir): likewise
4534         * fs/xfs.c (grub_xfs_dir): likewise
4535         * util/hostfs.c (grub_hostfs_dir): likewise
4536         * lib/datetime.c: moved to ...
4537         * normal/datetime.c: ... moved here
4538         (grub_unixtime2datetime): new function
4539         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
4540         * normal/completion.c (iterate_dir): use new dir syntax
4541         * normal/misc.c (grub_normal_print_device_info): tell the
4542         last modification time of a volume
4543         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
4544         * conf/common.rmk: added lib/datetime.c to ls.mod
4545         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
4546         (normal_mod_SOURCES): likewise
4547         (datetime_mod_SOURCES): Removed lib/datetime.c
4548         * conf/i386-efi.rmk: likewise
4549         * conf/i386-ieee1275.rmk: likewise
4550         * conf/i386-pc.rmk: likewise
4551         * conf/powerpc-ieee1275.rmk: likewise
4552         * conf/sparc64-ieee1275.rmk: likewise
4553         * conf/x86_64-efi.rmk: likewise
4555 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4557         Trim trailing spaces in FAT label and support mtools-like labels
4559         * fs/fat.c (grub_fat_iterate_dir): New function based
4560         on grub_fat_find_dir
4561         (grub_fat_find_dir): use grub_fat_iterate_dir
4562         (grub_fat_label): likewise
4564 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
4566         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
4567         and command.h
4568         remove extraneous kernel_elf_HEADERS
4570 2009-04-04  Bean  <bean123ch@gnail.com>
4572         * include/grub/util/misc.h: Add dummy function fsync for mingw.
4574         * util/misc.c: Likewise.
4576 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
4578         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
4579         instead of grub_printf.
4581 2009-04-03  Robert Millan  <rmh@aybabtu.com>
4583         * loader/i386/linux.c (grub_linux_setup_video): Fill
4584         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
4585         values from `mode info' structure instead of hardcoded
4586         values.
4588 2009-04-01  Pavel Roskin  <proski@gnu.org>
4590         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
4591         unused now.
4592         * genmk.rb: Likewise.
4593         * configure.ac: Likewise.
4595 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
4597         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
4598         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
4600 2009-04-01  David S. Miller  <davem@davemloft.net>
4602         * normal/sparc64/setjmp.S: Fix setjmp implementation.
4603         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
4604         (grub_setjmp): Mark with 'returns_twice' attribute.
4605         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
4606         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
4607         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
4609 2009-04-01  Robert Millan  <rmh@aybabtu.com>
4611         Reapply fix from 2008-07-28 which was accidentally reverted; also
4612         perform the same fix to a similar check in same function.
4614         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4615         with the same number are found, just use issue a warning with
4616         grub_dprintf(), as this error has been reported to be non-fatal.
4618 2009-03-31  Pavel Roskin  <proski@gnu.org>
4620         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
4621         for cross-compilation.
4623 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4625         Fix i386-ieee1275 build.
4627         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
4628         Remove declaration.
4630 2009-03-30  Pavel Roskin  <proski@gnu.org>
4632         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
4633         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
4634         zero-terminated, rely only on the strlen value.  Fix comparison
4635         of strings differing in length.
4637 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4639         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
4640         checking for abi version.  Improve error messages on BIOS to notify
4641         user about `linux16' command.
4643 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
4645         Leak fixes
4647         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
4648         in case of collision
4649         * disk/scsi.c (grub_scsi_open): free scsi in case of error
4651 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4653         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
4654         set `vid_mode' accordingly.
4655         (grub_linux_boot): Process `vid_mode' and set video mode.
4657 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4659         * util/grub.d/10_linux.in (linux_entry): New function.
4660         Factorize generation of Linux boot entries.
4662 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
4664         Make the format of Environment Block plain text. The boot loader
4665         part is not tested well yet.
4667         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
4668         (buffer): Removed.
4669         (envblk): Likewise.
4670         (usage): Remove "info" and "clear". Add "unset". Update the
4671         description of "set", as this does not delete variables any
4672         longer.
4673         (create_envblk_file): Complete rewrite.
4674         (open_envblk_file): Likewise.
4675         (cmd_info): Removed.
4676         (cmd_list): Likewise.
4677         (cmd_set): Likewise.
4678         (cmd_clear): Likewise.
4679         (list_variables): New function.
4680         (write_envblk): Likewise.
4681         (set_variables): Likewise.
4682         (unset_variables): Likewise.
4683         (main): Complete rewrite.
4685         * commands/loadenv.c (buffer): Removed.
4686         (envblk): Likewise.
4687         (open_envblk_file): New function.
4688         (read_envblk_file): Complete rewrite.
4689         (grub_cmd_load_env): Likewise.
4690         (grub_cmd_list_env): Likewise.
4691         (struct blocklist): New struct.
4692         (free_blocklists): New function.
4693         (check_blocklists): Likewise.
4694         (write_blocklists): Likewise.
4695         (grub_cmd_save_env): Complete rewrite.
4697         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
4698         a plain text signature.
4699         (GRUB_ENVBLK_MAXLEN): Removed.
4700         (struct grub_envblk): Complete rewrite.
4701         (grub_envblk_find): Removed.
4702         (grub_envblk_insert): Likewise.
4703         (grub_envblk_open): New prototype.
4704         (grub_envblk_set): Likewise.
4705         (grub_envblk_delete): Put const to VALUE.
4706         (grub_envblk_iterate): Put const to NAME and VALUE.
4707         (grub_envblk_close): New prototype.
4708         (grub_envblk_buffer): New inline function.
4709         (grub_envblk_size): Likewise.
4711         * lib/envblk.c: Include grub/mm.h.
4712         (grub_env_find): Removed.
4713         (grub_envblk_open): New function.
4714         (grub_envblk_close): Likewise.
4715         (escaped_value_len): Likewise.
4716         (find_next_line): Likewise.
4717         (grub_envblk_insert): Removed.
4718         (grub_envblk_set): New function.
4719         (grub_envblk_delete): Complete rewrite.
4720         (grub_envblk_iterate): Likewise.
4722 2009-03-28  Robert Millan  <rmh@aybabtu.com>
4724         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
4725         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
4726         variables.  Use 16-bit loader.
4727         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
4728         loader.
4729         * kern/i386/loader.S (grub_linux_boot): Rename to ...
4730         (grub_linux16_boot): ... this.  Update all users.
4731         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
4732         (grub_linux_boot): ... this.  Update all users.
4734         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
4735         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
4736         commands to `linux16' and `initrd16'.
4737         (GRUB_MOD_FINI(linux)): Rename to ...
4738         (GRUB_MOD_FINI(linux16)): ... this.
4740 2009-03-24  Pavel Roskin  <proski@gnu.org>
4742         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
4743         not just for compilation.
4745 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
4747         Move multiboot helper out of kernel
4749         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
4750         `loader/i386/multiboot_helper.S'.
4751         * conf/i386-coreboot.rmk: Likewise
4752         * conf/i386-ieee1275.rmk: Likewise
4754         * kern/i386/loader.S: Move multiboot helpers from here...
4755         * loader/i386/multiboot_helper.S: ...moved here
4756         * include/grub/i386/loader.h: Move declarations of multiboot
4757         helpers from here...
4758         * include/grub/i386/multiboot.h: ...moved here
4759         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
4761 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4763         * kern/env.c (grub_env_context_open): Added an argument to specify
4764         whether a new context inherits exported variables from current
4765         one. This is useful when making a sandbox to interpret a config
4766         file.
4767         All callers updated.
4769         * include/grub/env.h (grub_env_context_open): Updated the prototype.
4771 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4773         * kern/env.c (grub_env_context_close): Fix memory leaks.
4775 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
4777         * normal/main.c (grub_normal_execute): Added an argument
4778         BATCH to specify if an interactive interface should be provided
4779         after reading a config file.
4780         All callers updated.
4781         (read_command_list): Prevent being executed twice.
4782         (read_fs_list): Likewise.
4784         * include/grub/normal.h (grub_normal_execute): Updated the
4785         prototype.
4787 2009-03-22  Pavel Roskin  <proski@gno.org>
4789         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
4790         _start.
4791         * kern/i386/pc/startup.S: Likewise.
4792         * kern/i386/efi/startup.S: Likewise.
4793         * kern/i386/ieee1275/startup.S: Likewise.
4794         * kern/i386/coreboot/startup.S: Likewise.
4795         * kern/x86_64/efi/startup.S: Likewise.
4797         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
4798         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
4799         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
4801 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
4803         Bugfixes in multiboot for bugs uncovered by solaris kernel.
4805         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
4806         limit detection.
4807         Use vaddr of correct segment for entry_point.
4809 2009-03-21  Bean  <bean123ch@gmail.com>
4811         * commands/blocklist.c: Add include file <grub/command.h>, remove
4812         <grub/normal.h> and <grub/arg.h>.
4813         (grub_cmd_blocklist): Use the new command interface.
4814         (GRUB_MOD_INIT): Likewise.
4815         (GRUB_MOD_FINI): Likewise.
4816         * commands/boot.c: Likewise.
4817         * commands/cat.c: Likewise.
4818         * commands/cmp.c: Likewise.
4819         * commands/configfile.c: Likewise.
4820         * commands/crc.c: Likewise.
4821         * commands/echo.c: Likewise.
4822         * commands/halt.c: Likewise.
4823         * commands/handler.c: Likewise.
4824         * commands/hdparm.c: Likewise.
4825         * commands/help.c: Likewise.
4826         * commands/hexdump.c: Likewise.
4827         * commands/loadenv.c: Likewise.
4828         * commands/ls.c: Likewise.
4829         * commands/lsmmap.c: Likewise.
4830         * commands/lspci.c: Likewise.
4831         * commands/loadenv.c: Likewise.
4832         * commands/read.c: Likewise.
4833         * commands/reboot.c: Likewise.
4834         * commands/search.c: Likewise.
4835         * commands/sleep.c: Likewise.
4836         * commands/test.c: Likewise.
4837         * commands/usbtest.c: Likewise.
4838         * commands/videotest.c: Likewise.
4839         * commands/i386/cpuid.c: Likewise.
4840         * commands/i386/pc/halt.c: Likewise.
4841         * commands/i386/pc/play.c: Likewise.
4842         * commands/i386/pc/pxecmd.c: Likewise.
4843         * commands/i386/pc/vbeinfo.c: Likewise.
4844         * commands/i386/pc/vbetest.c: Likewise.
4845         * commands/ieee1275/suspend.c: Likewise.
4846         * disk/loopback.c: Likewise.
4847         * font/font_cmd.c: Likewise.
4848         * hello/hello.c: Likewise.
4849         * loader/efi/appleloader.c: Likewise.
4850         * loader/efi/chainloader.c: Likewise.
4851         * loader/i386/bsd.c: Likewise.
4852         * loader/i386/efi/linux.c: Likewise.
4853         * loader/i386/ieee1275/linux.c: Likewise.
4854         * loader/i386/linux.c: Likewise.
4855         * loader/i386/pc/chainloader.c: Likewise.
4856         * loader/i386/pc/linux.c: Likewise.
4857         * loader/powerpc/ieee1275/linux.c: Likewise.
4858         * loader/multiboot_loader.c: Likewise.
4859         * term/gfxterm.c: Likewise.
4860         * term/i386/pc/serial.c: Likewise.
4861         * term/terminfo.c: Likewise.
4863         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
4864         * term/i386/pc/vga.c: Likewise.
4865         * video/readers/jpeg.c: Likewise.
4866         * video/readers/png.c: Likewise.
4867         * video/readers/tga.c: Likewise.
4869         * util/grub-fstest (cmd_loopback): Removed.
4870         (cmd_blocklist): Likewise.
4871         (cmd_ls): Likewise.
4872         (grub_register_command): Likewise.
4873         (grub_unregister_command): Likewise.
4874         (execute_command): Use grub_command_find to locate command and execute
4875         it.
4877         * include/grub/efi/chainloader.h: Removed.
4878         * loader/efi/chainloader_normal.c: Likewise.
4879         * loader/i386/bsd_normal.c: Likewise.
4880         * loader/i386/pc/chainloader_normal.c: Likewise.
4881         * loader/i386/pc/multiboot_normal.c: Likewise.
4882         * loader/linux_normal.c: Likewise.
4883         * loader/multiboot_loader_normal.c: Likewise.
4884         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4886         * gencmdlist.sh: Scan new registration command grub_register_extcmd
4887         and grub_register_command_p1.
4889         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
4890         kern/command.c, lib/arg.c and commands/extcmd.c.
4891         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
4892         (minicmd_mod_SOURCES): New variable.
4893         (minicmd_mod_CFLAGS): Likewise.
4894         (minicmd_mod_LDFLAGS): Likewise.
4895         (extcmd_mod_SOURCES): Likewise.
4896         (extcmd_mod_CFLAGS): Likewise.
4897         (extcmd_mod_LDFLAGS): Likewise.
4898         (boot_mod_SOURCES): Removed.
4899         (boot_mod_CFLAGS): Likewise.
4900         (boot_mod_LDFLAGS): Likewise.
4902         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
4903         kern/corecmd.c.
4904         (kernel_img_HEADERS): Add command.h.
4905         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
4906         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
4907         and lib/arg.c.
4908         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
4909         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
4910         remove the corresponding normal mode command.
4911         (normal_mod_SOURCES): Remove normal/arg.c.
4912         * conf/i386-coreboot.rmk: Likewise.
4913         * conf/i386-efi.rmk: Likewise.
4914         * conf/i386-ieee1275.rmk: Likewise.
4915         * conf/powerpc-ieee1275.rmk: Likewise.
4916         * conf/x86_64-efi.rmk: Likewise.
4918         * include/grub/arg.h: Move from here ...
4919         * include/grub/lib/arg.h: ... to here.
4921         * normal/arg.c: Move from here ...
4922         * lib/arg.c: ... to here.
4924         * commands/extcmd.c: New file.
4925         * commands/minicmd.c: Likewise.
4926         * include/grub/command.h: Likewise.
4927         * include/grub/extcmd.h: Likewise.
4928         * kern/command.c: Likewise.
4929         * kern/corecmd.c: Likewise.
4931         * kern/list.c (grub_list_iterate): Return int instead of void.
4932         (grub_list_insert): New function.
4933         (grub_prio_list_insert): Likewise.
4935         * kern/rescue.c (grub_rescue_command): Removed.
4936         (grub_rescue_command_list): Likewise.
4937         (grub_rescue_register_command): Likewise.
4938         (grub_rescue_unregister_command): Likewise.
4939         (grub_rescue_cmd_boot): Move to minicmd.c
4940         (grub_rescue_cmd_help): Likewise.
4941         (grub_rescue_cmd_info): Likewise.
4942         (grub_rescue_cmd_boot): Likewise.
4943         (grub_rescue_cmd_testload): Likewise.
4944         (grub_rescue_cmd_dump): Likewise.
4945         (grub_rescue_cmd_rmmod): Likewise.
4946         (grub_rescue_cmd_lsmod): Likewise.
4947         (grub_rescue_cmd_exit): Likewise.
4948         (grub_rescue_print_devices): Moved to corecmd.c.
4949         (grub_rescue_print_files): Likewise.
4950         (grub_rescue_cmd_ls): Likewise.
4951         (grub_rescue_cmd_insmod): Likewise.
4952         (grub_rescue_cmd_set): Likewise.
4953         (grub_rescue_cmd_unset): Likewise.
4954         (attempt_normal_mode): Use grub_command_find to get normal module.
4955         (grub_enter_rescue_mode): Use grub_register_core_commands to register
4956         commands, remove grub_rescue_register_command calls.
4958         * normal/command.c (grub_register_command): Removed.
4959         (grub_unregister_command): Likewise.
4960         (grub_command_find): Likewise.
4961         (grub_iterate_commands): Likewise.
4962         (rescue_command): Likewise.
4963         (export_command): Moved to corecmd.c.
4964         (set_command): Removed.
4965         (unset_command): Likewise.
4966         (insmod_command): Likewise.
4967         (rmmod_command): Likewise.
4968         (lsmod_command): Likewise.
4969         (grub_command_init): Likewise.
4971         * normal/completion.c (iterate_command): Use cmd->prio to check for
4972         active command.
4973         (complete_arguments): Use grub_extcmd_t structure to find options.
4974         (grub_normal_do_completion): Change function grub_iterate_commands to
4975         grub_command_iterate.
4977         * normal/execute.c (grub_script_execute_cmd): No need to parse
4978         argument here.
4980         * normal/main.c (grub_dyncmd_dispatcher): New function.
4981         (read_command_list): Register unload commands as dyncmd.
4982         (grub_cmd_normal): Use new command interface, register rescue,
4983         unregister normal at entry, register normal, unregister rescue at exit.
4985         * include/grub/list.h (grub_list_test_t): New type.
4986         (grub_list_iterate): Return int instead of void.
4987         (grub_list_insert): New function.
4988         (GRUB_AS_NAMED_LIST_P): New macro.
4989         (GRUB_AS_PRIO_LIST): Likewise.
4990         (GRUB_AS_PRIO_LIST_P): Likewise.
4991         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
4992         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
4993         (grub_prio_list): New structure.
4994         (grub_prio_list_insert): New function.
4995         (grub_prio_list_remove): New inline function.
4997         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
4998         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
4999         (GRUB_COMMAND_FLAG_MENU): Likewise.
5000         (GRUB_COMMAND_FLAG_BOTH): Likewise.
5001         (GRUB_COMMAND_FLAG_TITLE): Likewise.
5002         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
5003         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
5004         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
5005         (grub_command): Likewise.
5006         (grub_register_command): Likewise.
5007         (grub_command_find): Likewise.
5008         (grub_iterate_commands): Likewise.
5009         (grub_command_init): Likewise.
5010         (grub_arg_parse): Likewise.
5011         (grub_arg_show_help): Likewise.
5013         * include/grub/rescue.h (grub_rescue_register_command): Removed.
5014         (grub_rescue_unregister_command): Likewise.
5016         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
5017         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
5018         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
5020         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
5021         grub_rescue_cmd_initrd.
5022         * include/grub/i386/loader.h: Likewise.
5023         * include/grub/x86_64/loader.h: Likewise.
5025         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
5027 2009-03-21  Bean  <bean123ch@gmail.com>
5029         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
5030         instead of stat in mingw environment.
5032         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
5034         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
5036         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
5037         AC_CONFIG_LINKS.
5039 2009-03-21  Bean  <bean123ch@gmail.com>
5041         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
5042         out of range error.
5044 2009-03-18  Michel Dänzer  <michel@daenzer.net>
5046         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
5047         checking inode flags for EXT4_EXTENTS_FLAG.
5049 2009-03-18  Robert Millan  <rmh@aybabtu.com>
5051         * loader/i386/linux.c: Include `<grub/video.h>' and
5052         `<grub/i386/pc/vbe.h>'..
5053         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
5054         (grub_linux32_boot): Attempt to configure video settings with
5055         grub_linux_setup_video().
5056         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
5057         to avoid grub_console_fini() which would step out of graphical mode
5058         unconditionally.
5060 2009-03-14  Robert Millan  <rmh@aybabtu.com>
5062         Fix build on powerpc.
5063         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
5065 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
5067         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
5068         background image command.
5070 2009-03-12  Colin D Bennett  <colin@gibibit.com>
5072         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
5073         (grub_gfxterm_putchar): Extract pairs of identical calls to
5074         draw_cursor out of conditional blocks.
5076 2009-03-11  Pavel Roskin  <proski@gnu.org>
5078         * fs/hfs.c (grub_hfs_strncasecmp): New function.
5079         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
5081 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5083         * loader/i386/multiboot_elfxx.c
5084         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
5086 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
5088         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
5089         `kern/handler.c'.
5091 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5093         * loader/i386/multiboot.c (code_size): New variable.
5094         (grub_multiboot): Define offsets by adding to `code_size' rather
5095         than subtracting from `grub_multiboot_payload_size'.  Provide
5096         4-byte alignment to MBI and others by increasing
5097         `boot_loader_name_length' appropriately.
5099         * loader/i386/multiboot_elfxx.c
5100         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
5102 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
5104         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
5105         `fs/ext2.c'.
5107 2009-03-08  Robert Millan  <rmh@aybabtu.com>
5109         Make loader/i386/linux.c usable on i386-pc again.
5111         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
5112         memory to heap.
5113         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
5114         `#error' stanza.
5116 2009-03-07  Bean  <bean123ch@gmail.com>
5118         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
5119         allocation.
5121 2009-03-06  Robert Millan  <rmh@aybabtu.com>
5123         Fix display issue on terminals with screen size other than 80x25
5124         (e.g. gfxterm with resolution higher than 640x480).
5126         * normal/main.c (grub_normal_init_page): Display title text in a
5127         position relative to the center of the terminal instead of relying
5128         on a hardcoded offset.
5130 2009-03-04  Robert Millan  <rmh@aybabtu.com>
5132         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
5133         installed.
5135         * Makefile.in (host_kernel): New variable.
5136         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
5137         scripts instead of just the windows one.
5138         * configure.ac: Initialize and AC_SUBST `host_kernel'.
5140 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5142         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
5143         `kern/handler.c'.
5144         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5145         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5146         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5147         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5148         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5149         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5151 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5153         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
5154         or if there's no space for the disk label and print the partition number on a
5155         invalid magic.
5157 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5159         * util/misc.c: Include <time.h>.
5160         (grub_millisleep): New function.
5162 2009-03-04  Bean  <bean123ch@gmail.com>
5164         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
5165         another option -mno-red-zone.
5167         * commands/handler.c: Change module description.
5169         * kern/handler.c: Add missing space at the end of description line.
5171         * kern/list.c: Likewise.
5173 2009-03-03  Robert Millan  <rmh@aybabtu.com>
5175         Move more components to the relocation area, and fix mbi pointer
5176         handling to use the destination rather than the origin (thanks to
5177         Vladimir Serbinenko for spotting).
5179         * loader/i386/multiboot.c (mbi_dest): New variable.
5180         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
5181         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
5182         relocation area.
5184 2009-03-01  Bean  <bean123ch@gmail.com>
5186         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
5187         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
5188         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
5189         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
5191         * loader/i386/efi/linux.c (acpi_guid): New variable.
5192         (acpi_guid): Likewise.
5193         (EBDA_SEG_ADDR): New constant.
5194         (LOW_MEM_ADDR): Likewise.
5195         (FAKE_EBDA_SEG): Likewise.
5196         (fake_bios_data): New function.
5197         (grub_linux_boot): Call fake_bios_data.
5199 2009-03-01  Bean  <bean123ch@gmail.com>
5201         * commands/terminal.c: Removed.
5203         * commands/handler.c: New file.
5205         * include/grub/list.h: Likewise.
5207         * include/grub/handler.h: Likewise.
5209         * kern/list.c: Likewise.
5211         * kern/handler.c: Likewise.
5213         * kern/term.h: Include header file <grub/handler.h>.
5214         (grub_term_input): Move next field to the beginning.
5215         (grub_term_output): Likewise.
5216         (grub_term_input_class): New variable.
5217         (grub_term_output_class): Likewise.
5218         (grub_term_register_input): Changed to inline function.
5219         (grub_term_register_output): Likewise.
5220         (grub_term_unregister_input): Likewise.
5221         (grub_term_unregister_output): Likewise.
5222         (grub_term_set_current_input): Likewise.
5223         (grub_term_set_current_output): Likewise.
5224         (grub_term_get_current_input): Likewise.
5225         (grub_term_get_current_output): Likewise.
5226         (grub_term_iterate_input): Removed.
5227         (grub_term_iterate_output): Likewise.
5229         * kern/term.c (grub_term_list_input): Removed.
5230         (grub_term_list_output): Likewise.
5231         (grub_term_input_class): New variable.
5232         (grub_term_output_class): Likewise.
5233         (grub_cur_term_input): Change variable as macro.
5234         (grub_cur_term_output): Likewise.
5235         (grub_term_register_input): Removed.
5236         (grub_term_register_output): Likewise.
5237         (grub_term_unregister_input): Likewise.
5238         (grub_term_unregister_output): Likewise.
5239         (grub_term_set_current_input): Likewise.
5240         (grub_term_set_current_output): Likewise.
5241         (grub_term_iterate_input): Likewise.
5242         (grub_term_iterate_output): Likewise.
5243         (grub_term_get_current_input): Likewise.
5244         (grub_term_get_current_output): Likewise.
5246         * util/grub-editenv.c: Include header file <grub/handler.h>.
5247         (grub_term_get_current_input): Removed.
5248         (grub_term_get_current_output): Likewise.
5249         (grub_term_input_class): New variable.
5250         (grub_term_output_class): Likewise.
5252         * util/grub-fstest.c (grub_term_get_current_input): Removed.
5253         (grub_term_get_current_output): Likewise.
5254         (grub_term_input_class): New variable.
5255         (grub_term_output_class): Likewise.
5257         * util/grub-probe.c (grub_term_get_current_input): Removed.
5258         (grub_term_get_current_output): Likewise.
5259         (grub_term_input_class): New variable.
5260         (grub_term_output_class): Likewise.
5262         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
5263         (grub_term_get_current_output): Likewise.
5264         (grub_term_input_class): New variable.
5265         (grub_term_output_class): Likewise.
5267         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
5268         (terminal_mod_SOURCES): Likewise.
5269         (terminal_mod_CFLAGS): Likewise.
5270         (terminal_mod_LDFLAGS): Likewise.
5272         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
5273         handler.c.
5274         (kernel_img_SOURCES): Add list.c and handler.c.
5275         (kernel_img_HEADERS): Add list.h and handler.h.
5277         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5278         handler.c.
5279         (kernel_mod_SOURCES): Add list.c and handler.c.
5280         (kernel_mod_HEADERS): Add list.h and handler.h.
5282         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
5283         handler.c.
5284         (kernel_elf_SOURCES): Add list.c and handler.c.
5285         (kernel_elf_HEADERS): Add list.h and handler.h.
5287         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5288         handler.c.
5289         (kernel_elf_SOURCES): Add list.c and handler.c.
5290         (kernel_elf_HEADERS): Add list.h and handler.h.
5292         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5293         handler.c.
5294         (kernel_mod_SOURCES): Add list.c and handler.c.
5295         (kernel_mod_HEADERS): Add list.h and handler.h.
5297         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5298         handler.c.
5299         (kernel_elf_SOURCES): Add list.c and handler.c.
5300         (kernel_elf_HEADERS): Add list.h and handler.h.
5302 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5304         Factorize elf32 / elf64 code in Multiboot loader.  This will
5305         prevent it from getting out of sync again.
5307         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
5308         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
5309         grub_multiboot_load_elf64): Move from here ...
5310         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
5311         grub_multiboot_load_elf): ... to here (new file).
5313 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5315         * util/grub.d/10_linux.in: Rename "single-user mode" to
5316         "recovery mode".
5318 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
5320         Don't leak in SCSI code.
5321         * disk/scsi.c (grub_scsi_close): free `scsi'.
5323 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5325         * loader/i386/pc/multiboot.c: Move from here ...
5326         * loader/i386/multiboot.c: ... to here.  Update all users.
5328 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5330         Patch from Alexandre Bique <bique.alexandre@gmail.com>
5331         * util/i386/pc/grub-setup.c (setup): Fix directory path.
5333 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
5335         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
5336         b-tree.
5338 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5340         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
5341         `0x' qualifier as 0 when base is specified as parameter).
5343 2009-02-24  Bean  <bean123ch@gmail.com>
5345         * configure.ac: Check for -mcmodel=large in x86_64 target.
5347         * include/grub/efi/api.h (efi_call_10): New macro.
5348         (efi_wrap_10): New function.
5350         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
5351         (GRUB_PE32_REL_BASED_HIGH): Likewise.
5352         (GRUB_PE32_REL_BASED_LOW): Likewise.
5353         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
5354         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
5355         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
5356         (GRUB_PE32_REL_BASED_SECTION): Likewise.
5357         (GRUB_PE32_REL_BASED_REL): Likewise.
5358         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
5359         (GRUB_PE32_REL_BASED_DIR64): Likewise.
5360         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
5362         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
5363         issue.
5365         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
5366         (efi_wrap_10): New function.
5368         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
5370         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
5371         MB/MBP model (NV chipset).
5372         (devdata_devs): Add devpath_5 to the list.
5374         * load/i386/efi/linux.c (video_base): Remove variable.
5375         (RGB_MASK): New macro.
5376         (RGB_MAGIC): Likewise.
5377         (LINE_MIN): Likewise.
5378         (LINE_MAX): Likewise.
5379         (FBTEST_STEP): Likewise.
5380         (FBTEST_COUNT): Likewise.
5381         (fb_list): New variable.
5382         (grub_find_video_card): Remove function.
5383         (find_framebuf): New function.
5384         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
5385         line length.
5387         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
5388         problem for x86_64.
5390 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
5392         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
5394         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
5395         coding tool name.
5397 2009-02-22  Robert Millan  <rmh@aybabtu.com>
5399         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
5400         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
5401         in our relocation, instead of using it directly from heap.  Also
5402         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
5404 2009-02-21  Robert Millan  <rmh@aybabtu.com>
5406         Implement USB keyboard support (based on patch by Marco Gerards)
5408         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
5409         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
5410         (usb_keyboard_mod_LDFLAGS): New variables.
5412         * term/usb_keyboard.c: New file.
5414 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
5416         Corrected wrong declaration
5418         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
5420 2009-02-14  Christian Franke  <franke@computer.org>
5422         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
5423         (grub_lspci_iter): Print class code and programming interface byte.
5425 2009-02-14  Christian Franke  <franke@computer.org>
5427         * gendistlist.sh: Ignore `.svn' directories.
5429 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
5431         * fs/fat.c: Add 2009 to Copyright line.
5433 2009-02-14  Christian Franke  <franke@computer.org>
5435         * commands/hdparm.c: New file.  Provides `hdparm' command
5436         which sends ATA commands via grub_disk_ata_pass_through ().
5438         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
5440         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
5441         and <grub/cpu/io.h> to include/grub/ata.h.
5442         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
5443         (GRUB_CDROM_SECTOR_SIZE): Remove.
5444         (GRUB_ATA_*): Move to include/grub/ata.h.
5445         (GRUB_ATAPI_*): Likewise.
5446         (enum grub_ata_commands): Likewise.
5447         (enum grub_ata_timeout_milliseconds): Likewise.
5448         (struct grub_ata_device): Likewise.
5449         (grub_ata_regset): Likewise.
5450         (grub_ata_regget): Likewise.
5451         (grub_ata_regset2): Likewise.
5452         (grub_ata_regget2): Likewise.
5453         (grub_ata_check_ready): Likewise.
5454         (grub_ata_wait_not_busy): Remove static, exported in
5455         include/grub/ata.h.
5456         (grub_ata_wait_drq): Likewise.
5457         (grub_ata_pio_read): Likewise.
5459         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
5460         function for hdparm.mod.
5462         * include/grub/ata.h: New file, contains declarations from
5463         disk/ata.c.
5464         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
5466         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
5467         (grub_disk_ata_pass_through): New exported variable.
5469         * kern/disk.c (grub_disk_ata_pass_through): New variable.
5471 2009-02-13  Colin D Bennett  <colin@gibibit.com>
5473         Support multiple fallback entries, and provide an API to support
5474         executing default+fallback menu entries.  Renamed the `terminal' menu
5475         viewer to `text'.
5477         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
5478         variable declaration.
5479         (grub_menu_execute_callback): New structure declaration.
5480         (grub_menu_execute_callback_t): New typedef.
5481         (grub_menu_execute_with_fallback): New function declaration.
5482         (grub_menu_get_entry): Likewise.
5483         (grub_menu_get_timeout): Likewise.
5484         (grub_menu_set_timeout): Likewise.
5486         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
5488         * normal/menu.c (grub_wait_after_message): Moved to
5489         `normal/menu_text.c'.
5490         (draw_border): Likewise.
5491         (print_message): Likewise.
5492         (print_entry): Likewise.
5493         (print_entries): Likewise.
5494         (grub_menu_init_page): Likewise.
5495         (get_entry_number): Likewise.
5496         (print_timeout): Likewise.
5497         (run_menu): Likewise.
5498         (grub_menu_execute_entry): Likewise.
5499         (show_text_menu): Likewise.
5500         (get_and_remove_first_entry_number): New function.
5501         (grub_menu_execute_with_fallback): Likewise.
5502         (get_entry): Renamed to ...
5503         (grub_menu_get_entry): .. this and made it global.
5504         (get_timeout): Renamed to ...
5505         (grub_menu_get_timeout): ... this and made it global.
5506         (set_timeout): Renamed to ...
5507         (grub_menu_set_timeout): ... this and made it global.
5508         (grub_normal_terminal_menu_viewer): Renamed to ...
5509         (grub_normal_text_menu_viewer): ... this.
5511         * normal/menu_text.c: New file.  Extracted text-menu-specific code
5512         from normal/menu.c.
5514         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
5515         (normal_mod_SOURCES): Likewise.
5517         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5518         (normal_mod_SOURCES): Likewise.
5520         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5521         (normal_mod_SOURCES): Likewise.
5523         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
5524         (normal_mod_SOURCES): Likewise.
5526         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5527         (normal_mod_SOURCES): Likewise.
5529         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5530         (normal_mod_SOURCES): Likewise.
5532         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5533         (normal_mod_SOURCES): Likewise.
5535 2009-02-11  Robert Millan  <rmh@aybabtu.com>
5537         * util/grub.d/00_header.in: Update old reference to `font' command.
5539 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
5541         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
5543         Based on patch from Javier Martín.
5545 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5547         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
5548         to avoid false positives with FAT.
5549         (grub_fstest_SOURCES): Likewise.
5550         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5551         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5552         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5553         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5554         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5555         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5557 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5559         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
5560         bpb.version_specific.fat12_or_fat16.fstype and
5561         bpb.version_specific.fat32.fstype.
5563 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5565         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
5567 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5569         * Makefile.in (host_os, host_cpu): New variables.
5570         (target_os): Remove.  Update all users.
5572 2009-02-08  Marco Gerards  <marco@gnu.org>
5574         * Makefile.in (enable_grub_emu_usb): New variable.
5575         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
5576         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
5577         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
5578         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
5579         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
5580         `usbtest.mod' and `usbms.mod'.
5581         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
5582         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
5583         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
5584         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
5585         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
5586         variables.
5588         * disk/usbms.c: New file.
5590         * include/grub/usb.h: Likewise.
5592         * include/grub/usbtrans.h: Likewise.
5594         * include/grub/usbdesc.h: Likewise.
5596         * bus/usb/usbtrans.c: Likewise.
5598         * bus/usb/ohci.c: Likewise.
5600         * bus/usb/uhci.c: Likewise.
5602         * bus/usb/usbhub.c: Likewise.
5604         * bus/usb/usb.c: Likewise.
5606         * commands/usbtest.c: Likewise.
5608         * util/usb.c: Likewise.
5610         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
5612         * configure.ac: Test for libusb presence.
5614         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
5616 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
5618         * kern/mm.c: Add more comments.
5620 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5622         Patch from Javier Martín.
5623         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
5624         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
5626 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5628         * fs/cpio.c: Split tar functionality to ...
5629         * fs/tar.c: ... here (new file).  Update all users.
5631 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5633         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
5634         backward-incompatible features.
5636         Based on patch from Javier Martín, with some adjustments.
5638 2009-02-07  Michael Scherer  <misc@mandriva.org>
5640         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
5642 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5644         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
5645         position of `disk/lvm.c' to ensure grub_init_all() always picks it
5646         after the RAID stuff.
5648 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
5650         Fixes problem when running vbetest command as reported by
5651         Vladimir Serbinenko <phcoder@gmail.com>.
5653         * (grub_vbe_set_video_mode): Fixed problem with text modes.
5655 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
5657         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
5658         /dev/md/NpN style mdraid devices.
5660 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5662         * util/unifont2pff.rb: Remove.
5664 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5666         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
5667         `#'.
5669 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5671         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
5672         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5673         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5674         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5675         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5676         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5677         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5679 2009-02-02  Christian Franke  <franke@computer.org>
5681         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
5683 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
5685         * INSTALL: Note that we now require at least autoconf 2.59 and
5686         that LZO is optional.
5688 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5690         Base on patch on bug #24154 created by Tomas Tintera
5691         <trosos@seznam.cz>.
5693         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
5695 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
5697         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
5698         <bero@arklinux.org>.
5700         * normal/parser.y (script_init): Add missing semicolon.
5702 2009-01-31  Colin D Bennett  <colin@gibibit.com>
5704         * normal/main.c: Add include to grub/menu_viewer.h.
5705         (free_menu_entry_classes): Added.
5706         (grub_normal_menu_addentry): Added class property handling.
5707         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
5708         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
5710         * normal/menu_viewer.c: New file.
5712         * normal/menu.c (run_menu_entry): Renamed to ...
5713         (grub_menu_execute_entry): ... this and made it as global.
5714         (grub_menu_run): Renamed to ...
5715         (show_text_menu): ... this and made it local.
5716         (show_text_menu): Adapt to new function names.
5717         (grub_normal_terminal_menu_viewer): New global variable.
5719         * include/grub/menu.h: New file.
5721         * include/grub/menu_viewer.h: New file.
5723         * include/grub/normal.h: Added include to grub/menu.h.
5724         (grub_menu_entry): Moved to include/grub/menu.h.
5725         (grub_menu_entry_t): Likewise.
5726         (grub_menu): Likewise.
5727         (grub_menu_t): Likewise.
5728         (grub_normal_terminal_menu_viewer): Added.
5729         (grub_menu_execute_entry): Likewise.
5730         (grub_menu_run): Removed.
5732         * DISTLIST: Added include/grub/menu.h.
5733         Added include/grub/menu_viewer.h.
5734         Added normal/menu_viewer.c.
5736 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
5738         * normal/execute.c (grub_script_execute_menuentry): Changed to use
5739         arglist for menutitle arguments.
5741         * normal/main.c (grub_normal_menu_addentry): Likewise.
5743         * normal/parser.y (menuentry): Likewise.
5745         * normal/script.c (grub_script_create_cmdmenu): Likewise.
5747         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
5748         (grub_script_create_cmdmenu): Likewise.
5750         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
5752         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
5753         changes.
5755         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
5757         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
5759         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
5761         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5763         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5765         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5767 2009-01-30  Christian Franke  <franke@computer.org>
5769         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
5770         in option help text.
5772 2009-01-27  Pavel Roskin  <proski@gnu.org>
5774         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
5776 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5778         * commands/lsmmap.c: Add include to grub/machine/memory.h.
5780         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
5782         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
5783         unregister function.
5785 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
5787         * disk/scsi.c (grub_scsi_read): Fix sign problem.
5789         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
5791         * util/grub-mkfont.c (usage): Fix typo.
5793         * util/elf/grub-mkimage.c (load_modules): Fix warning.
5795 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
5797         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
5799         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
5801         * kern/misc.c (grub_strcasecmp): New function.
5802         (grub_strcasecmp): Use grub_size_t instead of int for length.
5803         Fix return value.
5804         * include/grub/misc.h: Update function prototypes.
5806 2009-01-26  Robert Millan  <rmh@aybabtu.com>
5808         * configure.ac: Fix cross-compilation check.
5810 2009-01-22  Christian Franke  <franke@computer.org>
5812         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
5813         (precision) digit string.  Allow `.format2' without `format1' (width).
5814         Limit input chars for `%s' output to `format2' if specified.  This is
5815         compatible with standard printf ().
5817 2009-01-22  Christian Franke  <franke@computer.org>
5819         * disk/ata.c (grub_ata_wait_status): Replace by ...
5820         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
5821         other status bits may be invalid while BSY is asserted.
5822         (grub_ata_check_ready): New function.
5823         (grub_ata_cmd): Removed.
5824         (grub_ata_wait_drq): New function.
5825         (grub_ata_strncpy): Remove inline.
5826         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
5827         and error check now done by grub_ata_wait_drq ().
5828         (grub_ata_pio_write): Likewise.
5829         (grub_atapi_identify): Set DEV before check for !BSY.  Use
5830         grub_ata_wait_drq () to wait for data.
5831         (grub_ata_device_initialize): Add status register check to
5832         detect missing SATA slave devices.  Add debug messages.
5833         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
5834         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
5835         transfer loop by grub_ata_pio_write ().
5836         (grub_ata_identify): Set DEV before check for !BSY. Use
5837         grub_ata_wait_drq () to wait for data.
5838         (grub_ata_setaddress): Set DEV before check for !BSY.
5839         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
5840         read/write in one loop.  Fix invalid command on write.  Fix incomplete
5841         command on (size % batch) == 0.  Add missing error check after write of
5842         last block.  Add debug messages.
5843         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
5845 2009-01-19  Christian Franke  <franke@computer.org>
5847         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
5848         (GRUB_ATAPI_IREASON_*): Likewise.
5849         (grub_ata_pio_write): Fix timeout error return.
5850         (grub_atapi_identify): Add grub_ata_wait () after cmd.
5851         (grub_atapi_wait_drq): New function.
5852         (grub_atapi_packet): New parameter `size'.
5853         Use grub_atapi_wait_drq () and direct write instead of
5854         grub_ata_pio_write ().
5855         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
5856         reads the number of bytes requested by the device for each DRQ
5857         assertion.
5858         (grub_atapi_write): Remove old implementation, return not
5859         implemented instead.
5861 2009-01-19  Christian Franke  <franke@computer.org>
5863         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
5864         of 512 to calculate data size.
5865         (grub_scsi_read12): Likewise.
5866         (grub_scsi_write10): Likewise.
5867         (grub_scsi_write12): Likewise.
5868         (grub_scsi_read): Adjust size according to blocksize.
5869         Add checks for invalid blocksize and unaligned transfer.
5871 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
5873         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
5875         * term/gfxterm.c (write_char): Fix background rendering for wide
5876         width glyphs.
5878 2009-01-19  Robert Millan  <rmh@aybabtu.com>
5880         * config.guess: Update to latest version from config git.
5881         * config.sub: Likewise.
5883 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
5885         * Makefile.in: Change font compilation to use new grub-mkfont instead
5886         of java version.
5888         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
5889         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5890         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5891         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5892         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5893         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5894         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5895         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5896         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5898 2009-01-16  Christian Franke  <franke@computer.org>
5900         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
5901         (enum grub_ata_timeout_milliseconds): New enum.
5902         (grub_ata_wait_status): Add parameter milliseconds.
5903         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
5904         recovery from timed-out commands.
5905         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
5906         return grub_errno instead of REG_ERROR.
5907         (grub_ata_pio_write): Add parameter milliseconds.
5908         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
5909         Pass milliseconds to grub_ata_wait_status () and
5910         grub_ata_pio_read ().
5911         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
5912         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
5913         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
5914         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
5915         It is not suitable for device detection, because DEV bit is ignored,
5916         the command may run too long, and not all devices set the signature
5917         properly.
5918         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
5919         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
5920         Fix device selection, DEV bit must be set first to address the registers
5921         of the correct device.
5922         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
5923         grub_ata_pio_read/write ().
5924         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
5925         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
5927 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
5929         * util/grub-editenv.c (main): Use fseeko(), not fseek().
5931 2009-01-13  Bean  <bean123ch@gmail.com>
5933         * util/grub-mkfont.c (write_font): forget to remove some debug code.
5935 2009-01-13  Bean  <bean123ch@gmail.com>
5937         * Makefile.in: (enable_grub_mkfont): New variable.
5938         (freetype_cflags): Likewise.
5939         (freetype_libs): Likewise.
5941         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
5942         (grub_mkfont_SOURCES): New variable.
5943         (grub_mkfont_CFLAGS): Likewise.
5944         (grub_mkfont_LDFLAGS): Likewise.
5946         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
5947         library if `--enable-grub-mkfont' is requested.
5948         (enable_grub_mkfont): New variable.
5949         (freetype_cflags): Likewise.
5950         (freetype_libs): Likewise.
5952         * util/grub-mkfont.c: New file.
5954 2009-01-12  Christian Franke  <franke@computer.org>
5956         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
5957         mode check.  Fix setting of compat_use[].
5959 2009-01-10  Robert Millan  <rmh@aybabtu.com>
5961         Update a few copyright years which we forgot to do in 2008 (only for
5962         files whose changes made in 2008 were copyright-significant)
5964         * Makefile.in: Add 2008 to Copyright line.
5965         * disk/ieee1275/ofdisk.c: Likewise.
5966         * disk/efi/efidisk.c: Likewise.
5967         * kern/dl.c: Likewise.
5968         * kern/sparc64/ieee1275/init.c: Likewise.
5969         * kern/mm.c: Likewise.
5970         * kern/efi/mm.c: Likewise.
5971         * boot/i386/pc/boot.S: Likewise.
5972         * genfslist.sh: Likewise.
5973         * fs/iso9660.c: Likewise.
5974         * fs/hfs.c: Likewise.
5975         * fs/jfs.c: Likewise.
5976         * fs/minix.c: Likewise.
5977         * fs/ufs.c: Likewise.
5978         * gensymlist.sh.in: Likewise.
5979         * genkernsyms.sh.in: Likewise.
5980         * include/grub/misc.h: Likewise.
5981         * include/grub/types.h: Likewise.
5982         * include/grub/symbol.h: Likewise.
5983         * include/grub/elf.h: Likewise.
5984         * include/grub/kernel.h: Likewise.
5985         * include/grub/disk.h: Likewise.
5986         * include/grub/dl.h: Likewise.
5987         * include/grub/i386/linux.h: Likewise.
5988         * include/grub/i386/pc/biosdisk.h: Likewise.
5989         * include/grub/efi/api.h: Likewise.
5990         * include/grub/efi/pe32.h: Likewise.
5991         * include/grub/util/misc.h: Likewise.
5992         * normal/execute.c: Likewise.
5993         * normal/arg.c: Likewise.
5994         * normal/completion.c: Likewise.
5995         * normal/lexer.c: Likewise.
5996         * normal/parser.y: Likewise.
5997         * normal/misc.c: Likewise.
5998         * commands/i386/pc/vbeinfo.c: Likewise.
5999         * commands/hexdump.c: Likewise.
6000         * commands/terminal.c: Likewise.
6001         * commands/ls.c: Likewise.
6002         * commands/help.c: Likewise.
6003         * partmap/pc.c: Likewise.
6004         * loader/efi/chainloader.c: Likewise.
6005         * loader/multiboot_loader.c: Likewise.
6006         * loader/i386/pc/multiboot2.c: Likewise.
6007         * term/efi/console.c: Likewise.
6008         * term/i386/pc/serial.c: Likewise.
6009         * util/lvm.c: Likewise.
6010         * util/console.c: Likewise.
6011         * util/i386/efi/grub-mkimage.c: Likewise.
6012         * util/raid.c: Likewise.
6014 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
6016         * commands/videotest.c: Removed include to grub/machine/memory.h.
6018         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
6019         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
6020         (video_mod_SOURCES): Removed.
6021         (video_mod_CFLAGS): Likewise.
6022         (video_mod_LDFLAGS): Likewise.
6023         (gfxterm_mod_SOURCES): Likewise.
6024         (gfxterm_mod_CFLAGS): Likewise.
6025         (gfxterm_mod_LDFLAGS): Likewise.
6026         (videotest_mod_SOURCES): Likewise.
6027         (videotest_mod_CFLAGS): Likewise.
6028         (videotest_mod_LDFLAGS): Likewise.
6029         (bitmap_mod_SOURCES): Likewise.
6030         (bitmap_mod_CFLAGS): Likewise.
6031         (bitmap_mod_LDFLAGS): Likewise.
6032         (tga_mod_SOURCES): Likewise.
6033         (tga_mod_CFLAGS): Likewise.
6034         (tga_mod_LDFLAGS): Likewise.
6035         (jpeg_mod_SOURCES): Likewise.
6036         (jpeg_mod_CFLAGS): Likewise.
6037         (jpeg_mod_LDFLAGS): Likewise.
6038         (png_mod_SOURCES): Likewise.
6039         (png_mod_CFLAGS): Likewise.
6040         (png_mod_LDFLAGS): Likewise.
6042         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
6043         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
6044         (video_mod_SOURCES): Added.
6045         (video_mod_CFLAGS): Likewise.
6046         (video_mod_LDFLAGS): Likewise.
6047         (videotest_mod_SOURCES): Likewise.
6048         (videotest_mod_CFLAGS): Likewise.
6049         (videotest_mod_LDFLAGS): Likewise.
6050         (bitmap_mod_SOURCES): Likewise.
6051         (bitmap_mod_CFLAGS): Likewise.
6052         (bitmap_mod_LDFLAGS): Likewise.
6053         (tga_mod_SOURCES): Likewise.
6054         (tga_mod_CFLAGS): Likewise.
6055         (tga_mod_LDFLAGS): Likewise.
6056         (jpeg_mod_SOURCES): Likewise.
6057         (jpeg_mod_CFLAGS): Likewise.
6058         (jpeg_mod_LDFLAGS): Likewise.
6059         (png_mod_SOURCES): Likewise.
6060         (png_mod_CFLAGS): Likewise.
6061         (png_mod_LDFLAGS): Likewise.
6062         (gfxterm_mod_SOURCES): Likewise.
6063         (gfxterm_mod_CFLAGS): Likewise.
6064         (gfxterm_mod_LDFLAGS): Likewise.
6066         * term/gfxterm.c: Removed include to grub/machine/memory.h,
6067         grub/machine/console.h.
6069 2009-01-04  Jerone Young  <jerone@gmail.com>
6071         Make on screen instructions clearer
6073         Based on patch created by Jidanni <jidanni@jidanni.org>
6075         * normal/menu.c: print clearer instructions on the screen
6077 2009-01-02  Colin D Bennett  <colin@gibibit.com>
6079         New font engine.
6081         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
6082         build system and fixed gfxterm.c to work with different sized fonts.
6084         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
6086         * configure: Re-generated.
6088         * DISTLIST: Removed font/manager.c.
6089         Added font/font.c.
6090         Added font/font_cmd.c.
6092         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
6093         compilation.
6095         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
6097         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
6099         * kern/term.c: Changed users of grub_utf8_to_ucs4.
6101         * normal/menu.c: Likewise.
6103         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
6104         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
6106         * include/grub/font.h: Replaced with new file.
6108         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
6109         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
6110         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
6111         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
6112         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
6113         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
6114         fg_red, fg_green, fg_blue, fg_alpha.
6115         (grub_video_adapter): Removed blit_glyph.
6116         (grub_video_blit_glyph): Removed.
6118         * font/manager.c: Removed file.
6120         * font/font.c: New file.
6122         * font/font_cmd.c: Likewise.
6124         * video/video.c (grub_video_blit_glyph): Removed.
6126         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
6127         (grub_video_vbe_map_rgba): Likewise.
6128         (grub_video_vbe_unmap_color_int): Likewise.
6129         (grub_video_vbe_blit_glyph): Removed.
6130         (grub_video_vbe_adapter): Removed blit_glyph.
6132         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
6133         (get_pixel): Likewise.
6134         (set_pixel): Likewise.
6136         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
6138         * term/gfxterm.c: Adapted to new font engine.
6140         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
6142         * term/i386/pc/vga.c: Likewise.
6144         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
6146         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6148         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6150         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6152         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6154         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6156         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6158         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6160         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6162         * util/grub.d/00_header.in: Changed to use new loadfont command.
6164         * util/grub-mkconfig_lib.in: Changed font extension.
6166 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
6168         * util/getroot.c (grub_util_get_grub_dev): Add support for
6169         /dev/md/dNNpNN style partitionable mdraid devices.
6171 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
6173         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
6174         at a time limit of the PXE TFTP API correctly.
6175         (grub_pxefs_close): Likewise.
6177 2008-11-29  Robert Millan  <rmh@aybabtu.com>
6179         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
6180         grub_ata_device_initialize() calls.
6182 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
6184         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
6185         iteration failed.
6186         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
6188 2008-11-28  Robert Millan  <rmh@aybabtu.com>
6190         Fix build on powerpc-ieee1275.  Based on patch created by
6191         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
6192         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6193         `kern/ieee1275/mmap.c'.
6194         * include/grub/powerpc/ieee1275/memory.h: New file.
6196         Provide grub-install on coreboot.
6197         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
6198         (grub_install_SOURCES): New variable.
6199         * util/i386/pc/grub-install.in: Add a few condition checks to make it
6200         usable on coreboot.
6202 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
6204         * util/grub-fstest.c (grub_term_get_current_input): Change return type
6205         to `grub_term_input_t'.
6206         (grub_term_get_current_output): Change return type to
6207         `grub_term_output_t'.
6209 2008-11-22  Robert Millan  <rmh@aybabtu.com>
6211         Fix breakage on coreboot due to declaration mismatch.
6212         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
6213         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
6214         grub_vga_text_cls().
6216         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
6217         comments.  Avoid copying one more byte than necessary (just in case).
6219         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
6220         to 0x200000 (avoids trouble with some OFW implementations, and matches
6221         with the one in Yaboot).
6222         Reported by Manoel Abranches
6224 2008-11-20  Robert Millan  <rmh@aybabtu.com>
6226         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
6227         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
6229         * util/grub-mkconfig_lib.in (grub_warn): New function.
6230         (convert_system_path_to_grub_path): Use grub_warn() when issuing
6231         warnings, to obtain consistent formatting.
6232         * util/grub.d/00_header.in: Likewise.
6233         * util/update-grub_lib.in: Likewise.
6235         * loader/i386/linux.c (allocate_pages): Fix a warning.
6236         Move comment text to `#error' stanza.
6238         Harmonize ieee1275's grub_available_iterate() with the generic
6239         grub_machine_mmap_iterate() interface (fixes a recently-introduced
6240         build problem on i386-ieee1275):
6241         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
6242         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
6243         parameter `type'.  Update all users of this function.
6244         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6245         `kern/ieee1275/mmap.c'.
6246         * kern/ieee1275/init.c
6247         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
6248         with ...
6249         (grub_machine_mmap_iterate): ... this.
6250         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
6251         return type to `grub_err_t'.  Update all implementations of this
6252         function prototype.
6253         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
6254         Likewise.
6256         Add `lsmmap' command (lists firmware-provided memory map):
6257         * commands/lsmmap.c: New file.
6258         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
6259         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
6260         variables.
6261         * conf/powerpc-ieee1275.rmk: Likewise.
6262         * conf/i386-coreboot.rmk: Likewise.
6263         * conf/i386-ieee1275.rmk: Likewise.
6265 2008-11-19  Robert Millan  <rmh@aybabtu.com>
6267         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
6268         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
6269         constraints to initrd allocation (based on code from
6270         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
6271         for Linux to find it.
6273 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6275         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
6276         order to cope with duplicate slashes.
6278 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6280         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
6281         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
6282         don't want to mess with lower memory, because it is used in the Linux
6283         loader.
6285         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
6286         an appropriate place in lower memory, between 0x10000 and 0x90000,
6287         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
6288         is in our heap (probably as a result of it being corrupted during
6289         decompression).  Add #error instance with comment to explain why this
6290         loader isn't currently usable on PC/BIOS.
6292 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6294         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
6295         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
6297 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6299         Make loader/i386/linux.c buildable on i386-pc (although disabled).
6301         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
6302         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
6303         from here ...
6304         * include/grub/i386/pc/memory.h: ... to here.
6306 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6308         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
6309         split).
6311         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
6312         (grub_console_cur_color, grub_console_real_putchar)
6313         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6314         (grub_console_setcolorstate, grub_console_setcolor)
6315         (grub_console_getcolor): Move from here ...
6316         * include/grub/i386/vga_common.h: ... to here (new file).
6318         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
6319         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
6320         `<grub/i386/io.h>'.
6321         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
6322         `<grub/i386/vga_common.h>'.
6324 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6326         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
6327         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
6328         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
6329         variables.
6330         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6331         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
6333         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
6334         grub_console_init() with call to grub_vga_text_init().
6335         (grub_machine_fini): Replace call to
6336         grub_console_fini() with call to grub_vga_text_fini() and
6337         grub_at_keyboard_fini().
6339         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
6340         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6341         (grub_console_setcolorstate, grub_console_setcolor)
6342         (grub_console_getcolor): New function prototypes.
6344         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
6345         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
6346         (grub_vga_text_setcursor): Static-ize.
6347         (grub_vga_text_term): New structure.
6348         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
6350         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
6351         (grub_console_cur_color, grub_console_standard_color)
6352         (grub_console_normal_color, grub_console_highlight_color)
6353         (map_char, grub_console_putchar, grub_console_getcharwidth)
6354         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
6355         (grub_console_getcolor): Move from here ...
6356         * term/i386/vga_common.c: ... to here (same function names).
6358 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6360         Use newly-added Multiboot support in coreboot.
6362         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6363         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
6365         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
6366         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
6367         (codestart): Store the MBI in `startup_multiboot_info' when we're
6368         being loaded using Multiboot.
6370         * kern/i386/coreboot/init.c (grub_machine_init): Move
6371         grub_at_keyboard_init() call to beginning of function (useful for
6372         debugging).  Call grub_machine_mmap_init() before attempting to use
6373         grub_machine_mmap_iterate().
6374         (grub_lower_mem, grub_upper_mem): Move from here ...
6375         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
6376         here (new file).
6378         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
6379         function prototype.
6381 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6383         Fix a regression introduced by the at_keyboard.mod split.  Because
6384         some terminals are default on some platforms and non-default on
6385         others, the first terminal being registered determines which is
6386         going to be default.
6388         * kern/term.c (grub_term_register_input): If this is the first
6389         terminal being registered, set it as the current one.
6390         (grub_term_register_output): Likewise.
6392         * term/efi/console.c (grub_console_init): Do not call
6393         grub_term_set_current_output() or grub_term_set_current_input().
6394         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
6395         * term/i386/pc/console.c (grub_console_init): Likewise.
6396         (grub_console_fini): Do not call grub_term_set_current_input()
6397         (but leave grub_term_set_current_output() to restore text mode).
6399 2008-11-10  Robert Millan  <rmh@aybabtu.com>
6401         * util/grub.d/00_header.in: Add backward compatibility check for
6402         versions of terminal.mod that don't understand `terminal_input' or
6403         `terminal_output'.
6405 2008-11-09  Robert Millan  <rmh@aybabtu.com>
6407         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
6408         `terminal_input' / `terminal_output', not `terminal'.
6410 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6412         * Makefile.in (include_DATA): Fix srcdir=. assumption.
6413         (DISTCLEANFILES): Add `build_env.mk'.
6415 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6417         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
6418         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
6419         members.  Update all users.
6420         * util/console.c (grub_ncurses_term): Split in ...
6421         (grub_ncurses_term_input): ... this, and ...
6422         (grub_ncurses_term_output): ... this.  Update all users.
6423         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
6425 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6427         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
6428         (PKGDATA): Add $(pkgdata_SRCDIR).
6429         (pkglib_BUILDDIR): New variable.
6430         (pkgdata_SRCDIR): New variable.
6431         (build_env.mk): New target.
6432         (include_DATA): New variable.
6433         (install-local): Install $(include_DATA) files in $(includedir).
6435 2008-11-07  Pavel Roskin  <proski@gnu.org>
6437         * gendistlist.sh: Use C locale for sorting to ensure consistent
6438         output on all systems.
6440         * util/grub.d/00_header.in: Remove incorrect space before
6441         "serial".
6443 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6445         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
6446         per specification.
6447         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
6448         * loader/multiboot_loader.c (find_multi_boot2_header): New function
6449         (based on find_multi_boot1_header).
6450         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
6451         using find_multi_boot2_header(), and abort if neither Multiboot or
6452         Multiboot headers were found.
6454 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6456         Modularize at_keyboard.mod:
6458         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
6459         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
6460         (at_keyboard_mod_LDFLAGS): New variables.
6462         Actual terminal split:
6464         * include/grub/term.h (struct grub_term): Split in ...
6465         (struct grub_term_input): ... this, and ...
6466         (struct grub_term_output): ... this.  Update all users.
6467         (grub_term_set_current): Split in ...
6468         (grub_term_set_current_input): ... this, and ...
6469         (grub_term_set_current_output): ... this.
6470         (grub_term_get_current): Split in ...
6471         (grub_term_get_current_input): ... this, and ...
6472         (grub_term_get_current_output): ... this.
6473         (grub_term_register): Split in ...
6474         (grub_term_register_input): ... this, and ...
6475         (grub_term_register_output): ... this.
6476         (grub_term_unregister): Split in ...
6477         (grub_term_unregister_input): ... this, and ...
6478         (grub_term_unregister_output): ... this.
6479         (grub_term_iterate): Split in ...
6480         (grub_term_iterate_input): ... this, and ...
6481         (grub_term_iterate_output): ... this.
6483         * kern/term.c (grub_term_list): Split in ...
6484         (grub_term_list_input): ... this, and ...
6485         (grub_term_list_output): ... this.  Update all users.
6486         (grub_cur_term): Split in ...
6487         (grub_cur_term_input): ... this, and ...
6488         (grub_cur_term_output): ... this.  Update all users.
6489         (grub_term_set_current): Split in ...
6490         (grub_term_set_current_input): ... this, and ...
6491         (grub_term_set_current_output): ... this.
6492         (grub_term_get_current): Split in ...
6493         (grub_term_get_current_input): ... this, and ...
6494         (grub_term_get_current_output): ... this.
6495         (grub_term_register): Split in ...
6496         (grub_term_register_input): ... this, and ...
6497         (grub_term_register_output): ... this.
6498         (grub_term_unregister): Split in ...
6499         (grub_term_unregister_input): ... this, and ...
6500         (grub_term_unregister_output): ... this.
6501         (grub_term_iterate): Split in ...
6502         (grub_term_iterate_input): ... this, and ...
6503         (grub_term_iterate_output): ... this.
6505         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
6506         a check for input and one for output (and only attempt to get keys
6507         from user when input works).
6509         * util/grub-probe.c (grub_term_get_current): Split in ...
6510         (grub_term_get_current_input): ... this, and ...
6511         (grub_term_get_current_output): ... this.
6512         * util/grub-fstest.c: Likewise.
6513         * util/i386/pc/grub-setup.c: Likewise.
6514         * util/grub-editenv.c: Likewise.
6516         Portability adjustments:
6518         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
6519         `term/i386/pc/at_keyboard.c'.
6520         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
6521         grub_keyboard_controller_init() (now handled by terminal .init).
6522         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
6523         grub_at_keyboard_init().
6524         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
6525         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
6526         at_keyboard.mod via input terminal interface).
6527         * include/grub/i386/coreboot/console.h: Convert into a stub for
6528         `<grub/i386/pc/console.h>'.
6530         Migrate full terminals to new API:
6532         * term/efi/console.c (grub_console_term): Split into ...
6533         (grub_console_term_input): ... this, and ...
6534         (grub_console_term_output): ... this.  Update all users.
6535         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
6536         (grub_ofconsole_init): Split into ...
6537         (grub_ofconsole_init_input): ... this, and ...
6538         (grub_ofconsole_init_output): ... this.
6539         (grub_ofconsole_term): Split into ...
6540         (grub_ofconsole_term_input): ... this, and ...
6541         (grub_ofconsole_term_output): ... this.  Update all users.
6542         * term/i386/pc/serial.c (grub_serial_term): Split into ...
6543         (grub_serial_term_input): ... this, and ...
6544         (grub_serial_term_output): ... this.  Update all users.
6545         * term/i386/pc/console.c (grub_console_term): Split into ...
6546         (grub_console_term_input): ... this, and ...
6547         (grub_console_term_output): ... this.  Update all users.
6548         (grub_console_term_input): Only enable it on PC/BIOS platform.
6549         (grub_console_init): Remove grub_keyboard_controller_init() call.
6551         Migrate input terminals to new API:
6553         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
6554         `i386' and `i386/pc' to enable build on x86_64 (this driver is
6555         i386-specific anyway).
6556         (grub_console_checkkey): Rename to ...
6557         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
6558         users.
6559         (grub_keyboard_controller_orig): New variable.
6560         (grub_console_getkey): Rename to ...
6561         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
6562         users.
6563         (grub_keyboard_controller_init): Static-ize.  Save original
6564         controller value so that it can be restored ...
6565         (grub_keyboard_controller_fini): ... here (new function).
6566         (grub_at_keyboard_term): New structure.
6567         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
6568         functions.
6570         Migrate output terminals to new API:
6572         * term/i386/pc/vga.c (grub_vga_term): Change type to
6573         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6574         members.  Update all users.
6575         * term/gfxterm.c (grub_video_term): Change type to
6576         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6577         members.  Update all users.
6578         * include/grub/i386/pc/console.h (grub_console_checkkey)
6579         (grub_console_getkey): Do not export (no longer needed by gfxterm,
6580         etc).
6582         Migrate `terminal' command and userland tools to new API:
6584         * commands/terminal.c (grub_cmd_terminal): Split into ...
6585         (grub_cmd_terminal_input): ... this, and ...
6586         (grub_cmd_terminal_output): ... this.
6587         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
6588         `terminal_input' and `terminal_output'.
6589         * util/grub.d/00_header.in: Adjust `terminal' calls to new
6590         `terminal_input' / `terminal_output' API.
6591         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
6592         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
6593         provided ${GRUB_TERMINAL}, convert it).
6595 2008-11-04  Robert Millan  <rmh@aybabtu.com>
6597         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
6598         for FreeBSD.
6599         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
6601 2008-11-03  Bean  <bean123ch@gmail.com>
6603         * kern/elf.c (grub_elf32_load): Revert to previous code.
6604         (grub_elf64_load): Likewise.
6606         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
6608 2008-11-01  Robert Millan  <rmh@aybabtu.com>
6610         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
6611         (TARGET_CPPFLAGS): Likewise.
6612         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
6614 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
6616         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
6618 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6620         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
6621         addition of objects until the code is not going to be able to fail.
6623 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6625         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
6626         (add a missing NULL check, and correct them by moving the pointer
6627         operations after the actual check).
6629 2008-10-29  Robert Millan  <rmh@aybabtu.com>
6631         * util/i386/pc/grub-install.in: Handle empty string as output from
6632         make_system_path_relative_to_its_root().
6634 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
6636         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
6637         circular metadata worst case scenario. If the metadata is circular
6638         then copy the wrap in place.
6639         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
6640         project lib/format_text/layout.h
6641         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
6643 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6645         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
6647 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6649         * util/update-grub_lib.in: Mention filename in warning message.
6651 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6653         * NEWS: Update for rename of update-grub to grub-mkconfig.
6655 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6657         * util/update-grub_lib.in: Copy to ...
6658         * util/grub-mkconfig_lib.in: ... this.  Update all users.
6659         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
6660         * util/update-grub.in: Rename to ...
6661         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
6662         option. Add `--output' option to allow users to specify the generated
6663         configuration file.  Default to stdout.
6664         (update_grub_dir): Rename to ...
6665         (grub_mkconfig_dir): ... this.
6666         (grub_cfg): Default to an empty string.
6667         * conf/common.rmk (update-grub): Rename to ...
6668         (grub-mkconfig): ... this.
6669         (update-grub_lib): Copy to ...
6670         (grub-mkconfig_lib): ... this.
6671         (update-grub_SCRIPTS): Copy to ...
6672         (grub-mkconfig_SCRIPTS): ... this. Update all users.
6673         (update-grub_DATA): Rename to ...
6674         (grub-mkconfig_DATA): ... this.
6676 2008-09-28  Robert Millan  <rmh@aybabtu.com>
6678         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
6679         to `modified'.  Add the real `created' field.
6680         (grub_iso9660_uuid): Use `modified' rather than `created' for
6681         constructing the UUID.
6683 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
6685         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
6686         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
6688 2008-09-28  Bean  <bean123ch@gmail.com>
6690         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
6691         Thanks to Christian Franke for finding this bug.
6693 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6695         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
6696         instances of grub_util_get_disk_name() (see previous commit).
6698 2008-09-25  Robert Millan  <rmh@aybabtu.com>
6700         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
6701         `util/i386/get_disk_name.c'.
6702         * conf/i386-efi.rmk: Likewise.
6703         * conf/x86_64-efi.rmk: Likewise.
6704         * conf/i386-coreboot.rmk: Likewise.
6705         * conf/i386-ieee1275.rmk: Likewise.
6706         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
6707         `util/ieee1275/get_disk_name.c'.
6708         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
6709         * util/ieee1275/get_disk_name.c: Remove file.
6710         * util/i386/get_disk_name.c: Remove file.
6711         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
6712         "hd%d" for device.map entries, rather than using
6713         grub_util_get_disk_name().
6715 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6717         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
6718         warning.
6719         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
6721 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
6723         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
6724         Changed to 0x5100.
6725         (GRUB_TERM_PPAGE): Changed to 0x4900.
6727 2008-09-24  Robert Millan  <rmh@aybabtu.com>
6729         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
6730         macros (they were i386-pc specific).
6731         * include/grub/sparc64/ieee1275/console.h: Likewise.
6732         * include/grub/efi/console.h: Likewise.
6734 2008-09-22  Bean  <bean123ch@gmail.com>
6736         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
6737         resident and in attribute list.
6739         * include/grub/ntfs.h (BMP_LEN): Removed.
6741 2008-09-22  Bean  <bean123ch@gmail.com>
6743         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
6744         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
6746         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
6747         error occurs, as grub_disk_open will call grub_disk_close, which will
6748         call p->close (scsi).
6750 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6752         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
6753         (AC_PREREQ): Bumped to 2.59.
6754         (AC_TRY_COMPILE): Replace obsolete macro with ...
6755         (AC_COMPILE_IFELSE): ... this.
6756         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
6757         (AC_LINK_IFELSE): ... this.
6759 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
6761         * autogen.sh: Add a call to `gendistlist.sh'.
6763 2008-09-19  Christian Franke  <franke@computer.org>
6765         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
6766         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
6767         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
6768         Export __enable_execute_stack() to modules.
6769         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
6770         New function.
6772 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6774         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
6775         Sort the list.
6777 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
6779         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
6780         #include <grub/util/hostdisk.h>.
6782 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6784         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
6785         segments when their filesz is zero (grub_file_read() interprets
6786         zero-size as "read until EOF", which results in memory corruption).
6787         Use `lowest_segment' rather than 0 for calculating the current
6788         segment load address.
6790 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6792         * util/hostdisk.c (open_device): Replace a grub_util_info() call
6793         with grub_dprintf("hostdisk", ...), as it was so verbose that it
6794         clobbered useful information.
6796 2008-09-08  Robert Millan  <rmh@aybabtu.com>
6798         * include/grub/util/biosdisk.h: Move to ...
6799         * include/grub/util/hostdisk.h: ... here.  Update all users.
6800         * util/biosdisk.c: Move to ...
6801         * util/hostdisk.c: ... here.  Update all users.
6803 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6805         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
6806         variables.
6807         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
6808         and length can be stored directly in the `mbi->mmap_addr' and
6809         `mbi->mmap_length' struct fields.
6811 2008-09-07  Robert Millan  <rmh@aybabtu.com>
6813         * conf/i386.rmk: New file.  Provides declaration for building
6814         `cpuid.mod'.
6815         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
6816         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
6817         variables.
6818         Include `conf/i386.mk'.
6819         * conf/i386-efi.rmk: Likewise.
6820         * conf/x86_64-efi.rmk: Likewise.
6821         * conf/i386-coreboot.rmk: Likewise.
6822         * conf/i386-ieee1275.rmk: Likewise.
6824 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
6826         Based on patch created by Colin D Bennett <colin@gibibit.com>.
6827         Adds optimization support for BGR based modes.
6829         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
6830         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6831         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6832         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6833         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6834         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6835         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6836         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6837         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6838         (grub_video_i386_vbeblit_index_index): Likewise.
6839         (grub_video_i386_vbeblit_replace_directN): Added.
6840         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6841         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6842         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6843         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6844         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6845         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6846         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6847         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6848         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6849         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6850         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6851         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6852         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6854         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
6855         (grub_video_i386_vbefill_R8G8B8): Likewise.
6856         (grub_video_i386_vbefill_index): Likewise.
6857         (grub_video_i386_vbefill_direct32): Added.
6858         (grub_video_i386_vbefill_direct24): Likewise.
6859         (grub_video_i386_vbefill_direct16): Likewise.
6860         (grub_video_i386_vbefill_direct8): Likewise.
6862         * include/grub/video.h (grub_video_blit_format): Removed
6863         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
6864         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
6865         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
6866         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
6867         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
6869         * video/video.c (grub_video_get_blit_format): Updated to use new
6870         blit formats.  Added handling for 16 bit color modes.
6872         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
6873         fillers.
6874         (common_blitter): Updated to use new blitters.
6876         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
6877         Removed.
6878         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6879         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6880         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6881         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6882         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6883         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6884         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6885         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6886         (grub_video_i386_vbeblit_index_index): Likewise.
6887         (grub_video_i386_vbeblit_replace_directN): Added.
6888         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6889         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6890         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6891         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6892         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6893         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6894         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6895         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6896         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6897         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6898         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6899         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6900         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6902         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
6903         (grub_video_i386_vbefill_R8G8B8): Likewise.
6904         (grub_video_i386_vbefill_index): Likewise.
6905         (grub_video_i386_vbefill_direct32): Added.
6906         (grub_video_i386_vbefill_direct24): Likewise.
6907         (grub_video_i386_vbefill_direct16): Likewise.
6908         (grub_video_i386_vbefill_direct8): Likewise.
6910         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
6911         types.
6913         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
6914         types.
6916         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
6917         blitter types.
6919         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
6920         types.
6922 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6924         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
6925         RAID level 1.
6927 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
6929         * fs/iso9660.c (grub_iso9660_date): New structure.
6930         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
6931         (grub_iso9660_uuid): New function.
6933 2008-09-05  Bean  <bean123ch@gmail.com>
6935         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
6937         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
6938         insensitive bit for names in Win32 and Win32 & DOS namespace.
6940         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
6942         * include/grub/types.h (LONG_MAX): Likewise.
6944 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6946         * util/getroot.c: Include <config.h>.
6947         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
6948         add support for /dev/md/N devices and handle LVM double dash escaping.
6950 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
6952         * config.guess: Update to latest version from config git.
6953         * config.sub: Likewise.
6955 2008-09-03  Robert Millan  <rmh@aybabtu.com>
6957         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
6958         `disk->total_sectors'.
6960 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6962         * include/grub/normal.h: Fixed incorrect comment for
6963         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
6965 2008-09-01  Colin D Bennett  <colin@gibibit.com>
6967         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
6968         values with defines.
6970         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
6971         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
6972         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
6973         (GRUB_VBE_MODEATTR_COLOR): Likewise.
6974         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
6975         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
6976         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
6977         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
6978         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
6979         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
6980         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
6981         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
6982         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
6983         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
6984         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
6985         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
6986         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
6987         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
6988         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
6990 2008-08-31  Robert Millan  <rmh@aybabtu.com>
6992         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
6993         declaration.
6994         (grub_multiboot): Fix a few warnings.
6996 2008-08-31  Robert Millan  <rmh@aybabtu.com>
6998         * loader/i386/pc/multiboot.c: Update comment not to say that
6999         boot_device support is unimplemented.
7001 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7003         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
7004         or memory map support are unimplemented.
7006 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7008         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
7010 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7012         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
7013         total video memory in 'vbeinfo' output; show color format details for
7014         each video mode.
7016 2008-08-30  Pavel Roskin  <proski@gnu.org>
7018         * util/genmoddep.c: Remove for real this time.
7019         * DISTLIST: Remove util/genmoddep.c.
7021 2008-08-30  Robert Millan  <rmh@aybabtu.com>
7023         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
7024         as required by Multiboot spec (it was already 4-byte aligned, but
7025         only by chance).
7027 2008-08-29  Pavel Roskin  <proski@gnu.org>
7029         * kern/powerpc/ieee1275/crt0.S: Rename to ...
7030         * kern/powerpc/ieee1275/startup.S: ... this.
7031         * conf/powerpc-ieee1275.rmk: Adjust for the above.
7032         * DISTLIST: Likewise.
7034         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
7035         grub/cpu/kernel.h.  Add start label for consistency with other
7036         platforms.  Add grub_prefix immediately after start.  Add jump
7037         to the code after grub_prefix.
7038         * include/grub/powerpc/kernel.h: Provide valid values for
7039         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
7041 2008-08-29  Bean  <bean123ch@gmail.com>
7043         * configure.ac: Change host_os to cygwin for mingw.
7044         (asprintf): New check for function.
7046         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
7047         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
7049         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
7050         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
7051         sync, sleep and grub_util_get_disk_size for mingw.
7053         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
7054         to get size in mingw.
7055         (open_device): Use flag O_BINARY if it's defined.
7056         (find_root_device): Add dummy code for mingw.
7058         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
7059         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
7060         (get_scsi_disk_name): Return 0 for mingw.
7062         * util/hostfs.c: #include <grub/util/misc.h>.
7063         (grub_hostfs_open): Use "rb" flag to open file, use
7064         grub_util_get_disk_size to get disk size for mingw.
7066         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
7067         (asprintf): New function if HAVE_ASPRINTF is not set.
7068         (sync): New function for mingw.
7069         (sleep): Likewise.
7070         (grub_util_get_disk_size): Likewise.
7072 2008-08-28  Pavel Roskin  <proski@gnu.org>
7074         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7075         kern/time.c.
7077 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7079         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
7081 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7083         Change find_grub_drive() syntax so it doesn't prevent it from
7084         detecting NULL names as errors.
7086         * util/biosdisk.c (find_grub_drive): Move free slot search code
7087         from here ...
7088         (find_free_slot): ... to here.
7089         (read_device_map): Use find_free_slot() to search for free slots.
7091 2008-08-27  Marco Gerards  <marco@gnu.org>
7093         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
7094         (scsi_mod_SOURCES): New variable.
7095         (scsi_mod_CFLAGS): Likewise
7096         (scsi_mod_LDFLAGS): Likewise.
7098         * disk/scsi.c: New file.
7100         * include/grub/scsi.h: Likewise.
7102         * include/grub/scsicmd.h: Likewise.
7104         * disk/ata.c: Include <grub/scsi.h>.
7105         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
7106         instead.
7107         (grub_ata_iterate): Skip ATAPI devices.
7108         (grub_ata_open): Only handle ATAPI devices.
7109         (struct grub_atapi_read): Removed.
7110         (grub_atapi_readsector): Likewise.
7111         (grub_ata_read): No longer handle ATAPI devices.
7112         (grub_ata_write): Likewise.
7113         (grub_atapi_iterate): New function.
7114         (grub_atapi_read): Likewise.
7115         (grub_atapi_write): Likewise.
7116         (grub_atapi_open): Likewise.
7117         (grub_atapi_close): Likewise.
7118         (grub_atapi_dev): New variable.
7119         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
7120         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
7122         * include/grub/disk.h (enum grub_disk_dev_id): Add
7123         `GRUB_DISK_DEVICE_SCSI_ID'.
7125 2008-08-26  Robert Millan  <rmh@aybabtu.com>
7127         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
7128         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
7129         descriptive.
7131 2008-08-23  Bean  <bean123ch@gmail.com>
7133         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
7134         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
7135         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
7136         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
7137         dm_nv.mod.
7138         (raid5rec_mod_SOURCES): New macro.
7139         (raid5rec_mod_CFLAGS): Likewise.
7140         (raid5rec_mod_LDFLAGS): Likewise.
7141         (raid6rec_mod_SOURCES): Likewise.
7142         (raid6rec_mod_CFLAGS): Likewise.
7143         (raid6rec_mod_LDFLAGS): Likewise.
7144         (mdraid_mod_SOURCES): Likewise.
7145         (mdraid_mod_CFLAGS): Likewise.
7146         (mdraid_mod_LDFLAGS): Likewise.
7147         (dm_nv_mod_SOURCES): Likewise.
7148         (dm_nv_mod_CFLAGS): Likewise.
7149         (dm_nv_mod_LDFLAGS): Likewise.
7151         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
7152         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
7153         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7155         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
7156         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7158         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7160         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7162         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7164         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7166         * disk/raid5_recover.c: New file.
7168         * disk/raid6_recover.c: Likewise.
7170         * disk/mdraid_linux.c: Likewise.
7172         * disk/dmraid_nvidia.c: Likewise.
7174         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
7175         ULONG_MAX.
7177         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
7178         calculate the size of raid device.
7179         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
7180         different layout of raid5.
7181         (grub_raid_scan_device): Remove code specific to mdraid.
7182         (grub_raid_list): New variable.
7183         (free_array): New function.
7184         (grub_raid_register): Likewise.
7185         (grub_raid_unregister): Likewise.
7186         (grub_raid_rescan): Likewise.
7187         (GRUB_MOD_INIT): Don't iterate device here.
7188         (GRUB_MOD_FINI): Use free_array to release resource.
7190         * include/grub/raid.h: Remove macro and structure specific to mdraid.
7191         (grub_raid5_recover_func_t): New function variable type.
7192         (grub_raid6_recover_func_t): Likewise.
7193         (grub_raid5_recover_func): New variable.
7194         (grub_raid6_recover_func): Likewise.
7195         (grub_raid_register): New function.
7196         (grub_raid_unregister): Likewise.
7197         (grub_raid_rescan): Likewise.
7198         (grub_raid_block_xor): Likewise.
7200         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
7201         (CMD_CRC): New macro.
7202         (part): Removed.
7203         (read_file): Handle device as well as file.
7204         (cmd_crc): New function.
7205         (fstest): Handle multiple disks.
7206         (options): Remove part, raw and long, add root and diskcount.
7207         (usage): Add crc, remove -p, -r, -l, add -r and -c.
7208         (main): Find the first non option entry and ignore subsequent options,
7209         add handling for the new options, support multiple disks.
7211         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
7213 2008-08-23  Bean  <bean123ch@gmail.com>
7215         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
7217         * genfslist.sh: Ignore kernel.mod.
7219         * genpartmaplist.sh: Likewise.
7221 2008-08-23  Robert Millan  <rmh@aybabtu.com>
7223         * util/getroot.c (find_root_device): Skip anything that starts with
7224         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
7226 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
7228         * util/update-grub.in (GRUB_GFXMODE): Export variable.
7229         * util/grub.d/00_header.in: Allow the administrator to change default
7230         gfxmode via ${GRUB_GFXMODE}.
7232 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
7234         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
7236 2008-08-21  Robert Millan  <rmh@aybabtu.com>
7238         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
7239         loader.
7240         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
7241         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
7243 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
7245         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
7246         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
7248 2008-08-19  Robert Millan  <rmh@aybabtu.com>
7250         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
7251         (struct grub_virtual_screen): Remove `cursor_color'.
7252         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
7253         initialization.
7254         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
7256 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7258         Unify (identical) linux_normal.c files.
7259         * loader/i386/efi/linux_normal.c: Move from here ...
7260         * loader/linux_normal.c: ... to here.  Update all users.
7261         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
7262         * loader/i386/ieee1275/linux_normal.c: Likewise.
7264 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7266         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
7267         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
7268         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
7269         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
7270         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
7271         New macros.
7272         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
7273         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
7274         (GRUB_LINUX_CL_END_OFFSET): ... to here.
7275         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
7276         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
7277         (GRUB_EFI_CL_END_OFFSET): Rename to ...
7278         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
7279         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
7280         Initialize `params->video_cursor_x' and `params->video_cursor_y'
7281         portably using grub_getxy().
7282         Replace `-EFI' with `-bzImage' in boot message.
7284 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7286         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
7288 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7290         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
7292         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
7293         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
7294         (grub_machine_mmap_iterate): New function declaration.
7295         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
7296         structure.
7297         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
7298         macros.
7300         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
7301         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
7302         Move e820 parsing from here ...
7303         * kern/i386/pc/mmap.c: New file.
7304         (grub_machine_mmap_iterate): ... to here.
7306         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
7307         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
7308         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
7309         (grub_available_iterate): Redeclare to return `void', and redeclare
7310         its hook to use grub_uint64_t as addr and size parameters, and rename
7311         to ...
7312         (grub_machine_mmap_iterate): ... this.  Update all users.
7314         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
7315         to make it more readable.  Rename to ...
7316         (grub_machine_mmap_iterate): ... this.
7318         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
7319         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
7320         (grub_multiboot): Allocate an extra region after the payload, and fill
7321         it with a Multiboot memory map.  Adjust a.out loader to calculate size
7322         with the extra space.
7323         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
7324         with the extra space.
7326 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
7328         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
7330 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
7332         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
7333         mdate-sh to the list `find' searches for.
7334         * DISTLIST: Regenerated.
7336 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
7338         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
7339         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
7340         genmoddep.awk, gensymlist.sh.in.
7341         (DISTDIRS): Add bus, docs, hook, lib.
7342         * DISTLIST: Regenerated.
7343         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
7345 2008-08-16  Robert Millan  <rmh@aybabtu.com>
7347         * disk/raid.c (grub_raid_init): Handle/report errors set by
7348         grub_device_iterate().
7349         * disk/lvm.c (grub_lvm_init): Likewise.
7351 2008-08-15  Bean  <bean123ch@gmail.com>
7353         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7354         and datehook.mod.
7355         (datetime_mod_SOURCES): New macro.
7356         (datetime_mod_CFLAGS): Likewise.
7357         (datetime_mod_LDFLAGS): Likewise.
7358         (date_mod_SOURCES): Likewise.
7359         (date_mod_CFLAGS): Likewise.
7360         (date_mod_LDFLAGS): Likewise.
7361         (datehook_mod_SOURCES): Likewise.
7362         (datehook_mod_CFLAGS): Likewise.
7363         (datehook_mod_LDFLAGS): Likewise.
7365         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7366         and datehook.mod.
7367         (datetime_mod_SOURCES): New macro.
7368         (datetime_mod_CFLAGS): Likewise.
7369         (datetime_mod_LDFLAGS): Likewise.
7370         (date_mod_SOURCES): Likewise.
7371         (date_mod_CFLAGS): Likewise.
7372         (date_mod_LDFLAGS): Likewise.
7373         (datehook_mod_SOURCES): Likewise.
7374         (datehook_mod_CFLAGS): Likewise.
7375         (datehook_mod_LDFLAGS): Likewise.
7377         * conf/i386-ieee1275.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-efi.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/x86_64-efi.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         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
7415         * commands/date.c: New file.
7417         * hook/datehook.c: Likewise.
7419         * include/grub/lib/datetime.h: Likewise.
7421         * include/grub/i386/cmos.h: Likewise.
7423         * lib/datetime.c: Likewise.
7425         * lib/i386/datetime.c: Likewise.
7427         * lib/efi/datetime.c: Likewise.
7429 2008-08-14  Robert Millan  <rmh@aybabtu.com>
7431         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
7432         (grub_mkelfimage_SOURCES): New variable.
7433         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
7435         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
7436         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
7437         * conf/powerpc-ieee1275.rmk: Likewise.
7438         * conf/i386-ieee1275.rmk: Likewise.
7440         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
7441         * kern/i386/coreboot/init.c: Likewise.
7443         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
7444         with `<grub/cpu/kernel.h>'.
7445         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
7446         to ...
7447         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
7448         * kern/i386/coreboot/startup.S: Likewise.
7450         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
7451         (GRUB_MOD_GAP): Remove.
7452         * include/grub/powerpc/kernel.h: New file.
7453         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
7454         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7455         * include/grub/i386/kernel.h: New file.
7456         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
7457         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
7458         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7460         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
7461         `grub-mkelfimage'.
7462         Use --directory when invoking grub_mkimage.
7464         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
7465         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
7466         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
7467         and GRUB_KERNEL_CPU_PREFIX.
7469 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
7471         * include/grub/err.h (grub_err_printf): New function prototype.
7472         * util/misc.c (grub_err_printf): New function.
7473         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
7474         grub_printf.
7475         * kern/err.c (grub_print_error): Use grub_err_printf.
7477 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7479         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
7481 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7483         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
7484         boot entry.
7486 2008-08-12  Robert Millan  <rmh@aybabtu.com>
7488         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
7489         of the relocation code from here ...
7490         (grub_multiboot): ... to here.
7491         (forward_relocator, backward_relocator): Move from here ...
7492         * kern/i386/loader.S (grub_multiboot_forward_relocator)
7493         (grub_multiboot_backward_relocator): ... to here.
7494         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
7495         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
7496         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
7497         (grub_multiboot_forward_relocator_end)
7498         (grub_multiboot_backward_relocator)
7499         (grub_multiboot_backward_relocator_end): New variables.
7501 2008-08-12  Bean  <bean123ch@gmail.com>
7503         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
7505 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7507         * kern/i386/linuxbios/startup.S: Move from here ...
7508         * kern/i386/coreboot/startup.S: ... to here.
7510         * kern/i386/linuxbios/init.c: Move from here ...
7511         * kern/i386/coreboot/init.c: ... to here.
7513         * kern/i386/linuxbios/table.c: Move from here ...
7514         * kern/i386/coreboot/mmap.c: ... to here.
7516         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
7518 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7520         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
7521         errors.  Leave it to the upper layer to handle them.
7523 2008-08-09  Christian Franke  <franke@computer.org>
7525         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
7526         * conf/common.rmk: Install `grub-pe2elf' only if requested.
7527         Install `grub.d/10_windows' only on Cygwin.
7528         * configure.ac: Add subst of `target_os'.
7529         Check `target_os' also before setting TARGET_OBJ2ELF.
7530         Add `--enable-grub-pe2elf'.
7532 2008-08-08  Robert Millan  <rmh@aybabtu.com>
7534         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7535         (grub_last_time): Change type to grub_uint64_t.
7536         (grub_disk_open): Migrate code from to using grub_get_time_ms().
7537         (grub_disk_close): Likewise.
7539         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7540         (run_menu): Migrate code from to using grub_get_time_ms().
7542         * util/misc.c (grub_get_time_ms): New function.
7544 2008-08-08  Marco Gerards  <marco@gnu.org>
7546         * disk/ata.c (grub_ata_regget): Change return type to
7547         `grub_uint8_t'.
7548         (grub_ata_regget2): Likewise.
7549         (grub_ata_wait_status): New function.
7550         (grub_ata_wait_busy): Removed function, updated all users to use
7551         `grub_ata_wait_status'.
7552         (grub_ata_wait_drq): Likewise.
7553         (grub_ata_cmd): New function.
7554         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
7555         error handling.
7556         (grub_ata_pio_write): Add error handling.
7557         (grub_atapi_identify): Likewise.
7558         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
7559         handling.
7560         (grub_ata_identify): Use `grub_ata_cmd' and improve error
7561         handling.  Actually use the detected registers.  Reorder the
7562         detection logic such that it is easier to read.
7563         (grub_ata_pciinit): Do not assign the same ID to each controller.
7564         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
7565         handling.
7566         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
7568         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
7570 2008-08-08  Marco Gerards  <marco@gnu.org>
7572         * NEWS: Update.
7574 2008-08-07  Bean  <bean123ch@gmail.com>
7576         * include/grub/x86_64/pci.h: New file.
7578 2008-08-07  Christian Franke  <franke@computer.org>
7580         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
7581         (TIMER2_GATE): Likewise.
7582         (grub_pit_wait): Add enable/disable of the timer2 gate
7583         bit of port 0x61.  This fixes a possible infinite loop.
7585 2008-08-07  Bean  <bean123ch@gmail.com>
7587         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
7588         kern/i386/tsc.c and kern/i386/pit.c.
7590         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
7591         x86_64 platform.
7593         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
7594         <grub/i386/tsc.h>.
7596         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
7598 2008-08-07  Bean  <bean123ch@gmail.com>
7600         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
7602         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
7604         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
7605         multiple inclusion. Add #include <grub/types.h>.
7607 2008-08-06  Christian Franke  <franke@computer.org>
7609         * conf/common.rmk: Build and install `10_windows'.
7610         * util/grub.d/10_windows.in: New script.
7612 2008-08-06  Pavel Roskin  <proski@gnu.org>
7614         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
7616 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7618         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
7619         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
7621 2008-08-06  Bean  <bean123ch@gmail.com>
7623         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
7624         (grub_pxefs_fs_int): Remove dummy definition.
7625         (grub_pxefs_open): Use data->block_size to store the current block
7626         size setting.
7627         (grub_pxefs_read): Use block size stored in data->block_size. As the
7628         value of grub_pxe_blksize can be changed after the file is opened.
7630 2008-08-06  Bean  <bean123ch@gmail.com>
7632         * fs/i386/pc/pxe.c (curr_file): new variable.
7633         (grub_pxefs_open): Simply the handling of pxe file system. Don't
7634         require the dummy internal file system anymore.
7635         (grub_pxefs_read): Removed.
7636         (grub_pxefs_close): Likewise.
7637         (grub_pxefs_fs_int): Likewise.
7638         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
7639         connection when we switch file.
7640         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
7642 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7644         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
7645         `halt.mod'.
7646         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
7647         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
7649         * kern/i386/halt.c: New file.
7650         * kern/i386/reboot.c: Likewise.
7651         * include/grub/i386/reboot.h: Likewise.
7652         * include/grub/i386/halt.h: Likewise.
7654         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
7655         Include `<grub/cpu/halt.h>'.
7656         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
7657         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
7659         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
7660         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
7661         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
7662         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
7663         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
7664         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
7665         from here ...
7666         * include/grub/i386/at_keyboard.h: ... to here.
7668 2008-08-05  Robert Millan  <rmh@aybabtu.com>
7670         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
7671         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
7672         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
7673         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7674         `kern/generic/millisleep.c'.
7676         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
7677         instead of grub_get_rtc().
7678         (grub_tsc_init): Initialize `tsc_boot_time'.
7680         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
7681         (grub_machine_init): Use grub_tsc_init() rather than
7682         installing an RTC-based handler via grub_install_get_time_ms().
7684         * kern/i386/pit.c: New file.
7685         * include/grub/i386/pit.h: Likewise.
7687 2008-08-05  Bean  <bean123ch@gmail.com>
7689         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
7691         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
7692         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
7693         (pxe_mod_SOURCES): New macro.
7694         (pxe_mod_CFLAGS): Likewise.
7695         (pxe_mod_LDFLAGS): Likewise.
7696         (pxecmd_mod_SOURCES): Likewise.
7697         (pxecmd_mod_CFLAGS): Likewise.
7698         (pxecmd_mod_LDFLAGS): Likewise.
7700         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
7701         (grub_pxe_call): Likewise.
7703         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
7705         * commands/i386/pc/pxecmd.c: New file.
7707         * fs/i386/pc/pxe.c: Likewise.
7709         * include/grub/i386/pc/pxe.h: Likewise.
7711 2008-08-05  Bean  <bean123ch@gmail.com>
7713         * util/console.c (grub_console_cur_color): New variable.
7714         (grub_console_standard_color): Likewise.
7715         (grub_console_normal_color): Likewise.
7716         (grub_console_highlight_color): Likewise.
7717         (color_map): Likewise.
7718         (use_color): Likewise.
7719         (NUM_COLORS): New macro.
7720         (grub_ncurses_setcolorstate): Handle color properly.
7721         (grub_ncurses_setcolor): Don't change color here, just remember the
7722         settings, color will be set in grub_ncurses_setcolorstate.
7723         (grub_ncurses_getcolor): New function.
7724         (grub_ncurses_init): Initialize color pairs.
7725         (grub_ncurses_term): New member grub_ncurses_getcolor.
7727 2008-08-05  Colin D Bennett  <colin@gibibit.com>
7729         High resolution timer support.  Implemented for x86 CPUs using TSC.
7730         Extracted generic grub_millisleep() so it's linked in only as needed.
7731         This requires a Pentium compatible CPU; if the RDTSC instruction is
7732         not supported, then it falls back on the generic grub_get_time_ms()
7733         implementation that uses the machine's RTC.
7735         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
7736         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7737         `kern/generic/millisleep.c'.
7739         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
7740         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
7742         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
7743         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
7745         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7747         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7748         `kern/generic/millisleep.c'.
7750         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7752         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
7754         * kern/generic/rtc_get_time_ms.c: New file.
7756         * kern/generic/millisleep.c: New file.
7758         * kern/misc.c: Don't include
7759         <kern/time.h> anymore.
7760         (grub_millisleep_generic): Removed.
7762         * commands/sleep.c (grub_interruptible_millisleep): Uses
7763         grub_get_time_ms() instead of grub_get_rtc().
7765         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
7766         function.
7767         (grub_cpu_is_cpuid_supported): New inline function.
7768         (grub_cpu_is_tsc_supported): New inline function.
7769         (grub_tsc_init): New function prototype.
7770         (grub_tsc_get_time_ms): New function prototype.
7772         * kern/i386/tsc.c (grub_get_time_ms): New file.
7774         * include/grub/time.h: Include <grub/types.h.
7775         (grub_millisleep_generic): Removed.
7776         (grub_get_time_ms): New prototype.
7777         (grub_install_get_time_ms): New prototype.
7778         (grub_rtc_get_time_ms): New prototype.
7780         * kern/time.c (grub_get_time_ms): New function.
7781         (grub_install_get_time_ms): New function.
7783         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
7784         <grub/time.h> anymore.
7785         (grub_millisleep): Removed.
7786         (grub_machine_init): Call grub_tsc_init.
7788         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
7789         get_time_ms() implementation.
7791         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
7792         (ieee1275_get_time_ms): New function.
7793         (grub_machine_init): Install get_time_ms() implementation.
7795         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
7796         (grub_machine_init): Call grub_tsc_init().
7797         (grub_millisleep): Removed.
7799         * kern/ieee1275/init.c (grub_millisleep): Removed.
7800         (grub_machine_init): Install ieee1275_get_time_ms()
7801         implementation.
7802         (ieee1275_get_time_ms): New function.
7803         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
7804         real work.
7806 2008-08-05  Marco Gerards  <marco@gnu.org>
7808         * disk/ata.c: Include <grub/pci.h>.
7809         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
7810         (grub_ata_initialize): Rewritten.
7811         (grub_ata_device_initialize): New function.
7813 2008-08-04  Pavel Roskin  <proski@gnu.org>
7815         * kern/main.c: Include grub/mm.h.
7817 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7819         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
7820         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
7821         corruption problem).
7823 2008-08-04  Robert Millan  <rmh@aybabtu.com>
7825         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
7826         warnings introduced in my last commit.
7828 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7830         Make PCI available on all i386 architectures.
7832         * include/grub/i386/pc/pci.h: Move from here ...
7833         * include/grub/i386/pci.h: ... to here.
7835         * include/grub/i386/pc/pci.h: Remove.
7836         * include/grub/i386/efi/pci.h: Remove.
7837         * include/grub/x86_64/efi/pci.h: Remove.
7839         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
7840         `<grub/cpu/pci.h>'.
7842         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
7843         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
7844         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
7846         * conf/i386-ieee1275.rmk: Likewise.
7848 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7850         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
7851         (grub_console_setcursor): Make it possible to set cursor off.
7853 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7855         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
7856         of modules instead of assuming which platform provides what.
7857         * util/update-grub.in: Likewise.
7859 2008-08-03  Robert Millan  <rmh@aybabtu.com>
7861         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
7862         instead of `grub_install_dos_part' to determine whether a drive needs
7863         to be prepended to prefix (`grub_install_dos_part' is not reliable,
7864         because it can be overridden when loading GRUB via Multiboot).
7866 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7868         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
7870 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7872         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
7873         of informational grub_dprintf() calls.
7875 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7877         * disk/memdisk.c (memdisk_size): Don't initialize.
7878         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
7880         * include/grub/i386/pc/kernel.h
7881         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
7882         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
7883         (grub_memdisk_image_size, grub_arch_memdisk_addr)
7884         (grub_arch_memdisk_size): Remove.
7886         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
7887         field (was only used to transfer a constant).  Add `type' field to
7888         support multiple module types.
7889         (grub_module_iterate): New function.
7891         * kern/device.c (grub_device_open): Do not hide error messages
7892         when grub_disk_open() fails.  Use grub_print_error() instead.
7894         * kern/i386/pc/init.c (grub_arch_modules_addr)
7895         (grub_arch_memdisk_size): Remove functions.
7896         (grub_arch_modules_addr): Return the module address in high memory
7897         (now that it isn't copied anymore).
7899         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
7900         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
7901         decompression routine (grub_total_module_size already includes that
7902         now).  Don't copy modules back to low memory.
7904         * kern/main.c: Include `<grub/mm.h>'.
7905         (grub_load_modules): Split out (and use) ...
7906         (grub_module_iterate): ... this function, which iterates through
7907         module objects and runs a hook.
7908         Comment out grub_mm_init_region() call, as it would cause non-ELF
7909         modules to be overwritten.
7911         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
7912         the memdisk image in its own region, make it part of the module list.
7913         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
7914         (main): Parse --memdisk|-m option, and pass user-provided path as
7915         parameter to generate_image().
7916         (add_segments): Pass `memdisk_path' down to load_modules().
7917         (load_modules): Embed memdisk image in module section when requested.
7918         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
7919         `header.type' instead of `header.offset'.
7921         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
7922         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
7923         (memdisk_mod_LDFLAGS): New variables.
7924         * conf/i386-coreboot.rmk: Likewise.
7925         * conf/i386-ieee1275.rmk: Likewise.
7927 2008-08-02  Robert Millan  <rmh@aybabtu.com>
7929         * loader/i386/pc/multiboot.c (playground, forward_relocator)
7930         (backward_relocator): New variables.  Used to allocate and relocate
7931         the payload, respectively.
7932         (grub_multiboot_load_elf32): Load into heap instead of requested
7933         address, install the appropriate relocator code in each bound of
7934         the payload, and set the entry point such that
7935         grub_multiboot_real_boot() will jump to one of them.
7937         * kern/i386/loader.S (grub_multiboot_payload_size)
7938         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7939         (grub_multiboot_payload_entry_offset): New variables.
7940         (grub_multiboot_real_boot): Set cpu context to what the relocator
7941         expects, and jump to the relocator instead of the payload.
7943         * include/grub/i386/loader.h (grub_multiboot_payload_size)
7944         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7945         (grub_multiboot_payload_entry_offset): Export.
7947 2008-08-01  Bean  <bean123ch@gmail.com>
7949         * normal/menu_entry.c (editor_getline): Don't return the original
7950         string as result, as it will be released by lexer once it has done
7951         using it.
7953 2008-08-01  Robert Millan  <rmh@aybabtu.com>
7955         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
7956         within menuentries, not before them.
7957         util/grub.d/10_hurd.in: Likewise.
7959 2008-08-01  Bean  <bean123ch@gmail.com>
7961         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
7962         (bufio_mod_SOURCES): New macro.
7963         (bufio_mod_CFLAGS): Likewise.
7964         (bufio_mod_LDFLAGS): Likewise.
7966         * include/grub/bufio.h: New file.
7968         * io/bufio.c: Likewise.
7970         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
7971         (grub_video_reader_png): Use grub_buffile_open to open file.
7973         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
7974         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
7976         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
7977         (grub_video_reader_tga): Use grub_buffile_open to open file.
7979         * font/manager.c: Include <grub/bufio.h>.
7980         (add_font): Use grub_buffile_open to open file.
7982 2008-07-31  Robert Millan  <rmh@aybabtu.com>
7984         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
7985         ELF segments, use a macro for arbitrarily accessing any of them instead
7986         of preparing a pointer that allows access to one at a time.
7987         (grub_multiboot_load_elf64): Likewise.
7989 2008-07-31  Bean  <bean123ch@gmail.com>
7991         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
7992         GRUB_KERNEL_MACHINE_DATA_END.
7994 2008-07-30  Robert Millan  <rmh@aybabtu.com>
7996         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
7997         Increase from 0x50 to 0x60.
7998         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
7999         use UUIDs to identify the root drive for them.  If that's not
8000         possible, abort.
8001         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
8002         check, for cross-disk installs.
8004 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8006         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
8007         is non-empty, use it to set the `prefix' environment variable instead
8008         of the usual approach.
8009         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
8010         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
8011         environment variable instead of dummy make_install_device().
8013         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
8014         (start): Insert a data section, with `grub_prefix' variable.
8015         * kern/i386/linuxbios/startup.S: Likewise.
8017         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
8018         New variable reference.
8019         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
8020         New macro.  Defines offset of `grub_prefix' within startup.S (relative
8021         to `start').
8022         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
8023         section within startup.S (relative to `start').
8024         * include/grub/i386/coreboot/kernel.h: Likewise.
8026         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
8027         Overwrite grub_prefix with its contents, at the beginning of the
8028         first segment.
8029         (main): Understand -p|--prefix.
8031 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8033         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
8035 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8037         * term/i386/pc/vga_text.c (grub_console_cls): Use
8038         grub_console_gotoxy() to go back to beginning of the screen.
8039         Found by Patrick Georgi <patrick.georgi@coresystems.de>
8041 2008-07-29  Christian Franke  <franke@computer.org>
8043         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8044         Add conversion of emulated mount points on Cygwin.
8046 2008-07-29  Christian Franke  <franke@computer.org>
8048         * util/update-grub.in: Add a check for admin
8049         group on Cygwin.
8050         Remove old `grub.cfg.new' before creation.
8051         Add `-f' to `mv' to handle the different filesystem
8052         semantics of Windows.
8054 2008-07-29  Bean  <bean123ch@gmail.com>
8056         * normal/main.c (get_line): Fix buffer overflow bug.
8058 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8060         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
8061         (struct grub_apple_header): New struct.  Describes the layout of
8062         the partmap header.
8063         (apple_partition_map_iterate): Check the header magic as well as the
8064         partition magic (which was already being checked).
8066 2008-07-28  Pavel Roskin  <proski@gnu.org>
8068         * genmk.rb: Add a warning to the beginning of the output that
8069         it's a generated file and should not be edited.
8071 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8073         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
8074         with the same number are found, just use issue a warning with
8075         grub_dprintf(), as this error has been reported to be non-fatal.
8077 2008-07-27  Robert Millan  <rmh@aybabtu.com>
8079         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
8080         information.
8082 2008-07-27  Bean  <bean123ch@gmail.com>
8084         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
8085         (grub_fat_find_dir): Ignore case when comparing filename.
8087 2008-07-27  Bean  <bean123ch@gmail.com>
8089         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
8090         smallino, as it's more descriptive, and i8count can be confused with
8091         the other field count.
8092         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
8093         inode type.
8095 2008-07-27  Bean  <bean123ch@gmail.com>
8097         * commands/crc.c: New file.
8099         * lib/crc.c: Likewise.
8101         * include/grub/lib/crc.h: Likewise.
8103         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
8105         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
8106         (hexdump): Move this function to ...
8108         * lib/hexdump.c: ... here.
8110         * include/grub/hexdump.h: Renamed to ...
8112         * include/grub/lib/hexdump.h: ... this.
8114         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
8116         * util/grub-editenv.c: Likewise.
8118         * include/envblk.h: Renamed to ...
8120         * include/lib/envblk.h: ... this.
8122         * util/envblk.c: Renamed to ...
8124         * lib/envblk.c: ... this.
8126         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
8127         lib/hexdump.c.
8128         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
8129         (pkglib_MODULES): Add crc.mod.
8130         (hexdump_mod_SOURCES): Add lib/hexdump.c.
8131         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
8132         (crc_mod_SOURCES): New macro.
8133         (crc_mod_CFLAGS): Likewise.
8134         (crc_mod_LDFLAGS): Likewise.
8136         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
8138         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8140         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8142         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8144         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8146 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
8148         * commands/help.c: Include <grub/term.h>.
8149         (TERM_WIDTH): Removed.  Updated all users.
8151 2008-07-27  Pavel Roskin  <proski@gnu.org>
8153         * util/getroot.c (find_root_device): Rephrase a comment to avoid
8154         spurious warnings about a comment within a comment.
8156 2008-07-25  Robert Millan  <rmh@aybabtu.com>
8158         * util/getroot.c (find_root_device): Skip devices that match
8159         /dev/dm-[0-9].  This lets the real device be found for any type of
8160         abstraction (LVM, EVMS, RAID..).
8161         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
8162         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
8163         device is found first, find_root_device() will now skip it.
8165 2008-07-24  Pavel Roskin  <proski@gnu.org>
8167         * include/grub/types.h: Use __builtin_bswap32() and
8168         __builtin_bswap64() with gcc 4.3 and newer.
8170 2008-07-24  Christian Franke  <franke@computer.org>
8172         * util/i386/pc/grub-install.in: If `--debug' is specified,
8173         pass `--verbose' to grub-setup.
8174         Abort script if make_system_path_relative_to_its_root() fails.
8176 2008-07-24  Bean  <bean123ch@gmail.com>
8178         * configure.ac: Fixed a bug caused by the previous cygwin patch,
8179         variable `target_platform' should be `platform'.
8181 2008-07-24  Bean  <bean123ch@gmail.com>
8183         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
8184         (grub_png_init_fixed_block): New function.
8185         (grub_png_decode_image_data): Handle fixed huffman code compression.
8187 2008-07-24  Bean  <bean123ch@gmail.com>
8189         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
8190         (grub_pe2elf_SOURCES): New macro.
8191         (CLEANFILES): Add grub-pe2elf.
8193         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
8194         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
8195         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
8196         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
8197         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
8198         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
8199         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
8200         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
8201         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
8202         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
8203         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
8204         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
8205         (GRUB_PE32_DT_FUNCTION): Likewise.
8206         (GRUB_PE32_REL_I386_DIR32): Likewise.
8207         (GRUB_PE32_REL_I386_REL32): Likewise.
8208         (grub_pe32_symbol): New structure.
8209         (grub_pe32_reloc): Likewise.
8211         * util/grub-pe2elf.c: New file.
8213         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
8214         start symbol in non pc platform.
8216         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
8218         The following patches are from Christian Franke.
8220         * include/grub/dl.h: Remove .previous, gas supports this only
8221         for ELF format.
8223         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
8224         Remove .type, gas supports this only for ELF format.
8226         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
8227         nullbytes in symbol table. This fixes an infinite loop if table is
8228         zero filled.
8230         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
8231         TARGET_IMG_LDFLAGS and EXEEXT.
8233         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
8234         TARGET_IMG_LDFLAGS_AC.
8235         (grub_CHECK_STACK_ARG_PROBE): New function.
8237         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
8239         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
8241         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
8242         to set TARGET_IMG_LD* accordingly.
8243         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
8244         Add call to grub_CHECK_STACK_ARG_PROBE.
8245         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
8247         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
8249         * genmk.rb: Add EXEEXT to CLEANFILES.
8251 2008-07-23  Robert Millan  <rmh@aybabtu.com>
8253         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
8254         define the codes for arrows and lines used for the menu).
8255         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
8256         as well.
8258         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
8259         fonts, because the latter are too slow.
8261 2008-07-21  Bean  <bean123ch@gmail.com>
8263         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
8264         a20. Run keyboard test last, as it will cause macbook to halt.
8266 2008-07-18  Pavel Roskin  <proski@gnu.org>
8268         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
8269         load foreign architecture modules correctly anyway.  Keep
8270         support for loading host architecture modules, whether we
8271         compile them or not.
8273 2008-07-17  Pavel Roskin  <proski@gnu.org>
8275         * configure.ac: Use -m32 or -m64 regardless of whether we had to
8276         change target_cpu.  The compiler default can mismatch target_cpu
8277         in any case.
8279         * disk/efi/efidisk.c: Fix format warnings on x86_64.
8280         * kern/efi/efi.c: Likewise.
8282         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
8283         target compiler is functional.
8284         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
8285         are set up.
8287         * configure.ac: Default to efi platform for x86_64-apple.  Allow
8288         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
8289         adjustments from the rest, only do them if target is not
8290         explicitly given.  Merge other adjustments with the final sanity
8291         check.  Remove an extraneous check for supported CPU.  Be
8292         specific which CPU and which platform is not supported.
8294         * configure.ac: Default to pc platform for x86_64.
8296 2008-07-17  Robert Millan  <rmh@aybabtu.com>
8298         Partial LinuxBIOS -> Coreboot rename.
8300         * conf/i386-linuxbios.rmk: Renamed to ...
8301         * conf/i386-coreboot.rmk: ... this.
8302         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
8303         * configure.ac: Accept "coreboot" as input platform (but maintain
8304         compatibility with "linuxbios").
8305         * include/grub/i386/linuxbios: Renamed to ...
8306         * include/grub/i386/coreboot: ... this.
8308 2008-07-17  Bean  <bean123ch@gmail.com>
8310         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
8311         (appleldr_mod_SOURCE): New variable.
8312         (appleldr_mod_CFLAGS): Likewise.
8313         (appleldr_mod_LDFLAGS): Likewise.
8314         (pci_mod_SOURCES): Likewise.
8315         (pci_mod_CFLAGS): Likewise.
8316         (pci_mod_LDFLAGS): Likewise.
8317         (lspci_mod_SOURCES): Likewise.
8318         (lspci_mod_CFLAGS): Likewise.
8319         (lspci_mod_LDFLAGS): Likewise.
8321         * conf/x86_64-efi.rmk: New file.
8323         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
8324         macro.
8325         (grub_efidisk_write): Likewise.
8327         * include/efi/api.h (efi_call_0): New macro.
8328         (efi_call_1): Likewise.
8329         (efi_call_2): Likewise.
8330         (efi_call_3): Likewise.
8331         (efi_call_4): Likewise.
8332         (efi_call_5): Likewise.
8333         (efi_call_6): Likewise.
8335         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
8336         grub_rescue_cmd_chainloader.
8338         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
8339         (grub_pe32_optional_header): Change some fields based on i386 or
8340         x86_64 platform.
8341         (GRUB_PE32_PE32_MAGIC): Likewise.
8343         * include/grub/efi/uga_draw.h: New file.
8345         * include/grub/elf.h (STN_ABS): New constant.
8346         (R_X86_64_NONE): Relocation constant for x86_64.
8347         (R_X86_64_64): Likewise.
8348         (R_X86_64_PC32): Likewise.
8349         (R_X86_64_GOT32): Likewise.
8350         (R_X86_64_PLT32): Likewise.
8351         (R_X86_64_COPY): Likewise.
8352         (R_X86_64_GLOB_DAT): Likewise.
8353         (R_X86_64_JUMP_SLOT): Likewise.
8354         (R_X86_64_RELATIVE): Likewise.
8355         (R_X86_64_GOTPCREL): Likewise.
8356         (R_X86_64_32): Likewise.
8357         (R_X86_64_32S): Likewise.
8358         (R_X86_64_16): Likewise.
8359         (R_X86_64_PC16): Likewise.
8360         (R_X86_64_8): Likewise.
8361         (R_X86_64_PC8): Likewise.
8363         * include/grub/i386/efi/pci.h: New file.
8365         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
8366         Change it value based on platform.
8367         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
8368         (GRUB_E820_RAM): Likewise.
8369         (GRUB_E820_RESERVED): Likewise.
8370         (GRUB_E820_ACPI): Likewise.
8371         (GRUB_E820_NVS): Likewise.
8372         (GRUB_E820_EXEC_CODE): Likewise.
8373         (GRUB_E820_MAX_ENTRY): Likewise.
8374         (grub_e820_mmap): New structure.
8375         (linux_kernel_header): Change the efi field according to different
8376         kernel version, also field from linux_kernel_header.
8378         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
8380         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
8381         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
8382         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
8383         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
8384         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
8385         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
8386         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
8387         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
8388         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
8389         (GRUB_PCI_ADDR_IO_MASK): Likewise.
8391         * include/grub/x86_64/efi/kernel.h: New file.
8393         * include/grub/x86_64/efi/loader.h: Likewise.
8395         * include/grub/x86_64/efi/machine.h: Likewise.
8397         * include/grub/x86_64/efi/pci.h: Likewise.
8399         * include/grub/x86_64/efi/time.h: Likewise.
8401         * include/grub/x86_64/linux.h: Likewise.
8403         * include/grub/x86_64/setjmp.h: Likewise.
8405         * include/grub/x86_64/time.h: Likewise.
8407         * include/grub/x86_64/types.h: Likewise.
8409         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
8410          GRUB_TARGET_SIZEOF_VOID_P.
8412         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
8413         (grub_efi_locate_handle): Likewise.
8414         (grub_efi_open_protocol): Likewise.
8415         (grub_efi_set_text_mode): Likewise.
8416         (grub_efi_stall): Likewise.
8417         (grub_exit): Likewise.
8418         (grub_reboot): Likewise.
8419         (grub_halt): Likewise.
8420         (grub_efi_exit_boot_services): Likewise.
8421         (grub_get_rtc): Likewise.
8423         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
8424         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
8425         (grub_efi_allocate_pages): Wrap efi calls.
8426         (grub_efi_free_pages): Wrap efi calls.
8427         (grub_efi_get_memory_map): Wrap efi calls.
8429         * kern/x86_64/dl.c: New file.
8431         * kern/x86_64/efi/callwrap.S: Likewise.
8433         * kern/x86_64/efi/startup.S: Likewise.
8435         * loader/efi/appleloader.c: Likewise.
8437         * loader/efi/chainloader.c (cmdline): New variable.
8438         (grub_chainloader_unload): Wrap efi calls.
8439         (grub_chainloader_boot): Likewise.
8440         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
8441         command line.
8443         * loader/efi/chainloader_normal.c (chainloader_command):
8444         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
8445         command line.
8447         * loader/i386/efi/linux.c (allocate_pages): Change allocation
8448         method.
8449         (grub_e820_add_region): New function.
8450         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
8451         booting.
8452         (grub_find_video_card): New function.
8453         (grub_linux_setup_video): New function.
8454         (grub_rescue_cmd_linux): Probe for video information.
8456         * normal/x86_64/setjmp.S: New file.
8458         * term/efi/console.c (map_char): New function.
8459         (grub_console_putchar): Map unicode char.
8460         (grub_console_checkkey): Wrap efi calls.
8461         (grub_console_getkey): Likewise.
8462         (grub_console_getwh): Likewise.
8463         (grub_console_gotoxy): Likewise.
8464         (grub_console_cls): Likewise.
8465         (grub_console_setcolorstate): Likewise.
8466         (grub_console_setcursor): Likewise.
8468         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
8470 2008-07-16  Pavel Roskin  <proski@gnu.org>
8472         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
8473         format strings.
8475         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
8476         pointer, not an integer.  This fixes a warning and prevents
8477         precision loss on 64-bit systems.
8478         (relocate_addresses): Remove unneeded cast.
8480 2008-07-15  Pavel Roskin  <proski@gnu.org>
8482         * kern/i386/ieee1275/init.c: Include grub/cache.h.
8484         * term/ieee1275/ofconsole.c: Disable code unused on i386.
8486         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
8487         Fix comparison between signed and unsigned.
8489         * include/grub/i386/ieee1275/console.h: Declare
8490         grub_console_init() and grub_console_fini().
8492         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
8493         It's empty and unused.
8495         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
8496         beginning to avoid warnings with some compilers.
8498         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
8499         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
8501 2008-07-14  Pavel Roskin  <proski@gnu.org>
8503         * kern/env.c (grub_register_variable_hook): Don't copy empty
8504         string, it leaks memory.  Pass "" to grub_env_set(), it should
8505         handle constant strings.
8507         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
8508         * commands/cmp.c (grub_cmd_cmp): Likewise.
8509         * kern/dl.c (grub_dl_flush_cache): Likewise.
8510         (grub_dl_load_core): Likewise.
8511         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
8512         (grub_elf64_load_phdrs): Likewise.
8514 2008-07-13  Pavel Roskin  <proski@gnu.org>
8516         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
8517         between signed and unsigned.
8518         (LzmaEnc_Finish): Fix warning about an unused parameter.
8520 2008-07-13  Bean  <bean123ch@gmail.com>
8522         * Makefile.in (enable_lzo): New rule.
8524         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
8526         * configure.ac (ENABLE_LZO): New option --enable-lzo.
8528         * boot/i386/pc/lnxboot.S: #include <config.h>.
8530         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
8531         its value according to the compression algorithm used, lzo or lzma.
8533         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
8534         compression algorithm according to configure macro.
8536         * kern/i386/pc/startup.S (codestart): Likewise.
8538         * kern/i386/pc/lzma_decode.S: New file.
8540         * include/grub/lib/LzFind.h: Likewise.
8542         * include/grub/lib/LzHash.h: Likewise.
8544         * include/grub/lib/LzmaDec.h: Likewise.
8546         * include/grub/lib/LzmaEnc.h: Likewise.
8548         * include/grub/lib/LzmaTypes.h: Likewise.
8550         * lib/LzFind.c: Likewise.
8552         * lib/LzmaDec.c: Likewise.
8554         * lib/LzmaEnc.c: Likewise.
8556 2008-07-13  Bean  <bean123ch@gmail.com>
8558         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
8559         (grub_ext4_extent_header): New structure.
8560         (grub_ext4_extent): Likewise.
8561         (grub_ext4_extent_idx): Likewise.
8562         (grub_ext4_find_leaf): New function.
8563         (grub_ext2_read_block): Handle extents.
8565 2008-07-12  Robert Millan  <rmh@aybabtu.com>
8567         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
8569 2008-07-11  Robert Millan  <rmh@aybabtu.com>
8571         * util/grub.d/40_custom.in: New file. Example on how to add custom
8572         entries to /etc/grub.d.
8573         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
8574         40_custom (implicitly, by merging all the grub.d rules).
8576 2008-07-11  Pavel Roskin  <proski@gnu.org>
8578         * commands/read.c (grub_getline): Fix invalid memory access.
8579         Don't add newline to the variable value.
8581         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
8582         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
8583         (serial_hw_get_port): Check validity of the port number.
8584         (grub_cmd_serial): Check return value of serial_hw_get_port().
8586 2008-07-07  Pavel Roskin  <proski@gnu.org>
8588         * boot/i386/pc/diskboot.S (notification_string): Replace
8589         "Loading kernel" with just "loading".  This is shorter, less
8590         confusing and saves a few bytes for possible future changes.
8592 2008-07-05  Pavel Roskin  <proski@gnu.org>
8594         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
8595         size for ATAPI devices, they are undefined.  Output sector
8596         number in decimal form.
8598         * disk/ata.c: Use named constants for status bits.
8600 2008-07-04  Pavel Roskin  <proski@gnu.org>
8602         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
8603         grub_addr_t before casting it to the void pointer to fix a
8604         warning.  Non-addressable regions are discarded earlier.
8605         (grub_arch_modules_addr): Cast _end to grub_addr_t.
8606         * kern/i386/linuxbios/table.c: Include grub/misc.h.
8607         (check_signature): Don't shadow table_header.
8608         (grub_linuxbios_table_iterate): Cast numeric constants to
8609         grub_linuxbios_table_header_t.
8610         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
8611         grub_stop().
8613         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
8614         prevent warnings.
8616         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
8617         pointer, which can cause warnings.  Support 64-bit addresses.
8619         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
8620         of sizeof(long).  This fixes PowerPC image generation on x86_64.
8622 2008-07-04  Robert Millan  <rmh@aybabtu.com>
8624         This fixes a performance issue when pc & gpt partmap iterators
8625         didn't abort iteration even after our hook found what it was
8626         looking for (often causing expensive probes of non-existent drives).
8628         Some callers relied on previous buggy behaviour, since they would
8629         raise an error when their own hooks caused early abortion of its
8630         iteration.
8632         * kern/device.c (grub_device_open): Improve error message.
8633         * disk/lvm.c (grub_lvm_open): Likewise.
8634         * disk/raid.c (grub_raid_open): Likewise.
8636         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
8637         when hook requests it, independently of grub_errno.
8638         (pc_partition_map_probe): Do not fail when find_func() caused
8639         early abortion of pc_partition_map_iterate().
8641         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
8642         when hook requests it, independently of grub_errno.
8643         (gpt_partition_map_probe): Do not fail when find_func() caused
8644         early abortion of gpt_partition_map_iterate().
8646         * kern/partition.c (grub_partition_iterate): Abort parent iteration
8647         when hook requests it, independently of grub_errno.  Do not fail when
8648         part_map_iterate_hook() caused early abortion of p->iterate().
8650         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
8651         when grub_partition_iterate() returned with non-zero.
8653 2008-07-03  Pavel Roskin  <proski@gnu.org>
8655         * disk/ata.c (grub_ata_pio_write): Check status before writing,
8656         like we do in grub_ata_pio_read().
8657         (grub_ata_readwrite): Always write individual sectors.  Fix the
8658         sector count for the remainder.
8659         (grub_ata_write): Enable writing to ATA devices.  Correctly
8660         report error for ATAPI devices.
8662 2008-07-02  Pavel Roskin  <proski@gnu.org>
8664         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
8665         warning.
8667         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
8668         for every read sector, we already increment it for the whole
8669         batch.  This fixes reading more than 256 sectors at once.
8671         * util/grub-editenv.c (cmd_info): Cast argument to long
8672         explicitly.  ptrdiff_t reduces to int on i386.
8674         * util/grub-editenv.c (main): Be specific which parameter is
8675         missing.
8677         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
8678         (memdisk): Make memdisk_orig_addr a pointer.
8680         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
8681         for file offsets, use grub_off_t instead.  Fix printf format
8682         warnings.
8684         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
8685         there.  Real unexpected warnings should not drown in the noise
8686         about known problems.
8688         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
8689         grub_disk_addr_t for memory addresses.
8691         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
8692         explicitly to fix a warning.
8694         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
8696         * Makefile.in (MODULE_LDFLAGS): New variable.
8697         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
8698         the linker accepts --build-id=none.
8699         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
8700         MODULE_LDFLAGS.
8701         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
8703         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
8704         those in Linux XFS code.  Provide a way to access 64-bit parent
8705         inode.
8706         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
8707         the end of struct grub_xfs_dir_header.
8709 2008-07-02  Bean  <bean123ch@gmail.com>
8711         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
8712         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8713         and GRUB_IEEE1275_FLAG_NO_ANSI.
8715         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
8716         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8717         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
8719         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
8720         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
8722         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
8723         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
8725         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
8726         esc sequence on non ANSI terminal.
8727         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
8729         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
8730         beginning of file.
8732 2008-07-02  Bean  <bean123ch@gmail.com>
8734         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
8735         (grub_editenv_SOURCES): New variable.
8736         (pkglib_MODULES): Add loadenv.mod.
8737         (loadenv_mod_SOURCES): New variable.
8738         (loadenv_mod_CFLAGS): Likewise.
8739         (loadenv_mod_LDFLAGS): Likewise.
8741         * include/grub/envblk.h: New file.
8743         * util/envblk.c: New file.
8745         * util/grub-editenv.c: New file.
8747         * commands/loadenv.c: New file.
8749 2008-07-01  Pavel Roskin  <proski@gnu.org>
8751         * include/multiboot2.h (struct multiboot_tag_module): Use char,
8752         not unsigned char.  This fixes warnings and is consistent with
8753         other tags.
8755         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
8757         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
8759         * term/tparm.c (analyze): Always set *popcount.
8761         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
8762         cast to fix a warning.
8764         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
8765         cast to suppress a warning.
8767         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
8768         grub_fshelp_read_file() expects.
8770         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
8771         write uuid as a 32-bit value in CPU byte order, so declare and
8772         use it as such.
8774         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
8775         long if the format specifier expects it.
8776         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
8777         * partmap/pc.c (pc_partition_map_iterate): Likewise.
8778         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
8779         long to fix a warning.
8780         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
8781         grub_dprintf() arguments to fix warnings.
8783 2008-06-30  Pavel Roskin  <proski@gnu.org>
8785         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
8786         install_bsd_part immediately before core.img is embedded or
8787         modified on disk.  This fixes core.img verification if core.img
8788         cannot be embedded.
8790         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
8791         core_path to calculate the blocklist.
8792         Patch from Javier Martín <lordhabbit@gmail.com>
8794 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8796         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
8797         block to disk block.
8798         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
8799         Patch from Niels Böhm <bitbucket@arcor.de>
8801 2008-06-29  Robert Millan  <rmh@aybabtu.com>
8803         * util/update-grub_lib.in (font_path): Search for fonts in
8804         /boot/grub first, which is more likely to be readable (we aren't
8805         deciding where fonts live, just looking for them).
8807 2008-06-26  Pavel Roskin  <proski@gnu.org>
8809         * util/biosdisk.c (read_device_map): Don't leave dead map
8810         entries for devices failing stat() check.
8812         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
8813         core_path_dev for the core.img path on the target device.
8815 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8817         * disk/fs_uuid.c: New file.
8818         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
8819         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
8820         (fs_uuid_mod_LDFLAGS): New variables.
8821         * include/grub/disk.h (grub_disk_dev_id): Add
8822         `GRUB_DISK_DEVICE_UUID_ID'.
8823         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
8824         implement iterate().
8826 2008-06-26  Robert Millan  <rmh@aybabtu.com>
8828         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
8829         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
8830         Linux image includes no initrd.
8832 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
8834         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
8835         call to resolve the core image location that effectively appended the
8836         name twice.
8838 2008-06-21  Robert Millan  <rmh@aybabtu.com>
8840         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
8841         call from here ...
8843         * util/grub.d/10_hurd.in: ... to here ...
8844         * util/grub.d/10_linux.in: ... and here.
8846 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8848         * kern/main.c (grub_main): Export `prefix' variable immediately
8849         after it has been set by grub_machine_set_prefix().
8851 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8853         * commands/search.c (search_label, search_fs_uuid, search_file): Print
8854         search result when not saving to variable, not the other way around.
8855         When saving to variable, abort iteration as soon as a match is found.
8857 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8859         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
8860         check for partition that provides /boot/grub.  Its logic is flawed,
8861         as it prevents prepare_grub_to_access_device() from being called
8862         multiple times.
8864 2008-06-19  Robert Millan  <rmh@aybabtu.com>
8866         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
8867         "insmod" command directly when abstraction modules are needed,
8868         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
8869         since it had already been processed).
8871 2008-06-19  Pavel Roskin  <proski@gnu.org>
8873         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
8874         changed.  This is needed in case GRUB_LIBDIR changes.
8875         * conf/i386-ieee1275.rmk: Likewise.
8876         * conf/i386-linuxbios.rmk: Likewise.
8877         * conf/i386-pc.rmk: Likewise.
8878         * conf/powerpc-ieee1275.rmk: Likewise.
8880 2008-06-18  Pavel Roskin  <proski@gnu.org>
8882         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
8883         kernel_elf_symlist.c to symlist.c for consistency with other
8884         architectures.  Update all users.
8885         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8887 2008-06-18  Robert Millan  <rmh@aybabtu.com>
8889         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
8890         it in prefix.
8892         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
8893         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
8894         a RAID device, run setup() for all members independently on whether
8895         LVM abstraction is being used.
8896         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
8897         If grub-mkimage has set `*install_dos_part == -2', don't override this
8898         value.
8899         Perform *install_dos_part adjustments independently on whether
8900         we're embedding or not.
8901         Clarify error message when image is too big for embedding.
8902         Remove duplicate *install_dos_part stanza.
8904 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8906         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
8907         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
8908         variables.
8909         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
8910         values in grub_ofconsole_normal_color and
8911         grub_ofconsole_highlight_color (they're not directly related to
8912         background and foreground).
8913         (grub_ofconsole_setcolorstate): Extract background and foreground
8914         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
8916 2008-06-17  Robert Millan  <rmh@aybabtu.com>
8918         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
8919         /boot/grub for the check in last commit, not /boot (they could be
8920         different partitions).
8922 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8924         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
8925         asked to setup access for the same partition that provides /boot,
8926         don't bother using UUIDs since our root already has the value we
8927         want.
8929 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8931         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
8932         I2O devices.
8933         Patch from Sven Mueller <sven@debian.org>.
8935 2008-06-16  Robert Millan  <rmh@aybabtu.com>
8937         * util/update-grub.in: Check for $EUID instead of $UID.
8938         Reported by Vincent Zweije.
8940 2008-06-16  Bean  <bean123ch@gmail.com>
8942         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
8943         (grub_ext2_read_block): Likewise.
8944         (grub_ext2_read_inode): Likewise.
8945         (grub_ext2_mount): Likewise.
8946         (grub_ext2_close): Likewise.
8947         (grub_ext3_get_journal): Removed.
8949         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
8950         (grub_reiserfs_read_symlink): Likewise.
8951         (grub_reiserfs_mount): Likewise.
8952         (grub_reiserfs_open): Likewise.
8953         (grub_reiserfs_read): Likewise.
8954         (grub_reiserfs_close): Likewise.
8955         (grub_reiserfs_get_journal): Removed.
8957         * fs/fshelp.c (grub_fshelp_read): Removed.
8958         (grub_fshelp_map_block): Likewise.
8960         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
8961         (grub_fshelp_journal): Likewise.
8962         (grub_fshelp_read): Likewise.
8963         (grub_fshelp_map_block): Likewise.
8965 2008-06-16  Pavel Roskin  <proski@gnu.org>
8967         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
8968         floating point anymore.
8969         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
8971 2008-06-15  Pavel Roskin  <proski@gnu.org>
8973         * commands/ls.c (grub_ls_list_files): Use integer calculations
8974         for human readable format, avoid floating point use.
8975         * kern/misc.c (grub_ftoa): Remove.
8976         (grub_vsprintf): Remove floating point support.
8978 2008-06-15  Robert Millan  <rmh@aybabtu.com>
8980         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
8981         devices.
8982         Reported by Max Vozeler.
8984 2008-06-15  Robert Millan  <rmh@aybabtu.com>
8986         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
8987         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
8988         skipped later.
8989         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
8990         the beginning of the prefix.
8992         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
8993         It is assumed that if we have a memdisk, grub-mkimage has set
8994         grub_prefix to include the "(memdisk)" drive in it.
8996 2008-06-15  Robert Millan  <rmh@aybabtu.com>
8998         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
8999         Initialize keyboard controller after registering the terminal, so that
9000         grub_printf() can be called from grub_keyboard_controller_init().
9002 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9004         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
9005         extent-btree which is written as big endian on disk.
9006         Reported by Alain Greppin  <al@chilibi.org>.
9008 2008-06-14  Robert Millan  <rmh@aybabtu.com>
9010         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
9011         * util/i386/pc/grub-install.in (modules): Likewise.
9013 2008-06-13  Pavel Roskin  <proski@gnu.org>
9015         * commands/ls.c (grub_ls_list_files): Fix format warnings.
9017 2008-06-13  Bean  <bean123ch@gmail.com>
9019         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
9021         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
9023         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
9024         to indicate sparse block.
9026 2008-06-12  Pavel Roskin  <proski@gnu.org>
9028         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
9029         number, grub_fshelp_read() does it for us.
9031         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
9032         linear disk read with journal translation.
9033         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
9034         * include/grub/fshelp.h: Declare grub_fshelp_read().
9036 2008-06-09  Pavel Roskin  <proski@gnu.org>
9038         * fs/minix.c (grub_minix_mount): Handle error reading
9039         superblock.
9041 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9043         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
9044         don't append the RAID prefix afterwards.
9045         Reported by Clint Adams.
9047 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9049         Based on description from Pavel:
9050         * kern/disk.c (grub_disk_check_range): Rename to ...
9051         (grub_disk_adjust_range): ... this.  Add a comment explaining the
9052         tasks performed by this function.
9054 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9056         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
9057         `num_serial' (for consistency with other variables).
9058         (struct grub_ntfs_data): Add `uuid' member.
9059         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
9060         (grub_ntfs_uuid): New function.
9061         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
9063 2008-06-07  Pavel Roskin  <proski@gnu.org>
9065         * util/biosdisk.c (open_device): Revert last change to the
9066         function, it broke installation.  The sector needs to be
9067         different dependent on which device is opened.
9069 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9071         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
9072         rest of GRUB, and breakage doesn't happen if its value were modified.
9074         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9075         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
9076         a constant (same value).
9077         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
9078         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
9080 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9082         * util/biosdisk.c (open_device): Do not modify sector offset when
9083         accessing a partition.  kern/disk.c already handles this for us.
9085 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9087         * util/grub-emu.c (grub_machine_init): Move code in this function from
9088         here ...
9089         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
9090         segfault in case grub_printf() is called).
9092         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
9093         grub_probe.  Update all users not to explicitly add it again.
9094         (grub_device): New variable; contains corresponding device for grubdir.
9095         (fs_module, partmap_module, devabstraction_module): Pass
9096         `--device ${grub_device}' to grub_probe to avoid traversing /dev
9097         every time.
9099 2008-06-05  Robert Millan  <rmh@aybabtu.com>
9101         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
9102         is found, print it (same layout as with labels).
9104 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9106         * util/biosdisk.c (get_drive): Rename to ...
9107         (find_grub_drive): ... this.  Update all users.
9109         (get_os_disk): Rename to ...
9110         (convert_system_partition_to_system_disk): ... this.  Update all users.
9112         (find_drive): Rename to ...
9113         (find_system_device): ... this.  Update all users.
9115 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9117         * util/biosdisk.c (get_os_disk): Handle IDA devices.
9118         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9119         (make_device_map): Likewise.
9121 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9123         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
9124         before dereferencing it.
9126         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
9127         union with fat12/fat16-specific ones.  Add some new fields, including
9128         `num_serial' for both versions.
9129         (struct grub_fat_data): Add `uuid' member.
9130         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
9131         names.  Initialize `data->uuid' using `num_serial'.
9132         (grub_fat_uuid): New function.
9133         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
9135         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
9136         (grub_reiserfs_uuid): New function.
9137         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
9138         member.
9140         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
9141         (grub_xfs_uuid): New function.
9142         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
9144 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9146         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
9147         code that is backward compatible with pre-uuid search command.
9149 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9151         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
9152         floppies after everything else, to ensure floppy drive isn't accessed
9153         unnecessarily (patch from Bean).
9155 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9157         * commands/search.c (search_label, search_fs_uuid, search_file): Do
9158         not print device names when we were asked to set a variable.
9160 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9162         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
9163         using "cursor-on" and "cursor-off" commands (understood at least by
9164         the Open Firmware flavour on OLPC).
9166 2008-05-31  Michael Gorven  <michael@gorven.za.net>
9168         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
9169         on and off sequences.
9171 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9173         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
9174         * util/update-grub.in: Likewise.
9176 2008-05-30  Pavel Roskin  <proski@gnu.org>
9178         * util/biosdisk.c (linux_find_partition): Simplify logic and
9179         make the code more universal.  Keep special processing for
9180         devfs, but use a simple rule for all other devices.  If the
9181         device ends with a number, append 'p' and the partition number.
9182         Otherwise, append only the partition number.
9184 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9186         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
9187         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
9188         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
9189         the `root' parameter to Linux.
9191 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9193         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
9194         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
9195         --fs_uuid with --fs-uuid.
9196         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
9197         all filesystems support them).
9199 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9201         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
9202         grub_printf() flags, since we're printing in units of 2 bytes.
9204 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9206         * util/grub.d/00_header.in: Remove obsolete comment referencing
9207         convert_system_path_to_grub_path().
9208         * util/update-grub.in: Likewise.
9209         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
9210         (convert_system_path_to_grub_path): Add a warning message explaining
9211         that this function is deprecated.  Rely on is_path_readable_by_grub()
9212         for the readability checks.
9213         (font_path): Use is_path_readable_by_grub() for the readability
9214         check rather than convert_system_path_to_grub_path().
9216 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9218         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
9219         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
9220         converting it first.
9221         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
9222         grub.cfg for access to font file, and afterwards call it again to set
9223         the root device.
9225 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9227         * commands/search.c (options): Add --fs_uuid option.
9228         (search_fs_uuid): New function.
9229         (grub_cmd_search): Fix --set argument passing.
9230         Use search_fs_uuid() when requested via --fs_uuid.
9231         (grub_search_init): Update help message.
9232         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
9233         and redeclare it as an array of 16-bit words.
9234         (grub_ext2_uuid): New function.
9235         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
9236         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
9237         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
9238         (GRUB_DEVICE_BOOT_UUID): New variables.
9239         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
9240         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
9241         whenever possible.
9242         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
9243         just assume `root' variable has the right value.
9244         * util/grub.d/10_linux.in: Likewise.
9245         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
9246         via PRINT_FS_UUID.
9247         (main): Recognise `-t fs_uuid' argument.
9249 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9251         * util/biosdisk.c (map): Redefine structure to hold information
9252         about GRUB drive name.
9253         (get_drive): Reimplement without assuming (and verifying) BIOS-like
9254         drive names.
9255         (call_hook): Remove.
9256         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
9257         member.  Assume drive has partitions.
9258         (grub_util_biosdisk_open): Access device names via `.device' struct
9259         member.
9260         (open_device): Likewise.
9261         (find_drive): Likewise.
9262         (read_device_map): Adjust map[] usage to match the new struct
9263         definition.  Don't check for duplicates (still possible, but not cheap
9264         anymore).
9265         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
9266         (make_device_name): Remove assumption of BIOS-like drive names.
9268 2008-05-30  Pavel Roskin  <proski@gnu.org>
9270         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
9271         compiling execute.c doesn't need grub_script.tab.h anymore.
9272         (normal/command.c_DEPENDENCIES): Likewise.
9273         (normal/function.c_DEPENDENCIES): Likewise.
9274         * conf/i386-ieee1275.rmk: Likewise.
9275         * conf/i386-linuxbios.rmk: Likewise.
9276         * conf/i386-pc.rmk: Likewise.
9277         * conf/powerpc-ieee1275.rmk: Likewise.
9278         * conf/sparc64-ieee1275.rmk: Likewise.
9280 2008-05-29  Pavel Roskin  <proski@gnu.org>
9282         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
9283         when scanning metadata for volume group name.
9285         * include/grub/script.h: Don't include grub_script.tab.h.  It's
9286         a generated file, which may only be included from the files with
9287         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
9288         use union YYSTYPE, as the later allows forward declaration.
9289         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
9291 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9293         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
9294         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
9295         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
9296         (grub_console_checkkey): Add grub_dprintf() call to report unknown
9297         scan codes.
9299 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9301         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
9302         control key combinations.
9304 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9306         * util/powerpc/ieee1275/grub-install.in: Move from here ...
9307         * util/ieee1275/grub-install.in: ... to here.
9308         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
9309         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
9310         (grub_install_SOURCES): Likewise.
9312 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9314         * fs/affs.c: Update copyright year.
9315         * fs/ext2.c: Likewise.
9316         * fs/fshelp.c: Likewise.
9317         * fs/hfsplus.c: Likewise.
9318         * fs/ntfs.c: Likewise.
9319         * fs/xfs.c: Likewise.
9320         * include/grub/fshelp.h: Likewise.
9321         * util/grub-mkdevicemap.c: Likewise.
9323 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9325         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
9326         might need to be fatfs to support some firmware implementations
9327         (e.g. OFW or EFI).
9329 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9331         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
9332         devices.
9333         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9334         (make_device_map): Likewise.
9336 2008-05-20  Bean  <bean123ch@gmail.com>
9338         * fs/fshelp.c (grub_fshelp_map_block): New function.
9339         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
9340         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
9342         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
9343         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
9344         (grub_fshelp_journal): New structure.
9345         (grub_fshelp_map_block): New function prototype.
9346         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
9347         (grub_fshelp_map_block): Likewise.
9349         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
9350         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
9351         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
9352         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
9353         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
9354         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
9355         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
9356         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
9357         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
9358         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
9359         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
9360         (grub_ext2_sblock): New members for journal support.
9361         (grub_ext3_journal_header): New structure.
9362         (grub_ext3_journal_revoke_header): Likewise.
9363         (grub_ext3_journal_block_tag): Likewise.
9364         (grub_ext3_journal_sblock): Likewise.
9365         (grub_fshelp_node): New members logfile and journal.
9366         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
9367         grub_fshelp_map_block to get real block number.
9368         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
9369         number.
9370         (grub_ext2_read_inode): Likewise.
9371         (grub_ext3_get_journal): New function.
9372         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
9373         (grub_ext2_close): Release memory used by journal.
9375         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
9376         (REISERFS_MAGIC_DESC_BLOCK): New macro.
9377         (grub_reiserfs_transaction_header): Renamed to
9378         grub_reiserfs_description_block, replace field data with real_blocks.
9379         (grub_reiserfs_commit_block): New structure.
9380         (grub_reiserfs_data): New member journal.
9381         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
9382         number.
9383         (grub_reiserfs_read_symlink): Likewise.
9384         (grub_reiserfs_iterate_dir): Likewise.
9385         (grub_reiserfs_open): Likewise.
9386         (grub_reiserfs_read): Likewise.
9387         (grub_reiserfs_get_journal): New function.
9388         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
9389         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
9390         using grub_reiserfs_get_journal.
9391         (grub_reiserfs_close): Release memory used by journal.
9393         * fs/affs.c (grub_affs_read_block): Change block type to
9394         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
9396         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
9398         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
9400         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
9402         * fs/udf.c (grub_udf_read_block): Change block type to
9403         grub_disk_addr_t. Use type cast to avoid warning.
9405         * fs/xfs.c (grub_xfs_read_block): Likewise.
9407 2008-05-16  Christian Franke  <franke@computer.org>
9409         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
9410         to ensure that break with ESC will always work.
9411         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
9412         Remove ESC from keyboard queue.
9414 2008-05-16  Christian Franke  <franke@computer.org>
9416         * util/biosdisk.c: [__CYGWIN__] Add includes.
9417         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
9418         (get_os_disk): Move variable declarations to OS specific
9419         parts to avoid warning.
9420         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
9421         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
9422         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
9423         Cygwin.
9424         * util/getroot.c: [__CYGWIN__] Add includes.
9425         (strip_extra_slashes): Fix "/" case.
9426         [__CYGWIN__] (get_win32_path): New function.
9427         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
9428         [__CYGWIN__] (find_root_device): Disable.
9429         [__CYGWIN__] (get_bootsec_serial): New function.
9430         [__CYGWIN__] (find_cygwin_root_device): Likewise.
9431         [__linux__] (grub_guess_root_device): Add early returns to simplify
9432         structure.
9433         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
9434         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
9435         check for Linux only.
9437 2008-05-15  Bean  <bean123ch@gmail.com>
9439         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
9440         keyboard hang problem in apple's intel mac.
9442 2008-05-09  Robert Millan  <rmh@aybabtu.com>
9444         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
9445         devices.
9446         * util/grub-mkdevicemap.c (get_virtio_disk_name)
9447         (make_device_map): Likewise.
9448         Reported by Aurelien Jarno <aurel32@debian.org>
9450 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
9452         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
9453         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
9454         (make_device_map): Output entries for xvd type disks.
9456 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9458         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
9459         devices.
9460         * util/grub-mkdevicemap.c (get_cciss_disk_name)
9461         (make_device_map): Likewise.
9462         Reported by Roland Dreier <rdreier@cisco.com>
9464 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9466         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
9467         grub_strstr() call.  Correct a few mistakes in failure path handling.
9469 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9471         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9472         Do not print a trailing slash (therefore, the root directory is an
9473         empty string).
9474         (convert_system_path_to_grub_path): Do not remove trailing slash
9475         from make_system_path_relative_to_its_root() output.
9477         * util/i386/pc/grub-install.in: Add trailing slash to output from
9478         make_system_path_relative_to_its_root().
9480 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9482         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
9483         ensures that output lines aren't intermangled with those sent to
9484         stderr (via grub_util_info()).
9485         * util/grub-probe.c (grub_refresh): Likewise.
9486         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
9488 2008-05-05  Christian Franke  <franke@computer.org>
9490         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
9491         Add Cygwin device names.
9492         (get_ide_disk_name) [__CYGWIN__]: Likewise.
9493         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
9494         (check_device): Return error instead of success on empty name.
9495         (make_device_map): Move label inside linux specific code to
9496         prevent compiler warning.
9498 2008-04-30  Robert Millan  <rmh@aybabtu.com>
9500         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
9501         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
9502         first boot option.
9503         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
9505 2008-04-29  Robert Millan  <rmh@aybabtu.com>
9507         * docs/grub.cfg: New file (example GRUB configuration).
9509 2008-04-26  Robert Millan  <rmh@aybabtu.com>
9511         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
9512         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
9513         and `disk/ieee1275/nand.c'.
9515 2008-04-25  Bean  <bean123ch@gmail.com>
9517         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
9518         i386-linuxbios.
9520         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
9521         change the buffer size to 4096 for cdrom device.
9523         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
9524         and nand.mod.
9525         (_linux_mod_SOURCES): New variable.
9526         (_linux_mod_CFLAGS): Likewise.
9527         (_linux_mod_LDFLAGS): Likewise.
9528         (linux_mod_SOURCES): Likewise.
9529         (linux_mod_CFLAGS): Likewise.
9530         (linux_mod_LDFLAGS): Likewise.
9531         (nand_mod_SOURCES): Likewise.
9532         (nand_mod_CFLAGS): Likewise.
9533         (nand_mod_LDFLAGS): Likewise.
9535         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
9536         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
9537         type property. (nand device in olpc don't have this property)
9539         * include/grub/disk.h (grub_disk_dev_id): New macro
9540         GRUB_DISK_DEVICE_NAND_ID.
9542         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
9543         function prototype.
9544         (grub_rescue_cmd_initrd): Likewise.
9546         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
9547         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
9548         ofw_cif_handler and ofw_idt, adjust padding number.
9550         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
9551         GRUB_MACHINE_IEEE1275 is defined.
9553         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
9554         Use NESTED_FUNC_ATTR attribute on the hook parameter.
9556         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
9557         on nested function heap_init.
9558         (grub_upper_mem): New variable for i386-ieee1275.
9559         (grub_get_extended_memory): New function for i386-ieee1275.
9560         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
9562         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
9563         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
9564         property.
9566         * loader/i386/ieee1275/linux.c: New file.
9568         * loader/i386/ieee1275/linux_normal.c: New file.
9570         * disk/ieee1275/nand.c: New file.
9572 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
9574         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
9575         value.
9576         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
9578 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9580         Restructures early code path on ieee1275 to unify grub_main() as
9581         the first C function that is executed in every platform.
9583         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
9584         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
9585         cmain().
9586         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
9587         * kern/ieee1275/cmain.c (cmain): Rename to ...
9588         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
9589         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
9590         at the beginning.
9592 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9594         * util/update-grub.in: Fix syntax error when setting
9595         `GRUB_PRELOAD_MODULES'.
9596         Reported by Stephane Chazelas <stephane@artesyncp.com>
9598 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
9600         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
9601         section into account, newer toolchains generate unique build ids
9602         * configure.ac: remove the test for --build-id=none acceptance,
9603         we want build ids to be preserved
9604         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
9605         far from other sections don't cause the raw binary images grow
9606         size
9608 2008-04-15  Robert Millan  <rmh@aybabtu.com>
9610         * disk/lvm.c: Update copyright year.
9611         * kern/misc.c: Likewise.
9613 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9615         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
9616         there is no memory left for physical volume name.
9618 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9620         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
9621         volume name mapping to support bigger than 9 character names properly.
9623 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9625         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
9626         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
9628 2008-04-13  Christian Franke  <franke@computer.org>
9630         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
9631         to create a floppy emulation boot CD when non emulation mode
9632         does not work.
9633         Enable Joliet CD filesystem extension.
9635 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9637         * kern/misc.c (grub_strncat): Fix off-by-one error.
9638         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
9640         * kern/env.c (grub_env_context_close): Clear current context, not
9641         previous one.
9642         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
9644         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
9646 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9648         Improve robustness when handling LVM.
9650         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
9651         (and leave `*p' unmodified).
9652         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
9653         through it.
9654         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
9655         iterating through it.
9656         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
9657         through it.
9658         (grub_lvm_scan_device): Check the return value (and fail gracefully
9659         when due) on each grub_lvm_getvalue() or grub_strstr() call.
9660         Don't assume `vg->pvs != NULL' when iterating through it.
9662 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9664         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
9665         * genmk.rb (partmap): New variable.
9666         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
9667         (#{partmap}): New target rule.
9668         * genpartmaplist.sh: New file.
9669         * Makefile.in (pkglib_DATA): Add partmap.lst.
9670         (partmap.lst): New target rule.
9671         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
9672         modules (including all partition maps), instead of preloading them.
9674 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
9676         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
9677         `linux-boot-prober' (if installed) to detect other operating
9678         systems which are installed on the computer and add them to
9679         the boot menu.
9680         * conf/common.rmk: Build and install 30_os-prober.
9682 2008-04-12  Robert Millan  <rmh@aybabtu.com>
9684         * kern/powerpc/ieee1275/init.c: Move from here ...
9685         * kern/ieee1275/init.c: ... to here.  Update all users.
9687         * kern/powerpc/ieee1275/cmain.c: Move from here ...
9688         * kern/ieee1275/cmain.c: ... to here.  Update all users.
9690         * kern/powerpc/ieee1275/openfw.c: Move from here ...
9691         * kern/ieee1275/openfw.c: ... to here.  Update all users.
9693         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
9694         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
9696 2008-04-10  Pavel Roskin  <proski@gnu.org>
9698         * configure.ac: Always use "_cv_" in cache variables for
9699         compatibility with Autoconf 2.62.
9701 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9703         Revert grub/machine/init.h addition by Pavel (since it breaks on
9704         i386-ieee1275 and others):
9705         * util/i386/pc/misc.c: Remove grub/machine/init.h.
9706         * util/powerpc/ieee1275/misc.c: Likewise.
9708 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9710         * util/grub-probe.c (probe): Improve error message.
9712 2008-04-07  Robert Millan  <rmh@aybabtu.com>
9714         * util/biosdisk.c (read_device_map): Skip devices that don't exist
9715         (this prevents the presence of a bogus entry from ruining the whole
9716         thing).
9718 2008-04-06  Pavel Roskin  <proski@gnu.org>
9720         * util/biosdisk.c: Include grub/util/biosdisk.h.
9721         * util/grub-fstest.c (execute_command): Make static.
9722         * util/grub-mkdevicemap.c (check_device): Likewise.
9723         * util/i386/pc/misc.c: Include grub/machine/init.h.
9724         * util/powerpc/ieee1275/misc.c: Likewise.
9725         * util/lvm.c: Include grub/util/lvm.h.
9726         * util/misc.c: Include grub/kernel.h, grub/misc.h and
9727         grub/cache.h.
9728         * util/raid.c: Include grub/util/raid.h.
9729         (grub_util_getdiskname): Make static.
9731         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
9732         grub_hostfs_fini(), as they are called from grub_init_all() and
9733         grub_fini_all() respectively.  This fixes an infinite loop in
9734         grub-fstest due to double registration of hostfs.
9735         Reported by Christian Franke <Christian.Franke@t-online.de>
9737 2008-04-05  Pavel Roskin  <proski@gnu.org>
9739         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
9740         all 8 functions.  Otherwise, probe function 0 only.
9742 2008-04-04  Pavel Roskin  <proski@gnu.org>
9744         * commands/lspci.c (grub_lspci_iter): Print the bus number
9745         correctly.
9747         * commands/lspci.c (grub_pci_classes): Fix typos.
9748         (grub_lspci_iter): Don't print func twice.  Print vendor ID
9749         before device ID, as it's normally done.
9751         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9752         Fix signedness warnings.
9753         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
9754         Likewise.
9755         * util/ieee1275/get_disk_name.c: Include config.h so that
9756         _GNU_SOURCE is defined and getline() is declared.  Mark an
9757         unused argument as such.  Fix a signedness warning.
9759 2008-04-02  Pavel Roskin  <proski@gnu.org>
9761         * genkernsyms.sh.in: Use more robust assignments for CC and
9762         srcdir.  Quote srcdir.
9763         * gensymlist.sh.in: Likewise.  Assert at the compile time that
9764         the symbol table is not empty.
9766         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
9767         * fs/cpio.c (grub_cpio_read): Likewise.
9769 2008-04-01  Pavel Roskin  <proski@gnu.org>
9771         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
9772         * disk/host.c (grub_host_open): Likewise.
9773         * disk/loopback.c (grub_loopback_open): Likewise.
9774         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
9775         disk->id as in disk/host.c, not a multi-character constant.
9777         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
9778         later is obsolete, potentially dangerous and sets a bad example.
9779         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
9780         * util/misc.c (grub_util_get_image_size): Likewise.
9782         * disk/loopback.c (options): Improve help for "--partitions".
9784         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
9785         options to align them with the short options, e.g. "echo -e".
9787 2008-03-31  Bean  <bean123ch@gmail.com>
9789         * video/reader/png.c (grub_png_data): New member is_16bit and
9790         image_data.
9791         (grub_png_decode_image_header): Detect 16 bit png image.
9792         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
9793         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
9794         (grub_video_reader_png): Release memory occupied by image_data.
9796         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
9797         4096 bytes.
9798         (grub_nfs_mount): Skip the test for sector per cluster.
9800         * include/grub/ntfs.h (MAX_SPC): Removed.
9802 2008-03-31  Bean  <bean123ch@gmail.com>
9804         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
9805         (grub_probe_SOURCES): Add fs/afs.c.
9806         (grub_fstest_SOURCES): Likewise.
9807         (afs_mod_SOURCES): New variable.
9808         (afs_mod_CFLAGS): Likewise.
9809         (afs_mod_LDFLAGS): Likewise.
9811         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
9812         (grub_emu_SOURCES): Likewise.
9814         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9816         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9818         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9820         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9822         * fs/afs.c: New file.
9824 2008-03-30  Pavel Roskin  <proski@gnu.org>
9826         * disk/host.c: Include grub/misc.h to fix a warning.
9827         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
9828         warnings about implicit declarations.
9830         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
9831         variable.
9832         * include/grub/i386/loader.h: Change declaration of
9833         grub_linux_boot() to match what grub_loader_set() expects.
9834         * util/getroot.c (grub_guess_root_device): Return const char* to
9835         fix a warning.
9836         * util/grub-probe.c (probe): Fix a warning about uninitialized
9837         abstraction_name variable.
9838         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
9839         second argument as unused to fix a warning.
9841         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
9842         missing grub_error() call.
9844         * util/update-grub_lib.in: Define datarootdir, since Autoconf
9845         2.60 and newer uses it to define datadir.
9847         * commands/sleep.c: Fix warning about implicit declaration.
9848         * disk/memdisk.c: Likewise.
9849         * loader/aout.c: Likewise.
9850         * loader/i386/bsd_normal.c: Likewise.
9851         * util/grub-probe.c: Likewise.
9853         * commands/i386/cpuid.c (has_longmode): Make static.
9854         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
9855         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
9857         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
9858         GDT.  This is more robust, as %ds can change.
9859         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
9860         calling real_to_prot().
9861         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
9863 2008-03-28  Pavel Roskin  <proski@gnu.org>
9865         * kern/i386/pc/startup.S: Assert that uncompressed functions
9866         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
9867         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
9868         code, as they push parts of the code (error handlers) beyond
9869         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
9870         code as correctness and size.
9872 2008-03-28  Pavel Roskin  <proski@gnu.org>
9874         * kern/i386/pc/startup.S
9875         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
9876         data block address to the real mode, keep offset minimal.  This
9877         works around a bug in AWARD BIOS on old Athlon systems, which
9878         makes CD detection hang.
9880 2008-03-26  Pavel Roskin  <proski@gnu.org>
9882         * normal/color.c (grub_parse_color_name_pair): Make `name' a
9883         const.
9884         * include/grub/normal.h: Add grub_parse_color_name_pair()
9885         declaration.
9887 2008-03-24  Bean  <bean123ch@gmail.com>
9889         * disk/i386/pc/biosdisk.c (cd_start): Removed.
9890         (cd_count): Removed.
9891         (cd_drive): New variable.
9892         (grub_biosdisk_get_drive): Don't check for (cdN) device.
9893         (grub_biosdisk_call_hook): Likewise.
9894         (grub_biosdisk_iterate): Change cdrom detection method.
9895         (grub_biosdisk_open): Replace cd_start with cd_drive.
9896         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
9897         detect cdrom device.
9899         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
9900         Removed.
9901         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
9902         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
9903         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
9904         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
9905         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
9906         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
9907         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
9908         (grub_biosdisk_cdrp): New structure.
9909         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
9911         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
9913         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
9914         device.
9916         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
9917         New function.
9919 2008-03-20  Robert Millan  <rmh@aybabtu.com>
9921         Remove 2 TiB limit in ata.mod.
9922         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
9923         (grub_ata_dumpinfo): Print sector count with 0x%llx.
9924         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
9925         grub_uint64_t instead of grub_uint32_t.
9927 2008-03-05  Bean  <bean123ch@gmail.com>
9929         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
9930         (grub_multiboot): Set boot device.
9932         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
9934 2008-03-02  Bean  <bean123ch@gmail.com>
9936         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
9937         symlink_buffer.
9939 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
9941         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
9942         texinfo.tex.
9944         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
9945         modified.
9947         * docs/fdl.texi: New file.
9949         * docs/mdate-sh: New file. Copied from gnulib.
9950         * docs/texinfo.tex: Likewise.
9952         * config.guess: Updated from gnulib.
9953         * install-sh: Likewise.
9955 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9957         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
9958         (aout_mod_SOURCES): New variable.
9959         (aout_mod_CFLAGS): Likewise.
9960         (aout_mod_LDFLAGS): Likewise.
9962         * conf/i386-ieee1275.rmk: Likewise.
9964 2008-02-28  Robert Millan  <rmh@aybabtu.com>
9966         * util/update-grub.in: Reorganise terminal validity check.  Accept
9967         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
9968         Based on suggestion by Franklin PIAT.
9970 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
9972         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
9973         function.
9974         * util/getroot.c (grub_util_check_block_device): New function that
9975         returns the given argument if it is a block device and returns NULL else.
9976         * util/grub-probe.c (argument_is_device): New variable.
9977         (probe): Promote device_name from a variable to an argument. Receive
9978         device_name from grub_util_check_block_device() if path is NULL and from
9979         grub_guess_root_device() else. Do not free() device_name anymore.
9980         (options): Introduce new parameter '-d, --device'.
9981         (main): Add description of the new parameter to the help screen.
9982         Rename path variable to argument. Set argument_is_device if the '-d'
9983         option is given. Pass argument to probe() depending on
9984         argument_is_device.
9986 2008-02-24  Bean  <bean123ch@gmail.com>
9988         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
9989         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
9990         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
9991         (GRUB_ISO9660_VOLDESC_PART): Likewise.
9992         (GRUB_ISO9660_VOLDESC_END): Likewise.
9993         (grub_iso9660_primary_voldesc): New member escape.
9994         (grub_iso9660_data): New member joliet.
9995         (grub_iso9660_convert_string): New function.
9996         (grub_iso9660_mount): Detect joliet extension.
9997         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
9998         (grub_iso9660_iso9660_label): Likewise.
10000         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
10001         (grub_setup_SOURCES): Add fs/udf.c.
10002         (grub_fstest_SOURCES): Likewise.
10003         (udf_mod_SOURCES): New variable.
10004         (udf_mod_CFLAGS): Likewise.
10005         (udf_mod_LDFLAGS): Likewise.
10007         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
10008         (grub_emu_SOURCES): Likewise.
10010         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10012         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10014         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10016         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10018         * fs/udf.c: New file.
10020 2008-02-24  Robert Millan  <rmh@aybabtu.com>
10022         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
10023         (normal/lexer.c_DEPENDENCIES): New variables.
10024         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10025         (normal/lexer.c_DEPENDENCIES): Likewise.
10026         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
10027         (normal/lexer.c_DEPENDENCIES): Likewise.
10028         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
10029         (normal/lexer.c_DEPENDENCIES): Likewise.
10030         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10031         (normal/lexer.c_DEPENDENCIES): Likewise.
10032         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10033         (normal/lexer.c_DEPENDENCIES): Likewise.
10035 2008-02-23  Robert Millan  <rmh@aybabtu.com>
10037         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
10038         since they were intended to be in hex.  This didn't break previously
10039         because of a bug in gpt_partition_map_iterate() (see below).
10041         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
10042         when checking the validity of GPT header.
10043         Remove `partno', since it always provides the same information as `i'.
10045 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
10047         * include/grub/efi/time.h: Fix a wrong comment.
10049 2008-02-19  Pavel Roskin  <proski@gnu.org>
10051         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
10052         message.
10054 2008-02-19  Bean  <bean123ch@gmail.com>
10056         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
10057         (aout_mod_SOURCES): New variable.
10058         (aout_mod_CFLAGS): Likewise.
10059         (aout_mod_LDFLAGS): Likewise.
10060         (_bsd_mod_SOURCES): New variable.
10061         (_bsd_mod_CFLAGS): Likewise.
10062         (_bsd_mod_LDFLAGS): Likewise.
10063         (bsd_mod_SOURCES): New variable.
10064         (bsd_mod_CFLAGS): Likewise.
10065         (bsd_mod_LDFLAGS): Likewise.
10067         * include/grub/aout.h: New file.
10069         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
10071         * include/grub/i386/bsd.h: New file.
10073         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
10074         to make it public.
10076         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
10077         function is called, so that it's possible to change it inside the hook.
10078         (grub_elf64_load): Likewise.
10079         (grub_elf_file): Don't close the file if elf header is not found.
10080         (grub_elf_close): Close the file if grub_elf_file fails (The new
10081         grub_elf_file won't close it).
10082         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
10083         (grub_elf64_size): Likewise.
10085         * kern/i386/loader.S (grub_unix_real_boot): New function.
10087         * loader/aout.c: New file.
10089         * loader/i386/bsd.c: New file.
10091         * loader/i386/bsd_normal.c: New file.
10093         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
10095         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
10096         can test other formats.
10098 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10100         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
10101         (grub_gpt_partition_type_empty): Redefine with macro from
10102         `<grub/gpt_partition.h>'.
10103         (gpt_partition_map_iterate): Adjust partition type comparison.
10105         Export `entry' as partmap-specific `part.data' struct.
10106         (grub_gpt_header, grub_gpt_partentry): Move from here ...
10108         * include/grub/gpt_partition.h (grub_gpt_header)
10109         (grub_gpt_partentry): ... to here (new file).
10111         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
10113         (grub_gpt_partition_type_bios_boot): New const variable, defined
10114         with macro from `<grub/gpt_partition.h>'.
10116         (setup): Replace `first_start' with `embed_region', which keeps
10117         track of the embed region (and is partmap-agnostic).
10119         Replace find_first_partition_start() with find_usable_region(),
10120         which finds a usable region for embedding using partmap-specific
10121         knowledge (supports PC/MSDOS and GPT).
10123         Fix all assumptions that the embed region start at sector 1, using
10124         `embed_region.start' from now on.  Similarly, use `embed_region.end'
10125         rather than `first_start' to calculate available size.
10127         In grub_util_info() message, replace "into after the MBR" with an
10128         indication of the specific sector our embed region starts at.
10130 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10132         * DISTLIST: Replace `commands/ieee1275/halt.c' and
10133         `commands/ieee1275/reboot.c' with `commands/halt.c' and
10134         `commands/reboot.c'.
10135         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10136         (halt_mod_SOURCES): Likewise.
10137         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10138         (halt_mod_SOURCES): Likewise.
10140 2008-02-17  Christian Franke  <franke@computer.org>
10142         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
10144 2008-02-17  Robert Millan  <rmh@aybabtu.com>
10146         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10147         set `first_start' to 0 for non-PC/MSDOS partition maps.
10149 2008-02-16  Robert Millan  <rmh@aybabtu.com>
10151         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10152         do not assume partition map is PC/MSDOS before performing checks that
10153         are specific to that layout.
10155 2008-02-13  Robert Millan  <rmh@aybabtu.com>
10157         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
10158         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
10159         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
10161 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
10163         * configure.ac: Only a cosmetic change on the handling of
10164         -fno-stack-protector.
10166 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
10168         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
10169         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
10170         reboot.c.
10171         (grub_install_SOURCES): Add halt.mod and reboot.mod.
10172         (halt_mod_SOURCES): New variable.
10173         (halt_mod_CFLAGS): Likewise.
10174         (halt_mod_LDFLAGS): Likewise.
10175         (reboot_mod_SOURCES): Likewise.
10176         (reboot_mod_CFLAGS): Likewise.
10177         (reboot_mod_LDFLAGS): Likewise.
10179         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
10180         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
10181         reboot.c.
10182         (halt_mod_SOURCES): Likewise.
10183         (reboot_mod_SOURCES): Likewise.
10185         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
10186         commands/i386/pc/reboot.c by commands/reboot.c.
10187         (reboot_mod_SOURCES): Likewise.
10189         * commands/i386/pc/reboot.c: merge this file ...
10191         * commands/ieee1275/reboot.c: ... and this file ...
10193         * commands/reboot.c: ... to this file.
10194         Add some precompiler directive to include the correct header for
10195         each machine.
10197         * commands/ieee1275/halt.c: move this file ...
10199         * commands/halt.c: ... to here.
10200         Add some precompiler directive to include the correct header for
10201         each machine.
10203         * include/grub/efi/efi.h (grub_reboot): New function declaration.
10204         (grub_halt): Likewise.
10206         * kern/efi/efi.c (grub_reboot): New function.
10207         (grub_halt): Likewise.
10209 2008-02-12  Robert Millan  <rmh@aybabtu.com>
10211         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
10212         /dev (like it is done for /dev/mapper).  This doesn't provide support
10213         for EVMS, but at least it is now easy to identify the problem when it
10214         arises.
10216 2008-02-11  Robert Millan  <rmh@aybabtu.com>
10218         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
10219         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
10220         comparing it with -1, not 0.
10222 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10224         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
10225         `disk/lvm.c'.
10226         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10227         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
10229         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
10230         `disk/lvm.c' to the end of the list.
10231         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10232         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10234 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10236         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
10237         grub_print_error() instead.  This will let user know why we're entering
10238         rescue mode.
10239         Based on suggestions from Sam Morris.
10241 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
10243         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
10244         on remaining N args, instead of "--" arg N times.
10246 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
10248         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
10249         (fill_with_default_glyph): Changed to use unknown_glyph for fill
10250         pattern for unknown glyphs.
10252 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10254         * configure.ac: Probe for `help2man'.
10255         * Makefile.in (builddir): New variable.
10256         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
10257         or otherwise add a few flags/options to it.
10258         (install-local): For every executable utility or script that is
10259         installed, invoke $(HELP2MAN) to install a manpage based on --help
10260         output.
10262         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
10263         that it doesn't prevent --help from working in build tree.
10265         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
10266         with `bug-grub@gnu.org'.
10267         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
10268         * util/update-grub.in (usage): New function.
10269         Implement proper argument check, with support for --help and --version
10270         (as well as existing -y).
10272 2008-02-09  Christian Franke  <franke@computer.org>
10274         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
10275         avoid overwriting previous output.
10276         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
10278 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10280         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
10281         drawing the menu.
10283 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10285         * commands/sleep.c: New file.
10286         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
10287         (sleep_mod_SOURCES): New variable.
10288         (sleep_mod_CFLAGS): Likewise.
10289         (sleep_mod_LDFLAGS): Likewise.
10291 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10293         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
10294         situations in which we can deduce the RAID size and the superblock
10295         doesn't match it.
10297 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10299         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
10300         and return a grub_diskmemberlist_t composed of LVM physical volumes.
10301         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
10303         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
10304         and return a grub_diskmemberlist_t composed of physical array members.
10305         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
10307         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
10308         prototype.
10309         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
10310         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
10311         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
10313         * util/grub-probe.c (probe): Move partmap probing code from here ...
10314         (probe_partmap): ... to here.
10315         (probe): Use probe_partmap() once for the disk we're probing, and
10316         additionally, when such disk contains a memberlist() struct member,
10317         once for each disk that is contained in the structure returned by
10318         memberlist().
10320 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10322         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
10323         environment variable to 'all' in order to obtain debug output from
10324         non-util/ code.
10325         * util/i386/pc/grub-setup.c (main): Likewise.
10327 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10329         * disk/raid.c (grub_raid_scan_device): Check for
10330         `array->device[sb.this_disk.number]' rather than for
10331         `array->device[sb.this_disk.number]->name', since the latter is not
10332         guaranteed to be accessible.
10334 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10336         * disk/raid.c: Update copyright.
10337         * fs/cpio.c: Likewise.
10338         * include/grub/raid.h: Likewise.
10339         * loader/i386/pc/multiboot.c: Likewise.
10340         * util/hostfs.c: Likewise.
10342 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10344         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
10345         to a grub_disk_t array.
10346         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
10347         `device[x]'.
10348         (grub_raid_scan_device): Replace `device[x].name' accesses with
10349         `device[x]->name'.  Simplify initialization of `array->device[x]'.
10351 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10353         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
10354         grub_dprintf() calls.
10355         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
10356         error message.
10358 2008-02-07  Christian Franke  <franke@computer.org>
10360         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
10361         instead of fseek and ftell to support large files.
10362         (grub_hostfs_read): Likewise.
10364 2008-02-07  Robert Millan  <rmh@aybabtu.com>
10366         Patch from Jeroen Dekkers.
10367         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
10368         failure, since successfully reading all array members might not be
10369         required.
10371 2008-02-06  Robert Millan  <rmh@aybabtu.com>
10373         * util/grub-probe.c (probe): Simplify partmap probing (with the
10374         assumption that the first word up to the underscore equals to
10375         the module name).
10377 2008-02-06  Christian Franke  <franke@computer.org>
10379         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
10380         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
10381         last block of a cpio or tar stream.
10382         Check for "TRAILER!!!" instead of any empty data
10383         block to detect last block of a cpio stream.
10384         (grub_cpio_dir): Fix constness of variable np.
10385         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
10386         cpio or tar trailer is detected.  This fixes a crash
10387         on open of a non existing file.
10389 2008-02-05  Bean  <bean123ch@gmail.com>
10391         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
10392         address of entry.
10393         (grub_multiboot_load_elf64): Likewise.
10394         (grub_multiboot): Initialize mbi structure.
10396         * util/grub-fstest.c: Don't include unused header file script.h.
10398         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
10399         of file.
10400         (grub_fstest_SOURCES): Likewise.
10402 2008-02-05  Robert Millan  <rmh@aybabtu.com>
10404         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
10405         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
10406         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
10407         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
10409         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
10410         (translation_table): Replace hardcoded values with macros
10411         provided by `<grub/term.h>'.
10413         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
10414         (keyboard_map): Correct/add a few values, with macros provided
10415         by `<grub/term.h>'.
10416         (keyboard_map_shift): Zero values that don't differ from their
10417         `keyboard_map' equivalents.
10418         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
10419         Discard the second scan code that is always sent by Caps lock.
10420         Only use `keyboard_map_shift' when it provides a non-zero value,
10421         otherwise fallback to `keyboard_map'.
10423 2008-02-04  Bean  <bean123ch@gmail.com>
10425         * Makefile.in (enable_grub_fstest): New variable.
10427         * conf/common.rmk (grub_fstest_init.lst): New rule.
10428         (grub_fstest_init.h): Likewise.
10429         (grub_fstest_init.c): Likewise.
10430         (util/grub-fstest.c_DEPENDENCIES): New variable.
10431         (grub_fstest_SOURCES): Likewise.
10433         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
10435         * util/grub-fstest.c: New file.
10437 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10439         Make grub-setup handle a separate root device.
10441         * util/i386/pc/grub-setup.c (setup): Always open the root device,
10442         so that the root device can be compared with the destination
10443         device.
10444         When embedding the core image, if the root and destination devices
10445         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
10446         0xFF.
10447         When not embedding, set ROOT_DRIVE to 0xFF.
10449 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10451         Add support for having a grub directory in a different drive. This
10452         is still only the data handling part.
10454         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
10455         (codestart): Save %dh in GRUB_ROOT_DRIVE.
10456         (grub_root_drive): New variable.
10458         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
10459         instead of GRUB_BOOT_DRIVE to construct a device name. Set
10460         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
10461         as it was.
10463         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
10465         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
10466         macro.
10467         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
10469         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
10470         is bogus, because PXE booting does not specify any drive
10471         correctly.
10473         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
10474         am not sure if this is really correct.
10476         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
10477         is always identical to the boot drive when booting from a CD.
10479         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
10480         longer.
10481         (root_drive): New variable.
10482         (real_start): Unconditionally set %dh to ROOT_DRIVE.
10483         (setup_sectors): Push %dx right after popping it, because %dh will
10484         be modified later.
10485         (copy_buffer): Restore %dx.
10487 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10489         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
10490         use `cdboot.img' for cdrom images.
10492 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10494         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
10495         only setup gfxterm when `font' command has succeeded.
10497 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10499         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
10500         (grub_rescue_cmd_multiboot_loader)
10501         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
10503 2008-02-03  Pavel Roskin  <proski@gnu.org>
10505         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
10506         %edx and %esi from stack only after grub_gate_a20() is called.
10507         grub_gate_a20() clobbers %edx.
10509 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10511         * configure.ac (AC_INIT): Bumped to 1.96.
10513         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
10514         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
10515         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
10516         video/readers/png.c.
10518 2008-02-03  Bean  <bean123ch@gmail.com>
10520         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
10521         (cdboot_img_SOURCES): New variable.
10522         (cdboot_img_ASFLAGS): New variable.
10523         (cdboot_img_LDFLAGS): New variable.
10525         * boot/i386/pc/cdboot.S: New file.
10527         * disk/i386/pc/biosdisk.c (cd_start): New variable.
10528         (cd_count): Likewise.
10529         (grub_biosdisk_get_drive): Add support for cd device.
10530         (grub_biosdisk_call_hook): Likewise.
10531         (grub_biosdisk_iterate): Likewise.
10532         (grub_biosdisk_open): Likewise.
10533         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
10534         (grub_biosdisk_rw): Support reading from cd device.
10535         (GRUB_MOD_INIT): Iterate cd devices.
10537         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
10538         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
10539         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
10541         * kern/i386/pc/init.c (make_install_device): Check for cd device.
10543 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10545         * commands/read.c: New file.
10546         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
10547         (read_mod_SOURCES): New variable.
10548         (read_mod_CFLAGS): Likewise.
10549         (read_mod_LDFLAGS): Likewise.
10551 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10553         * normal/main.c (grub_normal_execute): Check for `menu->size' when
10554         determining whether menu has to be displayed.
10556 2008-02-02  Marco Gerards  <marco@gnu.org>
10558         * bus/pci.c: New file.
10560         * include/grub/pci.h: Likewise.
10562         * include/grub/i386/pc/pci.h: Likewise.
10564         * commands/lspci.c: Likewise.
10566         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
10567         `lspci.mod'.
10568         (pci_mod_SOURCES): New variable.
10569         (pci_mod_CFLAGS): Likewise.
10570         (pci_mod_LDFLAGS): Likewise.
10571         (lspci_mod_SOURCES): Likewise.
10572         (lspci_mod_CFLAGS): Likewise.
10573         (lspci_mod_LDFLAGS): Likewise.
10575 2008-02-02  Bean  <bean123ch@gmail.com>
10577         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
10578         (grub_ufs_get_file_block): Fix indirect block calculation problem.
10580         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
10581         (grub_xfs_btree_node): New structure.
10582         (grub_xfs_btree_root): New structure.
10583         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
10584         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
10585         (GRUB_XFS_EXTENT_BLOCK): Likewise.
10586         (GRUB_XFS_EXTENT_SIZE): Likewise.
10587         (grub_xfs_read_block): Support btree format type.
10588         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
10589         Use directory block as basic unit.
10591         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
10593         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
10594         __attribute__ ((__regparm__ (1))).
10596 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10598         Correct a mistake in previous commit.
10600         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
10601         top.
10602         (normal/command.c_DEPENDENCIES): New variable.
10604 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10606         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
10607         top.
10608         (normal/command.c_DEPENDENCIES): New variable.
10609         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
10610         * conf/i386-ieee1275.rmk: Likewise.
10611         * conf/i386-linuxbios.rmk: Likewise.
10612         * conf/i386-pc.rmk: Likewise.
10613         * conf/sparc64-ieee1275.rmk: Likewise.
10614         * conf/powerpc-ieee1275.rmk: Likewise.
10615         (grub_emu_SOURCES): Add `fs/fshelp.c'.
10617         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
10619 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10621         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
10622         call at beginning of function.
10624 2008-01-31  Pavel Roskin  <proski@gnu.org>
10626         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
10627         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
10628         (grub_mkrescue_SOURCES): Likewise.
10629         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
10631 2008-01-30  Robert Millan  <rmh@aybabtu.com>
10633         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
10634         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
10635         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
10636         (grub_probe_SOURCES): ... to here.
10638         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
10639         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
10640         * conf/i386-ieee1275.rmk: Likewise.
10641         * conf/i386-linuxbios.rmk: Likewise.
10642         * conf/powerpc-ieee1275.rmk: Likewise.
10644 2008-01-30  Tristan Gingold  <gingold@free.fr>
10646         * kern/rescue.c: Silently accept empty lines.
10648 2008-01-29  Bean  <bean123ch@gmail.com>
10650         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
10651         (real_code_2): Code cleanup and change comment style.
10652         (move_memory): Avoid using 32-bit address mode.
10654 2008-01-29  Bean  <bean123ch@gmail.com>
10656         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
10657         (png_mod_SOURCES): New variable.
10658         (png_mod_CFLAGS): Likewise.
10659         (png_mod_LDFLAGS): Likewise.
10661         * video/readers/png.c: New file.
10663 2008-01-28  Robert Millan  <rmh@aybabtu.com>
10665         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
10666         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
10667         `ifndef GRUB_MOD_GAP' hack.
10668         * util/elf/grub-mkimage.c (add_segments): Likewise.
10670 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10672         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
10673         `GRUB_MOD_GAP' for platforms in which it's not defined.
10674         * util/elf/grub-mkimage.c (add_segments): Likewise.
10676 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10678         Get grub-emu to build again (including parallel builds).
10680         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
10681         Split into ...
10682         (util/grub-emu.c_DEPENDENCIES): ... this, ...
10683         (normal/execute.c_DEPENDENCIES): ... this, ...
10684         (grub-emu_DEPENDENCIES): ... and this.
10686         * conf/i386-efi.rmk: Likewise.
10687         * conf/i386-linuxbios.rmk: Likewise.
10688         * conf/i386-ieee1275.rmk: Likewise.
10689         * conf/powerpc-ieee1275.rmk: Likewise.
10690         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
10692 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10694         * NEWS: Add a few items.
10696 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10698         Fix parallel builds with grub-emu.  Based on earlier commit for
10699         grub-probe and grub-setup.
10701         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10702         (util/grub-emu.c_DEPENDENCIES): ... this.
10703         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10704         (util/grub-emu.c_DEPENDENCIES): ... this.
10705         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10706         (util/grub-emu.c_DEPENDENCIES): ... this.
10707         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10708         (util/grub-emu.c_DEPENDENCIES): ... this.
10709         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10710         (util/grub-emu.c_DEPENDENCIES): ... this.
10712 2008-01-27  Pavel Roskin  <proski@gnu.org>
10714         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
10715         to create a gap between _end and the modules added to the image
10716         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
10717         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
10718         * util/elf/grub-mkimage.c (add_segments): Likewise.
10720 2008-01-26  Pavel Roskin  <proski@gnu.org>
10722         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
10723         just return an error.
10725 2008-01-26  Bean  <bean123ch@gmail.com>
10727         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
10728         (grub_reiserfs_get_item): Save offset of the next item.
10729         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
10731 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10733         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
10734         make all filesystem sources appear together (possibly fixing omissions
10735         while at it).
10736         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10737         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10738         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10739         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10741         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
10742         add `kern/file.c'.
10743         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
10744         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10745         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
10746         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10748         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
10749         (probe): Add a sanity check to make sure of our ability to read
10750         requested files when probing for filesystem type.
10752         * genmk.rb: Update copyright year (2007).
10754         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
10755         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
10756         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
10757         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
10758         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
10759         : Remove function prototypes.
10761 2008-01-25  Robert Millan  <rmh@aybabtu.com>
10763         Revert my previous commits (based on wrong assumption of how grub_errno
10764         works).
10766         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
10767         * kern/file.c (grub_file_open): Likewise.
10769 2008-01-24  Pavel Roskin  <proski@gnu.org>
10771         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
10772         that hang if GRUB tries to setup colors.
10773         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
10774         colors for firmwares that don't support it.
10775         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
10776         Recognize Open Hack'Ware, set flags to work around its
10777         limitations.
10779 2008-01-24  Robert Millan  <rmh@aybabtu.com>
10781         * kern/file.c (grub_file_open): Do not account previous failures of
10782         unrelated functions when grub_errno is checked for.
10783         Reported by Oleg Strikov.
10785 2008-01-24  Bean  <bean123ch@gmail.com>
10787         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
10788         (grub_ufs_sblock): New member volume name.
10789         (grub_ufs_find_file): Fix string copy bug.
10790         (grub_ufs_label): Implement this function properly.
10792         * fs/hfs.c (grub_hfs_cnid_type): New enum.
10793         (grub_hfs_iterate_records): Use the correct file number for extents
10794         and catalog file. Fix problem in next index calculation.
10795         (grub_hfs_find_node): Replace recursive function call with loop.
10796         (grub_hfs_iterate_dir): Replace recursive function call with loop.
10798 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10800         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
10801         `<grub/symbol.h>' and `<grub/multiboot.h>'.
10802         (grub_multiboot2_real_boot): New function prototype.
10804         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
10805         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
10807         * kern/i386/ieee1275/init.c (grub_os_area_addr)
10808         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
10810 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10812         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
10813         #ifdef'ed out grub_printf().
10815 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10817         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
10818         grub_dprintf calls, since they make "debug=all" mode unusable.
10819         (grub_console_checkkey): Likewise.
10821 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10823         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
10824         `term/i386/pc/at_keyboard.c'.
10825         (pkglib_MODULES): Add `serial.mod'.
10826         (serial_mod_SOURCES): New variable.
10827         (serial_mod_CFLAGS): Likewise.
10828         (serial_mod_LDFLAGS): Likewise.
10830         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
10831         `<grub/powerpc/ieee1275/console.h>'.
10832         (grub_keyboard_controller_init): New function prototype.
10833         (grub_console_checkkey): Likewise.
10834         (grub_console_getkey): Likewise.
10836         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
10837         keyboard on i386.
10839         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
10840         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
10842 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10844         * kern/i386/pc/init.c (make_install_device): When memdisk image is
10845         present, "(memdisk)/boot/grub" becomes the default prefix.
10847         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
10848         a memdisk tarball with all the modules.  Add --overlay=DIR option that
10849         allows users to overlay additional files into the image.
10851 2008-01-23  Robert Millan  <rmh@aybabtu.com>
10853         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
10854         and `machine/memory.h'.
10855         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
10856         (_multiboot_mod_SOURCES): New variable.
10857         (_multiboot_mod_CFLAGS): Likewise.
10858         (_multiboot_mod_LDFLAGS): Likewise.
10859         (multiboot_mod_SOURCES): Likewise.
10860         (multiboot_mod_CFLAGS): Likewise.
10861         (multiboot_mod_LDFLAGS): Likewise.
10863         * include/grub/i386/ieee1275/loader.h: New file.
10865         * include/grub/i386/ieee1275/machine.h: Likewise.
10867         * include/grub/i386/ieee1275/memory.h: Likewise.
10869         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
10870         variable declaration.
10871         (grub_os_area_size): Likewise.
10873         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
10874         (grub_lower_mem, grub_upper_mem): New variables.
10875         (grub_stop_floppy): New function (just to make
10876         grub_multiboot2_real_boot() happy).
10878         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
10879         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
10880         (grub_stop): New function.
10881         Include `"../realmode.S"' and `"../loader.S"'.
10883         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
10884         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
10886         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
10887         rely on grub_multiboot2_real_boot() for final boot.
10889 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10891         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
10892         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
10893         device that doesn't look like an SD card.
10894         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10895         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
10896         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
10897         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
10898         found.
10900 2008-01-22  Robert Millan  <rmh@aybabtu.com>
10902         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
10903         avoid claiming over our own code.
10905 2008-01-22  Bean  <bean123ch@gmail.com>
10907         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
10908         (jpeg_mod_SOURCES): New variable.
10909         (jpeg_mod_CFLAGS): Likewise.
10910         (jpeg_mod_LDFLAGS): Likewise.
10912         * video/readers/jpeg.c : New file.
10914 2008-01-22  Bean  <bean123ch@gmail.com>
10916         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
10917         there are no more items.
10919 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10921         * kern/mm.c (grub_mm_init_region): Improve debug message.
10923 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10925         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
10926         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
10927         address.
10928         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
10929         a C macro.
10930         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
10931         Indicates start of upper memory.
10932         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
10933         (generate_image): Abort when image size is big enough to corrupt
10934         upper memory.
10936         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
10937         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
10938         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10939         instead of hardcoding 0xA0000.
10940         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
10941         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10942         instead of hardcoding 0xA0000.
10944 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10946         * disk/memdisk.c (memdisk_size): New variable.
10947         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
10948         `memdisk_size'.
10949         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
10950         image to dynamic memory.
10951         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
10952         `memdisk_size'.  Free memdisk block.
10954 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10956         Fix detection of very small filesystems (like tar).
10958         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
10959         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
10960         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
10961         a problem with this disk).
10963 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10965         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
10966         on grub_biosdisk_rw_standard() error.
10968 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10970         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
10971         recent changes.
10972         * kern/elf.c: Likewise.
10973         * kern/ieee1275/ieee1275.c: Likewise.
10974         * kern/powerpc/ieee1275/openfw.c: Likewise.
10975         * term/ieee1275/ofconsole.c: Likewise.
10977 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10979         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
10981         * include/grub/kernel.h (grub_arch_memdisk_addr)
10982         (grub_arch_memdisk_size): Moved from here ...
10984         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
10985         (grub_arch_memdisk_size): ... to here.
10987 2008-01-21  Robert Millan  <rmh@aybabtu.com>
10989         Mostly based on bugfix from Bean.
10991         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
10992         attribute with hook() parameter.
10993         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
10994         declaration.
10995         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
10996         attribute with hook() parameter.
10997         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
10998         declaration.
11000 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11002         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
11003         (pkglib_MODULES): Add `memdisk.mod'.
11004         (memdisk_mod_SOURCES): New variable.
11005         (memdisk_mod_CFLAGS): Likewise.
11006         (memdisk_mod_LDFLAGS): Likewise.
11008         * disk/memdisk.c: New file.
11010         * include/grub/disk.h (grub_disk_dev_id): Add
11011         `GRUB_DISK_DEVICE_MEMDISK_ID'.
11013         * include/grub/i386/pc/kernel.h
11014         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
11015         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
11016         (grub_kernel_image_size): New variable declaration.
11017         (grub_total_module_size): Likewise.
11018         (grub_memdisk_image_size): Likewise.
11020         * include/grub/i386/pc/memory.h
11021         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
11023         * include/grub/kernel.h: Include `<grub/symbol.h>'.
11024         (grub_arch_memdisk_addr): New variable declaration.
11025         (grub_arch_memdisk_size): Likewise.
11027         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
11028         (grub_arch_memdisk_size): Likewise.
11030         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
11031         (codestart): Replace hardcoded `0x100000' with
11032         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
11034         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
11035         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
11036         not NULL, append the contents of the file it refers to, at the end of
11037         the compressed kernel image.  Initialize `grub_memdisk_image_size'
11038         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
11039         (options): Add "memdisk"|'m' option.
11040         (main): Parse --memdisk|-m option, and pass user-provided path as
11041         parameter to generate_image().
11043 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11045         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
11046         grub_dprintf() calls from here ...
11047         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
11049 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11051         Fix detection of "real mode" when /options/real-mode? doesn't exist.
11053         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
11054         declaration.
11055         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
11056         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
11057         `GRUB_IEEE1275_FLAG_REAL_MODE'.
11058         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
11059         property).
11060         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
11061         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
11063 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11065         Get rid of confusing function (superseded by
11066         `grub_ieee1275_get_integer_property')
11067         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
11068         prototype.
11069         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
11070         function.
11071         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
11072         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
11073         in native endianness from grub_ieee1275_get_integer_property().
11075 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11077         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
11078         command after "shut-down", since implementations differ on which
11079         the command for halt is.
11081 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11083         * include/grub/i386/linuxbios/console.h: Add header protection.
11084         (grub_keyboard_controller_init): New function prototype.
11085         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
11086         (KEYBOARD_COMMAND_READ): Likewise.
11087         (KEYBOARD_COMMAND_WRITE): Likewise.
11088         (KEYBOARD_SCANCODE_SET1): Likewise.
11089         (grub_keyboard_controller_write): New function.
11090         (grub_keyboard_controller_read): Likewise.
11091         (grub_keyboard_controller_init): Likewise.
11093         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
11094         (grub_console_init): On coreboot/LinuxBIOS, call
11095         grub_keyboard_controller_init().
11097 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11099         PowerPC changes provided by Pavel Roskin.
11101         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
11102         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
11103         don't rely on cmain() doing it.
11104         * kern/i386/ieee1275/startup.S (_start): Store %eax in
11105         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
11107 2008-01-16  Robert Millan  <rmh@aybabtu.com>
11109         * include/grub/i386/linuxbios/memory.h
11110         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
11111         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
11112         receive `table_header' as argument.  Instead, probe for it in the
11113         known memory ranges where it can be present.
11114         (grub_available_iterate): Do not pass a fixed `table_header' address
11115         to grub_linuxbios_table_iterate().
11117 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11119         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
11120         * conf/i386-ieee1275.rmk: New file.
11121         * include/grub/i386/ieee1275/console.h: Likewise.
11122         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
11123         * include/grub/i386/ieee1275/kernel.h: Likewise.
11124         * include/grub/i386/ieee1275/time.h: Likewise.
11125         * kern/i386/ieee1275/init.c: Likewise.
11126         * kern/i386/ieee1275/startup.S: Likewise.
11128 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11130         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
11131         when pointers are 32-bit (but still do set it to one when they are
11132         64-bit).
11134 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11136         * include/grub/ieee1275/ieee1275.h
11137         (grub_ieee1275_get_integer_property): New function prototype.
11139         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
11140         (grub_ieee1275_get_integer_property): New function.  Wraps around
11141         grub_ieee1275_get_property() to handle endianness.
11143         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
11144         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
11145         where appropriate.
11146         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
11147         (grub_map): Likewise.
11148         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
11150 2008-01-15  Bean  <bean123ch@gmail.com>
11152         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
11153         (grub_script_execute_cmdline): Reset grub_errno.
11155         * normal/main.c (read_config_file): Reset grub_errno.
11157         * normal/parse.y (script_init): New.
11158         (script): Move function and menuentry here.
11159         (delimiter): New.
11160         (command): Add delimiter at the end of command.
11161         (commands): Adjust to match the new command.
11162         (commandblock): Remove grub_script_lexer_record_start.
11163         (menuentry): Add grub_script_lexer_record_start, use the new commands.
11164         (if): Use the new commands.
11166         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
11168 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11170         * normal/menu.c (run_menu): Move timeout message from here ...
11171         (print_timeout): ... to here.
11172         (run_menu): Use print_timeout() once during initial draw to print
11173         the whole message, and again in every clock tick to update only
11174         the number of seconds.
11176 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11178         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
11179         actual size of `available' from grub_ieee1275_get_property(), and
11180         restrict parsing to that bound.
11182 2008-01-15  Christian Franke  <franke@computer.org>
11184         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
11185         (argp_program_version): Remove variable.
11186         (argp_program_bug_address): Likewise.
11187         (options): Convert from struct argp_option to struct option.
11188         (struct arguments): Remove.
11189         (parse_opt): Remove.
11190         (usage): New function.
11191         (main): Replace struct args members by simple variables.
11192         Replace argp_parse() by getopt_long().
11193         Add switch to evaluate options.
11194         Add missing "(...)" around root_dev in prefix string.
11196 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11198         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
11199         for grub_ieee1275_exit(), in order to improve portability.
11201 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11203         * util/grub.d/10_linux.in (prefix): Define.
11204         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
11206 2008-01-13  Pavel Roskin  <proski@gnu.org>
11208         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
11209         grub_errno if no errors have been detected.
11211 2008-01-12  Robert Millan  <rmh@aybabtu.com>
11213         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
11214         (grub_util_get_dev_abstraction): New function prototype.
11216         * util/getroot.c: Include `<grub/util/getroot.h>'
11217         (grub_util_get_grub_dev): Move detection of abstraction type to ...
11218         (grub_util_get_dev_abstraction): ... here (new function).
11220         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
11221         `PRINT_ABSTRACTION'.
11222         (probe): Probe for abstraction type when requested.
11223         (main): Understand `--target=abstraction'.
11225         * util/i386/efi/grub-install.in: Add abstraction module to core
11226         image when it is found to be necessary.
11227         * util/i386/pc/grub-install.in: Likewise.
11228         * util/powerpc/ieee1275/grub-install.in: Likewise.
11230         * util/update-grub_lib.in (font_path): Return system path without
11231         converting to GRUB path.
11232         * util/update-grub.in: Convert system path returned by font_path()
11233         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
11234         abstraction module is needed for loading fonts (if any).  Export
11235         that as `GRUB_PRELOAD_MODULES'.
11236         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
11237         insmod commands).
11239 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
11241         Remove some unused code from reiserfs.
11243         * fs/reiserfs.c (struct grub_reiserfs_key)
11244         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
11245         (struct grub_reiserfs_node_body): Removed.
11246         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11247         Likewise.
11248         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11249         Likewise.
11250         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11251         Likewise.
11252         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11253         Likewise.
11254         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11255         Likewise.
11256         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
11257         Likewise.
11258         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11259         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11260         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11262 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11264         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
11265         Determines if a file is garbage left by packaging systems, etc.
11266         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
11267         for processing /etc/grub.d scripts.
11268         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
11269         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
11270         as a condition for processing Linux images.
11272 2008-01-10  Pavel Roskin  <proski@gnu.org>
11274         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
11275         to compile reiserfs.c on PowerPC.
11277 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11279         * kern/device.c (grub_device_iterate): Do not abort device iteration
11280         when one of the devices cannot be opened.
11281         * kern/disk.c (grub_disk_open): Do not account previous failures of
11282         unrelated functions when grub_errno is checked for.
11284 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11286         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
11287         `! grub_linux_is_bzimage', change order of address comparison to make
11288         it more intuitive, and improve "too big zImage" error message.
11290 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11292         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
11293         `$(update-grub_DATA)'.
11294         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
11295         targets.
11297 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11299         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
11300         which instruction is modified by grub-setup during installation
11301         (since it wasn't obvious by only looking at this file).
11303 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11305         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
11306         listing actual TODO items.
11308 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11310         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
11311         correctly.
11312         (grub_reiserfs_get_key_offset): Likewise.
11313         (grub_reiserfs_set_key_offset): Likewise.
11314         (grub_reiserfs_set_key_type): Likewise.
11315         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
11317         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
11318         better to remove the bitfield version completely.
11320 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11322         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
11323         allocated from the heap, due to the fshelp implementation.
11324         (grub_reiserfs_dir): Free NODE, due to the same reason.
11326 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11328         Mostly from Vincent Pelletier:
11330         * fs/reiserfs.c: New file.
11332         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
11333         (reiserfs_mod_SOURCES): New variable.
11334         (reiserfs_mod_CFLAGS): Likewise.
11335         (reiserfs_mod_LDFLAGS): Likewise.
11337         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
11338         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
11339         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
11340         normal/color.c.
11342 2008-01-06  Robert Millan  <rmh@aybabtu.com>
11344         * normal/color.c: Remove `<grub/env.h>'.
11346 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
11348         * include/grub/normal.h: Include <grub/env.h>.
11350 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11352         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
11353         usage example with `(hd0,1)'.
11354         Reported by Samuel Thibault.
11356 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11358         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
11359         (grub_linux_boot_zimage): Rename to ...
11360         (grub_linux_boot): ... this.
11361         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
11362         (grub_linux_boot_zimage): Conditionalize zImage copy.
11364         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
11365         (grub_linux_boot_bzimage): Remove prototype.
11366         (grub_linux_boot_zimage): Rename to ...
11367         (grub_linux_boot): ... this.
11369         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
11370         (grub_linux_boot): Remove function.
11372 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11374         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
11375         (grub_env_write_color_highlight): Likewise.
11376         (grub_wait_after_message): Likewise.
11378         * normal/color.c: New file.
11380         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11381         (normal_mod_DEPENDENCIES): Likewise.
11383         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11384         (normal_mod_DEPENDENCIES): Likewise.
11386         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11387         (normal_mod_DEPENDENCIES): Likewise.
11389         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11390         (normal_mod_DEPENDENCIES): Likewise.
11392         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
11393         for waiting after a message is printed.
11394         * normal/main.c (read_config_file): Likewise.
11395         (grub_normal_init): Register grub_env_write_color_normal() and
11396         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
11397         `color_highlight' variables as global.
11399         * normal/menu.c (grub_wait_after_message): New function.
11400         (grub_color_menu_normal): New variable.  Replaces ...
11401         (GRUB_COLOR_MENU_NORMAL): ... this macro.
11402         (grub_color_menu_highlight): New variable.  Replaces ...
11403         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
11404         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
11405         `GRUB_TERM_COLOR_STANDARD'.
11406         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
11407         `normal_code' and `highlight_code' to `old_color_normal' and
11408         `old_color_highlight', respectively.
11409         (grub_menu_init_page): Update colors when drawing the menu, based on
11410         `menu_color_normal' and `menu_color_highlight' variables.
11411         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
11412         a message is printed.
11414 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11416         * kern/env.c (grub_env_context_open): Propagate hooks for global
11417         variables to new context.
11419         * kern/main.c (grub_set_root_dev): Export `root' variable.
11421 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11423         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
11424         discs unconditionally, since udev and others have options to provide
11425         them.
11427 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11429         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
11431 2008-01-04  Christian Franke  <franke@computer.org>
11433         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
11434         of eisa_mmap.
11436 2008-01-03  Pavel Roskin  <proski@gnu.org>
11438         * kern/i386/linuxbios/init.c: Put "void" to all function
11439         declarations with no arguments.
11440         * kern/powerpc/ieee1275/init.c: Likewise.
11441         * term/i386/pc/at_keyboard.c: Likewise.
11442         * term/i386/pc/vga_text.c: Likewise.
11443         * util/grub-mkdevicemap.c: Likewise.
11445 2008-01-02  Robert Millan  <rmh@aybabtu.com>
11447         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
11448         message when loaded image is out of bounds.
11449         (grub_multiboot_load_elf64): Likewise.
11451 2008-01-02  Pavel Roskin  <proski@gnu.org>
11453         * util/grub.d/10_linux.in: Try version without ".old" when
11454         looking for initrd.  It's better to use initrd from the newer
11455         kernel of the same version than no initrd at all.
11457 2008-01-01  Robert Millan  <rmh@aybabtu.com>
11459         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
11461 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
11463         * include/grub/video.h: Added grub_video_unmap_color and
11464         grub_video_get_active_render_target.
11465         (grub_video_adapter): Added unmap_color and get_active_render_target.
11467         * video/video.c: Added grub_video_unmap_color and
11468         grub_video_get_active_render_target.
11469         (grub_video_get_info): Changed method to accept NULL pointer as an
11470         argument to allow detection of active video adapter.
11472         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
11473         grub_video_vbe_unmap_color_int.
11474         Added grub_video_vbe_unmap_color and
11475         grub_video_vbe_get_active_render_target.
11476         (grub_video_vbe_adapter): Added unmap_color and
11477         get_active_render_target.
11479         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
11480         with grub_video_vbe_unmap_color_int.
11482         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
11483         (DEFAULT_NORMAL_COLOR): Likewise.
11484         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
11485         (DEFAULT_FG_COLOR): Removed.
11486         (DEFAULT_BG_COLOR): Likewise.
11487         (DEFAULT_CURSOR_COLOR): Changed value.
11488         (grub_virtual_screen): Added standard_color_setting,
11489         normal_color_setting, highlight_color_setting and term_color.
11490         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
11491         (bitmap_width): Added.
11492         (bitmap_height): Likewise.
11493         (bitmap): Likewise.
11494         (set_term_color): Likewise.
11495         (grub_virtual_screen_setup): Changed to use new terminal coloring
11496         settings.
11497         (grub_gfxterm_init): Added init for bitmap.
11498         (grub_gfxterm_fini): Added destroy for bitmap.
11499         (redraw_screen_rect): Updated to use background bitmap and new
11500         terminal coloring.
11501         (scroll_up): Added optimization for case when there is no bitmap.
11502         (grub_gfxterm_cls): Fixed to use correct background color.
11503         (grub_virtual_screen_setcolorstate): Changed to use new terminal
11504         coloring.
11505         (grub_virtual_screen_setcolor): Likewise.
11506         (grub_virtual_screen_getcolor): Added.
11507         (grub_gfxterm_background_image_cmd): Likewise.
11508         (grub_video_term): Added setcolor and getcolor.
11509         (MOD_INIT): Added registration of background_image command.
11510         (MOD_TERM): Added unregistration for background_image command.
11512 2007-12-30  Pavel Roskin  <proski@gnu.org>
11514         * loader/multiboot_loader.c: Fix multiboot command
11515         unregistration.  Fix all typos in the word "multiboot".
11517 2007-12-29  Pavel Roskin  <proski@gnu.org>
11519         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
11520         support for initrd names used in Fedora.
11522 2007-12-26  Bean  <bean123ch@gmail.com>
11524         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
11525         (cpio_mod_SOURCES): New variable.
11526         (cpio_mod_CFLAGS): Likewise.
11527         (cpio_mod_LDFLAGS): Likewise.
11529         * fs/cpio.c: New file.
11531         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
11533         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11535         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11537         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11539 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11541         * include/grub/term.h (struct grub_term): Add `getcolor' function.
11542         (grub_getcolor): New function.
11544         * kern/term.c (grub_getcolor): New function.
11545         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
11546         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
11547         (print_entry): Set normal and highlight colors to
11548         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
11549         respectively, before printing and restore them to old
11550         values afterwards.
11551         (grub_menu_init_page): Likewise.  Fill an additional colored space
11552         that would otherwise be left blank.
11554         * term/efi/console.c (grub_console_getcolor): New function.
11555         (struct grub_console_term.getcolor): New variable.
11556         * term/i386/pc/console.c (grub_console_getcolor): New function.
11557         (struct grub_console_term.getcolor): New variable.
11558         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
11559         (struct grub_console_term.getcolor): New variable.
11561         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
11562         (struct grub_console_term.setcolor): Remove variable.
11563         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
11564         (struct grub_console_term.setcolor): Remove variable.
11565         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
11566         (struct grub_console_term.setcolor): Remove variable.
11567         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
11568         (struct grub_console_term.setcolor): Remove variable.
11570 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11572         * configure.ac: Search for possible unifont.hex locations, and
11573         define UNIFONT_HEX if found.
11575         * Makefile.in (UNIFONT_HEX): Define variable.
11576         (DATA): Rename to ...
11577         (PKGLIB): ... this.  Update all users.
11578         (PKGDATA): New variable.
11579         (pkgdata_IMAGES): Rename to ...
11580         (pkglib_IMAGES): ... this. Update all users.
11581         (pkgdata_MODULES): Rename to ...
11582         (pkglib_MODULES): ... this. Update all users.
11583         (pkgdata_PROGRAMS): Rename to ...
11584         (pkglib_PROGRAMS): ... this. Update all users.
11585         (pkgdata_DATA): Rename to ...
11586         (pkglib_DATA): ... this. Update all users.
11587         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
11588         (unicode.pff, ascii.pff): New rules.
11589         (all-local): Add `$(PKGDATA)' dependency.
11590         (install-local): Process `$(PKGDATA)'.
11592         * util/update-grub_lib.in (font_path): Search for *.pff files in
11593         a few more locations, including `${pkgdata}'.
11595 2007-12-23  Robert Millan  <rmh@aybabtu.com>
11597         Patch from Bean  <bean123ch@gmail.com>:
11598         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
11599         `size'.
11601 2007-12-21  Bean  <bean123ch@gmail.com>
11603         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
11604         (ntfscomp_mod_SOURCES): New variable.
11605         (ntfscomp_mod_CFLAGS): Likewise.
11606         (ntfscomp_mod_LDFLAGS): Likewise.
11608         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
11609         (grub_probe_SOURCES): Likewise.
11610         (grub_emu_SOURCES): Likewise.
11612         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11613         (grub_emu_SOURCES): Likewise.
11615         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11616         (grub_emu_SOURCES): Likewise.
11618         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11619         (grub_emu_SOURCES): Likewise.
11621         * fs/ntfs.c (grub_ntfscomp_func): New variable.
11622         (read_run_list): Renamed to grub_ntfs_read_run_list.
11623         (decomp_nextvcn): Moved to ntfscomp.c.
11624         (decomp_getch): Likewise.
11625         (decomp_get16): Likewise.
11626         (decomp_block): Likewise.
11627         (read_block): Likewise.
11628         (read_data): Partially moved to ntfscomp.c.
11629         (fixup): Change unsigned to grub_uint16_t.
11630         (read_mft): Change unsigned long to grub_uint32_t.
11631         (read_attr): Likewise.
11632         (read_data): Likewise.
11633         (read_run_data): Likewise.
11634         (read_run_list): Likewise.
11635         (read_mft): Likewise.
11637         * fs/ntfscomp.c: New file.
11639         * include/grub/ntfs.h: New file.
11641 2007-12-16  Robert Millan  <rmh@aybabtu.com>
11643         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
11644         IDE disk check, since Linux is known to support 20 IDE disks.
11645         Reported by Colin Watson.
11647 2007-12-15  Bean  <bean123ch@gmail.com>
11649         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
11650         (lnxboot_img_SOURCES): New variable.
11651         (lnxboot_img_ASFLAGS): Likewise.
11652         (lnxboot_img_LDFLAGS): Likewise.
11654         * boot/i386/pc/lnxboot.S: New file.
11656 2007-11-24  Pavel Roskin  <proski@gnu.org>
11658         * configure.ac: Test if '--build-id=none' is supported by the
11659         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
11660         objcopy to generate incorrect binary files (binutils
11661         2.17.50.0.18-1 as shipped by Fedora 8).
11662         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
11663         linking, so that build ID doesn't break the test.
11665 2007-11-24  Pavel Roskin  <proski@gnu.org>
11667         * include/grub/i386/time.h: use "void" in the argument list
11668         of grub_cpu_idle().
11669         * include/grub/powerpc/time.h: Likewise.
11670         * include/grub/sparc64/time.h: Likewise.
11672 2007-11-18  Christian Franke  <franke@computer.org>
11674         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
11675         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
11676         This fixes the problem that function keys did not work in grub-emu.
11678 2007-11-18  Christian Franke  <franke@computer.org>
11680         * disk/host.c (grub_host_open): Remove attribute unused from
11681         name parameter. Add check for "host". This fixes the problem
11682         that grub-emu does not find partitions.
11684 2007-11-18  Christian Franke  <franke@computer.org>
11686         * util/hostfs.c (is_dir): New function.
11687         (grub_hostfs_dir):  Handle missing dirent.d_type case.
11688         (grub_hostfs_read): Add missing fseek().
11689         (grub_hostfs_label): Clear label pointer.  This fixes a crash
11690         of grub-emu on "ls (host)".
11692 2007-11-18  Christian Franke  <franke@computer.org>
11694         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
11695         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
11696         to 64 bit boundary by default.
11698 2007-11-18  Bean  <bean123ch@gmail.com>
11700         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
11701         (hexdump_mod_SOURCES): New variable.
11702         (hexdump_mod_CFLAGS): Likewise.
11703         (hexdump_mod_LDFLAGS): Likewise.
11705         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11707         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11709         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11711         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11713         * include/grub/hexdump.h: New file.
11715         * commands/hexdump.c: New file.
11717 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11719         * commands/i386/pc/play.c (beep_off): Switch order of arguments
11720         in grub_outb() calls.
11721         (beep_on): Likewise.
11723 2007-11-10  Christian Franke  <franke@computer.org>
11725         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
11726         (grub_menu_run): Likewise.
11728 2007-11-10  Robert Millan  <rmh@aybabtu.com>
11730         * include/grub/i386/efi/machine.h: New file.
11731         * include/grub/i386/linuxbios/machine.h: Likewise.
11732         * include/grub/i386/pc/machine.h: Likewise.
11733         * include/grub/powerpc/ieee1275/machine.h: Likewise.
11734         * include/grub/sparc64/ieee1275/machine.h: Likewise.
11736         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
11737         (serial_hw_io_addr): New variable.
11738         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
11739         instead of `(unsigned short *) 0x400'.
11741 2007-11-10  Bean  <bean123ch@gmail.com>
11743         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
11745 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11747         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
11748         (vga_mod_SOURCES): Added.
11749         (vga_mod_CFLAGS): Likewise.
11750         (vga_mod_LDFLAGS): Likewise.
11752         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
11753         grub_outb() calls.
11754         (set_map_mask): Likewise.
11755         (set_read_map): Likewise.
11756         (set_read_address): Likewise.
11757         (vga_font): Removed variable.
11758         (get_vga_glyph): Removed function.
11759         (invalidate_char): Likewise.
11760         (write_char): Changed to use grub_font_get_glyph() for font
11761         information.
11762         (grub_vga_putchar): Likewise.
11763         (grub_vga_getcharwidth): Likewise.
11765 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
11767         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
11768         flags.
11769         (pxeboot_img_LDFLAGS): Likewise.
11770         (diskboot_img_LDFLAGS): Likewise.
11771         (kernel_img_LDFLAGS): Likewise.
11773 2007-11-06  Robert Millan  <rmh@aybabtu.com>
11775         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
11776         in grub_outb() calls.
11777         (serial_hw_init): Likewise.
11779 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11781         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
11782         spaces.  Skip non-regular files.
11784 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11786         * kern/disk.c (grub_disk_firmware_fini)
11787         (grub_disk_firmware_is_tainted): New variables.
11789         * include/grub/disk.h (grub_disk_firmware_fini)
11790         (grub_disk_firmware_is_tainted): Likewise.
11792         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
11793         (grub_disk_biosdisk_fini): ... to here.
11794         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
11795         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
11796         is set.  Register grub_disk_biosdisk_fini() in
11797         `grub_disk_firmware_fini'.
11799         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
11800         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
11801         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
11802         to finish existing firmware disk interface.
11804         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
11805         (ata_mod_SOURCES): New variable.
11806         (ata_mod_CFLAGS): Likewise.
11807         (ata_mod_LDFLAGS): Likewise.
11809 2007-11-05  Robert Millan  <rmh@aybabtu.com>
11811         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
11812         (grub_ata_wait): Reimplement using grub_millisleep().
11814         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
11815         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
11817 2007-11-03  Marco Gerards  <marco@gnu.org>
11819         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
11820         (CRTC_ADDR_PORT): New macro.
11821         (CRTC_DATA_PORT): Likewise.
11822         (CRTC_CURSOR): Likewise.
11823         (CRTC_CURSOR_ADDR_HIGH): Likewise.
11824         (CRTC_CURSOR_ADDR_LOW): Likewise.
11825         (update_cursor): New function.
11826         (grub_console_real_putchar): Call `update_cursor'.
11827         (grub_console_gotoxy): Likewise.
11828         (grub_console_cls): Set the default color when clearing the
11829         screen.
11830         (grub_console_setcursor): Implemented.
11832 2007-11-03  Marco Gerards  <marco@gnu.org>
11834         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
11835         become activate.
11836         (grub_ata_pio_write): Likewise.
11838         (grub_atapi_identify): Wait after issuing an ATA command.
11839         (grub_atapi_packet): Likewise.
11840         (grub_ata_identify): Likewise.
11841         (grub_ata_readwrite): Likewise.
11843 2007-11-03  Marco Gerards  <marco@gnu.org>
11845         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
11846         (grub_ata_pio_write): Likewise.
11847         (grub_ata_readwrite): Use `grub_error', instead of
11848         returning `grub_errno'.
11850 2007-11-03  Marco Gerards  <marco@gnu.org>
11852         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
11853         grub_ata_pio_write once for every single sector, instead of for
11854         multiple sectors.
11856 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11858         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
11860         * conf/i386-linuxbios.rmk: New file.
11862         * kern/i386/pc/hardware.c: Likewise.
11863         * term/i386/pc/at_keyboard.c: Likewise.
11864         * term/i386/pc/vga_text.c: Likewise.
11866         * include/grub/i386/linuxbios/boot.h: Likewise.
11867         * include/grub/i386/linuxbios/console.h: Likewise.
11868         * include/grub/i386/linuxbios/init.h: Likewise.
11869         * include/grub/i386/linuxbios/kernel.h: Likewise.
11870         * include/grub/i386/linuxbios/loader.h: Likewise.
11871         * include/grub/i386/linuxbios/memory.h: Likewise.
11872         * include/grub/i386/linuxbios/serial.h: Likewise.
11873         * include/grub/i386/linuxbios/time.h: Likewise.
11875         * kern/i386/linuxbios/init.c: Likewise.
11876         * kern/i386/linuxbios/startup.S: Likewise.
11877         * kern/i386/linuxbios/table.c: Likewise.
11879 2007-10-31  Marco Gerards  <marco@gnu.org>
11881         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
11882         (ata_mod_SOURCES): New variable.
11883         (ata_mod_CFLAGS): Likewise.
11884         (ata_mod_LDFLAGS): Likewise.
11886         * disk/ata.c: New file.
11888         * include/grub/disk.h (grub_disk_dev_id): Add
11889         `GRUB_DISK_DEV_ATA_ID'.
11891 2007-10-31  Robert Millan  <rmh@aybabtu.com>
11893         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
11894         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
11896         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
11897         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
11899         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
11900         `<grub/types.h>'.
11902         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
11904 2007-10-27  Robert Millan  <rmh@aybabtu.com>
11906         * include/grub/types.h (ULONG_MAX): Define macro.
11908 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11910         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
11911         `"../realmode.S"'.
11912         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
11914 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11916         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
11917         (pkgdata_MODULES): Add `biosdisk.mod'.
11918         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
11919         variables.
11921         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
11922         (grub_biosdisk_init): Replace with ...
11923         (GRUB_MOD_INIT(biosdisk)): ... this.
11924         (grub_biosdisk_fini): Replace with ...
11925         (GRUB_MOD_FINI(biosdisk)): ... this.
11927         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
11928         (grub_machine_init): Remove call to grub_biosdisk_init().
11929         (grub_machine_fini): Remove call to grub_machine_fini().
11931         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
11933 2007-10-22  Robert Millan  <rmh@aybabtu.com>
11935         * include/grub/time.h: New file.
11936         * include/grub/i386/time.h: Likewise.
11937         * include/grub/powerpc/time.h: Likewise.
11938         * include/grub/sparc64/time.h: Likewise.
11940         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
11941         instances to ...
11942         (KERNEL_MACHINE_TIME_HEADER): ... this.
11943         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11944         instances to ...
11945         (KERNEL_MACHINE_TIME_HEADER): ... this.
11946         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11947         instances to ...
11948         (KERNEL_MACHINE_TIME_HEADER): ... this.
11950         * kern/i386/efi/init.c: Include `<grub/time.h>'.
11951         (grub_millisleep): New function.
11952         * kern/i386/pc/init.c: Include `<grub/time.h>'.
11953         (grub_millisleep): New function.
11954         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
11955         Remove `grub/machine/time.h' include.
11956         (grub_millisleep): New function.
11957         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
11958         Remove `grub/machine/time.h' include.
11959         (grub_millisleep): New function.
11961         * include/grub/misc.h (grub_div_roundup): New function.
11963         * kern/misc.c: Include `<grub/time.h>'.
11964         (grub_millisleep_generic): New function.
11966         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
11967         Add `time.h'.
11968         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
11969         Add `time.h'.
11970         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
11971         `machine/time.h'.  Add `time.h'.
11972         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11974 2007-10-21  Robert Millan  <rmh@aybabtu.com>
11976         * include/grub/misc.h (grub_max): New function.
11978 2007-10-21  Robert Millan  <rmh@aybabtu.com>
11980         * util/misc.c (grub_util_info): Call fflush() before returning.
11982 2007-10-20  Robert Millan  <rmh@aybabtu.com>
11984         * genmk.rb (Image): Copy `extra_flags' from here ...
11985         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
11987         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
11988         to `argc' and `args' arguments.
11990 2007-10-17  Robert Millan  <rmh@aybabtu.com>
11992         * kern/i386/loader.S: New file.
11994         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
11995         * kern/i386/loader.S (grub_linux_prot_size)... to here.
11996         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
11997         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
11998         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
11999         * kern/i386/loader.S (grub_linux_real_addr)... to here.
12000         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
12001         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
12002         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
12003         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
12004         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
12005         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
12006         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
12007         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
12009         * kern/i386/realmode.S: New file.
12011         * kern/i386/pc/startup.S (protstack): Moved from here ...
12012         * kern/i386/realmode.S (protstack)... to here.
12013         * kern/i386/pc/startup.S (gdt): Moved from here ...
12014         * kern/i386/realmode.S (gdt)... to here.
12015         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
12016         * kern/i386/realmode.S (prot_to_real)... to here.
12018         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
12019         `kern/i386/realmode.S'.
12021 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12023         * include/grub/i386/loader.h: New file.
12025         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
12026         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12027         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12028         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12029         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
12030         * include/grub/i386/loader.h (grub_linux_prot_size)
12031         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12032         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12033         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12034         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
12036         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
12038 2007-10-15  Robert Millan  <rmh@aybabtu.com>
12040         * normal/misc.c (grub_normal_print_device_info): Do not probe for
12041         filesystem when dev->disk is unset.
12042         Do probe for filesystem even when dev->disk->has_partitions is set.
12043         In case a filesystem is found, always report it.
12044         In case it isn't, if dev->disk->has_partitions is set, report that
12045         a partition table was found instead of reporting that no filesystem
12046         could be identified.
12048 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12050         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
12051         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
12053         * include/grub/types.h (grub_host_to_target16): New macro.
12054         (grub_host_to_target32): Likewise.
12055         (grub_host_to_target64): Likewise.
12056         (grub_target_to_host16): Likewise.
12057         (grub_target_to_host32): Likewise.
12058         (grub_target_to_host64): Likewise.
12060         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12061         Renamed from to ...
12062         (GRUB_MOD_ALIGN): ...this.  Update all users.
12064         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
12065         grub_host_to_target32.
12066         Replace grub_be_to_cpu32 with grub_target_to_host32.
12067         (load_modules): Likewise.
12068         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
12069         Replace grub_be_to_cpu32 with grub_target_to_host32.
12070         Replace grub_cpu_to_be16 with grub_host_to_target16.
12071         Replace grub_cpu_to_be32 grub_host_to_target32.
12073 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12075         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
12076         * util/elf/grub-mkimage.c: ... here.
12078         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
12079         `util/powerpc/ieee1275/grub-mkimage.c'.
12081 2007-10-07  Robert Millan  <rmh@aybabtu.com>
12083         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
12084         and make it easier to figure out.
12085         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
12086         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
12087         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
12088         leave us with less than HEAP_MIN_SIZE total heap.
12089         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
12091 2007-10-03  Robert Millan  <rmh@aybabtu.com>
12093         * include/grub/i386/io.h: New file.
12094         * commands/i386/pc/play.c (inb): Removed.
12095         (outb): Removed.
12096         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12097         with grub_outb().
12098         * term/i386/pc/serial.c  (inb): Removed.
12099         (outb): Removed.
12100         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12101         with grub_outb().
12102         * term/i386/pc/vga.c  (inb): Removed.
12103         (outb): Removed.
12104         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12105         with grub_outb().
12107 2007-10-02  Robert Millan  <rmh@aybabtu.com>
12109         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
12110         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12111         Reported by Marcin Kurek.
12113 2007-09-07  Robert Millan  <rmh@aybabtu.com>
12115         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
12116         SmartFirmware version updates (as released by Sven Luther), and avoid
12117         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
12118         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
12119         known broken.
12121 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12123         From Hitoshi Ozeki:
12124         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
12125         when merging two regions.
12127 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12129         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
12130         * normal/completion.c (grub_normal_do_completion): Likewise.
12131         Reported by Hitoshi Ozeki.
12133 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12135         Do not use devices at boot in chainloading.
12137         * loader/i386/pc/chainloader.c (boot_drive): New variable.
12138         (boot_part_addr): Likewise.
12139         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
12140         with BOOT_DRIVE and BOOT_PART_ADDR.
12141         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
12142         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
12144 2007-08-29  Robert Millan  <rmh@aybabtu.com>
12146         Patch from Simon Peter <dn.tlp@gmx.net>:
12147         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
12148         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
12149         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
12150         util/i386/pc/grub-setup.c_DEPENDENCIES.
12151         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
12152         util/grub-probe.c_DEPENDENCIES.
12153         * conf/powerpc-ieee1275.rmk: Likewise.
12155 2007-08-28  Robert Millan  <rmh@aybabtu.com>
12157         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
12158         to tell grub-mkdevicemap how to name devices.
12159         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
12160         feature).
12162         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
12163         util/i386/get_disk_name.c.
12164         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
12165         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
12166         util/ieee1275/get_disk_name.c.
12168         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
12170         * DISTLIST: Add util/i386/get_disk_name.c and
12171         util/ieee1275/get_disk_name.c.
12173         * util/grub-mkdevicemap.c: Replace device naming logic with
12174         grub_util_get_disk_name() calls.
12176 2007-08-20  Robert Millan  <rmh@aybabtu.com>
12178         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
12179         (so that it works for both plural and singular quantities).
12181 2007-08-05  Robert Millan  <rmh@aybabtu.com>
12183         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
12184         so that [xz] isn't taken into account when determining order.
12186 2007-08-02  Marco Gerards  <marco@gnu.org>
12188         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
12189         `include/multiboot2.h', `include/grub/elfload.h',
12190         `include/multiboot.h', `include/grub/multiboot.h',
12191         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
12192         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
12193         `kern/elf.c', `loader/multiboot_loader.c',
12194         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
12195         `loader/i386/pc/multiboot2.c',
12196         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
12197         `util/i386/pc/grub-mkrescue.in'.  Remove
12198         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
12199         `include/grub/i386/pc/util/biosdisk.h' and
12200         `include/grub/powerpc/ieee1275/multiboot.h'.
12202 2007-08-02  Bean  <bean123ch@gmail.com>
12204         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
12205         (ntfs_mod_SOURCES): New variable.
12206         (ntfs_mod_CFLAGS): Likewise.
12207         (ntfs_mod_LDFLAGS): Likewise.
12209         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
12210         (grub_probe_SOURCES): Likewise.
12211         (grub_emu_SOURCES): Likewise.
12213         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12214         (grub_emu_SOURCES): Likewise.
12216         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12217         (grub_emu_SOURCES): Likewise.
12219         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
12221         * fs/ntfs.c: New file.
12223 2007-08-02  Bean  <bean123ch@gmail.com>
12225         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
12227         * file.h (grub_file): Likewise.
12229         * fshelp.h (grub_fshelp_read_file): Likewise.
12231         * util/i386/pc/grub-setup.c (setup): Likewise.
12232         (save_first_sector): Likewise.
12233         (save_blocklists): Likewise.
12235         * fs/affs.c (grub_affs_read_file): Likewise.
12237         * fs/ext2.c (grub_ext2_read_file): Likewise.
12239         * fs/fat.c (grub_fat_read_data): Likewise.
12241         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
12243         * fs/hfs.c (grub_hfs_read_file): Likewise.
12245         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12247         * fs/jfs.c (grub_jfs_read_file): Likewise.
12249         * fs/minix.c (grub_minix_read_file): Likewise.
12251         * fs/sfs.c (grub_sfs_read_file): Likewise.
12253         * fs/ufs.c (grub_ufs_read_file): Likewise.
12255         * fs/xfs.c (grub_xfs_read_file): Likewise.
12257         * command/blocklist.c (read_blocklist): Likewise.
12258         (print_blocklist): Likewise.
12260 2007-08-02  Marco Gerards  <marco@gnu.org>
12262         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
12263         `util/hostfs.c'.
12265         * disk/host.c: New file.
12267         * util/hostfs.c: Likewise.
12269         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
12270         return `GRUB_ERR_BAD_FS'.
12271         * fs/sfs.c (grub_sfs_mount): Likewise.
12272         * fs/xfs.c (grub_xfs_mount): Likewise.
12274         * include/grub/disk.h (enum grub_disk_dev_id): Add
12275         `GRUB_DISK_DEVICE_HOST_ID'.
12277         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
12279 2007-07-24  Jerone Young  <jerone@gmail.com>
12281         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
12282         modules for compilation.
12283         * conf/powerpc-ieee1275.rmk: Likewise.
12285         * include/multiboot.h: Move multiboot definitions to one file. Rename
12286         many definitions to not get grub specific.
12287         * include/multiboot2.h: Create header with multiboot 2 definitions.
12288         * include/grub/multiboot.h: Header for grub specific function
12289         prototypes and definitions.
12290         * include/grub/multiboot2.h: Likewise.
12291         * include/grub/multiboot_loader.h: Likewise.
12292         * include/grub/i386/pc/multiboot.h: Removed.
12293         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
12295         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
12296         and 2 to allow for one multiboot and module commands.
12297         * loader/multiboot2.c: Add multiboot2 functionality.
12298         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
12299         and definition names.
12300         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
12301         2 functions.
12302         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
12303         ieee1275 specific multiboot2 code.
12305         * kern/i386/pc/startup.S: Change headers and definition names for
12306         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
12308 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12310         * geninitheader.sh: Process file specified in first parameter rather
12311         than hardcoding grub_modules_init.lst.
12312         * geninit.sh: Likewise.  Also, construct header name dynamically rather
12313         than hardcoding grub_modules_init.h.
12315         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
12316         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
12317         grub_probe_init.[ch] and grub_setup_init.[ch].
12319         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
12320         grub_modules_init.h with grub_emu_init.h.
12321         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
12322         grub_probe_init.[ch] files.
12323         * conf/i386-efi.rmk: Likewise.
12324         * conf/i386-pc.rmk: Likewise.
12325         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
12326         grub_setup_init.[ch] files.
12328         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
12329         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
12330         to initialize modules rather than a list of hardcoded functions.
12331         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
12332         grub_init_all() to initialize modules rather than a list of hardcoded
12333         functions.
12335 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12337         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
12338         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
12340 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12342         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12343         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
12344         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
12345         flag when running on SmartFirmware.
12346         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
12347         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
12348         was set.
12350         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12351         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
12352         rather than decreasing it.
12354         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
12355         there's not enough space to do it, fail in the same way as when it
12356         can't be done because there are no partitions.
12358         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
12359         when nvsetenv failed.
12361 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12363         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
12364         because this rule is automatically generated.
12365         (grub-mkrescue): Removed for the same reason as above.
12367 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12369         Migrate to GNU General Public License Version 3.
12371         * COPYING: Replaced with the plain text version of GPLv3.
12373         * config.guess: Updated from gnulib.
12374         * config.sub: Likewise.
12376         * geninit.sh: Output a GPLv3 copyright notice.
12377         * geninitheader.sh: Likewise.
12378         * genmodsrc.sh: Likewise.
12379         * gensymlist.sh.in: Likewise.
12381         * boot/i386/pc/boot.S: Upgraded to GPLv3.
12382         * boot/i386/pc/diskboot.S: Likewise.
12383         * boot/i386/pc/pxeboot.S: Likewise.
12384         * commands/blocklist.c: Likewise.
12385         * commands/boot.c: Likewise.
12386         * commands/cat.c: Likewise.
12387         * commands/cmp.c: Likewise.
12388         * commands/configfile.c: Likewise.
12389         * commands/echo.c: Likewise.
12390         * commands/help.c: Likewise.
12391         * commands/ls.c: Likewise.
12392         * commands/search.c: Likewise.
12393         * commands/terminal.c: Likewise.
12394         * commands/test.c: Likewise.
12395         * commands/videotest.c: Likewise.
12396         * commands/i386/cpuid.c: Likewise.
12397         * commands/i386/pc/halt.c: Likewise.
12398         * commands/i386/pc/play.c: Likewise.
12399         * commands/i386/pc/reboot.c: Likewise.
12400         * commands/i386/pc/vbeinfo.c: Likewise.
12401         * commands/i386/pc/vbetest.c: Likewise.
12402         * commands/ieee1275/halt.c: Likewise.
12403         * commands/ieee1275/reboot.c: Likewise.
12404         * commands/ieee1275/suspend.c: Likewise.
12405         * disk/loopback.c: Likewise.
12406         * disk/lvm.c: Likewise.
12407         * disk/raid.c: Likewise.
12408         * disk/efi/efidisk.c: Likewise.
12409         * disk/i386/pc/biosdisk.c: Likewise.
12410         * disk/ieee1275/ofdisk.c: Likewise.
12411         * font/manager.c: Likewise.
12412         * fs/affs.c: Likewise.
12413         * fs/ext2.c: Likewise.
12414         * fs/fat.c: Likewise.
12415         * fs/fshelp.c: Likewise.
12416         * fs/hfs.c: Likewise.
12417         * fs/hfsplus.c: Likewise.
12418         * fs/iso9660.c: Likewise.
12419         * fs/jfs.c: Likewise.
12420         * fs/minix.c: Likewise.
12421         * fs/sfs.c: Likewise.
12422         * fs/ufs.c: Likewise.
12423         * fs/xfs.c: Likewise.
12424         * hello/hello.c: Likewise.
12425         * include/grub/acorn_filecore.h: Likewise.
12426         * include/grub/arg.h: Likewise.
12427         * include/grub/bitmap.h: Likewise.
12428         * include/grub/boot.h: Likewise.
12429         * include/grub/cache.h: Likewise.
12430         * include/grub/device.h: Likewise.
12431         * include/grub/disk.h: Likewise.
12432         * include/grub/dl.h: Likewise.
12433         * include/grub/elfload.h: Likewise.
12434         * include/grub/env.h: Likewise.
12435         * include/grub/err.h: Likewise.
12436         * include/grub/file.h: Likewise.
12437         * include/grub/font.h: Likewise.
12438         * include/grub/fs.h: Likewise.
12439         * include/grub/fshelp.h: Likewise.
12440         * include/grub/gzio.h: Likewise.
12441         * include/grub/hfs.h: Likewise.
12442         * include/grub/kernel.h: Likewise.
12443         * include/grub/loader.h: Likewise.
12444         * include/grub/lvm.h: Likewise.
12445         * include/grub/misc.h: Likewise.
12446         * include/grub/mm.h: Likewise.
12447         * include/grub/net.h: Likewise.
12448         * include/grub/normal.h: Likewise.
12449         * include/grub/parser.h: Likewise.
12450         * include/grub/partition.h: Likewise.
12451         * include/grub/pc_partition.h: Likewise.
12452         * include/grub/raid.h: Likewise.
12453         * include/grub/rescue.h: Likewise.
12454         * include/grub/script.h: Likewise.
12455         * include/grub/setjmp.h: Likewise.
12456         * include/grub/symbol.h: Likewise.
12457         * include/grub/term.h: Likewise.
12458         * include/grub/terminfo.h: Likewise.
12459         * include/grub/tparm.h: Likewise.
12460         * include/grub/types.h: Likewise.
12461         * include/grub/video.h: Likewise.
12462         * include/grub/efi/api.h: Likewise.
12463         * include/grub/efi/chainloader.h: Likewise.
12464         * include/grub/efi/console.h: Likewise.
12465         * include/grub/efi/console_control.h: Likewise.
12466         * include/grub/efi/disk.h: Likewise.
12467         * include/grub/efi/efi.h: Likewise.
12468         * include/grub/efi/pe32.h: Likewise.
12469         * include/grub/efi/time.h: Likewise.
12470         * include/grub/i386/linux.h: Likewise.
12471         * include/grub/i386/setjmp.h: Likewise.
12472         * include/grub/i386/types.h: Likewise.
12473         * include/grub/i386/efi/kernel.h: Likewise.
12474         * include/grub/i386/efi/loader.h: Likewise.
12475         * include/grub/i386/efi/time.h: Likewise.
12476         * include/grub/i386/pc/biosdisk.h: Likewise.
12477         * include/grub/i386/pc/boot.h: Likewise.
12478         * include/grub/i386/pc/chainloader.h: Likewise.
12479         * include/grub/i386/pc/console.h: Likewise.
12480         * include/grub/i386/pc/init.h: Likewise.
12481         * include/grub/i386/pc/kernel.h: Likewise.
12482         * include/grub/i386/pc/loader.h: Likewise.
12483         * include/grub/i386/pc/memory.h: Likewise.
12484         * include/grub/i386/pc/multiboot.h: Likewise.
12485         * include/grub/i386/pc/serial.h: Likewise.
12486         * include/grub/i386/pc/time.h: Likewise.
12487         * include/grub/i386/pc/vbe.h: Likewise.
12488         * include/grub/i386/pc/vbeblit.h: Likewise.
12489         * include/grub/i386/pc/vbefill.h: Likewise.
12490         * include/grub/i386/pc/vbeutil.h: Likewise.
12491         * include/grub/i386/pc/vga.h: Likewise.
12492         * include/grub/ieee1275/ieee1275.h: Likewise.
12493         * include/grub/ieee1275/ofdisk.h: Likewise.
12494         * include/grub/powerpc/libgcc.h: Likewise.
12495         * include/grub/powerpc/setjmp.h: Likewise.
12496         * include/grub/powerpc/types.h: Likewise.
12497         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
12498         * include/grub/powerpc/ieee1275/console.h: Likewise.
12499         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
12500         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
12501         * include/grub/powerpc/ieee1275/loader.h: Likewise.
12502         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
12503         * include/grub/powerpc/ieee1275/time.h: Likewise.
12504         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
12505         * include/grub/sparc64/libgcc.h: Likewise.
12506         * include/grub/sparc64/setjmp.h: Likewise.
12507         * include/grub/sparc64/types.h: Likewise.
12508         * include/grub/sparc64/ieee1275/console.h: Likewise.
12509         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12510         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12511         * include/grub/sparc64/ieee1275/time.h: Likewise.
12512         * include/grub/util/biosdisk.h: Likewise.
12513         * include/grub/util/getroot.h: Likewise.
12514         * include/grub/util/lvm.h: Likewise.
12515         * include/grub/util/misc.h: Likewise.
12516         * include/grub/util/raid.h: Likewise.
12517         * include/grub/util/resolve.h: Likewise.
12518         * io/gzio.c: Likewise.
12519         * kern/device.c: Likewise.
12520         * kern/disk.c: Likewise.
12521         * kern/dl.c: Likewise.
12522         * kern/elf.c: Likewise.
12523         * kern/env.c: Likewise.
12524         * kern/err.c: Likewise.
12525         * kern/file.c: Likewise.
12526         * kern/fs.c: Likewise.
12527         * kern/loader.c: Likewise.
12528         * kern/main.c: Likewise.
12529         * kern/misc.c: Likewise.
12530         * kern/mm.c: Likewise.
12531         * kern/parser.c: Likewise.
12532         * kern/partition.c: Likewise.
12533         * kern/rescue.c: Likewise.
12534         * kern/term.c: Likewise.
12535         * kern/efi/efi.c: Likewise.
12536         * kern/efi/init.c: Likewise.
12537         * kern/efi/mm.c: Likewise.
12538         * kern/i386/dl.c: Likewise.
12539         * kern/i386/efi/init.c: Likewise.
12540         * kern/i386/efi/startup.S: Likewise.
12541         * kern/i386/pc/init.c: Likewise.
12542         * kern/i386/pc/lzo1x.S: Likewise.
12543         * kern/i386/pc/startup.S: Likewise.
12544         * kern/ieee1275/ieee1275.c: Likewise.
12545         * kern/powerpc/cache.S: Likewise.
12546         * kern/powerpc/dl.c: Likewise.
12547         * kern/powerpc/ieee1275/cmain.c: Likewise.
12548         * kern/powerpc/ieee1275/crt0.S: Likewise.
12549         * kern/powerpc/ieee1275/init.c: Likewise.
12550         * kern/powerpc/ieee1275/openfw.c: Likewise.
12551         * kern/sparc64/cache.S: Likewise.
12552         * kern/sparc64/dl.c: Likewise.
12553         * kern/sparc64/ieee1275/init.c: Likewise.
12554         * kern/sparc64/ieee1275/openfw.c: Likewise.
12555         * loader/efi/chainloader.c: Likewise.
12556         * loader/efi/chainloader_normal.c: Likewise.
12557         * loader/i386/efi/linux.c: Likewise.
12558         * loader/i386/efi/linux_normal.c: Likewise.
12559         * loader/i386/pc/chainloader.c: Likewise.
12560         * loader/i386/pc/chainloader_normal.c: Likewise.
12561         * loader/i386/pc/linux.c: Likewise.
12562         * loader/i386/pc/linux_normal.c: Likewise.
12563         * loader/i386/pc/multiboot.c: Likewise.
12564         * loader/i386/pc/multiboot_normal.c: Likewise.
12565         * loader/powerpc/ieee1275/linux.c: Likewise.
12566         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12567         * normal/arg.c: Likewise.
12568         * normal/cmdline.c: Likewise.
12569         * normal/command.c: Likewise.
12570         * normal/completion.c: Likewise.
12571         * normal/execute.c: Likewise.
12572         * normal/function.c: Likewise.
12573         * normal/lexer.c: Likewise.
12574         * normal/main.c: Likewise.
12575         * normal/menu.c: Likewise.
12576         * normal/menu_entry.c: Likewise.
12577         * normal/misc.c: Likewise.
12578         * normal/parser.y: Likewise.
12579         * normal/script.c: Likewise.
12580         * normal/i386/setjmp.S: Likewise.
12581         * normal/powerpc/setjmp.S: Likewise.
12582         * normal/sparc64/setjmp.S: Likewise.
12583         * partmap/acorn.c: Likewise.
12584         * partmap/amiga.c: Likewise.
12585         * partmap/apple.c: Likewise.
12586         * partmap/gpt.c: Likewise.
12587         * partmap/pc.c: Likewise.
12588         * partmap/sun.c: Likewise.
12589         * term/gfxterm.c: Likewise.
12590         * term/terminfo.c: Likewise.
12591         * term/efi/console.c: Likewise.
12592         * term/i386/pc/console.c: Likewise.
12593         * term/i386/pc/serial.c: Likewise.
12594         * term/i386/pc/vesafb.c: Likewise.
12595         * term/i386/pc/vga.c: Likewise.
12596         * term/ieee1275/ofconsole.c: Likewise.
12597         * util/biosdisk.c: Likewise.
12598         * util/console.c: Likewise.
12599         * util/genmoddep.c: Likewise.
12600         * util/getroot.c: Likewise.
12601         * util/grub-emu.c: Likewise.
12602         * util/grub-mkdevicemap.c: Likewise.
12603         * util/grub-probe.c: Likewise.
12604         * util/lvm.c: Likewise.
12605         * util/misc.c: Likewise.
12606         * util/raid.c: Likewise.
12607         * util/resolve.c: Likewise.
12608         * util/update-grub.in: Likewise.
12609         * util/update-grub_lib.in: Likewise.
12610         * util/grub.d/00_header.in: Likewise.
12611         * util/grub.d/10_hurd.in: Likewise.
12612         * util/grub.d/10_linux.in: Likewise.
12613         * util/i386/efi/grub-install.in: Likewise.
12614         * util/i386/efi/grub-mkimage.c: Likewise.
12615         * util/i386/pc/grub-install.in: Likewise.
12616         * util/i386/pc/grub-mkimage.c: Likewise.
12617         * util/i386/pc/grub-mkrescue.in: Likewise.
12618         * util/i386/pc/grub-setup.c: Likewise.
12619         * util/i386/pc/misc.c: Likewise.
12620         * util/powerpc/ieee1275/grub-install.in: Likewise.
12621         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
12622         * util/powerpc/ieee1275/misc.c: Likewise.
12623         * video/bitmap.c: Likewise.
12624         * video/video.c: Likewise.
12625         * video/i386/pc/vbe.c: Likewise.
12626         * video/i386/pc/vbeblit.c: Likewise.
12627         * video/i386/pc/vbefill.c: Likewise.
12628         * video/i386/pc/vbeutil.c: Likewise.
12629         * video/readers/tga.c: Likewise.
12631 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12633         * conf/i386-efi.rmk: Replace obsolete reference to
12634         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
12635         with util/getroot.c.
12636         * conf/powerpc-ieee1275.rmk: Likewise.
12637         * conf/sparc64-ieee1275.rmk: Likewise.
12639         * util/grub-emu.c (main): Fix unchecked pointer handling.
12641 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12643         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
12644         invocation to fail, in order to support partition-less media.
12646         * util/i386/pc/grub-install.in: Likewise.
12648         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
12649         which fs or partmap modules are needed (akin to its sister scripts).
12651         Also use grub-probe to get rid of unportable /proc/mounts check.
12653         Print the same informational message that the other scripts do, before
12654         exiting.
12656 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12658         * util/update-grub_lib.in (font_path): New function.  Determine whether
12659         a font file can be found and, if so, echo the GRUB path to it.
12661         * util/update-grub.in: Handle multiple terminals depending on user
12662         input, platform availability and font file presence.  Propagate
12663         variables of our findings to /etc/grub.d/ children.
12665         * util/grub.d/00_header.in: Handle multiple terminals, based on
12666         environment setup by update-grub.
12668 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12670         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
12672 2007-06-21  Robert Millan  <rmh@aybabtu.com>
12674         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
12675         indicate end of data section in kernel image.
12676         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
12677         GRUB_KERNEL_MACHINE_DATA_END.
12679         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
12680         space for it.
12681         * kern/i386/efi/startup.S: Likewise.
12683         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
12684         during image generation.  Implement --prefix option to override this
12685         patch.
12686         * util/i386/efi/grub-mkimage.c: Likewise.
12688         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
12689         code to make path relative to its root into a separate function.
12691         * util/i386/pc/grub-install.in: Use newly provided
12692         make_system_path_relative_to_its_root() to convert ${grubdir}, then
12693         pass the result to grub-install --prefix.
12695 2007-06-13  Robert Millan  <rmh@aybabtu.com>
12697         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
12698         DEFAULT_DEVICE_MAP.
12699         * util/grub-emu.c: Use above definitions from misc.h instead of
12700         defining them.
12701         * util/grub-mkdevicemap.c: Likewise.
12702         * util/i386/pc/grub-setup.c: Likewise.
12703         * util/grub-probe.c: Likewise.
12704         (probe): Abort with grub_util_error() when either
12705         grub_guess_root_device or grub_util_get_grub_dev fails.
12707 2007-06-12  Robert Millan  <rmh@aybabtu.com>
12709         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
12710         "pager" assignment.
12711         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
12712         "pcdata".
12713         * util/grub-probe.c (probe): Likewise for "drive_name".
12715 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12717         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
12718         not just the cdrom one.
12720 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12722         * util/i386/pc/grub-mkrescue.in: Add "set -e".
12723         Add --pkglibdir=DIR option to override pkglibdir.
12724         Mention --image-type=TYPE in help output.
12725         Fix --grub-mkimage (it was a no-op).
12726         Abort gracefully when no parameter is given.
12728 2007-06-11  Robert Millan  <rmh@aybabtu.com>
12730         * util/i386/pc/grub-mkrescue.in: New file.
12731         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
12732         * Makefile.in: Handle bin_SCRIPTS.
12734 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
12736         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
12737         list of video modes.
12739 2007-06-06  Robert Millan  <rmh@aybabtu.com>
12741         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
12742         file doesn't exist, or if it is in a filesystem grub can't read.
12744         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
12745         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
12746         header comment to fit in 80 columns when the variables are resolved.
12748         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
12749         could be identified by update-grub.  Remove redundant check for
12750         unifont.pff existence (since convert_system_path_to_grub_path now
12751         handles that).
12753 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12755         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
12757         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
12759         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
12761 2007-06-04  Robert Millan  <rmh@aybabtu.com>
12763         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
12765         * include/grub/partition.h: Declare grub_apple_partition_map_init and
12766         grub_apple_partition_map_fini.
12768         * util/biosdisk.c
12769         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
12770         to access >2 TiB disks).
12772         Print disk->total_sectors with %llu instead of %lu, since this
12773         variable is always 64-bit (prevents wrong disk size from being displayed
12774         on either >2 TiB disk or big-endian CPU).
12776         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
12777         into a generic case that supports all (sane) partition maps.
12779         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
12780         breaks big-endian.
12782         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
12783         and grub_apple_partition_map_fini() after that.
12785 2007-06-01  Robert Millan  <rmh@aybabtu.com>
12787         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
12789         * util/grub.d/00_header.in: Only enable gfxterm when
12790         convert_system_path_to_grub_path() succeeds.
12792 2007-05-20  Robert Millan  <rmh@aybabtu.com>
12794         * util/update-grub_lib.in: New file.
12795         * DISTLIST: Add update-grub_lib.in.
12796         * conf/common.rmk: Generate update-grub_lib and install it in
12797         $(lib_DATA).
12798         * Makefile.in: Add install routine for $(lib_DATA).
12800         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
12801         function provided by update-grub_lib to support arbitrary paths of
12802         unifont.pff.
12803         * util/update-grub.in: Use convert_system_path_to_grub_path() to
12804         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
12806 2007-05-19  Robert Millan  <rmh@aybabtu.com>
12808         * commands/i386/cpuid.c: New module.
12809         * DISTLIST: Add it.
12810         * conf/i386-efi.rmk: Enable cpuid.mod.
12811         * conf/i386-pc.rmk: Likewise.
12813 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12815         * kern/disk.c (grub_disk_read): Check return value of
12816         grub_realloc().
12818 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
12820         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
12821         arrays.
12822         * disk/raid.c (grub_raid_open): Likewise.
12824 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12826         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
12827         stack instead of on the heap.
12829         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
12830         before doing a read on it.
12832         * configure.ac: Only use -fno-stack-protector for the target
12833         environment.
12835 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
12837         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
12838         __attribute_ ((unused)) to mode_type argument.
12840         * util/getroot.c (grub_guess_root_device): Fix #endif.
12842         * kern/misc.c (memcmp): Fix prototype.
12844         * include/grub/partition.h [GRUB_UTIL]
12845         (grub_gpt_partition_map_init): Add prototype.
12846         (grub_gpt_partition_map_fini): Likewise.
12848         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
12849         at the right place.
12851         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
12852         (grub_fat_read_data): Likewise.
12853         (grub_fat_find_dir): Likewise.
12855         * font/manager.c (find_glyph): Make table a const.
12856         (grub_font_get_glyph): Remove bitmap from if statement.
12858 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
12860         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
12861         code, first search for device in /dev/mapper, then in /dev.
12862         (grub_util_get_grub_dev): New function.
12863         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
12864         prototype.
12865         * util/grub-probe.c (probe): Remove check for RAID, call
12866         grub_util_get_grub_dev() instead of
12867         grub_util_biosdisk_get_grub_dev().
12868         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
12869         grub_util_biosdisk_get_grub_dev().
12870         * util/i386/pc/grub-setup.c (main): Likewise.
12872 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12874         * DISTLIST: Update for the latest changes.
12875         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
12876         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
12877         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
12878         grub/util/biosdisk.h.
12879         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
12880         grub/util/biosdisk.h.
12882 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12884         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
12886 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12888         * util/i386/efi/grub-install.in: New.
12889         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
12890         newly added grub-install.
12891         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
12892         include.
12893         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
12894         grub/util/biosdisk.h.
12895         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
12896         grub/util/biosdisk.h.
12898 2007-05-16  Robert Millan  <rmh@aybabtu.com>
12900         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
12901         * include/grub/util/biosdisk.h: ... here.
12902         * util/i386/pc/biosdisk.c: Moved to ...
12903         * util/biosdisk.c: ... here.
12904         * util/i386/pc/getroot.c: Moved to ...
12905         * util/getroot.c: ... here.
12906         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
12907         * util/grub-mkdevicemap.c: ... here.
12908         * util/i386/pc/grub-probe.c: Moved to ...
12909         * util/grub-probe.c: ... here.
12911 2007-05-15  Robert Millan  <rmh@aybabtu.com>
12913         * util/update-grub.in: Remove duplicated line in grub.cfg header
12914         message.
12916 2007-05-13  Robert Millan  <rmh@aybabtu.com>
12918         * util/update-grub.in: Fix a few assumptions about the devices holding
12919         /, /boot and /boot/grub being the same.
12920         * util/grub.d/00_header.in: Likewise.
12921         * util/grub.d/10_hurd.in: Likewise.
12922         * util/grub.d/10_linux.in: Likewise.
12924         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
12925         patterns.  Use that to define the `.old' suffix as older than `'.
12927         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
12929         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
12930         the grub.cfg header message.
12932 2007-05-11  Robert Millan  <rmh@aybabtu.com>
12934         * util/update-grub.in: Create device.map if it doesn't already exist,
12935         before attempting to run grub-probe.
12936         Check for grub-probe and grub-mkdevicemap with the same code
12937         grub-install is using.
12938         Remove test mode.
12940 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
12942         * Makefile.in: Add the datarootdir autoconf variable.
12944 2007-05-09  Robert Millan  <rmh@aybabtu.com>
12946         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
12947         fail gracefully if dev->disk->partition == NULL.
12949 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12951         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
12952         determine partition map module.
12953         * util/i386/pc/grub-install.in: Use this feature to decide which
12954         partition module to load, instead of hardcoding pc and gpt.
12956 2007-05-07  Robert Millan  <rmh@aybabtu.com>
12958         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
12959         source directory differs from build directory.
12961 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12963         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
12964         initialisation.
12966 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12968         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
12970 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12972         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
12973         command-line arguments via ${GRUB_CMDLINE_LINUX}.
12975 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12977         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
12978         (grub_probe_SOURCES): Likewise.
12979         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
12980         GPT and initialize dos_part and bsd_part accordingly.
12981         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
12982         install_bsd_part.
12983         (main): Activate gpt module for use during partition identification,
12984         and deactivate it afterwards.
12985         * util/i386/pc/grub-install.in: Add gpt module to core.img.
12986         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
12987         partition identification, and deactivate it afterwards.
12989 2007-05-05  Robert Millan  <rmh@aybabtu.com>
12991         * term/i386/pc/console.c (grub_console_fini): Call
12992         grub_term_set_current() before grub_term_unregister().
12994 2007-05-04  Robert Millan  <rmh@aybabtu.com>
12996         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
12997         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
12998         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
12999         and update-grub_DATA.
13000         * conf/common.rmk: Build and install update-grub components.
13001         * conf/common.mk: Regenerate.
13002         * util/update-grub.in: New.  Core of update-grub.
13003         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
13004         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
13005         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
13006         * util/grub.d/README: New.  Document grub.d directory layout.
13008 2007-05-01  Robert Millan  <rmh@aybabtu.com>
13010         * util/grub-emu.c: Move initialization functions
13011         grub_util_biosdisk_init() and grub_init_all() before
13012         grub_util_biosdisk_get_grub_dev(), which relies on them.
13014 2007-04-19  Robert Millan  <rmh@aybabtu.com>
13016         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
13017         it is used later.
13019 2007-04-18  Jerone Young  <jerone@gmail.com>
13021         * kernel/elf.c: Add missing parenthesis for conditional statement
13022         stanza.
13024 2007-04-10  Jerone Young  <jerone@gmail.com>
13026         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
13027         continue on and look for device node with real device name.
13029 2007-04-10  Jerone Young  <jerone@gmail.com>
13031         * configure.ac: Add argument for autoconf to use transformation
13032         ability.
13033         * Makefile.in: Add autoconf package transformation code.
13034         * util/i386/pc/grub-install.in: Likewise.
13035         * util/powerpc/ieee1275/grub-install.in: Likewise.
13037 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
13039         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
13040         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
13041         (EXT2_REVISION): Likewise.
13042         (EXT2_INODE_SIZE): Likewise.
13043         (struct grub_ext2_block_group): Added a missing member
13044         "used_dirs".
13045         (grub_ext2_read_inode): Divide by the inode size in a superblock
13046         instead of 128 to obtain INODES_PER_BLOCK.
13047         Use the macro EXT2_INODE_SIZE instead of directly using
13048         SBLOCK->INODE_SIZE.
13050 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
13052         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
13053         superblock instead of the structure size to compute an
13054         offset. This fixes the problem that GRUB could not read a
13055         filesystem when inode size is different from 128-byte.
13057 2007-03-05  Marco Gerards  <marco@gnu.org>
13059         * normal/main.c (read_config_file): When "menu" is not set, create
13060         an initial context.
13062 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13064         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
13065         (HEAP_LIMIT): New macro.
13066         (grub_claim_heap): Claim memory up to `heaplimit'.
13068 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13070         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
13071         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
13072         (_start): Likewise.
13073         (grub_arch_modules_addr): Return address after `_end'.
13074         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
13075         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
13076         (add_segments): Calculate `_end' from phdr size and location.
13077         (ALIGN_UP): Moved to ...
13078         * include/grub/misc.h: here.
13079         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13080         New macro.
13081         (GRUB_IEEE1275_MODULE_BASE): Removed.
13083 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13085         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
13086         loop boundary.
13088 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13090         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
13091         All users updated.
13092         (grub_elf64_load_hook_t): Likewise.
13093         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
13094         debug output.
13096 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13098         * kern/mm.c: Update copyright.
13099         (grub_mm_debug): Correct syntax error.
13100         (grub_mm_dump_free): New function.
13101         (grub_debug_free): Call `grub_free'.
13102         * include/grub/mm.h: Update copyright.
13103         (grub_mm_dump_free): Add declaration.
13105 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13107         * include/grub/ieee1275/ieee1275.h: Update copyright.
13108         * kern/powerpc/ieee1275/init.c: Likewise.
13109         * kern/powerpc/ieee1275/openfw.c: Likewise.
13111         * loader/powerpc/ieee1275/linux.c: Likewise.
13112         * include/grub/elfload.h: Likewise.
13113         * kern/elf.c: Likewise.
13114         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
13115         callers.
13116         (grub_elf64_load): Likewise.
13117         (grub_elf32_load_segment): Move to a nested function.
13118         (grub_elf64_load_segment): Likewise.
13120 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13122         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
13123         prototype.
13124         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
13125         (grub_heap_len): Likewise.
13126         (HEAP_SIZE): New macro.
13127         (grub_claim_heap): New function.
13128         (grub_machine_init): Don't claim heap directly.  Call
13129         `grub_claim_heap'.
13130         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
13131         (grub_available_iterate): New function.
13133 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
13135         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
13136         * configure.ac: Use it for testing the HOST and TARGET compilers.
13138 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
13140         * Makefile.in (enable_grub_emu): New variable.
13141         * configure.ac (--enable-grub-emu): New option.
13142         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
13143         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
13144         * conf/i386-pc.rmk: Likewise.
13145         * conf/powerpc-ieee1275.rmk: Likewise.
13146         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
13148 2006-12-12  Marco Gerards  <marco@gnu.org>
13150         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
13152         * kern/env.c (grub_env_unset): Don't free the member `value' when
13153         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
13154         pointer.
13156         * normal/main.c (current_menu): Removed.
13157         (free_menu): Unset the `menu' environment variable.
13158         (grub_normal_menu_addentry): Make use of the environment variable
13159         `menu', instead of using the global `current_menu'.  Allocate
13160         memory for the sourcecode of this entry.
13161         (read_config_file): New argument `nested', changed all callers.
13162         Only in the case of a new context, initialize a new menu.  Set the
13163         `menu' environment variable.
13164         (grub_normal_execute): Don't set and unset the environment
13165         variable `menu' here anymore.  Only free the menu when leaving the
13166         context.
13168         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
13169         leak.
13171 2006-12-11  Marco Gerards  <marco@gnu.org>
13173         * normal/menu_entry.c (run): Fix off by one bug so the last line
13174         is executed.  Move the loader check to outside the loop.
13176 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
13178         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
13180 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
13182         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
13183         the number of sectors.  Reported by Andrey Shuvikov
13184         <mr_hyro@yahoo.com>.
13186 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
13188         * kern/disk.c (grub_disk_read): When there is a read error, always
13189         try to read only the necessary data.
13191         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
13192         disk/raid.c.
13193         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
13194         prototype.
13195         [GRUB_UTIL] (grub_raid_fini): Likewise.
13196         [GRUB_UTIL] (grub_lvm_init): Likewise.
13197         [GRUB_UTIL] (grub_lvm_fini): Likewise.
13198         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
13199         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
13200         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
13201         and grub_raid_fini().
13203 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13205         * include/grub/types.h (__unused): Rename to UNUSED.
13206         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
13207         (grub_elf64_size): Likewise.
13209 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13211         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
13212         grub_error_push and grub_error_pop in the error-handling path.
13213         (grub_elf32_load_segment): Only call grub_file_read with non-zero
13214         length.
13216 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13218         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
13219         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13220         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13221         (kernel_elf_SOURCES): Likewise.
13222         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
13223         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
13224         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13225         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13226         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
13227         (elf_mod_SOURCES): New variable.
13228         (elf_mod_CFLAGS): Likewise.
13229         (elf_mod_LDFLAGS): Likewise.
13230         * include/grub/types.h (__unused): New macro.
13231         * include/grub/elfload.h: New file.
13232         * kern/elf.c: Likewise.
13233         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
13234         (ELF32_LOADMASK): New macro.
13235         (ELF64_LOADMASK): Likewise.
13236         (vmlinux): Removed.
13237         (grub_linux_load32): New function.
13238         (grub_linux_load64): Likewise.
13239         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
13240         Use grub_elf_t instead of grub_file_t.
13242 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13244         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
13245         `catch_result' to struct set_color_args.
13247 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13249         * normal/menu.c: Include grub/script.h.
13250         * normal/menu_entry.c: Likewise.
13251         * include/grub/normal.h: Do not include grub/script.h.
13253 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13255         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
13257 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13259         * kern/disk.c (grub_disk_open): Print debug messages when opening a
13260         disk.
13261         (grub_disk_close): Print debug messages when closing a disk.
13262         (grub_disk_read): Print debug messages when disk read fails.
13263         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
13264         filesystem type.
13265         * kern/partition.c: Include misc.h.
13266         (grub_partition_iterate): Print debug messages when detecting
13267         partition type.
13269 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13271         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
13272         is negative.
13273         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
13275 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
13277         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13278         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
13280 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
13282         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
13283         instead of sizeof(lv). Patch by Michael Guntsche.
13285 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13287         * disk/lvm.c: Rename VGS to VG_LIST.
13288         (grub_lvm_iterate): Change VGS->LV to VG-LV.
13289         (grub_lvm_open): Likewise.
13290         Thanks to Michael Guntsche for finding this bug.
13292 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13294         * configure.ac (AC_INIT): Bumped to 1.95.
13296 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13298         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
13299         with "/dev/.static/dev/md".
13301 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13303         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
13304         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
13305         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
13306         DRIVE_NAME are always freed.
13308         * util/i386/pc/biosdisk.c (make_device_name): Add one into
13309         DOS_PART, as a DOS partition is counted from one instead of zero
13310         now. Reported by Robert Millan.
13312 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13314         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
13315         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
13316         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
13317         string returned by grub_guess_root_device.
13318         * util/i386/pc/grub-setup.c: Likewise.
13319         * util/i386/pc/grub-probefs.c: Likewise.
13321         * util/i386/pc/grub-probefs.c: Rename to ...
13322         * util/i386/pc/grub-probe.c: ... this.
13323         * DISTLIST: Remove grub-probefs, add grub-probe.
13324         * conf/i386-efi.rmk: Likewise.
13325         * conf/i386-pc.rmk: Likewise.
13326         * util/i386/pc/grub-install.in: Likewise.
13328         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
13329         choose which information we want to print.
13331 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13333         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
13334         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
13335         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
13336         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
13337         video/readers/tga.c and video/i386/pc/vbeutil.c.
13339 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
13341         Added support for RAID and LVM.
13343         * disk/lvm.c: New file.
13344         * disk/raid.c: Likewise.
13345         * include/grub/lvm.h: Likewise.
13346         * include/grub/raid.h: Likewise.
13347         * include/grub/util/lvm.h: Likewise.
13348         * include/grub/util/raid.h: Likewise.
13349         * util/lvm.c: Likewise.
13350         * util/raid.c: Likewise.
13352         * include/grub/disk.h (grub_disk_dev_id): Add
13353         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
13354         (grub_disk_get_size): New prototype.
13355         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
13356         returns a partition.
13357         (grub_disk_get_size): New function.
13359         * kern/i386/pc/init.c (make_install_device): Copy the prefix
13360         verbatim if grub_install_dos_part is -2.
13362         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
13363         and LVM devices.
13365         * util/i386/pc/grub-setup.c (setup): New argument
13366         MUST_EMBED. Force embedding of GRUB when the argument is
13367         true. Close FILE before returning.
13368         (main): Add support for RAID and LVM.
13370         * conf/common.rmk: Add RAID and LVM modules.
13371         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
13372         util/lvm.c.
13373         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
13375         * kern/misc.c (grub_strstr): New function.
13376         * include/grub/misc.h (grub_strstr): New prototype.
13378 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
13380         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
13382 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
13384         * kern/misc.c (grub_strtoull): Guess the base only if not
13385         specified.
13387 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13389         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
13390         PowerMac support.
13392 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13394         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
13396         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
13397         Remove `flags' argument.  All callers changed.
13398         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
13399         (IEEE1275_IHANDLE_INVALID): New variable.
13400         (IEEE1275_CELL_INVALID): New variable.
13401         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
13402         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
13403         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
13404         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
13405         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
13406         codes from Open Firmware.  All callers updated.
13407         (grub_ieee1275_next_property): Directly return Open Firmware return
13408         code.
13409         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
13410         Standardize error checking from `grub_ieee1275_get_property'.
13411         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
13412         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
13414 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13416         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
13417         `instance_to_package_args' to `instance_to_path_args'.
13419         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
13420         `grub_ieee1275_chosen'.
13422         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
13423         `grub_ieee1275_interpret'.
13425 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13427         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
13429 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13431         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
13432         (__cmpdi): Likewise.
13434         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
13435         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
13436         `grub_ssize_t'.
13438         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
13440         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
13441         to type `grub_ssize_t'.
13442         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
13444 2006-09-22  Marco Gerards  <marco@gnu.org>
13446         * normal/script.c (grub_script_create_cmdmenu): Skip leading
13447         newlines.
13449 2006-09-22  Marco Gerards  <marco@gnu.org>
13451         * commands/echo.c: New file.
13453         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
13455         * conf/common.rmk (echo_mod_SOURCES): New variable.
13456         (echo_mod_CFLAGS): Likewise.
13457         (echo_mod_LDFLAGS): Likewise.
13459 2006-09-22  Marco Gerards  <marco@gnu.org>
13461         * normal/main.c (get_line): Malloc memory instead of using
13462         preallocated memory.  Removed the arguments `cmdline' and
13463         `max_len'.  Updated all callers.
13465 2006-09-22  Marco Gerards  <marco@gnu.org>
13467         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
13468         (normal_mod_DEPENDENCIES): Likewise.
13470         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
13471         (normal_mod_DEPENDENCIES): Likewise.
13473         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
13475 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
13477         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
13478         programs.
13479         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
13480         (normal_mod_DEPENDENCIES): Likewise.
13481         * conf/i386-pc.mk: Regenerate.
13482         * conf/i386-efi.mk: Likewise
13483         * conf/common.mk: Likewise.
13484         * conf/powerpc-ieee1275.mk: Likewise.
13485         * conf/sparc64-ieee1275.mk: Likewise.
13487 2006-09-22  Robert Millan  <rmh@aybabtu.com>
13489         Sync with i386 version.
13490         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
13491         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
13493 2006-09-21  Robert Millan  <rmh@aybabtu.com>
13495         Import from GRUB Legacy (lib/device.c):
13496         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
13497         (init_device_map) [__linux__]: Add support for I2O devices.
13499 2006-09-14  Marco Gerards  <marco@gnu.org>
13501         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
13502         `-melf_i386'.
13504 2006-09-14  Robert Millan  <rmh@aybabtu.com>
13506         * util/i386/pc/grub-install.in: Skip menu.lst when removing
13507         /boot/grub/*.lst.
13509         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
13511         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
13512         before adding it to device.map.
13514 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
13516         * genmk.rb: Let GCC generate dependencies the first time it
13517         compiles a file; using the -MD option.
13518         * conf/common.mk: Regenerate.
13519         * conf/i386-pc.mk: Likewise.
13520         * conf/i386-efi.mk: Likewise.
13521         * conf/powerpc-ieee1275.mk: Likewise.
13522         * conf/sparc64-ieee1275.mk: Likewise.
13524 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
13526         Move the prototypes of grub_setjmp and grub_longjmp to
13527         cpu/setjmp.h, so that each architecture may specify different
13528         attributes.
13530         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
13531         (grub_longjmp): Likewise.
13532         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
13533         (grub_longjmp): Likewise.
13534         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
13535         (grub_longjmp): Likewise.
13537         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
13538         [!GRUB_UTIL] (grub_longjmp): Removed.
13540 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
13542         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
13543         "color!" method does not return any value.
13545 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13547         * include/grub/bitmap.h: New file.
13549         * include/grub/i386/pc/vbeutil.h: Likewise.
13551         * video/bitmap.c: Likewise.
13553         * video/readers/tga.c: Likewise.
13555         * video/i386/pc/vbeutil.c: Likewise.
13557         * commands/videotest.c: Code cleanup and updated to reflect to new
13558         video API.
13560         * term/gfxterm.c: Likewise.
13562         * video/video.c: Likewise.
13564         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
13565         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
13566         (bitmap_mod_SOURCES): New entry.
13567         (bitmap_mod_CFLAGS): Likewise.
13568         (bitmap_mod_LDFLAGS): Likewise.
13569         (tga_mod_SOURCES): Likewise.
13570         (tga_mod_CFLAGS): Likewise.
13571         (tga_mod_LDFLAGS): Likewise.
13573         * include/grub/video.h (grub_video_blit_operators): New enum type.
13574         (grub_video_render_target): Changed as forward declaration and moved
13575         actual definition to be video driver specific.
13576         (grub_video_adapter.blit_bitmap): Added blitting operator.
13577         (grub_video_adapter.blit_render_target): Likewise.
13578         (grub_video_blit_bitmap): Likewise.
13579         (grub_video_blit_render_target): Likewise.
13581         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
13582         driver specific render target definition.
13583         (grub_video_vbe_map_rgba): Added driver internal helper.
13584         (grub_video_vbe_unmap_color): Updated to use
13585         grub_video_i386_vbeblit_info.
13586         (grub_video_vbe_get_video_ptr): Likewise.
13588         * include/grub/i386/pc/vbeblit.h
13589         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
13590         grub_video_i386_vbeblit_info.
13591         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
13592         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
13593         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
13594         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
13595         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
13596         (grub_video_i386_vbeblit_index_index): Likewise.
13597         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
13598         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
13599         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
13600         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
13601         operator.
13602         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
13603         operator.
13605         * video/i386/pc/vbeblit.c: Updated to reflect changes on
13606         include/grub/i386/pc/vbeblit.h.
13608         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
13609         Updated to use grub_video_i386_vbeblit_info.
13610         (grub_video_i386_vbefill_R8G8B8): Likewise.
13611         (grub_video_i386_vbefill_index): Likewise.
13612         (grub_video_i386_vbefill): Added generic filler.
13614         * video/i386/pc/vbefill.c: Updated to reflect changes on
13615         include/grub/i386/pc/vbefill.h.
13617         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
13618         grub_video_i386_vbeblit_info.
13619         (grub_video_vbe_unmap_color): Likewise.
13620         (grub_video_vbe_blit_glyph): Likewise.
13621         (grub_video_vbe_scroll): Likewise.
13622         (grub_video_vbe_draw_pixel): Removed function.
13623         (grub_video_vbe_get_pixel): Likewise.
13624         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
13625         updated code to use it.
13626         (common_blitter): Added common blitter for render target and bitmap.
13627         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
13628         (grub_video_vbe_blit_render_target): Likewise.
13630 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
13632         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
13633         is in text mode if there is no console control protocol instance
13634         available.
13636 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13638         * include/grub/video.h: Code cleanup.
13640         * include/grub/i386/pc/vbe.h: Likewise.
13642         * video/i386/pc/vbe.c: Likewise.
13644         * video/i386/pc/vbeblit.c: Likewise.
13646         * video/i386/pc/vbefill.c: Likewise.
13648         * video/video.c: Likewise.  Also added more comments.
13650 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13652         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
13653         (struct grub_biosdisk_dap): Likewise.
13655         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
13656         linkage settings for all functions.
13658 2006-07-12  Marco Gerards  <marco@gnu.org>
13660         * configure.ac (--enable-mm-debug): Fix typo.
13662         * genkernsyms.sh.in: Use proper quoting for `CC'.
13664 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
13666         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
13667         (normal_mod_ASFLAGS): Remove "-m32".
13669 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
13671         * util/misc.c: Include config.h.
13672         [!HAVE_MEMALIGN]: Do not include malloc.h.
13673         (grub_memalign): Use posix_memalign, if present. Then, use
13674         memalign, if present. Otherwise, emit an error.
13676         * util/grub-emu.c: Do not include malloc.h.
13678         * include/grub/util/misc.h: Include unistd.h. This is required for
13679         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
13680         D. Eades III <hde@foobar-qux.org>.
13682         * configure.ac (AC_GNU_SOURCE): Added.
13683         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
13684         type.
13686 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
13688         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
13689         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
13691 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
13693         * include/grub/types.h (grub_host_addr_t): Rename to
13694         grub_target_addr_t.
13695         (grub_host_off_t): Rename to grub_target_off_t.
13696         (grub_host_size_t): Rename to grub_target_size_t.
13697         (grub_host_ssize_t): Rename to grub_target_ssize_t.
13698         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
13700         * include/grub/kernel.h (struct grub_module_header): Change type
13701         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
13702         (grub_module_info): Likewise.
13704 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13706         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
13707         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
13708         Velazquez <jesus.velazquez@gmail.com>.
13710 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
13712         Count partitions from 1 instead of 0 in the string representation
13713         of partitions. Still use 0-based internally.
13715         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
13716         (sun_partition_map_iterate): Use grub_partition_t instead of
13717         struct grub_partition *. Cast DESC->START_CYLINDER to
13718         grub_uint64_t after converting the endian.
13719         (sun_partition_map_probe): Subtract 1 for PARTNUM.
13720         (sun_partition_map_get_name): Add 1 to P->INDEX.
13722         * partmap/pc.c (grub_partition_parse): Subtract 1 for
13723         PCDATA->DOS_PART.
13724         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
13726         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
13727         zero instead of one.
13728         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
13729         (gpt_partition_map_get_name): Add 1 into P->INDEX.
13731         * partmap/apple.c (apple_partition_map_iterate): Change the type
13732         of POS to unsigned.
13733         (apple_partition_map_probe): Subtract 1 for PARTNUM.
13734         (apple_partition_map_get_name): Add 1 into P->INDEX.
13736         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
13737         of POS to unsigned.
13738         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
13739         calculate the offset of a partition.
13740         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
13741         (amiga_partition_map_get_name): Add 1 into P->INDEX.
13743         * partmap/acorn.c (acorn_partition_map_find): Change the type of
13744         SECTOR to grub_disk_addr_t.
13745         (acorn_partition_map_iterate): Likewise.
13746         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
13747         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
13748         top.
13749         (acorn_partition_map_get_name): Add 1 into P->INDEX.
13751         * kern/i386/pc/init.c (make_install_device): Add 1 into
13752         GRUB_INSTALL_DOS_PART.
13754         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
13755         conditional.
13757 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
13759         Clean up the code to support 64-bit addressing in disks and
13760         files. This change is not enough for filesystems yet.
13762         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
13763         type of "start" to grub_uint64_t.
13764         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
13765         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
13766         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
13767         convert addresses.
13769         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
13770         to grub_disk_addr_t.
13772         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
13773         string.
13775         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13777         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
13778         to char *.
13780         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
13782         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
13784         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
13786         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
13787         to grub_off_t, to detect an error from grub_file_seek.
13788         (grub_multiboot_load_elf32): Likewise.
13790         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
13791         maximum unsigned long value when an overflow is detected.
13792         (grub_strtoull): New function.
13793         (grub_divmod64): Likewise.
13794         (grub_lltoa): use grub_divmod64.
13796         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
13797         grub_disk_addr_t.
13798         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
13799         the pointer to next character. Use grub_strtoull instead of
13800         grub_strtoul.
13801         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
13802         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
13803         respectively.
13805         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
13806         return value is signed.
13807         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
13808         test if OFFSET is less than zero, as OFFSET is unsigned now.
13810         * kern/disk.c (struct grub_disk_cache): Change the type of
13811         "sector" to grub_disk_addr_t.
13812         (grub_disk_cache_get_index): Change the type of SECTOR to
13813         grub_disk_addr_t. Calculate the hash with SECTOR casted to
13814         unsigned after shifting.
13815         (grub_disk_cache_invalidate): Change the type of SECTOR to
13816         grub_disk_addr_t.
13817         (grub_disk_cache_unlock): Likewise.
13818         (grub_disk_cache_store): Likewise.
13819         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
13820         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
13821         grub_disk_addr_t and grub_uint64_t, respectively.
13822         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
13823         body, as the value of OFFSET is tweaked by
13824         grub_disk_check_range. Change the types of START_SECTOR, LEN and
13825         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
13826         respectively.
13827         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
13828         body, as the value of OFFSET is tweaked by
13829         grub_disk_check_range. Change the types of LEN and N to
13830         grub_size_t.
13832         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
13833         and "saved_offset" to grub_off_t.
13834         (test_header): Cast BUF to char *.
13835         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
13836         to char *.
13837         (grub_gzio_read): Change the types of OFFSET and SIZE to
13838         grub_off_t and grub_size_t, respectively.
13840         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
13841         Removed.
13842         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
13843         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
13844         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
13845         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
13846         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
13848         * include/grub/types.h (grub_off_t): Unconditionally set to
13849         grub_uint64_t.
13850         (grub_disk_addr_t): Changed to grub_uint64_t.
13852         * include/grub/partition.h (struct grub_partition): Change the
13853         types of "start", "len" and "offset" to grub_disk_addr_t,
13854         grub_uint64_t and grub_disk_addr_t, respectively.
13855         (grub_partition_get_start): Return grub_disk_addr_t.
13856         (grub_partition_get_len): Return grub_uint64_t.
13858         * include/grub/misc.h (grub_strtoull): New prototype.
13859         (grub_divmod64): Likewise.
13861         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
13862         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
13863         grub_off_t, respectively.
13864         All callers and references changed.
13866         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
13867         grub_size_t in "read".
13868         All callers and references changed.
13870         * include/grub/file.h (struct grub_file): Change the types of
13871         "offset" and "size" to grub_off_t and grub_off_t,
13872         respectively. Change the type of SECTOR to grub_disk_addr_t in
13873         "read_hook".
13874         (grub_file_read): Change the type of LEN to grub_size_t.
13875         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
13876         grub_off_t.
13877         (grub_file_size): Return grub_off_t.
13878         (grub_file_tell): Likewise.
13879         All callers and references changed.
13881         * include/grub/disk.h (struct grub_disk_dev): Change the types of
13882         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
13883         "write".
13884         (struct grub_disk): Change the type of "total_sectors" to
13885         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
13886         "read_hook".
13887         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
13888         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
13889         (grub_disk_write): Likewise.
13890         All callers and references changed.
13892         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
13893         char * for grub_strncmp to silence gcc.
13894         (grub_iso9660_mount): Likewise.
13895         (grub_iso9660_mount): Likewise.
13896         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
13897         return statement.
13898         (grub_iso9660_iterate_dir): Likewise.
13899         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
13901         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
13902         LEN to grub_disk_addr_t and grub_size_t, respectively.
13904         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13906         * fs/jfs.c (grub_jfs_read_file): Likewise.
13908         * fs/minix.c (grub_jfs_read_file): Likewise.
13910         * fs/sfs.c (grub_jfs_read_file): Likewise.
13912         * fs/ufs.c (grub_jfs_read_file): Likewise.
13914         * fs/xfs.c (grub_jfs_read_file): Likewise.
13916         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
13917         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
13918         respectively.
13920         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
13921         BLKNR to -1 instead of returning GRUB_ERRNO.
13922         (grub_ext2_read_file): Change the types of SECTOR and
13923         LEN to grub_disk_addr_t and grub_size_t, respectively.
13925         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
13926         LEN to grub_disk_addr_t and grub_size_t, respectively.
13928         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
13929         grub_file_read.
13931         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
13932         string. Do not cast SECTOR explicitly.
13934         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
13935         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
13936         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
13937         grub_disk_addr_t and grub_size_t, respectively. If the sector is
13938         over 2TB and LBA mode is not supported, raise an error.
13939         (get_safe_sectors): New function.
13940         (grub_biosdisk_read): Use get_safe_sectors.
13941         (grub_biosdisk_write): Likewise.
13943         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
13944         (grub_efidisk_write): Likewise.
13946         * disk/loopback.c (delete_loopback): Cosmetic changes.
13947         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
13948         correctly.
13949         (grub_loopback_open): Likewise.
13950         (grub_loopback_read): Likewise. Also, change the type of POS to
13951         grub_off_t, and fix the usage of grub_memset.
13953         * commands/i386/pc/play.c: Include grub/machine/time.h.
13955         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
13956         print FILE->SIZE.
13958         * commands/configfile.c: Include grub/env.h.
13960         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
13961         GRUB_ERRNO directly instead. Change the type of POS to
13962         grub_off_t. Follow the coding standard.
13964         * commands/blocklist.c: Include grub/partition.h.
13965         (grub_cmd_blocklist): Return an error if the underlying device is
13966         not a disk. Take the starting sector of a partition into account,
13967         if a partition is used.
13969         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
13970         a length field.
13971         (lba_mode): Support 64-bit addresses.
13972         (chs_mode): Likewise.
13973         (copy_buffer): Adapted to the new offsets of a length field and a
13974         segment field.
13975         (blocklist_default_start): Allocate 64-bit space.
13977         * boot/i386/pc/boot.S (force_lba): Removed.
13978         (boot_drive): Moved to under KERNEL_SECTOR.
13979         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
13980         space.
13981         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
13982         is useless.
13983         (lba_mode): Refactored to support a 64-bit address. More size
13984         optimization.
13985         (setup_sectors): Likewise.
13987 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
13989         * DISTLIST: Added include/grub/i386/linux.h. Removed
13990         include/grub/i386/pc/linux.h
13992         * configure.ac (AC_INIT): Bumped to 1.94.
13994         * config.guess: Updated from gnulib.
13995         * config.sub: Likewise.
13996         * install-sh: Likewise.
13997         * mkinstalldirs: Likewise.
13999 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14001         * conf/common.rmk (grub_modules_init.lst): Depended on
14002         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
14003         MODSRCFILES.
14005         * genmk.rb (PModule::rule): Reverted the previous change.
14007 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14009         * conf/common.rmk (grub_modules_init.lst): Depends on
14010         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
14011         that the target does not exist before producing.
14012         (grub_modules_init.h): Remove the target before generating.
14013         (grub_emu_init.c): Likewise.
14015         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
14017 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
14019         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
14020         for the target-specific tests. Make sure that we also have the
14021         up-to-date target variables for those tests.
14023 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14025         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
14026         (PModule::rule): Likewise.
14028 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14030         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
14031         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
14032         target-specific flags should be prefixed.
14033         (PModule::rule): Likewise.
14035 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
14037         * configure.ac (CMP): Check if cmp is available explicitly.
14039 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
14041         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
14042         (target_cpu): New variable.
14043         (pkglibdir): Use target_cpu instead of host_cpu.
14045         * util/i386/pc/grub-install.in (host_cpu): Removed.
14046         (target_cpu): New variable.
14047         (pkglibdir): Use target_cpu instead of host_cpu.
14049         * util/genmoddep.c: Removed.
14051         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
14052         instead of GRUB_HOST_SIZEOF_VOID_P.
14053         * kern/dl.c: Likewise.
14055         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
14056         ...
14057         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14058         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14059         (GRUB_TARGET_SIZEOF_LONG): ... this.
14060         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14061         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14062         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14063         to ...
14064         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14065         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14066         (GRUB_TARGET_SIZEOF_LONG): ... this.
14067         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14068         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14069         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14070         to ...
14071         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14072         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14073         (GRUB_TARGET_SIZEOF_LONG): ... this.
14074         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14075         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14077         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
14078         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
14079         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
14080         instead of GRUB_HOST_SIZEOF_LONG.
14081         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
14082         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
14083         GRUB_CPU_WORDS_BIGENDIAN.
14084         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
14085         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
14086         grub_host_ssize_t.
14088         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
14089         (genmoddep_SOURCES): Likewise.
14090         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
14091         (genmoddep_SOURCES): Likewise.
14092         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
14093         (genmoddep_SOURCES): Likewise.
14094         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
14095         Likewise.
14096         (genmoddep_SOURCES): Likewise.
14098         * genmoddep.awk: New file.
14100         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
14101         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
14102         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
14103         (PModule::rule): Likewise.
14104         (Program::rule): Likewise.
14105         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
14106         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
14107         respectively.
14109         * configure.ac: Rewritten intensively to use host and target
14110         instead of build and host, respectively.
14112         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
14113         (host_cpu): Removed.
14114         (target_cpu): New variable.
14115         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
14116         (BUILD_CC): Removed.
14117         (BUILD_CFLAGS): Likewise.
14118         (BUILD_CPPFLAGS): Likewise.
14119         (TARGET_CC): New variable.
14120         (TARGET_CFLAGS): Likewise.
14121         (TARGET_CPPFLAGS): Likewise.
14122         (TARGET_LDFLAGS): Likewise.
14123         (AWK): Likewise.
14124         (include): Use target_cpu instead of host_cpu.
14125         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
14127         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
14129 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
14131         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
14132         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
14133         field 'false' to 'exec_on_false'.
14134         (grub_script_create_cmdif): Renamed argument names to reflect above
14135         changes.
14137         * normal/execute.c (grub_script_execute_cmdif): Likewise.
14139         * normal/script.c (grub_script_create_cmdif): Likewise.
14141 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
14143         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
14144         top.
14145         (grub_hfsplus_btree_recptr): Likewise.
14146         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
14147         FILEBLOCK both to pass a block number and store next block
14148         number.
14149         (grub_hfsplus_read_block): Rewritten heavily to support an extent
14150         overflow file correctly. Specify errors appropriately, because
14151         fshelp expects that GRUB_ERRNO is set when fails. Reuse
14152         grub_hfsplus_btree_recptr to get the pointer to a found key.
14153         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
14154         is found.
14156         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
14157         linux.mod.
14158         (_linux_mod_SOURCES): New variable.
14159         (_linux_mod_CFLAGS): Likewise.
14160         (_linux_mod_LDFLAGS): Likewise.
14161         (linux_mod_SOURCES): Likewise.
14162         (linux_mod_CFLAGS): Likewise.
14163         (linux_mod_LDFLAGS): Likewise.
14165         * DISTLIST: Added loader/i386/efi/linux.c,
14166         loader/i386/efi/linux_normal.c and
14167         include/grub/i386/efi/loader.h.
14169         * loader/i386/efi/linux.c: New file.
14170         * loader/i386/efi/linux_normal.c: Likewise.
14171         * include/grub/i386/efi/loader.h: Likewise.
14173 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
14175         * commands/blocklist.c: New file.
14177         * DISTLIST: Added commands/blocklist.c.
14179         * term/efi/console.c (grub_console_highlight_color): Use a lighter
14180         color for the background, and a darker color for the foreground.
14181         (grub_console_checkkey): Return READ_KEY.
14182         (grub_console_cls): Set the background to
14183         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
14185         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
14187         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
14188         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
14190         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
14191         prototype.
14193         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
14194         BG. The spec is wrong again.
14196         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
14197         prototype.
14198         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
14200         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14201         commands/blocklist.c.
14202         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14204         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
14205         (blocklist_mod_SOURCES): New variable.
14206         (blocklist_mod_CFLAGS): Likewise.
14207         (blocklist_mod_LDFLAGS): Likewise.
14209 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
14211         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
14212         duplication.
14213         (lba_mode): Use %eax more intensively to reduce the code size.
14215 2006-05-20  Marco Gerards  <marco@gnu.org>
14217         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
14219         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
14220         for `menuentry'.
14221         (script): Accept leading newlines.
14222         (newlines): New rule to describe 0 or more newlines.
14223         (commands): Accept `command' with trailing newline.  Fixed the
14224         order in which arguments were passed to `grub_script_add_cmd'.
14225         Accept commands separated by newlines.
14226         (function): Changed to accept newlines.
14227         (menuentry) Rewritten.
14229         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
14230         front of the list, instead of to the end.
14232 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
14234         * util/i386/pc/grub-install.in (bindir): New variable.
14235         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
14236         Shaver <lbgwjl@gmail.com>.
14238 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
14240         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
14241         grub/machine/linux.h
14242         * loader/i386/pc/linux.c: Likewise.
14244         * include/grub/i386/pc/linux.h: Moved to ...
14245         * include/grub/i386/linux.h: ... here.
14247         * include/grub/i386/linux.h (struct linux_kernel_params): New
14248         struct.
14250 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
14252         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
14253         checking.
14254         (grub_video_vbe_blit_glyph): Likewise.
14255         (grub_video_vbe_blit_bitmap): Likewise.
14256         (grub_video_vbe_blit_render_target): Likewise.
14258 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
14260         * configure.ac (--with-platform): Properly quote the square
14261         brackets.
14263 2006-05-08  Marco Gerards  <marco@gnu.org>
14265         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
14266         this...
14267         (kernel_elf_HEADERS): ...to this.  Updated all users.
14268         (grubof_symlist.c): Renamed from this...
14269         (kernel_elf_symlist.c): ...to this.  Updated all users.
14270         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14271         (grubof_SOURCES): Renamed from this...
14272         (kernel_elf_SOURCES): ...to this.
14273         (grubof_HEADERS): Renamed from this...
14274         (kernel_elf_HEADERS): ...to this.
14275         (grubof_CFLAGS): Renamed from this...
14276         (kernel_elf_CFLAGS): ...to this.
14277         (grubof_ASFLAGS): Renamed from this...
14278         (kernel_elf_ASFLAGS): ...to this.
14279         (grubof_LDFLAGS): Renamed from this...
14280         (kernel_elf_LDFLAGS): ...to this.
14282         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
14283         this...
14284         (kernel_elf_HEADERS): ...to this.  Updated all users.
14285         (grubof_symlist.c): Renamed from this...
14286         (kernel_elf_symlist.c): ...to this.  Updated all users.
14287         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14288         (grubof_SOURCES): Renamed from this...
14289         (kernel_elf_SOURCES): ...to this.
14290         (grubof_HEADERS): Renamed from this...
14291         (kernel_elf_HEADERS): ...to this.
14292         (grubof_CFLAGS): Renamed from this...
14293         (kernel_elf_CFLAGS): ...to this.
14294         (grubof_ASFLAGS): Renamed from this...
14295         (kernel_elf_ASFLAGS): ...to this.
14296         (grubof_LDFLAGS): Renamed from this...
14297         (kernel_elf_LDFLAGS): ...to this.
14299         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
14300         `kernel.elf' instead of `grubof'.
14302 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
14304         Add --with-platform to configure. Use pkglibdir instead of
14305         pkgdatadir. This is reported by Roger Leigh.
14307         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
14308         (host_vendor): Likewise.
14309         (host_os): Likewise.
14310         (pkgdatadir): Likewise.
14311         (platform): New variable.
14312         (pkglibdir): Likewise.
14313         Use PKGLIBDIR instead of PKGDATADIR.
14315         * util/i386/pc/grub-install.in (datadir): Removed.
14316         (host_vendor): Likewise.
14317         (host_os): Likewise.
14318         (pkgdatadir): Likewise.
14319         (platform): New variable.
14320         (pkglibdir): Likewise.
14321         Use PKGLIBDIR instead of PKGDATADIR.
14323         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
14324         instead of GRUB_DATADIR.
14325         (main): Likewise.
14326         * util/i386/pc/grub-mkimage.c (usage): Likewise.
14327         (main): Likewise.
14328         * util/i386/efi/grub-mkimage.c (usage): Likewise.
14329         (main): Likewise.
14331         * configure.ac (--with-platform): New option.
14332         Use PLATFORM instead of HOST_VENDOR to specify a platform.
14334         * Makefile.in: Include a makefile based on PLATFORM instead of
14335         HOST_VENDOR.
14336         (pkgdatadir): Not appended by the machine type.
14337         (pkglibdir): Appended by the machine type.
14338         (host_vendor): Removed.
14339         (platform): New variable.
14340         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
14341         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
14342         (uninstall): Likewise.
14344 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
14346         Use the environment context in the menu. Remove the commands
14347         "default" and "timeout", and use variables instead.
14349         * normal/menu.c: Include grub/env.h.
14350         (print_entry): Cast TITLE to silence gcc.
14351         (get_timeout): New function.
14352         (set_timeout): Likewise.
14353         (get_entry_number): Likewise.
14354         (run_menu): Use a default entry, a fallback entry and a timeout
14355         in the environment variables "default", "fallback" and
14356         "timeout". Also, tweak the default entry if it is not within the
14357         current menu entries.
14358         (grub_menu_run): Use a fallback entry in the environment variable
14359         "fallback".
14361         * normal/main.c (read_config_file): Do not initialize
14362         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
14363         NEWMENU->TIMEOUT.
14364         (grub_normal_execute): Use a data slot to store the menu.
14366         * include/grub/normal.h (struct grub_menu): Removed default_entry,
14367         fallback_entry and timeout.
14368         (struct grub_menu_list): Removed.
14369         (grub_menu_list_t): Likewise.
14370         (struct grub_context): Likewise.
14371         (grub_context_t): Likewise.
14372         (grub_context_get): Likewise.
14373         (grub_context_get_current_menu): Likewise.
14374         (grub_context_push_menu): Likewise.
14375         (grub_context_pop_menu): Likewise.
14376         (grub_default_init): Likewise.
14377         (grub_default_fini): Likewise.
14378         (grub_timeout_init): Likewise.
14379         (grub_timeout_fini): Likewise.
14381         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
14382         and timeout.mod.
14383         (normal_mod_SOURCES): Removed normal/context.c.
14385         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
14386         commands/default.c, commands/timeout.c and normal/context.c.
14387         (normal_mod_SOURCES): Removed normal/context.c.
14389         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
14390         commands/timeout.c and normal/context.c.
14391         (normal_mod_SOURCES): Removed normal/context.c.
14393         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
14394         commands/default.c, commands/timeout.c and normal/context.c.
14395         (normal_mod_SOURCES): Removed normal/context.c.
14397         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
14398         timeout.mod.
14399         (default_mod_SOURCES): Removed.
14400         (default_mod_CFLAGS): Likewise.
14401         (default_mod_LDFLAGS): Likewise.
14402         (timeout_mod_SOURCES): Removed.
14403         (timeout_mod_CFLAGS): Likewise.
14404         (timeout_mod_LDFLAGS): Likewise.
14406         * DISTLIST: Removed commands/default.c, commands/timeout.c and
14407         normal/context.c.
14409         * commands/default.c: Removed.
14410         * commands/timeout.c: Likewise.
14411         * normal/context.c: Likewise.
14413 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
14415         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
14417 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
14419         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
14420         "next" to "prev" for readability.
14421         (struct grub_env_sorted_var): New struct.
14422         (grub_env_context): Renamed to ...
14423         (initial_context): ... this.
14424         (grub_env_var_context): Renamed to ...
14425         (current_context): ... this.
14426         (grub_env_find): Look only at CURRENT_CONTEXT.
14427         (grub_env_context_open): Rewritten to copy exported variables from
14428         previous context.
14429         (grub_env_context_close): Rewritten according to the new
14430         scheme. Also, add an assertion to prevent the initial context from
14431         removed.
14432         (grub_env_insert): Removed the code for the sorted list.
14433         (grub_env_remove): Likewise.
14434         (grub_env_export): Simply mark the variable with
14435         GRUB_ENV_VAR_GLOBAL.
14436         (grub_env_set): A cosmetic change for naming consistency.
14437         (grub_env_get): Likewise.
14438         (grub_env_unset): Likewise.
14439         (grub_env_iterate): Rewritten to sort variables within this
14440         function.
14441         (grub_register_variable_hook): Fixed for naming consistency. Call
14442         grub_env_find again, only if NAME is not found at the first time.
14443         (mangle_data_slot_name): New function.
14444         (grub_env_set_data_slot): Likewise.
14445         (grub_env_get_data_slot): Likewise.
14446         (grub_env_unset_data_slot): Likewise.
14448         * include/grub/env.h (grub_env_var_type): New enum.
14449         (GRUB_ENV_VAR_LOCAL): New constant.
14450         (GRUB_ENV_VAR_GLOBAL): Likewise.
14451         (GRUB_ENV_VAR_DATA): Likewise.
14452         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
14453         "type".
14454         (grub_env_set): Replace VAR with NAME for consistency.
14455         (grub_register_variable_hook): Likewise.
14456         (grub_env_export): Specify the name of the argument.
14457         (grub_env_set_data_slot): New prototype.
14458         (grub_env_get_data_slot): Likewise.
14459         (grub_env_unset_data_slot): Likewise.
14461 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14463         Extend the loader so that GRUB can accept a loader which comes
14464         back to GRUB when a loaded image exits. Also, this change adds
14465         support for a chainloader on EFI.
14467         * term/efi/console.c: Include grub/misc.h.
14468         (grub_console_checkkey): Display a scan code on the top for
14469         debugging. This will be removed once the EFI port gets stable.
14470         Correct the scan code mapping.
14472         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
14473         allocate memory from larger regions, in order to reduce the number
14474         of allocated regions. Otherwise, the MacOSX loader panics.
14475         (filter_memory_map): Avoid less than 1MB for compatibility with
14476         other loaders.
14477         (add_memory_regions): Allocate from the tail of a region, if
14478         possible, to avoid allocating a region near to 1MB, for the MacOSX
14479         loader.
14481         * kern/efi/init.c (grub_efi_set_prefix): Specify
14482         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
14484         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
14485         argument IMAGE_HANDLE and specify it to get a loaded image.
14486         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
14487         grub_efi_get_loaded_image.
14488         (grub_efi_get_filename): Divide the length by the size of
14489         grub_efi_char16_t.
14490         (grub_efi_get_device_path): New function.
14491         (grub_efi_print_device_path): Print End Device Path nodes. Divide
14492         the length by the size of grub_efi_char16_t for a file path device
14493         path node.
14495         * kern/loader.c (grub_loader_noreturn): New variable.
14496         (grub_loader_set): Accept a new argument NORETURN. Set
14497         GRUB_LOADER_NORETURN to NORETURN.
14498         All callers changed.
14499         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
14500         grub_machine_fini.
14502         * include/grub/efi/efi.h (grub_efi_get_device_path): New
14503         prototype.
14504         (grub_efi_get_loaded_image): Take an argument to specify an image
14505         handle.
14507         * include/grub/loader.h (grub_loader_set): Added one more argument
14508         NORETURN.
14510         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
14511         instead of grub_efi_open_protocol.
14512         (grub_efidisk_get_device_name): Likewise.
14513         (grub_efidisk_close): Print a newline.
14514         (grub_efidisk_get_device_handle): Fixed to use
14515         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
14516         GRUB_EFI_DEVICE_PATH_TYPE.
14518         * disk/efi/efidisk.c (device_path_guid): Moved to ...
14519         * kern/efi/efi.c (device_path_guid): ... here.
14521         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
14522         chain.mod.
14523         (kernel_mod_HEADERS): Added efi/disk.h.
14524         (_chain_mod_SOURCES): New variable.
14525         (_chain_mod_CFLAGS): Likewise.
14526         (_chain_mod_LDFLAGS): Likewise.
14527         (chain_mod_SOURCES): Likewise.
14528         (chain_mod_CFLAGS): Likewise.
14529         (chain_mod_LDFLAGS): Likewise.
14531         * DISTLIST: Added include/grub/efi/chainloader.h,
14532         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
14534         * include/grub/efi/chainloader.h: New file.
14535         * loader/efi/chainloader.c: Likewise.
14536         * loader/efi/chainloader_normal.c: Likewise.
14538 2006-04-30  Marco Gerards  <marco@gnu.org>
14540         * commands/configfile.c (grub_cmd_source): New function.
14541         (GRUB_MOD_INIT): Register the commands `source' and `.'.
14542         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
14544 2006-04-30  Marco Gerards  <marco@gnu.org>
14546         * normal/execute.c (grub_script_execute_cmd): Change the return
14547         type to `grub_err_t'.  Correctly return the error.
14548         (grub_script_execute_cmdline): In case a command line is not a
14549         command or a function, try to interpret it as an assignment.
14551 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14553         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
14554         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
14555         skip a node whose name is obviously invalid as UTF-16,
14556         i.e. contains a NUL character. Stop the iteration when the last
14557         directory entry is found. Instead of using the return value of
14558         grub_hfsplus_btree_iterate_node, store the value in RET and use
14559         it, because the iterator can be stopped by the last directory
14560         entry.
14562 2006-04-30  Marco Gerards  <marco@gnu.org>
14564         * include/grub/env.h (grub_env_export): New prototype.  Reported
14565         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
14567 2006-04-30  Marco Gerards  <marco@gnu.org>
14569         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
14570         size of the extents in a catalog file record.
14572 2006-04-29  Marco Gerards  <marco@gnu.org>
14574         * commands/configfile.c (grub_cmd_configfile): Execute the
14575         configfile within its own context.
14577         * include/grub/env.h (grub_env_context_open): New prototype.
14578         (grub_env_context_close): Likewise.
14580         * kern/env.c (grub_env): Removed.
14581         (grub_env_sorted): Likewise.
14582         (grub_env_context): New variable.
14583         (grub_env_var_context): Likewise.
14584         (grub_env_find): Search both the active context and the global
14585         context.
14586         (grub_env_context_open): New function.
14587         (grub_env_context_close): Likewise.
14588         (grub_env_insert): Likewise.
14589         (grub_env_remove): Likewise.
14590         (grub_env_export): Likewise.
14591         (grub_env_set): Changed to use helper functions to avoid code
14592         duplication.
14593         (grub_env_iterate): Rewritten so both the current context and the
14594         global context are being used.
14596         * normal/command.c (export_command): New function.
14597         (grub_command_init): Register the `export' function.
14599 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
14601         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
14602         explicitly to suppress gcc's warnings.
14603         * fs/fat.c (grub_fat_find_dir): Likewise.
14604         (grub_fat_label): Likewise.
14605         * fs/xfs.c (grub_xfs_read_inode): Likewise.
14606         (grub_xfs_mount): Likewise.
14607         (grub_xfs_label): Likewise.
14608         * fs/affs.c (grub_affs_mount): Likewise.
14609         (grub_affs_label): Likewise.
14610         (grub_affs_iterate_dir): Likewise.
14611         * fs/sfs.c (grub_sfs_mount): Likewise.
14612         (grub_sfs_iterate_dir): Likewise.
14613         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
14614         * fs/hfs.c (grub_hfs_mount): Likewise.
14615         (grub_hfs_cmp_catkeys): Likewise.
14616         (grub_hfs_find_dir): Likewise.
14617         (grub_hfs_dir): Likewise.
14618         (grub_hfs_label): Likewise.
14619         * fs/jfs.c (grub_jfs_mount): Likewise.
14620         (grub_jfs_opendir): Likewise.
14621         (grub_jfs_getent): Likewise.
14622         (grub_jfs_lookup_symlink): Likewise.
14623         (grub_jfs_label): Likewise.
14624         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
14625         (grub_hfsplus_iterate_dir): Likewise.
14626         (grub_hfsplus_btree_iterate_node): Made static.
14628         * util/grub-emu.c (prefix): New variable.
14629         (grub_machine_set_prefix): New function.
14630         (main): Do not set the environment variable "prefix" here. Only
14631         set PREFIX, which is used later by grub_machine_set_prefix.
14633         * include/grub/video.h: Do not include grub/symbol.h.
14634         (grub_video_register): Not exported. This symbol is not defined in
14635         the kernel.
14636         (grub_video_unregister): Likewise.
14637         (grub_video_iterate): Likewise.
14638         (grub_video_setup): Likewise.
14639         (grub_video_restore): Likewise.
14640         (grub_video_get_info): Likewise.
14641         (grub_video_get_blit_format): Likewise.
14642         (grub_video_set_palette): Likewise.
14643         (grub_video_get_palette): Likewise.
14644         (grub_video_set_viewport): Likewise.
14645         (grub_video_get_viewport): Likewise.
14646         (grub_video_map_color): Likewise.
14647         (grub_video_map_rgb): Likewise.
14648         (grub_video_map_rgba): Likewise.
14649         (grub_video_fill_rect): Likewise.
14650         (grub_video_blit_glyph): Likewise.
14651         (grub_video_blit_bitmap): Likewise.
14652         (grub_video_blit_render_target): Likewise.
14653         (grub_video_scroll): Likewise.
14654         (grub_video_swap_buffers): Likewise.
14655         (grub_video_create_render_target): Likewise.
14656         (grub_video_delete_render_target): Likewise.
14657         (grub_video_set_active_render_target): Likewise.
14659         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
14660         Undefined.
14661         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
14663         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
14664         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14665         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14666         instead of $(srcdir)/genkernsyms.sh.
14668         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
14669         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14670         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14671         instead of $(srcdir)/genkernsyms.sh.
14673         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
14674         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14675         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14676         instead of $(srcdir)/genkernsyms.sh.
14678         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
14679         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14680         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14681         instead of $(srcdir)/genkernsyms.sh.
14683         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
14684         genkernsyms.sh.
14686         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
14687         genkernsyms.sh.
14688         (gensymlist.sh): New target.
14689         (genkernsyms.sh): Likewise.
14691         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
14692         genkernsyms.sh.in and gensymlist.sh.in.
14694         * genkernsyms.sh: Removed.
14695         * gensymlist.sh: Likewise.
14697         * genkernsyms.sh.in: New file.
14698         * gensymlist.sh.in: Likewise.
14700 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14702         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
14703         clobber "prefix", since we may have already set it manually.
14705 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
14707         * kern/misc.c (abort): New alias for grub_abort.
14709 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
14711         A new machine-specific function "grub_machine_set_prefix" is
14712         defined. This is called after loading modules, so that a prefix
14713         initialization can use modules. Also, this change adds an
14714         intensive debugging feature for the memory manager via the
14715         configure option "--enable-mm-debug".
14717         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
14718         PART.LEN.
14720         * kern/sparc64/ieee1275/init.c (abort): Removed.
14721         (grub_stop): Likewise.
14722         (grub_exit): New function.
14723         (grub_set_prefix): Renamed to ...
14724         (grub_machine_set_prefix): ... this.
14725         (grub_machine_init): Do not call grub_set_prefix.
14727         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
14728         (grub_machine_set_prefix): ... this.
14729         (grub_machine_init): Do not call grub_set_prefix.
14731         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
14732         (grub_machine_init): Do not set the prefix here.
14734         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
14736         * kern/efi/init.c: Include grub/mm.h.
14737         (grub_efi_set_prefix): New function.
14739         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
14740         (grub_efi_get_filename): New function.
14741         (grub_print_device_path): Renamed to ...
14742         (grub_efi_print_device_path): ... this.
14744         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
14745         [MM_DEBUG] (grub_realloc): Likewise.
14746         [MM_DEBUG] (grub_free): Likewise.
14747         [MM_DEBUG] (grub_memalign): Likewise.
14748         [MM_DEBUG] (grub_mm_debug): New variable.
14749         [MM_DEBUG] (grub_debug_malloc): New function.
14750         [MM_DEBUG] (grub_debug_free): New function.
14751         [MM_DEBUG] (grub_debug_realloc): New function.
14752         [MM_DEBUG] (grub_debug_memalign): New function.
14754         * kern/misc.c (grub_abort): Print a newline to distinguish
14755         the message.
14757         * kern/main.c (grub_main): Call grub_machine_set_prefix and
14758         grub_set_root_dev after loading modules. This is necessary when
14759         setting a prefix depends on modules.
14761         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
14762         (grub_efi_print_device_path): ... this.
14763         (grub_efi_get_filename): New prototype.
14764         (grub_efi_set_prefix): Likewise.
14766         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
14767         and grub/disk.h.
14768         (grub_efidisk_get_device_handle): New prototype.
14769         (grub_efidisk_get_device_name): Likewise.
14771         * include/grub/mm.h: Include config.h.
14772         (MM_DEBUG): Removed.
14773         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
14774         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
14775         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
14776         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
14777         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
14778         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
14779         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
14780         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
14781         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
14783         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
14785         * disk/efi/efidisk.c: Include grub/partition.h.
14786         (iterate_child_devices): New function.
14787         (add_device): First, compare only last device path nodes, so that
14788         devices are sorted by the types.
14789         (grub_efidisk_get_device_handle): New function.
14790         (grub_efidisk_get_device_name): Likewise.
14792         * configure.ac (--enable-mm-debug): New option to enable the
14793         memory manager debugging feature. This makes the binary much
14794         bigger, so is disabled by default.
14796 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
14798         Use grub_abort instead of grub_stop, and grub_exit must be
14799         define in each architecture now. Also, this change adds support
14800         for EFI disks.
14802         * util/i386/pc/grub-probefs.c: Include grub/term.h.
14803         (grub_getkey): New function.
14804         (grub_term_get_current): Likewise.
14806         * util/i386/pc/grub-setup.c: Include grub/term.h.
14807         (grub_getkey): New function.
14808         (grub_term_get_current): Likewise.
14810         * util/misc.c (grub_stop): Renamed to ...
14811         (grub_exit): ... this.
14813         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
14814         (grub_exit): ... this.
14815         (grub_machine_init): Use grub_abort instead of abort.
14816         (grub_stop): Removed.
14818         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
14819         abort.
14821         * kern/i386/pc/startup.S (grub_exit): New function.
14822         (cold_reboot): New label.
14824         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
14825         (grub_efi_init): Call grub_efidisk_init.
14826         (grub_efi_fini): Call grub_efidisk_fini.
14828         * kern/efi/efi.c: Include grub/mm.h.
14829         (grub_efi_console_control_guid): Renamed to ...
14830         (console_control_guid): ... this.
14831         (grub_efi_loaded_image_guid): Renamed to ...
14832         (loaded_image_guid): ... this.
14833         (grub_efi_locate_handle): New function.
14834         (grub_efi_open_protocol): Likewise.
14835         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
14836         GRUB_EFI_CONSOLE_CONTROL_GUID.
14837         (grub_efi_exit): Removed.
14838         (grub_stop): Likewise.
14839         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
14840         (grub_exit): New function.
14841         (grub_print_device_path): Likewise.
14843         * kern/rescue.c (grub_rescue_cmd_exit): New function.
14844         (grub_enter_rescue_mode): Register "exit".
14846         * kern/misc.c (grub_real_dprintf): A cosmetic change.
14847         (grub_abort): New function.
14849         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
14851         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
14853         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
14855         * include/grub/efi/efi.h (grub_efi_exit): Removed.
14856         (grub_print_device_path): New prototype.
14857         (grub_efi_locate_handle): Likewise.
14858         (grub_efi_open_protocol): Likewise.
14860         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
14861         * disk/efi/efidisk.c: Likewise.
14863         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
14865         * include/grub/efi/console_control.h
14866         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
14868         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
14869         last 8 bytes as an array.
14870         (GRUB_EFI_DISK_IO_GUID): New macro.
14871         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
14872         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
14873         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
14874         grub_uint8_t.
14875         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
14876         (struct grub_efi_device_path): Rename the member "sub_type" to
14877         "subtype".
14878         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
14879         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
14880         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
14881         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
14882         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
14883         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
14884         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
14885         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
14886         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
14887         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
14888         (struct grub_efi_pci_device_path): New structure.
14889         (grub_efi_pci_device_path_t): New type.
14890         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
14891         (struct grub_efi_pccard_device_path): New structure.
14892         (grub_efi_pccard_device_path_t): New type.
14893         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
14894         (struct grub_efi_memory_mapped_device_path): New structure.
14895         (grub_efi_memory_mapped_device_path_t): New type.
14896         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
14897         (struct grub_efi_vendor_device_path): New structure.
14898         (grub_efi_vendor_device_path_t): New type.
14899         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
14900         (struct grub_efi_controller_device_path): New structure.
14901         (grub_efi_controller_device_path_t): New type.
14902         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
14903         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
14904         (struct grub_efi_acpi_device_path): New structure.
14905         (grub_efi_acpi_device_path_t): New type.
14906         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
14907         (struct grub_efi_expanded_acpi_device_path): New structure.
14908         (grub_efi_expanded_acpi_device_path_t): New type.
14909         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
14910         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
14911         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
14912         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
14913         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
14914         (struct grub_efi_atapi_device_path): New structure.
14915         (grub_efi_atapi_device_path_t): New type.
14916         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
14917         (struct grub_efi_fibre_channel_device_path): New structure.
14918         (grub_efi_fibre_channel_device_path_t): New type.
14919         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
14920         (struct grub_efi_1394_device_path): New structure.
14921         (grub_efi_1394_device_path_t): New type.
14922         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
14923         (struct grub_efi_usb_device_path): New structure.
14924         (grub_efi_usb_device_path_t): New type.
14925         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
14926         (struct grub_efi_usb_class_device_path): New structure.
14927         (grub_efi_usb_class_device_path_t): New type.
14928         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
14929         (struct grub_efi_i2o_device_path): New structure.
14930         (grub_efi_i2o_device_path_t): New type.
14931         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
14932         (struct grub_efi_mac_address_device_path): New structure.
14933         (grub_efi_mac_address_device_path_t): New type.
14934         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
14935         (struct grub_efi_ipv4_device_path): New structure.
14936         (grub_efi_ipv4_device_path_t): New type.
14937         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
14938         (struct grub_efi_ipv6_device_path): New structure.
14939         (grub_efi_ipv6_device_path_t): New type.
14940         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
14941         (struct grub_efi_infiniband_device_path): New structure.
14942         (grub_efi_infiniband_device_path_t): New type.
14943         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
14944         (struct grub_efi_uart_device_path): New structure.
14945         (grub_efi_uart_device_path_t): New type.
14946         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
14947         (struct grub_efi_vendor_messaging_device_path): New structure.
14948         (grub_efi_vendor_messaging_device_path_t): New type.
14949         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
14950         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
14951         (struct grub_efi_hard_drive_device_path): New structure.
14952         (grub_efi_hard_drive_device_path_t): New type.
14953         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
14954         (struct grub_efi_cdrom_device_path): New structure.
14955         (grub_efi_cdrom_device_path_t): New type.
14956         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
14957         (struct grub_efi_vendor_media_device_path): New structure.
14958         (grub_efi_vendor_media_device_path_t): New type.
14959         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
14960         (struct grub_efi_file_path_device_path): New structure.
14961         (grub_efi_file_path_device_path_t): New type.
14962         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
14963         (struct grub_efi_protocol_device_path): New structure.
14964         (grub_efi_protocol_device_path_t): New type.
14965         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
14966         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
14967         (struct grub_efi_bios_device_path): New structure.
14968         (grub_efi_bios_device_path_t): New type.
14969         (struct grub_efi_disk_io): New structure.
14970         (grub_efi_disk_io_t): New type.
14971         (struct grub_efi_block_io_media): New structure.
14972         (grub_efi_block_io_media_t): New type.
14973         (struct grub_efi_block_io): New structure.
14974         (grub_efi_block_io_t): New type.
14976         * include/grub/misc.h (grub_stop): Removed.
14977         (grub_exit): New prototype.
14978         (grub_abort): Likewise.
14980         * include/grub/disk.h (enum grub_disk_dev_id): Added
14981         GRUB_DISK_DEVICE_EFIDISK_ID.
14983         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
14984         disk/efi/efidisk.c.
14985         (kernel_syms.lst): Remove the target if an error occurs.
14987 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
14989         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
14990         as it was simply too buggy.
14992 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
14994         * kern/misc.c (grub_lltoa): New function.
14995         (grub_vsprintf): Added support for the long long suffix,
14996         i.e. "ll".
14998 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
15000         * Makefile.in (LDFLAGS): Add variable.
15001         (LD): Remove variable.
15002         * configure.ac: Add -m32 to LDFLAGS.
15003         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
15004         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
15005         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
15006         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
15007         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
15008         variables.
15009         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
15010         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
15011         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
15013 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
15015         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
15016         length for unknown glyph.
15018 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15020         Add support for pre-loaded modules into the EFI port.
15022         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
15023         completely. Accept one more argument DIR. The caller has changed.
15025         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
15027         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
15028         (grub_efi_loaded_image_guid): New variable.
15029         (grub_efi_get_loaded_image): New function.
15030         (grub_arch_modules_addr): Likewise.
15032         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
15033         prototype.
15035         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
15036         (struct grub_efi_loaded_image): New structure.
15037         (grub_efi_loaded_image_t): New type.
15039 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15041         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
15042         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
15043         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
15045 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
15047         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
15049 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
15051         * DISTLIST: Added include/grub/efi/console.h,
15052         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
15053         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15055         * include/grub/efi/console.h: New file.
15056         * include/grub/efi/time.h: Likewise.
15057         * include/grub/i386/efi/kernel.h: Likewise.
15058         * kern/efi/init.c: Likewise.
15059         * kern/efi/mm.c: Likewise.
15060         * term/efi/console.c: Likewise.
15062         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
15063         (grub_stop): Removed.
15064         (grub_get_rtc): Likewise.
15065         (grub_machine_init): Simply call grub_efi_init.
15066         (grub_machine_fini): Call grub_efi_fini.
15068         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
15069         (grub_efi_output_string): Removed.
15070         (grub_efi_stall): New function.
15071         (grub_stop): Likewise.
15072         (grub_get_rtc): Likewise.
15074         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
15075         (grub_efi_stall): New prototype.
15076         (grub_efi_allocate_pages): Likewise.
15077         (grub_efi_free_pages): Likewise.
15078         (grub_efi_get_memory_map): Likewise.
15079         (grub_efi_mm_init): Likewise.
15080         (grub_efi_mm_fini): Likewise.
15081         (grub_efi_init): Likewise.
15082         (grub_efi_fini): Likewise.
15084         * include/grub/i386/efi/time.h: Do not include
15085         grub/symbol.h. Include grub/efi/time.h.
15086         (GRUB_TICKS_PER_SECOND): Removed.
15087         (grub_get_rtc): Likewise.
15089         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
15090         Added padding. The EFI spec is buggy.
15091         (GRUB_EFI_BLACK): New macro.
15092         (GRUB_EFI_BLUE): Likewise.
15093         (GRUB_EFI_GREEN): Likewise.
15094         (GRUB_EFI_CYAN): Likewise.
15095         (GRUB_EFI_RED): Likewise.
15096         (GRUB_EFI_MAGENTA): Likewise.
15097         (GRUB_EFI_BROWN): Likewise.
15098         (GRUB_EFI_LIGHTGRAY): Likewise.
15099         (GRUB_EFI_BRIGHT): Likewise.
15100         (GRUB_EFI_DARKGRAY): Likewise.
15101         (GRUB_EFI_LIGHTBLUE): Likewise.
15102         (GRUB_EFI_LIGHTGREEN): Likewise.
15103         (GRUB_EFI_LIGHTCYAN): Likewise.
15104         (GRUB_EFI_LIGHTRED): Likewise.
15105         (GRUB_EFI_LIGHTMAGENTA): Likewise.
15106         (GRUB_EFI_YELLOW): Likewise.
15107         (GRUB_EFI_WHITE): Likewise.
15108         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
15109         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
15110         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
15111         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
15112         (GRUB_EFI_BACKGROUND_RED): Likewise.
15113         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
15114         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
15115         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
15116         (GRUB_EFI_TEXT_ATTR): Likewise.
15118         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
15119         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15120         (kernel_mod_HEADERS): Added efi/time.h.
15122 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
15124         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
15125         include/grub/efi/api.h, include/grub/efi/console_control.h,
15126         include/grub/efi/efi.h, include/grub/efi/pe32.h,
15127         include/grub/i386/efi/time.h, kern/efi/efi.c,
15128         kern/i386/efi/init.c, kern/i386/efi/startup.S,
15129         and util/i386/efi/grub-mkimage.c.
15131         * Makefile.in (RMKFILES): Added i386-efi.rmk.
15133         * genmk.rb (PModule#rule): Do not export symbols if
15134         #{prefix}_EXPORTS is set to "no".
15136         * conf/i386-efi.mk: New file.
15137         * conf/i386-efi.rmk: Likewise.
15138         * include/grub/efi/api.h: Likewise.
15139         * include/grub/efi/console_control.h: Likewise.
15140         * include/grub/efi/efi.h: Likewise.
15141         * include/grub/efi/pe32.h: Likewise.
15142         * include/grub/i386/efi/time.h: Likewise.
15143         * kern/efi/efi.c: Likewise.
15144         * kern/i386/efi/init.c: Likewise.
15145         * kern/i386/efi/startup.S: Likewise.
15146         * util/i386/efi/grub-mkimage.c: Likewise.
15148 2006-04-17  Marco Gerards  <marco@gnu.org>
15150         * include/grub/script.h: Include <grub/parser.h> and
15151         "grub_script.tab.h".
15152         (struct grub_lexer_param): New struct.
15153         (struct grub_parser_param): Likewise.
15154         (grub_script_create_arglist): Pass the state in an argument.
15155         (grub_script_add_arglist): Likewise.
15156         (grub_script_create_cmdline): Likewise.
15157         (grub_script_create_cmdblock): Likewise.
15158         (grub_script_create_cmdif): Likewise.
15159         (grub_script_create_cmdmenu): Likewise.
15160         (grub_script_add_cmd): Likewise.
15161         (grub_script_arg_add): Likewise.
15162         (grub_script_lexer_ref): Likewise.
15163         (grub_script_lexer_deref): Likewise.
15164         (grub_script_lexer_record_start): Likewise.
15165         (grub_script_lexer_record_stop): Likewise.
15166         (grub_script_mem_record): Likewise.
15167         (grub_script_mem_record_stop): Likewise.
15168         (grub_script_malloc): Likewise.
15169         (grub_script_yylex): Likewise.
15170         (grub_script_yyparse): Likewise.
15171         (grub_script_yyerror): Likewise.
15172         (grub_script_yylex): Likewise.
15173         (grub_script_lexer_init): Return the state.
15175         * normal/lexer.c (grub_script_lexer_state): Removed variable.
15176         (grub_script_lexer_done): Likewise.
15177         (grub_script_lexer_getline): Likewise.
15178         (grub_script_lexer_refs): Likewise.
15179         (script): Likewise.
15180         (newscript): Likewise.
15181         (record): Likewise.
15182         (recording): Likewise.
15183         (recordpos): Likewise.
15184         (recordlen): Likewise.
15185         (grub_script_lexer_init): Return the state instead of setting
15186         global variables.
15187         (grub_script_lexer_ref): Use the newly added argument for state
15188         instead of globals.
15189         (grub_script_lexer_deref): Likewise.
15190         (grub_script_lexer_record_start): Likewise.
15191         (grub_script_lexer_record_stop): Likewise.
15192         (recordchar): Likewise.
15193         (nextchar): Likewise.
15194         (grub_script_yylex2): Likewise.
15195         (grub_script_yylex): Likewise.
15196         (grub_script_yyerror): Likewise.
15198         * normal/parser.y (func_mem): Removed variable.
15199         (menu_entry): Likewise.
15200         (err): Likewise.
15201         (%lex-param): New parser option.
15202         (%parse-param): Likewise.
15203         (script): Always return the AST.
15204         (argument): Pass the state around.
15205         (arguments): Likewise.
15206         (grubcmd): Likewise.
15207         (commands): Likewise.
15208         (function): Likewise.
15209         (menuentry): Likewise.
15210         (if_statement): Likewise.
15211         (if): Likewise.
15213         * normal/script.c (grub_script_memused): Removed variable.
15214         (grub_script_parsed): Likewise.
15215         (grub_script_malloc): Added a state argument.  Use that instead of
15216         global variables.
15217         (grub_script_mem_record): Likewise.
15218         (grub_script_mem_record_stop): Likewise.
15219         (grub_script_arg_add): Likewise.
15220         (grub_script_add_arglist): Likewise.
15221         (grub_script_create_cmdline): Likewise.
15222         (grub_script_create_cmdif): Likewise.
15223         (grub_script_create_cmdmenu): Likewise.
15224         (grub_script_add_cmd): Likewise.
15225         (grub_script_parse): Setup the state before calling the parser.
15227 2006-04-16  Marco Gerards  <marco@gnu.org>
15229         * normal/command.c (grub_command_init): Remove the title command.
15231         * normal/lexer.c (grub_script_yylex): Renamed from this...
15232         (grub_script_yylex2): ... to this.
15233         (grub_script_yylex): New function.  Temporary
15234         introduced to filter some tokens.
15235         (grub_script_yyerror): Print a newline.
15237         * normal/main.c (read_config_file): Output information about the
15238         lines that contain errors.  Wait for a key after all lines have
15239         been processed.  Don't return an empty menu.
15241         * normal/parser.y (func_mem): Don't initialize.
15242         (menu_entry): Likewise.
15243         (err): New variable.
15244         (script): Don't return anything when an error was encountered.
15245         (ws, returns): Removed rules.
15246         (argument): Disabled concatenated variable support.
15247         (arguments): Remove explicit separators.
15248         (grubcmd): Likewise.
15249         (function): Likewise.
15250         (menuentry): Likewise.
15251         (if): Likewise.
15252         (commands): Likewise.  Add error handling.
15254         * normal/script.c (grub_script_create_cmdline): If
15255         `grub_script_parsed' is 0, assume the parser encountered an error.
15257 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
15259         * configure.ac: Add support for EFI. Fix the typo
15260         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
15262 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15264         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
15265         foreign multibyte characters should be shown correctly.
15267 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15269         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
15270         calculation.
15271         (read_config_file): Made it to close file before returning.
15273 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
15275         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
15276         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
15277         video/i386/pc/vbefill.c.
15279         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
15280         video/i386/pc/vbefill.c.
15282         * include/grub/video.h (grub_video_blit_format): New enum.
15283         (grub_video_mode_info): Added new member blit_format.
15284         (grub_video_get_blit_format): New function prototype.
15286         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
15287         function prototype.
15288         (grub_video_vbe_map_rgb): Likewise.
15289         (grub_video_vbe_unmap_color): Likewise.
15291         * include/grub/i386/pc/vbeblit.h: New file.
15293         * include/grub/i386/pc/vbefill.h: New file.
15295         * video/video.c (grub_video_get_blit_format): New function.
15296         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
15297         (grub_video_vbe_map_rgb): Likewise.
15298         (grub_video_vbe_unmap_color): Likewise.
15300         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
15301         optimized fills.
15302         (grub_video_vbe_blit_render_target): Changed to use more optimized
15303         blits.
15304         (grub_video_vbe_setup): Added detection for optimized settings.
15305         (grub_video_vbe_create_render_target): Likewise.
15307         * video/i386/pc/vbeblit.c: New file.
15309         * video/i386/pc/vbefill.c: New file.
15311 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
15313         * font/manager.c (grub_font_get_glyph): Removed font fixup from
15314         here...
15316         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
15317         parsing to support both hex and dec ranges.  If filename was missing
15318         show usage information.
15320 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
15322         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
15323         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
15325         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
15326         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
15327         (video_mod_SOURCES): Added.
15328         (video_mod_CFLAGS): Likewise.
15329         (video_mod_LDFLAGS): Likewise.
15330         (gfxterm_mod_SOURCES): Likewise.
15331         (gfxterm_mod_CFLAGS): Likewise.
15332         (gfxterm_mod_LDFLAGS): Likewise.
15333         (videotest_mod_SOURCES): Likewise.
15334         (videotest_mod_CFLAGS): Likewise.
15335         (videotest_mod_LDFLAGS): Likewise.
15336         (vesafb_mod_SOURCES): Removed.
15337         (vesafb_mod_CFLAGS): Likewise.
15338         (vesafb_mod_LDFLAGS): Likewise.
15339         (vga_mod_SOURCES): Likewise.
15340         (vga_mod_CFLAGS): Likewise.
15341         (vga_mod_LDFLAGS): Likewise.
15343         * commands/videotest.c: New file.
15345         * font/manager.c (fill_with_default_glyph): Modified to use
15346         grub_font_glyph.
15347         (grub_font_get_glyph): Likewise.
15348         (fontmanager): Renamed from this...
15349         (font_manager): ... to this.
15351         * include/grub/font.h (grub_font_glyph): Added new structure.
15352         (grub_font_get_glyph): Modified to use grub_font_glyph.
15354         * include/grub/misc.h (grub_abs): Added as inline function.
15356         * include/grub/video.h: New file.
15358         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
15359         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
15360         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
15361         (grub_vbe_get_controller_info): Renamed from this...
15362         (grub_vbe_bios_get_controller_info): ... to this.
15363         (grub_vbe_get_mode_info): Renamed from this...
15364         (grub_vbe_bios_get_mode_info): ... to this.
15365         (grub_vbe_set_mode): Renamed from this...
15366         (grub_vbe_bios_set_mode): ... to this.
15367         (grub_vbe_get_mode): Renamed from this...
15368         (grub_vbe_bios_get_mode): ... to this.
15369         (grub_vbe_set_memory_window): Renamed from this...
15370         (grub_vbe_bios_set_memory_window): ... to this.
15371         (grub_vbe_get_memory_window): Renamed from this...
15372         (grub_vbe_bios_get_memory_window): ... to this.
15373         (grub_vbe_set_scanline_length): Renamed from this...
15374         (grub_vbe_set_scanline_length): ... to this.
15375         (grub_vbe_get_scanline_length): Renamed from this...
15376         (grub_vbe_bios_get_scanline_length): ... to this.
15377         (grub_vbe_set_display_start): Renamed from this...
15378         (grub_vbe_bios_set_display_start): ... to this.
15379         (grub_vbe_get_display_start): Renamed from this...
15380         (grub_vbe_bios_get_display_start): ... to this.
15381         (grub_vbe_set_palette_data): Renamed from this...
15382         (grub_vbe_bios_set_palette_data): ... to this.
15383         (grub_vbe_set_pixel_rgb): Removed.
15384         (grub_vbe_set_pixel_index): Likewise.
15386         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
15387         from this...
15388         (grub_vbe_bios_get_controller_info): ... to this.
15389         (grub_vbe_get_mode_info): Renamed from this...
15390         (grub_vbe_bios_get_mode_info): ... to this.
15391         (grub_vbe_set_mode): Renamed from this...
15392         (grub_vbe_bios_set_mode): ... to this.
15393         (grub_vbe_get_mode): Renamed from this...
15394         (grub_vbe_bios_get_mode): ... to this.
15395         (grub_vbe_set_memory_window): Renamed from this...
15396         (grub_vbe_bios_set_memory_window): ... to this.
15397         (grub_vbe_get_memory_window): Renamed from this...
15398         (grub_vbe_bios_get_memory_window): ... to this.
15399         (grub_vbe_set_scanline_length): Renamed from this...
15400         (grub_vbe_set_scanline_length): ... to this.
15401         (grub_vbe_get_scanline_length): Renamed from this...
15402         (grub_vbe_bios_get_scanline_length): ... to this.
15403         (grub_vbe_set_display_start): Renamed from this...
15404         (grub_vbe_bios_set_display_start): ... to this.
15405         (grub_vbe_get_display_start): Renamed from this...
15406         (grub_vbe_bios_get_display_start): ... to this.
15407         (grub_vbe_set_palette_data): Renamed from this...
15408         (grub_vbe_bios_set_palette_data): ... to this.
15409         (grub_vbe_bios_get_controller_info): Fixed problem with registers
15410         getting corrupted after calling it.  Added more pushes and pops.
15411         (grub_vbe_bios_set_mode): Likewise.
15412         (grub_vbe_bios_get_mode): Likewise.
15413         (grub_vbe_bios_get_memory_window): Likewise.
15414         (grub_vbe_bios_set_scanline_length): Likewise.
15415         (grub_vbe_bios_get_scanline_length): Likewise.
15416         (grub_vbe_bios_get_display_start): Likewise.
15417         (grub_vbe_bios_set_palette_data): Likewise.
15419         * normal/cmdline.c (cl_set_pos): Refresh the screen.
15420         (cl_insert): Likewise.
15421         (cl_delete): Likewise.
15423         * term/gfxterm.c: New file.
15425         * term/i386/pc/vesafb.c: Removed file.
15427         * video/video.c: New file.
15429         * video/i386/pc/vbe.c (real2pm): Added new function.
15430         (grub_video_vbe_draw_pixel): Likewise.
15431         (grub_video_vbe_get_video_ptr): Likewise.
15432         (grub_video_vbe_get_pixel): Likewise
15433         (grub_video_vbe_init): Likewise.
15434         (grub_video_vbe_fini): Likewise.
15435         (grub_video_vbe_setup): Likewise.
15436         (grub_video_vbe_get_info): Likewise.
15437         (grub_video_vbe_set_palette): Likewise.
15438         (grub_video_vbe_get_palette): Likewise.
15439         (grub_video_vbe_set_viewport): Likewise.
15440         (grub_video_vbe_get_viewport): Likewise.
15441         (grub_video_vbe_map_color): Likewise.
15442         (grub_video_vbe_map_rgb): Likewise.
15443         (grub_video_vbe_map_rgba): Likewise.
15444         (grub_video_vbe_unmap_color): Likewise.
15445         (grub_video_vbe_fill_rect): Likewise.
15446         (grub_video_vbe_blit_glyph): Likewise.
15447         (grub_video_vbe_blit_bitmap): Likewise.
15448         (grub_video_vbe_blit_render_target): Likewise.
15449         (grub_video_vbe_scroll): Likewise.
15450         (grub_video_vbe_swap_buffers): Likewise.
15451         (grub_video_vbe_create_render_target): Likewise.
15452         (grub_video_vbe_delete_render_target): Likewise.
15453         (grub_video_vbe_set_active_render_target): Likewise.
15454         (grub_vbe_set_pixel_rgb): Remove function.
15455         (grub_vbe_set_pixel_index): Likewise.
15456         (index_color_mode): Remove static variable.
15457         (active_mode): Likewise.
15458         (framebuffer): Likewise.
15459         (bytes_per_scan_line): Likewise.
15460         (grub_video_vbe_adapter): Added new static variable.
15461         (framebuffer): Likewise.
15462         (render_target): Likewise.
15463         (initial_mode): Likewise.
15464         (mode_in_use): Likewise.
15465         (mode_list): Likewise.
15467 2006-03-10  Marco Gerards  <marco@gnu.org>
15469         * configure.ac (AC_INIT): Bumped to 1.93.
15471         * DISTLIST: Added `include/grub/hfs.h'.
15473 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
15475         * boot/i386/pc/boot.S (general_error): Before looping, try INT
15476         18H, which might help the BIOS falling back to next boot media.
15478 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
15480         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
15481         Poe Chen <poe.poechen@gmail.com>.
15483 2006-01-17  Marco Gerards  <marco@gnu.org>
15485         * include/grub/normal.h: Include <grub/script.h>.
15486         (grub_command_list): Removed struct.
15487         (grub_command_list_t): Removed type.
15488         (grub_menu_entry): Remove members `num' and `command_list'.  Add
15489         members `commands' and `sourcecode'.
15490         * include/grub/script.h: Add inclusion guards.
15491         (grub_script_cmd_menuentry): New struct.
15492         (grub_script_execute_menuentry): New prototype.
15493         (grub_script_lexer_record_start): Likewise.
15494         (grub_script_lexer_record_stop): Likewise.
15495         * normal/execute.c (grub_script_execute_menuentry): New function.
15496         * normal/lexer.c (record, recording, recordpos, recordlen): New
15497         variables.
15498         (grub_script_lexer_record_start): New function.
15499         (grub_script_lexer_record_stop): Likewise.
15500         (recordchar): Likewise.
15501         (nextchar): Likewise.
15502         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
15503         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
15504         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
15505         (current_menu): New variable.
15506         (free_menu): Mainly rewritten.
15507         (grub_normal_menu_addentry): New function.
15508         (read_config_file): Rewritten.
15509         * normal/menu.c (run_menu_entry): Mainly rewritten.
15510         * normal/menu_entry.c (make_screen): Rewritten the code to insert
15511         the menu entry.
15512         (run): Mainly rewritten.
15513         * normal/parser.y (menu_entry): New variable.
15514         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
15515         (menuentry): New rule.
15516         (command): Add `menuentry'.
15517         (if_statement): Allow additional returns before `fi'.
15518         * normal/script.c (grub_script_create_cmdmenu): New function.
15520 2006-01-03  Marco Gerards  <marco@gnu.org>
15522         * INSTALL: GNU Bison is required.
15523         * configure.ac: Rewritten the test to detect Bison.
15524         * Makefile.in (YACC): New variable.  Reported by Xun Sun
15525         <xun.sun.cn@gmail.com>.
15527 2006-01-03  Marco Gerards  <marco@gnu.org>
15529         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
15530         the HFS+ filesystem to filesystem blocks.
15531         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
15532         GCC warning is silenced.
15534 2006-01-03  Marco Gerards  <marco@gnu.org>
15536         * partmap/apple.c (apple_partition_map_iterate): Convert the data
15537         read from disk from big endian to host byte order.
15539 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15541         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
15542         documentation.
15543         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
15544         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
15545         embedded HFS+ filesystem.
15546         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
15547         (grub_hfs_sblock): Move from here...
15548         * include/grub/hfs.h: To here...  New file.
15549         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
15550         documentation.
15551         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
15552         New macros.
15553         (grub_hfsplus_volheader): Change type of member `magic' to
15554         `grub_uint16_t'.
15555         (grub_hfsplus_data): Add new member `embedded_offset'.
15556         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
15557         returned block.
15558         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
15559         Calculate the offset.
15561 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15563         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
15564         Removed.
15565         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
15567 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15569         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
15570         ENV->NAME is NULL after allocating ENV->VALUE.
15572 2005-12-25  Marco Gerards  <marco@gnu.org>
15574         * kern/env.c (grub_env_set): Rewritten the error handling code.
15576 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15578         * geninit.sh: Made more robust, and more portable.
15580 2005-12-25  Marco Gerards  <marco@gnu.org>
15582         Add support for Apple HFS+ filesystems.
15584         * fs/hfsplus.c: New file.
15586         * DISTLIST: Added `fs/hfsplus.c'.
15588         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
15589         (hfsplus_mod_SOURCES): New variable.
15590         (hfsplus_mod_CFLAGS): Likewise.
15591         (hfsplus_mod_LDFLAGS): Likewise.
15592         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
15593         (grub_setup_SOURCES): Likewise.
15594         (grub_mkdevicemap_SOURCES): Likewise.
15595         (grub_emu_SOURCES): Likewise.
15596         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15598         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
15600         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
15602 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15604         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
15605         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
15606         include/grub/parser.h, include/grub/script.h, kern/parser.c,
15607         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
15608         normal/lexer.c, normal/parser.y, normal/script.c, and
15609         partmap/gpt.c.
15610         Removed kern/sparc64/cache.c.
15612         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
15613         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
15614         grub_emu_init.c.
15616         * configure.ac (AC_INIT): Bumped to 1.92.
15618 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
15620         * kern/err.c (grub_error_push): Added new function to support error
15621         stacks.
15622         (grub_error_pop): Likewise.
15623         (grub_error_stack_items): New local variable to support error stacks.
15624         (grub_error_stack_pos): Likewise.
15625         (grub_error_stack_assert): Likewise.
15626         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
15627         stack depth.
15628         (grub_print_error): Added support to print errors from error stack.
15630         * include/grub/err.h (grub_error_push): Added function prototype.
15631         (grub_error_pop): Likewise.
15633 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
15635         * configure.ac: Accept `powerpc64' as host_cpu.
15636         (amd64): Rename to `biarch32'.
15638         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
15639         non-cacheline-aligned addresses.
15641         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
15642         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
15643         if `size' is non-zero.
15645 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
15647         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
15648         and `cd' to make sure the filename is not prefixed with a
15649         directory name.
15650         (pkgdata_MODULES): Add `gpt.mod'.
15651         (gpt_mod_SOURCES): New variable.
15652         (gpt_mod_CFLAGS): Likewise.
15653         (gpt_mod_LDFLAGS): Likewise.
15655         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
15657         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
15658         New macro.
15660         * partmap/gpt.c: New file.
15662         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
15663         GPT partition map is detected.
15665 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
15667         * commands/i386/pc/play.c: New file.
15668         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
15669         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
15670         macros.
15672 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
15674         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
15675         ((unused))' to silence gcc warning.
15677 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
15679         * configure.ac: Correct `AC_PROG_YACC' test.
15681 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15683         * util/powerpc/ieee1275/grub-install.in: Run the mount point
15684         check before installing files.
15686 2005-11-22  Mike Small  <smallm@panix.com>
15688         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
15689         number regex so multidigit numbers are recognized correctly.
15691 2005-11-22  Mike Small  <smallm@panix.com>
15693         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
15694         debugging message before attempting to claim memory.
15695         (grub_rescue_cmd_initrd): Add a claim debugging message and try
15696         multiple addresses in case of failure.
15698 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15700         * term/tparm.c (get_space): Remove empty `if' statement.
15702         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
15704         * kern/parser.c (check_varstate): Rename `state' to 's'.
15706 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15708         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
15709         variable definitions to the beginning of each function.  Sort stack
15710         variables by size.
15711         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
15712         `buf' argument to `char *'.
15714 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
15716         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
15717         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15718         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15719         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15720         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15721         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15722         configfile.mod, search.mod, gzio.mod and test.mod.
15723         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15724         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15725         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15726         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15727         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15728         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15729         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15730         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15731         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15732         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15733         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15734         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15735         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15736         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15737         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15738         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15739         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15740         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15741         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15742         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15743         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15744         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15745         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
15747         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
15748         `grep --include'.
15749         (pkgdata_MODULES): Add test.mod.
15751 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15753         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
15754         appending to variables with "+=".
15755         (PModule): Use full pathname to generate *.lst filenames.
15757         * Makefile.in: Fixed list rules moved from genmk.rb.
15758         (.DELETE_ON_ERROR): New special target.
15759         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
15761         * conf/i386-pc.rmk: Include conf/common.mk.
15762         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15763         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15764         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15765         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15766         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15767         configfile.mod, search.mod, gzio.mod and test.mod.
15768         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15769         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15770         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15771         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15772         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15773         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15774         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15775         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15776         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15777         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15778         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15779         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15780         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15781         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15782         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15783         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15784         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15785         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15786         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15787         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15788         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15789         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15790         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
15791         here...
15792         * conf/common.rmk: ... to here.  New file.
15794         * conf/common.mk: New file.
15796 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
15798         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
15799         (grub_script.tab.c): ... here.
15801         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
15802         (grub_script.tab.c): ... here.
15804         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
15805         (grub_script.tab.c): ... here.
15807         * normal/command.c (grub_command_find): Fixed a memory leak of
15808         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
15810 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15812         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
15813         "@" which marks the start of a comment on ARM.
15814         (VARIABLE): Likewise.
15816 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15818         Add support for Linux/ADFS partition tables.
15820         * partmap/acorn.c: New file.
15822         * include/grub/acorn_filecore.h: Likewise.
15824         * DISTLIST: Added `partmap/acorn.c' and
15825         `include/grub/acorn_filecore.h'.
15827         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15828         `partmap/acorn.c'.
15829         (pkgdata_MODULES): Add `acorn.mod'.
15830         (acorn_mod_SOURCES): New variable.
15831         (acorn_mod_CFLAGS): Likewise.
15833         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15834         `partmap/acorn.c'.
15835         (pkgdata_MODULES): Add `acorn.mod'.
15836         (acorn_mod_SOURCES): New variable.
15837         (acorn_mod_CFLAGS): Likewise.
15839         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
15840         (pkgdata_MODULES): Add `acorn.mod'.
15841         (acorn_mod_SOURCES): New variable.
15842         (acorn_mod_CFLAGS): Likewise.
15843         (acorn_mod_LDFLAGS): Likewise.
15845         * include/types.h (grub_disk_addr_t): New typedef.
15847 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
15849         * geninit.sh: New file.
15851         * geninitheader.sh: Likewise.
15853         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
15854         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
15855         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
15856         * commands/configfile.c (grub_configfile_init)
15857         (grub_configfile_fini): Likewise.
15858         * commands/default.c (grub_default_init, grub_default_fini):
15859         Likewise.
15860         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
15861         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
15862         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
15863         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
15864         Likewise.
15865         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
15866         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
15867         Likewise.
15868         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
15869         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
15870         Likewise.
15871         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
15872         Likewise.
15873         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
15874         Likewise.
15875         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
15876         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
15877         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
15878         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
15879         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
15880         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
15881         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
15882         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
15883         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
15884         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
15885         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
15886         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
15887         * partmap/amiga.c (grub_amiga_partition_map_init)
15888         (grub_amiga_partition_map_fini): Likewise.
15889         * partmap/apple.c (grub_apple_partition_map_init)
15890         (grub_apple_partition_map_fini): Likewise.
15891         * partmap/pc.c (grub_pc_partition_map_init)
15892         (grub_pc_partition_map_fini): Likewise.
15893         * partmap/sun.c (grub_sun_partition_map_init,
15894         grub_sun_partition_map_fini): Likewise.
15895         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
15896         Likewise.
15898         * util/grub-emu.c: Include <grub_modules_init.h>.
15899         (main): Don't initialize and de-initialize any modules directly,
15900         use `grub_init_all' and `grub_fini_all' instead.
15902         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
15903         `grub_vesafb_mod_init'.
15904         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
15905         all users.
15906         * term/i386/pc/vga.c (grub_vga_init): Renamed to
15907         `grub_vga_mod_init'.  Updated all users.
15908         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
15910         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
15911         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
15912         rules.
15914         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
15915         Generate a function to initialize the module in utilities.
15916         Updated all callers.
15917         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
15918         initialize the module in utilities.  Updated all callers.
15920 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15922         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
15923         escape sequence and a literal ^L to clear the screen.
15925         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
15926         when returning from Open Firmware.
15928 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
15930         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
15931         (grub_ofconsole_height): Likewise.
15932         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
15933         manually insert a '\n'.
15934         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
15935         `grub_ofconsole_height'.  Return early if these are already set.
15937 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
15939         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15940         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
15941         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
15942         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
15943         and `normal/script.c'.
15944         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15945         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15946         (test_mod_SOURCES): New variable.
15947         (test_mod_CFLAGS): Likewise.
15948         (test_mod_LDFLAGS): Likewise.
15949         (pkgdata_MODULES): Add `test.mod'.
15950         (grub_script.tab.c): New rule.
15951         (grub_script.tab.h): Likewise.
15953 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
15955         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15956         `commands/test.c', `normal/execute.c', `normal/lexer.c',
15957         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15958         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15959         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15960         (test_mod_SOURCES): New variable.
15961         (test_mod_CFLAGS): Likewise.
15962         (pkgdata_MODULES): Add `test.mod'.
15963         (grub_script.tab.c): New rule.
15964         (grub_script.tab.h): Likewise.
15966 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
15968         Add initial scripting support.
15970         * commands/test.c: New file.
15971         * include/grub/script.h: Likewise.
15972         * normal/execute.c: Likewise.
15973         * normal/function.c: Likewise.
15974         * normal/lexer.c: Likewise.
15975         * normal/parser.y: Likewise.
15976         * normal/script.c: Likewise.
15978         * configure.ac: Add `AC_PROG_YACC' test.
15980         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
15981         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
15982         `normal/function.c' and `normal/script.c'.
15983         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15984         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15985         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
15986         variables.
15987         (pkgdata_MODULES): Add `test.mod'.
15988         (grub_script.tab.c): New rule.
15989         (grub_script.tab.h): Likewise.
15991         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
15993         * include/grub/normal.h (grub_test_init): New prototype.
15994         (grub_test_fini): Likewise.
15996         * normal/command.c: Include <grub/script.h>.
15997         (grub_command_execute): Rewritten.
15999         * util/grub-emu.c (main): Call `grub_test_init' and
16000         `grub_test_fini'.
16002 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16004         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
16005         to 0.
16006         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
16007         there are no pending characters.
16009 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16011         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
16012         `grub_strndup' to drop device arguments. Replace unnecessary
16013         `grub_strndup' with `grub_strdup'.
16015 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16017         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
16018         `debug' environment variable has been set.
16020 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16022         * Makefile.in (install-local): Use $(DATA).
16023         (uninstall): Likewise.
16024         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
16025         (sbin_UTILITIES): ... to here.
16026         (sbin_SCRIPTS): New variable.
16027         (grub_install_SOURCES): New variable.
16028         * util/powerpc/ieee1275/grub-install.in: New file.
16029         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
16030         variable.
16031         (add_segments): Call `grub_util_get_path'.
16033 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
16035         From Timothy Baldwin:
16036         * commands/ls.c (grub_ls_list_files): Close FILE with
16037         grub_file_close.
16038         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
16040 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
16042         * include/grub/parser.h: New file.
16044         * kern/parser.c: Likewise.
16046         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
16047         (grub_setup_SOURCES): Likewise.
16048         (grub_probefs_SOURCES): Likewise.
16049         (grub_emu_SOURCES): Likewise.
16050         (kernel_img_HEADERS): Add `parser.h'.
16052         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16053         (grub_emu_SOURCES): Add `kern/parser.c'.
16054         (grubof_SOURCES): Likewise.
16056         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16057         (grubof_SOURCES): Add `kern/parser.c'.
16059         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
16061         * kern/misc.c (grub_split_cmdline): Removed function.
16063         * kern/rescue.c: Include <grub/parser.h>.
16064         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
16065         of `grub_split_cmdline'.
16067         * normal/command.c: Include <grub/parser.h>.
16068         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
16069         of `grub_split_cmdline'.
16071         * normal/completion.c: Include <grub/parser.h>.
16072         (cmdline_state): New variable.
16073         (iterate_dir): End the filename with a quote depending on the
16074         command line state.
16075         (get_state): new function.
16076         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
16077         split the arguments and determine the current argument.  When the
16078         argument string is not quoted, escape all spaces.
16080 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16082         * normal/sparc64/setjmp.S: New file.
16084 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16086         * include/grub/sparc64/libgcc.h: New file.
16087         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
16088         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
16089         normal/sparc64/setjmp.c.
16091 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16093         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
16094         * kern/sparc64/cache.S: New file.
16095         * kern/sparc64/cache.c: Removed.
16096         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
16097         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
16098         -mtune=ultrasparc.
16099         (COMMON_LDFLAGS): Add -melf64_sparc.
16100         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
16101         (grubof_SOURCES): Use cache.S instead of cache.c.
16102         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
16103         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
16104         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
16105         commented though.
16106         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
16107         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
16108         (linux_mod_CFLAGS): Commented out.
16109         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
16110         out because module isn't built.
16111         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
16112         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
16113         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
16114         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
16115         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
16116         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16117         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16118         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
16119         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
16120         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
16121         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16122         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16123         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
16124         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
16126 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
16128         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
16129         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
16130         longer, because HFS should not be used on PC.
16132 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16134         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
16135         consistently within the loop.
16137 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
16139         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
16140         directory can not be read.
16142 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16144         * configure.ac (AC_INIT): Increase the version number to 1.91.
16146         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
16147         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
16148         term/i386/pc/serial.c.
16150 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16152         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
16153         file size must be permitted.
16155         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
16156         between %ah and %al.
16158 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16160         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
16161         grub_uint64_t.
16162         Call the hook with a NUL-terminated filename.
16163         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
16164         grub_cpu_to_be32.
16166         * kern/term.c (cursor_state): New variable.
16167         (grub_term_set_current): Reset the cursor state on a new
16168         terminal.
16169         (grub_setcursor): Rewritten to use CURSOR_STATE.
16170         (grub_getcursor): New function.
16172         * include/grub/term.h (grub_getcursor): New prototype.
16174         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
16175         integers on ARM. Reported by Timothy Baldwin
16176         <T.E.Baldwin99@members.leeds.ac.uk>.
16178 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
16180         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
16181         allocated.
16182         (grub_sfs_dir): Likewise.
16184 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
16186         Add support for the SFS filesystem.
16188         * fs/sfs.c: New file.
16190         * DISTLIST: Added `fs/sfs.c'.
16192         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
16193         (grub_probefs_SOURCES): Likewise.
16194         (grub_emu_SOURCES): Likewise.
16195         (pkgdata_MODULES): Add `sfs.mod'.
16196         (sfs_mod_SOURCES): New variable.
16197         (sfs_mod_CFLAGS): Likewise.
16198         (sfs_mod_LDFLAGS): Likewise.
16200         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
16201         (pkgdata_MODULES): Add `sfs.mod'.
16202         (sfs_mod_SOURCES): New variable.
16203         (sfs_mod_CFLAGS): Likewise.
16205         * util/grub-emu.c (main): Call `grub_sfs_init' and
16206         `grub_sfs_fini'.
16208         * include/grub/fs.h (grub_sfs_init): New prototype.
16209         (grub_sfs_fini): Likewise.
16211 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
16213         Add support for the AFFS filesystem.
16215         * fs/affs.c: New file.
16217         * DISTLIST: Added `fs/affs.c'.
16219         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
16220         (grub_probefs_SOURCES): Likewise.
16221         (grub_emu_SOURCES): Likewise.
16222         (pkgdata_MODULES): Add `affs.mod'.
16223         (affs_mod_SOURCES): New variable.
16224         (affs_mod_CFLAGS): Likewise.
16225         (affs_mod_LDFLAGS): Likewise.
16227         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
16228         (pkgdata_MODULES): Add `affs.mod'.
16229         (affs_mod_SOURCES): New variable.
16230         (affs_mod_CFLAGS): Likewise.
16232         * util/grub-emu.c (main): Call `grub_affs_init' and
16233         `grub_affs_fini'.
16235         * include/grub/fs.h (grub_affs_init): New prototype.
16236         (grub_affs_fini): Likewise.
16238 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16240         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
16242 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16244         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
16245         `-m32' to CFLAGS.
16247         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
16248         linking.
16250         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
16251         (COMMON_LDFLAGS): New variable.
16252         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
16253         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
16254         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
16255         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
16256         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
16257         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
16258         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
16259         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
16260         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
16261         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
16262         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16263         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16264         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
16265         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
16266         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
16267         variables.
16268         (normal_mod_ASFLAGS): Add `-m32'.
16270         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
16271         (grub_host_size_t, grub_host_ssize_t): New types.
16272         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
16273         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
16274         `GRUB_HOST_SIZEOF_VOID_P'.
16276         * include/grub/kernel.h (struct grub_module_header): Type of
16277         member offset changed to `grub_host_off_t'.  Type of member size
16278         changed to `grub_host_size_t'.
16279         (struct grub_module_info): Type of member offset changed to
16280         `grub_host_off_t'.  Type of member size changed to
16281         `grub_host_size_t'.
16283 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
16285         Make GRUB's kernel compliant to Multiboot Specification.
16287         * kern/i386/pc/startup.S (multiboot_header): New label.
16288         (multiboot_entry): Likewise.
16289         (multiboot_trampoline): Likewise.
16291         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16292         Increased to 0x4A0.
16294         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
16295         put parentheses after a question mark.
16296         [!GRUB_UTIL] (my_mod): New variable.
16298         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
16300 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
16302         Adds support for the XFS filesystem.  Btrees are not supported
16303         yet.
16305         * fs/xfs.c: New file.
16307         * DISTLIST: Added `fs/xfs.c'.
16309         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
16310         (grub_probefs_SOURCES): Likewise.
16311         (grub_emu_SOURCES): Likewise.
16312         (pkgdata_MODULES): Add `xfs.mod'.
16313         (xfs_mod_SOURCES): New variable.
16314         (xfs_mod_CFLAGS): Likewise.
16316         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
16317         (pkgdata_MODULES): Add `xfs.mod'.
16318         (xfs_mod_SOURCES): New variable.
16319         (xfs_mod_CFLAGS): Likewise.
16321         * util/grub-emu.c (main): Call `grub_xfs_init' and
16322         `grub_xfs_fini'.
16324         * include/grub/fs.h (grub_xfs_init): New prototype.
16325         (grub_xfs_fini): Likewise.
16328 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
16330         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
16331         color modes, allow greater than 16 colors to be configured as
16332         a default palette.
16334 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
16336         * normal/completion.c (complete_arguments): Add the qualifier
16337         const into OPTIONS.
16339         From Omniflux <omniflux+lists@omniflux.com>:
16340         * include/grub/terminfo.h: New file.
16341         * include/grub/tparm.h: Likewise.
16342         * include/grub/i386/pc/serial.h: Likewise.
16343         * term/terminfo.c: Likewise.
16344         * term/tparm.c: Likewise.
16345         * term/i386/pc/serial.c: Likewise.
16346         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
16347         serial.mod.
16348         (terminfo_mod_SOURCES): New variable.
16349         (terminfo_mod_CFLAGS): Likewise.
16350         (serial_mod_SOURCES): Likewise.
16351         (serial_mod_CFLAGS): Likewise.
16353 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
16355         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
16356         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
16357         and kern/powerpc/ieee1275/cmain.c, respectively.
16359         * boot/powerpc/ieee1275/crt0.S: Moved to ...
16360         * kern/powerpc/ieee1275/crt0.S: ... here.
16362         * boot/powerpc/ieee1275/cmain.c: Moved to ...
16363         * kern/powerpc/ieee1275/cmain.c: ... here.
16365         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
16366         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
16367         instead of boot/powerpc/ieee1275/crt0.S and
16368         boot/powerpc/ieee1275/cmain.c, respectively.
16370         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
16371         sectors. It was not used anyway.
16373 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16375         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
16376         `unused parameter' warning.
16378 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16380         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
16381         function.
16382         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
16383         getcharwidth.
16385 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
16387         * include/grub/normal.h (enum grub_completion_type): Added
16388         `GRUB_COMPLETION_TYPE_ARGUMENT'.
16390         * normal/cmdline.c (print_completion): Handle
16391         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
16392         * normal/menu_entry.c (store_completion): Likewise.
16394         * normal/completion.c (complete_arguments): New function.
16395         (grub_normal_do_completion): Call `complete_arguments' when the
16396         current words start with a dash.
16398 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
16400         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
16401         `gzio.mod' instead of `io.mod').
16403 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
16405         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
16406         (DISTDIRS): Added io and video.
16407         Rewrite the search routine to make an output consistently.
16409         * DISTLIST: Added conf/sparc64-ieee1275.mk,
16410         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
16411         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
16412         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
16413         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
16414         util/powerpc/ieee1275/misc.c.
16416         * include/grub/gzio.h: New file.
16417         * io/gzio.c: Likewise.
16419         * kern/file.c (grub_file_close): Call grub_device_close only if
16420         FILE->DEVICE is not NULL.
16422         * include/grub/mm.h [!NULL] (NULL): New macro.
16424         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
16426         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
16427         (pkgdata_MODULES): Added gzio.mod.
16428         (gzio_mod_SOURCES): New variable.
16429         (gzio_mod_CFLAGS): Likewise.
16431         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
16432         (pkgdata_MODULES): Added gzio.mod.
16433         (gzio_mod_SOURCES): New variable.
16434         (gzio_mod_CFLAGS): Likewise.
16436         * commands/cat.c: Include grub/gzio.h.
16437         (grub_cmd_cat): Use grub_gzfile_open instead of
16438         grub_file_open.
16440         * commands/cmp.c: Include grub/gzio.h.
16441         (grub_cmd_cmp): Use grub_gzfile_open instead of
16442         grub_file_open.
16444         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
16445         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
16446         grub_file_open.
16447         (grub_rescue_cmd_module): Likewise.
16449 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16451         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
16452         kern/sparc64/ieee1275/init.c because it contains _start.
16453         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
16455 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16457         * configure.ac: Add support for sparc64 host with ieee1275
16458         firmware.
16459         * configure: Generated from configure.ac.
16460         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
16461         instead of int.
16462         (grub_ofdisk_read): Likewise.
16463         (grub_ofdisk_open): Use %p to print pointer values, and cast the
16464         pointers as (void *) to remove a warning.
16465         (grub_ofdisk_close): Likewise.
16466         (grub_ofdisk_read): Likewise.
16467         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
16468         returns, so make it return void to remove a warning.
16469         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
16470         Corresponding prototype change.
16471         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
16472         values, and cast the pointers as (void *) to remove a warning.
16473         (grub_mm_dump): Likewise.
16474         * conf/sparc64-ieee1275.mk: New file.
16475         * conf/sparc64-ieee1275.rmk: Likewise.
16476         * include/grub/sparc64/setjmp.h: Likewise.
16477         * include/grub/sparc64/types.h: Likewise.
16478         * include/grub/sparc64/ieee1275/console.h: Likewise.
16479         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
16480         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
16481         * include/grub/sparc64/ieee1275/time.h: Likewise.
16482         * kern/sparc64/cache.c: Likewise.
16483         * kern/sparc64/dl.c: Likewise.
16484         * kern/sparc64/ieee1275/init.c: Likewise.
16485         * kern/sparc64/ieee1275/openfw.c: Likewise.
16487 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16489         * util/console.c (grub_ncurses_putchar): If C is greater than
16490         0x7f, set C to a question mark.
16491         (grub_ncurses_getcharwidth): New function.
16492         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
16493         getcharwidth.
16495         * normal/menu.c (print_entry): Made aware of Unicode. First,
16496         convert TITLE to UCS-4, and predict the cursor position by
16497         grub_getcharwidth.
16499         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
16500         const to SRC.
16501         * kern/misc.c (grub_utf16_to_utf8): Likewise.
16503 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16505         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
16506         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16507         grub_strcat.
16509         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
16510         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16511         grub_strcpy and grub_strlen. Take it into account that a space
16512         character is inserted as a delimiter.
16514 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16516         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
16517         invalid magic in the error.
16519         * commands/search.c: New file.
16521         * util/grub-emu.c (main): Call grub_search_init and
16522         grub_search_fini.
16524         * kern/rescue.c (grub_rescue_print_disks): Removed.
16525         (grub_rescue_print_devices): New function.
16526         (grub_rescue_cmd_ls): Use grub_device_iterate with
16527         grub_rescue_print_devices instead of grub_disk_dev_iterate with
16528         grub_rescue_print_disks.
16530         * kern/partition.c (grub_partition_iterate): Return the result of
16531         PARTMAP->ITERATE instead of GRUB_ERRNO.
16533         * kern/device.c: Include grub/partition.h.
16534         (grub_device_iterate): New function.
16536         * include/grub/partition.h (grub_partition_iterate): Return int
16537         instead of grub_err_t.
16539         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
16540         prototype.
16541         [GRUB_UTIL] (grub_search_fini): Likewise.
16543         * include/grub/device.h (grub_device_iterate): New prototype.
16545         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16546         commands/search.c.
16547         (pkgdata_MODULES): Added search.mod.
16548         (search_mod_SOURCES): New variable.
16549         (search_mod_CFLAGS): Likewise.
16551         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
16552         (pkgdata_MODULES): Added search.mod.
16553         (search_mod_SOURCES): New variable.
16554         (search_mod_CFLAGS): Likewise.
16556         * commands/ls.c (grub_ls_list_disks): Renamed to ...
16557         (grub_ls_list_devices): ... this, and use grub_device_iterate.
16558         All callers changed.
16560         * DISTLIST: Added commands/search.c.
16562 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16564         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
16565         conversion.
16566         (grub_getcharwidth): New function.
16568         * kern/misc.c (grub_utf8_to_ucs4): New function.
16570         * include/grub/term.h (struct grub_term): Added a new member
16571         "getcharwidth".
16572         (grub_getcharwidth): New prototype.
16574         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
16576         * term/i386/pc/console.c (map_char): New function. Segregated from
16577         grub_console_putchar.
16578         (grub_console_putchar): Use map_char.
16579         (grub_console_getcharwidth): New function.
16580         (grub_console_term): Specified grub_console_getcharwidth as
16581         getcharwidth.
16583         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
16584         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
16586         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
16587         GRUB_ERRNO.
16588         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
16589         on grub_strtoul completely.
16590         (write_char): Declare local variables in the beginning of the
16591         function.
16592         (grub_vesafb_getcharwidth): New function.
16593         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
16594         getcharwidth.
16596 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
16598         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
16599         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
16600         commands/i386/pc/vbetest.c.
16602         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
16603         call grub_vbe_get_controller_info again, because the returned
16604         information is volatile.
16605         (grub_vbe_set_video_mode): Mostly rewritten.
16606         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
16607         grub_vbe_status_t correctly.
16608         (grub_vbe_get_video_mode_info): Likewise.
16609         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
16610         several if statements.
16612         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
16613         * commands/i386/pc/vbeinfo.c: ... this.
16615         * commands/i386/pc/vbe_test.c: Renamed to ...
16616         * commands/i386/pc/vbetest.c: ... this.
16618         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
16619         ...
16620         (grub_cmd_vbeinfo): ... this. Save video modes before
16621         iterating. Skip a video mode, if it is not available, not enough
16622         information is given or it is monochrome. Show the memory
16623         model. Leave the interpretation of MODEVAR to grub_strtoul
16624         completely.
16625         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
16626         (GRUB_MOD_FINI): Likewise.
16628         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
16629         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
16630         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
16631         duplicated grub_env_get. Leave the interpretation of MODEVAR to
16632         grub_strtoul completely.
16633         (real2pm): Removed.
16634         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
16635         (GRUB_MOD_FINI): Likewise.
16637         * normal/misc.c: Include grub/mm.h.
16639         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
16640         vbe_list_modes with vbetest.mod and vbeinfo.mod.
16641         (vbe_list_modes_mod_SOURCES): Removed.
16642         (vbe_list_modes_mod_CFLAGS): Likewise.
16643         (vbe_test_mod_SOURCES): Likewise.
16644         (vbe_test_mod_CFLAGS): Likewise.
16645         (vbeinfo_mod_SOURCES): New variable.
16646         (vbeinfo_mod_CFLAGS): Likewise.
16647         (vbetest_mod_SOURCES): Likewise.
16648         (vbetest_mod_CFLAGS): Likewise.
16650 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
16652         * normal/misc.c: New file.
16654         * DISTLIST: Added normal/misc.c.
16656         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
16657         DISK to HOOK. Call HOOK with DISK.
16658         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16659         * partmap/pc.c (pc_partition_map_iterate): Likewise.
16660         * partmap/sun.c (sun_partition_map_iterate): Likewise.
16662         * normal/menu_entry.c (struct screen): Added a new member
16663         "completion_shown".
16664         (completion_buffer): New global variable.
16665         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
16666         (store_completion): New function.
16667         (complete): Likewise.
16668         (clear_completions): Likewise.
16669         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
16670         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
16671         a tab, call complete.
16673         * normal/completion.c (disk_dev): Removed.
16674         (print_simple_completion): Likewise.
16675         (print_partition_completion): Likewise.
16676         (print_func): New global variable.
16677         (add_completion): Do not take the arguments WHAT or PRINT any
16678         longer. Added a new argument TYPE. Instead of printing directly,
16679         call PRINT_FUNC if not NULL.
16680         All callers changed.
16681         (complete_device): Use a local variable DEV instead of
16682         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
16683         (grub_normal_do_completion): Take a new argument HOOK. Do not
16684         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
16685         empty string, return NULL instead.
16686         All callers changed.
16688         * normal/cmdline.c (print_completion): New function.
16690         * kern/partition.c (grub_partition_iterate): Add an argument DISK
16691         to HOOK.
16692         All callers changed.
16694         * kern/disk.c (grub_print_partinfo): Removed.
16696         * include/grub/partition.h (struct grub_partition_map): Add a new
16697         argument DISK into HOOK of ITERATE.
16698         (grub_partition_iterate): Add a new argument DISK to HOOK.
16700         * include/grub/normal.h (enum grub_completion_type): New enum.
16701         (grub_completion_type_t): New type.
16702         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
16703         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
16704         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
16705         (GRUB_COMPLETION_TYPE_FILE): Likewise.
16706         (grub_normal_do_completion): Added a new argument HOOK.
16707         (grub_normal_print_device_info): New prototype.
16709         * include/grub/disk.h (grub_print_partinfo): Removed.
16711         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
16712         (normal_mod_SOURCES): Likewise.
16713         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16714         (normal_mod_SOURCES): Likewise.
16716         * commands/ls.c (grub_ls_list_disks): Use
16717         grub_normal_print_device_info instead of grub_print_partinfo. Free
16718         PNAME.
16719         (grub_ls_list_files): Use grub_normal_print_device_info instead of
16720         duplicating the code.
16722 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16724         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
16725         follow GCS more precisely.
16726         * commands/i386/pc/vbe_test.c: Likewise.
16727         * include/grub/i386/pc/vbe.h: Likewise.
16728         * term/i386/pc/vesafb.c: Likewise.
16729         * video/i386/pc/vbe.c: Likewise.
16731 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
16733         * DISTLIST: Added term/i386/pc/vesafb.c
16734         DISTLIST: Added video/i386/pc/vbe.c
16735         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
16736         DISTLIST: Added commands/i386/pc/vbe_test.c.
16737         * commands/i386/pc/vbe_list_modes.c: New file.
16738         * commands/i386/pc/vbe_test.c: Likewise.
16739         * term/i386/pc/vesafb.c: Likewise.
16740         * video/i386/pc/vbe.c: Likewise.
16741         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
16742         (grub_vbe_probe) Added prototype.
16743         (grub_vbe_set_video_mode) Likewise.
16744         (grub_vbe_get_video_mode) Likewise.
16745         (grub_vbe_get_video_mode_info) Likewise.
16746         (grub_vbe_set_pixel_rgb) Likewise.
16747         (grub_vbe_set_pixel_index) Likewise.
16748         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
16749         (pkgdata_MODULES): Added vesafb.mod.
16750         (pkgdata_MODULES): Added vbe_list_modes.mod.
16751         (pkgdata_MODULES): Added vbe_test.mod.
16752         (vbe_mod_SOURCES): Added.
16753         (vbe_mod_CFLAGS): Likewise.
16754         (vesafb_mod_SOURCES): Likewise.
16755         (vesafb_mod_CFLAGS): Likewise.
16756         (vbe_list_modes_mod_SOURCES): Likewise.
16757         (vbe_list_modes_mod_CFLAGS): Likewise.
16758         (vbe_test_mod_SOURCES): Likewise.
16759         (vbe_test_mod_CFLAGS): Likewise.
16761 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
16763         * normal/command.c (grub_command_execute): If INTERACTIVE is
16764         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
16765         CMDLINE. Disable the pager if INTERACTIVE is true.
16766         All callers are changed.
16768         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
16769         before reading a config file.
16770         * normal/main.c (read_config_file): Even if a command is not
16771         found, register it if it is within an entry.
16773         * util/grub-emu.c: Include sys/types.h and unistd.h.
16774         (options): Added --hold.
16775         (struct arguments): Added a new member "hold".
16776         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
16777         missing.
16778         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
16779         cleared by a debugger, if it is not zero.
16781         * include/grub/normal.h (grub_command_execute): Add an argument
16782         INTERACTIVE.
16784 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
16786         * DISTLIST: Added include/grub/i386/pc/vbe.h.
16788 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
16790         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
16791         program with another one, because the old one didn't detect a bug
16792         in gcc-3.4. Always use regparm 2, because the new test is still
16793         not enough for gcc-4.0. Someone must investigate a simple test
16794         case which detects a bug in gcc-4.0.
16796 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
16798         * DISTLIST: Added normal/completion.c.
16800         * normal/completion.c: New file.
16802         * term/i386/pc/console.c (grub_console_getwh): New function.
16803         (grub_console_term): Assign grub_console_getwh to getwh.
16805         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
16806         function is defined in normal/completion.c as
16807         grub_normal_do_completion.
16808         (grub_cmdline_get): Use grub_normal_do_completion instead of
16809         grub_tab_complete.
16811         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
16812         returns non-zero, otherwise return 0.
16813         (grub_partition_iterate): First, probe the partition map. Then,
16814         call ITERATE only for this partition map.
16816         * kern/misc.c (grub_strncmp): Rewritten.
16818         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
16819         returns non-zero. Otherwise return 0.
16821         * include/grub/partition.h (grub_partition_map_iterate): Return
16822         int instead of void.
16824         * include/grub/normal.h (grub_normal_do_completion): New prototype.
16826         * include/grub/misc.h (grub_strncmp): Change the type of N to
16827         grub_size_t.
16829         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
16830         of void.
16832         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
16833         unsigned explicitly before comparing it with I.
16835         * kern/main.c (grub_env_write_root): Add the attribute unused into
16836         VAR.
16838         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16839         normal/completion.c.
16840         (normal_mod_SOURCES): Likewise.
16841         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
16842         (normal_mod_SOURCES): Likewise.
16844         * normal/command.c (grub_iterate_commands): If ITERATE returns
16845         non-zero, return one immediately.
16847 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
16849         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
16850         * kern/i386/pc/startup.S: Updated Global Descriptor table's
16851         descriptions.
16852         (grub_vbe_get_controller_info): New function.
16853         (grub_vbe_get_mode_info): Likewise.
16854         (grub_vbe_set_mode): Likewise.
16855         (grub_vbe_get_mode): Likewise.
16856         (grub_vbe_set_memory_window): Likewise.
16857         (grub_vbe_get_memory_window): Likewise.
16858         (grub_vbe_set_scanline_length): Likewise.
16859         (grub_vbe_get_scanline_length): Likewise.
16860         (grub_vbe_set_display_start): Likewise.
16861         (grub_vbe_get_display_start): Likewise.
16862         (grub_vbe_set_palette_data): Likewise.
16863         * include/grub/i386/pc/vbe.h: New file.
16865 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16867         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16868         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
16869         * DISTLIST: Likewise.
16870         * kern/ieee1275/of.c: Moved to ...
16871         * kern/ieee1275/ieee1275.c: ... here.
16873 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16875         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
16876         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
16877         Pass 0 as `end' parameter to grub_strtoul().
16879 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
16881         * include/grub/powerpc/ieee1275/console.h: Do not include
16882         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
16883         ifdef.
16884         (grub_console_cur_color): Remove i386-specific prototype.
16885         (grub_console_real_putchar): Likewise.
16886         (grub_console_checkkey): Likewise.
16887         (grub_console_getkey): Likewise.
16888         (grub_console_getxy): Likewise.
16889         (grub_console_gotoxy): Likewise.
16890         (grub_console_cls): Likewise.
16891         (grub_console_setcursor): Likewise.
16892         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
16893         Include <grub/machine/console.h>.
16894         * term/ieee1275/ofconsole.c: Likewise.
16896 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
16898         * Makefile.in (LIBLZO): New variable.
16900         * configure.ac: Check for LZO version 2.
16902         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
16903         lzo/lzo1x.h instead of lzo1x.h.
16905         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
16906         of -llzo.
16908         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
16909         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
16911         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
16912         copying the data from PARTITION to P.
16914 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16916         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
16917         negative, unload the module.
16919         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
16920         map is "pc_partition_map" but not "pc".
16921         (usage): Fix the description. The options are --boot-image and
16922         --core-image but not --boot-file or --core-file.
16923         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
16924         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
16925         DEFAULT_DIRECTORY.
16927         * util/i386/pc/grub-install.in: Do not specify --boot-file or
16928         --core-file. Specify INSTALL_DEVICE as an argument.
16930         * util/console.c: Include config.h.
16931         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
16932         [HAVE_NCURSES_H]: Include ncurses.h.
16933         [HAVE_CURSES_H]: Include curses.h.
16934         [!A_NORMAL] (A_NORMAL): Defined as zero.
16935         [!A_STANDOUT] (A_STANDOUT): Likewise.
16937         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
16938         -lncurses.
16939         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
16941         * configure.ac: Check for curses libraries and headers.
16943         * Makefile.in (LIBCURSES): New variable.
16945         * genmk.rb (Script::rule): Set the executable bits.
16947         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
16948         name of the PC partition map is "pc_partition_map" but not "pc".
16950 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16952         * util/i386/pc/grub-install.in (grub_probefs): New variable.
16953         (modules): Likewise.
16954         (usage): Added descriptions for --modules and --grub-probefs.
16955         Handle --modules and --grub-probefs. Save the arguments in MODULES
16956         and GRUB_PROBEFS, respectively.
16957         Auto-detect a filesystem module against GRUBDIR. If the result is
16958         empty and modules are not specified explicitly, abort the
16959         installation. Add the result to MODULES.
16961         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
16962         disk/powerpc/ieee1275/ofdisk.c,
16963         include/grub/powerpc/ieee1275/init.h and
16964         term/powerpc/ieee1275/ofconsole.c.
16965         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
16966         term/ieee1275/ofconsole.c.
16968         * include/grub/powerpc/ieee1275/console.h: Resurrected.
16970         * COPYING: Upgraded to the latest version. Only the address of the
16971         FSF office has changed.
16973 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
16975         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16976         kern/ieee1275.c with kern/ieee1275/of.c.
16978         * kern/ieee1275.c: Moved to ...
16979         * kern/ieee1275/of.c: ... here.
16981 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
16983         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
16984         readability.
16986         * config.guess: Updated to the latest version from gnulib.
16987         * config.sub: Likewise.
16988         * install.sh: Likewise.
16989         * mkinstalldirs: Likewise.
16991         * include/grub/console.h: Removed. This file is arch-specific. Do
16992         not put this in include/grub.
16994         * include/grub/i386/pc/console.h: Resurrected.
16996         * util/console.c: Include grub/machine/console.h instead of
16997         grub/console.h.
16998         * util/grub-emu.c: Likewise.
17000 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
17002         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
17003         hardcoded value.
17005         From Vincent Pelletier  <subdino2004@yahoo.fr>
17006         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
17007         Redefined to use grub_getwh.
17008         (grub_term): New member named getwh.
17009         (grub_getwh): New prototype.
17010         * kern/term.c (grub_getwh): New function.
17011         * term/i386/pc/console.c (grub_console_getwh): New function.
17012         (grub_console_term): New member `getwh'.
17013         * term/i386/pc/vga.c (grub_vga_getwh): New function.
17014         (grub_vga_term): New member `getwh'.
17015         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
17016         grub_ssize_t.
17017         (grub_ofconsole_getw): New function.
17018         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
17019         (grub_ofconsole_term): New field named getwh and new initial
17020         value.
17022 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
17024         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
17025         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
17026         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
17027         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
17028         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
17029         of <grub/machine/ieee1275.h>.
17030         * commands/ieee1275/reboot.c: Likewise.
17031         * boot/powerpc/ieee1275/ieee1275.c: Move ...
17032         * kern/ieee1275.c: ... to here.  All users updated.  Change all
17033         parameter structs to use new type `grub_ieee1275_cell_t'.
17034         * term/powerpc/ieee1275/ofconsole.c: Move ...
17035         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
17036         * disk/powerpc/ieee1275/ofdisk.c: Move ...
17037         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
17038         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
17039         to return int.
17040         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
17041         Remove unused prototypes.  All users updated.
17042         * include/grub/powerpc/ieee1275/console.h: Removed.
17043         * include/grub/powerpc/ieee1275/ieee1275.h: Define
17044         `grub_ieee1275_cell_t'.
17045         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
17046         Cast comparisons with -1 to the correct type.
17047         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
17048         type to match `grub_ieee1275_entry_fn'.
17050 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
17052         * DISTLIST: Added util/i386/pc/grub-probefs.c.
17054         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
17055         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
17056         partmap/sun.c.
17057         (grub_probefs_SOURCES): New variable.
17059         * util/i386/pc/grub-probefs.c: New file.
17061         * util/i386/pc/grub-setup.c (main): Call
17062         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
17063         grub_hfs_init and grub_jfs_init to initialize the system. Call
17064         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
17065         grub_pc_partition_map_fini to finish the system.
17067 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
17069         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
17070         function.
17071         (grub_multiboot_load_elf32): Likewise.
17072         (grub_multiboot_is_elf64): Likewise.
17073         (grub_multiboot_load_elf64): Likewise.
17074         (grub_multiboot_load_elf): Likewise.
17075         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
17076         an ELF32 or ELF64 file.
17077         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
17079         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
17080         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
17081         NULL before calling FS->LABEL.
17082         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
17083         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
17084         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
17085         before calling FS->LABEL.
17087 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
17089         * util/i386/pc/grub-install.in (datadir): New variable.
17090         (libdir): Removed.
17091         (pkgdatadir): New variable.
17092         (pkglibdir): Removed.
17094 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
17096         * DISTLIST: Added util/i386/pc/grub-install.in.
17098         * util/i386/pc/grub-install.in: New file.
17100         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
17101         (grub_install_SOURCES): Likewise.
17103         * genmk.rb: Added support for scripts.
17104         (Script): New class.
17105         (scripts): New variable.
17107         * Makefile.in (install-local): Install sbin_SCRIPTS by
17108         INSTALL_SCRIPT.
17109         (uninstall): Remove sbin_SCRIPTS.
17111         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
17112         device, try to get a GRUB device by
17113         grub_util_biosdisk_get_grub_dev.
17114         Free DEST_DEV.
17116         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
17117         description for --device-map.
17119 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17121         Change the semantics of variable hooks. They now return strings
17122         instead of error values.
17124         * util/i386/pc/grub-setup.c: Include grub/env.h.
17125         (setup): Use grub_device_set_root instead of grub_env_set.
17127         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
17128         grub_env_get instead of grub_device_set_root and
17129         grub_device_get_root, respectively.
17131         * kern/main.c (grub_env_write_root): New function.
17132         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
17133         grub_env_set instead of grub_device_set_root.
17135         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
17136         many variables.
17137         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
17138         rather than calling ENV->WRITE_HOOK afterwards.
17139         (grub_env_get): Return the result of ENV->READ_HOOK rather than
17140         passing a pointer of a pointer.
17141         (grub_register_variable_hook): Change the types of "read_hook" and
17142         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
17143         respectively.
17144         Allocate the default empty string on the heap, because this string
17145         may be freed later.
17147         * kern/device.c: Include grub/env.h.
17148         (grub_device_set_root): Removed.
17149         (grub_device_get_root): Likewise.
17150         (grub_device_open): Use grub_env_get instead of
17151         grub_device_get_root.
17153         * include/grub/env.h (grub_env_read_hook_t): New type.
17154         (grub_env_write_hook_t): Likewise.
17155         (grub_env_var): Change the types of "read_hook" and "write_hook"
17156         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
17157         (grub_register_variable_hook): Likewise.
17159         * include/grub/device.h (grub_device_set_root): Removed.
17160         (grub_device_set_root): Likewise.
17162         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
17163         make sure that DIRNAME terminates with '/', so that
17164         grub_fat_find_dir will fail if PATH is not a directory.
17166         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
17167         from DIRNAME.
17168         Use the qualifier auto for print_files and print_files_long.
17169         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
17170         as a regular file.
17171         Put a newline only if there is no error.
17172         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
17173         used.
17175 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17177         * kern/partition.c (grub_partition_probe): Initialize PART to
17178         NULL. Otherwise, when no partition map is registered, this returns
17179         a garbage.
17181 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
17183         * partmap/apple.c (apple_partition_map_iterate): Check if POS
17184         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
17185         valid.
17187 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
17189         * commands/ls.c (grub_ls_list_disks): Print the filesystem
17190         information on each device, if it does not have partitions. Print
17191         "Device" instead of "Disk", because this function is not specific
17192         to disk devices.
17194         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
17195         static to ensure that it is put on the memory rather than a
17196         register.
17198 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17200         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
17201         (grub_cat_init): Likewise.
17202         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
17203         (options): Likewise.
17204         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
17205         (grub_configfile_init): Likewise.
17206         * font/manager.c (GRUB_MOD_INIT): Likewise.
17207         * commands/help.c (GRUB_MOD_INIT): Likewise.
17208         (grub_help_init): Likewise.
17209         * normal/command.c (grub_command_init): Likewise.
17210         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
17211         * disk/loopback.c (grub_loop_init): Likewise.
17212         (GRUB_MOD_INIT): Likewise.
17213         * commands/ls.c (grub_ls_init): Likewise.
17214         (GRUB_MOD_INIT): Likewise.
17215         (options): Likewise.
17216         * commands/boot.c (grub_boot_init): Likewise.
17217         (GRUB_MOD_INIT): Likewise.
17218         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
17219         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
17220         (GRUB_MOD_INIT): Likewise.
17221         * commands/cmp.c (grub_cmp_init): Likewise.
17222         (GRUB_MOD_INIT): Likewise.
17224         * normal/arg.c: Use <> instead of "" to include header files.
17225         (SHORT_ARG_HELP): New macro.
17226         (SHORT_ARG_USAGE): Likewise.
17227         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
17228         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
17229         descriptions.
17230         (find_short): Check if C is 'h' or 'u' explicitly.
17231         (grub_arg_show_help): Use space characters instead of tabs. Treat
17232         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
17233         are shown with --help and --usage only if they are not used for
17234         the command itself.
17235         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
17236         'h' and 'u'.
17238         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
17239         const into "longarg". Change the type of "shortarg" to int.
17241 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17243         * boot/i386/pc/boot.S (boot_drive_check): New label.
17245         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
17246         macro.
17248         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
17249         which do not pass a boot drive correctly. Copied from GRUB Legacy.
17251 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17253         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
17254         When turning off Gate A20, skip the check and return immediately,
17255         because this is not fatal usually.
17257 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17259         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
17260         be 0x7C00 instead of 0x8000.
17262         * boot/i386/pc/pxeboot.S: Rewritten.
17264         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
17265         EXT_C.
17266         (gate_a20_check_state): Read a byte from 0x108000. Invert the
17267         result.
17269 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
17271         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
17272         robustness. This routine now supports a BIOS call and System
17273         Control Port A to modify the gate A20.
17275         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17276         Increased to 0x440.
17278 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
17280         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
17281         device path and resulting ihandle.
17282         (grub_ofdisk_close): dprintf the ihandle being closed.
17283         (grub_ofdisk_read): dprintf function parameters.
17284         * kern/mm.c (grub_mm_init_region): Likewise.
17285         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
17286         (grub_linux_boot): dprintf the Linux entry point, initrd address and
17287         size, and boot arguments.
17288         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
17289         before loading into memory.
17290         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
17291         before loading into memory.
17293 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
17295         * kern/mm.c: Added much documentation.
17296         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
17297         8, set to 5 instead of 8.
17299 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17301         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
17303         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
17304         (grub_mkdevicemap_SOURCES): New variable.
17306         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
17307         lib/device.c of GRUB Legacy.
17309 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17311         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
17312         instead of PATH is NULL.
17314 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
17316         * commands/cmp.c (BUFFER_SIZE): New macro.
17317         (grub_cmd_cmp): Close the right file at the right time.  Compare
17318         only data just read.  Don't report files of different  size as
17319         identical.  Dynamically allocate buffers.  Move variable
17320         declarations at the beginning of function.
17322 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
17324         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
17325         reverse.
17327 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
17329         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
17330         when backspace is pressed at beginning of line.
17332 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
17334         * DISTLIST: Added genfslist.sh.
17336         * normal/main.c (fs_module_list): New variable.
17337         (autoload_fs_module): New function.
17338         (read_fs_list): Likewise.
17339         (grub_normal_execute): Call read_fs_list.
17341         * kern/fs.c (grub_fs_autoload_hook): New variable.
17342         (grub_fs_probe): Added support for auto-loading.
17344         * include/grub/normal.h (struct grub_fs_module_list): New struct.
17345         (grub_fs_module_list_t): New type.
17347         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
17348         (grub_fs_autoload_hook): New prototype.
17350         * genfslist.sh: New file.
17352         * genmk.rb: Added a rule to generate a filesystem list.
17354 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
17356         * configure.ac: Fix the test for cross-compiling.
17358         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
17359         define GRUB_UTIL anymore.
17361         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
17362         so this function works on other systems than just big endian.
17363         (load_modules): Likewise.
17364         (add_segments): Likewise.
17366 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
17368         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
17369         contains `l' modifier, get a long from va_arg().
17371 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
17373         * kern/mm.c (grub_free): If the next free block which is being
17374         merged is the first free block, set the first block to the block
17375         being freed.
17376         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
17378 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17380         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
17381         `grub_ieee1275_chosen'.
17383 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17385         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
17386         (grub_ieee1275_chosen): New variable.
17387         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
17388         `chosen'.
17389         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
17390         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17391         Rename first argument to `phandle' for consistency.
17392         (grub_ieee1275_get_property_length): Likewise.
17393         (grub_ieee1275_next_property): Likewise.  Change type of first argument
17394         to grub_ieee1275_phandle_t.
17395         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
17396         Move export next to declaration.
17397         (grub_ieee1275_chosen): New variable.
17398         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
17399         Correct cosmetic typo.
17400         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
17401         `grub_ieee1275_chosen'.
17402         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
17403         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
17404         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
17405         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
17406         `grub_ieee1275_chosen'.
17408 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
17410         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
17411         /chosen/bootargs.
17412         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
17413         /chosen/bootargs as "variable=value" pairs.
17415 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
17417         * include/grub/misc.h (grub_dprintf): New macro.
17418         (grub_real_dprintf): New prototype.
17419         (grub_strword): Likewise.
17420         (grub_iswordseparator): Likewise.
17421         * kern/misc.c (grub_real_dprintf): New function.
17422         (grub_strword): Likewise.
17423         (grub_iswordseparator): Likewise.
17425 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
17427         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
17428         (roundup): Remove macro.
17429         (grub_ieee1275_flags): Make static.
17430         (grub_ieee1275_realmode): Remove.
17431         (grub_ieee1275_test_flag): New function.
17432         (grub_ieee1275_set_flag): Likewise.
17433         (find_options): Rename to `grub_ieee1275_find_options'; update
17434         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
17435         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
17436         (cmain): New prototype.
17437         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
17438         `grub_ieee1275_flags' directly.
17439         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
17440         machine/biosdisk.h.
17441         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
17442         Don't include grub/machine/init.h.
17443         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
17444         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17445         Remove prototype.
17446         (grub_ieee1275_realmode): Likewise.
17447         (grub_ieee1275_flag): New enum.
17448         (grub_ieee1275_test_flag): New prototype.
17449         (grub_ieee1275_set_flag): New prototype.
17450         * include/grub/powerpc/ieee1275/init.h: Remove file.
17451         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
17452         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
17453         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
17454         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
17455         comment.
17456         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
17457         `grub_ieee1275_test_flag'.
17458         (grub_ieee1275_encode_devname): Likewise.
17460 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
17462         * include/grub/powerpc/ieee1275/ieee1275.h
17463         (grub_ieee1275_encode_devname): New prototype.
17464         (grub_ieee1275_get_filename): Likewise.
17465         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
17466         function.
17467         (grub_set_prefix): Likewise.
17468         (grub_machine_init): Call grub_set_prefix.
17469         * kern/powerpc/ieee1275/openfw.c: Fix typos.
17470         (grub_parse_type): New enum.
17471         (grub_ieee1275_get_devargs): New function.
17472         (grub_ieee1275_get_devname): Likewise.
17473         (grub_ieee1275_parse_args): Likewise.
17474         (grub_ieee1275_get_filename): Likewise.
17475         (grub_ieee1275_encode_devname): Likewise.
17477 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
17479         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
17480         `grub_loader_unset'.
17482 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
17484         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
17485         instead of grub_ieee1275_interpret.
17486         (grub_halt_init): New function.
17487         (grub_halt_fini): Likewise.
17488         (GRUB_MOD_INIT): Correct message grammar.
17489         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
17490         instead of grub_ieee1275_interpret.
17491         (grub_reboot_init): New function.
17492         (grub_reboot_fini): Likewise.
17493         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
17494         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
17495         util/i386/pc/misc.c with commands/ieee1275/halt.c,
17496         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
17497         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
17498         function.
17499         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
17500         Add prototype.
17501         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
17502         prototype.
17503         (grub_halt): Likewise.
17504         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
17505         (cmain): Remove __attribute__((unused)).
17506         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
17507         (grub_heap_len): Likewise.
17508         (grub_machine_fini): New function.
17509         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
17510         (grub_halt): Likewise.
17511         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
17512         function.
17513         * util/powerpc/ieee1275/misc.c: New file.
17515 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
17517         * DISTLIST: New file.
17518         * gendistlist.sh: Likewise.
17520         * Makefile.in (COMMON_DISTFILES): Removed.
17521         (BOOT_DISTFILES): Likewise.
17522         (CONF_DISTFILES): Likewise.
17523         (DISK_DISTFILES): Likewise.
17524         (FS_DISTFILES): Likewise.
17525         (INCLUDE_DISTFILES): Likewise.
17526         (KERN_DISTFILES): Likewise.
17527         (LOADER_DISTFILES): Likewise.
17528         (TERM_DISTFILES): Likewise.
17529         (UTIL_DISTFILES): Likewise.
17530         (DISTFILES): Likewise.
17531         (uninstall): Uninstall files in $(pkgdata_DATA).
17532         (DISTLIST): New target.
17533         (distdir): Use the contents of the file DISTLIST to get a list of
17534         distributed files.
17536 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
17538         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
17539         descriptor. This is ported from GRUB Legacy.
17541         * gencmdlist.sh: Added an extra semicolon to make it work with
17542         old sed versions. Reported by Robert Bihlmeyer
17543         <robbe@orcus.priv.at>.
17545 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
17547         Automatic loading of commands is supported.
17549         * normal/main.c (read_command_list): New function.
17550         (grub_normal_execute): Call read_command_list.
17552         * normal/command.c (grub_register_command): Return zero or CMD.
17553         Allocate CMD->NAME from the heap.
17554         Initialize CMD->MODULE_NAME to zero.
17555         Find the same name as well. If the same command is found and it is
17556         a dummy command, overwrite members. If it is not a dummy command,
17557         return zero.
17558         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
17559         (grub_command_find): If a dummy command is found, load a module
17560         and retry to find a command only once.
17562         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
17563         make sure that each command is loaded.
17565         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
17566         macro.
17567         (struct grub_command): Remove const from the member `name'.
17568         Add a new member `module_name'.
17569         (grub_register_command): Return grub_command_t.
17571         * commands/help.c (grub_cmd_help): Call grub_command_find to make
17572         sure that each command is loaded.
17574         * genmk.rb (PModule::rule): Specify a module name without the
17575         suffix ".mod" to gencmdlist.sh.
17577 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17579         * gencmdlist.sh: New file.
17581         * genmk.rb (PModule::rule): Generate a rule for a command list.
17582         Clean command.lst.
17583         Generate command.lst from $(COMMANDFILES).
17585         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
17586         (DATA): Added $(pkgdata_DATA).
17587         (install-local): Install files in $(pkgdata_DATA).
17589 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17591         * term/i386/pc/vga.c (debug_command): Removed.
17592         (GRUB_MOD_INIT): Do not register the command "debug".
17594         From Hollis Blanchard:
17595         * commands/configfile.c: New file.
17596         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17597         commands/configfile.c.
17598         (pkgdata_MODULES): Added configfile.mod.
17599         (configfile_mod_SOURCES): New variable.
17600         (configfile_mod_CFLAGS): Likewise.
17601         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17602         commands/configfile.c.
17603         (pkgdata_MODULES): Added configfile.mod.
17604         (configfile_mod_SOURCES): New variable.
17605         (configfile_mod_CFLAGS): Likewise.
17606         * util/grub-emu.c (main): Call grub_configfile_init and
17607         grub_configfile_fini.
17608         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
17609         prototype.
17610         [GRUB_UTIL] (grub_configfile_fini): Likewise.
17612 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17614         * normal/arg.c (grub_arg_show_help): Do not show the bug report
17615         address.
17617         * commands/help.c (grub_cmd_help): Do not print newlines after
17618         the last command in print_command_help.
17620 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17622         * commands/default.h: New file.
17623         * commands/timeout.h: Likewise.
17624         * normal/context.c: Likewise.
17626         * util/misc.c: Do not include sys/times.h.
17627         Include sys/time.h and grub/machine/time.h.
17628         (grub_get_rtc): Rewritten with gettimeofday.
17630         * util/grub-emu.c (main): Call grub_default_init and
17631         grub_timeout_init before grub_normal_init, and call
17632         grub_timeout_fini and grub_default_fini after grub_main.
17634         * util/console.c (grub_ncurses_checkkey): Return the read
17635         character or -1.
17637         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
17638         timeouts.
17640         * normal/main.c (read_config_file): Push MENU. If this fails,
17641         print an error and wait for a user input.
17642         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
17643         If a menu is empty or an error occurs, pop MENU.
17644         (grub_normal_execute): Pop and free MENU after grub_menu_run
17645         returns.
17647         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
17649         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
17650         include time.h.
17651         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17652         without GRUB_UTIL.
17653         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
17654         time.h.
17655         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17656         without GRUB_UTIL.
17658         * include/grub/normal.h (struct grub_menu_list): New struct.
17659         (grub_menu_list_t): New type.
17660         (struct grub_context): New struct.
17661         (grub_context_t): New type.
17662         (grub_register_command): Got rid of EXPORT_FUNC.
17663         (grub_unregister_command): Likewise.
17664         (grub_context_get): New prototype.
17665         (grub_context_get_current_menu): Likewise.
17666         (grub_context_push_menu): Likewise.
17667         (grub_context_pop_menu): Likewise.
17668         [GRUB_UTIL] (grub_default_init): Likewise.
17669         [GRUB_UTIL] (grub_default_fini): Likewise.
17670         [GRUB_UTIL] (grub_timeout_init): Likewise.
17671         [GRUB_UTIL] (grub_timeout_fini): Likewise.
17673         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
17674         commands/timeout.c and normal/context.c.
17675         (pkgdata_MODULES): Added default.mod and timeout.mod.
17676         (normal_mod_SOURCES): Added normal/context.c.
17677         (default_mod_SOURCES): New variable.
17678         (default_mod_CFLAGS): Likewise.
17679         (timeout_mod_SOURCES): Likewise.
17680         (timeout_mod_CFLAGS): Likewise.
17681         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
17682         conf/i386-pc.rmk.
17683         (pkgdata_MODULES): Added default.mod and timeout.mod.
17684         (normal_mod_SOURCES): Added normal/context.c.
17685         (default_mod_SOURCES): New variable.
17686         (default_mod_CFLAGS): Likewise.
17687         (timeout_mod_SOURCES): Likewise.
17688         (timeout_mod_CFLAGS): Likewise.
17690         * Makefile.in (all-local): Added $(MKFILES).
17692 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
17694         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
17695         (grub_emu_SOURCES): Likewise.
17696         (pkgdata_MODULES): Add `sun.mod'.
17697         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17698         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17699         `partmap/sun.c'.
17700         (pkgdata_MODULES): Add `sun.mod'.
17701         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17702         * include/grub/partition.h (grub_sun_partition_map_init): New
17703         prototype.
17704         (grub_sun_partition_map_fini): Likewise.
17705         * partmap/sun.c: New file.
17706         * util/grub-emu.c (main): Initialize and de-initialize the sun
17707         partitionmap support.
17709 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
17711         This implements an Emacs-like menu entry editor.
17713         * normal/menu_entry.c: New file.
17715         * util/console.c (grub_ncurses_putchar): Translate some Unicode
17716         characters to ASCII.
17717         (saved_char): New variable.
17718         (grub_ncurses_checkkey): Rewritten completely.
17719         (grub_ncurses_getkey): Likewise.
17720         (grub_ncurses_init): Call raw instead of cbreak.
17722         * normal/menu.c (print_entry): Do not put a space.
17723         (init_page): Renamed to ...
17724         (grub_menu_init_page): ... this. All callers changed.
17725         (edit_menu_entry): Removed.
17726         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
17728         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
17730         * kern/misc.c (grub_vprintf): Call grub_refresh.
17732         * normal/menu.c (DISP_LEFT): Renamed to ...
17733         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
17734         * normal/menu.c (DISP_UP): Renamed to ...
17735         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
17736         * normal/menu.c (DISP_RIGHT): Renamed to ...
17737         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
17738         * normal/menu.c (DISP_DOWN): Renamed to ...
17739         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
17740         * normal/menu.c (DISP_HLINE): Renamed to ...
17741         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
17742         * normal/menu.c (DISP_VLINE): Renamed to ...
17743         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
17744         * normal/menu.c (DISP_UL): Renamed to ...
17745         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
17746         * normal/menu.c (DISP_UR): Renamed to ...
17747         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
17748         * normal/menu.c (DISP_LL): Renamed to ...
17749         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
17750         * normal/menu.c (DISP_LR): Renamed to ...
17751         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
17752         * normal/menu.c (TERM_WIDTH): Renamed to ...
17753         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
17754         * normal/menu.c (TERM_HEIGHT): Renamed to ...
17755         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
17756         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
17757         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
17758         * normal/menu.c (TERM_MARGIN): Renamed to ...
17759         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
17760         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
17761         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
17762         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
17763         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
17764         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
17765         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
17766         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
17767         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
17768         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
17769         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
17770         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
17771         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
17772         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
17773         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
17774         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
17775         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
17776         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
17777         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
17778         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
17779         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
17780         All callers changed.
17782         * include/grub/normal.h: New prototype.
17784         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17785         normal/menu_entry.c.
17786         (normal_mod_SOURCES): Likewise.
17787         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17788         (normal_mod_SOURCES): Likewise.
17790 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
17792         * include/grub/normal.h (grub_halt_init): New prototype.
17793         (grub_halt_fini): Likewise.
17794         (grub_reboot_init): Likewise.
17795         (grub_reboot_fini): Likewise.
17797         * util/grub-emu.c: Include signal.h.
17798         (main_env): New global variable.
17799         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
17800         catch C-c.
17801         (grub_machine_fini): New function.
17802         (main): Call grub_halt_init and grub_reboot_init before
17803         grub_main, and grub_reboot_fini and grub_halt_fini after it.
17804         Call setjmp with MAIN_ENV to go back afterwards.
17805         Call grub_machine_fini right before return.
17807         * include/grub/util/misc.h: Include setjmp.h.
17808         (main_env): New prototype.
17810         * include/grub/kernel.h (grub_machine_fini): New prototype.
17811         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
17812         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
17814         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
17815         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
17816         * term/i386/pc/console.c (grub_console_fini): Likewise.
17818         * util/i386/pc/misc.c: New file.
17820         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17821         util/i386/pc/misc.c, commands/i386/pc/halt.c and
17822         commands/i386/pc/reboot.c.
17824 2005-02-14  Guillem Jover  <guillem@hadrons.org>
17826         * include/grub/dl.h (grub_dl_check_header): New prototype.
17827         (grub_arch_dl_check_header): Change return type to grub_err_t,
17828         remove size parameter and export function.  Update all callers.
17829         * kern/dl.c (grub_dl_check_header): New function.
17830         (grub_dl_load_core): Use `grub_dl_check_header' instead of
17831         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
17832         are inside the core.
17833         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
17834         independent ELF header checks.
17835         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17836         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
17837         `grub_dl_check_header' instead of explicit checks.  Check for the
17838         ELF type.
17839         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
17840         `grub_dl_check_header' instead of explicit checks.  Remove arch
17841         specific ELF header checks.
17843         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
17844         argument SIZE.
17846 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
17848         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
17849         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
17851 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
17853         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
17854         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
17855         (part_map_iterate): Clear `grub_errno' and return 0 if
17856         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
17857         * partmap/amiga.c (amiga_partition_map_iterate): Return
17858         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
17859         * partmap/apple.c (apple_partition_map_iterate): Likewise.
17861 2005-02-01  Guillem Jover  <guillem@hadrons.org>
17863         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
17864         help info.
17866 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17868         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
17869         Removed prototype.
17870         (grub_rescue_cmd_linux): New prototype.
17871         (grub_rescue_cmd_initrd): Likewise.
17872         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
17873         `bi_rec'.
17874         (grub_linux_release_mem): Release the memory for the initrd.
17875         (grub_load_linux): Renamed from this...
17876         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
17877         Changed `entry' not to be static.  Loop over memory regions to
17878         find another one when the default fails.
17879         (grub_rescue_cmd_initrd): New function.
17880         (grub_linux_init): Remove function.
17881         (grub_linux_fini): Likewise.
17882         (GRUB_MOD_INIT): Register `initrd'.
17883         (GRUB_MOD_FINI): Unregister `initrd'.
17884         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
17885         Function removed.
17886         (grub_linux_normal_fini): Likewise.
17887         (GRUB_MOD_INIT): Register `initrd'.
17888         (GRUB_MOD_FINI): Unregister `initrd'.
17890 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17892         * commands/help.c: New file.
17893         * normal/arg.c (show_help): Renamed to...
17894         (grub_arg_show_help): ... this.
17895         * commands/i386/pc/halt.c: New file.
17896         * commands/i386/pc/reboot.c: Likewise.
17897         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
17898         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
17899         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
17900         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
17901         variables.
17902         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17903         `commands/help.c'.
17904         (pkgdata_MODULES): Add `help.mod'.
17905         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
17906         * grub/i386/pc/init.h (grub_reboot): New prototype.
17907         (grub_halt): Likewise.
17908         * include/grub/normal.h (grub_arg_show_help): New prototype.
17909         (grub_help_init): Likewise.
17910         (grub_help_fini): Likewise.
17911         * util/grub-emu.c (main): Initialize and deinitialize the help
17912         command.
17914         * normal/cmdline.c (grub_cmdline_get): Doc fix.
17916         * normal/command.c (grub_command_init): Fixed the description of
17917         the `set' and `unset' commands.
17919 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
17921         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
17922         function.
17923         * commands/ieee1275/halt.c: New file.
17924         * commands/ieee1275/reboot.c: Likewise.
17925         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
17926         `__attribute__ ((unused))'.  Some GCS related fixed.
17927         (grub_suspend_init) [GRUB_UTIL]: Function removed.
17928         (grub_suspend_fini): Likewise.
17929         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
17930         and `halt.mod'.
17931         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
17932         (halt_mod_CFLAGS): New variables.
17933         * include/grub/powerpc/ieee1275/ieee1275.h
17934         (grub_ieee1275_interpret): New prototype.
17936 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
17938         * include/grub/misc.h (memmove): New prototype.
17939         (memcpy): Likewise.
17941 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
17943         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
17944         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
17946 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
17948         * kern/misc.c (grub_strndup): Function rewritten.
17950 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
17952         * normal/menu.c (TERM_WIDTH): Macro redefined.
17953         (TERM_TOP_BORDER_Y): Likewise.
17954         (draw_border): Replaced while-loop by a for-loop.  Make the number
17955         of lines consistent with the number of lines displayed in
17956         print_entries.  Added a margin below the rectangle.
17957         (print_entry): Make the entry fit in the rectangle.
17958         (print_entries): Display the scroll arrows next to the right
17959         border.
17961 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17963         * fs/minix.c (grub_minix_find_file): Reserve more space for
17964         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
17965         `grub_strncpy' to copy `path' into it.
17967 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
17969         Add the loopback device, a device via which files can be accessed
17970         as devices.
17972         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
17973         (pkgdata_MODULES): Add loopback.mod.
17974         (loopback_mod_SOURCES): New variable.
17975         (loopback_mod_CFLAGS): Likewise.
17976         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17977         `disk/loopback.c'.
17978         (pkgdata_MODULES): Add loopback.mod.
17979         (loopback_mod_SOURCES): New variable.
17980         (loopback_mod_CFLAGS): Likewise.
17981         * disk/loopback.c: new file.
17982         * include/grub/normal.h (grub_loop_init): New prototype.
17983         (grub_loop_fini): New prototype.
17984         * util/grub-emu.c (main): Initialize and de-initialize loopback
17985         support.
17986         * include/grub/disk.h (grub_disk_dev_id): Add
17987         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
17989 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
17991         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
17992         function.
17993         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
17994         (suspend_mod_SOURCES): New variable.
17995         (suspend_mod_CFLAGS): Likewise.
17996         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
17997         New prototype.
17998         * commands/ieee1275/suspend.c: New file.
18000 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
18002         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
18003         ((unused))' to `__attribute__ ((used))'.
18004         (GRUB_MOD_FINI): Likewise.
18005         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
18006         * genmk.rb (PModule): Assign space to common symbols when linking
18007         modules.
18009 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
18011         * include/grub/mm.h (grub_mm_init_region): Change the type of the
18012         `unsigned' arguments to `grub_size_t'.
18013         (grub_malloc): Likewise.
18014         (grub_realloc): Likewise.
18015         (grub_memalign): Likewise.
18016         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
18017         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18018         * util/misc.c (grub_malloc): Likewise.
18019         (grub_realloc): Likewise.
18020         * kern/mm.c (get_header_from_pointer): Change the casts to
18021         `unsigned' into a cast to `grub_size_t'.
18023         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
18024         point to `currnode' when `currnode' is changed.
18026         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
18027         Schottelius <nico-linux@schottelius.org>.
18029 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
18031         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
18032         (note_path): Remove variable.
18033         (GRUB_IEEE1275_NOTE_NAME): New macro.
18034         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
18035         (grub_ieee1275_note_hdr): New structure.
18036         (grub_ieee1275_note_desc): Likewise.
18037         (grub_ieee1275_note): Likewise.
18038         (load_note): Remove `dir' argument.  All callers updated.  Remove
18039         `note_img' and `path'.  Do not load a file from `note_path'.
18040         Initialize a struct grub_ieee1275_note and write that to `out'.
18041         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
18043 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
18045         * util/misc.c (grub_util_read_image): Revert last change.  It
18046         called `grub_util_read_at', which seeks from the beginning of the
18047         file.
18049 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
18051         * TODO: Add note about endianness in grub-mkimage.
18052         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
18053         section.
18054         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
18055         (grub_mkimage_SOURCES): New target.
18056         * include/grub/kernel.h (grub_start_addr): Remove variable.
18057         (grub_end_addr): Likewise.
18058         (grub_total_module_size): Likewise.
18059         (grub_kernel_image_size): Likewise.
18060         (GRUB_MODULE_MAGIC): New constant.
18061         (grub_module_info): New structure.
18062         (grub_arch_modules_addr): New prototype.
18063         (grub_get_end_addr): Remove prototype.
18064         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
18065         * include/grub/powerpc/ieee1275/kernel.h: New file.
18066         * include/grub/util/misc.h (grub_util_get_fp_size): New
18067         prototype.
18068         (grub_util_read_at): Likewise.
18069         (grub_util_write_image_at): Likewise.
18070         * kern/main.c (grub_get_end_addr): Remove function.
18071         (grub_load_modules): Call grub_arch_modules_addr instead of using
18072         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
18073         the grub_module_info fields instead of calling grub_get_end_addr
18074         as loop conditions.  Move grub_add_unused_region code here.
18075         (grub_add_unused_region): Remove function.
18076         * kern/i386/pc/init.c: Include grub/cache.h.
18077         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
18078         one call to add_mem_region.
18079         (grub_arch_modules_addr): New function.
18080         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
18081         (grub_total_module_size): Likewise.
18082         Include grub/machine/kernel.h.
18083         (grub_arch_modules_addr): New function.
18084         * util/grub-emu.c (grub_end_addr): Remove variable.
18085         (grub_total_module_size): Likewise.
18086         (grub_arch_modules_addr): New function.
18087         * util/misc.c: Include unistd.h.
18088         (grub_util_get_fp_size): New function.
18089         (grub_util_read_at): Likewise.
18090         (grub_util_write_image_at): Likewise.
18091         (grub_util_read_image): Call grub_util_read_at.
18092         (grub_util_write_image): Call grub_util_write_image_at.
18093         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
18094         additional memory in kernel_img for a struct grub_module_info.
18095         Fill in that grub_module_info.
18096         * util/powerpc/ieee1275/grub-mkimage.c: New file.
18098 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18100         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
18101         New function.
18102         * include/grub/powerpc/ieee1275/ieee1275.h
18103         (grub_ieee1275_milliseconds): New prototype.
18104         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
18105         Change to 1000.
18106         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
18107         grub_ieee1275_milliseconds.
18109 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18111         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
18112         variable.
18113         (find_options): New function.
18114         (cmain): Call find_options.
18115         * include/grub/powerpc/ieee1275/ieee1275.h
18116         (grub_ieee1275_realmode): New extern variable.
18117         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
18118         grub_map if grub_ieee1275_realmode is false.
18120 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
18122         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
18123         lines are inserted and make it work like readline.  Reported by
18124         Vincent Pelletier <subdino2004@yahoo.fr>.
18126 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
18128         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
18130         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
18131         `kern/powerpc/cache.S'.
18133 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
18135         * genmk.rb: Handle the `Program' class in the main loop.  Written
18136         by Johan Rydberg <jrydberg@gnu.org>.
18137         (Program): New class.
18138         (programs): New variable.
18139         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
18140         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
18141         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
18142         (help_arch): Function removed.
18143         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
18144         `powerpc/libgcc.h' and `loader.h'.
18145         (pkgdata_PROGRAMS): New variable.
18146         (sbin_UTILITIES): Variable removed.
18147         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
18148         (grubof_SOURCES): Variable re-defined so it only includes the
18149         core functionality.
18150         (grubof_CFLAGS): Remove `-DGRUBOF'.
18151         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
18152         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
18153         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
18154         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
18155         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
18156         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
18157         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
18158         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
18159         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
18160         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
18161         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
18162         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
18163         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
18164         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
18165         (pc_mod_CFLAGS): New variables.
18166         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
18167         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
18168         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
18169         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
18170         Moved from here...
18171         * include/grub/i386/pc/init.h (grub_os_area_addr)
18172         (rub_os_area_size): ... to here.
18173         * include/grub/powerpc/ieee1275/ieee1275.h
18174         (grub_ieee1275_entry_fn): Export symbol.
18175         * include/grub/powerpc/ieee1275/init.h: New file.
18176         * include/grub/powerpc/libgcc.h: Likewise.
18177         * include/grub/cache.h: Likewise.
18178         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
18179         <hollis@penguinppc.org>.
18180         * kern/dl.c: Include <grub/cache.h>.
18181         (grub_dl_flush_cache): New function.
18182         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
18183         for this module.
18184         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
18185         (grub_console_init): Removed prototypes.
18186         (grub_machine_init): Don't initialize the modules anymore.
18187         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
18188         static.
18189         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
18190         Macro undef removed.
18191         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
18192         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
18193         relocation `R_PPC_REL32'.  Return an error when the relocation is
18194         unknown.
18195         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
18196         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
18197         * util/misc.c (grub_arch_sync_caches): Likewise.
18199 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
18201         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
18202         `symlist.c', add `grubof_symlist.c'.
18203         (symlist.c): Variable removed.
18204         (grubof_HEADERS): Variable added.
18205         (grubof_symlist.c): New target.
18206         (kernel_syms.lst): Use `grubof_HEADERS' instead of
18207         `kernel_img_HEADERS'.
18208         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
18209         * kern/powerpc/dl.c: New file.
18210         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
18211         Function removed.
18212         (grub_arch_dl_relocate_symbols): Likewise.
18213         (grub_register_exported_symbols): Likewise.
18215 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
18217         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
18218         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
18219         to fail instead.  Reported by Vincent Pelletier
18220         <subdino2004@yahoo.fr>.
18222         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
18223         it is not allocated.  Reported by Vincent Pelletier
18224         <subdino2004@yahoo.fr>.
18226         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
18227         output so the output looks better.
18229 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
18231         Modulize the partition map support and add support for the amiga
18232         partition map.
18234         * commands/ls.c: Include <grub/partition.h> instead of
18235         <grub/machine/partition.h>.
18236         * kern/disk.c: Likewise.
18237         * kern/rescue.c: Likewise.
18238         * loader/i386/pc/chainloader.c: Likewise.
18239         * normal/cmdline.c: Likewise.
18240         * kern/powerpc/ieee1275/init.c: Likewise.
18241         (grub_machine_init): Call `grub_pc_partition_map_init',
18242         `grub_amiga_partition_map_init' and
18243         `grub_apple_partition_map_init'.
18244         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
18245         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
18246         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
18247         `partition.h' and `pc_partition.h'.
18248         (grub_setup_SOURCES): Remove
18249         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
18250         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18251         (grub_emu_SOURCES): Likewise.
18252         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
18253         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
18254         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
18255         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18256         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
18257         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18258         (grubof_SOURCES): Likewise.
18259         * disk/i386/pc/partition.c: File removed.
18260         * disk/powerpc/ieee1275/partition.c: Likewise.
18261         * include/grub/powerpc/ieee1275/partition.h: Likewise.
18262         * include/grub/i386/pc/partition.h: Likewise.
18263         * kern/partition.c: New file.
18264         * partmap/amiga.c: Likewise.
18265         * partmap/apple.c: Likewise.
18266         * partmap/pc.c: Likewise.
18267         * include/grub/partition.h: Likewise..
18268         * include/grub/pc_partition.h: Likewise.
18269         * util/grub-emu.c: Include <grub/partition.h> instead of
18270         <grub/machine/partition.h>.
18271         (main): Call `grub_pc_partition_map_init',
18272         `grub_amiga_partition_map_init' and
18273         `grub_apple_partition_map_init' and deinitialize afterwards.
18274         * util/i386/pc/biosdisk.c: Include `#include
18275         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18276         `<grub/machine/partition.h>'.
18277         * util/i386/pc/grub-setup.c: Likewise.
18278         * util/i386/pc/biosdisk.c: Likewise.
18279         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
18280         partition information in case of a PC partition.
18281         * util/i386/pc/grub-setup.c: Include `#include
18282         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18283         `<grub/machine/partition.h>'.
18284         (setup): Only access the PC specific partition information in case
18285         of a PC partition.
18287 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
18289         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
18290         (grub_longjmp): Likewise.
18291         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
18292         20.
18293         * normal/powerpc/setjmp.S: New file.
18294         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18295         `normal/powerpc/setjmp.S'.
18296         (grubof_CFLAGS): Add `-DGRUBOF'.
18297         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
18298         [GRUB_UTIL && !GRUBOF].
18300 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
18302         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
18303         property named `name'.  Correctly handle the error returned by
18304         `grub_ieee1275_finddevice' if a device can not be opened.
18306 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
18308         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
18309         `actual' for negativity.
18310         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18311         kern/fshelp.c.
18313 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18315         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
18316         (PAGE_OFFSET): New macro.
18317         (CRTC_ADDR_PORT): Likewise.
18318         (CRTC_DATA_PORT): Likewise.
18319         (START_ADDR_HIGH_REGISTER): Likewise.
18320         (START_ADDR_LOW_REGISTER): Likewise.
18321         (GRAPHICS_ADDR_PORT): Likewise.
18322         (GRAPHICS_DATA_PORT): Likewise.
18323         (READ_MAP_REGISTER): Likewise.
18324         (INPUT_STATUS1_REGISTER): Likewise.
18325         (INPUT_STATUS1_VERTR_BIT): Likewise.
18326         (page): New variable.
18327         (wait_vretrace): New function.
18328         (set_read_map): Likewise.
18329         (set_start_address): Likewise.
18330         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
18331         the right page.
18332         (check_vga_mem): Take the page into account.
18333         (write_char): Likewise.
18334         (write_cursor): Likewise.
18335         (scroll_up): Likewise.  Copy the page to the page that is not
18336         shown and switch between both pages.
18337         (grub_vga_putchar): Fix off by one error.
18338         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
18339         account.
18341 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18343         Add support for iso9660 (including rockridge).
18345         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18346         (iso9660_mod_SOURCES): New variable.
18347         (iso9660_mod_CFLAGS): Likewise.
18348         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18349         * include/grub/fs.h (grub_iso9660_init): New prototype.
18350         * util/grub-emu.c (main): Call `grub_iso9660_init'.
18351         * fs/iso9660.c: New file.
18353         * include/grub/misc.h (grub_strncat): New prototype.
18354         * kern/misc.c (grub_strncat): New function.
18356         * fs/hfs.c (grub_hfs_mount): Translate the error
18357         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
18358         * fs/jfs.c (grub_jfs_mount): Likewise.
18359         * fs/ufs.c (grub_ufs_mount): Likewise.
18361 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
18363         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
18364         which initialized BAT registers.
18365         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
18366         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18367         Move from here...
18368         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
18369         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18370         ... to here.
18371         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
18372         (grub_mapclaim): Likewise.
18373         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
18374         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
18375         hand.
18377 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
18379         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
18380         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
18381         -ffreestanding and -msoft-float.
18383 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
18385         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
18386         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
18387         set in grub_ieee1275_flags.
18389 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
18391         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
18392         prototype.
18393         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
18394         grub_console_init first.
18395         Change the memory range used for grub_ieee1275_claim and
18396         grub_mm_init_region.
18397         Print an error message if the claim fails.
18398         Include <grub/misc.h>.
18400 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
18402         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
18403         Call grub_children_iterate for device nodes of type `scsi',
18404         `ide', or `ata'.
18405         (grub_ofdisk_open): Remove manual device alias resolution.
18406         Fix memory leak when device cannot be opened.
18407         * include/grub/powerpc/ieee1275/ieee1275.h
18408         (grub_children_iterate): New prototype.
18409         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
18410         New function.
18411         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18412         Return -1 if args.size was -1.
18414 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18416         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
18417         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
18418         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
18419         Open Firmware's memory for it; claim memory from _start to _end.
18420         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
18421         (_end): New extern.
18422         (_start): Zero BSS from __bss_start to _end.
18423         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18424         New extern.
18425         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
18427 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18429         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
18430         -1 if args.base was -1.
18432 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
18434         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
18435         escape sequence instead of a literal ^L. Also call
18436         grub_ofconsole_gotoxy.
18438 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
18440         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
18441         void *  arguments to grub_addr_t.  All callers updated.  Also make
18442         the `result' argument optional.
18443         (grub_ieee1275_release): change void * arguments to grub_addr_t.
18444         All callers updated.
18446 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
18448         * commands/ls.c (grub_ls_list_files): Use the string following the
18449         initial ')', if present, as the filesystem path.
18450         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
18452         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
18454 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
18456         Make the source code of the menu interface more readable.
18458         * normal/menu.c: Include grub/mm.h.
18459         (TERM_WIDTH): New macro.
18460         (TERM_HEIGHT): Likewise.
18461         (TERM_INFO_HEIGHT): Likewise.
18462         (TERM_MARGIN): Likewise.
18463         (TERM_SCROLL_WIDTH): Likewise.
18464         (TERM_TOP_BORDER_Y): Likewise.
18465         (TERM_LEFT_BORDER_X): Likewise.
18466         (TERM_BORDER_WIDTH): Likewise.
18467         (TERM_MESSAGE_HEIGHT): Likewise.
18468         (TERM_BORDER_HEIGHT): Likewise.
18469         (TERM_NUM_ENTRIES): Likewise.
18470         (TERM_FIRST_ENTRY_Y): Likewise.
18471         (TERM_ENTRY_WIDTH): Likewise.
18472         (TERM_CURSOR_X): Likewise.
18473         (draw_border): Use macros instead of magic numbers.
18474         (print_entry): Likewise.
18475         (print_entries): Likewise.
18476         (run_menu): Likewise. Also, handle the key 'e'.
18477         (run_menu_entry): Ignore empty command lines.
18478         (print_message): Added a new argument EDIT. If EDIT is true,
18479         print a different message.
18480         (init_page): Likewise.
18481         (edit_menu_entry): New function. Not implemented yet.
18483 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
18485         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
18486         can be loaded from normal mode.
18488         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
18489         `multiboot.mod'.
18490         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
18491         (multiboot_mod_CFLAGS): New variables.
18492         * loader/i386/pc/linux_normal.c: New file.
18493         * loader/i386/pc/multiboot_normal.c: Likewise.
18495         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
18496         attribute `unused'.
18498         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
18499         `fdiro' to read the mode information from instead of `diro'.
18501         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
18502         looking up a symlink.
18504         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
18505         macro.
18506         * normal/command.c (grub_command_execute): Don't parse the
18507         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
18508         flags of the command.
18510         * normal/menu.c (grub_menu_run): Fix typo.
18512 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
18514         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
18516         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
18517         `y + 1' instead of `y - 1'.
18519         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
18521 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
18523         From Hollis Blanchard <hollis@penguinppc.org>:
18524         * kern/misc.c (memmove): New alias for grub_memmove.
18525         (memcmp): New alias for grub_memcmp.
18526         (memset): New alias for grub_memset.
18527         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18528         Change "int handle" to "grub_ieee1275_phandle_t handle".
18529         * include/grub/powerpc/ieee1275/ieee1275.h
18530         (grub_ieee1275_get_property): Likewise.
18532 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
18534         Added normal mode command `chainloader' as module chain.mod, which
18535         depends on normal.mod and _chain.mod.
18537         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
18538         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
18539         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
18540         Deleted prototype.
18541         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
18542         but arguments parsing moved to ...
18543         (grub_chainloader_cmd): ... here.  New function.
18544         * include/grub/i386/pc/chainloader.h: New file.
18545         * loader/i386/pc/chainloader_normal.c: Likewise.
18547 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
18549         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
18550         (grub_mkimage_LDFLAGS): Likewise.
18551         (grub_emu_SOURCES): Likewise.
18552         (kernel_img_HEADERS): Added fshelp.h.
18553         * fs/ext2.c: Include <grub/fshelp.h>.
18554         (FILETYPE_REG): New macro.
18555         (FILETYPE_INO_REG): Likewise.
18556         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
18557         Changed all users.
18558         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
18559         all users.
18560         (grub_fshelp_node): New struct.
18561         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
18562         to a pointer.
18563         (grub_ext2_get_file_block): Removed function.
18564         (grub_ext2_read_block): New function.
18565         (grub_ext2_read_file): Replaced parameter `data' by `node'.
18566         This function was written.
18567         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
18568         (grub_ext2_find_file): Removed function.
18569         (grub_ext2_read_symlink): New function.
18570         (grub_ext2_iterate_dir): Likewise.
18571         (grub_ext2_open): Rewritten.
18572         (grub_ext2_dir): Rewritten.
18573         * include/grub/fshelp.h: New file.
18574         * fs/fshelp.c: Likewise.
18576 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
18578         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
18579         (print_message): Add a missing newline.
18580         (run_menu): Added timeout support.
18581         (run_menu_entry): New local function.
18582         (grub_menu_run): Added support for booting.
18584         * kern/loader.c (grub_loader_is_loaded): New function.
18586         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
18587         (grub_get_rtc): Exported.
18589         * include/grub/i386/pc/time.h: Include grub/symbol.h.
18590         (grub_get_rtc): Exported.
18592         * include/grub/normal.h (struct grub_command_list): Remove
18593         constant from the member `command'.
18595         * include/grub/loader.h (grub_loader_is_loaded): Declared.
18597         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
18599         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
18601 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
18603         Add support for the JFS filesystem.
18605         * fs/jfs.c: New file.
18606         * include/grub/fs.h (grub_jfs_init): New prototype.
18607         (grub_jfs_fini): New prototype.
18608         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
18609         (grub_emu_SOURCES): Likewise.
18610         (pkgdata_MODULES): Add jfs.mod.
18611         (jfs_mod_SOURCES): New variable.
18612         (jfs_mod_CFLAGS): Likewise.
18613         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
18614         (grubof_SOURCES): Likewise.
18615         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
18617         * fs/fat.c (grub_fat_find_dir): Convert the filename little
18618         endian to the host endian.
18619         (grub_fat_utf16_to_utf8): Move function from there...
18620         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
18621         the endianness of the source string anymore.
18622         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
18624 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
18626         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
18627         (grub_boot_fini) [GRUB_UTIL]: Likewise.
18628         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
18629         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
18631         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
18632         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
18633         for `node_found' and `it_dir'.
18634         (grub_hfs_dir): Add prototype for `dir_hook'.
18636         * fs/minix.c (grub_minix_get_file_block): Add prototype for
18637         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
18638         and `indir32' to silence a gcc warning.
18640         * include/grub/fs.h (grub_hfs_init): New prototype.
18641         (grub_hfs_fini): Likewise.
18644 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
18646         Each disk device has its own id now. This is useful to make use
18647         of multiple disk devices.
18649         * include/grub/disk.h (grub_disk_dev_id): New enum.
18650         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
18651         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
18653         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
18654         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18656         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
18657         GRUB_DISK_DEVICE_OFDISK_ID as an id.
18659         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
18660         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18662         * include/grub/disk.h (struct grub_disk_dev): Added a new member
18663         "id" which is used by the cache manager.
18665         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
18666         of just "GRUB".
18668 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
18670         * fs/hfs.c: New file.
18671         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
18672         (grub_emu_SOURCES): Likewise.
18673         (pkgdata_MODULES): Add hfs.mod.
18674         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
18675         (grubof_SOURCES): Likewise.
18676         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
18678         * include/grub/misc.h (grub_strncasecmp): Add prototype.
18679         * kern/misc.c (grub_strncasecmp): Add function.
18681 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
18683         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
18684         with parentheses.
18686         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
18687         (grub_ext2_dir): In case the directory entry type is unknown, read
18688         it from the inode.
18690 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
18692         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
18693         grub_load_linux instead of grub_rescue_cmd_linux as second
18694         argument of grub_rescue_register_command.
18696         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
18698 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
18700         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
18701         function.
18702         * commands/boot.c: Remove the check for `GRUB_UTIL'.
18703         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18704         `loader/powerpc/ieee1275/linux.c',
18705         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
18706         * include/grub/powerpc/ieee1275/ieee1275.h
18707         (grub_ieee1275_release): New prototype.
18708         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
18709         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
18710         normal, boot, linux and linux_normal.
18711         * loader/powerpc/ieee1275/linux.c: New file.
18712         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
18714 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
18716         * normal/arg.c (grub_arg_parse): Correct error handling after
18717         reallocating the argumentlist (check if `argl' is not null instead
18718         of checking if `args' is not null).
18719         * kern/mm.c (grub_realloc): Return the same pointer when using the
18720         same region, instead of returning the header address.
18722 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18724         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
18725         one block instead of two when looking for the initial partition.
18726         (grub_partition_probe): Initialize the local variable `p' with 0.
18727         Use base 10 for the grub_strtoul call.
18728         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
18729         need for one local variable.
18730         (grub_strtoul): Don't add the new value to `num', instead of that
18731         just assign it.
18733 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
18735         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
18736         (pxeboot_img_SOURCES): New variable.
18737         (pxeboot_img_ASFLAGS): Likewise.
18738         (pxeboot_img_LDFLAGS): Likewise.
18739         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
18740         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
18741         <lode_leroy@hotmail.com>.
18743 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18745         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
18746         there was no input.
18748 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18750         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
18751         the history buffer logic.
18753 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
18755         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
18756         (FILETYPE_INO_SYMLINK): New macros.
18757         (grub_ext2_find_file): Check if the node is a directory using the
18758         inode stat information instead of using the filetype in the
18759         dirent.  Exclude the first character of an absolute symlink.
18760         (grub_ext2_dir): Mask out the filetype part of the mode member of
18761         the inode.
18763 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
18765         Add support for UFS version 1 and 2.  Add support for the minix
18766         filesystem version 1 and 2, both the variants with 14 and 30 long
18767         filenames.
18769         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
18770         fs/minix.c.
18771         (grub_emu_SOURCES): Likewise.
18772         (pkgdata_MODULES): Add ufs.mod and minix.mod.
18773         (ufs_mod_SOURCES): New variable.
18774         (ufs_mod_CFLAGS): Likewise.
18775         (minix_mod_SOURCES): Likewise.
18776         (minix_mod_CFLAGS): Likewise.
18777         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
18778         fs/minix.c.
18779         (grubof_SOURCES): Likewise.
18780         * fs/ufs.c: New file.
18781         * fs/minix.c: New file.
18782         * include/grub/fs.h (grub_ufs_init): New prototype.
18783         (grub_ufs_fini): Likewise.
18784         (grub_minix_init): Likewise.
18785         (grub_minix_fini): Likewise.
18786         * util/grub-emu.c (main): Initialize and deinitialize UFS and
18787         minix fs.
18789 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
18791         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
18792         commands/ls.c, commands/terminal.c, commands/boot.c,
18793         commands/cmp.c and commands/cat.c.
18794         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
18796         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
18797         "env.h"
18799 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18801         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
18802         and grub_, respectively. Because the conversion is trivial and
18803         mechanical, I omit the details here. Please refer to the CVS
18804         if you need more information.
18806 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
18808         * include/pupa: Renamed to ...
18809         * include/grub: ... this.
18810         * util/i386/pc/pupa-mkimage.c: Renamed to ...
18811         * util/i386/pc/grub-mkimage.c: ... this.
18812         * util/i386/pc/pupa-setup.c: Renamed to ...
18813         * util/i386/pc/grub-setup.c: ... this.
18814         * util/pupa-emu.c: Renamed to ...
18815         * util/grub-emu.c: ... this.
18817 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
18819         Add support for the newworld apple macintosh (PPC).  This has been
18820         tested on the powerbook 2000 only.  It only adds support for
18821         generic ieee1275 functions, console and disk support.  This should
18822         be easy to port to other architectures with support for Open
18823         Firmware.
18825         * configure.ac: Accept the powerpc as host_cpu.  In the case of
18826         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
18827         specific tests are only executed while building for the i386.
18828         Inverse test for crosscompile.
18829         * genmk.rb (Utility): Allow assembler files.
18830         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
18831         * conf/powerpc-ieee1275.rmk: New file.
18832         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
18833         * disk/powerpc/ieee1275/partition.c: Likewise.
18834         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
18835         * include/pupa/powerpc/ieee1275/console.h: Likewise.
18836         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
18837         * include/pupa/powerpc/ieee1275/time.h: Likewise.
18838         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
18839         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
18840         * include/pupa/powerpc/ieee1275/loader.h
18841         * include/pupa/powerpc/setjmp.h: Likewise.
18842         * include/pupa/powerpc/types.h: Likewise.
18843         * kern/powerpc/ieee1275/init.c: Likewise.
18844         * kern/powerpc/ieee1275/openfw.c: Likewise.
18845         * term/powerpc/ieee1275/ofconsole.c: Likewise.
18847         These files were written by Johan Rydberg
18848         (jrydberg@night.trouble.net) and I only modified them slightly.
18850         * boot/powerpc/ieee1275/cmain.c: New file.
18851         * boot/powerpc/ieee1275/crt0.S: Likewise.
18852         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
18853         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
18855 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
18857         * Makefile.in: Update copyright.
18858         * genmodsrc.sh: Likewise.
18859         * gensymlist.sh: Likewise.
18860         * term/i386/pc/vga.c: Indent correctly.
18862         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
18863         bugreporting address.
18864         * util/i386/pc/pupa-setup.c (usage): Likewise,
18865         (main): Call pupa_ext2_init and pupa_ext2_fini.
18867         * fs/fat.c (log2): Renamed to ...
18868         (fat_log2): ... this.
18869         All callers changed.
18870         * kern/misc.c (memcpy): Alias to pupa_memmove.
18871         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
18872         lvalue cast.
18873         * util/console.c (pupa_ncurses_fini): Return 0.
18875         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
18876         Move fail label here.
18877         [__GNU__]: Don't warn when using stat.
18878         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
18879         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
18880         long int. Use strtol instead of strtoul.
18882 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
18884         * commands/boot.c: New file.
18885         * commands/cat.c: Likewise.
18886         * commands/cmp.c: Likewise.
18887         * commands/ls.c: Likewise.
18888         * commands/terminal.c: Likewise.
18889         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
18890         (pupa_register_command): Changed interface to match the new
18891         argument parser.
18892         (pupa_command_execute): Changed (almost rewritten) so it uses
18893         pupa_split_command.  Added support for setting variables using the
18894         syntax `foo=bar'.
18895         (rescue_command): Changed to work with the new argument parser.
18896         (terminal_command): Moved from here to commands/terminal.c.
18897         (set_command): New function.
18898         (unset_command): New function.
18899         (insmod_command): New function.
18900         (rmmod_command): New function.
18901         (lsmod_command): New function.
18902         (pupa_command_init): Don't initialize the command terminal
18903         anymore.  Initialize the commands set, unset, insmod, rmmod and
18904         lsmod.
18905         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
18906         (kernel_img_HEADERS): Add arg.h and env.h.
18907         (pupa_mkimage_LDFLAGS): Add kern/env.c.
18908         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
18909         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
18910         normal/arg.c.
18911         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
18912         terminal.mod.
18913         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
18914         (boot_mod_SOURCES): New variable.
18915         (terminal_mod_SOURCES): Likewise.
18916         (ls_mod_SOURCES): Likewise.
18917         (cmp_mod_SOURCES): Likewise.
18918         (cat_mod_SOURCES): Likewise.
18920         * normal/arg.c: New file.
18921         * kern/env.c: Likewise.
18922         * include/pupa/arg.h: Likewise.
18923         * include/pupa/env.h: Likewise.
18924         * font/manager.c (font_command): Changed to match argument parsing
18925         interface changes.
18926         (PUPA_MOD_INIT): Likewise.
18927         * hello/hello.c (pupa_cmd_hello): Likewise.
18928         (PUPA_MOD_INIT): Likewise.
18929         * include/pupa/disk.h: Include <pupa/device.h>.
18930         (pupa_print_partinfo): New prototype.
18931         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
18932         (pupa_dl_get_prefix): Likewise.
18933         * include/pupa/misc.h: Include <pupa/err.h>.
18934         (pupa_isgraph): New prototype.
18935         (pupa_isdigit): Likewise.
18936         (pupa_split_cmdline): Likewise.
18937         * include/pupa/normal.h: Include <pupa/arg.h>.
18938         (pupa_command): Changed the prototype of the member `func' to
18939         match the argument parsing interface.  Added member `options'.
18940         (pupa_register_command): Updated to match function.
18941         (pupa_arg_parse): New prototype.
18942         (pupa_hello_init) [PUPA_UTIL]: New prototype.
18943         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
18944         (pupa_ls_init) [PUPA_UTIL]: Likewise.
18945         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
18946         (pupa_cat_init) [PUPA_UTIL]: Likewise.
18947         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
18948         (pupa_boot_init) [PUPA_UTIL]: Likewise.
18949         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
18950         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
18951         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
18952         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
18953         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
18954         * kern/disk.c: Include <pupa/file.h>.
18955         (pupa_print_partinfo): New function.
18956         * kern/dl.c: Include <pupa/env.h>.
18957         (pupa_dl_dir): Variable removed.
18958         (pupa_dl_load): Use the environment variable `prefix' instead of
18959         the variable pupa_dl_dir.
18960         (pupa_dl_set_prefix): Function removed.
18961         (pupa_dl_get_prefix): Likewise.
18962         * kern/i386/pc/init.c: Include <pupa/env.h>.
18963         (pupa_machine_init): Use the environment variable `prefix' instead of
18964         using pupa_dl_set_prefix to set the prefix.
18965         * kern/main.c: Include <pupa/env.h>.
18966         (pupa_set_root_dev): Use the environment variable `prefix' instead of
18967         using pupa_dl_get_prefix to get the prefix.
18968         * kern/misc.c: Include <pupa/env.h>.
18969         (pupa_isdigit): New function.
18970         (pupa_isgraph): Likewise.
18971         (pupa_ftoa): Likewise.
18972         (pupa_vsprintf): Added support for printing values of the type
18973         `double'.  Make it possible to format variable output when using
18974         formatting like `%1.2%f'.
18975         (pupa_split_cmdline): New function.
18976         * kern/rescue.c: Include <pupa/env.h>.
18977         (next_word): Removed function.
18978         (pupa_rescue_cmd_prefix): Likewise.
18979         (pupa_rescue_cmd_set): New function.
18980         (pupa_rescue_cmd_unset): New function.
18981         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
18982         split the command line instead of splitting it here.  Added
18983         support for setting variables using the syntax `foo=bar'.  Don't
18984         initialize the prefix command anymore.  Initialized the set and
18985         unset commands.
18986         * normal/cmdline.c: Include <pupa/env.h>.
18987         (pupa_tab_complete): Added prototypes for print_simple_completion,
18988         print_partition_completion, add_completion, iterate_commands,
18989         iterate_dev, iterate_part and iterate_dir. Moved code to print
18990         partition information from here to kern/disk.c.
18991         (pupa_cmdline_run): Don't check if the function exists anymore.
18992         * normal/main.c: Include <pupa/env.h>.
18993         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
18994         instead of using pupa_dl_get_prefix to get the prefix.
18995         * term/i386/pc/vga.c: Include <pupa/arg.h>.
18996         (check_vga_mem): Cast pointers to `void *' to silence a gcc
18997         warning.
18998         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
18999         (pupa_vga_setcolor): Declare unused variables with `__attribute__
19000         ((unused))' to silence a gcc warning.
19001         (pupa_vga_setcolor): Likewise.
19002         (debug_command): Changed to match argument parsing
19003         interface changes.
19004         * util/pupa-emu.c: Include <pupa/env.h>.
19005         (options): Added 0's for unused fields to silence a gcc warning.
19006         (argp): Likewise.
19007         (main): Use the environment variable `prefix' instead of using
19008         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
19009         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
19010         and terminal.
19012         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
19013         * util/misc.c: Include <malloc.h>.
19014         (pupa_malloc): Rewritten so errors are correctly reported.
19015         (pupa_realloc): Likewise.
19016         (pupa_memalign): Likewise.
19017         (pupa_mm_init_region): Declare unused variables with
19018         `__attribute__ ((unused))' to silence a gcc warning.
19019         * normal/i386/setjmp.S: Remove tab at the end of the file to
19020         silence a gcc warning.
19021         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
19022         variables with `__attribute__ ((unused))' to silence a gcc
19023         warning.
19024         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
19025         local variable i unsigned to silence a gcc warning.
19027         * kern/term.c: Include <pupa/misc.h>.
19028         (pupa_more_lines): New variable.
19029         (pupa_more): Likewise.
19030         (pupa_putcode): When the pager is active pause at the end of every
19031         screen.
19032         (pupa_set_more): New function.
19033         * include/pupa/term.h (pupa_set_more): New prototype.
19036 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
19038         Now this project is GRUB 2 rather than PUPA. The location of
19039         the CVS repository was moved to GRUB's.
19041         * configure.ac: Use bug-grub as the reporting address.
19042         Use GRUB instead of PUPA.
19043         Change the version number to 1.90.
19045 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
19047         * genkernsyms.sh: Updated copyright information.
19048         * genmk.rb: Likewise.
19049         * genmodsrc.sh: Likewise.
19050         * gensymlist.sh: Likewise.
19051         * boot/i386/pc/boot.S: Likewise.
19052         * boot/i386/pc/diskboot.S: Likewise.
19053         * disk/i386/pc/biosdisk.c: Likewise.
19054         * disk/i386/pc/partition.c: Likewise.
19055         * font/manager.c: Likewise.
19056         * fs/ext2.c: Likewise.
19057         * fs/fat.c: Likewise.
19058         * include/pupa/boot.h: Likewise.
19059         * include/pupa/device.h: Likewise.
19060         * include/pupa/disk.h: Likewise.
19061         * include/pupa/dl.h: Likewise.
19062         * include/pupa/elf.h: Likewise.
19063         * include/pupa/err.h: Likewise.
19064         * include/pupa/file.h: Likewise.
19065         * include/pupa/font.h: Likewise.
19066         * include/pupa/fs.h: Likewise.
19067         * include/pupa/kernel.h: Likewise.
19068         * include/pupa/loader.h: Likewise.
19069         * include/pupa/misc.h: Likewise.
19070         * include/pupa/mm.h: Likewise.
19071         * include/pupa/net.h: Likewise.
19072         * include/pupa/normal.h: Likewise.
19073         * include/pupa/rescue.h: Likewise.
19074         * include/pupa/setjmp.h: Likewise.
19075         * include/pupa/symbol.h: Likewise.
19076         * include/pupa/term.h: Likewise.
19077         * include/pupa/types.h: Likewise.
19078         * include/pupa/i386/setjmp.h: Likewise.
19079         * include/pupa/i386/types.h: Likewise.
19080         * include/pupa/i386/pc/biosdisk.h: Likewise.
19081         * include/pupa/i386/pc/boot.h: Likewise.
19082         * include/pupa/i386/pc/console.h: Likewise.
19083         * include/pupa/i386/pc/init.h: Likewise.
19084         * include/pupa/i386/pc/kernel.h: Likewise.
19085         * include/pupa/i386/pc/linux.h: Likewise.
19086         * include/pupa/i386/pc/loader.h: Likewise.
19087         * include/pupa/i386/pc/memory.h: Likewise.
19088         * include/pupa/i386/pc/multiboot.h: Likewise.
19089         * include/pupa/i386/pc/partition.h: Likewise.
19090         * include/pupa/i386/pc/time.h: Likewise.
19091         * include/pupa/i386/pc/vga.h: Likewise.
19092         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
19093         * include/pupa/util/getroot.h: Likewise.
19094         * include/pupa/util/misc.h: Likewise.
19095         * include/pupa/util/resolve.h: Likewise.
19096         * kern/device.c: Likewise.
19097         * kern/disk.c: Likewise.
19098         * kern/dl.c: Likewise.
19099         * kern/err.c: Likewise.
19100         * kern/file.c: Likewise.
19101         * kern/fs.c: Likewise.
19102         * kern/loader.c: Likewise.
19103         * kern/main.c: Likewise.
19104         * kern/misc.c: Likewise.
19105         * kern/mm.c: Likewise.
19106         * kern/rescue.c: Likewise.
19107         * kern/term.c: Likewise.
19108         * kern/i386/dl.c: Likewise.
19109         * kern/i386/pc/init.c: Likewise.
19110         * kern/i386/pc/lzo1x.S: Likewise.
19111         * kern/i386/pc/startup.S: Likewise.
19112         * loader/i386/pc/chainloader.c: Likewise.
19113         * loader/i386/pc/linux.c: Likewise.
19114         * loader/i386/pc/multiboot.c: Likewise.
19115         * normal/cmdline.c: Likewise.
19116         * normal/command.c: Likewise.
19117         * normal/main.c: Likewise.
19118         * normal/menu.c: Likewise.
19119         * normal/i386/setjmp.S: Likewise.
19120         * term/i386/pc/console.c: Likewise.
19121         * term/i386/pc/vga.c: Likewise.
19122         * util/console.c: Likewise.
19123         * util/genmoddep.c: Likewise.
19124         * util/misc.c: Likewise.
19125         * util/pupa-emu.c: Likewise.
19126         * util/resolve.c: Likewise.
19127         * util/unifont2pff.rb: Likewise.
19128         * util/i386/pc/biosdisk.c: Likewise.
19129         * util/i386/pc/getroot.c: Likewise.
19130         * util/i386/pc/pupa-mkimage.c: Likewise.
19131         * util/i386/pc/pupa-setup.c: Likewise.
19133 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
19135         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
19136         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
19137         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
19138         reading and reset it after reading.
19139         (pupa_ext2_close): Return PUPA_ERR_NONE.
19141         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
19142         Correct value.
19143         (struct linux_kernel_header): Add kernel_version and
19144         initrd_addr_max.
19145         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
19146         pupa_file_read succeeds.
19147         (pupa_rescue_cmd_initrd): Implement.
19149 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
19151         * fs/ext2.c (pupa_ext2_label): New function.
19152         (pupa_ext2_fs): Added label.
19153         * fs/fat.c (pupa_fat_label): New function.
19154         (pupa_fat_fs): Added label.
19155         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
19157         * kern/misc.c (pupa_strndup): New function.
19158         * include/pupa/misc.h (pupa_strndup): New prototype.
19160         * include/pupa/normal.h: Include <pupa/err.h>.
19161         (pupa_set_history): New prototype.
19162         (pupa_iterate_commands): New prototype.
19163         * normal/cmdline.c: Include <pupa/machine/partition.h>,
19164         <pupa/disk.h>, <pupa/file.h>.
19165         (hist_size): New variable.
19166         (hist_lines): Likewise.
19167         (hist_end): Likewise.
19168         (hist_used): Likewise.
19169         (pupa_set_history): New function.
19170         (pupa_history_get): Likewise.
19171         (pupa_history_add): Likewise.
19172         (pupa_history_replace): Likewise.
19173         (pupa_tab_complete): Likewise.
19174         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
19175         completion shows partitionnames while completing partitions, this
19176         feature was suggested by Jeff Bailey.
19177         * normal/command.c (pupa_iterate_commands): New function.
19178         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
19179         (pupa_normal_init): Initialize history buffer.
19180         (PUPA_MOD_INIT): Likewise.
19181         (pupa_normal_fini): Free the history buffer.
19182         (PUPA_MOD_FINI): Likewise.
19184         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
19185         key.
19187         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
19188         * configure.ac [i386]: Check for regparam bug.
19189         (NESTED_FUNC_ATTR) [! i386]: Defined.
19191 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
19193         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
19194         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
19195         (pupa_emu_SOURCES): New variable.
19196         (pupa_emu_LDFLAGS): Likewise.
19197         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
19198         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
19199         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
19200         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19201         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
19202         (pupa_jmp_buf): New typedef.
19203         (pupa_setjmp) [PUPA_UTIL]: New macro.
19204         (pupa_longjmp) [PUPA_UTIL]: Likewise.
19205         * include/pupa/term.h (struct pupa_term): New member `refresh'.
19206         (pupa_refresh): New prototype.
19207         * include/pupa/util/getroot.h: New file.
19208         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
19209         it.
19210         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
19211         (pupa_rescue_cmd_cat): Likewise.
19212         (pupa_rescue_cmd_ls): Likewise.
19213         (pupa_rescue_cmd_testload): Likewise.
19214         (pupa_rescue_cmd_lsmod): Likewise.
19215         * normal/cmdline.c (pupa_cmdline_get): Likewise.
19216         * normal/menu.c (run_menu): Likewise.
19217         * kern/term.c (pupa_cls): Likewise.
19218         (pupa_refresh): New function.
19219         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
19220         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19221         * util/console.c: New file.
19223         * util/i386/pc/getroot.c: New file.
19224         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
19225         (pupa_putchar): New function.
19226         (pupa_refresh): Likewise.
19227         (xgetcwd): Function moved to ...
19228         (strip_extra_slashes): Likewise.
19229         (get_prefix): Likewise.
19230         * util/i386/pc/getroot.c: ... here.
19231         (find_root_device): Function moved and renamed to...
19232         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
19233         Changed all callers.
19234         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
19235         and renamed to...
19236         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
19237         Changed all callers.
19238         * util/misc.c (pupa_memalign): New function.
19239         (pupa_mm_init_region): Likewise.
19240         (pupa_register_exported_symbols): Likewise.
19241         (pupa_putchar): Function removed.
19242         * util/pupa-emu.c: New file.
19244 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
19246         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
19247         (_multiboot_mod_SOURCES): New variable.
19248         (_multiboot_mod_CFLAGS): Likewise.
19249         * loader/i386/pc/multiboot.c: New file.
19250         * include/pupa/i386/pc/multiboot.h: Likewise.
19251         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
19252         (pupa_multiboot_real_boot): New function.
19253         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
19254         (pupa_multiboot_real_boot): New prototype.
19255         (pupa_rescue_cmd_multiboot): Likewise
19256         (pupa_rescue_cmd_module): Likewise.
19258         * kern/loader.c (pupa_loader_set): Continue when
19259         pupa_loader_unload_func() fails.
19260         (pupa_loader_unset): New function.
19261         * include/pupa/loader.h (pupa_loader_unset): New prototype.
19263         * kern/misc.c (pupa_stpcpy): New function.
19264         * include/pupa/misc.h (pupa_stpcpy): New prototype.
19266 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
19268         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
19269         for available extensions.
19271         * include/pupa/i386/pc/time.h: New file.
19272         * kern/disk.c: Include <pupa/machine/time.h>.
19273         (PUPA_CACHE_TIMEOUT): New macro.
19274         (pupa_last_time): New variable.
19275         (pupa_disk_open): Flush the cache when there was a timeout.
19276         (pupa_disk_close): Reset the timer.
19277         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
19278         pupa_currticks.
19279         * util/misc.c: Include <sys/times.h>
19280         (pupa_get_rtc): New function.
19282 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
19284         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
19285         as blocks.
19286         (pupa_ext2_get_file_block): Use blocks member.
19288         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
19289         first block. Return -1 instead of pupa_errno on error.
19291 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
19293         * README: In the pupa-mkimage example use _chain instead of chain
19294         and ext2 instead of fat.
19295         * TODO: Replace ext2fs with jfs as an example.  Add an item for
19296         adding journal playback for ext2fs.
19297         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
19298         (pkgdata_MODULES): Added ext2.mod.
19299         (ext2_mod_SOURCES): New variable.
19300         (ext2_mod_CFLAGS): Likewise.
19301         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
19302         * include/pupa/misc.h (pupa_strncpy): New prototype.
19303         (pupa_strcat): Likewise.
19304         (pupa_strncmp): Likewise.
19305         * kern/misc.c (pupa_strcat): Enable function.
19306         (pupa_strncpy): New function.
19307         (pupa_strncmp): Likewise.
19308         * fs/ext2.c: New file.
19310         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
19311         when the read failed before retrying.
19312         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
19313         (_FILE_OFFSET_BITS): Likewise.
19314         * configure.ac: Added AC_SYS_LARGEFILE.
19316 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19318         * genmk.rb (PModule#rule): Make sure to get only symbol names
19319         from the output of nm.
19320         Reported by Robert Millan <zeratul2@wanadoo.es>.
19322 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19324         I forgot to check in these changes for a long time. This adds
19325         incomplete support for VGA console, and this is still very
19326         buggy. Also, a lot of consideration is required for I18N,
19327         UNICODE, and VGA font issues. Therefore, assume that this is
19328         such that "better than nothing".
19330         * font/manager.c: New file.
19331         * include/pupa/font.h: Likewise.
19332         * include/pupa/i386/pc/vga.h: Likewise.
19333         * term/i386/pc/vga.c: Likewise.
19334         * util/unifont2pff.rb: Likewise.
19336         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
19337         (pkgdata_MODULES): Added vga.mod and font.mod.
19338         (vga_mod_SOURCES): New variables.
19339         (vga_mod_CFLAGS): Likewise.
19340         (font_mod_SOURCES): Likewise.
19341         (font_mod_CFLAGS): Likewise.
19343         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
19345         * include/pupa/term.h: Include pupa/err.h.
19346         (struct pupa_term): Added init and fini.
19347         Changed the argument of putchar to pupa_uint32_t.
19349         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
19350         (pupa_console_real_putchar): New prototype.
19351         (pupa_console_putchar): Removed.
19352         (pupa_console_checkkey): Exported.
19353         (pupa_console_getkey): Likewise.
19355         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
19356         characters.
19358         * kern/term.c (pupa_term_set_current): Rewritten.
19359         (pupa_putchar): Likewise.
19360         (pupa_putcode): New function.
19362         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
19363         (pupa_console_real_putchar): ... this.
19364         (pupa_vga_set_mode): New function.
19365         (pupa_vga_get_font): Likewise.
19367         * normal/command.c: Include pupa/term.h.
19368         (terminal_command): New function.
19369         (pupa_command_init): Register the command "terminal".
19371         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
19372         (DISP_UP): Likewise.
19373         (DISP_RIGHT): Likewise.
19374         (DISP_DOWN): Likewise.
19375         (DISP_HLINE): Likewise.
19376         (DISP_VLINE): Likewise.
19377         (DISP_UL): Likewise.
19378         (DISP_UR): Likewise.
19379         (DISP_LL): Likewise.
19380         (DISP_LR): Likewise.
19382         * term/i386/pc/console.c (pupa_console_putchar): New function.
19384 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
19386         * util/resolve.c (pupa_util_resolve_dependencies): BUG
19387         FIX. Reverse the path_list.
19389         * include/pupa/normal.h: Export pupa_register_command and
19390         pupa_unregister_command.
19392         * hello/hello.c (pupa_cmd_hello): New module.
19393         * conf/i386-pc.rmk: Added hello.mod.
19395 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
19397         * kern/i386/pc/lzo1x.S: New file.
19399         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
19400         (compress_kernel): New variable.
19401         (generate_image): Heavily modified to support compressing a
19402         large part of the core image.
19404         * util/misc.c (pupa_util_read_image): Fix a file descriptor
19405         leak.
19406         (pupa_util_load_image): New function.
19408         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
19409         (pupa_compressed_size): New variable.
19410         (codestart): Enable Gate A20 here.
19411         Decompress the compressed part of the core image.
19412         Rearrange the code to put functions and variables which are
19413         required for initialization in the non-compressed part.
19414         Include lzo1x.S.
19416         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
19417         here.
19419         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
19421         * include/pupa/i386/pc/kernel.h
19422         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
19423         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
19424         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19425         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19426         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
19428         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
19430         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
19431         (Utility#rule): Likewise.
19433         * configure.ac: Check if LZO is available.
19435 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
19437         * include/pupa/normal.h: New file.
19438         * include/pupa/setjmp.h: Likewise.
19439         * include/pupa/i386/setjmp.h: Likewise.
19440         * normal/cmdline.c: Likewise.
19441         * normal/command.c: Likewise.
19442         * normal/main.c: Likewise.
19443         * normal/menu.c: Likewise.
19444         * normal/i386/setjmp.S: Likewise.
19446         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
19447         (pupa_rescue_cmd_initrd): Likewise.
19449         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
19450         Likewise.
19452         * kern/i386/pc/startup.S (translation_table): New variable.
19453         (translate_keycode): New function.
19454         (pupa_console_getkey): Call translate_keycode.
19456         * kern/rescue.c (attempt_normal_mode): New function.
19457         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
19458         it failed, print a message.
19460         * kern/mm.c (pupa_real_malloc): Print more information when a
19461         free magic is broken.
19462         (pupa_free): If the first free header is not free actually, set
19463         it to P.
19465         * kern/main.c (pupa_load_normal_mode): Just load the module
19466         "normal".
19467         (pupa_main): Don't print the message
19468         "Entering into rescue mode..." here.
19470         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
19471         Declared.
19472         (pupa_rescue_cmd_initrd): Likewise.
19473         (pupa_rescue_cmd_initrd): Likewise.
19475         * include/pupa/symbol.h (FUNCTION): Specify the type.
19476         (VARIABLE): Likewise.
19478         * include/pupa/err.h (pupa_err_t): Added
19479         PUPA_ERR_UNKNOWN_COMMAND.
19481         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
19482         (pupa_dl_get_prefix): Likewise.
19484         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
19485         Added _chain.mod and _linux.mod instead of chain.mod and
19486         linux.mod.
19487         (chain_mod_SOURCES): Renamed to ...
19488         (_chain_mod_SOURCES): ... this.
19489         (chain_mod_CFLAGS): Renamed to ...
19490         (_chain_mod_CFLAGS): ... this.
19491         (linux_mod_SOURCES): Renamed to ...
19492         (_linux_mod_SOURCES): ... this.
19493         (linux_mod_CFLAGS): Renamed to ...
19494         (_linux_mod_CFLAGS): ... this.
19495         (normal_mod_SOURCES): New variable.
19496         (normal_mod_CFLAGS): Likewise.
19497         (normal_mod_ASFLAGS): Likewise.
19499 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
19501         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
19502         possible.
19504         * kern/dl.c (pupa_dl_ref): Refer depending modules
19505         recursively.
19506         (pupa_dl_unref): Unrefer depending modules recursively.
19507         Don't call pupa_dl_unload implicitly, because PUPA can crash if
19508         a module is unloaded before one depending on that module is
19509         unloaded.
19510         (pupa_dl_unload): Unload depending modules explicitly,
19511         if possible.
19513 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
19515         * include/pupa/i386/pc/linux.h: New file.
19516         * loader/i386/pc/linux.c: Likewise.
19518         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
19519         Removed.
19520         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
19521         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
19522         of PUPA_CHAINLOADER_BOOT_SECTOR.
19524         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
19525         (pupa_linux_prot_size): New variable.
19526         (pupa_linux_tmp_addr): Likewise.
19527         (pupa_linux_real_addr): Likewise.
19528         (pupa_linux_boot_zimage): New function.
19529         (pupa_linux_boot_bzimage): Likewise.
19531         * kern/i386/pc/init.c (struct mem_region): New structure.
19532         (MAX_REGIONS): New macro.
19533         (mem_regions): New variable.
19534         (num_regions): Likewise.
19535         (pupa_os_area_addr): Likewise.
19536         (pupa_os_area_size): Likewise.
19537         (pupa_lower_mem): Likewise.
19538         (pupa_upper_mem): Likewise.
19539         (add_mem_region): New function.
19540         (compact_mem_regions): Likewise.
19541         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
19542         the size of the conventional memory and that of so-called upper
19543         memory (before the first memory hole).
19544         Instead of adding each found region to free memory, use
19545         add_mem_region and add them after removing overlaps.
19546         Also, add only 1/4 of the upper memory to free memory. The rest
19547         is used for loading OS images. Maybe this is ad hoc, but this
19548         makes it much easier to relocate OS images when booting.
19550         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
19551         (pupa_enter_rescue_mode): Don't register initrd and module.
19553         * kern/mm.c: Include pupa/dl.h.
19555         * kern/main.c: Include pupa/file.h and pupa/device.h.
19557         * kern/loader.c (pupa_loader_load_module_func): Removed.
19558         (pupa_loader_load_module): Likewise.
19560         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
19561         ``.o''.
19563         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
19564         (pupa_linux_tmp_addr): Likewise.
19565         (pupa_linux_real_addr): Likewise.
19566         (pupa_linux_boot_zimage): Likewise.
19567         (pupa_linux_boot_bzimage): Likewise.
19569         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
19570         (pupa_upper_mem): Likewise.
19571         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
19572         module is too dangerous.
19574         * include/pupa/loader.h (pupa_os_area_addr): Declared.
19575         (pupa_os_area_size): Likewise.
19576         (pupa_loader_set): Remove the first argument. Loader doesn't
19577         manage modules or initrd any longer.
19578         (pupa_loader_load_module): Removed.
19580         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
19581         (linux_mod_SOURCES): New variable.
19582         (linux_mod_CFLAGS): Likewise.
19584 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
19586         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
19587         the length of a blocklist correctly.
19589         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
19590         Use ioctl only if the OS file is a block device.
19591         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
19592         not very useful for normal files.
19594         * kern/main.c (pupa_set_root_dev): New function.
19595         (pupa_load_normal_mode): Likewise.
19596         (pupa_main): Call those above.
19598         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
19599         pupa_uint16_t.
19601         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
19603 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
19605         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
19606         (setup): Configure the installed partition information and the
19607         dl prefix.
19609         * loader/i386/pc/chainloader.c (my_mod): New variable.
19610         (pupa_chainloader_unload): New function.
19611         (pupa_rescue_cmd_chainloader): Refer itself.
19612         (PUPA_MOD_INIT): Save its own module in MY_MOD.
19614         * kern/i386/pc/startup.S (install_partition): Removed.
19615         (version_string): Likewise.
19616         (config_file): Likewise.
19617         (pupa_install_dos_part): New variable.
19618         (pupa_install_bsd_part): Likewise.
19619         (pupa_prefix): Likewise.
19620         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
19622         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
19623         and pupa/misc.h.
19624         (make_install_device): New function.
19625         (pupa_machine_init): Set the dl prefix.
19627         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
19628         (buf): Renamed to ...
19629         (linebuf): ... this.
19630         (pupa_rescue_cmd_prefix): New function.
19631         (pupa_rescue_cmd_insmod): Likewise.
19632         (pupa_rescue_cmd_rmmod): Likewise.
19633         (pupa_rescue_cmd_lsmod): Likewise.
19634         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
19635         rmmod and lsmod.
19637         * kern/mm.c (pupa_memalign): If failed even after invalidating
19638         disk caches, unload unneeded modules and retry.
19640         * kern/misc.c (pupa_memmove): New function.
19641         (pupa_memcpy): Removed.
19642         (pupa_strcpy): New function.
19643         (pupa_itoa): Made static.
19645         * kern/dl.c (pupa_dl_iterate): New function.
19646         (pupa_dl_ref): Likewise.
19647         (pupa_dl_unref): Likewise.
19648         (pupa_dl_unload): Return if succeeded or not.
19649         (pupa_dl_unload_unneeded): New function.
19650         (pupa_dl_unload_all): Likewise.
19651         (pupa_dl_init): Renamed to ...
19652         (pupa_dl_set_prefix): ... this.
19653         (pupa_dl_get_prefix): New function.
19655         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
19656         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
19657         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19658         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19659         (pupa_install_dos_part): Declared.
19660         (pupa_install_bsd_part): Likewise.
19661         (pupa_prefix): Likewise.
19662         (pupa_boot_drive): Likewise.
19664         * include/pupa/types.h: Fix a typo.
19666         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
19667         pupa_memmove.
19668         (pupa_memmove): Declared.
19669         (pupa_strcpy): Likewise.
19671         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
19672         pupa_mod_init takes one argument, its own module.
19673         (pupa_dl_unload_unneeded): Declared.
19674         (pupa_dl_unload_all): Likewise.
19675         (pupa_dl_ref): Likewise.
19676         (pupa_dl_unref): Likewise.
19677         (pupa_dl_iterate): Likewise.
19678         (pupa_dl_init): Renamed to ...
19679         (pupa_dl_set_prefix): ... this.
19680         (pupa_dl_get_prefix): Declared.
19682         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
19683         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
19684         unloaded.
19685         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
19686         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
19688         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
19689         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
19691 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19693         * util/i386/pc/pupa-setup.c (setup): Define the internal
19694         function find_first_partition_start at the top level, because GCC
19695         3.0.x cannot compile internal functions in deeper scopes
19696         correctly.
19697         (find_root_device): Use lstat instead of stat.
19698         Don't follow symbolic links.
19699         Fix the path-constructing code.
19701         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
19702         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
19703         by a BLKGETSIZE ioctl first, because block devices don't fill
19704         the member st_mode of the structure stat on Linux.
19705         [__linux__] (linux_find_partition): Use a temporary buffer
19706         REAL_DEV for the working space. Copy it to DEV before returning.
19707         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
19708         buffer cache consistent.
19709         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
19710         strncmp. The previous value was merely wrong.
19711         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
19713         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
19714         FAT size is 12. The previous value was merely wrong.
19716         * kern/main.c (pupa_main): Don't split the starting message from
19717         newlines.
19719         * kern/term.c (pupa_putchar): Put CR after LF instead of before
19720         LF, because BIOS goes crazy about character attributes in this
19721         case.
19723 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
19725         * include/i386/pc/util/biosdisk.h: New file.
19726         * util/i386/pc/biosdisk.c: Likewise.
19727         * util/i386/pc/pupa-setup.c: Likewise.
19729         * Makefile.in (INCLUDE_DISTFILES): Added
19730         include/pupa/i386/pc/util/biosdisk.h.
19731         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
19732         directory util/i386/pc.
19733         (install-local): Added a rule for sbin_UTILITIES.
19734         (uninstall): Likewise.
19736         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
19738         * util/misc.c (xrealloc): New function.
19739         (pupa_malloc): Likewise.
19740         (pupa_free): Likewise.
19741         (pupa_realloc): Likewise.
19742         (pupa_stop): Likewise.
19743         (pupa_putchar): Likewise.
19745         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
19747         * include/pupa/util/misc.h (xrealloc): Declared.
19749         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
19750         macro.
19751         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
19752         (PUPA_BOOT_MACHINE_BPB_END): ... this.
19754         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
19755         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19757         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
19758         way should be implemented.
19759         [PUPA_UTIL] (pupa_fat_fini): Likewise.
19761         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
19762         the size of NAME for safety.
19763         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
19764         0x88.
19766         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
19767         (pupa_setup_SOURCES): Likewise.
19769         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
19771 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19773         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
19774         bunch of pushl's from pusha, because this destroys the return
19775         value.
19777 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
19779         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
19780         This means that any missing prototypes could be fatal. Also, you
19781         must take care when writing assembly code. See the comments at
19782         the beginning of startup.S, for more details.
19784         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
19785         compilation mechanism.
19786         (pupa_chainloader_real_boot): Likewise.
19787         (pupa_biosdisk_rw_int13_extensions): Likewise.
19788         (pupa_biosdisk_rw_standard): Likewise.
19789         (pupa_biosdisk_check_int13_extensions): Likewise.
19790         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
19791         (pupa_biosdisk_get_diskinfo_standard): Likewise.
19792         (pupa_get_memsize): Likewise.
19793         (pupa_get_mmap_entry): Likewise.
19794         (pupa_console_putchar): Likewise.
19795         (pupa_console_setcursor): Likewise.
19796         (pupa_getrtsecs): Use pushl instead of push.
19798         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
19799         memory instead of the stack for a mmap entry, because some
19800         BIOSes may ignore the maximum size and overflow.
19802         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
19804         * genmk.rb (PModule#rule): Compile automatically generated
19805         sources with module-specific CFLAGS as well as other sources.
19807 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19809         * configure.ac: Check ld.
19810         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
19811         respectively, before checking endianness and sizes.
19813         * Makefile.in (LD): New variable.
19815 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19817         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
19819 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
19821         * Changelog: New file.