2009-10-16 Robert Millan <rmh.grub@aybabtu.com>
[grub2/phcoder/solaris.git] / ChangeLog
blob5f58ef12ffbfae9cc637871a8cf52b6aeb416c3c
1 2009-10-16  Robert Millan  <rmh.grub@aybabtu.com>
3         * configure.ac: Bump version to 1.97.
5 2009-10-16  Colin Watson  <cjwatson@ubuntu.com>
7         * configure.ac (TARGET_CFLAGS): Add -mno-mmx -mno-sse -mno-sse2
8         -mno-3dnow on x86 architectures.  Some toolchains enable these
9         features by default, but they rely on registers that aren't enabled
10         in GRUB.  Thanks to Vladimir Serbinenko for the suggestion.
12 2009-10-15  Robert Millan  <rmh.grub@aybabtu.com>
14         Make entry text a bit more readable.
16         * util/grub.d/10_linux.in: Add `with' before `Linux'.
18 2009-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
20         * loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image.
22 2009-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
24         * commands/xnu_uuid.c (grub_cmd_xnu_uuid): Remove duplicated bitwise
25         operations.
27 2009-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
29         * configure.ac: Add missing dollar.
31 2009-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
33         Revert 2009-06-10  Pavel Roskin  <proski@gnu.org>
35         * configure.ac: Put checks for __bswapsi2 and __bswapdi2.
36         * include/grub/powerpc/libgcc.h: Don't use weak attribute for all
37         exports.
38         * include/grub/sparc64/libgcc.h: Likewise.  Use
39         preprocessor conditionals.
41 2009-10-14  Robert Millan  <rmh.grub@aybabtu.com>
43         * conf/common.rmk (grub-dumpbios): Remove rule.
44         (sbin_SCRIPTS, CLEANFILES): Remove `grub-dumpbios'.
45         * util/grub-dumpbios.in: Remove file.
47 2009-10-14  Robert Millan  <rmh.grub@aybabtu.com>
49         Refer to kernel of FreeBSD "kFreeBSD" to avoid confusion between
50         the Operating System (FreeBSD) and its kernel (kernel of FreeBSD).
52         * loader/i386/bsd.c (grub_freebsd_boot): Read kernel environment
53         from "kFreeBSD" namespace (rather than "FreeBSD").  Update all
54         users.
56         (GRUB_MOD_INIT (bsd)): Rename "freebsd" command to "kfreebsd",
57         "openbsd" to "kopenbsd", "netbsd" to "knetbsd", "freebsd_loadenv"
58         to "kfreebsd_loadenv", "freebsd_module" to "kfreebsd_module",
59         and "freebsd_module_elf" to "kfreebsd_module_elf".  Update all
60         users.
62 2009-10-12  Robert Millan  <rmh.grub@aybabtu.com>
64         * term/tparm.c: Switch to GPLv3.
66 2009-10-09  Robert Millan  <rmh.grub@aybabtu.com>
68         * include/grub/i386/cpuid.h: Add header protection.
70 2009-10-09  Robert Millan  <rmh.grub@aybabtu.com>
72         Fail gracefuly when attempting to load 64-bit kFreeBSD on IA32 CPU.
74         * include/grub/i386/cpuid.h: New file.
75         * commands/i386/cpuid.c: Include `<grub/i386/cpuid.h>'.
76         (has_longmode): Rename to ...
77         (grub_cpuid_has_longmode): ... this.  Update all users.  Remove
78         `static' attribute.
79         * loader/i386/bsd.c: Include `<grub/i386/cpuid.h>'.
80         (grub_bsd_load_elf): Fail if load of 64-bit kernel was requested
81         on a CPU that doesn't implement AMD64 instruction set.
83 2009-10-06  Colin Watson  <cjwatson@ubuntu.com>
85         * Makefile.in (docs/stamp-vti): Depend on configure.ac as well, so
86         that version.texi is rebuilt on version number changes.
88 2009-10-06  Colin Watson  <cjwatson@ubuntu.com>
90         * Makefile.in: Don't set info_INFOS unless makeinfo was found.
91         Fixes bug #27602.
93 2009-10-06  Colin Watson  <cjwatson@ubuntu.com>
95         * util/i386/pc/grub-install.in: Source
96         ${libdir}/grub/grub-mkconfig_lib before option processing, in order
97         that the --grub-probe option will work.
98         * util/sparc64/ieee1275/grub-install.in: Likewise.
100 2009-10-05  Robert Millan  <rmh.grub@aybabtu.com>
102         * configure.ac: Bump version to 1.97~beta4.
104 2009-10-03  Robert Millan  <rmh.grub@aybabtu.com>
106         Resync grub-mkdevicemap in x86_64-efi.
108         * conf/x86_64-efi.rmk (sbin_UTILITIES): Enable `grub-mkdevicemap'.
109         (grub_mkdevicemap_SOURCES): Add missing `util/deviceiter.c' and
110         `util/devicemap.c'.
112 2009-10-01  Colin Watson  <cjwatson@ubuntu.com>
114         * util/grub-editenv.c (create_envblk_file): Write new block with a
115         .new suffix and then rename it into place, to ensure atomic
116         creation.
118 2009-09-28  Robert Millan  <rmh.grub@aybabtu.com>
120         Do not automatically install headers.
122         * Makefile.in (include_DATA): Remove.  Update all users.
124 2009-09-26  Robert Millan  <rmh.grub@aybabtu.com>
126         * conf/common.rmk (pkglib_MODULES): Remove `lua.mod'.
127         (lua_mod_SOURCES, lua_mod_CFLAGS, lua_mod_LDFLAGS): Remove.
129         * util/osdetect.lua: Remove.
130         * script/lua/lauxlib.c: Likewise.
131         * script/lua/ldebug.c: Likewise.
132         * script/lua/grub_main.c: Likewise.
133         * script/lua/lauxlib.h: Likewise.
134         * script/lua/ldebug.h: Likewise.
135         * script/lua/ltablib.c: Likewise.
136         * script/lua/liolib.c: Likewise.
137         * script/lua/lstrlib.c: Likewise.
138         * script/lua/lualib.h: Likewise.
139         * script/lua/ldo.c: Likewise.
140         * script/lua/ldump.c: Likewise.
141         * script/lua/ldo.h: Likewise.
142         * script/lua/loslib.c: Likewise.
143         * script/lua/lundump.c: Likewise.
144         * script/lua/grub_lib.c: Likewise.
145         * script/lua/ldblib.c: Likewise.
146         * script/lua/lundump.h: Likewise.
147         * script/lua/lmem.c: Likewise.
148         * script/lua/grub_lib.h: Likewise.
149         * script/lua/lmathlib.c: Likewise.
150         * script/lua/lstate.c: Likewise.
151         * script/lua/ltm.c: Likewise.
152         * script/lua/lvm.c: Likewise.
153         * script/lua/lmem.h: Likewise.
154         * script/lua/lstate.h: Likewise.
155         * script/lua/ltm.h: Likewise.
156         * script/lua/ltable.c: Likewise.
157         * script/lua/lvm.h: Likewise.
158         * script/lua/llex.c: Likewise.
159         * script/lua/lgc.c: Likewise.
160         * script/lua/grub_lua.h: Likewise.
161         * script/lua/loadlib.c: Likewise.
162         * script/lua/lfunc.c: Likewise.
163         * script/lua/lopcodes.c: Likewise.
164         * script/lua/lparser.c: Likewise.
165         * script/lua/ltable.h: Likewise.
166         * script/lua/llex.h: Likewise.
167         * script/lua/lgc.h: Likewise.
168         * script/lua/lfunc.h: Likewise.
169         * script/lua/lbaselib.c: Likewise.
170         * script/lua/lopcodes.h: Likewise.
171         * script/lua/lparser.h: Likewise.
172         * script/lua/lzio.c: Likewise.
173         * script/lua/linit.c: Likewise.
174         * script/lua/lobject.c: Likewise.
175         * script/lua/llimits.h: Likewise.
176         * script/lua/lstring.c: Likewise.
177         * script/lua/lzio.h: Likewise.
178         * script/lua/lapi.c: Likewise.
179         * script/lua/lcode.c: Likewise.
180         * script/lua/lua.h: Likewise.
181         * script/lua/lobject.h: Likewise.
182         * script/lua/lstring.h: Likewise.
183         * script/lua/lapi.h: Likewise.
184         * script/lua/lcode.h: Likewise.
185         * script/lua/luaconf.h: Likewise.
187 2009-09-26  Colin Watson  <cjwatson@ubuntu.com>
189         * docs/grub.texi (Command-line and menu entry commands): Document
190         date and echo commands.
192 2009-09-24  Pavel Roskin  <proski@gnu.org>
194         * include/grub/kernel.h (struct grub_module_header): Remove
195         `grub_module_header_types'.  Make `type' unsigned.  Make `size'
196         32-bit on all platforms.
197         * util/elf/grub-mkimage.c (load_modules): Treat `type' as an
198         8-bit field.  Use grub_host_to_target32() for `size'.
199         * util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
200         * util/i386/pc/grub-mkimage.c (generate_image): Likewise.
201         * util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.
203 2009-09-24  Robert Millan  <rmh.grub@aybabtu.com>
205         Fix "lost keypress" bug in at_keyboard.
207         * term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function.
208         Checks for readyness of input buffer (without flushing it).
209         (grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather
210         than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.
212 2009-09-24  Robert Millan  <rmh.grub@aybabtu.com>
214         * util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
215         size check within GRUB_MACHINE_PCBIOS section.
217 2009-09-24  Robert Millan  <rmh.grub@aybabtu.com>
219         * include/grub/i386/at_keyboard.h (KEYBOARD_ISREADY): Negate
220         return value.
221         * term/i386/pc/at_keyboard.c (grub_keyboard_getkey): Negate
222         KEYBOARD_ISREADY check.
223         (grub_at_keyboard_checkkey): Rename to ...
224         (grub_at_keyboard_getkey_noblock): ... this.  Update all users.
225         Remove gratuitous cast.
227 2009-09-23  Colin Watson  <cjwatson@ubuntu.com>
229         * configure.ac: Call AC_PROG_MKDIR_P.
230         * Makefile.in (docs/stamp-vti): Create docs directory.  Create
231         version.texi in $(builddir) rather than $(srcdir).
232         (docs/grub.info): Create docs directory.  Prepend $(builddir)/docs
233         to makeinfo's @include search path.
235 2009-09-23  Felix Zielcke  <fzielcke@z-51.de>
237         * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Cope with `*.dpkg-*'
239 2009-09-23  Felix Zielcke  <fzielcke@z-51.de>
241         * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
242         for `*.dpkg-new'.
244 2009-09-21  Colin Watson  <cjwatson@ubuntu.com>
246         Build info documentation.  Some code borrowed from Automake.
248         * configure.ac: Check for makeinfo.
249         * Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
250         (MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
251         docs/version.texi.
252         (MOSTLYCLEANFILES): Add vti.tmp.
253         (docs/version.texi, docs/stamp-vti): Update automatically.
254         (docs/grub.info): Build info documentation.  Use --force and ignore
255         errors for now.
256         (all-local): Add $(INFOS).
257         (install-local): Install info files.
258         (uninstall): Uninstall info files.
259         * docs/version.texi: Remove from revision control.  This file is
260         automatically generated on build now.
261         * gendistlist.sh: Add `*.info'.
263 2009-09-21  Felix Zielcke  <fzielcke@z-51.de>
265         * kern/term.c: Fix indentation.
267 2009-09-21  Felix Zielcke  <fzielcke@z-51.de>
269         * util/hostdisk.c: Fix a comment.
271 2009-09-20  Robert Millan  <rmh.grub@aybabtu.com>
273         Fix regression introduced in r2539.
275         * term/usb_keyboard.c (USB_HID_DEVICE_TO_HOST): Change from 0x61
276         to 0xA1.
278 2009-09-19  Colin Watson  <cjwatson@ubuntu.com>
280         * util/grub.d/30_os-prober.in: Don't throw away stderr from
281         os-prober. Under normal operation, it does not print anything to
282         stderr; if it does, we need to debug it, and throwing away stderr
283         makes that excessively difficult.
285 2009-09-16  Vladimir Serbinenko  <phcoder@gmail.com>
287         * mmap/mmap.c (grub_cmd_badram): Fix off-by-one error.
289 2009-09-16  Robert Millan  <rmh.grub@aybabtu.com>
291         * aclocal.m4 (AC_LANG_PROGRAM): New macro.  Overrides stock
292         AC_LANG_PROGRAM from autoconf.
293         (grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing
294         prototypes (fixes warning).
296         * configure.ac: Add `-Werror' to TARGET_CFLAGS unless
297         `--disable-werror' was used.
299 2009-09-16  Robert Millan  <rmh.grub@aybabtu.com>
301         * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
302         uninitialized `lastaddr'.
304 2009-09-15  Vladimir Serbinenko  <phcoder@gmail.com>
306         * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
308 2009-09-14  Colin Watson  <cjwatson@ubuntu.com>
310         * commands/test.c (get_fileinfo): Return immediately if
311         grub_fs_probe fails.
313 2009-09-14  José Martínez  <xosemp@gmail.com>
315         * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
317 2009-09-14  Colin Watson  <cjwatson@ubuntu.com>
319         * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
320         output.
322 2009-09-13  Robert Millan  <rmh.grub@aybabtu.com>
324         * configure.ac: Remove --enable-grub-pe2elf.  Only build
325         grub-pe2elf when needed by the build system itself.
326         * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
328 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
330         * configure.ac: Bump version to 1.97~beta3.
331         * docs/version.texi: Likewise.
333 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
335         * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
336         mode special handling (grub_vbe_bios_set_dac_palette_width() call)
337         from here ...
338         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
339         (grub_linux_setup_video): ... to here (with some adjustments).
341 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
343         Fix memory corruption issue (spotted by Colin Watson).
345         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
346         causing returned size to be stored in an incorrect memory location.
347         Fix use of uninitialized value when storing the returned size.
349 2009-09-12  Yves Blusseau  <blusseau@zetam.org>
351         Change clean rules to properly remove files
353         * genmk.rb: add new clean rules
354         * Makefile.in (clean): add the new targets
355         (mostlyclean): likewise
357 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
359         * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
360         to grub_uint64_t.
361         * fs/ntfs.c (init_file): Understand 64-bit sizes for
362         non-resident files.
364 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
366         * configure.ac: Don't look for help2man when cross-compiling.  Fixes
367         part of bug #27349.
369 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
371         * util/grub-mkconfig.in: Make the created config mode 400 and
372         print a warning if it fails.
374 2009-09-10  Robert Millan  <rmh.grub@aybabtu.com>
376         * util/grub.d/40_custom.in: Ask user to type custom entries below
377         comment, rather than below 'exec tail' line.
379 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
381         * util/grub.d/40_custom.in: Make sure that the explanatory text is
382         visible in grub.cfg.
384 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
386         * util/grub.d/40_custom.in: Make it a little clearer how to use this
387         file.
389 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
391         * docs/grub.cfg: Add an example menu entry for memtest86+.
393 2009-09-09  Felix Zielcke  <fzielcke@z-51.de>
395         * config.guess: Update to latest version from config git.
396         * config.sub: Likewise.
398 2009-09-08  Colin Watson  <cjwatson@ubuntu.com>
400         * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
401         unknown-command case.  Fixes bug #27320.
403 2009-09-08  Felix Zielcke  <fzielcke@z-51.de>
405         * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
406         `help' if the command exists.
408 2009-09-06  Robert Millan  <rmh.grub@aybabtu.com>
410         * INSTALL: Require GCC 4.1.3 or later.
412 2009-09-06  Yves Blusseau  <blusseau@zetam.org>
414         * Makefile.in (RMKFILES): add i386-qemu.rmk
415         (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
416         $(srcdir)/stamp-h.in
418 2009-09-05  Robert Millan  <rmh.grub@aybabtu.com>
420         * util/grub-probe.c (probe): Comment out buggy codepath, which
421         was unexpectedly enabled by Colin Watson's 2009-09-02 fix.  This
422         should be re-enabled after 1.97.
424 2009-09-05  Felix Zielcke  <fzielcke@z-51.de>
426         * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
427         find searches for.
429 2009-09-04  Vladimir Serbinenko  <phcoder@gmail.com>
431         * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
432         unnecessary calls to grub_error.
434 2009-09-04  Colin Watson  <cjwatson@ubuntu.com>
436         * NEWS: Mention `keystatus' and Unicode fonts.
438 2009-09-04  Robert Millan  <rmh.grub@aybabtu.com>
440         * configure.ac: Bump version to 1.97~beta2.
441         * docs/version.texi: Likewise.
443 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
445         * configure.ac: By default, GCC 4.4 generates .eh_frame sections
446         containing unwind information in some cases where it previously did
447         not. Use -fno-dwarf2-cfi-asm if available to restore the old
448         behaviour. See http://patchwork.kernel.org/patch/8555/ for related
449         discussion.
451 2009-09-02  Yves BLUSSEAU  <blusseau@zetam.org>
453         Embedding loadenv module into grub-emu
455         * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
456         commands/loadenv.c
457         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
458         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
459         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
460         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
461         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
462         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
464 2009-09-03  Magnus Granberg  <zorry@ume.nu>
466         * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
467         include -fPIE in the default specs.
468         * configure.ac: Check if pie_possible is yes and add -fno-PIE
469         to TARGET_CFLAGS.
471 2009-09-03  Felix Zielcke  <fzielcke@z-51.de>
473         * INSTALL: Note that GNU Bison 2.3 or later is required.
475 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
477         * kern/i386/pc/startup.S: Fix typo.
479 2009-09-02  Vladimir Serbinenko  <phcoder@gmail.com>
481         * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
482         according to GCS.
484 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
486         * docs/grub.texi (Naming convention): Describe one-based partition
487         numbering.
488         (Device syntax): Likewise.
489         (File name syntax): Likewise.
490         (Block list syntax): Likewise.
491         (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
492         menu.lst.
493         (File name syntax): Likewise.
494         (Command-line and menu entry commands): Document acpi, blocklist,
495         crc, export, insmod, keystatus, ls, set, and unset commands.
497 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
499         * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
500         to avoid implying that only one of --shift, --ctrl, or --alt may be
501         used.
503 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
505         * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
506         rather than comparing against S_IFREG, which will almost never work.
508 2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>
510         * commands/loadenv.c (check_blocklists): Fix off-by-one error.
511         (write_blocklists): Likewise.
513 2009-09-01  Colin Watson  <cjwatson@ubuntu.com>
515         * script/lua/grub_lua.h (fputs): Supply a format string as the first
516         argument to grub_printf.
518 2009-09-01  Felix Zielcke  <fzielcke@z-51.de>
520         * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
521          non GNU test.
523 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
525         * kern/file.c (grub_file_read): Spelling fix
527 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
529         * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
530         loading of headers in some cases.
532 2009-08-30  Robert Millan  <rmh.grub@aybabtu.com>
534         * configure.ac: Bump version to 1.97~beta1.
535         * docs/version.texi: Likewise.
537 2009-08-29  Vladimir Serbinenko  <phcoder@gmail.com>
539         * include/grub/i386/xnu.h: Add license header.
540         include grub/err.h explicitly.
542 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
544         * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
545         to `ufs' in the vfs.root.mountfrom kernel parameter.
547 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
549         * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
551         [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
552         value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
554         [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
555         `ARRAY_SIZE' macro.
557 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
559         * kern/file.c (grub_file_read): Check offset.
560         * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
561         * fs/jfs.c (grub_jfs_read_file): Likewise.
562         * fs/ntfs.c (grub_ntfs_read): Likewise.
563         * fs/reiserfs.c (grub_reiserfs_read): Likewise.
564         * fs/minix.c (grub_minix_read_file): Correct offset check.
565         * fs/ufs.c (grub_ufs_read_file): Likewise.
567 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
569         * term/i386/pc/console.c (bios_data_area): Cast
570         GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
572 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
574         1-bit optimised blitters.
576         * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
577         prototype.
578         (grub_video_fbblit_replace_24bit_1bit): Likewise.
579         (grub_video_fbblit_replace_16bit_1bit): Likewise.
580         (grub_video_fbblit_replace_8bit_1bit): Likewise.
581         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
582         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
583         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
584         * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
585         function.
586         (grub_video_fbblit_replace_24bit_1bit): Likewise.
587         (grub_video_fbblit_replace_16bit_1bit): Likewise.
588         (grub_video_fbblit_replace_8bit_1bit): Likewise.
589         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
590         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
591         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
592         * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
593         when possible.
594         * video/video.c (grub_video_get_blit_format): Return
595         GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
597 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
599         * normal/cmdline.c (grub_cmdline_get): Supply a format string as
600         the first argument to grub_printf.
602 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
603 2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>
605         Add `getkeystatus' terminal method.  Add a new `keystatus' command
606         to query it.
608         * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
609         GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
610         modifier key bitmasks.
611         (struct grub_term_input): Add `getkeystatus' member.
612         (grub_getkeystatus): Add prototype.
613         * kern/term.c (grub_getkeystatus): New function.
615         * include/grub/i386/pc/memory.h
616         (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
617         (struct grub_machine_bios_data_area): Define necessary parts of BIOS
618         Data Area layout.
619         * term/i386/pc/console.c (grub_console_getkeystatus): New function.
620         (grub_console_term_input): Set `getkeystatus' member.
621         * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
622         constants.
623         (grub_usb_keyboard_getreport): Likewise.
624         (grub_usb_keyboard_checkkey): Likewise.
625         (grub_usb_keyboard_getkeystatus): New function.
626         (grub_usb_keyboard_term): Set `getkeystatus' member.
628         * commands/keystatus.c: New file.
629         * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
630         (keystatus_mod_SOURCES): New variable.
631         (keystatus_mod_CFLAGS): Likewise.
632         (keystatus_mod_LDFLAGS): Likewise.
633         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
634         commands/keystatus.c.
635         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
636         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
637         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
638         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
639         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
640         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
642 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
644         Split befs.mod and afs.mod into *_be.mod and *.mod
646         * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
647         (grub_fstest_SOURCES): Likewise.
648         (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
649         (afs_be_mod_SOURCES): New variable.
650         (afs_be_mod_CFLAGS): Likewise.
651         (afs_be_mod_LDFLAGS): Likewise.
652         (befs_be_mod_SOURCES): Likewise.
653         (befs_be_mod_CFLAGS): Likewise.
654         (befs_be_mod_LDFLAGS): Likewise.
655         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
656         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
657         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
658         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
659         (grub_emu_SOURCES): Likewise.
660         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
661         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
662         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
663         * fs/afs_be.c: New file.
664         * fs/befs_be.c: New file.
665         * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
666         (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
667         (U16): Replaced with ...
668         (grub_afs_to_cpu16): ...this. All users updated.
669         (U32): Replaced with ...
670         (grub_afs_to_cpu32): ...this. All users updated.
671         (U64): Replaced with ...
672         (grub_afs_to_cpu64): ...this. All users updated.
673         (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
674         (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
675         (grub_afs_validate_sblock): Check only one endianness.
676         (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
677         (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
678         (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
679         (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
680         (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
681         (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
682         (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
683         (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
685 2009-08-26  Bean  <bean123ch@gmail.com>
687         * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
688         64-bit number.
689         (GRUB_XFS_FSB_TO_BLOCK): Likewise.
690         (grub_xfs_inode_block): Change return type to grub_uint64_t.
691         (grub_xfs_read_inode): Change type of block to grub_uint64_t.
693 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
695         NetBSD memory map support.
697         * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
698         (grub_netbsd_btinfo_mmap_header): New structure.
699         (grub_netbsd_btinfo_mmap_entry): Likewise.
700         * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
702 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
704         Enable bsd.mod on coreboot.
706         * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
707         (bsd_mod_SOURCES): New variable.
708         (bsd_mod_CFLAGS): Likewise.
709         (bsd_mod_LDFLAGS): Likewise.
710         (bsd_mod_ASFLAGS): Likewise.
711         * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
712         (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
714 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
716         Cleanup NetBSD root support.
718         * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
719         grub_bsd_get_device.
720         Fix typo.
722 2009-08-25  Felix Zielcke  <fzielcke@z-51.de>
724         * util/grub.d/00_header.in: Move check for the video backend of
725         gfxterm from here ...
726         * util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
727         a suitable video backend.
729 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
731         Fix breakage in grub-setup.
733         * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
734         "msdos_partition_map".
736 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
738         Fix breakage in normal/auth.c.
740         * normal/auth.c (grub_iswordseparator): New function.
742 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
744         Authentication support.
746         * commands/password.c: New file.
747         * conf/common.rmk (pkglib_MODULES): Add password.mod.
748         (password_mod_SOURCES): New variable.
749         (password_mod_CFLAGS): Likewise.
750         (password_mod_LDFLAGS): Likewise.
751         (normal_mod_SOURCES): Add normal/auth.c.
752         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
753         normal/auth.c.
754         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
755         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
756         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
757         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
758         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
759         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
760         * include/grub/auth.h: New file.
761         * include/grub/err.h (grub_err_t): New enum value
762         GRUB_ERR_ACCESS_DENIED.
763         * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
764         'users'.
765         * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
766         * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
767         users updated.
768         * normal/auth.c: New file.
769         * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
770         (grub_cmdline_run): Don't allow to go to command line without
771         authentication.
772         * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
773         * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
774         menuentry without superuser rights.
775         * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
776         user isn't a superuser.
778 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
780         Save space by inlining misc.c functions.
782         * kern/misc.c (grub_iswordseparator): Made static.
783         * kern/misc.c (grub_strcat): Moved from here ...
784         * include/grub/misc.h (grub_strcat): ... here. Inlined.
785         * kern/misc.c (grub_strncat): Moved from here ...
786         * include/grub/misc.h (grub_strncat): ... here. Inlined.
787         * kern/misc.c (grub_strcasecmp): Moved from here ...
788         * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
789         * kern/misc.c (grub_strncasecmp): Moved from here ...
790         * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
791         * kern/misc.c (grub_isalpha): Moved from here ...
792         * include/grub/misc.h (grub_isalpha): ... here. Inlined.
793         * kern/misc.c (grub_isdigit): Moved from here ...
794         * include/grub/misc.h (grub_isdigit): ... here. Inlined.
795         * kern/misc.c (grub_isgraph): Moved from here ...
796         * include/grub/misc.h (grub_isgraph): ... here. Inlined.
797         * kern/misc.c (grub_tolower): Moved from here ...
798         * include/grub/misc.h (grub_tolower): ... here. Inlined.
800 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
802         * script/sh/function.c (grub_script_function_find): Cut error message
803         not to flood terminal.
804         * script/sh/lexer.c (grub_script_yylex): Remove command line length
805         limit.
806         * script/sh/script.c (grub_script_arg_add): Duplicate string.
808 2009-08-24  Colin Watson  <cjwatson@ubuntu.com>
810         * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
811         `report' grub_uint8_t *.
812         (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
813         Use a 50-millisecond timeout rather than just repeating
814         grub_usb_keyboard_getreport 50 times.
815         (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
817 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
819         Rename *_partition_map to part_*
821         * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
822         * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
823         * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
824         * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
825         All users updated.
826         * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
827         All users updated.
828         * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
829         * util/grub-probe.c (probe_partmap): Don't transform partition name
830         to get module name.
832 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
834         Fix OpenBSD and NetBSD support.
836         * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
837         memory address conflict.
838         (OPENBSD_MMAP_ACPI): New definition.
839         (OPENBSD_MMAP_NVS): Likewise.
840         * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
841         and OPENBSD_MMAP_NVS.
842         Add memory map terminator
843         Explicit cast when calling grub_unix_real_boot.
844         (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
846 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
848         Let user specify NetBSD root device.
850         * loader/i386/bsd.c (netbsd_root): New variable.
851         (netbsd_opts): New option 'root'.
852         (NETBSD_ROOT_ARG): New macro.
853         (grub_netbsd_boot): Use 'netbsd_root'.
854         (grub_bsd_unload): Free 'netbsd_root'.
855         (grub_cmd_netbsd): Fill 'netbsd_root'.
857 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
859         Support for 64-bit NetBSD.
861         * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
862         point when booting non-FreeBSD.
864 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
866         Support --no-smp and --no-acpi for NetBSD.
868         * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
869         (NETBSD_AB_NOACPI): Likewise.
870         * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
871         (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
873 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
875         * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
876         errors.
877         (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
878         errors. Call grub_error when needed.
880 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
882         * commands/search.c (search_fs): Try searching without autoload first.
883         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
884         filesystem module explicitly for faster booting.
886 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
888         * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
890 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
892         * util/grub.d/30_os-prober.in: Disable os-prober if
893         `GRUB_DISABLE_OS_PROBER' was set to true.
895 2009-08-23  Robert Millan  <rmh.grub@aybabtu.com>
897         * partmap/pc.c: Rename to ...
898         * partmap/msdos.c: ... this.  Update all users.
899         (grub_pc_partition_map): Rename to ...
900         (grub_msdos_partition_map): ... this.  Update all users.
902         * parttool/pcpart.c: Rename to ...
903         * parttool/msdospart.c: ... this.  Update all users.
905         * include/grub/pc_partition.h: Rename to ...
906         * include/grub/msdos_partition.h: ... this.  Update all users.
907         (grub_pc_partition_bsd_entry): Rename to ...
908         (grub_msdos_partition_bsd_entry): ... this.  Update all users.
909         (grub_pc_partition_disk_label): Rename to ...
910         (grub_msdos_partition_disk_label): ... this.  Update all users.
911         (grub_pc_partition_entry): Rename to ...
912         (grub_msdos_partition_entry): ... this.  Update all users.
913         (grub_pc_partition_mbr): Rename to ...
914         (grub_msdos_partition_mbr): ... this.  Update all users.
915         (grub_pc_partition): Rename to ...
916         (grub_msdos_partition): ... this.  Update all users.
917         (grub_pc_partition_is_empty): Rename to ...
918         (grub_msdos_partition_is_empty): ... this.  Update all users.
919         (grub_pc_partition_is_extended): Rename to ...
920         (grub_msdos_partition_is_extended): ... this.  Update all users.
921         (grub_pc_partition_is_bsd): Rename to ...
922         (grub_msdos_partition_is_bsd): ... this.  Update all users.
924         * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
925         (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
926         (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
927         (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
928         (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
929         (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
930         (gpt_mod_LDFLAGS): Rename to ...
931         (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
932         (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
933         (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
934         (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
935         (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
936         (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
937         (part_gpt_mod_LDFLAGS): ... this.
938         (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
939         `pcpart.mod' to `msdospart.mod'.
940         (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
941         to ...
942         (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
943         (msdospart_mod_LDFLAGS): ... this.
945 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
947         * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
948         (openbsd_opts): Likewise.
949         (netbsd_opts): Likewise.
950         (freebsd_flags): Added 0 terminator.
951         (openbsd_flags): Likewise.
952         (netbsd_flags): Likewise.
953         (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
954         (grub_cmd_freebsd): Transformed into extended command.
955         (grub_cmd_openbsd): Likewise.
956         (grub_cmd_netbsd): Likewise.
957         (cmd_freebsd): Changed type to grub_extcmd_t.
958         (cmd_openbsd): Likewise.
959         (cmd_netbsd): Likewise.
960         (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
961         grub_cmd_openbsd as extended commands.
962         (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
963         cmd_netbsd and cmd_openbsd
965 2009-08-22  Vladimir Serbinenko  <phcoder@gmail.com>
967         * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
969 2009-08-21  Pavel Roskin  <proski@gnu.org>
971         * Makefile.in (install-local): When checking if a file is in the
972         build directory, use "test -e" to detect symlinks.
974         * Makefile.in (install-local): Remove all files in
975         $(DESTDIR)$(pkglibdir) before installing new files there.
977 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
979         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
980         grub-mkelfimage.
982 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
984         * util/grub-mkconfig.in: Don't use gfxterm by default if not
985         explicitly specified by the user.
987 2009-08-18  Pavel Roskin  <proski@gnu.org>
989         * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
990         grub_uint8_t pointer for data.
991         * include/grub/fbutil.h (struct grub_video_fbblit_info):
992         Likewise.
993         * video/fb/fbutil.c: Remove unnecessary casts.
995 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
997         VBE cleanup.
999         * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
1000         (grub_vbe_set_video_mode): Save active mode info
1001         only after setting the mode.
1002         (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
1003         second argument.
1005 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
1007         Rename variables for clarity.
1009         * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
1010         (active_vbe_mode_info): ... this. All users updated.
1011         (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
1012         All users updated.
1013         (initial_mode): Rename to ...
1014         (initial_vbe_mode): ... this. All users updated.
1015         (mode_in_use): Rename to ..
1016         (vbe_mode_in_use): ... this. All users updated.
1017         (mode_list): Rename to ..
1018         (vbe_mode_list): ... this. All users updated.
1019         (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
1020         'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
1021         (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
1022         'mode_list_size' to 'vbe_mode_list_size'.
1023         (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
1024         'best_mode_info' to 'best_vbe_mode_info' and
1025         'best_mode' to 'best_vbe_mode'
1027 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
1029         Remove duplicate grub_video_fb_get_video_ptr.
1031         * include/grub/fbutil.h (get_data_ptr): Rename to ...
1032         (grub_video_fb_get_video_ptr): ... this.
1033         * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
1034         * video/fb/fbutil.c: Add comment about addressing.
1035         (get_data_ptr): Rename to ...
1036         (grub_video_fb_get_video_ptr): ... this. All users updated.
1037         * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
1039 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
1041         * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
1042         grub_dprintf() that was just added.
1044 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
1046         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
1047         (DEFAULT_VIDEO_MODE): Remove macros.
1048         (grub_linux_boot): Remove assumption that Linux has FB support,
1049         and use "text" as default video mode.
1051 2009-08-15  Vladimir Serbinenko  <phcoder@gmail.com>
1053         * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
1054         grub_dprintf.
1055         * fs/fat.c (grub_fat_read_data): Likewise.
1057 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1059         * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
1060         payload.
1061         (grub_module): Likewise.
1063 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1065         * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
1066         mbi->cmdline but free playground.
1068 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1070         Handle group offset on UFS1.
1072         * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
1073         (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
1075 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1077         Split ufs.mod into ufs1.mod and ufs2.mod.
1079         * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
1080         (grub_fstest_SOURCES): Likewise.
1081         (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
1082         (ufs_mod_SOURCES): Remove.
1083         (ufs_mod_CFLAGS): Likewise.
1084         (ufs_mod_LDFLAGS): Likewise.
1085         (ufs1_mod_SOURCES): New variable.
1086         (ufs1_mod_CFLAGS): Likewise.
1087         (ufs1_mod_LDFLAGS): Likewise.
1088         (ufs2_mod_SOURCES): New variable.
1089         (ufs2_mod_CFLAGS): Likewise.
1090         (ufs2_mod_LDFLAGS): Likewise.
1091         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
1092         * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1093         Likewise.
1094         (grub_emu_SOURCES): Likewise.
1095         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1096         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1097         (grub_setup_SOURCES): Likewise.
1098         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1099         * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
1100         (grub_setup_SOURCES): Likewise.
1101         * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1102         Likewise.
1103         * fs/ufs2.c: New file.
1104         * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
1106 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1108         Framebuffer split.
1110         * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
1111         subsystem at the end.
1112         * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
1113         (video_fb_mod_SOURCES): New variable.
1114         (video_fb_mod_CFLAGS): Likewise.
1115         (video_fb_mod_LDFLAGS): Likewise.
1116         * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
1117         video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
1118         * video/i386/pc/vbeblit.c: Moved from here ...
1119         * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
1120         * video/i386/pc/vbefill.c: Moved from here ...
1121         * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
1122         * video/i386/pc/vbeutil.c: Moved from here ...
1123         * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
1124         * include/grub/i386/pc/vbeblit.h: Moved from here ...
1125         * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
1126         * include/grub/i386/pc/vbefill.h: Moved from here ...
1127         * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
1128         * include/grub/i386/pc/vbeutil.h: Moved from here ...
1129         * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
1130         * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
1131         * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
1132         * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
1133         (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
1134         (grub_video_adapter): Added 'get_info_and_fini'.
1135         (grub_video_get_info_and_fini): New prototype.
1136         (grub_video_set_mode): make modestring const char *.
1137         * loader/i386/linux.c (grub_linux_setup_video): Use
1138         grub_video_get_info_and_fini.
1139         (grub_linux_boot): Move modesetting just before booting.
1140         * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
1141         grub_video_get_info_and_fini.
1142         * video/i386/pc/vbe.c: Moved framebuffer part ...
1143         * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
1144         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
1145         grub_video_fbstd_colors and grub_video_fb_set_palette.
1146         (grub_video_vbe_init): Clear 'framebuffer' variable and use
1147         grub_video_fb_init.
1148         (grub_video_vbe_fini): Use grub_video_fb_fini.
1149         (grub_video_vbe_setup): Use framebuffer.render_target instead of
1150         render_target and use grub_video_fb_set_active_render_target and
1151         grub_video_fb_set_palette.
1152         (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
1153         (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
1154         (grub_video_vbe_adapter): Use framebuffer.
1155         * video/video.c (grub_video_get_info_and_fini): New function.
1156         (grub_video_set_mode): Make modestring const char *.
1157         (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
1158         values are already initialised.
1160 2009-08-14  Pavel Roskin  <proski@gnu.org>
1162         * boot/i386/pc/cdboot.S: Use LOCAL for local labels.  Eliminate
1163         ABS and APPLE_CC.
1164         * boot/i386/pc/diskboot.S: Likewise.
1165         * boot/i386/pc/lnxboot.S: Likewise.  Hardcode the number of code
1166         sectors allow compilation on MacOSX.
1167         * conf/i386-pc.rmk: Enable unconditional compilation of
1168         lnxboot.img.
1170 2009-08-13  Colin Watson  <cjwatson@ubuntu.com>
1172         * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
1173         * util/grub.d/00_header.in: Enter interruptible sleep if
1174         GRUB_HIDDEN_TIMEOUT is set.
1176 2009-08-13  Yves Blusseau  <blusseau@zetam.org>
1178         * include/grub/symbol.h: Add the LOCAL macro.
1179         * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
1180         starting with "L_".
1182 2009-08-13  Pavel Roskin  <proski@gnu.org>
1184         * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
1185         any modern compilers we support.
1187         * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
1188         Use local labels starting with "L_" so that Apple assembler
1189         knows they are local.
1191 2009-08-10  Robert Millan  <rmh.grub@aybabtu.com>
1193         * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
1194         (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
1195         (bsd_kernel_types): ... this enum.
1197         * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
1198         (grub_cmd_freebsd_module_elf): Abort with "You need to load the
1199         kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
1201         (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
1202         (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
1203         (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
1204         messages.
1206 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
1208         * util/grub-dumpdevtree: Moved from here ...
1209         * util/i386/efi/grub-dumpdevtree: ... to here.
1210         (hexify): New function.  Converts a string to its hex version.
1211         Generate hex versions of "efi" and "device-properties" by calling
1212         hexify() on the ASCII strings rather than by hardcoding numbers.
1214 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
1216         * fs/jfs.c: Update copyright year.
1218 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
1220         * util/grub.d/00_header.in: Fix a comment.
1221         * util/grub.d/10_linux.in: Likewise.
1222         * util/grub.d/10_windows.in: Likewise.
1223         * util/grub.d/10_hurd.in: Likewise.
1225 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
1227         * util/grub-mkconfig.in: Allow the user to specify the used font
1228         with GRUB_FONT.
1230 2009-08-08  Pavel Roskin  <proski@gnu.org>
1232         * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
1233         available, xfs.mod needs it now.
1235         * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
1236         the "g" modifier in sed when the intention is to strip something
1237         once.  This fixes comparison of kernels with multiple dashes.
1239         * util/grub-mkconfig.in: Define datarootdir, datadir may depend
1240         on it.  Add missing space before closing bracket.  Fix
1241         misleading formatting.
1243 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1245         * docs/grub.texi: Major overhaul.  Remove all sections that are
1246         specific to GRUB Legacy, or mostly composed of Legacy-specific
1247         information.
1249 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1251         * docs/version.texi: New file.  Provides version information for
1252         grub.texi.
1254 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1256         * docs/grub.texi: Update CVS information to SVN.
1257         Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
1259 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
1261         * util/grub-mkconfig.in: Remove a wrong `fi'.
1263 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
1265         * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
1266         (grub_jfs_uuid): New function.
1267         (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
1269 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
1271         * util/grub-mkconfig_lib.in (font_path): Move the functionality
1272         of it to ...
1273         * util/grub-mkconfig.in: ... here.  Prefer unicode.pf2 and
1274         unifont.pf2 over ascii.pf2.  Export LANG=C in case ascii.pf2 gets used.
1276 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1278         * util/grub.d/10_linux.in (test_numeric): Moved from here ...
1279         * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
1280         Update all users.
1282         * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
1283         not just "vmlinu[zx]".
1284         Moved from here ...
1285         * util/grub-mkconfig_lib.in (version_test_gt): ... to here.  Update
1286         all users.
1288         * util/grub.d/10_linux.in (find_latest): Moved from here ...
1289         * util/grub-mkconfig_lib.in (version_find_latest): ... to here.  Update
1290         all users.
1292 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1294         * util/grub.d/10_freebsd.in: Use an absolute device path for
1295         `vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.
1297 2009-08-06  Felix Zielcke  <fzielcke@z-51.de>
1299         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
1300         handling of multiple abstraction modules.
1302 2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>
1304         Fix a bug resulting in black screen when loading Linux using a
1305         packed video mode.
1307         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
1308         function.
1310         * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
1311         (grub_vbe_bios_getset_dac_palette_width): New function.
1312         (grub_vbe_bios_get_dac_palette_width)
1313         (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
1314         grub_vbe_bios_getset_dac_palette_width()).
1316         * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
1317         check for return status.
1318         (grub_vbe_get_video_mode_info): When getting information for a packed
1319         mode (<= 8 bpp), obtain DAC palette width using
1320         grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
1321         {red,green,blue}_mark_size.
1323 2009-08-04  Felix Zielcke  <fzielcke@z-51.de>
1325         * commands/search.c (options): Fix help output to match actual code.
1327 2009-08-02  Vladimir Serbinenko  <phcoder@gmail.com>
1329         * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
1330         of homegrown code.
1332 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1334         * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
1335         on XFS or ReiserFS.
1337 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1339         Support Apple partition map with sector size different from 512 bytes.
1341         * partmap/apple.c (grub_apple_header): New field 'blocksize'.
1342         (apple_partition_map_iterate): Respect 'aheader.blocksize'
1343         and 'apart.partmap_size'.
1345 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1346 2009-08-01  Robert Millan  <rmh.grub@aybabtu.com>
1348         Fix cpuid command.
1350         * commands/i386/cpuid.c (options): New variable.
1351         (grub_cmd_cpuid): Return real error.
1352         (GRUB_MOD_INIT(cpuid)): Declare options.
1354 2009-07-31  Vladimir Serbinenko  <phcoder@gmail.com>
1356         * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
1357         valid.
1359 2009-07-31  Bean  <bean123ch@gmail.com>
1361         * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
1362         log2_inode.
1363         (grub_fshelp_node): Move inode field to the end.
1364         (grub_xfs_data): Remove inode field.
1365         (grub_xfs_inode_block): Calculate inode size using sblock.
1366         (grub_xfs_inode_offset): Likewise.
1367         (grub_xfs_read_inode): Calculate inode size using sblock.
1368         (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
1369         (grub_xfs_iterate_dir): Calculate inode size using sblock.
1370         (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
1371         to match inode size.
1372         (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
1373         not accessible when data is null.
1374         (grub_xfs_open): Likewise.
1376 2009-07-31  Bean  <bean123ch@gmail.com>
1378         * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
1379         Don't change pv->disk if it's already set.
1381         * disk/raid.c (grub_raid_scan_device): Merge this function into ...
1382         (grub_raid_register): ... here.
1383         (grub_raid_rescan): Removed.
1385         * include/grub/raid.h (grub_raid_rescan): Removed.
1387         * util/grub-fstest.c: Remove include file <grub/raid.h>.
1388         (fstest): Replace grub_raid_rescan with module fini function followed
1389         by init function.
1391         * util/grub-probe.c: Add include file <grub/raid.h>.
1392         (probe_raid_level): New function.
1393         (probe): Detect abstraction by walking the disk device, support two
1394         level of abstraction (LVM on RAID) when detecting partition map.
1396 2009-07-31  Pavel Roskin  <proski@gnu.org>
1398         * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
1399         to grub_zalloc(), it was erroneous.
1400         Reported by Bean <bean123ch@gmail.com>
1402 2009-07-30  Vladimir Serbinenko  <phcoder@gmail.com>
1404         * util/i386/pc/grub-setup.c (setup): Check that no partition is in
1405         embedding zone, not only the first one.
1407 2009-07-29  Joe Auricchio  <jauricchio@gmail.com>
1409         * term/gfxterm.c (clear_char): New function.
1410         (grub_virtual_screen_setup): Use clear_char.
1411         (scroll_up): Likewise.
1412         (grub_virtual_screen_cls): Likewise.
1414 2009-07-29  Felix Zielcke  <fzielcke@z-51.de>
1416         * util/deviceiter.c (get_acceleraid_disk_name): New static
1417         function.
1418         (grub_util_iterate_devices): Handle Accelraid devices.
1419         * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
1421 2009-07-28  Robert Millan  <rmh.grub@aybabtu.com>
1423         * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
1424         separator for the suggested gfxpayload string (';' collides with the
1425         parser and needs escaping).
1427 2009-07-28  Vladimir Serbinenko  <phcoder@gmail.com>
1429         * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
1430         Clear direction flag before jumping to OS.
1431         (grub_multiboot2_real_boot): Likewise.
1433 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1435         * util/i386/pc/grub-install: Fix parsing of --disk-module
1436         option.
1438 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1440         * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
1441         when embedding.
1443 2009-07-26  Felix Zielcke  <fzielcke@z-51.de>
1445         * util/grub-mkconfig.in (package_version): New variable.
1446         Use it do display the version.
1448 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1450         * kern/file.c (grub_file_open): Revert to previous check with
1451         grub_errno.
1453 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1455         * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
1456         from help line. It's out of sync with code.
1458 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1460         * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
1461         entries on failed boot.
1463 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1465         * kern/file.c (grub_file_open): Fix an error check.
1467 2009-07-24  Vladimir Serbinenko  <phcoder@gmail.com>
1469         * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
1470         partition map couldn't be identified.
1472 2009-07-23  Pavel Roskin  <proski@gnu.org>
1474         * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
1475         instead of WORDS_BIGENDIAN.  Use grub_le_to_cpu32(), so that the
1476         case of little endian words becomes just an optimization.
1477         Respect const modifier.
1478         (md5_final): Use code that doesn't depend on endianness.
1480         * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
1481         to avoid loss of upper bits if align is unsigned and shorter
1482         than addr.
1484 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1486         UUID support for UFS
1488         * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
1489         (grub_ufs_uuid): New function.
1490         (grub_ufs_fs): add .uuid
1492 2009-07-21  Pavel Roskin  <proski@gnu.org>
1494         * kern/dl.c (grub_dl_check_header): Make static.
1496 2009-07-21  Felix Zielcke  <fzielcke@z-51.de>
1498         * util/grub.d/30_os-prober.in: Remove unused CHAINROOT.  Don't
1499         add drivemap for Vista.  It breaks Windows 7.
1501 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1503         * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
1504         128 bytes
1506 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1508         Add BFS support
1510         * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
1511         (grub_fstest_SOURCES): Likewise.
1512         (pkglib_MODULES): Add befs.mod.
1513         (befs_mod_SOURCES): New variable.
1514         (befs_mod_CFLAGS): Likewise.
1515         (befs_mod_LDFLAGS): Likewise.
1516         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1517         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1518         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1519         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1520         (grub_setup_SOURCES): Likewise.
1521         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1522         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1523         (grub_setup_SOURCES): Likewise.
1524         * fs/befs.c: New file.
1525         * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
1526         (GRUB_AFS_SBLOCK_SECTOR): Likewise.
1527         (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
1528         (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
1529         (B_KEY_INDEX_ALIGN): New declaration.
1530         (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
1531         (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
1532         (grub_afs_btree) [MODE_BFS]: New conditional declaration.
1533         (grub_afs_sblock) [MODE_BFS]: Remove link_count.
1534         (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
1535         (grub_afs_mount) [MODE_BFS]: Likewise.
1536         (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
1537         (grub_afs_fs): Use GRUB_AFS_FSNAME
1538         (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
1539         (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
1540         (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
1541         (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
1543 2009-07-19  Yves BLUSSEAU  <yves.grub-devel@zetam.org>
1545         * util/getroot.c (find_root_device): Add support for MacOSX.
1546         * util/hostdisk.c: Likewise.
1548 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1550         * font/font.c (find_glyph): Check whether a font is present to avoid
1551         segmentation fault.
1553 2009-07-20  Joe Auricchio  <jauricchio@gmail.com>
1555         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
1557 2009-07-20  Pavel Roskin  <proski@gnu.org>
1559         * configure.ac: Trim excessively wordy excuses.
1561 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1563         Add symlink, mtime and label support to AtheFS.
1565         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
1566         (grub_afs_iterate_dir): Handle symlinks.
1567         (grub_afs_open): Use grub_afs_read_symlink.
1568         (grub_afs_dir): Likewise.
1569         Pass mtime.
1570         (grub_afs_label): New function.
1571         (grub_afs_fs): Add grub_afs_label.
1572         (grub_afs_read_symlink): New function.
1574 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1576         Fix AtheFS support.
1578         * fs/afs.c: Fix comments style.
1579         (grub_afs_blockrun): Declare as packed.
1580         (grub_afs_datastream): Likewise.
1581         (grub_afs_bnode): Likewise.
1582         (grub_afs_btree): Likewise.
1583         (grub_afs_sblock): Likewise.
1584         Declare `name' as char.
1585         (grub_afs_inode): Declare as packed.
1586         Change void *vnode to grub_uint32_t unused.
1587         (grub_afs_iterate_dir): Check that key_size is positive.
1588         (grub_afs_mount): Don't read superblock twice.
1589         (grub_afs_dir): Don't free node in case of error,
1590         grub_fshelp_find_file already handles this.
1591         (grub_afs_open): Likewise.
1593 2009-07-19  Pavel Roskin  <proski@gnu.org>
1595         * Makefile.in: Remove LIBLZO and enable_lzo.
1596         * conf/i386-pc.rmk: Remove lzo support.
1597         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
1598         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
1599         support.
1600         * kern/i386/pc/lzo1x.S: Remove.
1601         * kern/i386/pc/startup.S: Remove lzo support.
1602         * util/i386/pc/grub-mkimage.c: Likewise.
1604 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
1606         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
1607         * fs/xfs.c (grub_xfs_dir): Likewise.
1608         * fs/afs.c (grub_afs_dir): Likewise.
1609         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
1610         (grub_iso9660_open): Likewise.
1611         * fs/jfs.c (grub_jfs_open): Likewise.
1612         * fs/ext2.c (grub_ext2_dir): Likewise.
1613         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
1614         * script/sh/lexer.c (grub_script_yylex): Likewise.
1616 2009-07-16  Pavel Roskin  <proski@gnu.org>
1618         * configure.ac: Never add "-c" to CFLAGS.
1620         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
1622         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
1623         grub_cv_cc_efiemu should be used.
1625         * configure.ac: Typo fixes.
1627         * kern/mm.c (grub_zalloc): New function.
1628         (grub_debug_zalloc): Likewise.
1629         * include/grub/mm.h: Declare grub_zalloc() and
1630         grub_debug_zalloc().
1631         * util/misc.c (grub_zalloc): New function.
1632         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
1633         instead of grub_malloc(), remove unneeded initializations.
1634         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
1635         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
1636         * commands/parttool.c (grub_cmd_parttool): Likewise.
1637         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
1638         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
1639         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
1640         * disk/usbms.c (grub_usbms_finddevs): Likewise.
1641         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
1642         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
1643         (grub_cmd_efiemu_pnvram): Likewise.
1644         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
1645         * fs/iso9660.c (grub_iso9660_mount): Likewise.
1646         (grub_iso9660_iterate_dir): Likewise.
1647         * fs/jfs.c (grub_jfs_opendir): Likewise.
1648         * fs/ntfs.c (list_file): Likewise.
1649         (grub_ntfs_mount): Likewise.
1650         * kern/disk.c (grub_disk_open): Likewise.
1651         * kern/dl.c (grub_dl_load_core): Likewise.
1652         * kern/elf.c (grub_elf_file): Likewise.
1653         * kern/env.c (grub_env_context_open): Likewise.
1654         (grub_env_set): Likewise.
1655         (grub_env_set_data_slot): Likewise.
1656         * kern/file.c (grub_file_open): Likewise.
1657         * kern/fs.c (grub_fs_blocklist_open): Likewise.
1658         * loader/i386/multiboot.c (grub_module): Likewise.
1659         * loader/xnu.c (grub_xnu_create_key): Likewise.
1660         (grub_xnu_create_value): Likewise.
1661         * normal/main.c (grub_normal_add_menu_entry): Likewise.
1662         (read_config_file): Likewise.
1663         * normal/menu_entry.c (make_screen): Likewise.
1664         * partmap/sun.c (sun_partition_map_iterate): Likewise.
1665         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
1666         * script/sh/script.c (grub_script_parse): Likewise.
1667         * video/bitmap.c (grub_video_bitmap_create): Likewise.
1668         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
1669         * video/readers/png.c (grub_png_output_byte): Likewise.
1670         (grub_video_reader_png): Likewise.
1672 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1674         Enable all targets that can be built by default
1676         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
1677         grub-mkfont and grub-fstest if they can be built
1679 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1681         Fix hang and segmentation fault in grub-emu-usb
1683         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
1684         * util/usb.c (grub_libusb_devices): likewise
1685         (grub_libusb_init): rename to ...
1686         (GRUB_MOD_INIT (libusb)):...this
1687         (grub_libusb_fini): rename to ..
1688         (GRUB_MOD_FINI (libusb)):...this
1689         * disk/usbms.c (grub_usbms_transfer): fix retry logic
1690         * include/grub/disk.h (grub_raid_init): removed, it's useless
1691         (grub_raid_fini): likewise
1692         (grub_lvm_init): likewise
1693         (grub_lvm_fini): likewise
1694         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
1695         by grub_init_all
1697 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1699         Fix libusb
1701         * Makefile.in (LIBUSB): new macro
1702         * genmk.rb (Utility/print_tail): new method
1703         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
1704         (top level): call util.print_tail at the end.
1706 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1708         Make FreeBSD accept zpool.cache
1710         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
1711         type is /boot/zfs/zpool.cache
1713 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1715         Fix 64-bit efiemu
1717         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
1718         correct wrong typedef
1719         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
1721 2009-07-15  Pavel Roskin  <proski@gnu.org>
1723         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
1724         * kern/disk.c (struct grub_disk_cache): Likewise.
1726         * commands/probe.c (options): Typo fix.
1728         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
1729         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
1730         accordingly.
1731         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
1733         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
1734         the end of "Error" to make the message more readable.
1736         * boot/i386/pc/boot.S (kernel_segment): Remove.
1737         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
1738         for destination.
1740         * boot/i386/pc/boot.S (boot_version): Remove.
1741         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
1742         Remove.
1744         * include/grub/i386/pc/boot.h: Sort all offsets.
1745         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
1746         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
1747         * boot/i386/pc/boot.S: Assert location of every offset listed in
1748         include/grub/i386/pc/boot.h.
1750 2009-07-13  Pavel Roskin  <proski@gnu.org>
1752         * include/grub/i386/coreboot/machine.h: Rename
1753         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
1754         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
1755         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
1757         * kern/dl.c: Force native word size to suppress warnings when
1758         compiling grub-emu.
1760         * kern/device.c (grub_device_iterate): Change struct part_ent to
1761         hold the name, not a pointer to it.  Use one grub_malloc() per
1762         partition, not two.  Free partition_name if grub_malloc() fails.
1763         Set ents to NULL only before grub_partition_iterate() is called.
1765 2009-07-11  Bean  <bean123ch@gmail.com>
1767         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
1768         childname.
1770 2009-07-10  Bean  <bean123ch@gmail.com>
1771 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
1773         * kern/ieee1275/openfw.c (grub_children_iterate)
1774         (grub_devalias_iterate): Fix size evaluation for property or path
1775         strings, which was broken since r2132.
1777 2009-07-07  Pavel Roskin  <proski@gnu.org>
1779         * commands/search.c (search_file): Merge into ...
1780         (search_fs): ... this.  Accept search type as argument.
1781         (grub_cmd_search): Pass search type to search_fs().
1783         * include/grub/util/console.h: New file.
1784         * util/console.c: Use it instead of grub/machine/console.h.
1785         * util/grub-emu.c: Likewise.
1787         * lib/arg.c (find_long_option): Remove.
1788         (find_long): Add `len' argument, make `s' const char *.
1789         (grub_arg_parse): Parse long options in place, not in a
1790         temporary buffer.
1792 2009-07-06  Pavel Roskin  <proski@gnu.org>
1794         * commands/search.c (search_fs): Fix potential NULL pointer
1795         dereference.
1797         * commands/search.c (search_fs): Replace QUID macro with quid_fn
1798         function pointer.
1800 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
1802         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
1803         comparison.
1805 2009-07-05  Pavel Roskin  <proski@gnu.org>
1807         * include/grub/i386/linux.h (struct linux_kernel_params):
1808         Restore padding3, it's still needed.
1810         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
1811         FreeBSD.
1812         * util/osdetect.lua: Likewise.
1814 2009-07-05  Bean  <bean123ch@gmail.com>
1816         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
1818         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
1819         (grub_lua_getenv): Likewise.
1820         (grub_lua_setenv): Likewise.
1821         (save_errno): New function.
1822         (push_result): Likewise.
1823         (grub_lua_enum_device): Likewise.
1824         (grub_lua_enum_file): Likewise.
1825         (grub_lua_file_open): Likewise.
1826         (grub_lua_file_close): Likewise.
1827         (grub_lua_file_seek): Likewise.
1828         (grub_lua_file_read): Likewise.
1829         (grub_lua_file_getline): Likewise.
1830         (grub_lua_file_getsize): Likewise.
1831         (grub_lua_file_getpos): Likewise.
1832         (grub_lua_file_eof): Likewise.
1833         (grub_lua_file_exist): Likewise.
1834         (grub_lua_add_menu): Likewise.
1836         * script/lua/grub_lua.h (isupper): New inline function.
1837         (islower): Likewise.
1838         (ispunct): Likewise.
1839         (isxdigit): Likewise.
1840         (strcspn): Change to normal function.
1841         (strpbkr): New function declaration.
1842         (memchr): Likewise.
1844         * script/lua/grub_main.c (scan_str): New function.
1845         (strcspn): Likewise.
1846         (strpbrk): Likewise.
1847         (memchr): Likewise.
1849         * script/lua/linit.c (lualibs): Enable the string library.
1851         * util/osdetect.lua: New file.
1853 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
1855         * include/grub/i386/linux.h (struct linux_kernel_params): Add
1856         `capabilities' member.
1858 2009-07-02  Pavel Roskin  <proski@gnu.org>
1860         * genparttoollist.sh: Add missing newline at the end.
1862 2009-07-01  Pavel Roskin  <proski@gnu.org>
1864         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
1866         * util/hostdisk.c (open_device): Remove `const' from
1867         `sysctl_size', as sysctlbyname() can change it (in this case it
1868         doesn't actually happen).
1870         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
1871         using signed long int constants.
1873         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
1874         constant to avoid a warning on FreeBSD.
1876         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
1877         where it's needed.
1879         * Makefile.in: Install include/grub/machine symlink.
1881         * Makefile.in: When installing symlinks, use "cp -fR", which
1882         works on FreeBSD and MacOSX.
1883         From Yves Blusseau <cl7m42e02@sneakemail.com>
1885         * kern/dl.c (grub_dl_resolve_symbol): Make static.
1886         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
1888         * util/misc.c: Move grub_reboot() and grub_halt() ...
1889         * util/grub-emu.c: ... here.  Make main_env static.
1890         * include/grub/util/misc.h: Remove main_env.
1892         * kern/mm.c: Use correct format to print size_t.
1894         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
1895         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
1896         * kern/powerpc/dl.c: Likewise.
1897         * kern/sparc64/dl.c: Likewise.
1898         * kern/x86_64/dl.c: Likewise.
1900 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1902         Fix grub-emu build on sparc64-ieee1275.
1904         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
1905         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
1907 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1909         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
1910         (grub_reboot, grub_halt): New functions.
1912         * util/i386/pc/misc.c: Delete.  Update all users.
1913         * util/sparc64/ieee1275/misc.c: Likewise.
1914         * util/powerpc/ieee1275/misc.c: Likewise.
1916 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1918         * conf/i386.rmk (setjmp_mod_SOURCES)
1919         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
1920         * conf/common.rmk (setjmp_mod_SOURCES)
1921         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
1922         to use $(target_cpu).
1923         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
1924         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
1925         * conf/powerpc-ieee1275.rmk: Likewise.
1926         * conf/sparc64-ieee1275.rmk: Likewise.
1928         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
1929         $(target_cpu) for kern/$(target_cpu)/dl.c.
1930         * conf/i386-efi.rmk: Likewise.
1931         * conf/i386-ieee1275.rmk: Likewise.
1932         * conf/x86_64-efi.rmk: Likewise.
1933         * conf/i386-coreboot.rmk: Likewise.
1934         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
1935         $(target_cpu) for kern/$(target_cpu)/dl.c and for
1936         kern/$(target_cpu)/cache.S.
1937         * conf/sparc64-ieee1275.rmk: Likewise.
1939 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
1941         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
1942         type to `grub_uint8_t', and adjust `padding9' accordingly.
1944 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1946         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
1948         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
1949         assembly in final jump, using register constraints.
1951         (grub_linux_boot): For text mode, initialize `have_vga' using
1952         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
1954         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
1955         right before the final jump.
1957         Set `video_mode' to 0x3.
1959         Document initialization of `video_page', `video_mode' and
1960         `video_ega_bx'.
1962 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1964         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
1965         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
1966         and set GRUB_LINUX_FLAG_QUIET appropriately.
1968 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
1970         Fix build on Debian / sparc.
1972         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
1974 2009-06-28  Pavel Roskin  <proski@gnu.org>
1976         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
1977         fix a warning.
1979         * util/grub.d/10_linux.in: Match SUSE style initrd names.
1981 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1983         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
1984         `err'.
1986 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1988         Revert r2338.
1990         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
1991         file can't be opened.  grub_file_open() is already supposed to set
1992         grub_errno / grub_errmsg appropriately.
1993         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1995 2009-06-27  Pavel Roskin  <proski@gnu.org>
1996 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
1998         * include/grub/dl.h: Include grub/elf.h.
1999         (struct grub_dl): Add symtab field.
2000         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
2001         GRUB_MODULES_MACHINE_READONLY.
2002         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
2003         of the header for read-only modules.
2004         (grub_dl_unload): Free mod->symtab for read-only modules.
2005         * kern/i386/dl.c: Use mod->symtab.
2006         * kern/powerpc/dl.c: Likewise.
2007         * kern/sparc64/dl.c: Likewise.
2008         * kern/x86_64/dl.c: Likewise.
2010         * conf/i386-qemu.rmk: New file.
2011         * kern/i386/qemu/startup.S: Likewise.
2012         * kern/i386/qemu/mmap.c: Likewise.
2013         * boot/i386/qemu/boot.S: Likewise.
2014         * include/grub/i386/qemu/time.h: Likewise.
2015         * include/grub/i386/qemu/serial.h: Likewise.
2016         * include/grub/i386/qemu/kernel.h: Likewise.
2017         * include/grub/i386/qemu/console.h: Likewise.
2018         * include/grub/i386/qemu/boot.h: Likewise.
2019         * include/grub/i386/qemu/init.h: Likewise.
2020         * include/grub/i386/qemu/machine.h: Likewise.
2021         * include/grub/i386/qemu/loader.h: Likewise.
2022         * include/grub/i386/qemu/memory.h: Likewise.
2024         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
2025         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
2026         [qemu] (pkglib_IMAGES): Add `boot.img'.
2027         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
2028         [qemu] (boot_img_FORMAT): New variables.
2029         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
2030         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
2031         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
2032         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
2033         [qemu] (kernel_img_FORMAT): New variables.
2035         * configure.ac: Recognise `i386-qemu'.
2037         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
2038         (for no compression).
2039         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
2040         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
2041         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
2042         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
2043         ifdefs).
2045 2009-06-27  Pavel Roskin  <proski@gnu.org>
2047         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
2048         read.
2049         * efiemu/prepare32.c: Likewise.
2050         * efiemu/prepare64.c: Likewise.
2052 2009-06-26  Pavel Roskin  <proski@gnu.org>
2054         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
2055         * include/grub/elf.h: Define symbols without "32" or "64" based
2056         on GRUB_TARGET_WORDSIZE.
2057         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
2058         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
2059         ELF definitions.
2060         * efiemu/loadcore64.c: Likewise.
2061         * loader/i386/bsd32.c: Likewise.
2062         * loader/i386/bsd64.c: Likewise.
2063         * kern/dl.c: Remove own ELF definitions.
2064         * util/i386/efi/grub-mkimage.c: Likewise.
2066 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
2068         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
2069         segment 0x0 unconditionally, because the reference generated by
2070         GAS is an absolute address.
2072 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2074         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
2075         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
2077 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2079         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
2080         indexes.  Check for -f explicitly.
2081         (search_file): Improve error message.
2082         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
2084 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2086         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
2087         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
2089 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2091         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
2092         * conf/i386-ieee1275.rmk: Likewise.
2093         * conf/i386-coreboot.rmk: Likewise.
2095         * kern/i386/pc/startup.S (grub_stop): Remove function.
2096         * kern/i386/ieee1275/startup.S: Likewise.
2097         * kern/i386/coreboot/startup.S: Likewise.
2098         * kern/i386/misc.S (grub_stop): New function.
2100 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2102         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
2103         * kern/i386/realmode.S (real_to_prot): ... to here.
2105 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2107         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
2108         with `kernel.img'.
2109         (kernel_elf_SOURCES): Rename to ...
2110         (kernel_img_SOURCES): ... this.
2111         (kernel_elf_HEADERS): Rename to ...
2112         (kernel_img_HEADERS): ... this.  Update all users.
2113         (kernel_elf_ASFLAGS): Rename to ...
2114         (kernel_img_ASFLAGS): ... this.
2115         (kernel_elf_CFLAGS): Rename to ...
2116         (kernel_img_CFLAGS): ... this.
2117         (kernel_elf_LDFLAGS): Rename to ...
2118         (kernel_img_LDFLAGS): ... this.
2119         * conf/i386-coreboot.rmk: Likewise.
2120         * conf/powerpc-ieee1275.rmk: Likewise.
2122         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
2123         with "kernel.img".
2125 2009-06-21  Pavel Roskin  <proski@gnu.org>
2127         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
2128         to match nested functions.
2129         * loader/sparc64/ieee1275/linux.c: Likewise.
2131         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
2133 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
2135         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
2136         all i386 platforms.
2138 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
2140         Fix asm file handling on ELF, and remove workarounds.
2142         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
2143         and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
2144         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
2145         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
2147 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
2149         Load BSD ELF modules
2151         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
2152         and loader/i386/bsd64.c
2153         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
2154         (FREEBSD_MODTYPE_ELF_MODULE): New definition
2155         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
2156         (grub_freebsd_load_elfmodule32): New declaration
2157         (grub_freebsd_load_elfmoduleobj64): Likewise
2158         (grub_freebsd_load_elf_meta32): Likewise
2159         (grub_freebsd_load_elf_meta64): Likewise
2160         (grub_freebsd_add_meta): Likewise
2161         (grub_freebsd_add_meta_module): Likewise
2162         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
2163         (grub_freebsd_add_meta_module): Likewise and move module-specific
2164         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
2165         (grub_cmd_freebsd): Add elf-kernel specific parts
2166         based on grub_freebsd_add_meta_module
2167         (grub_cmd_freebsd_module): Add type parsing moved from
2168         grub_freebsd_add_meta_module
2169         (grub_cmd_freebsd_module_elf): New function
2170         (cmd_freebsd_module_elf): New variable
2171         (GRUB_MOD_INIT): Register freebsd_module_elf
2172         * loader/i386/bsd32.c: New file
2173         * loader/i386/bsd64.c: Likewise
2174         * loader/i386/bsdXX.c: Likewise
2175         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
2176         (grub_elf64_load): Likewise
2177         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
2178         All users updated
2179         (grub_elf64_load_hook_t): Likewise
2181 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
2183         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
2184         variable.
2185         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
2186         don't write a menu entry for recovery mode.
2188 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
2190         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
2191         after it's no longer needed.
2193 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
2195         * include/grub/i386/loader.h (grub_linux_prot_size)
2196         (grub_linux_tmp_addr, grub_linux_real_addr)
2197         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
2198         GRUB_MACHINE_PCBIOS.
2199         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
2200         common grub_util_info() call to ...
2201         (generate_image): ... here.
2202         Fix use of uninitialized memory, comparison of signed with
2203         unsigned integers and memory leak.
2204         Remove bogus module address message.
2206 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
2208         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
2209         grub_raid_register
2210         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
2212 2009-06-19  Pavel Roskin  <proski@gnu.org>
2214         * configure.ac: Remove stray AC_MSG_CHECKING.
2216 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
2218         * disk/scsi.c (grub_scsi_open): use continue instead of big if
2220 2009-06-18  Pavel Roskin  <proski@gnu.org>
2222         * conf/common.rmk: Add fs_file.mod.
2223         * disk/fs_file.c: New file.
2224         * include/grub/disk.h (enum grub_disk_dev_id): Add
2225         GRUB_DISK_DEVICE_FILE_ID.
2227 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
2229         Fix build with Apple's toolchain. Part 2
2231         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
2232         a fake start
2234 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
2236         Fix build with Apple's toolchain. Part 1
2238         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
2239         for long calls
2240         * configure.ac: remove a leftover AC_MSG_RESULT
2241         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
2242         Apple's toolchain
2244 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
2246         Fix warnings
2248         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
2249         (decomp_block): initialize ch
2250         use grub_memcpy instead of memcpy
2252 2009-06-17  Pavel Roskin  <proski@gnu.org>
2254         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
2255         version, use declarations needed to use vga_text as the startup
2256         console.
2258         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
2259         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
2260         the kernel.
2261         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
2262         and grub_at_keyboard_fini(), it's done on module load and
2263         unload.
2265 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
2267         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
2268         file can't be found.
2269         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2271 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
2273         Fix newline handling
2275         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
2276         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
2277         (grub_script_yylex): don't segfault on unterminated script
2278         newline terminates command and variable
2280 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
2282         avoid double grub_adjust_range call. Bug reported by David Simner
2284         * kern/disk.c (grub_disk_write): change to raw disk access before
2285         calling disk_read
2287 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
2289         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
2290         spaces, for the benefit of help2man.
2291         * util/i386/efi/grub-mkimage.c (usage): Likewise.
2293 2009-06-16  Pavel Roskin  <proski@gnu.org>
2295         * kern/i386/halt.c: Include grub/machine/init.h.
2296         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
2298 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
2300         * util/grub.d/30_os-prober.in: Use ${root} in the generated
2301         drivemap menuentry.
2303 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
2305         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
2306         `echo' command.
2308 2009-06-16  Pavel Roskin  <proski@gnu.org>
2310         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
2311         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
2312         save %dx, we only need %dl and we never change it.
2313         * boot/i386/pc/cdboot.S: Don't set the root drive.
2314         * boot/i386/pc/pxeboot.S: Likewise.
2315         * include/grub/i386/pc/boot.h: Remove
2316         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
2317         GRUB_BOOT_MACHINE_DRIVE_CHECK.
2318         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
2319         * kern/i386/pc/init.c (make_install_device): Remove references
2320         to grub_root_drive.
2321         * kern/i386/pc/startup.S: Likewise.
2322         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
2324 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2326         xnu_uuid command
2328         * commands/xnu_uuid.c: new file
2329         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
2330         (xnu_uuid_mod_SOURCES): new variable
2331         (xnu_uuid_mod_CFLAGS): likewise
2332         (xnu_uuid_mod_LDFLAGS): likewise
2333         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2334         * conf/i386-ieee1275.rmk: likewise
2335         * conf/i386-pc.rmk: likewise
2336         * conf/powerpc-ieee1275.rmk: likewise
2337         * conf/sparc64-ieee1275.rmk: likewise
2338         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
2340 2009-06-16  Pavel Roskin  <proski@gnu.org>
2342         * configure.ac: Avoid '==' in test command, it's not portable.
2344 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2346         Probe command
2348         * commands/probe.c: new file
2349         * conf/common.rmk (pkglib_MODULES): add probe.mod
2350         (probe_mod_SOURCES): new variable
2351         (probe_mod_CFLAGS): likewise
2352         (probe_mod_LDFLAGS): likewise
2353         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2354         * conf/i386-ieee1275.rmk: likewise
2355         * conf/i386-pc.rmk: likewise
2356         * conf/powerpc-ieee1275.rmk: likewise
2357         * conf/sparc64-ieee1275.rmk: likewise
2359 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
2361         Fix handling of string like \"hello\" and "a
2362         b"
2364         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
2365         (grub_script_yylex): fix parsing of quoting, escaping and newline
2367 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
2369         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
2370         handling
2372 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
2374         * util/grub-mkconfig.in: Fix parsing of --output option.
2376 2009-06-12  Pavel Roskin  <proski@gnu.org>
2378         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
2379         genmk.rb don't need to be generated or installed.
2381 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
2383         * commands/i386/pc/drivemap_int13h.S: add more comments
2385 2009-06-11  Pavel Roskin  <proski@gnu.org>
2387         * Makefile.in (uninstall): Uninstall manuals.
2389         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
2390         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
2391         and update-grub_lib in two places.
2392         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
2394         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
2395         a compiler warning.
2397         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
2398         `entry_lo' to fix variable shadowing.
2400 2009-06-11  Christian Franke  <franke@computer.org>
2402         * kern/misc.c (__enable_execute_stack): Add missing return type
2403         to prevent gcc warning.
2405 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2407         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
2409 2009-06-11  Pavel Roskin  <proski@gnu.org>
2411         * Makefile.in: Don't rely on any scripts being executable.
2412         Always use $(SHELL) to run shell scripts.
2414         * configure.ac: Always define ___main if using -nostdlib.  This
2415         fixes tests on Cygwin.
2417 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
2419         UDF fix
2421         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
2422         is in bytes and not in blocks
2424 2009-06-11  Pavel Roskin  <proski@gnu.org>
2426         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
2427         warning.
2429 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2431         * util/grub.d/30_os-prober.in: Fix a comment. Source
2432         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
2433         to set the root device.  Place drivemap command in the generated
2434         chain entry.
2436 2009-06-11  Pavel Roskin  <proski@gnu.org>
2438         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
2439         have long been resolved.
2441 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
2443         * util/grub.d/10_linux.in: Capitalise "Linux".
2445         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
2447 2009-06-11  Pavel Roskin  <proski@gnu.org>
2449         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
2450         fix a gcc warning and ensure that the function won't ever exit.
2452         * kern/i386/ieee1275/init.c: Add missing prototype for
2453         grub_stop_floppy().
2455         * loader/ieee1275/multiboot2.c [__i386__]: Include
2456         grub/cpu/multiboot.h.
2458         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
2459         casts to short - they are not portable and cause warnings.  Fix
2460         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
2462 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
2464         Drivemap fixes
2466         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
2467         new function
2468         (grub_get_root_biosnumber_saved): new variable
2469         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
2470         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
2471         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
2472         %dx after the call if necessary
2473         * conf/common.rmk (pkglib_MODULES): remove boot.mod
2474         (boot_mod_SOURCES): remove
2475         (boot_mod_CFLAGS): remove
2476         (boot_mod_LDFLAGS): remove
2477         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
2478         (boot_mod_SOURCES): new variable
2479         (boot_mod_CFLAGS): likewise
2480         (boot_mod_LDFLAGS): likewise
2481         * conf/i386-efi.rmk: likewise
2482         * conf/i386-ieee1275.rmk: likewise
2483         * conf/i386-pc.rmk: likewise
2484         * conf/powerpc-ieee1275.rmk: likewise
2485         * conf/sparc64-ieee1275.rmk: likewise
2486         * conf/x86_64-efi.rmk: likewise
2487         * include/grub/i386/pc/biosnum.h: new file
2488         * lib/i386/pc/biosnum.c: likewise
2489         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
2490         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
2491         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2493 2009-06-10  Pavel Roskin  <proski@gnu.org>
2495         * io/gzio.c (test_header): Don't reuse one buffer for all data.
2496         Use separate variables.  Read only the file size at the end, but
2497         not the checksum that we don't use.
2499         * kern/file.c (grub_file_read): Use void pointer for the buffer.
2500         Adjust all callers.
2502         * kern/ieee1275/openfw.c: Remove libc includes.
2503         * kern/ieee1275/cmain.c: Likewise.
2504         * include/grub/ieee1275/ieee1275.h: Likewise.
2506         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
2507         compiler warnings.
2509 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2511         * Makefile.in: Remove all trailing whitespace.
2512         * conf/i386-pc.rmk: Likewise.
2513         * conf/powerpc-ieee1275.rmk: Likewise.
2514         * conf/sparc64-ieee1275.rmk: Likewise.
2515         * docs/grub.texi: Likewise.
2516         * docs/texinfo.tex: Likewise.
2517         * disk/fs_uuid.c: Likewise.
2518         * disk/lvm.c: Likewise.
2519         * disk/scsi.c: Likewise.
2520         * disk/ata.c: Likewise.
2521         * disk/ieee1275/ofdisk.c: Likewise.
2522         * disk/i386/pc/biosdisk.c: Likewise.
2523         * disk/host.c: Likewise.
2524         * disk/raid.c: Likewise.
2525         * disk/efi/efidisk.c: Likewise.
2526         * disk/usbms.c: Likewise.
2527         * disk/memdisk.c: Likewise.
2528         * disk/loopback.c: Likewise.
2529         * kern/powerpc/dl.c: Likewise.
2530         * kern/device.c: Likewise.
2531         * kern/dl.c: Likewise.
2532         * kern/sparc64/dl.c: Likewise.
2533         * kern/ieee1275/ieee1275.c: Likewise.
2534         * kern/term.c: Likewise.
2535         * kern/fs.c: Likewise.
2536         * kern/i386/dl.c: Likewise.
2537         * kern/i386/pc/startup.S: Likewise.
2538         * kern/i386/pc/init.c: Likewise.
2539         * kern/i386/pc/mmap.c: Likewise.
2540         * kern/i386/pc/lzo1x.S: Likewise.
2541         * kern/i386/ieee1275/init.c: Likewise.
2542         * kern/i386/realmode.S: Likewise.
2543         * kern/i386/tsc.c: Likewise.
2544         * kern/partition.c: Likewise.
2545         * kern/corecmd.c: Likewise.
2546         * kern/file.c: Likewise.
2547         * kern/efi/efi.c: Likewise.
2548         * kern/efi/init.c: Likewise.
2549         * kern/efi/mm.c: Likewise.
2550         * kern/main.c: Likewise.
2551         * kern/err.c: Likewise.
2552         * kern/env.c: Likewise.
2553         * kern/disk.c: Likewise.
2554         * kern/generic/millisleep.c: Likewise.
2555         * kern/generic/rtc_get_time_ms.c: Likewise.
2556         * kern/misc.c: Likewise.
2557         * kern/parser.c: Likewise.
2558         * genmk.rb: Likewise.
2559         * configure.ac: Likewise.
2560         * boot/i386/pc/diskboot.S: Likewise.
2561         * boot/i386/pc/pxeboot.S: Likewise.
2562         * boot/i386/pc/boot.S: Likewise.
2563         * boot/i386/pc/lnxboot.S: Likewise.
2564         * boot/i386/pc/cdboot.S: Likewise.
2565         * parttool/pcpart.c: Likewise.
2566         * video/readers/tga.c: Likewise.
2567         * video/video.c: Likewise.
2568         * video/bitmap.c: Likewise.
2569         * lib/envblk.c: Likewise.
2570         * lib/i386/setjmp.S: Likewise.
2571         * fs/xfs.c: Likewise.
2572         * fs/afs.c: Likewise.
2573         * fs/fat.c: Likewise.
2574         * fs/ntfs.c: Likewise.
2575         * fs/udf.c: Likewise.
2576         * fs/affs.c: Likewise.
2577         * fs/iso9660.c: Likewise.
2578         * fs/hfs.c: Likewise.
2579         * fs/fshelp.c: Likewise.
2580         * fs/ext2.c: Likewise.
2581         * fs/jfs.c: Likewise.
2582         * fs/reiserfs.c: Likewise.
2583         * fs/hfsplus.c: Likewise.
2584         * fs/minix.c: Likewise.
2585         * fs/cpio.c: Likewise.
2586         * fs/sfs.c: Likewise.
2587         * fs/ufs.c: Likewise.
2588         * efiemu/prepare.c: Likewise.
2589         * efiemu/loadcore_common.c: Likewise.
2590         * efiemu/runtime/efiemu.sh: Likewise.
2591         * efiemu/runtime/efiemu.S: Likewise.
2592         * efiemu/runtime/efiemu.c: Likewise.
2593         * efiemu/pnvram.c: Likewise.
2594         * efiemu/main.c: Likewise.
2595         * efiemu/i386/pc/cfgtables.c: Likewise.
2596         * efiemu/i386/loadcore64.c: Likewise.
2597         * efiemu/i386/loadcore32.c: Likewise.
2598         * efiemu/loadcore.c: Likewise.
2599         * efiemu/symbols.c: Likewise.
2600         * efiemu/mm.c: Likewise.
2601         * include/grub/autoefi.h: Likewise.
2602         * include/grub/datetime.h: Likewise.
2603         * include/grub/term.h: Likewise.
2604         * include/grub/hfs.h: Likewise.
2605         * include/grub/lvm.h: Likewise.
2606         * include/grub/i386/tsc.h: Likewise.
2607         * include/grub/i386/linux.h: Likewise.
2608         * include/grub/i386/xnu.h: Likewise.
2609         * include/grub/i386/efiemu.h: Likewise.
2610         * include/grub/i386/pc/biosdisk.h: Likewise.
2611         * include/grub/i386/pc/memory.h: Likewise.
2612         * include/grub/i386/pc/vbe.h: Likewise.
2613         * include/grub/parttool.h: Likewise.
2614         * include/grub/video.h: Likewise.
2615         * include/grub/memory.h: Likewise.
2616         * include/grub/fs.h: Likewise.
2617         * include/grub/partition.h: Likewise.
2618         * include/grub/xnu.h: Likewise.
2619         * include/grub/efi/api.h: Likewise.
2620         * include/grub/efi/pe32.h: Likewise.
2621         * include/grub/efi/memory.h: Likewise.
2622         * include/grub/multiboot.h: Likewise.
2623         * include/grub/usbdesc.h: Likewise.
2624         * include/grub/multiboot2.h: Likewise.
2625         * include/grub/acpi.h: Likewise.
2626         * include/grub/efiemu/efiemu.h: Likewise.
2627         * include/grub/disk.h: Likewise.
2628         * include/grub/ieee1275/ieee1275.h: Likewise.
2629         * include/grub/net.h: Likewise.
2630         * include/grub/machoload.h: Likewise.
2631         * include/grub/macho.h: Likewise.
2632         * include/multiboot.h: Likewise.
2633         * genmoddep.awk: Likewise.
2634         * normal/main.c: Likewise.
2635         * normal/menu_entry.c: Likewise.
2636         * normal/menu_viewer.c: Likewise.
2637         * normal/completion.c: Likewise.
2638         * normal/cmdline.c: Likewise.
2639         * normal/misc.c: Likewise.
2640         * normal/datetime.c: Likewise.
2641         * bus/usb/usbtrans.c: Likewise.
2642         * bus/usb/ohci.c: Likewise.
2643         * bus/usb/uhci.c: Likewise.
2644         * bus/usb/usb.c: Likewise.
2645         * mmap/efi/mmap.c: Likewise.
2646         * mmap/i386/pc/mmap_helper.S: Likewise.
2647         * mmap/i386/pc/mmap.c: Likewise.
2648         * mmap/i386/mmap.c: Likewise.
2649         * mmap/i386/uppermem.c: Likewise.
2650         * mmap/mmap.c: Likewise.
2651         * commands/acpi.c: Likewise.
2652         * commands/echo.c: Likewise.
2653         * commands/blocklist.c: Likewise.
2654         * commands/loadenv.c: Likewise.
2655         * commands/usbtest.c: Likewise.
2656         * commands/boot.c: Likewise.
2657         * commands/parttool.c: Likewise.
2658         * commands/search.c: Likewise.
2659         * commands/cat.c: Likewise.
2660         * commands/i386/pc/play.c: Likewise.
2661         * commands/i386/pc/drivemap.c: Likewise.
2662         * commands/i386/pc/vbeinfo.c: Likewise.
2663         * commands/i386/pc/acpi.c: Likewise.
2664         * commands/i386/pc/vbetest.c: Likewise.
2665         * commands/ls.c: Likewise.
2666         * commands/cmp.c: Likewise.
2667         * commands/test.c: Likewise.
2668         * commands/efi/acpi.c: Likewise.
2669         * commands/gptsync.c: Likewise.
2670         * commands/help.c: Likewise.
2671         * partmap/amiga.c: Likewise.
2672         * partmap/apple.c: Likewise.
2673         * partmap/acorn.c: Likewise.
2674         * partmap/pc.c: Likewise.
2675         * partmap/sun.c: Likewise.
2676         * partmap/gpt.c: Likewise.
2677         * script/sh/lexer.c: Likewise.
2678         * script/sh/function.c: Likewise.
2679         * font/font.c: Likewise.
2680         * font/font_cmd.c: Likewise.
2681         * loader/powerpc/ieee1275/linux.c: Likewise.
2682         * loader/efi/chainloader.c: Likewise.
2683         * loader/multiboot_loader.c: Likewise.
2684         * loader/macho.c: Likewise.
2685         * loader/i386/multiboot.c: Likewise.
2686         * loader/i386/linux.c: Likewise.
2687         * loader/i386/pc/linux.c: Likewise.
2688         * loader/i386/pc/multiboot2.c: Likewise.
2689         * loader/i386/pc/chainloader.c: Likewise.
2690         * loader/i386/pc/xnu.c: Likewise.
2691         * loader/i386/bsd_trampoline.S: Likewise.
2692         * loader/i386/efi/linux.c: Likewise.
2693         * loader/i386/multiboot_elfxx.c: Likewise.
2694         * loader/i386/bsd_helper.S: Likewise.
2695         * loader/i386/bsd.c: Likewise.
2696         * loader/i386/linux_trampoline.S: Likewise.
2697         * loader/i386/xnu_helper.S: Likewise.
2698         * loader/i386/xnu.c: Likewise.
2699         * loader/i386/bsd_pagetable.c: Likewise.
2700         * loader/i386/multiboot_helper.S: Likewise.
2701         * loader/xnu.c: Likewise.
2702         * loader/xnu_resume.c: Likewise.
2703         * io/gzio.c: Likewise.
2704         * term/efi/console.c: Likewise.
2705         * term/terminfo.c: Likewise.
2706         * term/ieee1275/ofconsole.c: Likewise.
2707         * term/i386/pc/serial.c: Likewise.
2708         * term/i386/pc/vesafb.c: Likewise.
2709         * term/i386/pc/vga.c: Likewise.
2710         * term/usb_keyboard.c: Likewise.
2711         * term/gfxterm.c: Likewise.
2712         * aclocal.m4: Likewise.
2713         * util/lvm.c: Likewise.
2714         * util/grub.d/30_os-prober.in: Likewise.
2715         * util/grub.d/10_hurd.in: Likewise.
2716         * util/console.c: Likewise.
2717         * util/grub-macho2img.c: Likewise.
2718         * util/grub-probe.c: Likewise.
2719         * util/hostfs.c: Likewise.
2720         * util/i386/pc/grub-mkimage.c: Likewise.
2721         * util/i386/pc/grub-setup.c: Likewise.
2722         * util/i386/efi/grub-mkimage.c: Likewise.
2723         * util/grub-mkconfig.in: Likewise.
2724         * util/raid.c: Likewise.
2725         * util/resolve.c: Likewise.
2726         * util/grub-mkdevicemap.c: Likewise.
2727         * util/grub-emu.c: Likewise.
2728         * util/getroot.c: Likewise.
2729         * util/hostdisk.c: Likewise.
2730         * util/usb.c: Likewise.
2731         * util/grub-editenv.c: Likewise.
2732         * util/misc.c: Likewise.
2734 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2736         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
2737         `genparttoollist.sh'.
2738         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
2739         Add `*.sh' to the list find searches for and change `mdate.sh'
2740         to `mdate-sh'.
2742 2009-06-10  Pavel Roskin  <proski@gnu.org>
2744         * include/grub/multiboot2.h: Provide compatibility defines for
2745         multiboot2.h.
2746         * include/multiboot2.h: Include stdint.h only if needed, using
2747         angle brackets.
2748         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
2749         grub/multiboot2.h.
2750         * loader/ieee1275/multiboot2.c: Likewise.
2751         * loader/multiboot2.c: Likewise.
2752         * loader/multiboot_loader.c: Likewise.
2754         * configure.ac: Use -nostdlib when probing for the target.  It
2755         should not be required to have libc for the target.
2757         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
2758         they fail without libc headers for the target.
2759         * include/grub/powerpc/libgcc.h: Use weak attribute for all
2760         exports.
2761         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
2762         preprocessor conditionals.
2764         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
2765         build system doesn't need to be aware of the tar.c internals.
2767 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
2769         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
2771 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
2773         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
2774         disk limit to 26 for IDE, Virtio, Xen and SCSI.
2776 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
2778         * util/i386/pc/grub-install.in: Change the error message if UUIDs
2779         aren't available if ata.mod gets used.
2781 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
2783         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
2784         initialising controller.
2785         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2787 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2789         * util/i386/pc/grub-install.in: Add a parameter --disk-module
2790         to choose between ata and biosdisk module on i386-pc.
2792 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
2794         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
2795         Subclass and Programming Interface fields in terms of the 3 byte
2796         Class Code register.
2797         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2799         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
2800         interface is OHCI.  Add grub_dprintf for symmetry with
2801         bus/usb/uhci.c.
2802         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
2803         interface is UHCI.  Add interf variable for programming
2804         interface.  Print interface with class/subclass.
2806         * bus/usb/ohci.c: Set interf with correct field.
2808         * bus/usb/uhci.c: Remove unneeded doubled lines.
2809         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
2810         Remove whitespace inside comment.
2812 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
2814         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
2815         as fallback an equivalent option without depth.
2817 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2819         Not fail if unable to retrieve C/H/S on LBA disks
2821         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
2822         if unable to retrieve C/H/S on LBA disks
2824 2009-06-08  Pavel Roskin  <proski@gnu.org>
2826         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
2827         about aliasing.
2829 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2831         * Makefile.in (uninstall): Remove all $lib_DATA files.
2833 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
2835         Bugfix: install on partitionless device
2837         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
2838         is a whole disk
2840 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2842         * Makefile.in (uninstall): Remove all $include_DATA files.
2844 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
2846         * commands/true.c: New file.  Implement the true and false commands.
2847         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
2848         (true_mod_SOURCES): New variable.
2849         (true_mod_CFLAGS): Likewise.
2850         (true_mod_LDFLAGS): Likewise.
2852 2009-06-05  Colin D Bennett  <colin@gibibit.com>
2854         Optimized font character lookup using binary search instead of linear
2855         search.  Fonts now are required to have the character index ordered by
2856         code point.
2858         * font/font.c (load_font_index): Verify that fonts have ordered
2859         character indices.
2860         (find_glyph): Use binary search instead of linear search to find a
2861         character in a font.
2863 2009-06-05  Michael Scherer  <misc@mandriva.org>
2865         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
2866         uses case sensitive btree.
2867         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
2868         only for case insensitive filesystems.
2870 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
2872         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
2873         * conf/common.rmk (search_mod_CFLAGS): likewise
2875 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2877         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
2878         compensate a compiler bug
2880 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2882         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
2883         instead of '\b'
2885 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2887         Definitions for creating asm symbols with Apple's CC
2889         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
2890         [APPLE_CC] (VARIABLE): likewise
2892 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2894         Disable lnxboot.img when compiled
2895         with Apple's CC
2897         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
2898         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
2899         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
2900         [! APPLE_CC] (CODE_LENG): skip
2901         [! APPLE_CC] (setup_sects): likewise
2902         [! APPLE_CC]: skip filling
2904 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2906         Address in trampolines based on 32-bit registers when compiled
2907         with Apple's CC
2909         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
2910         for addresses
2911         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
2913 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2915         Avoid aliases when compiling with Apple's CC for PCBIOS machine
2917         * kern/misc.c [APPLE_CC] (memcpy): new function
2918         [APPLE_CC] (memmove): likewise
2919         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
2920         (memcpy): define alias conditionally on !APPLE_CC
2921         (memset): likewise
2922         (abort): likewise
2923         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
2924         APPLE_CC are defined
2925         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
2926         (grub_assert_fail): make prototype conditional
2928 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2930         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
2932         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
2933         grub-macho2img
2934         (CLEANFILES): add grub-macho2img
2935         (grub_macho2img_SOURCES): new variable
2936         * kern/i386/pc/startup.S (bss_start): new variable
2937         (bss_end): likewise
2938         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
2939         * util/grub-macho2img.c: new file
2941 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2943         Use objconv when compiling with Apple's CC
2945         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
2946         (efiemu64.o): likewise
2947         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
2948         when compiling with Apple's CC
2949         (efiemu64_s.o): likewise
2950         * configure.ac: check for objconv when compiling with Apple's CC
2951         * genmk.rb: use objconv for modules when compiled with Apple's CC
2953 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2955         Define segment as well as section when compiling with
2956         Apple's CC
2958         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
2959         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
2960         (efiemu_convert_pointer): likewise
2961         (efiemu_set_virtual_address_map): likewise
2962         (efiemu_convert_pointer): likewise
2963         (efiemu_getcrc32): likewise
2964         (init_crc32_table): likewise
2965         (reflect): likewise
2966         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
2967         (GRUB_MOD_DEP): likewise
2969 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2971         Allow a compilation without -mcmodel=large
2973         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
2974         when compiled without -mcmodel=large
2975         (filter_memory_map): remove memory post 4 GiB when compiled
2976         without -mcmodel=large
2977         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
2978         TARGET_CFLAGS when -mcmodel=large isn't supported
2980 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2982         Remove nested functions in efiemu core
2984         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
2986 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2988         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
2990         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
2991         temporary storage
2992         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
2993         using Apple's CC
2994         (grub_cpu_is_tsc_supported): likewise
2995         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
2997 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
2999         Absolute addressing through constant with Apple's cc
3001         * kern/i386/pc/startup.S: Define necessary constants
3002         and address through it when using ABS with Apple's CC
3003         * boot/i386/pc/diskboot.S: likewise
3004         * boot/i386/pc/boot.S: likewise
3005         * boot/i386/pc/lnxboot.S: likewise
3006         * boot/i386/pc/cdboot.S: likewise
3007         * mmap/i386/pc/mmap_helper.S: likewise
3008         * commands/i386/pc/drivemap_int13h.S: likewise
3010 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3012         Check if compiler is apple cc
3014         * Makefile.in (ASFLAGS): new variable
3015         (TARGET_ASFLAGS): likewise
3016         (TARGET_MODULE_FORMAT): likewise
3017         (TARGET_APPLE_CC): likewise
3018         (OBJCONV): likewise
3019         (TARGET_IMG_CFLAGS): likewise
3020         (TARGET_CPPFLAGS): add includedir
3021         * configure.ac: call grub_apple_cc and grub_apple_target_cc
3022         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
3023         Check for linker script only if compiler isn't Apple's CC
3024         (TARGET_MODULE_FORMAT): set
3025         (TARGET_APPLE_CC): likewise
3026         (TARGET_ASFLAGS): likewise
3027         (ASFLAGS): likewise
3028         Check for objcopy only if compiler isn't Apple's CC
3029         Check for BSS symbol only if compiler isn't Apple's CC
3030         * genmk.rb: adapt nm options if we use Apple's utils
3031         * aclocal.m4 (grub_apple_cc): new test
3032         (grub_apple_target_cc): likewise
3034 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3036         Simplify sed expressions and improve awk
3038         * Makefile.in (install-local): simplify sed expression
3039         * gencmdlist.sh: likewise
3040         * genmoddep.awk: avoid adding module as a dependency of itself
3042 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3044         Add missing start symbols
3046         * boot/i386/pc/boot.S: add start
3047         * boot/i386/pc/pxeboot.S: likewise
3049 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3051         Fix wrong assumptions with grub-mkimage on EFI
3053         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
3054         (relocate_addresses): consider both r_addend and value at offset
3055         (make_mods_section): zerofill modinfo and header
3056         (convert_elf): write prefix here
3058 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3060         Use .asciz instead of .string
3062         * i386/pc/diskboot.S: use .asciz instead of .string
3063         * i386/pc/boot.S: likewise
3064         * include/grub/dl.h (GRUB_MOD_DEP): likewise
3065         (GRUB_MOD_NAME): likewise
3067 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3069         gfxpayload support
3071         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
3072         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
3073         (grub_video_setup): remove
3074         (grub_video_set_mode): new prototype
3075         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
3076         (vid_mode): remove
3077         (linux_vesafb_res): compile only on PCBIOS
3078         (grub_linux_boot): support gfxpayload
3079         * loader/i386/pc/xnu.c (video_hook): new function
3080         (grub_xnu_set_video): support gfxpayload
3081         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
3082         (DEFAULT_VIDEO_HEIGHT): likewise
3083         (DEFAULT_VIDEO_FLAGS): likewise
3084         (DEFAULT_VIDEO_MODE): new definition
3085         (video_hook): new function
3086         (grub_gfxterm_init): use grub_video_set_mode
3087         * util/grub.d/30_os-prober.in: remove explicit modesetting before
3088         loading xnu
3089         * video/video.c (grub_video_setup): removed
3090         (grub_video_set_mode): new function based on grub_gfxterm_init and
3091         grub_video_setup
3093 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3095         Avoid calling biosdisk in drivemap
3097         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
3098         (revparse_biosdisk): likewise
3099         (list_mappings): derive name from id directly
3100         (grub_cmd_drivemap): use tryparse_diskstring
3102 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3104         Script fixes
3106         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
3107         (grub_lexer_param): add tokenonhold
3108         (grub_script_create_cmdline): remove cmdline. All callers updated
3109         (grub_script_function_create): make functionname
3110         grub_script_arg. All callers updated
3111         (grub_script_execute_argument_to_string): new prototype
3112         * kern/parser.c (state_transitions): reorder
3113         (grub_parser_cmdline_state): fix a bug and make more compact
3114         * script/sh/execute.c (grub_script_execute_argument_to_string):
3115         make global
3116         (grub_script_execute_cmdline): use new format
3117         * script/sh/function.c (grub_script_function_create): make functionname
3118         grub_script_arg. All callers updated
3119         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
3120         (grub_script_yylex): remove
3121         (grub_script_yylex2): renamed to ...
3122         (grub_script_yylex): ...renamed
3123         parse the expressions like a${b}c
3124         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
3125         (GRUB_PARSER_TOKEN_VAR): remove
3126         (GRUB_PARSER_TOKEN_NAME): likewise
3127         ("if"): declare as typeless
3128         ("while"): likewise
3129         ("function"): likewise
3130         ("else"): likewise
3131         ("then"): likewise
3132         ("fi"): likewise
3133         (text): remove
3134         (argument): likewise
3135         (script): accept empty scripts and make exit on error
3136         (arguments): use GRUB_PARSER_TOKEN_ARG
3137         (function): likewise
3138         (command): move error handling to script
3139         (menuentry): move grub_script_lexer_ref before
3140         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
3141         argument. All callers updated
3143 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
3145         Prevent GRUB from probing floppies during boot.
3147         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
3148         * commands/search.c (options): Add --no-floppy.
3149         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
3150         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
3151         --no-floppy when searching for UUIDs.
3153 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
3155         Simplify the code duplication in commands/search.c.
3157         * commands/search.c (search_label, search_fs_uuid): Merge into ...
3158         (search_fs): ... this.  Update all users.
3160 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
3162         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
3164 2009-05-28  Pavel Roskin  <proski@gnu.org>
3166         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
3167         Remove the original symlink explicitly.
3169         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
3170         just one slash.  That's how grub_fshelp_find_file() does it.
3172 2009-05-26  Pavel Roskin  <proski@gnu.org>
3174         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
3175         to `str'.
3177         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
3178         possibly unused.
3180 2009-05-25  Christian Franke  <franke@computer.org>
3182         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
3183         register.
3184         (grub_atapi_identify): Add wait after drive select.
3185         (grub_ata_identify): Do more strict status register check before
3186         calling grub_atapi_identify ().  Suppress error message if status
3187         register is 0x00 after command failure.  Add status register
3188         check after PIO read to avoid bogus identify due to stuck DRQ.
3189         Thanks to Pavel Roskin for testing.
3190         (grub_device_initialize): Remove unsafe status register check.
3191         Thanks to 'phcoder' for problem report and patch.
3192         Prevent sign extension in debug message.
3194 2009-05-23  Colin D Bennett  <colin@gibibit.com>
3196         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
3197         definition file, and functions defined in `normal/menu.c' have had
3198         their prototypes moved to `include/grub/menu.h' for consistency.
3200         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
3201         from normal.h.
3202         (grub_menu_get_entry): Likewise.
3203         (grub_menu_get_timeout): Likewise.
3204         (grub_menu_set_timeout): Likewise.
3205         (grub_menu_execute_entry): Likewise.
3206         (grub_menu_execute_with_fallback): Likewise.
3207         (grub_menu_entry_run): Likewise.
3209         * include/grub/normal.h: Re-ordered and grouped function
3210         prototypes by file that the function is defined in.
3211         (grub_menu_execute_callback): Removed; moved to menu.h.
3212         (grub_menu_get_entry): Likewise.
3213         (grub_menu_get_timeout): Likewise.
3214         (grub_menu_set_timeout): Likewise.
3215         (grub_menu_execute_entry): Likewise.
3216         (grub_menu_execute_with_fallback): Likewise.
3217         (grub_menu_entry_run): Likewise.
3218         (grub_menu_addentry): Renamed from this ...
3219         (grub_normal_add_menu_entry): ... to this.
3221         * normal/main.c (grub_menu_addentry): Renamed from this ...
3222         (grub_normal_add_menu_entry): ... to this.
3224         * script/sh/execute.c (grub_script_execute_menuentry): Update
3225         reference to renamed grub_menu_addentry function.
3227 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
3229         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
3231 2009-05-22  Pavel Roskin  <proski@gnu.org>
3233         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
3234         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
3235         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
3236         compiling for the i386 targets, but not for the utilities.
3238         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
3239         to grub_uint8_t.
3240         (grub_root_drive): Likewise.
3241         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
3242         remove alignment.
3243         (grub_root_drive): Change size to byte.
3244         (grub_start_addr): Remove.
3245         (grub_end_addr): Likewise.
3246         (grub_apm_bios_info): Likewise.
3248 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
3250         * normal/i386: Remove.
3251         * normal/powerpc: Likewise.
3252         * normal/sparc64: Likewise.
3253         * normal/x86_64: Likewise.
3255 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
3257         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
3258         * loader/i386/linux_trampoline.S: Fix indentation
3259         * loader/i386/xnu_helper.S: Likewise
3261 2009-05-18  Colin D Bennett  <colin@gibibit.com>
3263         Display error messages when parsing a Lua statement fails.
3264         Previously, executing a syntactically invalid statement like
3265         ")foo" or "bar;" would silently fail.
3267         * script/lua/grub_main.c (handle_lua_error): New function.
3268         (grub_lua_parse_line): Improved reporting of Lua parser and
3269         execution errors.
3271 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
3273         Remove -Werror which causes build to fail on some systems
3275         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
3276         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
3277         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
3279 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
3281         trampoline for linux on 64-bit platform
3283         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
3284         loader/i386/efi/linux_trampoline.S
3285         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
3286         declaration
3287         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
3288         here
3289         * loader/i386/linux_trampoline.S: moved here
3290         * loader/i386/efi/linux.c (allocate_pages): reserve space for
3291         trampoline
3292         (jumpvector): removed
3293         (grub_linux_trampoline_start): new declaration
3294         (grub_linux_trampoline_end): likewise
3295         (grub_linux_boot): use trampoline when on 64-bit platform
3296         * loader/i386/linux.c: likewise
3298 2009-05-16  Pavel Roskin  <proski@gnu.org>
3300         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
3301         const to avoid a warning.
3302         (grub_lua_setenv): Likewise.
3303         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
3304         lmsg to fix a warning.
3306 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
3308         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
3309         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3310         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
3311         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3312         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3313         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3314         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3315         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3317 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
3319         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
3321 2009-05-16  Bean  <bean123ch@gmail.com>
3323         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
3324         (lua_mod_SOURCES): New variable.
3325         (lua_mod_CFLAGS): Likewise.
3326         (lua_mod_LDFLAGS): Likewise.
3328         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
3329         (setjmp_mod_SOURCES): New variable.
3330         (setjmp_mod_CFLAGS): Likewise.
3331         (setjmp_LDFLAGS): Likewise.
3333         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
3334         (setjmp_mod_SOURCES): New variable.
3335         (setjmp_mod_CFLAGS): Likewise.
3336         (setjmp_LDFLAGS): Likewise.
3338         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3339         (setjmp_mod_SOURCES): New variable.
3340         (setjmp_mod_CFLAGS): Likewise.
3341         (setjmp_LDFLAGS): Likewise.
3343         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3344         (setjmp_mod_SOURCES): New variable.
3345         (setjmp_mod_CFLAGS): Likewise.
3346         (setjmp_LDFLAGS): Likewise.
3348         * normal/i386/setjmp.S: Moved from here ...
3349         * lib/i386/setjmp.S: ... Moved here
3350         * normal/x86_64/setjmp.S: Moved from here ...
3351         * lib/x86_64/setjmp.S: ... Moved here
3352         * normal/powerpc/setjmp.S: Moved from here ...
3353         * lib/powerpc/setjmp.S: ... Moved here
3354         * normal/sparc64/setjmp.S: Moved from here ...
3355         * lib/sparc64/setjmp.S: ... Moved here
3357         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
3358         returns_twice in mingw.
3360         * script/lua/grub_lib.c: New file.
3361         * script/lua/grub_lib.h: Likewise.
3362         * script/lua/grub_lua.h: Likewise.
3363         * script/lua/grub_main.c: Likewise.
3364         * script/lua/lapi.c: Likewise.
3365         * script/lua/lapi.h: Likewise.
3366         * script/lua/lauxlib.c: Likewise.
3367         * script/lua/lauxlib.h: Likewise.
3368         * script/lua/lbaselib.c: Likewise.
3369         * script/lua/lcode.c: Likewise.
3370         * script/lua/lcode.h: Likewise.
3371         * script/lua/ldblib.c: Likewise.
3372         * script/lua/ldebug.c: Likewise.
3373         * script/lua/ldebug.h: Likewise.
3374         * script/lua/ldo.c: Likewise.
3375         * script/lua/ldo.h: Likewise.
3376         * script/lua/ldump.c: Likewise.
3377         * script/lua/lfunc.c: Likewise.
3378         * script/lua/lfunc.h: Likewise.
3379         * script/lua/lgc.c: Likewise.
3380         * script/lua/lgc.h: Likewise.
3381         * script/lua/linit.c: Likewise.
3382         * script/lua/liolib.c: Likewise.
3383         * script/lua/llex.c: Likewise.
3384         * script/lua/llex.h: Likewise.
3385         * script/lua/llimits.h: Likewise.
3386         * script/lua/lmathlib.c: Likewise.
3387         * script/lua/lmem.c: Likewise.
3388         * script/lua/lmem.h: Likewise.
3389         * script/lua/loadlib.c: Likewise.
3390         * script/lua/lobject.c: Likewise.
3391         * script/lua/lobject.h: Likewise.
3392         * script/lua/lopcodes.c: Likewise.
3393         * script/lua/lopcodes.h: Likewise.
3394         * script/lua/loslib.c: Likewise.
3395         * script/lua/lparser.c: Likewise.
3396         * script/lua/lparser.h: Likewise.
3397         * script/lua/lstate.c: Likewise.
3398         * script/lua/lstate.h: Likewise.
3399         * script/lua/lstring.c: Likewise.
3400         * script/lua/lstring.h: Likewise.
3401         * script/lua/lstrlib.c: Likewise.
3402         * script/lua/ltable.c: Likewise.
3403         * script/lua/ltable.h: Likewise.
3404         * script/lua/ltablib.c: Likewise.
3405         * script/lua/ltm.c: Likewise.
3406         * script/lua/ltm.h: Likewise.
3407         * script/lua/lua.h: Likewise.
3408         * script/lua/luaconf.h: Likewise.
3409         * script/lua/lualib.h: Likewise.
3410         * script/lua/lundump.c: Likewise.
3411         * script/lua/lundump.h: Likewise.
3412         * script/lua/lvm.c: Likewise.
3413         * script/lua/lvm.h: Likewise.
3414         * script/lua/lzio.c: Likewise.
3415         * script/lua/lzio.h: Likewise.
3417 2009-05-16  Bean  <bean123ch@gmail.com>
3419         * include/grub/kernel.h (grub_module_header_types): Add type
3420         OBJ_TYPE_CONFIG.
3422         * kern/main.c (grub_load_config): New function.
3423         (grub_main): Call grub_load_config to read boot config.
3425         * grub-mkimage (generate_image): New parameter config_path.
3426         (options): New option --config.
3427         (main): Parse --config option, and pass it to generate_image.
3429 2009-05-14  Christian Franke  <franke@computer.org>
3431         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
3432         This fixes build on Cygwin.
3434 2009-05-14  Pavel Roskin  <proski@gnu.org>
3436         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
3437         jump.  This saves two bytes, so the typical case of 2 swapped
3438         drives would fit 32 bytes.
3440 2009-05-13  Pavel Roskin  <proski@gnu.org>
3442         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
3443         grub_uint32_t to avoid a warning.
3445         * loader/i386/linux.c (allocate_pages): When assigning
3446         real_mode_mem, cast through grub_size_t to fix a warning.  The
3447         code already makes sure that the value would fit a pointer.
3448         (grub_linux_setup_video): Cast render_target->data to
3449         grub_size_t to fix a warning.
3451 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
3453         * commands/i386/pc/drivemap.c: New file - implement drivemap
3454         command.
3455         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
3456         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
3458 2009-05-13  Pavel Roskin  <proski@gnu.org>
3460         * util/i386/pc/grub-setup.c (setup): Remove unused variable
3461         embedding_area_exists.
3463 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
3465         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
3466         it easier to understand / work with.
3467         Improve warning messages for cases where there's no embedding area,
3468         or when it is too small (or core.img too large).
3470 2009-05-13  Pavel Roskin  <proski@gnu.org>
3472         * loader/i386/pc/multiboot2.c: Add necessary includes for
3473         grub_multiboot2_real_boot().
3475         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
3476         PX record is always little-endian.  We only need the lower 2
3477         bytes of the mode.
3479         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
3480         facilitate code reuse.
3481         (grub_cpio_mount): Use "struct head", not a char buffer.  This
3482         fixes a warning reported by gcc 4.4.
3484         * kernel/disk.c (grub_disk_read): Use void pointer for the
3485         buffer.
3486         (grub_disk_write): Use const void pointer for the buffer.
3487         Adjust all callers.  Remove unnecessary casts.
3489 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
3491         * util/i386/pc/grub-install.in: Update copyright year.
3493 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3495         gptsync
3497         * commands/gptsync.c: new file
3498         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
3499         (gptsync_mod_SOURCES): new variable
3500         (gptsync_mod_CFLAGS): likewise
3501         (gptsync_mod_LDFLAGS): likewise
3502         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
3503         new definition
3504         (GRUB_PC_PARTITION_TYPE_HFS): likewise
3505         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
3506         * conf/i386-ieee1275.rmk: likewise
3507         * conf/i386-pc.rmk: likewise
3508         * conf/powerpc-ieee1275.rmk: likewise
3510 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3512         Fixed grub-emu
3514         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
3515         (grub_dl_ref): likewise
3517 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
3519         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
3520         split in two functions (one for msdos and one for gpt).
3522 2009-05-08  Pavel Roskin  <proski@gnu.org>
3524         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
3525         not modified.
3527         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
3528         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
3529         Initialize them with -1.  Add sanity check for bad1.  Eliminate
3530         nerr variable.
3532 2009-05-08  David S. Miller  <davem@davemloft.net>
3534         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
3536 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
3538         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
3539         existence.
3541 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
3543         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3544         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
3546 2009-05-05  David S. Miller  <davem@davemloft.net>
3548         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
3550 2009-05-05  Pavel Roskin  <proski@gnu.org>
3552         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
3553         of grub_dl_ref() and grub_dl_unref().
3554         * commands/parttool.c: Remove preprocessor conditionals around
3555         grub_dl_ref() and grub_dl_unref().
3556         * fs/affs.c: Likewise.
3557         * fs/afs.c: Likewise.
3558         * fs/cpio.c: Likewise.
3559         * fs/ext2.c: Likewise.
3560         * fs/fat.c: Likewise.
3561         * fs/hfs.c: Likewise.
3562         * fs/hfsplus.c: Likewise.
3563         * fs/iso9660.c: Likewise.
3564         * fs/jfs.c: Likewise.
3565         * fs/minix.c: Likewise.
3566         * fs/ntfs.c: Likewise.
3567         * fs/reiserfs.c: Likewise.
3568         * fs/sfs.c: Likewise.
3569         * fs/udf.c: Likewise.
3570         * fs/ufs.c: Likewise.
3571         * fs/xfs.c: Likewise.
3572         * include/grub/dl.h: Likewise.
3573         * loader/xnu.c: Likewise.
3575 2009-05-04  Pavel Roskin  <proski@gnu.org>
3577         * commands/acpi.c: Remove unused variable my_mod.
3578         * partmap/amiga.c: Likewise.
3579         * partmap/apple.c: Likewise.
3580         * partmap/gpt.c: Likewise.
3581         * partmap/pc.c: Likewise.
3582         * partmap/sun.c: Likewise.
3583         * term/gfxterm.c: Likewise.
3584         * term/i386/pc/vesafb.c: Likewise.
3585         * term/i386/pc/vga.c: Likewise.
3587 2009-05-04  David S. Miller  <davem@davemloft.net>
3589         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
3590         pointer args to grub_ieee1275_get_property().
3592         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
3594         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
3595         devices, and do not traverse down under controller nodes.
3597         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
3598         (grub_ofdisk_open): Use it to un-escape "," characters.
3599         * kern/disk.c (find_part_sep): New.
3600         (grub_disk_open): Use it to find the first non-escaped ','
3601         character in the disk name.
3602         * util/ieee1275/devicemap.c (escape_of_path): New.
3603         (grub_util_emit_devicemap_entry): Use it.
3604         * util/sparc64/ieee1275/grub-install.in: Update script to
3605         strip partition specifiers properly by not triggering on
3606         '\' escaped ',' characters.
3608 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3610         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
3611         to 0x300.
3612         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
3613         resolutions.
3614         (linux_vesafb_modes): Add a lot of additional modes to the list (based
3615         on documentation from Wikipedia).
3617 2009-05-04  Pavel Roskin  <proski@gnu.org>
3619         * disk/ata.c: Spelling fixes.
3620         * disk/raid.c: Likewise.
3621         * disk/usbms.c: Likewise.
3622         * disk/dmraid_nvidia.c: Likewise.
3623         * kern/ieee1275/openfw.c: Likewise.
3624         * kern/ieee1275/init.c: Likewise.
3625         * kern/ieee1275/cmain.c: Likewise.
3626         * boot/i386/pc/cdboot.S: Likewise.
3627         * video/readers/png.c: Likewise.
3628         * video/i386/pc/vbe.c: Likewise.
3629         * fs/udf.c: Likewise.
3630         * fs/hfs.c: Likewise.
3631         * fs/reiserfs.c: Likewise.
3632         * efiemu/runtime/efiemu.c: Likewise.
3633         * efiemu/main.c: Likewise.
3634         * efiemu/mm.c: Likewise.
3635         * include/grub/elf.h: Likewise.
3636         * include/grub/xnu.h: Likewise.
3637         * include/grub/usbdesc.h: Likewise.
3638         * include/grub/usb.h: Likewise.
3639         * include/grub/script_sh.h: Likewise.
3640         * include/grub/lib/LzmaEnc.h: Likewise.
3641         * include/grub/efiemu/efiemu.h: Likewise.
3642         * include/grub/command.h: Likewise.
3643         * normal/menu.c: Likewise.
3644         * normal/main.c: Likewise.
3645         * normal/datetime.c: Likewise.
3646         * bus/usb/uhci.c: Likewise.
3647         * mmap/i386/uppermem.c: Likewise.
3648         * mmap/mmap.c: Likewise.
3649         * commands/acpi.c: Likewise.
3650         * commands/test.c: Likewise.
3651         * partmap/apple.c: Likewise.
3652         * font/font.c: Likewise.
3653         * loader/sparc64/ieee1275/linux.c: Likewise.
3654         * loader/macho.c: Likewise.
3655         * loader/i386/bsd_trampoline.S: Likewise.
3656         * loader/i386/bsd.c: Likewise.
3657         * loader/xnu.c: Likewise.
3658         * term/i386/pc/vesafb.c: Likewise.
3659         * term/usb_keyboard.c: Likewise.
3660         * util/resolve.c: Likewise.
3661         * util/getroot.c: Likewise.
3663 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3665         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
3667 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3669         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
3670         build error.
3672 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3674         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
3675         parameter only available on BIOS.
3677 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3679         Removed wrong semicolon in declaration
3681         * grub/misc.h (grub_dprintf): remove semicolon
3683 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3685         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
3686         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
3687         is done by grub_cmd_linux() now).
3688         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
3689         restore video to text mode.
3690         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
3691         indicates lack of "vga=" parameter.  "vga=0" is mapped to
3692         `GRUB_LINUX_VID_MODE_NORMAL'.
3694 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3696         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
3697         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
3698         and `normal/script.c'.  Add `kern/rescue_reader.c',
3699         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
3700         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
3701         `grub_script.tab.c'.
3703         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3704         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3705         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3706         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3707         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3709         * Makefile.in: Remove duplicated 2008 in Copyright line.
3711 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3713         * util/misc.c (grub_util_warn): New function.  Emits a warning
3714         unconditionally.
3715         * include/grub/util/misc.h (grub_util_warn): New declaration.
3717         * util/i386/pc/grub-install.in: Understand --force and pass it down
3718         to grub-setup.
3720         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
3721         down to setup().
3722         (setup): Improve error messages and add warnings when requested to
3723         install in odd layouts.  Refuse to install using blocklists unless
3724         --force was set.
3726 2009-05-04  martin f. krafft  <madduck@madduck.net>
3728         * disk/raid.c (grub_raid_scan_device): Improve debug message.
3730 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3732         Updated copyright year
3734         * fs/hfsplus.c: updated copyright year
3736 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3738         HFS+ UUID
3740         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
3741         in the space previously used by unused3
3742         (grub_hfsplus_uuid): new function
3743         (grub_hfsplus_fs): added uuid field
3745 2009-05-03  Pavel Roskin  <proski@gnu.org>
3747         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
3748         suppress warnings.  It's no longer needed.
3749         * disk/host.c: Likewise.
3750         * disk/ata_pthru.c: Likewise.
3751         * disk/loopback.c: Likewise.
3752         * hook/datehook.c: Likewise.
3753         * parttool/pcpart.c: Likewise.
3754         * fs/i386/pc/pxe.c: Likewise.
3755         * fs/ntfscomp.c: Likewise.
3756         * efiemu/main.c: Likewise.
3757         * mmap/mmap.c: Likewise.
3758         * commands/crc.c: Likewise.
3759         * commands/hexdump.c: Likewise.
3760         * commands/hdparm.c: Likewise.
3761         * commands/acpi.c: Likewise.
3762         * commands/echo.c: Likewise.
3763         * commands/minicmd.c: Likewise.
3764         * commands/blocklist.c: Likewise.
3765         * commands/memrw.c: Likewise.
3766         * commands/loadenv.c: Likewise.
3767         * commands/usbtest.c: Likewise.
3768         * commands/lsmmap.c: Likewise.
3769         * commands/boot.c: Likewise.
3770         * commands/parttool.c: Likewise.
3771         * commands/configfile.c: Likewise.
3772         * commands/search.c: Likewise.
3773         * commands/ieee1275/suspend.c: Likewise.
3774         * commands/cat.c: Likewise.
3775         * commands/i386/pc/pxecmd.c: Likewise.
3776         * commands/i386/pc/play.c: Likewise.
3777         * commands/i386/pc/halt.c: Likewise.
3778         * commands/i386/pc/vbeinfo.c: Likewise.
3779         * commands/i386/pc/vbetest.c: Likewise.
3780         * commands/lspci.c: Likewise.
3781         * commands/date.c: Likewise.
3782         * commands/handler.c: Likewise.
3783         * commands/ls.c: Likewise.
3784         * commands/test.c: Likewise.
3785         * commands/cmp.c: Likewise.
3786         * commands/efi/loadbios.c: Likewise.
3787         * commands/efi/fixvideo.c: Likewise.
3788         * commands/halt.c: Likewise.
3789         * commands/help.c: Likewise.
3790         * commands/reboot.c: Likewise.
3791         * hello/hello.c: Likewise.
3792         * script/sh/main.c: Likewise.
3793         * loader/xnu.c: Likewise.
3794         * term/terminfo.c: Likewise.
3795         * term/i386/pc/serial.c: Likewise.
3796         * term/usb_keyboard.c: Likewise.
3798 2009-05-03  David S. Miller  <davem@davemloft.net>
3800         * normal/menu.c: Include grub/parser.h
3802 2009-05-03  Pavel Roskin  <proski@gnu.org>
3804         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
3805         not char*.
3806         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
3807         Suggested by Javier Martín <lordhabbit@gmail.com>
3809         * util/i386/pc/grub-mkrescue.in: Allow for the case when
3810         efiemu??.o doesn't exist.
3811         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
3812         copying.
3814 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
3816         FreeBSD 64-bit support
3818         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
3819         and loader/i386/bsd_trampoline.S
3820         (bsd_mod_ASFLAGS): new variable
3821         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
3822         (FREEBSD_MODTYPE_KERNEL64): likewise
3823         (grub_bsd64_trampoline_start): likewise
3824         (grub_bsd64_trampoline_end): likewise
3825         (grub_bsd64_trampoline_selfjump): likewise
3826         (grub_bsd64_trampoline_gdt): likewise
3827         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
3828         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
3829         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
3830         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
3831         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3832         of "attrib" member
3833         * loader/i386/bsd_pagetable.c: new file
3834         * loader/i386/bsd_trampoline.S: likewise
3835         * loader/i386/bsd.c (ALIGN_QWORD): new macro
3836         (ALIGN_VAR): likewise
3837         (entry_hi): new variable
3838         (kern_end_mdofs): likewise
3839         (is_64bit): likewise
3840         (grub_freebsd_add_meta): use ALIGN_VAR
3841         (grub_e820_mmap): new declaration
3842         (grub_freebsd_add_mmap): new function
3843         (grub_freebsd_add_meta_module): support 64 bit kernels
3844         (grub_freebsd_list_modules): use ALIGN_VAR
3845         (gdt_descriptor): new declaration
3846         (grub_freebsd_boot): support 64 bit kernels
3847         (grub_bsd_elf64_hook): new function
3848         (grub_bsd_load_elf): support elf64
3850 2009-05-03  Bean  <bean123ch@gmail.com>
3852         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
3853         after we get the result of if statement.
3855 2009-05-03  Bean  <bean123ch@gmail.com>
3857         * Makefile.in (enable_efiemu): New variable.
3859         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
3860         set.
3861         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
3862         path.
3863         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
3864         path, add -mno-red-zone option.
3865         (efiemu64_s.o): Likewise.
3866         (efiemu64.o): Use macro $^ for source file.
3868         * configure.ac (--enable-efiemu): New option.
3870 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
3872         xnu support
3874         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
3875         (pkglib_MODULES): add xnu.mod
3876         (xnu_mod_SOURCES): new variable
3877         (xnu_mod_CFLAGS): likewise
3878         (xnu_mod_LDFLAGS): likewise
3879         (xnu_mod_ASFLAGS): likewise
3880         * conf/i386-pc.rmk: likewise
3881         * conf/x86_64-efi.rmk: likewise
3882         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
3883         new declaration
3884         * include/grub/i386/macho.h: new file
3885         * include/grub/i386/xnu.h: likewise
3886         * include/grub/macho.h: likewise
3887         * include/grub/machoload.h: likewise
3888         * include/grub/x86_64/macho.h: likewise
3889         * include/grub/x86_64/xnu.h: likewise
3890         * include/grub/xnu.h: likewise
3891         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
3892         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
3893         * loader/i386/efi/xnu.c: new file
3894         * loader/i386/pc/xnu.c: likewise
3895         * loader/i386/xnu.c: likewise
3896         * loader/i386/xnu_helper.S: likewise
3897         * loader/macho.c: likewise
3898         * loader/xnu.c: likewise
3899         * loader/xnu_resume.c: likewise
3900         * util/grub-dumpdevtree: likewise
3901         * include/grub/i386/pit.h: include grub/err.h
3902         (grub_pit_wait): export
3903         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
3905 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3907         Efiemu
3909         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
3910         _linux_efi, linux_efi.
3911         new files in grub-emu
3912         new targets efiemu32.o and efiemu64.o
3913         * loader/linux_normal_efiemu.c: likewise
3914         * loader/i386/efi/linux.c: added preliminary efiemu support
3915         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
3916         files to copy
3917         * include/grub/autoefi.h: new file
3918         * include/grub/i386/efiemu.h: likewise
3919         * include/grub/i386/pc/efiemu.h: likewise
3920         * include/grub/efi/api.h: add LL suffix when necessary
3921         new definitions relating to tables
3922         * include/grub/efiemu/efiemu.h: new file
3923         * include/grub/efiemu/runtime.h: likewise
3924         * efiemu/prepare.c: likewise
3925         * efiemu/loadcore_common.c: likewise
3926         * efiemu/loadcore64.c: likewise
3927         * efiemu/runtime/efiemu.sh: likewise
3928         * efiemu/runtime/efiemu.S: likewise
3929         * efiemu/runtime/efiemu.c: likewise
3930         * efiemu/runtime/config.h: likewise
3931         * efiemu/prepare32.c: likewise
3932         * efiemu/main.c: likewise
3933         * efiemu/modules/pnvram.c: likewise
3934         * efiemu/modules/i386: likewise
3935         * efiemu/modules/i386/pc: likewise
3936         * efiemu/modules/acpi.c: likewise
3937         * efiemu/i386/pc/cfgtables.c: likewise
3938         * efiemu/i386/loadcore64.c: likewise
3939         * efiemu/i386/loadcore32.c: likewise
3940         * efiemu/prepare64.c: likewise
3941         * efiemu/loadcore.c: likewise
3942         * efiemu/symbols.c: likewise
3943         * efiemu/mm.c: likewise
3944         * efiemu/loadcore32.c: likewise
3946 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3948         ACPI spoofing
3950         * commands/acpi.c: new file
3951         * commands/i386/pc/acpi.c: likewise
3952         * commands/efi/acpi.c: likewise
3953         * include/grub/acpi.h: likewise
3954         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
3955         (acpi_mod_SOURCES): new variable
3956         (acpi_mod_CFLAGS): likewise
3957         (acpi_mod_LDFLAGS): likewise
3958         * conf/i386-efi.rmk: likewise
3959         * conf/x86_64-efi.rmk: likewise
3961 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3963         Missing part from mmap patch
3965         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
3966         (grub_mmap_unregister)
3967         (grub_mmap_free_and_unregister): use grub_mmap_register
3969 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
3971         Mmap services
3973         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
3974         * loader/i386/linux.c (find_mmap_size): likewise
3975         (allocate_pages): likewise
3976         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
3977         (grub_fill_multiboot_mmap): likewise
3978         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
3979         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
3980         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
3981         (OPENBSD_MMAP_RESERVED): likewise
3982         * include/grub/i386/pc/memory.h: include grub/memory.h
3983         (grub_lower_mem): removed
3984         (grub_upper_mem): likewise
3985         (GRUB_MACHINE_MEMORY_ACPI): new definition
3986         (GRUB_MACHINE_MEMORY_NVS): likewise
3987         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
3988         (GRUB_MACHINE_MEMORY_HOLE): likewise
3989         (grub_machine_mmap_register): likewise
3990         (grub_machine_mmap_unregister): likewise
3991         (grub_machine_get_upper): likewise
3992         (grub_machine_get_lower): likewise
3993         (grub_machine_get_post64): likewise
3994         * include/grub/i386/efi/memory.h: new file
3995         * include/grub/x86_64/efi/memory.h: likewise
3996         * include/grub/efi/memory.h: likewise
3997         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
3998         (mmap_mod_SOURCES): new variable
3999         (mmap_mod_LDFLAGS): likewise
4000         (mmap_mod_ASFLAGS): likewise
4001         * conf/i386-coreboot.rmk: likewise
4002         * conf/i386-ieee1275.rmk: likewise
4003         * conf/i386-efi.rmk: likewise
4004         * conf/x86_64-efi.rmk: likewise
4005         * include/grub/types.h (UINT_TO_PTR): new macro
4006         (PTR_TO_UINT32): likewise
4007         (PTR_TO_UINT64): likewise
4008         * include/grub/memory.h: new file
4009         * mmap/i386/pc/mmap.c: likewise
4010         * mmap/i386/pc/mmap_helper.S: likewise
4011         * mmap/i386/uppermem.c: likewise
4012         * mmap/mmap.c: likewise
4013         * mmap/efi/mmap.c: likewise
4014         * kern/i386/coreboot/init.c (grub_machine_init): don't use
4015         grub_upper_mem
4016         * kern/i386/pc/init.c (grub_lower_mem): removed variable
4017         (grub_upper_mem): likewise
4018         (grub_machine_init): don't use grub_upper_mem,
4019         make grub_lower_mem local
4020         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
4021         grub_mmap_iterate and grub_mmap_get_upper
4022         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
4024 2009-05-02  Bean  <bean123ch@gmail.com>
4026         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
4027         script/sh/parser.y.
4028         (pkglib_MODULES): Add normal.mod and sh.mod.
4029         (normal_SOURCES): New variable.
4030         (normal_mod_CFLAGS): Likewise.
4031         (normal_mod_LDFLAGS): Likewise.
4032         (sh_mod_SOURCES): Likewise.
4033         (sh_mod_CFLAGS): Likewise.
4034         (sh_mod_LDFLAGS): Likewise.
4036         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
4037         script/sh/lexer.c_DEPENDENCIES.
4038         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
4039         kern/rescue_reader.c and kern/rescue_parser.c.
4040         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
4041         (grub_emu_SOURCES): Change source files.
4042         (pkglib_MODULES): Remove normal.mod.
4043         (normal_SOURCES): Removed.
4044         (normal_mod_CFLAGS): Likewise.
4045         (normal_mod_LDFLAGS): Likewise.
4046         * conf/i386-coreboot.rmk: Likewise.
4047         * conf/i386-efi.rmk: Likewise.
4048         * conf/i386-ieee1276.rmk: Likewise.
4049         * conf/powerpc-ieee1275.rmk: Likewise.
4050         * conf/sparc64-ieee1275.rmk: Likewise.
4051         * conf/x86_64-efi.rmk: Likewise.
4053         * include/grub/command.h (grub_command_execute): New inline function.
4055         * include/grub/menu.h (grub_menu_entry): Removed commands field.
4057         * include/grub/normal.h: Remove <grub/setjmp.h>.
4058         (grub_fs_module_list): Moved to normal/autofs.c.
4059         (grub_exit_env): Removed.
4060         (grub_command_execute): Likewise.
4061         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
4062         parameter script.
4063         (read_command_list): New function declaration.
4064         (read_fs_list): Likewise.
4066         * include/parser.h: Include <grub/reader.h>.
4067         (grub_parser_split_cmdline): Change type of getline parameter.
4068         (grub_parser): New structure.
4069         (grub_parser_class): New variable.
4070         (grub_parser_execute): New function declaration.
4071         (grub_register_rescue_parser): Likewise.
4072         (grub_parser_register): New inline function.
4073         (grub_parser_unregister): Likewise.
4074         (grub_parser_get_current): Likewise.
4075         (grub_parser_set_current): Likewise.
4077         * include/grub/reader.h: New file.
4078         * kern/reader.c: Likewise.
4079         * kern/rescue_parser.c: Likewise.
4080         * kern/rescue_reader.c: Likewise.
4081         * normal/autofs.c: Likewise.
4082         * normal/dyncmd.c: Likewise.
4084         * include/grub/rescue.h: Removed.
4085         * normal/command.h: Likewise.
4087         * include/grub/script.h: Moved to ...
4088         * include/grub/script_sh.h: ... Moved here.
4089         * normal/execute.c: Moved to ...
4090         * script/sh/execute.c: ... Moved here.
4091         * normal/function.c: Moved to ...
4092         * script/sh/function.c: ... Moved here.
4093         * normal/lexer.c: Moved to ...
4094         * script/sh/lexer.c: ... Moved here.
4095         * normal/parser.y: Moved to ...
4096         * script/sh/parser.y: ... Moved here.
4097         * normal/script.c: Moved to ...
4098         * script/sh/script.c: ... Moved here.
4100         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
4101         <grub/reader.h>.
4102         (grub_exit_env): Removed.
4103         (fs_module_list): Moved to normal/autofs.c.
4104         (grub_file_getline): Don't handle comment here.
4105         (free_menu): Skip removed field entry->commands.
4106         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
4107         script parameter.
4108         (read_config_file): Removed nested parameter, change getline function.
4109         (grub_enter_normal_mode): Removed.
4110         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
4111         (read_command_list): Likewise.
4112         (autoload_fs_module): Moved to normal/autofs.c.
4113         (read_fs_list): Likewise.
4114         (reader_nested): New variable.
4115         (grub_normal_execute): Run parser.sh to switch to sh parser.
4116         (grub_cmd_rescue): Removed.
4117         (cmd_normal): Removed.
4118         (grub_cmd_normal): Unregister itself at the beginning. Don't register
4119         rescue command.
4120         (grub_cmdline_run): New function.
4121         (grub_normal_reader_init): Likewise.
4122         (grub_normal_read_line): Likewise.
4123         (grub_env_write_pager): Likewise.
4124         (cmdline): New variable.
4125         (grub_normal_reader): Likewise.
4126         (GRUB_MOD_INIT): Register normal reader and set as current, register
4127         pager hook, register normal command with grub_register_command_prio,
4128         so that it won't show up in command.lst.
4129         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
4130         grub_fs_autoload_hook.
4132         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
4133         (grub_menu_execute_entry): Replace grub_script_execute with
4134         grub_parser_execute, change parameter to grub_command_execute.
4136         * normal/menu_text.c: Remove <grub/script.h>.
4138         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
4139         and <grub/parser.h>.
4140         (run): Change editor_getline to use new parser interface. Change
4141         parameter to grub_command_execute.
4143         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
4144         <grub/reader.h> and <grub/parser.h>.
4145         (grub_load_normal_mode): Execute normal command.
4146         (grub_main): Call grub_register_core_commands,
4147         grub_register_rescue_parser and grub_register_rescue_reader, use
4148         grub_reader_loop to enter input loop.
4150         * kern/parser.c (grub_parser_split_cmdline): Change type of
4151         getline parameter.
4152         (grub_parser_class): New variable.
4153         (grub_parser_execute): New function.
4155         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
4156         * loader/multiboot2.c: Likewise.
4157         * loader/sparc64/ieee1275/linux.c: Likewise.
4159         * util/grub-emu.c (read_command_list): New dummy function.
4161 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
4163         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
4164         count to 16 for CCISS and IDA.
4166 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
4168         * normal/menu_text.c  (grub_wait_after_message): Print a newline
4169         after waiting for user input.
4171         * loader/i386/linux.c: Include `<grub/normal.h>'.
4172         (grub_cmd_linux): Improve the error message about `ask' mode, by
4173         waiting for user input so it's not missed (we can do this, since
4174         user requested interaction).
4176 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
4178         Added missing lst to grub-mkrescue
4180         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
4181         and ${input_dir}/parttool.lst
4183 2009-04-30  David S. Miller  <davem@davemloft.net>
4185         * util/hostdisk.c (device_is_wholedisk): New function.
4186         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
4187         zero only if device_is_wholedisk() returns true.
4189         * util/hostdisk.c (convert_system_partition_to_system_disk):
4190         Handle virtual disk devices named /dev/vdiskX as found on sparc
4191         and powerpc.
4193         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
4194         lettered partition specifier is found, convert to numbered.
4196 2009-04-29  David S. Miller  <davem@davemloft.net>
4198         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
4199         * include/grub/sparc64/ieee1275/memory.h: Likewise.
4201         * normal/command.c: Add missing newline at end of file.
4203         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
4204         warnings.
4205         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
4206         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
4207         grub_ofdisk_read): Likewise, and deal similarly with the fact that
4208         ihandles have a 32-bit type but need to be stored in a "void *".
4210 2009-04-28  Pavel Roskin  <proski@gnu.org>
4212         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
4213         not disk.  Adjust all dependencies.
4214         (grub_fs_uuid_close): Use grub_device_close(), not
4215         grub_disk_close().
4217         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
4218         parent's partition, don't copy it by reference, as it gets freed
4219         on close.
4221 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
4223         Preboot hooks support
4225         * commands/boot.c (struct grub_preboot_t): new declaration
4226         (preboots_head): new variable
4227         (preboots_tail): likewise
4228         (grub_loader_register_preboot_hook): new function
4229         (grub_loader_unregister_preboot_hook): likewise
4230         (grub_loader_set): launch preboot hooks
4231         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
4232         (grub_loader_register_preboot_hook): new declaration
4233         (grub_loader_unregister_preboot_hook): likewise
4235 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
4237         Warning fix
4239         * disk/scsi.c (grub_scsi_open): added missing cast when
4240         calling grub_dprintf
4242 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
4244         Bug and warning fixes
4246         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
4247         declaration
4248         * commands/test.c (test_parse): fixed bug with file tests and corrected
4249         declaration of find_file
4251 2009-04-26  Pavel Roskin  <proski@gnu.org>
4253         * Makefile.in: Don't install empty manual pages if help2man is
4254         missing.  Use help2man option for output, not shell redirection.
4256 2009-04-26  David S. Miller  <davem@davemloft.net>
4258         * util/grub-mkdevicemap.c (make_device_map): Add missing
4259         NESTED_FUNC_ATTR to process_device().
4261 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
4263         Test command
4265         * commands/test.c: rewritten to use bash-like test
4267 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
4269         Parttool autoloading and improvements
4271         * Makefile.in (pkglib_DATA): add parttool.lst
4272         (parttool.lst): new target
4273         * genmk.rb: generate parttool-*
4274         (CLEANFILES): add #{parttool}
4275         (PARTTOOLFILES): new variable
4276         * genparttoollist.sh: new file
4277         * parttool/pcpart.c (grub_pcpart_boot): more feedback
4278         (grub_pcpart_type): likewise
4279         * commands/parttool.c (helpmsg): new variable
4280         (grub_cmd_parttool): output help if not enough arguments are supplied
4281         autoload modules
4282         (GRUB_MOD_INIT(parttool)): use helpmsg
4284 2009-04-24  David S. Miller  <davem@davemloft.net>
4286         Avoiding opening same device multiple times in device iterator.
4288         * kern/device.c: (grub_device_iterate): Define struct part_ent,
4289         and use it to build a list of partitions in iterate_disk() and
4290         iterate_partition().
4292         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
4293         on disk->data.
4295         * disk/ieee1275/nand.c (grub_nand_iterate): Return
4296         grub_devalias_iterate() result instead of unconditional 0.
4297         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
4298         Also, capture hook return value, either directly or via
4299         grub_children_iterate(), and propagate to caller.
4300         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
4301         grub_children_iterate): Return value is now 'int' instead of
4302         'grub_err_t'.
4303         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
4304         like a proper iterator, stopping when hooks return non-zero.
4305         (grub_devalias_iterate): Likewise.
4307 2009-04-23  David S. Miller  <davem@davemloft.net>
4309         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
4311 2009-04-22  David S. Miller  <davem@davemloft.net>
4313         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
4314         is larger than address_cells, use that value for address_cells too.
4316         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
4317         IEEE1275_MAX_PATH_LEN): Define.
4318         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
4319         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
4320         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
4321         'devtype'.  Explicitly NULL terminate devalias expansion.
4323         * util/sparc64/ieee1275/misc.c: New file.
4324         * util/sparc64/ieee1275/grub-setup.c: New file.
4325         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
4326         * util/sparc64/ieee1275/grub-mkimage.c: New file.
4327         * util/sparc64/ieee1275/grub-install.in: New file.
4328         * util/ieee1275/ofpath.c: New file.
4329         * util/ieee1275/devicemap.c: New file.
4330         * util/devicemap.c: New file.
4331         * util/deviceiter.c: New file.
4332         * kern/sparc64/ieee1275/init.c: New file.
4333         * include/grub/util/ofpath.h: New file.
4334         * include/grub/util/deviceiter.h: New file.
4335         * util/grub-mkdevicemap.c: Include deviceiter.h.
4336         Implement using grub_util_emit_devicemap_entry and
4337         grub_util_iterate_devices.
4338         * conf/i386-corebook.rmk: Build util/deviceiter.c and
4339         util/devicemap.c into grub-mkdevicemap
4340         * conf/i386-efi.rmk: Likewise.
4341         * conf/i386-ieee1275.rmk: Likewise.
4342         * conf/i386-pc.rmk: Likewise.
4343         * conf/powerpc-ieee1275.rmk: Likewise.
4344         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
4345         images and installation utilities.  Build kernel as image
4346         instead of as elf binary.  Use common rules as much as possible.
4348 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
4350         Correct GPT definition
4352         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
4353         of "attrib" member
4355 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
4357         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
4359 2009-04-19  David S. Miller  <davem@davemloft.net>
4361         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
4362         (grub_rescue_cmd_linux): Rename to...
4363         (grub_cmd_linux): and fix prototype.
4364         (grub_rescue_cmd_initrd): Rename to...
4365         (grub_cmd_initrd): and fix prototype.
4366         (cmd_linux, cmd_initrd): New.
4367         (GRUB_MOD_INIT(linux)): Use grub_register_command().
4368         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
4370 2009-04-17  Pavel Roskin  <proski@gnu.org>
4372         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
4373         format.
4374         (grub_ohci_transfer): Likewise.
4376         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
4378         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
4379         return without a value.  Fix inconsistent indentation.
4381         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
4382         match struct grub_fs.
4384         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
4385         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
4386         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4387         * commands/lspci.c (grub_lspci_iter): Likewise.
4389 2009-04-16  Bean  <bean123ch@gmail.com>
4391         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
4392         value.
4394 2009-04-15  Pavel Roskin  <proski@gnu.org>
4396         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
4397         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
4398         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
4399         definitions.
4401 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4403         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
4404         that no multiple data or metadata areas are supported and `Unknown
4405         metadata header'.
4407 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4409         Move loader out of the kernel
4411         * kern/loader.c: moved to ...
4412         * commands/boot.c: ... moved here
4413         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
4414         * commands/boot.c (grub_cmd_boot): moved here. All users updated
4415         * include/grub/kernel.h (grub_machine_fini): export
4416         * include/grub/loader.h (grub_loader_is_loaded): update declaration
4417         (grub_loader_set): likewise
4418         (grub_loader_unset): likewise
4419         (grub_loader_boot): likewise
4420         * conf/common.rmk: new module boot.mod
4421         (pkglib_MODULES): add boot.mod
4422         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
4423         (grub_emu_SOURCES): likewise
4424         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
4425         (grub_emu_SOURCES): likewise
4426         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
4427         (grub_emu_SOURCES): likewise
4428         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
4429         (grub_emu_SOURCES): likewise
4430         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
4431         (grub_emu_SOURCES): likewise
4432         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
4433         (grub_emu_SOURCES): likewise
4434         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
4435         (grub_emu_SOURCES): likewise
4437 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4439         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
4441         * kern/misc.c (grub_itoa): Removed function
4442         (grub_ltoa): likewise
4443         (grub_vsprintf): use grub_lltoa
4445 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4447         Restore grub-emu
4449         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
4450         * conf/i386-coreboot.rmk: likewise
4451         * conf/i386-ieee1275.rmk: likewise
4452         * conf/powerpc-ieee1275.rmk: likewise
4454 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4456         * INSTALL: Add that `./autogen.sh' needs to be run before
4457         `./configure.'.
4459 2009-04-14  Bean  <bean123ch@gmail.com>
4461         * Makefile.in (pkglib_DATA): Add handler.lst.
4462         (handler.lst): New rule.
4464         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
4465         * conf/i386-coreboot.rmk: Likewise.
4466         * conf/i386-ieee1275.rmk: Likewise.
4467         * conf/i386-efi.rmk: Likewise.
4468         * conf/x86_64-efi.rmk: Likewise.
4469         * conf/powerpc-ieee1275.rmk: Likewise.
4470         * conf/sparc64-ieee1275.rmk: Likewise.
4472         * genhandlerlist.sh: New file.
4474         * genmk.rb: Add rules to generate handler.lst.
4476         * include/grub/normal.h (grub_file_getline): New function definition.
4477         (read_handler_list): Likewise.
4478         (free_handler_list): Likewise.
4480         * include/grub/term.h (grub_term_register_input): Add name parameter
4481         for auto generation of handler.lst.
4482         (grub_term_register_output): Likewise.
4484         * normal/handler.c: New file.
4486         * normal/main.c (get_line): Renamed to grub_file_getline.
4487         (read_config_file): Use the newly renamed grub_file_getline.
4488         (read_command_list): Likewise.
4489         (read_fs_list): Likewise.
4490         (grub_normal_execute): Call read_handler_list to parse handler.lst.
4491         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
4493         * term/efi/console.c (grub_console_init): Add name parameter for auto
4494         generation of handler.lst.
4495         * term/gfxterm.c: Likewise.
4496         * term/i386/pc/at_keyboard.c: Likewise.
4497         * term/i386/pc/console.c: Likewise.
4498         * term/i386/pc/serial.c: Likewise.
4499         * term/i386/pc/vesafb.c: Likewise.
4500         * term/i386/pc/vga.c: Likewise.
4501         * term/i386/pc/vga_text.c: Likewise.
4502         * term/ieee1275/ofconsole.c: Likewise.
4503         * term/usb_keyboard.c: Likewise.
4505 2009-04-14  Bean  <bean123ch@gmail.com>
4507         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
4508         properly with null character.
4510 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4512         * configure: Remove.
4513         * config.h.in: Likewise.
4514         * stamp-h.in: Likewise.
4515         * DISTLIST: Likewise.
4516         * conf/common.mk: Likewise.
4517         * conf/i386-coreboot.mk: Likewise.
4518         * conf/i386-efi.mk: Likewise.
4519         * conf/i386-ieee1275.mk: Likewise.
4520         * conf/i386.mk: Likewise.
4521         * conf/i386-pc.mk: Likewise.
4522         * conf/powerpc-ieee1275.mk: Likewise.
4523         * conf/sparc64-ieee1275.mk: Likewise.
4524         * conf/x86_64-efi.mk: Likewise.
4526         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
4527         develop on GRUB.
4529 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
4530             David S. Miller  <davem@davemloft.net>
4532         * util/hostdisk.c (make_device_name): Fix buffer length
4533         calculations.
4535 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4537         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
4538         <sys/param.h> and <sys/sysctl.h>.
4539         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
4540         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
4541         opening the device and reset them afterwards.
4543 2009-04-13  Pavel Roskin  <proski@gnu.org>
4545         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
4546         Reported by John Stanley <jpsinthemix@verizon.net>
4548 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4550         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
4551         that name for menuentries when appropriate.
4553 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4555         * util/grub.d/10_freebsd.in: Add a missing `fi'.
4557 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4559         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
4560         to Linux, simply abort telling the user it's no longer supported.
4562 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4564         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
4565         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
4566         `freebsd_loadenv' only when devices.hints exist.
4568 2009-04-13  Pavel Roskin  <proski@gnu.org>
4570         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
4572 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4574         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
4575         partition number.
4576         (grub_drive): Likewise.
4578 2009-04-13  David S. Miller  <davem@davemloft.net>
4580         * kern/sparc64/ieee1275/ieee1275.c: New file.
4581         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
4582         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
4583         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
4584         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
4585         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
4586         grub_ieee1275_alloc_physmem): Declare new exported functions.
4588         * include/grub/sparc64/ieee1275/loader.h: New file.
4589         * include/grub/sparc64/ieee1275/memory.h: Likewise.
4590         * include/grub/sparc64/kernel.h: Likewise.
4591         * loader/sparc64/ieee1275/linux.c: Likewise.
4593         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
4594         (grub_fstest_SOURCES): Likewise.
4596         * util/hostdisk.c (make_device_name): Do not make any assumptions
4597         about the length of drive names.
4599         * kern/dl.c (grub_dl_load_file): Close file immediately when
4600         we are done using it.
4602 2009-04-12  David S. Miller  <davem@davemloft.net>
4604         * kern/misc.c (grub_ltoa): Fix cast when handling negative
4605         values.  Noticed by Pavel Roskin.
4607         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
4608         target compiler.
4610         * genmk.rb: Add more flexible image type specification, also
4611         pass --strip-unneeded to objcopy.
4612         * conf/i386-pc.rmk: Use *_FORMAT.
4613         * conf/i386-pc.mk: Rebuilt.
4615         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
4616         (OFDISK_HASH_SZ): Define.
4617         (ofdisk_hash): New hash table.
4618         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
4619         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
4620         instead of device phandle which is not unique.
4622         * kern/sparc64/ieee1275/init.c: Delete, replace with...
4623         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
4624         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
4625         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
4626         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
4627         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
4628         GRUB_KERNEL_MACHINE_DATA_END): Define.
4629         (grub_kernel_image_size, grub_total_module_size): Declare.
4631 2009-04-12  Pavel Roskin  <proski@gnu.org>
4633          * configure.ac: Change the logic when we check for target tools.
4634          Do it when the target is specified and it's different from the
4635          specified value of the host.
4637 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
4639         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
4640         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
4641         GNU/kFreeBSD. Check if a device is a character device. Use
4642         DIOCGMEDIASIZE to get the size.
4643         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
4644         support for GNU/kFreeBSD.
4645         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
4646         is a character device instead of a block device. Add support for
4647         FreeBSD device names.
4649         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
4650         is a character device instead of a block device.
4652         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
4653         is a character device instead of a block device.
4655 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
4657         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
4658         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
4659         FreeBSD. Check if a device is a character device. Use
4660         DIOCGMEDIASIZE to get the size.
4661         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
4662         support for FreeBSD.
4663         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
4664         is a character device instead of a block device. Add support for
4665         FreeBSD device names.
4667         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
4668         a character device instead of a block device.
4669         (grub_util_check_char_device): New function.
4671         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
4672         a character device instead of a block device.
4674         * include/grub/util/getroot.h (grub_util_check_char_device): New
4675         prototype.
4677 2009-04-11  David S. Miller  <davem@davemloft.net>
4679         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
4680         static libgcc.
4681         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
4682         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
4683         function, if present.
4684         (__bswapdi2): Likewise.
4686         * include/grub/sparc64/ieee1275/boot.h: New file.
4687         * boot/sparc64/ieee1275/boot.S: Likewise.
4688         * boot/sparc64/ieee1275/diskboot.S: Likewise.
4690         * kern/misc.c (grub_ltoa): New function.
4691         (grub_vsprintf): Use it to format 'long' integers.
4693 2009-04-10  David S. Miller  <davem@davemloft.net>
4695         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
4696         slots are of type grub_ieee1275_cell_t.
4697         (grub_nand_read): Likewise.
4698         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
4699         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
4700         macros are used to compare values in arg/ret block of the call.
4701         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4702         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
4703         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
4704         grub_ieee1275_instance_to_path, grub_ieee1275_write,
4705         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
4706         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
4707         grub_ieee1275_close, grub_ieee1275_set_property,
4708         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
4709         grub_ieee1275_cell_t.
4710         * kern/ieee1275/openfw.c (grub_map): Likewise.
4711         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
4712         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
4714         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
4715         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
4716         (grub_devalias_iterate): Likewise.
4718 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
4720         UFS improvements
4722         * fs/ufs.c (INODE_NBLOCKS): new definition
4723         (struct grub_ufs_dirent): added fields for non-BSD dirents
4724         (grub_ufs_get_file_block): fixed double indirect handling
4725         (grub_ufs_lookup_symlink): use more robust way to determine whether
4726         symlink is inline
4727         (grub_ufs_find_file): support for non-BSD dirents
4728         (grub_ufs_dir): support for non-BSD dirents
4730 2009-04-10  Bean  <bean123ch@gnail.com>
4732         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
4733         attribute, otherwise the size would be wrong for i386 platform.
4735         * include/grub/pci.h (grub_pci_read_word): New inline function.
4736         (grub_pci_read_byte): Likewise.
4737         (grub_pci_write): Likewise.
4738         (grub_pci_write_word): Likewise.
4739         (grub_pci_write_byte): Likewise.
4741         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
4743         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
4744         (find_framebuf): Scan pci to locate the frame buffer address.
4746         * commands/efi/fixvideo.c: New file.
4748         * commands/efi/loadbios.c: Likewise.
4750         * commands/memrw.c: Likewise.
4752         * util/grub-dumpbios.in: Likewise.
4754         * conf/common.rmk (grub-dumpbios): New utility.
4755         (pkglib_MODULES): New module memrw.mod.
4756         (memrw_mod_SOURCE): New macro.
4757         (memrw_mod_CFLAGS): Likewise.
4758         (memrw_mod_LDFLAGS): Likewise.
4760         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
4761         fixvideo.mod.
4762         (loadbios_mod_SOURCE): New macro.
4763         (loadbios_mod_CFLAGS): Likewise.
4764         (loadbios_mod_LDFLAGS): Likewise.
4765         (fixvideo_mod_SOURCE): Likewise.
4766         (fixvideo_mod_CFLAGS): Likewise.
4767         (fixvideo_mod_LDFLAGS): Likewise.
4769         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
4770         fixvideo.mod.
4771         (loadbios_mod_SOURCE): New macro.
4772         (loadbios_mod_CFLAGS): Likewise.
4773         (loadbios_mod_LDFLAGS): Likewise.
4774         (fixvideo_mod_SOURCE): Likewise.
4775         (fixvideo_mod_CFLAGS): Likewise.
4776         (fixvideo_mod_LDFLAGS): Likewise.
4778 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
4780         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
4782 2009-04-07  David S. Miller  <davem@davemloft.net>
4784         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
4785         support for R_SPARC_OLO10 relocations.  Fix compile warning for
4786         R_SPARC_WDISP30 case.
4787         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
4789 2009-04-06  Pavel Roskin  <proski@gnu.org>
4791         * include/grub/misc.h (ARRAY_SIZE): New macro.
4792         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
4793         New macro.
4794         * loader/i386/linux.c (allocate_pages): Use free_pages().
4795         (grub_linux_unload): Don't use free_pages().
4796         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
4797         wrong index.  Treat all other modes as text modes.
4798         (grub_cmd_linux): Initialize vid_mode unconditionally to
4799         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
4801         * commands/help.c (print_command_help): Use cmd->prio, not
4802         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
4804 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
4806         Parttool
4808         * parttool/pcpart.c: new file
4809         * commands/parttool.c: likewise
4810         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
4811         (parttool_mod_SOURCES): new variable
4812         (parttool_mod_CFLAGS): likewise
4813         (parttool_mod_LDFLAGS): likewise
4814         (pcpart_mod_SOURCES): likewise
4815         (pcpart_mod_CFLAGS): likewise
4816         (pcpart_mod_LDFLAGS): likewise
4817         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
4818         and parttool/pcpart.c
4819         * conf/i386-efi.rmk: likewise
4820         * conf/i386-ieee1275.rmk: likewise
4821         * conf/i386-pc.rmk: likewise
4822         * conf/powerpc-ieee1275.rmk: likewise
4823         * conf/sparc64-ieee1275.rmk: likewise
4824         * conf/x86_64-ieee1275.rmk: likewise
4826 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4828         Support for mtime and further expandability of dir command
4830         * include/grub/lib/datetime.h: moved to ...
4831         * include/grub/datetime.h: ... moved here and added
4832         declaration of grub_unixtime2datetime. All users updated
4833         * include/grub/fs.h: new syntax for dir and mtime functions in
4834         struct grub_fs
4835         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
4836         and GRUB_FSHELP_FLAGS_MASK
4837         * commands/ls.c (grub_ls_list_files): Write mtime in long format
4838         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
4839         (grub_ext2_mtime): new function
4840         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
4841         (grub_hfsplus_mtime): new function
4842         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
4843         (GRUB_UFS_ATTR_FILE): likewise
4844         (GRUB_UFS_ATTR_LNK): likewise
4845         (struct grub_ufs_sblock): new fields mtime
4846         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
4847         all users updated
4848         (grub_ufs_dir): mtime support
4849         (grub_ufs_mtime): new function
4850         * fs/affs.c (grub_affs_dir): use new dir syntax
4851         * fs/afs.c (grub_afs_dir): likewise
4852         * fs/cpio.c (grub_cpio_dir): likewise
4853         * fs/fat.c (grub_fat_find_dir): likewise
4854         * fs/hfs.c (grub_hfs_dir): likewise
4855         * fs/iso9660.c (grub_iso9660_dir): likewise
4856         * fs/jfs.c (grub_jfs_dir): likewise
4857         * fs/minix.c (grub_minix_dir): likewise
4858         * fs/ntfs.c (grub_ntfs_dir): likewise
4859         * fs/reiserfs.c (grub_reiserfs_dir): likewise
4860         * fs/sfs.c (grub_sfs_dir): likewise
4861         * fs/xfs.c (grub_xfs_dir): likewise
4862         * util/hostfs.c (grub_hostfs_dir): likewise
4863         * lib/datetime.c: moved to ...
4864         * normal/datetime.c: ... moved here
4865         (grub_unixtime2datetime): new function
4866         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
4867         * normal/completion.c (iterate_dir): use new dir syntax
4868         * normal/misc.c (grub_normal_print_device_info): tell the
4869         last modification time of a volume
4870         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
4871         * conf/common.rmk: added lib/datetime.c to ls.mod
4872         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
4873         (normal_mod_SOURCES): likewise
4874         (datetime_mod_SOURCES): Removed lib/datetime.c
4875         * conf/i386-efi.rmk: likewise
4876         * conf/i386-ieee1275.rmk: likewise
4877         * conf/i386-pc.rmk: likewise
4878         * conf/powerpc-ieee1275.rmk: likewise
4879         * conf/sparc64-ieee1275.rmk: likewise
4880         * conf/x86_64-efi.rmk: likewise
4882 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
4884         Trim trailing spaces in FAT label and support mtools-like labels
4886         * fs/fat.c (grub_fat_iterate_dir): New function based
4887         on grub_fat_find_dir
4888         (grub_fat_find_dir): use grub_fat_iterate_dir
4889         (grub_fat_label): likewise
4891 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
4893         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
4894         and command.h
4895         remove extraneous kernel_elf_HEADERS
4897 2009-04-04  Bean  <bean123ch@gnail.com>
4899         * include/grub/util/misc.h: Add dummy function fsync for mingw.
4901         * util/misc.c: Likewise.
4903 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
4905         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
4906         instead of grub_printf.
4908 2009-04-03  Robert Millan  <rmh@aybabtu.com>
4910         * loader/i386/linux.c (grub_linux_setup_video): Fill
4911         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
4912         values from `mode info' structure instead of hardcoded
4913         values.
4915 2009-04-01  Pavel Roskin  <proski@gnu.org>
4917         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
4918         unused now.
4919         * genmk.rb: Likewise.
4920         * configure.ac: Likewise.
4922 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
4924         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
4925         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
4927 2009-04-01  David S. Miller  <davem@davemloft.net>
4929         * normal/sparc64/setjmp.S: Fix setjmp implementation.
4930         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
4931         (grub_setjmp): Mark with 'returns_twice' attribute.
4932         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
4933         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
4934         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
4936 2009-04-01  Robert Millan  <rmh@aybabtu.com>
4938         Reapply fix from 2008-07-28 which was accidentally reverted; also
4939         perform the same fix to a similar check in same function.
4941         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4942         with the same number are found, just use issue a warning with
4943         grub_dprintf(), as this error has been reported to be non-fatal.
4945 2009-03-31  Pavel Roskin  <proski@gnu.org>
4947         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
4948         for cross-compilation.
4950 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4952         Fix i386-ieee1275 build.
4954         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
4955         Remove declaration.
4957 2009-03-30  Pavel Roskin  <proski@gnu.org>
4959         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
4960         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
4961         zero-terminated, rely only on the strlen value.  Fix comparison
4962         of strings differing in length.
4964 2009-03-30  Robert Millan  <rmh@aybabtu.com>
4966         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
4967         checking for abi version.  Improve error messages on BIOS to notify
4968         user about `linux16' command.
4970 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
4972         Leak fixes
4974         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
4975         in case of collision
4976         * disk/scsi.c (grub_scsi_open): free scsi in case of error
4978 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4980         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
4981         set `vid_mode' accordingly.
4982         (grub_linux_boot): Process `vid_mode' and set video mode.
4984 2009-03-29  Robert Millan  <rmh@aybabtu.com>
4986         * util/grub.d/10_linux.in (linux_entry): New function.
4987         Factorize generation of Linux boot entries.
4989 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
4991         Make the format of Environment Block plain text. The boot loader
4992         part is not tested well yet.
4994         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
4995         (buffer): Removed.
4996         (envblk): Likewise.
4997         (usage): Remove "info" and "clear". Add "unset". Update the
4998         description of "set", as this does not delete variables any
4999         longer.
5000         (create_envblk_file): Complete rewrite.
5001         (open_envblk_file): Likewise.
5002         (cmd_info): Removed.
5003         (cmd_list): Likewise.
5004         (cmd_set): Likewise.
5005         (cmd_clear): Likewise.
5006         (list_variables): New function.
5007         (write_envblk): Likewise.
5008         (set_variables): Likewise.
5009         (unset_variables): Likewise.
5010         (main): Complete rewrite.
5012         * commands/loadenv.c (buffer): Removed.
5013         (envblk): Likewise.
5014         (open_envblk_file): New function.
5015         (read_envblk_file): Complete rewrite.
5016         (grub_cmd_load_env): Likewise.
5017         (grub_cmd_list_env): Likewise.
5018         (struct blocklist): New struct.
5019         (free_blocklists): New function.
5020         (check_blocklists): Likewise.
5021         (write_blocklists): Likewise.
5022         (grub_cmd_save_env): Complete rewrite.
5024         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
5025         a plain text signature.
5026         (GRUB_ENVBLK_MAXLEN): Removed.
5027         (struct grub_envblk): Complete rewrite.
5028         (grub_envblk_find): Removed.
5029         (grub_envblk_insert): Likewise.
5030         (grub_envblk_open): New prototype.
5031         (grub_envblk_set): Likewise.
5032         (grub_envblk_delete): Put const to VALUE.
5033         (grub_envblk_iterate): Put const to NAME and VALUE.
5034         (grub_envblk_close): New prototype.
5035         (grub_envblk_buffer): New inline function.
5036         (grub_envblk_size): Likewise.
5038         * lib/envblk.c: Include grub/mm.h.
5039         (grub_env_find): Removed.
5040         (grub_envblk_open): New function.
5041         (grub_envblk_close): Likewise.
5042         (escaped_value_len): Likewise.
5043         (find_next_line): Likewise.
5044         (grub_envblk_insert): Removed.
5045         (grub_envblk_set): New function.
5046         (grub_envblk_delete): Complete rewrite.
5047         (grub_envblk_iterate): Likewise.
5049 2009-03-28  Robert Millan  <rmh@aybabtu.com>
5051         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
5052         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
5053         variables.  Use 16-bit loader.
5054         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
5055         loader.
5056         * kern/i386/loader.S (grub_linux_boot): Rename to ...
5057         (grub_linux16_boot): ... this.  Update all users.
5058         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
5059         (grub_linux_boot): ... this.  Update all users.
5061         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
5062         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
5063         commands to `linux16' and `initrd16'.
5064         (GRUB_MOD_FINI(linux)): Rename to ...
5065         (GRUB_MOD_FINI(linux16)): ... this.
5067 2009-03-24  Pavel Roskin  <proski@gnu.org>
5069         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
5070         not just for compilation.
5072 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
5074         Move multiboot helper out of kernel
5076         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
5077         `loader/i386/multiboot_helper.S'.
5078         * conf/i386-coreboot.rmk: Likewise
5079         * conf/i386-ieee1275.rmk: Likewise
5081         * kern/i386/loader.S: Move multiboot helpers from here...
5082         * loader/i386/multiboot_helper.S: ...moved here
5083         * include/grub/i386/loader.h: Move declarations of multiboot
5084         helpers from here...
5085         * include/grub/i386/multiboot.h: ...moved here
5086         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
5088 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
5090         * kern/env.c (grub_env_context_open): Added an argument to specify
5091         whether a new context inherits exported variables from current
5092         one. This is useful when making a sandbox to interpret a config
5093         file.
5094         All callers updated.
5096         * include/grub/env.h (grub_env_context_open): Updated the prototype.
5098 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
5100         * kern/env.c (grub_env_context_close): Fix memory leaks.
5102 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
5104         * normal/main.c (grub_normal_execute): Added an argument
5105         BATCH to specify if an interactive interface should be provided
5106         after reading a config file.
5107         All callers updated.
5108         (read_command_list): Prevent being executed twice.
5109         (read_fs_list): Likewise.
5111         * include/grub/normal.h (grub_normal_execute): Updated the
5112         prototype.
5114 2009-03-22  Pavel Roskin  <proski@gno.org>
5116         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
5117         _start.
5118         * kern/i386/pc/startup.S: Likewise.
5119         * kern/i386/efi/startup.S: Likewise.
5120         * kern/i386/ieee1275/startup.S: Likewise.
5121         * kern/i386/coreboot/startup.S: Likewise.
5122         * kern/x86_64/efi/startup.S: Likewise.
5124         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
5125         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
5126         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
5128 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
5130         Bugfixes in multiboot for bugs uncovered by solaris kernel.
5132         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
5133         limit detection.
5134         Use vaddr of correct segment for entry_point.
5136 2009-03-21  Bean  <bean123ch@gmail.com>
5138         * commands/blocklist.c: Add include file <grub/command.h>, remove
5139         <grub/normal.h> and <grub/arg.h>.
5140         (grub_cmd_blocklist): Use the new command interface.
5141         (GRUB_MOD_INIT): Likewise.
5142         (GRUB_MOD_FINI): Likewise.
5143         * commands/boot.c: Likewise.
5144         * commands/cat.c: Likewise.
5145         * commands/cmp.c: Likewise.
5146         * commands/configfile.c: Likewise.
5147         * commands/crc.c: Likewise.
5148         * commands/echo.c: Likewise.
5149         * commands/halt.c: Likewise.
5150         * commands/handler.c: Likewise.
5151         * commands/hdparm.c: Likewise.
5152         * commands/help.c: Likewise.
5153         * commands/hexdump.c: Likewise.
5154         * commands/loadenv.c: Likewise.
5155         * commands/ls.c: Likewise.
5156         * commands/lsmmap.c: Likewise.
5157         * commands/lspci.c: Likewise.
5158         * commands/loadenv.c: Likewise.
5159         * commands/read.c: Likewise.
5160         * commands/reboot.c: Likewise.
5161         * commands/search.c: Likewise.
5162         * commands/sleep.c: Likewise.
5163         * commands/test.c: Likewise.
5164         * commands/usbtest.c: Likewise.
5165         * commands/videotest.c: Likewise.
5166         * commands/i386/cpuid.c: Likewise.
5167         * commands/i386/pc/halt.c: Likewise.
5168         * commands/i386/pc/play.c: Likewise.
5169         * commands/i386/pc/pxecmd.c: Likewise.
5170         * commands/i386/pc/vbeinfo.c: Likewise.
5171         * commands/i386/pc/vbetest.c: Likewise.
5172         * commands/ieee1275/suspend.c: Likewise.
5173         * disk/loopback.c: Likewise.
5174         * font/font_cmd.c: Likewise.
5175         * hello/hello.c: Likewise.
5176         * loader/efi/appleloader.c: Likewise.
5177         * loader/efi/chainloader.c: Likewise.
5178         * loader/i386/bsd.c: Likewise.
5179         * loader/i386/efi/linux.c: Likewise.
5180         * loader/i386/ieee1275/linux.c: Likewise.
5181         * loader/i386/linux.c: Likewise.
5182         * loader/i386/pc/chainloader.c: Likewise.
5183         * loader/i386/pc/linux.c: Likewise.
5184         * loader/powerpc/ieee1275/linux.c: Likewise.
5185         * loader/multiboot_loader.c: Likewise.
5186         * term/gfxterm.c: Likewise.
5187         * term/i386/pc/serial.c: Likewise.
5188         * term/terminfo.c: Likewise.
5190         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
5191         * term/i386/pc/vga.c: Likewise.
5192         * video/readers/jpeg.c: Likewise.
5193         * video/readers/png.c: Likewise.
5194         * video/readers/tga.c: Likewise.
5196         * util/grub-fstest (cmd_loopback): Removed.
5197         (cmd_blocklist): Likewise.
5198         (cmd_ls): Likewise.
5199         (grub_register_command): Likewise.
5200         (grub_unregister_command): Likewise.
5201         (execute_command): Use grub_command_find to locate command and execute
5202         it.
5204         * include/grub/efi/chainloader.h: Removed.
5205         * loader/efi/chainloader_normal.c: Likewise.
5206         * loader/i386/bsd_normal.c: Likewise.
5207         * loader/i386/pc/chainloader_normal.c: Likewise.
5208         * loader/i386/pc/multiboot_normal.c: Likewise.
5209         * loader/linux_normal.c: Likewise.
5210         * loader/multiboot_loader_normal.c: Likewise.
5211         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5213         * gencmdlist.sh: Scan new registration command grub_register_extcmd
5214         and grub_register_command_p1.
5216         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
5217         kern/command.c, lib/arg.c and commands/extcmd.c.
5218         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
5219         (minicmd_mod_SOURCES): New variable.
5220         (minicmd_mod_CFLAGS): Likewise.
5221         (minicmd_mod_LDFLAGS): Likewise.
5222         (extcmd_mod_SOURCES): Likewise.
5223         (extcmd_mod_CFLAGS): Likewise.
5224         (extcmd_mod_LDFLAGS): Likewise.
5225         (boot_mod_SOURCES): Removed.
5226         (boot_mod_CFLAGS): Likewise.
5227         (boot_mod_LDFLAGS): Likewise.
5229         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
5230         kern/corecmd.c.
5231         (kernel_img_HEADERS): Add command.h.
5232         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
5233         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
5234         and lib/arg.c.
5235         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
5236         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
5237         remove the corresponding normal mode command.
5238         (normal_mod_SOURCES): Remove normal/arg.c.
5239         * conf/i386-coreboot.rmk: Likewise.
5240         * conf/i386-efi.rmk: Likewise.
5241         * conf/i386-ieee1275.rmk: Likewise.
5242         * conf/powerpc-ieee1275.rmk: Likewise.
5243         * conf/x86_64-efi.rmk: Likewise.
5245         * include/grub/arg.h: Move from here ...
5246         * include/grub/lib/arg.h: ... to here.
5248         * normal/arg.c: Move from here ...
5249         * lib/arg.c: ... to here.
5251         * commands/extcmd.c: New file.
5252         * commands/minicmd.c: Likewise.
5253         * include/grub/command.h: Likewise.
5254         * include/grub/extcmd.h: Likewise.
5255         * kern/command.c: Likewise.
5256         * kern/corecmd.c: Likewise.
5258         * kern/list.c (grub_list_iterate): Return int instead of void.
5259         (grub_list_insert): New function.
5260         (grub_prio_list_insert): Likewise.
5262         * kern/rescue.c (grub_rescue_command): Removed.
5263         (grub_rescue_command_list): Likewise.
5264         (grub_rescue_register_command): Likewise.
5265         (grub_rescue_unregister_command): Likewise.
5266         (grub_rescue_cmd_boot): Move to minicmd.c
5267         (grub_rescue_cmd_help): Likewise.
5268         (grub_rescue_cmd_info): Likewise.
5269         (grub_rescue_cmd_boot): Likewise.
5270         (grub_rescue_cmd_testload): Likewise.
5271         (grub_rescue_cmd_dump): Likewise.
5272         (grub_rescue_cmd_rmmod): Likewise.
5273         (grub_rescue_cmd_lsmod): Likewise.
5274         (grub_rescue_cmd_exit): Likewise.
5275         (grub_rescue_print_devices): Moved to corecmd.c.
5276         (grub_rescue_print_files): Likewise.
5277         (grub_rescue_cmd_ls): Likewise.
5278         (grub_rescue_cmd_insmod): Likewise.
5279         (grub_rescue_cmd_set): Likewise.
5280         (grub_rescue_cmd_unset): Likewise.
5281         (attempt_normal_mode): Use grub_command_find to get normal module.
5282         (grub_enter_rescue_mode): Use grub_register_core_commands to register
5283         commands, remove grub_rescue_register_command calls.
5285         * normal/command.c (grub_register_command): Removed.
5286         (grub_unregister_command): Likewise.
5287         (grub_command_find): Likewise.
5288         (grub_iterate_commands): Likewise.
5289         (rescue_command): Likewise.
5290         (export_command): Moved to corecmd.c.
5291         (set_command): Removed.
5292         (unset_command): Likewise.
5293         (insmod_command): Likewise.
5294         (rmmod_command): Likewise.
5295         (lsmod_command): Likewise.
5296         (grub_command_init): Likewise.
5298         * normal/completion.c (iterate_command): Use cmd->prio to check for
5299         active command.
5300         (complete_arguments): Use grub_extcmd_t structure to find options.
5301         (grub_normal_do_completion): Change function grub_iterate_commands to
5302         grub_command_iterate.
5304         * normal/execute.c (grub_script_execute_cmd): No need to parse
5305         argument here.
5307         * normal/main.c (grub_dyncmd_dispatcher): New function.
5308         (read_command_list): Register unload commands as dyncmd.
5309         (grub_cmd_normal): Use new command interface, register rescue,
5310         unregister normal at entry, register normal, unregister rescue at exit.
5312         * include/grub/list.h (grub_list_test_t): New type.
5313         (grub_list_iterate): Return int instead of void.
5314         (grub_list_insert): New function.
5315         (GRUB_AS_NAMED_LIST_P): New macro.
5316         (GRUB_AS_PRIO_LIST): Likewise.
5317         (GRUB_AS_PRIO_LIST_P): Likewise.
5318         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
5319         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
5320         (grub_prio_list): New structure.
5321         (grub_prio_list_insert): New function.
5322         (grub_prio_list_remove): New inline function.
5324         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
5325         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
5326         (GRUB_COMMAND_FLAG_MENU): Likewise.
5327         (GRUB_COMMAND_FLAG_BOTH): Likewise.
5328         (GRUB_COMMAND_FLAG_TITLE): Likewise.
5329         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
5330         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
5331         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
5332         (grub_command): Likewise.
5333         (grub_register_command): Likewise.
5334         (grub_command_find): Likewise.
5335         (grub_iterate_commands): Likewise.
5336         (grub_command_init): Likewise.
5337         (grub_arg_parse): Likewise.
5338         (grub_arg_show_help): Likewise.
5340         * include/grub/rescue.h (grub_rescue_register_command): Removed.
5341         (grub_rescue_unregister_command): Likewise.
5343         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
5344         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
5345         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
5347         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
5348         grub_rescue_cmd_initrd.
5349         * include/grub/i386/loader.h: Likewise.
5350         * include/grub/x86_64/loader.h: Likewise.
5352         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
5354 2009-03-21  Bean  <bean123ch@gmail.com>
5356         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
5357         instead of stat in mingw environment.
5359         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
5361         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
5363         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
5364         AC_CONFIG_LINKS.
5366 2009-03-21  Bean  <bean123ch@gmail.com>
5368         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
5369         out of range error.
5371 2009-03-18  Michel Dänzer  <michel@daenzer.net>
5373         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
5374         checking inode flags for EXT4_EXTENTS_FLAG.
5376 2009-03-18  Robert Millan  <rmh@aybabtu.com>
5378         * loader/i386/linux.c: Include `<grub/video.h>' and
5379         `<grub/i386/pc/vbe.h>'..
5380         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
5381         (grub_linux32_boot): Attempt to configure video settings with
5382         grub_linux_setup_video().
5383         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
5384         to avoid grub_console_fini() which would step out of graphical mode
5385         unconditionally.
5387 2009-03-14  Robert Millan  <rmh@aybabtu.com>
5389         Fix build on powerpc.
5390         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
5392 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
5394         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
5395         background image command.
5397 2009-03-12  Colin D Bennett  <colin@gibibit.com>
5399         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
5400         (grub_gfxterm_putchar): Extract pairs of identical calls to
5401         draw_cursor out of conditional blocks.
5403 2009-03-11  Pavel Roskin  <proski@gnu.org>
5405         * fs/hfs.c (grub_hfs_strncasecmp): New function.
5406         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
5408 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5410         * loader/i386/multiboot_elfxx.c
5411         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
5413 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
5415         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
5416         `kern/handler.c'.
5418 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5420         * loader/i386/multiboot.c (code_size): New variable.
5421         (grub_multiboot): Define offsets by adding to `code_size' rather
5422         than subtracting from `grub_multiboot_payload_size'.  Provide
5423         4-byte alignment to MBI and others by increasing
5424         `boot_loader_name_length' appropriately.
5426         * loader/i386/multiboot_elfxx.c
5427         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
5429 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
5431         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
5432         `fs/ext2.c'.
5434 2009-03-08  Robert Millan  <rmh@aybabtu.com>
5436         Make loader/i386/linux.c usable on i386-pc again.
5438         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
5439         memory to heap.
5440         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
5441         `#error' stanza.
5443 2009-03-07  Bean  <bean123ch@gmail.com>
5445         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
5446         allocation.
5448 2009-03-06  Robert Millan  <rmh@aybabtu.com>
5450         Fix display issue on terminals with screen size other than 80x25
5451         (e.g. gfxterm with resolution higher than 640x480).
5453         * normal/main.c (grub_normal_init_page): Display title text in a
5454         position relative to the center of the terminal instead of relying
5455         on a hardcoded offset.
5457 2009-03-04  Robert Millan  <rmh@aybabtu.com>
5459         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
5460         installed.
5462         * Makefile.in (host_kernel): New variable.
5463         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
5464         scripts instead of just the windows one.
5465         * configure.ac: Initialize and AC_SUBST `host_kernel'.
5467 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5469         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
5470         `kern/handler.c'.
5471         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5472         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5473         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5474         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5475         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5476         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5478 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5480         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
5481         or if there's no space for the disk label and print the partition number on a
5482         invalid magic.
5484 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5486         * util/misc.c: Include <time.h>.
5487         (grub_millisleep): New function.
5489 2009-03-04  Bean  <bean123ch@gmail.com>
5491         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
5492         another option -mno-red-zone.
5494         * commands/handler.c: Change module description.
5496         * kern/handler.c: Add missing space at the end of description line.
5498         * kern/list.c: Likewise.
5500 2009-03-03  Robert Millan  <rmh@aybabtu.com>
5502         Move more components to the relocation area, and fix mbi pointer
5503         handling to use the destination rather than the origin (thanks to
5504         Vladimir Serbinenko for spotting).
5506         * loader/i386/multiboot.c (mbi_dest): New variable.
5507         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
5508         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
5509         relocation area.
5511 2009-03-01  Bean  <bean123ch@gmail.com>
5513         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
5514         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
5515         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
5516         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
5518         * loader/i386/efi/linux.c (acpi_guid): New variable.
5519         (acpi_guid): Likewise.
5520         (EBDA_SEG_ADDR): New constant.
5521         (LOW_MEM_ADDR): Likewise.
5522         (FAKE_EBDA_SEG): Likewise.
5523         (fake_bios_data): New function.
5524         (grub_linux_boot): Call fake_bios_data.
5526 2009-03-01  Bean  <bean123ch@gmail.com>
5528         * commands/terminal.c: Removed.
5530         * commands/handler.c: New file.
5532         * include/grub/list.h: Likewise.
5534         * include/grub/handler.h: Likewise.
5536         * kern/list.c: Likewise.
5538         * kern/handler.c: Likewise.
5540         * kern/term.h: Include header file <grub/handler.h>.
5541         (grub_term_input): Move next field to the beginning.
5542         (grub_term_output): Likewise.
5543         (grub_term_input_class): New variable.
5544         (grub_term_output_class): Likewise.
5545         (grub_term_register_input): Changed to inline function.
5546         (grub_term_register_output): Likewise.
5547         (grub_term_unregister_input): Likewise.
5548         (grub_term_unregister_output): Likewise.
5549         (grub_term_set_current_input): Likewise.
5550         (grub_term_set_current_output): Likewise.
5551         (grub_term_get_current_input): Likewise.
5552         (grub_term_get_current_output): Likewise.
5553         (grub_term_iterate_input): Removed.
5554         (grub_term_iterate_output): Likewise.
5556         * kern/term.c (grub_term_list_input): Removed.
5557         (grub_term_list_output): Likewise.
5558         (grub_term_input_class): New variable.
5559         (grub_term_output_class): Likewise.
5560         (grub_cur_term_input): Change variable as macro.
5561         (grub_cur_term_output): Likewise.
5562         (grub_term_register_input): Removed.
5563         (grub_term_register_output): Likewise.
5564         (grub_term_unregister_input): Likewise.
5565         (grub_term_unregister_output): Likewise.
5566         (grub_term_set_current_input): Likewise.
5567         (grub_term_set_current_output): Likewise.
5568         (grub_term_iterate_input): Likewise.
5569         (grub_term_iterate_output): Likewise.
5570         (grub_term_get_current_input): Likewise.
5571         (grub_term_get_current_output): Likewise.
5573         * util/grub-editenv.c: Include header file <grub/handler.h>.
5574         (grub_term_get_current_input): Removed.
5575         (grub_term_get_current_output): Likewise.
5576         (grub_term_input_class): New variable.
5577         (grub_term_output_class): Likewise.
5579         * util/grub-fstest.c (grub_term_get_current_input): Removed.
5580         (grub_term_get_current_output): Likewise.
5581         (grub_term_input_class): New variable.
5582         (grub_term_output_class): Likewise.
5584         * util/grub-probe.c (grub_term_get_current_input): Removed.
5585         (grub_term_get_current_output): Likewise.
5586         (grub_term_input_class): New variable.
5587         (grub_term_output_class): Likewise.
5589         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
5590         (grub_term_get_current_output): Likewise.
5591         (grub_term_input_class): New variable.
5592         (grub_term_output_class): Likewise.
5594         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
5595         (terminal_mod_SOURCES): Likewise.
5596         (terminal_mod_CFLAGS): Likewise.
5597         (terminal_mod_LDFLAGS): Likewise.
5599         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
5600         handler.c.
5601         (kernel_img_SOURCES): Add list.c and handler.c.
5602         (kernel_img_HEADERS): Add list.h and handler.h.
5604         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5605         handler.c.
5606         (kernel_mod_SOURCES): Add list.c and handler.c.
5607         (kernel_mod_HEADERS): Add list.h and handler.h.
5609         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
5610         handler.c.
5611         (kernel_elf_SOURCES): Add list.c and handler.c.
5612         (kernel_elf_HEADERS): Add list.h and handler.h.
5614         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5615         handler.c.
5616         (kernel_elf_SOURCES): Add list.c and handler.c.
5617         (kernel_elf_HEADERS): Add list.h and handler.h.
5619         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5620         handler.c.
5621         (kernel_mod_SOURCES): Add list.c and handler.c.
5622         (kernel_mod_HEADERS): Add list.h and handler.h.
5624         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5625         handler.c.
5626         (kernel_elf_SOURCES): Add list.c and handler.c.
5627         (kernel_elf_HEADERS): Add list.h and handler.h.
5629 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5631         Factorize elf32 / elf64 code in Multiboot loader.  This will
5632         prevent it from getting out of sync again.
5634         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
5635         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
5636         grub_multiboot_load_elf64): Move from here ...
5637         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
5638         grub_multiboot_load_elf): ... to here (new file).
5640 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5642         * util/grub.d/10_linux.in: Rename "single-user mode" to
5643         "recovery mode".
5645 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
5647         Don't leak in SCSI code.
5648         * disk/scsi.c (grub_scsi_close): free `scsi'.
5650 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5652         * loader/i386/pc/multiboot.c: Move from here ...
5653         * loader/i386/multiboot.c: ... to here.  Update all users.
5655 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5657         Patch from Alexandre Bique <bique.alexandre@gmail.com>
5658         * util/i386/pc/grub-setup.c (setup): Fix directory path.
5660 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
5662         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
5663         b-tree.
5665 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5667         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
5668         `0x' qualifier as 0 when base is specified as parameter).
5670 2009-02-24  Bean  <bean123ch@gmail.com>
5672         * configure.ac: Check for -mcmodel=large in x86_64 target.
5674         * include/grub/efi/api.h (efi_call_10): New macro.
5675         (efi_wrap_10): New function.
5677         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
5678         (GRUB_PE32_REL_BASED_HIGH): Likewise.
5679         (GRUB_PE32_REL_BASED_LOW): Likewise.
5680         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
5681         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
5682         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
5683         (GRUB_PE32_REL_BASED_SECTION): Likewise.
5684         (GRUB_PE32_REL_BASED_REL): Likewise.
5685         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
5686         (GRUB_PE32_REL_BASED_DIR64): Likewise.
5687         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
5689         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
5690         issue.
5692         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
5693         (efi_wrap_10): New function.
5695         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
5697         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
5698         MB/MBP model (NV chipset).
5699         (devdata_devs): Add devpath_5 to the list.
5701         * load/i386/efi/linux.c (video_base): Remove variable.
5702         (RGB_MASK): New macro.
5703         (RGB_MAGIC): Likewise.
5704         (LINE_MIN): Likewise.
5705         (LINE_MAX): Likewise.
5706         (FBTEST_STEP): Likewise.
5707         (FBTEST_COUNT): Likewise.
5708         (fb_list): New variable.
5709         (grub_find_video_card): Remove function.
5710         (find_framebuf): New function.
5711         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
5712         line length.
5714         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
5715         problem for x86_64.
5717 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
5719         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
5721         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
5722         coding tool name.
5724 2009-02-22  Robert Millan  <rmh@aybabtu.com>
5726         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
5727         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
5728         in our relocation, instead of using it directly from heap.  Also
5729         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
5731 2009-02-21  Robert Millan  <rmh@aybabtu.com>
5733         Implement USB keyboard support (based on patch by Marco Gerards)
5735         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
5736         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
5737         (usb_keyboard_mod_LDFLAGS): New variables.
5739         * term/usb_keyboard.c: New file.
5741 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
5743         Corrected wrong declaration
5745         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
5747 2009-02-14  Christian Franke  <franke@computer.org>
5749         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
5750         (grub_lspci_iter): Print class code and programming interface byte.
5752 2009-02-14  Christian Franke  <franke@computer.org>
5754         * gendistlist.sh: Ignore `.svn' directories.
5756 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
5758         * fs/fat.c: Add 2009 to Copyright line.
5760 2009-02-14  Christian Franke  <franke@computer.org>
5762         * commands/hdparm.c: New file.  Provides `hdparm' command
5763         which sends ATA commands via grub_disk_ata_pass_through ().
5765         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
5767         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
5768         and <grub/cpu/io.h> to include/grub/ata.h.
5769         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
5770         (GRUB_CDROM_SECTOR_SIZE): Remove.
5771         (GRUB_ATA_*): Move to include/grub/ata.h.
5772         (GRUB_ATAPI_*): Likewise.
5773         (enum grub_ata_commands): Likewise.
5774         (enum grub_ata_timeout_milliseconds): Likewise.
5775         (struct grub_ata_device): Likewise.
5776         (grub_ata_regset): Likewise.
5777         (grub_ata_regget): Likewise.
5778         (grub_ata_regset2): Likewise.
5779         (grub_ata_regget2): Likewise.
5780         (grub_ata_check_ready): Likewise.
5781         (grub_ata_wait_not_busy): Remove static, exported in
5782         include/grub/ata.h.
5783         (grub_ata_wait_drq): Likewise.
5784         (grub_ata_pio_read): Likewise.
5786         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
5787         function for hdparm.mod.
5789         * include/grub/ata.h: New file, contains declarations from
5790         disk/ata.c.
5791         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
5793         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
5794         (grub_disk_ata_pass_through): New exported variable.
5796         * kern/disk.c (grub_disk_ata_pass_through): New variable.
5798 2009-02-13  Colin D Bennett  <colin@gibibit.com>
5800         Support multiple fallback entries, and provide an API to support
5801         executing default+fallback menu entries.  Renamed the `terminal' menu
5802         viewer to `text'.
5804         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
5805         variable declaration.
5806         (grub_menu_execute_callback): New structure declaration.
5807         (grub_menu_execute_callback_t): New typedef.
5808         (grub_menu_execute_with_fallback): New function declaration.
5809         (grub_menu_get_entry): Likewise.
5810         (grub_menu_get_timeout): Likewise.
5811         (grub_menu_set_timeout): Likewise.
5813         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
5815         * normal/menu.c (grub_wait_after_message): Moved to
5816         `normal/menu_text.c'.
5817         (draw_border): Likewise.
5818         (print_message): Likewise.
5819         (print_entry): Likewise.
5820         (print_entries): Likewise.
5821         (grub_menu_init_page): Likewise.
5822         (get_entry_number): Likewise.
5823         (print_timeout): Likewise.
5824         (run_menu): Likewise.
5825         (grub_menu_execute_entry): Likewise.
5826         (show_text_menu): Likewise.
5827         (get_and_remove_first_entry_number): New function.
5828         (grub_menu_execute_with_fallback): Likewise.
5829         (get_entry): Renamed to ...
5830         (grub_menu_get_entry): .. this and made it global.
5831         (get_timeout): Renamed to ...
5832         (grub_menu_get_timeout): ... this and made it global.
5833         (set_timeout): Renamed to ...
5834         (grub_menu_set_timeout): ... this and made it global.
5835         (grub_normal_terminal_menu_viewer): Renamed to ...
5836         (grub_normal_text_menu_viewer): ... this.
5838         * normal/menu_text.c: New file.  Extracted text-menu-specific code
5839         from normal/menu.c.
5841         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
5842         (normal_mod_SOURCES): Likewise.
5844         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5845         (normal_mod_SOURCES): Likewise.
5847         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5848         (normal_mod_SOURCES): Likewise.
5850         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
5851         (normal_mod_SOURCES): Likewise.
5853         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5854         (normal_mod_SOURCES): Likewise.
5856         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5857         (normal_mod_SOURCES): Likewise.
5859         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5860         (normal_mod_SOURCES): Likewise.
5862 2009-02-11  Robert Millan  <rmh@aybabtu.com>
5864         * util/grub.d/00_header.in: Update old reference to `font' command.
5866 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
5868         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
5870         Based on patch from Javier Martín.
5872 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5874         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
5875         to avoid false positives with FAT.
5876         (grub_fstest_SOURCES): Likewise.
5877         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5878         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5879         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5880         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5881         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5882         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5884 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
5886         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
5887         bpb.version_specific.fat12_or_fat16.fstype and
5888         bpb.version_specific.fat32.fstype.
5890 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5892         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
5894 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5896         * Makefile.in (host_os, host_cpu): New variables.
5897         (target_os): Remove.  Update all users.
5899 2009-02-08  Marco Gerards  <marco@gnu.org>
5901         * Makefile.in (enable_grub_emu_usb): New variable.
5902         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
5903         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
5904         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
5905         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
5906         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
5907         `usbtest.mod' and `usbms.mod'.
5908         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
5909         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
5910         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
5911         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
5912         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
5913         variables.
5915         * disk/usbms.c: New file.
5917         * include/grub/usb.h: Likewise.
5919         * include/grub/usbtrans.h: Likewise.
5921         * include/grub/usbdesc.h: Likewise.
5923         * bus/usb/usbtrans.c: Likewise.
5925         * bus/usb/ohci.c: Likewise.
5927         * bus/usb/uhci.c: Likewise.
5929         * bus/usb/usbhub.c: Likewise.
5931         * bus/usb/usb.c: Likewise.
5933         * commands/usbtest.c: Likewise.
5935         * util/usb.c: Likewise.
5937         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
5939         * configure.ac: Test for libusb presence.
5941         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
5943 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
5945         * kern/mm.c: Add more comments.
5947 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5949         Patch from Javier Martín.
5950         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
5951         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
5953 2009-02-08  Robert Millan  <rmh@aybabtu.com>
5955         * fs/cpio.c: Split tar functionality to ...
5956         * fs/tar.c: ... here (new file).  Update all users.
5958 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5960         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
5961         backward-incompatible features.
5963         Based on patch from Javier Martín, with some adjustments.
5965 2009-02-07  Michael Scherer  <misc@mandriva.org>
5967         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
5969 2009-02-07  Robert Millan  <rmh@aybabtu.com>
5971         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
5972         position of `disk/lvm.c' to ensure grub_init_all() always picks it
5973         after the RAID stuff.
5975 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
5977         Fixes problem when running vbetest command as reported by
5978         Vladimir Serbinenko <phcoder@gmail.com>.
5980         * (grub_vbe_set_video_mode): Fixed problem with text modes.
5982 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
5984         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
5985         /dev/md/NpN style mdraid devices.
5987 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5989         * util/unifont2pff.rb: Remove.
5991 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5993         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
5994         `#'.
5996 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
5998         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
5999         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6000         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6001         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6002         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6003         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6004         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6006 2009-02-02  Christian Franke  <franke@computer.org>
6008         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
6010 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
6012         * INSTALL: Note that we now require at least autoconf 2.59 and
6013         that LZO is optional.
6015 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
6017         Base on patch on bug #24154 created by Tomas Tintera
6018         <trosos@seznam.cz>.
6020         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
6022 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
6024         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
6025         <bero@arklinux.org>.
6027         * normal/parser.y (script_init): Add missing semicolon.
6029 2009-01-31  Colin D Bennett  <colin@gibibit.com>
6031         * normal/main.c: Add include to grub/menu_viewer.h.
6032         (free_menu_entry_classes): Added.
6033         (grub_normal_menu_addentry): Added class property handling.
6034         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
6035         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
6037         * normal/menu_viewer.c: New file.
6039         * normal/menu.c (run_menu_entry): Renamed to ...
6040         (grub_menu_execute_entry): ... this and made it as global.
6041         (grub_menu_run): Renamed to ...
6042         (show_text_menu): ... this and made it local.
6043         (show_text_menu): Adapt to new function names.
6044         (grub_normal_terminal_menu_viewer): New global variable.
6046         * include/grub/menu.h: New file.
6048         * include/grub/menu_viewer.h: New file.
6050         * include/grub/normal.h: Added include to grub/menu.h.
6051         (grub_menu_entry): Moved to include/grub/menu.h.
6052         (grub_menu_entry_t): Likewise.
6053         (grub_menu): Likewise.
6054         (grub_menu_t): Likewise.
6055         (grub_normal_terminal_menu_viewer): Added.
6056         (grub_menu_execute_entry): Likewise.
6057         (grub_menu_run): Removed.
6059         * DISTLIST: Added include/grub/menu.h.
6060         Added include/grub/menu_viewer.h.
6061         Added normal/menu_viewer.c.
6063 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
6065         * normal/execute.c (grub_script_execute_menuentry): Changed to use
6066         arglist for menutitle arguments.
6068         * normal/main.c (grub_normal_menu_addentry): Likewise.
6070         * normal/parser.y (menuentry): Likewise.
6072         * normal/script.c (grub_script_create_cmdmenu): Likewise.
6074         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
6075         (grub_script_create_cmdmenu): Likewise.
6077         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
6079         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
6080         changes.
6082         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
6084         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
6086         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
6088         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6090         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6092         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6094 2009-01-30  Christian Franke  <franke@computer.org>
6096         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
6097         in option help text.
6099 2009-01-27  Pavel Roskin  <proski@gnu.org>
6101         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
6103 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
6105         * commands/lsmmap.c: Add include to grub/machine/memory.h.
6107         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
6109         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
6110         unregister function.
6112 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
6114         * disk/scsi.c (grub_scsi_read): Fix sign problem.
6116         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
6118         * util/grub-mkfont.c (usage): Fix typo.
6120         * util/elf/grub-mkimage.c (load_modules): Fix warning.
6122 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
6124         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
6126         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
6128         * kern/misc.c (grub_strcasecmp): New function.
6129         (grub_strcasecmp): Use grub_size_t instead of int for length.
6130         Fix return value.
6131         * include/grub/misc.h: Update function prototypes.
6133 2009-01-26  Robert Millan  <rmh@aybabtu.com>
6135         * configure.ac: Fix cross-compilation check.
6137 2009-01-22  Christian Franke  <franke@computer.org>
6139         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
6140         (precision) digit string.  Allow `.format2' without `format1' (width).
6141         Limit input chars for `%s' output to `format2' if specified.  This is
6142         compatible with standard printf ().
6144 2009-01-22  Christian Franke  <franke@computer.org>
6146         * disk/ata.c (grub_ata_wait_status): Replace by ...
6147         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
6148         other status bits may be invalid while BSY is asserted.
6149         (grub_ata_check_ready): New function.
6150         (grub_ata_cmd): Removed.
6151         (grub_ata_wait_drq): New function.
6152         (grub_ata_strncpy): Remove inline.
6153         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
6154         and error check now done by grub_ata_wait_drq ().
6155         (grub_ata_pio_write): Likewise.
6156         (grub_atapi_identify): Set DEV before check for !BSY.  Use
6157         grub_ata_wait_drq () to wait for data.
6158         (grub_ata_device_initialize): Add status register check to
6159         detect missing SATA slave devices.  Add debug messages.
6160         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
6161         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
6162         transfer loop by grub_ata_pio_write ().
6163         (grub_ata_identify): Set DEV before check for !BSY. Use
6164         grub_ata_wait_drq () to wait for data.
6165         (grub_ata_setaddress): Set DEV before check for !BSY.
6166         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
6167         read/write in one loop.  Fix invalid command on write.  Fix incomplete
6168         command on (size % batch) == 0.  Add missing error check after write of
6169         last block.  Add debug messages.
6170         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
6172 2009-01-19  Christian Franke  <franke@computer.org>
6174         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
6175         (GRUB_ATAPI_IREASON_*): Likewise.
6176         (grub_ata_pio_write): Fix timeout error return.
6177         (grub_atapi_identify): Add grub_ata_wait () after cmd.
6178         (grub_atapi_wait_drq): New function.
6179         (grub_atapi_packet): New parameter `size'.
6180         Use grub_atapi_wait_drq () and direct write instead of
6181         grub_ata_pio_write ().
6182         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
6183         reads the number of bytes requested by the device for each DRQ
6184         assertion.
6185         (grub_atapi_write): Remove old implementation, return not
6186         implemented instead.
6188 2009-01-19  Christian Franke  <franke@computer.org>
6190         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
6191         of 512 to calculate data size.
6192         (grub_scsi_read12): Likewise.
6193         (grub_scsi_write10): Likewise.
6194         (grub_scsi_write12): Likewise.
6195         (grub_scsi_read): Adjust size according to blocksize.
6196         Add checks for invalid blocksize and unaligned transfer.
6198 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
6200         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
6202         * term/gfxterm.c (write_char): Fix background rendering for wide
6203         width glyphs.
6205 2009-01-19  Robert Millan  <rmh@aybabtu.com>
6207         * config.guess: Update to latest version from config git.
6208         * config.sub: Likewise.
6210 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
6212         * Makefile.in: Change font compilation to use new grub-mkfont instead
6213         of java version.
6215         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
6216         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6217         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6218         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6219         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6220         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6221         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6222         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6223         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6225 2009-01-16  Christian Franke  <franke@computer.org>
6227         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
6228         (enum grub_ata_timeout_milliseconds): New enum.
6229         (grub_ata_wait_status): Add parameter milliseconds.
6230         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
6231         recovery from timed-out commands.
6232         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
6233         return grub_errno instead of REG_ERROR.
6234         (grub_ata_pio_write): Add parameter milliseconds.
6235         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
6236         Pass milliseconds to grub_ata_wait_status () and
6237         grub_ata_pio_read ().
6238         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
6239         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
6240         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
6241         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
6242         It is not suitable for device detection, because DEV bit is ignored,
6243         the command may run too long, and not all devices set the signature
6244         properly.
6245         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
6246         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
6247         Fix device selection, DEV bit must be set first to address the registers
6248         of the correct device.
6249         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
6250         grub_ata_pio_read/write ().
6251         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
6252         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
6254 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
6256         * util/grub-editenv.c (main): Use fseeko(), not fseek().
6258 2009-01-13  Bean  <bean123ch@gmail.com>
6260         * util/grub-mkfont.c (write_font): forget to remove some debug code.
6262 2009-01-13  Bean  <bean123ch@gmail.com>
6264         * Makefile.in: (enable_grub_mkfont): New variable.
6265         (freetype_cflags): Likewise.
6266         (freetype_libs): Likewise.
6268         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
6269         (grub_mkfont_SOURCES): New variable.
6270         (grub_mkfont_CFLAGS): Likewise.
6271         (grub_mkfont_LDFLAGS): Likewise.
6273         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
6274         library if `--enable-grub-mkfont' is requested.
6275         (enable_grub_mkfont): New variable.
6276         (freetype_cflags): Likewise.
6277         (freetype_libs): Likewise.
6279         * util/grub-mkfont.c: New file.
6281 2009-01-12  Christian Franke  <franke@computer.org>
6283         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
6284         mode check.  Fix setting of compat_use[].
6286 2009-01-10  Robert Millan  <rmh@aybabtu.com>
6288         Update a few copyright years which we forgot to do in 2008 (only for
6289         files whose changes made in 2008 were copyright-significant)
6291         * Makefile.in: Add 2008 to Copyright line.
6292         * disk/ieee1275/ofdisk.c: Likewise.
6293         * disk/efi/efidisk.c: Likewise.
6294         * kern/dl.c: Likewise.
6295         * kern/sparc64/ieee1275/init.c: Likewise.
6296         * kern/mm.c: Likewise.
6297         * kern/efi/mm.c: Likewise.
6298         * boot/i386/pc/boot.S: Likewise.
6299         * genfslist.sh: Likewise.
6300         * fs/iso9660.c: Likewise.
6301         * fs/hfs.c: Likewise.
6302         * fs/jfs.c: Likewise.
6303         * fs/minix.c: Likewise.
6304         * fs/ufs.c: Likewise.
6305         * gensymlist.sh.in: Likewise.
6306         * genkernsyms.sh.in: Likewise.
6307         * include/grub/misc.h: Likewise.
6308         * include/grub/types.h: Likewise.
6309         * include/grub/symbol.h: Likewise.
6310         * include/grub/elf.h: Likewise.
6311         * include/grub/kernel.h: Likewise.
6312         * include/grub/disk.h: Likewise.
6313         * include/grub/dl.h: Likewise.
6314         * include/grub/i386/linux.h: Likewise.
6315         * include/grub/i386/pc/biosdisk.h: Likewise.
6316         * include/grub/efi/api.h: Likewise.
6317         * include/grub/efi/pe32.h: Likewise.
6318         * include/grub/util/misc.h: Likewise.
6319         * normal/execute.c: Likewise.
6320         * normal/arg.c: Likewise.
6321         * normal/completion.c: Likewise.
6322         * normal/lexer.c: Likewise.
6323         * normal/parser.y: Likewise.
6324         * normal/misc.c: Likewise.
6325         * commands/i386/pc/vbeinfo.c: Likewise.
6326         * commands/hexdump.c: Likewise.
6327         * commands/terminal.c: Likewise.
6328         * commands/ls.c: Likewise.
6329         * commands/help.c: Likewise.
6330         * partmap/pc.c: Likewise.
6331         * loader/efi/chainloader.c: Likewise.
6332         * loader/multiboot_loader.c: Likewise.
6333         * loader/i386/pc/multiboot2.c: Likewise.
6334         * term/efi/console.c: Likewise.
6335         * term/i386/pc/serial.c: Likewise.
6336         * util/lvm.c: Likewise.
6337         * util/console.c: Likewise.
6338         * util/i386/efi/grub-mkimage.c: Likewise.
6339         * util/raid.c: Likewise.
6341 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
6343         * commands/videotest.c: Removed include to grub/machine/memory.h.
6345         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
6346         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
6347         (video_mod_SOURCES): Removed.
6348         (video_mod_CFLAGS): Likewise.
6349         (video_mod_LDFLAGS): Likewise.
6350         (gfxterm_mod_SOURCES): Likewise.
6351         (gfxterm_mod_CFLAGS): Likewise.
6352         (gfxterm_mod_LDFLAGS): Likewise.
6353         (videotest_mod_SOURCES): Likewise.
6354         (videotest_mod_CFLAGS): Likewise.
6355         (videotest_mod_LDFLAGS): Likewise.
6356         (bitmap_mod_SOURCES): Likewise.
6357         (bitmap_mod_CFLAGS): Likewise.
6358         (bitmap_mod_LDFLAGS): Likewise.
6359         (tga_mod_SOURCES): Likewise.
6360         (tga_mod_CFLAGS): Likewise.
6361         (tga_mod_LDFLAGS): Likewise.
6362         (jpeg_mod_SOURCES): Likewise.
6363         (jpeg_mod_CFLAGS): Likewise.
6364         (jpeg_mod_LDFLAGS): Likewise.
6365         (png_mod_SOURCES): Likewise.
6366         (png_mod_CFLAGS): Likewise.
6367         (png_mod_LDFLAGS): Likewise.
6369         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
6370         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
6371         (video_mod_SOURCES): Added.
6372         (video_mod_CFLAGS): Likewise.
6373         (video_mod_LDFLAGS): Likewise.
6374         (videotest_mod_SOURCES): Likewise.
6375         (videotest_mod_CFLAGS): Likewise.
6376         (videotest_mod_LDFLAGS): Likewise.
6377         (bitmap_mod_SOURCES): Likewise.
6378         (bitmap_mod_CFLAGS): Likewise.
6379         (bitmap_mod_LDFLAGS): Likewise.
6380         (tga_mod_SOURCES): Likewise.
6381         (tga_mod_CFLAGS): Likewise.
6382         (tga_mod_LDFLAGS): Likewise.
6383         (jpeg_mod_SOURCES): Likewise.
6384         (jpeg_mod_CFLAGS): Likewise.
6385         (jpeg_mod_LDFLAGS): Likewise.
6386         (png_mod_SOURCES): Likewise.
6387         (png_mod_CFLAGS): Likewise.
6388         (png_mod_LDFLAGS): Likewise.
6389         (gfxterm_mod_SOURCES): Likewise.
6390         (gfxterm_mod_CFLAGS): Likewise.
6391         (gfxterm_mod_LDFLAGS): Likewise.
6393         * term/gfxterm.c: Removed include to grub/machine/memory.h,
6394         grub/machine/console.h.
6396 2009-01-04  Jerone Young  <jerone@gmail.com>
6398         Make on screen instructions clearer
6400         Based on patch created by Jidanni <jidanni@jidanni.org>
6402         * normal/menu.c: print clearer instructions on the screen
6404 2009-01-02  Colin D Bennett  <colin@gibibit.com>
6406         New font engine.
6408         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
6409         build system and fixed gfxterm.c to work with different sized fonts.
6411         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
6413         * configure: Re-generated.
6415         * DISTLIST: Removed font/manager.c.
6416         Added font/font.c.
6417         Added font/font_cmd.c.
6419         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
6420         compilation.
6422         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
6424         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
6426         * kern/term.c: Changed users of grub_utf8_to_ucs4.
6428         * normal/menu.c: Likewise.
6430         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
6431         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
6433         * include/grub/font.h: Replaced with new file.
6435         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
6436         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
6437         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
6438         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
6439         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
6440         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
6441         fg_red, fg_green, fg_blue, fg_alpha.
6442         (grub_video_adapter): Removed blit_glyph.
6443         (grub_video_blit_glyph): Removed.
6445         * font/manager.c: Removed file.
6447         * font/font.c: New file.
6449         * font/font_cmd.c: Likewise.
6451         * video/video.c (grub_video_blit_glyph): Removed.
6453         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
6454         (grub_video_vbe_map_rgba): Likewise.
6455         (grub_video_vbe_unmap_color_int): Likewise.
6456         (grub_video_vbe_blit_glyph): Removed.
6457         (grub_video_vbe_adapter): Removed blit_glyph.
6459         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
6460         (get_pixel): Likewise.
6461         (set_pixel): Likewise.
6463         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
6465         * term/gfxterm.c: Adapted to new font engine.
6467         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
6469         * term/i386/pc/vga.c: Likewise.
6471         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
6473         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6475         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6477         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6479         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6481         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6483         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6485         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6487         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6489         * util/grub.d/00_header.in: Changed to use new loadfont command.
6491         * util/grub-mkconfig_lib.in: Changed font extension.
6493 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
6495         * util/getroot.c (grub_util_get_grub_dev): Add support for
6496         /dev/md/dNNpNN style partitionable mdraid devices.
6498 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
6500         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
6501         at a time limit of the PXE TFTP API correctly.
6502         (grub_pxefs_close): Likewise.
6504 2008-11-29  Robert Millan  <rmh@aybabtu.com>
6506         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
6507         grub_ata_device_initialize() calls.
6509 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
6511         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
6512         iteration failed.
6513         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
6515 2008-11-28  Robert Millan  <rmh@aybabtu.com>
6517         Fix build on powerpc-ieee1275.  Based on patch created by
6518         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
6519         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6520         `kern/ieee1275/mmap.c'.
6521         * include/grub/powerpc/ieee1275/memory.h: New file.
6523         Provide grub-install on coreboot.
6524         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
6525         (grub_install_SOURCES): New variable.
6526         * util/i386/pc/grub-install.in: Add a few condition checks to make it
6527         usable on coreboot.
6529 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
6531         * util/grub-fstest.c (grub_term_get_current_input): Change return type
6532         to `grub_term_input_t'.
6533         (grub_term_get_current_output): Change return type to
6534         `grub_term_output_t'.
6536 2008-11-22  Robert Millan  <rmh@aybabtu.com>
6538         Fix breakage on coreboot due to declaration mismatch.
6539         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
6540         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
6541         grub_vga_text_cls().
6543         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
6544         comments.  Avoid copying one more byte than necessary (just in case).
6546         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
6547         to 0x200000 (avoids trouble with some OFW implementations, and matches
6548         with the one in Yaboot).
6549         Reported by Manoel Abranches
6551 2008-11-20  Robert Millan  <rmh@aybabtu.com>
6553         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
6554         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
6556         * util/grub-mkconfig_lib.in (grub_warn): New function.
6557         (convert_system_path_to_grub_path): Use grub_warn() when issuing
6558         warnings, to obtain consistent formatting.
6559         * util/grub.d/00_header.in: Likewise.
6560         * util/update-grub_lib.in: Likewise.
6562         * loader/i386/linux.c (allocate_pages): Fix a warning.
6563         Move comment text to `#error' stanza.
6565         Harmonize ieee1275's grub_available_iterate() with the generic
6566         grub_machine_mmap_iterate() interface (fixes a recently-introduced
6567         build problem on i386-ieee1275):
6568         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
6569         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
6570         parameter `type'.  Update all users of this function.
6571         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6572         `kern/ieee1275/mmap.c'.
6573         * kern/ieee1275/init.c
6574         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
6575         with ...
6576         (grub_machine_mmap_iterate): ... this.
6577         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
6578         return type to `grub_err_t'.  Update all implementations of this
6579         function prototype.
6580         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
6581         Likewise.
6583         Add `lsmmap' command (lists firmware-provided memory map):
6584         * commands/lsmmap.c: New file.
6585         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
6586         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
6587         variables.
6588         * conf/powerpc-ieee1275.rmk: Likewise.
6589         * conf/i386-coreboot.rmk: Likewise.
6590         * conf/i386-ieee1275.rmk: Likewise.
6592 2008-11-19  Robert Millan  <rmh@aybabtu.com>
6594         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
6595         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
6596         constraints to initrd allocation (based on code from
6597         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
6598         for Linux to find it.
6600 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6602         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
6603         order to cope with duplicate slashes.
6605 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6607         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
6608         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
6609         don't want to mess with lower memory, because it is used in the Linux
6610         loader.
6612         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
6613         an appropriate place in lower memory, between 0x10000 and 0x90000,
6614         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
6615         is in our heap (probably as a result of it being corrupted during
6616         decompression).  Add #error instance with comment to explain why this
6617         loader isn't currently usable on PC/BIOS.
6619 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6621         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
6622         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
6624 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6626         Make loader/i386/linux.c buildable on i386-pc (although disabled).
6628         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
6629         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
6630         from here ...
6631         * include/grub/i386/pc/memory.h: ... to here.
6633 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6635         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
6636         split).
6638         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
6639         (grub_console_cur_color, grub_console_real_putchar)
6640         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6641         (grub_console_setcolorstate, grub_console_setcolor)
6642         (grub_console_getcolor): Move from here ...
6643         * include/grub/i386/vga_common.h: ... to here (new file).
6645         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
6646         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
6647         `<grub/i386/io.h>'.
6648         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
6649         `<grub/i386/vga_common.h>'.
6651 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6653         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
6654         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
6655         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
6656         variables.
6657         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6658         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
6660         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
6661         grub_console_init() with call to grub_vga_text_init().
6662         (grub_machine_fini): Replace call to
6663         grub_console_fini() with call to grub_vga_text_fini() and
6664         grub_at_keyboard_fini().
6666         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
6667         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6668         (grub_console_setcolorstate, grub_console_setcolor)
6669         (grub_console_getcolor): New function prototypes.
6671         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
6672         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
6673         (grub_vga_text_setcursor): Static-ize.
6674         (grub_vga_text_term): New structure.
6675         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
6677         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
6678         (grub_console_cur_color, grub_console_standard_color)
6679         (grub_console_normal_color, grub_console_highlight_color)
6680         (map_char, grub_console_putchar, grub_console_getcharwidth)
6681         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
6682         (grub_console_getcolor): Move from here ...
6683         * term/i386/vga_common.c: ... to here (same function names).
6685 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6687         Use newly-added Multiboot support in coreboot.
6689         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6690         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
6692         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
6693         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
6694         (codestart): Store the MBI in `startup_multiboot_info' when we're
6695         being loaded using Multiboot.
6697         * kern/i386/coreboot/init.c (grub_machine_init): Move
6698         grub_at_keyboard_init() call to beginning of function (useful for
6699         debugging).  Call grub_machine_mmap_init() before attempting to use
6700         grub_machine_mmap_iterate().
6701         (grub_lower_mem, grub_upper_mem): Move from here ...
6702         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
6703         here (new file).
6705         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
6706         function prototype.
6708 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6710         Fix a regression introduced by the at_keyboard.mod split.  Because
6711         some terminals are default on some platforms and non-default on
6712         others, the first terminal being registered determines which is
6713         going to be default.
6715         * kern/term.c (grub_term_register_input): If this is the first
6716         terminal being registered, set it as the current one.
6717         (grub_term_register_output): Likewise.
6719         * term/efi/console.c (grub_console_init): Do not call
6720         grub_term_set_current_output() or grub_term_set_current_input().
6721         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
6722         * term/i386/pc/console.c (grub_console_init): Likewise.
6723         (grub_console_fini): Do not call grub_term_set_current_input()
6724         (but leave grub_term_set_current_output() to restore text mode).
6726 2008-11-10  Robert Millan  <rmh@aybabtu.com>
6728         * util/grub.d/00_header.in: Add backward compatibility check for
6729         versions of terminal.mod that don't understand `terminal_input' or
6730         `terminal_output'.
6732 2008-11-09  Robert Millan  <rmh@aybabtu.com>
6734         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
6735         `terminal_input' / `terminal_output', not `terminal'.
6737 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6739         * Makefile.in (include_DATA): Fix srcdir=. assumption.
6740         (DISTCLEANFILES): Add `build_env.mk'.
6742 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6744         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
6745         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
6746         members.  Update all users.
6747         * util/console.c (grub_ncurses_term): Split in ...
6748         (grub_ncurses_term_input): ... this, and ...
6749         (grub_ncurses_term_output): ... this.  Update all users.
6750         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
6752 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6754         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
6755         (PKGDATA): Add $(pkgdata_SRCDIR).
6756         (pkglib_BUILDDIR): New variable.
6757         (pkgdata_SRCDIR): New variable.
6758         (build_env.mk): New target.
6759         (include_DATA): New variable.
6760         (install-local): Install $(include_DATA) files in $(includedir).
6762 2008-11-07  Pavel Roskin  <proski@gnu.org>
6764         * gendistlist.sh: Use C locale for sorting to ensure consistent
6765         output on all systems.
6767         * util/grub.d/00_header.in: Remove incorrect space before
6768         "serial".
6770 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6772         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
6773         per specification.
6774         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
6775         * loader/multiboot_loader.c (find_multi_boot2_header): New function
6776         (based on find_multi_boot1_header).
6777         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
6778         using find_multi_boot2_header(), and abort if neither Multiboot or
6779         Multiboot headers were found.
6781 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6783         Modularize at_keyboard.mod:
6785         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
6786         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
6787         (at_keyboard_mod_LDFLAGS): New variables.
6789         Actual terminal split:
6791         * include/grub/term.h (struct grub_term): Split in ...
6792         (struct grub_term_input): ... this, and ...
6793         (struct grub_term_output): ... this.  Update all users.
6794         (grub_term_set_current): Split in ...
6795         (grub_term_set_current_input): ... this, and ...
6796         (grub_term_set_current_output): ... this.
6797         (grub_term_get_current): Split in ...
6798         (grub_term_get_current_input): ... this, and ...
6799         (grub_term_get_current_output): ... this.
6800         (grub_term_register): Split in ...
6801         (grub_term_register_input): ... this, and ...
6802         (grub_term_register_output): ... this.
6803         (grub_term_unregister): Split in ...
6804         (grub_term_unregister_input): ... this, and ...
6805         (grub_term_unregister_output): ... this.
6806         (grub_term_iterate): Split in ...
6807         (grub_term_iterate_input): ... this, and ...
6808         (grub_term_iterate_output): ... this.
6810         * kern/term.c (grub_term_list): Split in ...
6811         (grub_term_list_input): ... this, and ...
6812         (grub_term_list_output): ... this.  Update all users.
6813         (grub_cur_term): Split in ...
6814         (grub_cur_term_input): ... this, and ...
6815         (grub_cur_term_output): ... this.  Update all users.
6816         (grub_term_set_current): Split in ...
6817         (grub_term_set_current_input): ... this, and ...
6818         (grub_term_set_current_output): ... this.
6819         (grub_term_get_current): Split in ...
6820         (grub_term_get_current_input): ... this, and ...
6821         (grub_term_get_current_output): ... this.
6822         (grub_term_register): Split in ...
6823         (grub_term_register_input): ... this, and ...
6824         (grub_term_register_output): ... this.
6825         (grub_term_unregister): Split in ...
6826         (grub_term_unregister_input): ... this, and ...
6827         (grub_term_unregister_output): ... this.
6828         (grub_term_iterate): Split in ...
6829         (grub_term_iterate_input): ... this, and ...
6830         (grub_term_iterate_output): ... this.
6832         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
6833         a check for input and one for output (and only attempt to get keys
6834         from user when input works).
6836         * util/grub-probe.c (grub_term_get_current): Split in ...
6837         (grub_term_get_current_input): ... this, and ...
6838         (grub_term_get_current_output): ... this.
6839         * util/grub-fstest.c: Likewise.
6840         * util/i386/pc/grub-setup.c: Likewise.
6841         * util/grub-editenv.c: Likewise.
6843         Portability adjustments:
6845         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
6846         `term/i386/pc/at_keyboard.c'.
6847         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
6848         grub_keyboard_controller_init() (now handled by terminal .init).
6849         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
6850         grub_at_keyboard_init().
6851         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
6852         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
6853         at_keyboard.mod via input terminal interface).
6854         * include/grub/i386/coreboot/console.h: Convert into a stub for
6855         `<grub/i386/pc/console.h>'.
6857         Migrate full terminals to new API:
6859         * term/efi/console.c (grub_console_term): Split into ...
6860         (grub_console_term_input): ... this, and ...
6861         (grub_console_term_output): ... this.  Update all users.
6862         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
6863         (grub_ofconsole_init): Split into ...
6864         (grub_ofconsole_init_input): ... this, and ...
6865         (grub_ofconsole_init_output): ... this.
6866         (grub_ofconsole_term): Split into ...
6867         (grub_ofconsole_term_input): ... this, and ...
6868         (grub_ofconsole_term_output): ... this.  Update all users.
6869         * term/i386/pc/serial.c (grub_serial_term): Split into ...
6870         (grub_serial_term_input): ... this, and ...
6871         (grub_serial_term_output): ... this.  Update all users.
6872         * term/i386/pc/console.c (grub_console_term): Split into ...
6873         (grub_console_term_input): ... this, and ...
6874         (grub_console_term_output): ... this.  Update all users.
6875         (grub_console_term_input): Only enable it on PC/BIOS platform.
6876         (grub_console_init): Remove grub_keyboard_controller_init() call.
6878         Migrate input terminals to new API:
6880         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
6881         `i386' and `i386/pc' to enable build on x86_64 (this driver is
6882         i386-specific anyway).
6883         (grub_console_checkkey): Rename to ...
6884         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
6885         users.
6886         (grub_keyboard_controller_orig): New variable.
6887         (grub_console_getkey): Rename to ...
6888         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
6889         users.
6890         (grub_keyboard_controller_init): Static-ize.  Save original
6891         controller value so that it can be restored ...
6892         (grub_keyboard_controller_fini): ... here (new function).
6893         (grub_at_keyboard_term): New structure.
6894         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
6895         functions.
6897         Migrate output terminals to new API:
6899         * term/i386/pc/vga.c (grub_vga_term): Change type to
6900         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6901         members.  Update all users.
6902         * term/gfxterm.c (grub_video_term): Change type to
6903         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
6904         members.  Update all users.
6905         * include/grub/i386/pc/console.h (grub_console_checkkey)
6906         (grub_console_getkey): Do not export (no longer needed by gfxterm,
6907         etc).
6909         Migrate `terminal' command and userland tools to new API:
6911         * commands/terminal.c (grub_cmd_terminal): Split into ...
6912         (grub_cmd_terminal_input): ... this, and ...
6913         (grub_cmd_terminal_output): ... this.
6914         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
6915         `terminal_input' and `terminal_output'.
6916         * util/grub.d/00_header.in: Adjust `terminal' calls to new
6917         `terminal_input' / `terminal_output' API.
6918         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
6919         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
6920         provided ${GRUB_TERMINAL}, convert it).
6922 2008-11-04  Robert Millan  <rmh@aybabtu.com>
6924         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
6925         for FreeBSD.
6926         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
6928 2008-11-03  Bean  <bean123ch@gmail.com>
6930         * kern/elf.c (grub_elf32_load): Revert to previous code.
6931         (grub_elf64_load): Likewise.
6933         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
6935 2008-11-01  Robert Millan  <rmh@aybabtu.com>
6937         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
6938         (TARGET_CPPFLAGS): Likewise.
6939         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
6941 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
6943         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
6945 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6947         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
6948         addition of objects until the code is not going to be able to fail.
6950 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
6952         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
6953         (add a missing NULL check, and correct them by moving the pointer
6954         operations after the actual check).
6956 2008-10-29  Robert Millan  <rmh@aybabtu.com>
6958         * util/i386/pc/grub-install.in: Handle empty string as output from
6959         make_system_path_relative_to_its_root().
6961 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
6963         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
6964         circular metadata worst case scenario. If the metadata is circular
6965         then copy the wrap in place.
6966         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
6967         project lib/format_text/layout.h
6968         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
6970 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6972         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
6974 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
6976         * util/update-grub_lib.in: Mention filename in warning message.
6978 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6980         * NEWS: Update for rename of update-grub to grub-mkconfig.
6982 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
6984         * util/update-grub_lib.in: Copy to ...
6985         * util/grub-mkconfig_lib.in: ... this.  Update all users.
6986         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
6987         * util/update-grub.in: Rename to ...
6988         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
6989         option. Add `--output' option to allow users to specify the generated
6990         configuration file.  Default to stdout.
6991         (update_grub_dir): Rename to ...
6992         (grub_mkconfig_dir): ... this.
6993         (grub_cfg): Default to an empty string.
6994         * conf/common.rmk (update-grub): Rename to ...
6995         (grub-mkconfig): ... this.
6996         (update-grub_lib): Copy to ...
6997         (grub-mkconfig_lib): ... this.
6998         (update-grub_SCRIPTS): Copy to ...
6999         (grub-mkconfig_SCRIPTS): ... this. Update all users.
7000         (update-grub_DATA): Rename to ...
7001         (grub-mkconfig_DATA): ... this.
7003 2008-09-28  Robert Millan  <rmh@aybabtu.com>
7005         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
7006         to `modified'.  Add the real `created' field.
7007         (grub_iso9660_uuid): Use `modified' rather than `created' for
7008         constructing the UUID.
7010 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
7012         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
7013         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
7015 2008-09-28  Bean  <bean123ch@gmail.com>
7017         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
7018         Thanks to Christian Franke for finding this bug.
7020 2008-09-25  Robert Millan  <rmh@aybabtu.com>
7022         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
7023         instances of grub_util_get_disk_name() (see previous commit).
7025 2008-09-25  Robert Millan  <rmh@aybabtu.com>
7027         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
7028         `util/i386/get_disk_name.c'.
7029         * conf/i386-efi.rmk: Likewise.
7030         * conf/x86_64-efi.rmk: Likewise.
7031         * conf/i386-coreboot.rmk: Likewise.
7032         * conf/i386-ieee1275.rmk: Likewise.
7033         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
7034         `util/ieee1275/get_disk_name.c'.
7035         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
7036         * util/ieee1275/get_disk_name.c: Remove file.
7037         * util/i386/get_disk_name.c: Remove file.
7038         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
7039         "hd%d" for device.map entries, rather than using
7040         grub_util_get_disk_name().
7042 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
7044         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
7045         warning.
7046         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
7048 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
7050         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
7051         Changed to 0x5100.
7052         (GRUB_TERM_PPAGE): Changed to 0x4900.
7054 2008-09-24  Robert Millan  <rmh@aybabtu.com>
7056         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
7057         macros (they were i386-pc specific).
7058         * include/grub/sparc64/ieee1275/console.h: Likewise.
7059         * include/grub/efi/console.h: Likewise.
7061 2008-09-22  Bean  <bean123ch@gmail.com>
7063         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
7064         resident and in attribute list.
7066         * include/grub/ntfs.h (BMP_LEN): Removed.
7068 2008-09-22  Bean  <bean123ch@gmail.com>
7070         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
7071         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
7073         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
7074         error occurs, as grub_disk_open will call grub_disk_close, which will
7075         call p->close (scsi).
7077 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
7079         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
7080         (AC_PREREQ): Bumped to 2.59.
7081         (AC_TRY_COMPILE): Replace obsolete macro with ...
7082         (AC_COMPILE_IFELSE): ... this.
7083         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
7084         (AC_LINK_IFELSE): ... this.
7086 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
7088         * autogen.sh: Add a call to `gendistlist.sh'.
7090 2008-09-19  Christian Franke  <franke@computer.org>
7092         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
7093         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
7094         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
7095         Export __enable_execute_stack() to modules.
7096         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
7097         New function.
7099 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
7101         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
7102         Sort the list.
7104 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
7106         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7107         #include <grub/util/hostdisk.h>.
7109 2008-09-08  Robert Millan  <rmh@aybabtu.com>
7111         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
7112         segments when their filesz is zero (grub_file_read() interprets
7113         zero-size as "read until EOF", which results in memory corruption).
7114         Use `lowest_segment' rather than 0 for calculating the current
7115         segment load address.
7117 2008-09-08  Robert Millan  <rmh@aybabtu.com>
7119         * util/hostdisk.c (open_device): Replace a grub_util_info() call
7120         with grub_dprintf("hostdisk", ...), as it was so verbose that it
7121         clobbered useful information.
7123 2008-09-08  Robert Millan  <rmh@aybabtu.com>
7125         * include/grub/util/biosdisk.h: Move to ...
7126         * include/grub/util/hostdisk.h: ... here.  Update all users.
7127         * util/biosdisk.c: Move to ...
7128         * util/hostdisk.c: ... here.  Update all users.
7130 2008-09-07  Robert Millan  <rmh@aybabtu.com>
7132         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
7133         variables.
7134         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
7135         and length can be stored directly in the `mbi->mmap_addr' and
7136         `mbi->mmap_length' struct fields.
7138 2008-09-07  Robert Millan  <rmh@aybabtu.com>
7140         * conf/i386.rmk: New file.  Provides declaration for building
7141         `cpuid.mod'.
7142         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
7143         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
7144         variables.
7145         Include `conf/i386.mk'.
7146         * conf/i386-efi.rmk: Likewise.
7147         * conf/x86_64-efi.rmk: Likewise.
7148         * conf/i386-coreboot.rmk: Likewise.
7149         * conf/i386-ieee1275.rmk: Likewise.
7151 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
7153         Based on patch created by Colin D Bennett <colin@gibibit.com>.
7154         Adds optimization support for BGR based modes.
7156         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
7157         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
7158         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7159         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7160         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7161         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7162         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7163         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7164         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7165         (grub_video_i386_vbeblit_index_index): Likewise.
7166         (grub_video_i386_vbeblit_replace_directN): Added.
7167         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
7168         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
7169         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
7170         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
7171         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
7172         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
7173         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
7174         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
7175         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
7176         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
7177         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
7178         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
7179         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
7181         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
7182         (grub_video_i386_vbefill_R8G8B8): Likewise.
7183         (grub_video_i386_vbefill_index): Likewise.
7184         (grub_video_i386_vbefill_direct32): Added.
7185         (grub_video_i386_vbefill_direct24): Likewise.
7186         (grub_video_i386_vbefill_direct16): Likewise.
7187         (grub_video_i386_vbefill_direct8): Likewise.
7189         * include/grub/video.h (grub_video_blit_format): Removed
7190         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
7191         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
7192         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
7193         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
7194         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
7196         * video/video.c (grub_video_get_blit_format): Updated to use new
7197         blit formats.  Added handling for 16 bit color modes.
7199         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
7200         fillers.
7201         (common_blitter): Updated to use new blitters.
7203         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
7204         Removed.
7205         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
7206         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7207         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7208         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7209         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7210         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7211         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7212         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7213         (grub_video_i386_vbeblit_index_index): Likewise.
7214         (grub_video_i386_vbeblit_replace_directN): Added.
7215         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
7216         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
7217         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
7218         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
7219         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
7220         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
7221         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
7222         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
7223         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
7224         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
7225         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
7226         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
7227         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
7229         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
7230         (grub_video_i386_vbefill_R8G8B8): Likewise.
7231         (grub_video_i386_vbefill_index): Likewise.
7232         (grub_video_i386_vbefill_direct32): Added.
7233         (grub_video_i386_vbefill_direct24): Likewise.
7234         (grub_video_i386_vbefill_direct16): Likewise.
7235         (grub_video_i386_vbefill_direct8): Likewise.
7237         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
7238         types.
7240         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
7241         types.
7243         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
7244         blitter types.
7246         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
7247         types.
7249 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
7251         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
7252         RAID level 1.
7254 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
7256         * fs/iso9660.c (grub_iso9660_date): New structure.
7257         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
7258         (grub_iso9660_uuid): New function.
7260 2008-09-05  Bean  <bean123ch@gmail.com>
7262         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
7264         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
7265         insensitive bit for names in Win32 and Win32 & DOS namespace.
7267         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
7269         * include/grub/types.h (LONG_MAX): Likewise.
7271 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
7273         * util/getroot.c: Include <config.h>.
7274         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
7275         add support for /dev/md/N devices and handle LVM double dash escaping.
7277 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
7279         * config.guess: Update to latest version from config git.
7280         * config.sub: Likewise.
7282 2008-09-03  Robert Millan  <rmh@aybabtu.com>
7284         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
7285         `disk->total_sectors'.
7287 2008-09-01  Colin D Bennett  <colin@gibibit.com>
7289         * include/grub/normal.h: Fixed incorrect comment for
7290         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
7292 2008-09-01  Colin D Bennett  <colin@gibibit.com>
7294         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
7295         values with defines.
7297         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
7298         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
7299         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
7300         (GRUB_VBE_MODEATTR_COLOR): Likewise.
7301         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
7302         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
7303         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
7304         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
7305         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
7306         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
7307         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
7308         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
7309         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
7310         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
7311         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
7312         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
7313         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
7314         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
7315         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
7317 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7319         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
7320         declaration.
7321         (grub_multiboot): Fix a few warnings.
7323 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7325         * loader/i386/pc/multiboot.c: Update comment not to say that
7326         boot_device support is unimplemented.
7328 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7330         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
7331         or memory map support are unimplemented.
7333 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7335         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
7337 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7339         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
7340         total video memory in 'vbeinfo' output; show color format details for
7341         each video mode.
7343 2008-08-30  Pavel Roskin  <proski@gnu.org>
7345         * util/genmoddep.c: Remove for real this time.
7346         * DISTLIST: Remove util/genmoddep.c.
7348 2008-08-30  Robert Millan  <rmh@aybabtu.com>
7350         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
7351         as required by Multiboot spec (it was already 4-byte aligned, but
7352         only by chance).
7354 2008-08-29  Pavel Roskin  <proski@gnu.org>
7356         * kern/powerpc/ieee1275/crt0.S: Rename to ...
7357         * kern/powerpc/ieee1275/startup.S: ... this.
7358         * conf/powerpc-ieee1275.rmk: Adjust for the above.
7359         * DISTLIST: Likewise.
7361         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
7362         grub/cpu/kernel.h.  Add start label for consistency with other
7363         platforms.  Add grub_prefix immediately after start.  Add jump
7364         to the code after grub_prefix.
7365         * include/grub/powerpc/kernel.h: Provide valid values for
7366         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
7368 2008-08-29  Bean  <bean123ch@gmail.com>
7370         * configure.ac: Change host_os to cygwin for mingw.
7371         (asprintf): New check for function.
7373         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
7374         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
7376         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
7377         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
7378         sync, sleep and grub_util_get_disk_size for mingw.
7380         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
7381         to get size in mingw.
7382         (open_device): Use flag O_BINARY if it's defined.
7383         (find_root_device): Add dummy code for mingw.
7385         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
7386         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
7387         (get_scsi_disk_name): Return 0 for mingw.
7389         * util/hostfs.c: #include <grub/util/misc.h>.
7390         (grub_hostfs_open): Use "rb" flag to open file, use
7391         grub_util_get_disk_size to get disk size for mingw.
7393         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
7394         (asprintf): New function if HAVE_ASPRINTF is not set.
7395         (sync): New function for mingw.
7396         (sleep): Likewise.
7397         (grub_util_get_disk_size): Likewise.
7399 2008-08-28  Pavel Roskin  <proski@gnu.org>
7401         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7402         kern/time.c.
7404 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7406         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
7408 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7410         Change find_grub_drive() syntax so it doesn't prevent it from
7411         detecting NULL names as errors.
7413         * util/biosdisk.c (find_grub_drive): Move free slot search code
7414         from here ...
7415         (find_free_slot): ... to here.
7416         (read_device_map): Use find_free_slot() to search for free slots.
7418 2008-08-27  Marco Gerards  <marco@gnu.org>
7420         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
7421         (scsi_mod_SOURCES): New variable.
7422         (scsi_mod_CFLAGS): Likewise
7423         (scsi_mod_LDFLAGS): Likewise.
7425         * disk/scsi.c: New file.
7427         * include/grub/scsi.h: Likewise.
7429         * include/grub/scsicmd.h: Likewise.
7431         * disk/ata.c: Include <grub/scsi.h>.
7432         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
7433         instead.
7434         (grub_ata_iterate): Skip ATAPI devices.
7435         (grub_ata_open): Only handle ATAPI devices.
7436         (struct grub_atapi_read): Removed.
7437         (grub_atapi_readsector): Likewise.
7438         (grub_ata_read): No longer handle ATAPI devices.
7439         (grub_ata_write): Likewise.
7440         (grub_atapi_iterate): New function.
7441         (grub_atapi_read): Likewise.
7442         (grub_atapi_write): Likewise.
7443         (grub_atapi_open): Likewise.
7444         (grub_atapi_close): Likewise.
7445         (grub_atapi_dev): New variable.
7446         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
7447         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
7449         * include/grub/disk.h (enum grub_disk_dev_id): Add
7450         `GRUB_DISK_DEVICE_SCSI_ID'.
7452 2008-08-26  Robert Millan  <rmh@aybabtu.com>
7454         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
7455         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
7456         descriptive.
7458 2008-08-23  Bean  <bean123ch@gmail.com>
7460         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
7461         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
7462         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
7463         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
7464         dm_nv.mod.
7465         (raid5rec_mod_SOURCES): New macro.
7466         (raid5rec_mod_CFLAGS): Likewise.
7467         (raid5rec_mod_LDFLAGS): Likewise.
7468         (raid6rec_mod_SOURCES): Likewise.
7469         (raid6rec_mod_CFLAGS): Likewise.
7470         (raid6rec_mod_LDFLAGS): Likewise.
7471         (mdraid_mod_SOURCES): Likewise.
7472         (mdraid_mod_CFLAGS): Likewise.
7473         (mdraid_mod_LDFLAGS): Likewise.
7474         (dm_nv_mod_SOURCES): Likewise.
7475         (dm_nv_mod_CFLAGS): Likewise.
7476         (dm_nv_mod_LDFLAGS): Likewise.
7478         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
7479         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
7480         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7482         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
7483         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7485         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7487         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7489         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7491         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7493         * disk/raid5_recover.c: New file.
7495         * disk/raid6_recover.c: Likewise.
7497         * disk/mdraid_linux.c: Likewise.
7499         * disk/dmraid_nvidia.c: Likewise.
7501         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
7502         ULONG_MAX.
7504         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
7505         calculate the size of raid device.
7506         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
7507         different layout of raid5.
7508         (grub_raid_scan_device): Remove code specific to mdraid.
7509         (grub_raid_list): New variable.
7510         (free_array): New function.
7511         (grub_raid_register): Likewise.
7512         (grub_raid_unregister): Likewise.
7513         (grub_raid_rescan): Likewise.
7514         (GRUB_MOD_INIT): Don't iterate device here.
7515         (GRUB_MOD_FINI): Use free_array to release resource.
7517         * include/grub/raid.h: Remove macro and structure specific to mdraid.
7518         (grub_raid5_recover_func_t): New function variable type.
7519         (grub_raid6_recover_func_t): Likewise.
7520         (grub_raid5_recover_func): New variable.
7521         (grub_raid6_recover_func): Likewise.
7522         (grub_raid_register): New function.
7523         (grub_raid_unregister): Likewise.
7524         (grub_raid_rescan): Likewise.
7525         (grub_raid_block_xor): Likewise.
7527         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
7528         (CMD_CRC): New macro.
7529         (part): Removed.
7530         (read_file): Handle device as well as file.
7531         (cmd_crc): New function.
7532         (fstest): Handle multiple disks.
7533         (options): Remove part, raw and long, add root and diskcount.
7534         (usage): Add crc, remove -p, -r, -l, add -r and -c.
7535         (main): Find the first non option entry and ignore subsequent options,
7536         add handling for the new options, support multiple disks.
7538         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
7540 2008-08-23  Bean  <bean123ch@gmail.com>
7542         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
7544         * genfslist.sh: Ignore kernel.mod.
7546         * genpartmaplist.sh: Likewise.
7548 2008-08-23  Robert Millan  <rmh@aybabtu.com>
7550         * util/getroot.c (find_root_device): Skip anything that starts with
7551         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
7553 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
7555         * util/update-grub.in (GRUB_GFXMODE): Export variable.
7556         * util/grub.d/00_header.in: Allow the administrator to change default
7557         gfxmode via ${GRUB_GFXMODE}.
7559 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
7561         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
7563 2008-08-21  Robert Millan  <rmh@aybabtu.com>
7565         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
7566         loader.
7567         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
7568         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
7570 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
7572         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
7573         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
7575 2008-08-19  Robert Millan  <rmh@aybabtu.com>
7577         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
7578         (struct grub_virtual_screen): Remove `cursor_color'.
7579         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
7580         initialization.
7581         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
7583 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7585         Unify (identical) linux_normal.c files.
7586         * loader/i386/efi/linux_normal.c: Move from here ...
7587         * loader/linux_normal.c: ... to here.  Update all users.
7588         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
7589         * loader/i386/ieee1275/linux_normal.c: Likewise.
7591 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7593         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
7594         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
7595         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
7596         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
7597         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
7598         New macros.
7599         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
7600         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
7601         (GRUB_LINUX_CL_END_OFFSET): ... to here.
7602         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
7603         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
7604         (GRUB_EFI_CL_END_OFFSET): Rename to ...
7605         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
7606         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
7607         Initialize `params->video_cursor_x' and `params->video_cursor_y'
7608         portably using grub_getxy().
7609         Replace `-EFI' with `-bzImage' in boot message.
7611 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7613         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
7615 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7617         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
7619         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
7620         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
7621         (grub_machine_mmap_iterate): New function declaration.
7622         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
7623         structure.
7624         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
7625         macros.
7627         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
7628         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
7629         Move e820 parsing from here ...
7630         * kern/i386/pc/mmap.c: New file.
7631         (grub_machine_mmap_iterate): ... to here.
7633         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
7634         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
7635         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
7636         (grub_available_iterate): Redeclare to return `void', and redeclare
7637         its hook to use grub_uint64_t as addr and size parameters, and rename
7638         to ...
7639         (grub_machine_mmap_iterate): ... this.  Update all users.
7641         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
7642         to make it more readable.  Rename to ...
7643         (grub_machine_mmap_iterate): ... this.
7645         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
7646         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
7647         (grub_multiboot): Allocate an extra region after the payload, and fill
7648         it with a Multiboot memory map.  Adjust a.out loader to calculate size
7649         with the extra space.
7650         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
7651         with the extra space.
7653 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
7655         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
7657 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
7659         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
7660         mdate-sh to the list `find' searches for.
7661         * DISTLIST: Regenerated.
7663 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
7665         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
7666         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
7667         genmoddep.awk, gensymlist.sh.in.
7668         (DISTDIRS): Add bus, docs, hook, lib.
7669         * DISTLIST: Regenerated.
7670         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
7672 2008-08-16  Robert Millan  <rmh@aybabtu.com>
7674         * disk/raid.c (grub_raid_init): Handle/report errors set by
7675         grub_device_iterate().
7676         * disk/lvm.c (grub_lvm_init): Likewise.
7678 2008-08-15  Bean  <bean123ch@gmail.com>
7680         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7681         and datehook.mod.
7682         (datetime_mod_SOURCES): New macro.
7683         (datetime_mod_CFLAGS): Likewise.
7684         (datetime_mod_LDFLAGS): Likewise.
7685         (date_mod_SOURCES): Likewise.
7686         (date_mod_CFLAGS): Likewise.
7687         (date_mod_LDFLAGS): Likewise.
7688         (datehook_mod_SOURCES): Likewise.
7689         (datehook_mod_CFLAGS): Likewise.
7690         (datehook_mod_LDFLAGS): Likewise.
7692         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7693         and datehook.mod.
7694         (datetime_mod_SOURCES): New macro.
7695         (datetime_mod_CFLAGS): Likewise.
7696         (datetime_mod_LDFLAGS): Likewise.
7697         (date_mod_SOURCES): Likewise.
7698         (date_mod_CFLAGS): Likewise.
7699         (date_mod_LDFLAGS): Likewise.
7700         (datehook_mod_SOURCES): Likewise.
7701         (datehook_mod_CFLAGS): Likewise.
7702         (datehook_mod_LDFLAGS): Likewise.
7704         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7705         and datehook.mod.
7706         (datetime_mod_SOURCES): New macro.
7707         (datetime_mod_CFLAGS): Likewise.
7708         (datetime_mod_LDFLAGS): Likewise.
7709         (date_mod_SOURCES): Likewise.
7710         (date_mod_CFLAGS): Likewise.
7711         (date_mod_LDFLAGS): Likewise.
7712         (datehook_mod_SOURCES): Likewise.
7713         (datehook_mod_CFLAGS): Likewise.
7714         (datehook_mod_LDFLAGS): Likewise.
7716         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7717         and datehook.mod.
7718         (datetime_mod_SOURCES): New macro.
7719         (datetime_mod_CFLAGS): Likewise.
7720         (datetime_mod_LDFLAGS): Likewise.
7721         (date_mod_SOURCES): Likewise.
7722         (date_mod_CFLAGS): Likewise.
7723         (date_mod_LDFLAGS): Likewise.
7724         (datehook_mod_SOURCES): Likewise.
7725         (datehook_mod_CFLAGS): Likewise.
7726         (datehook_mod_LDFLAGS): Likewise.
7728         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7729         and datehook.mod.
7730         (datetime_mod_SOURCES): New macro.
7731         (datetime_mod_CFLAGS): Likewise.
7732         (datetime_mod_LDFLAGS): Likewise.
7733         (date_mod_SOURCES): Likewise.
7734         (date_mod_CFLAGS): Likewise.
7735         (date_mod_LDFLAGS): Likewise.
7736         (datehook_mod_SOURCES): Likewise.
7737         (datehook_mod_CFLAGS): Likewise.
7738         (datehook_mod_LDFLAGS): Likewise.
7740         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
7742         * commands/date.c: New file.
7744         * hook/datehook.c: Likewise.
7746         * include/grub/lib/datetime.h: Likewise.
7748         * include/grub/i386/cmos.h: Likewise.
7750         * lib/datetime.c: Likewise.
7752         * lib/i386/datetime.c: Likewise.
7754         * lib/efi/datetime.c: Likewise.
7756 2008-08-14  Robert Millan  <rmh@aybabtu.com>
7758         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
7759         (grub_mkelfimage_SOURCES): New variable.
7760         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
7762         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
7763         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
7764         * conf/powerpc-ieee1275.rmk: Likewise.
7765         * conf/i386-ieee1275.rmk: Likewise.
7767         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
7768         * kern/i386/coreboot/init.c: Likewise.
7770         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
7771         with `<grub/cpu/kernel.h>'.
7772         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
7773         to ...
7774         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
7775         * kern/i386/coreboot/startup.S: Likewise.
7777         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
7778         (GRUB_MOD_GAP): Remove.
7779         * include/grub/powerpc/kernel.h: New file.
7780         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
7781         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7782         * include/grub/i386/kernel.h: New file.
7783         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
7784         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
7785         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7787         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
7788         `grub-mkelfimage'.
7789         Use --directory when invoking grub_mkimage.
7791         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
7792         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
7793         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
7794         and GRUB_KERNEL_CPU_PREFIX.
7796 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
7798         * include/grub/err.h (grub_err_printf): New function prototype.
7799         * util/misc.c (grub_err_printf): New function.
7800         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
7801         grub_printf.
7802         * kern/err.c (grub_print_error): Use grub_err_printf.
7804 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7806         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
7808 2008-08-13  Robert Millan  <rmh@aybabtu.com>
7810         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
7811         boot entry.
7813 2008-08-12  Robert Millan  <rmh@aybabtu.com>
7815         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
7816         of the relocation code from here ...
7817         (grub_multiboot): ... to here.
7818         (forward_relocator, backward_relocator): Move from here ...
7819         * kern/i386/loader.S (grub_multiboot_forward_relocator)
7820         (grub_multiboot_backward_relocator): ... to here.
7821         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
7822         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
7823         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
7824         (grub_multiboot_forward_relocator_end)
7825         (grub_multiboot_backward_relocator)
7826         (grub_multiboot_backward_relocator_end): New variables.
7828 2008-08-12  Bean  <bean123ch@gmail.com>
7830         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
7832 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7834         * kern/i386/linuxbios/startup.S: Move from here ...
7835         * kern/i386/coreboot/startup.S: ... to here.
7837         * kern/i386/linuxbios/init.c: Move from here ...
7838         * kern/i386/coreboot/init.c: ... to here.
7840         * kern/i386/linuxbios/table.c: Move from here ...
7841         * kern/i386/coreboot/mmap.c: ... to here.
7843         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
7845 2008-08-11  Robert Millan  <rmh@aybabtu.com>
7847         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
7848         errors.  Leave it to the upper layer to handle them.
7850 2008-08-09  Christian Franke  <franke@computer.org>
7852         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
7853         * conf/common.rmk: Install `grub-pe2elf' only if requested.
7854         Install `grub.d/10_windows' only on Cygwin.
7855         * configure.ac: Add subst of `target_os'.
7856         Check `target_os' also before setting TARGET_OBJ2ELF.
7857         Add `--enable-grub-pe2elf'.
7859 2008-08-08  Robert Millan  <rmh@aybabtu.com>
7861         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7862         (grub_last_time): Change type to grub_uint64_t.
7863         (grub_disk_open): Migrate code from to using grub_get_time_ms().
7864         (grub_disk_close): Likewise.
7866         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7867         (run_menu): Migrate code from to using grub_get_time_ms().
7869         * util/misc.c (grub_get_time_ms): New function.
7871 2008-08-08  Marco Gerards  <marco@gnu.org>
7873         * disk/ata.c (grub_ata_regget): Change return type to
7874         `grub_uint8_t'.
7875         (grub_ata_regget2): Likewise.
7876         (grub_ata_wait_status): New function.
7877         (grub_ata_wait_busy): Removed function, updated all users to use
7878         `grub_ata_wait_status'.
7879         (grub_ata_wait_drq): Likewise.
7880         (grub_ata_cmd): New function.
7881         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
7882         error handling.
7883         (grub_ata_pio_write): Add error handling.
7884         (grub_atapi_identify): Likewise.
7885         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
7886         handling.
7887         (grub_ata_identify): Use `grub_ata_cmd' and improve error
7888         handling.  Actually use the detected registers.  Reorder the
7889         detection logic such that it is easier to read.
7890         (grub_ata_pciinit): Do not assign the same ID to each controller.
7891         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
7892         handling.
7893         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
7895         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
7897 2008-08-08  Marco Gerards  <marco@gnu.org>
7899         * NEWS: Update.
7901 2008-08-07  Bean  <bean123ch@gmail.com>
7903         * include/grub/x86_64/pci.h: New file.
7905 2008-08-07  Christian Franke  <franke@computer.org>
7907         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
7908         (TIMER2_GATE): Likewise.
7909         (grub_pit_wait): Add enable/disable of the timer2 gate
7910         bit of port 0x61.  This fixes a possible infinite loop.
7912 2008-08-07  Bean  <bean123ch@gmail.com>
7914         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
7915         kern/i386/tsc.c and kern/i386/pit.c.
7917         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
7918         x86_64 platform.
7920         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
7921         <grub/i386/tsc.h>.
7923         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
7925 2008-08-07  Bean  <bean123ch@gmail.com>
7927         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
7929         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
7931         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
7932         multiple inclusion. Add #include <grub/types.h>.
7934 2008-08-06  Christian Franke  <franke@computer.org>
7936         * conf/common.rmk: Build and install `10_windows'.
7937         * util/grub.d/10_windows.in: New script.
7939 2008-08-06  Pavel Roskin  <proski@gnu.org>
7941         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
7943 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7945         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
7946         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
7948 2008-08-06  Bean  <bean123ch@gmail.com>
7950         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
7951         (grub_pxefs_fs_int): Remove dummy definition.
7952         (grub_pxefs_open): Use data->block_size to store the current block
7953         size setting.
7954         (grub_pxefs_read): Use block size stored in data->block_size. As the
7955         value of grub_pxe_blksize can be changed after the file is opened.
7957 2008-08-06  Bean  <bean123ch@gmail.com>
7959         * fs/i386/pc/pxe.c (curr_file): new variable.
7960         (grub_pxefs_open): Simply the handling of pxe file system. Don't
7961         require the dummy internal file system anymore.
7962         (grub_pxefs_read): Removed.
7963         (grub_pxefs_close): Likewise.
7964         (grub_pxefs_fs_int): Likewise.
7965         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
7966         connection when we switch file.
7967         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
7969 2008-08-06  Robert Millan  <rmh@aybabtu.com>
7971         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
7972         `halt.mod'.
7973         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
7974         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
7976         * kern/i386/halt.c: New file.
7977         * kern/i386/reboot.c: Likewise.
7978         * include/grub/i386/reboot.h: Likewise.
7979         * include/grub/i386/halt.h: Likewise.
7981         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
7982         Include `<grub/cpu/halt.h>'.
7983         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
7984         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
7986         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
7987         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
7988         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
7989         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
7990         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
7991         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
7992         from here ...
7993         * include/grub/i386/at_keyboard.h: ... to here.
7995 2008-08-05  Robert Millan  <rmh@aybabtu.com>
7997         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
7998         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
7999         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
8000         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8001         `kern/generic/millisleep.c'.
8003         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
8004         instead of grub_get_rtc().
8005         (grub_tsc_init): Initialize `tsc_boot_time'.
8007         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
8008         (grub_machine_init): Use grub_tsc_init() rather than
8009         installing an RTC-based handler via grub_install_get_time_ms().
8011         * kern/i386/pit.c: New file.
8012         * include/grub/i386/pit.h: Likewise.
8014 2008-08-05  Bean  <bean123ch@gmail.com>
8016         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
8018         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
8019         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
8020         (pxe_mod_SOURCES): New macro.
8021         (pxe_mod_CFLAGS): Likewise.
8022         (pxe_mod_LDFLAGS): Likewise.
8023         (pxecmd_mod_SOURCES): Likewise.
8024         (pxecmd_mod_CFLAGS): Likewise.
8025         (pxecmd_mod_LDFLAGS): Likewise.
8027         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
8028         (grub_pxe_call): Likewise.
8030         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
8032         * commands/i386/pc/pxecmd.c: New file.
8034         * fs/i386/pc/pxe.c: Likewise.
8036         * include/grub/i386/pc/pxe.h: Likewise.
8038 2008-08-05  Bean  <bean123ch@gmail.com>
8040         * util/console.c (grub_console_cur_color): New variable.
8041         (grub_console_standard_color): Likewise.
8042         (grub_console_normal_color): Likewise.
8043         (grub_console_highlight_color): Likewise.
8044         (color_map): Likewise.
8045         (use_color): Likewise.
8046         (NUM_COLORS): New macro.
8047         (grub_ncurses_setcolorstate): Handle color properly.
8048         (grub_ncurses_setcolor): Don't change color here, just remember the
8049         settings, color will be set in grub_ncurses_setcolorstate.
8050         (grub_ncurses_getcolor): New function.
8051         (grub_ncurses_init): Initialize color pairs.
8052         (grub_ncurses_term): New member grub_ncurses_getcolor.
8054 2008-08-05  Colin D Bennett  <colin@gibibit.com>
8056         High resolution timer support.  Implemented for x86 CPUs using TSC.
8057         Extracted generic grub_millisleep() so it's linked in only as needed.
8058         This requires a Pentium compatible CPU; if the RDTSC instruction is
8059         not supported, then it falls back on the generic grub_get_time_ms()
8060         implementation that uses the machine's RTC.
8062         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
8063         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8064         `kern/generic/millisleep.c'.
8066         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
8067         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
8069         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
8070         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
8072         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8074         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8075         `kern/generic/millisleep.c'.
8077         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8079         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
8081         * kern/generic/rtc_get_time_ms.c: New file.
8083         * kern/generic/millisleep.c: New file.
8085         * kern/misc.c: Don't include
8086         <kern/time.h> anymore.
8087         (grub_millisleep_generic): Removed.
8089         * commands/sleep.c (grub_interruptible_millisleep): Uses
8090         grub_get_time_ms() instead of grub_get_rtc().
8092         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
8093         function.
8094         (grub_cpu_is_cpuid_supported): New inline function.
8095         (grub_cpu_is_tsc_supported): New inline function.
8096         (grub_tsc_init): New function prototype.
8097         (grub_tsc_get_time_ms): New function prototype.
8099         * kern/i386/tsc.c (grub_get_time_ms): New file.
8101         * include/grub/time.h: Include <grub/types.h.
8102         (grub_millisleep_generic): Removed.
8103         (grub_get_time_ms): New prototype.
8104         (grub_install_get_time_ms): New prototype.
8105         (grub_rtc_get_time_ms): New prototype.
8107         * kern/time.c (grub_get_time_ms): New function.
8108         (grub_install_get_time_ms): New function.
8110         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
8111         <grub/time.h> anymore.
8112         (grub_millisleep): Removed.
8113         (grub_machine_init): Call grub_tsc_init.
8115         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
8116         get_time_ms() implementation.
8118         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
8119         (ieee1275_get_time_ms): New function.
8120         (grub_machine_init): Install get_time_ms() implementation.
8122         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
8123         (grub_machine_init): Call grub_tsc_init().
8124         (grub_millisleep): Removed.
8126         * kern/ieee1275/init.c (grub_millisleep): Removed.
8127         (grub_machine_init): Install ieee1275_get_time_ms()
8128         implementation.
8129         (ieee1275_get_time_ms): New function.
8130         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
8131         real work.
8133 2008-08-05  Marco Gerards  <marco@gnu.org>
8135         * disk/ata.c: Include <grub/pci.h>.
8136         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
8137         (grub_ata_initialize): Rewritten.
8138         (grub_ata_device_initialize): New function.
8140 2008-08-04  Pavel Roskin  <proski@gnu.org>
8142         * kern/main.c: Include grub/mm.h.
8144 2008-08-04  Robert Millan  <rmh@aybabtu.com>
8146         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
8147         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
8148         corruption problem).
8150 2008-08-04  Robert Millan  <rmh@aybabtu.com>
8152         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
8153         warnings introduced in my last commit.
8155 2008-08-03  Robert Millan  <rmh@aybabtu.com>
8157         Make PCI available on all i386 architectures.
8159         * include/grub/i386/pc/pci.h: Move from here ...
8160         * include/grub/i386/pci.h: ... to here.
8162         * include/grub/i386/pc/pci.h: Remove.
8163         * include/grub/i386/efi/pci.h: Remove.
8164         * include/grub/x86_64/efi/pci.h: Remove.
8166         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
8167         `<grub/cpu/pci.h>'.
8169         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
8170         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
8171         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
8173         * conf/i386-ieee1275.rmk: Likewise.
8175 2008-08-03  Robert Millan  <rmh@aybabtu.com>
8177         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
8178         (grub_console_setcursor): Make it possible to set cursor off.
8180 2008-08-03  Robert Millan  <rmh@aybabtu.com>
8182         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
8183         of modules instead of assuming which platform provides what.
8184         * util/update-grub.in: Likewise.
8186 2008-08-03  Robert Millan  <rmh@aybabtu.com>
8188         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
8189         instead of `grub_install_dos_part' to determine whether a drive needs
8190         to be prepended to prefix (`grub_install_dos_part' is not reliable,
8191         because it can be overridden when loading GRUB via Multiboot).
8193 2008-08-02  Robert Millan  <rmh@aybabtu.com>
8195         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
8197 2008-08-02  Robert Millan  <rmh@aybabtu.com>
8199         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
8200         of informational grub_dprintf() calls.
8202 2008-08-02  Robert Millan  <rmh@aybabtu.com>
8204         * disk/memdisk.c (memdisk_size): Don't initialize.
8205         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
8207         * include/grub/i386/pc/kernel.h
8208         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
8209         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
8210         (grub_memdisk_image_size, grub_arch_memdisk_addr)
8211         (grub_arch_memdisk_size): Remove.
8213         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
8214         field (was only used to transfer a constant).  Add `type' field to
8215         support multiple module types.
8216         (grub_module_iterate): New function.
8218         * kern/device.c (grub_device_open): Do not hide error messages
8219         when grub_disk_open() fails.  Use grub_print_error() instead.
8221         * kern/i386/pc/init.c (grub_arch_modules_addr)
8222         (grub_arch_memdisk_size): Remove functions.
8223         (grub_arch_modules_addr): Return the module address in high memory
8224         (now that it isn't copied anymore).
8226         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
8227         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
8228         decompression routine (grub_total_module_size already includes that
8229         now).  Don't copy modules back to low memory.
8231         * kern/main.c: Include `<grub/mm.h>'.
8232         (grub_load_modules): Split out (and use) ...
8233         (grub_module_iterate): ... this function, which iterates through
8234         module objects and runs a hook.
8235         Comment out grub_mm_init_region() call, as it would cause non-ELF
8236         modules to be overwritten.
8238         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
8239         the memdisk image in its own region, make it part of the module list.
8240         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
8241         (main): Parse --memdisk|-m option, and pass user-provided path as
8242         parameter to generate_image().
8243         (add_segments): Pass `memdisk_path' down to load_modules().
8244         (load_modules): Embed memdisk image in module section when requested.
8245         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
8246         `header.type' instead of `header.offset'.
8248         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
8249         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
8250         (memdisk_mod_LDFLAGS): New variables.
8251         * conf/i386-coreboot.rmk: Likewise.
8252         * conf/i386-ieee1275.rmk: Likewise.
8254 2008-08-02  Robert Millan  <rmh@aybabtu.com>
8256         * loader/i386/pc/multiboot.c (playground, forward_relocator)
8257         (backward_relocator): New variables.  Used to allocate and relocate
8258         the payload, respectively.
8259         (grub_multiboot_load_elf32): Load into heap instead of requested
8260         address, install the appropriate relocator code in each bound of
8261         the payload, and set the entry point such that
8262         grub_multiboot_real_boot() will jump to one of them.
8264         * kern/i386/loader.S (grub_multiboot_payload_size)
8265         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
8266         (grub_multiboot_payload_entry_offset): New variables.
8267         (grub_multiboot_real_boot): Set cpu context to what the relocator
8268         expects, and jump to the relocator instead of the payload.
8270         * include/grub/i386/loader.h (grub_multiboot_payload_size)
8271         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
8272         (grub_multiboot_payload_entry_offset): Export.
8274 2008-08-01  Bean  <bean123ch@gmail.com>
8276         * normal/menu_entry.c (editor_getline): Don't return the original
8277         string as result, as it will be released by lexer once it has done
8278         using it.
8280 2008-08-01  Robert Millan  <rmh@aybabtu.com>
8282         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
8283         within menuentries, not before them.
8284         util/grub.d/10_hurd.in: Likewise.
8286 2008-08-01  Bean  <bean123ch@gmail.com>
8288         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
8289         (bufio_mod_SOURCES): New macro.
8290         (bufio_mod_CFLAGS): Likewise.
8291         (bufio_mod_LDFLAGS): Likewise.
8293         * include/grub/bufio.h: New file.
8295         * io/bufio.c: Likewise.
8297         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
8298         (grub_video_reader_png): Use grub_buffile_open to open file.
8300         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
8301         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
8303         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
8304         (grub_video_reader_tga): Use grub_buffile_open to open file.
8306         * font/manager.c: Include <grub/bufio.h>.
8307         (add_font): Use grub_buffile_open to open file.
8309 2008-07-31  Robert Millan  <rmh@aybabtu.com>
8311         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
8312         ELF segments, use a macro for arbitrarily accessing any of them instead
8313         of preparing a pointer that allows access to one at a time.
8314         (grub_multiboot_load_elf64): Likewise.
8316 2008-07-31  Bean  <bean123ch@gmail.com>
8318         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
8319         GRUB_KERNEL_MACHINE_DATA_END.
8321 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8323         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
8324         Increase from 0x50 to 0x60.
8325         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
8326         use UUIDs to identify the root drive for them.  If that's not
8327         possible, abort.
8328         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
8329         check, for cross-disk installs.
8331 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8333         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
8334         is non-empty, use it to set the `prefix' environment variable instead
8335         of the usual approach.
8336         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
8337         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
8338         environment variable instead of dummy make_install_device().
8340         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
8341         (start): Insert a data section, with `grub_prefix' variable.
8342         * kern/i386/linuxbios/startup.S: Likewise.
8344         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
8345         New variable reference.
8346         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
8347         New macro.  Defines offset of `grub_prefix' within startup.S (relative
8348         to `start').
8349         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
8350         section within startup.S (relative to `start').
8351         * include/grub/i386/coreboot/kernel.h: Likewise.
8353         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
8354         Overwrite grub_prefix with its contents, at the beginning of the
8355         first segment.
8356         (main): Understand -p|--prefix.
8358 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8360         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
8362 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8364         * term/i386/pc/vga_text.c (grub_console_cls): Use
8365         grub_console_gotoxy() to go back to beginning of the screen.
8366         Found by Patrick Georgi <patrick.georgi@coresystems.de>
8368 2008-07-29  Christian Franke  <franke@computer.org>
8370         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8371         Add conversion of emulated mount points on Cygwin.
8373 2008-07-29  Christian Franke  <franke@computer.org>
8375         * util/update-grub.in: Add a check for admin
8376         group on Cygwin.
8377         Remove old `grub.cfg.new' before creation.
8378         Add `-f' to `mv' to handle the different filesystem
8379         semantics of Windows.
8381 2008-07-29  Bean  <bean123ch@gmail.com>
8383         * normal/main.c (get_line): Fix buffer overflow bug.
8385 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8387         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
8388         (struct grub_apple_header): New struct.  Describes the layout of
8389         the partmap header.
8390         (apple_partition_map_iterate): Check the header magic as well as the
8391         partition magic (which was already being checked).
8393 2008-07-28  Pavel Roskin  <proski@gnu.org>
8395         * genmk.rb: Add a warning to the beginning of the output that
8396         it's a generated file and should not be edited.
8398 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8400         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
8401         with the same number are found, just use issue a warning with
8402         grub_dprintf(), as this error has been reported to be non-fatal.
8404 2008-07-27  Robert Millan  <rmh@aybabtu.com>
8406         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
8407         information.
8409 2008-07-27  Bean  <bean123ch@gmail.com>
8411         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
8412         (grub_fat_find_dir): Ignore case when comparing filename.
8414 2008-07-27  Bean  <bean123ch@gmail.com>
8416         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
8417         smallino, as it's more descriptive, and i8count can be confused with
8418         the other field count.
8419         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
8420         inode type.
8422 2008-07-27  Bean  <bean123ch@gmail.com>
8424         * commands/crc.c: New file.
8426         * lib/crc.c: Likewise.
8428         * include/grub/lib/crc.h: Likewise.
8430         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
8432         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
8433         (hexdump): Move this function to ...
8435         * lib/hexdump.c: ... here.
8437         * include/grub/hexdump.h: Renamed to ...
8439         * include/grub/lib/hexdump.h: ... this.
8441         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
8443         * util/grub-editenv.c: Likewise.
8445         * include/envblk.h: Renamed to ...
8447         * include/lib/envblk.h: ... this.
8449         * util/envblk.c: Renamed to ...
8451         * lib/envblk.c: ... this.
8453         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
8454         lib/hexdump.c.
8455         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
8456         (pkglib_MODULES): Add crc.mod.
8457         (hexdump_mod_SOURCES): Add lib/hexdump.c.
8458         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
8459         (crc_mod_SOURCES): New macro.
8460         (crc_mod_CFLAGS): Likewise.
8461         (crc_mod_LDFLAGS): Likewise.
8463         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
8465         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8467         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8469         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8471         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8473 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
8475         * commands/help.c: Include <grub/term.h>.
8476         (TERM_WIDTH): Removed.  Updated all users.
8478 2008-07-27  Pavel Roskin  <proski@gnu.org>
8480         * util/getroot.c (find_root_device): Rephrase a comment to avoid
8481         spurious warnings about a comment within a comment.
8483 2008-07-25  Robert Millan  <rmh@aybabtu.com>
8485         * util/getroot.c (find_root_device): Skip devices that match
8486         /dev/dm-[0-9].  This lets the real device be found for any type of
8487         abstraction (LVM, EVMS, RAID..).
8488         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
8489         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
8490         device is found first, find_root_device() will now skip it.
8492 2008-07-24  Pavel Roskin  <proski@gnu.org>
8494         * include/grub/types.h: Use __builtin_bswap32() and
8495         __builtin_bswap64() with gcc 4.3 and newer.
8497 2008-07-24  Christian Franke  <franke@computer.org>
8499         * util/i386/pc/grub-install.in: If `--debug' is specified,
8500         pass `--verbose' to grub-setup.
8501         Abort script if make_system_path_relative_to_its_root() fails.
8503 2008-07-24  Bean  <bean123ch@gmail.com>
8505         * configure.ac: Fixed a bug caused by the previous cygwin patch,
8506         variable `target_platform' should be `platform'.
8508 2008-07-24  Bean  <bean123ch@gmail.com>
8510         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
8511         (grub_png_init_fixed_block): New function.
8512         (grub_png_decode_image_data): Handle fixed huffman code compression.
8514 2008-07-24  Bean  <bean123ch@gmail.com>
8516         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
8517         (grub_pe2elf_SOURCES): New macro.
8518         (CLEANFILES): Add grub-pe2elf.
8520         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
8521         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
8522         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
8523         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
8524         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
8525         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
8526         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
8527         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
8528         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
8529         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
8530         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
8531         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
8532         (GRUB_PE32_DT_FUNCTION): Likewise.
8533         (GRUB_PE32_REL_I386_DIR32): Likewise.
8534         (GRUB_PE32_REL_I386_REL32): Likewise.
8535         (grub_pe32_symbol): New structure.
8536         (grub_pe32_reloc): Likewise.
8538         * util/grub-pe2elf.c: New file.
8540         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
8541         start symbol in non pc platform.
8543         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
8545         The following patches are from Christian Franke.
8547         * include/grub/dl.h: Remove .previous, gas supports this only
8548         for ELF format.
8550         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
8551         Remove .type, gas supports this only for ELF format.
8553         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
8554         nullbytes in symbol table. This fixes an infinite loop if table is
8555         zero filled.
8557         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
8558         TARGET_IMG_LDFLAGS and EXEEXT.
8560         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
8561         TARGET_IMG_LDFLAGS_AC.
8562         (grub_CHECK_STACK_ARG_PROBE): New function.
8564         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
8566         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
8568         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
8569         to set TARGET_IMG_LD* accordingly.
8570         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
8571         Add call to grub_CHECK_STACK_ARG_PROBE.
8572         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
8574         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
8576         * genmk.rb: Add EXEEXT to CLEANFILES.
8578 2008-07-23  Robert Millan  <rmh@aybabtu.com>
8580         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
8581         define the codes for arrows and lines used for the menu).
8582         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
8583         as well.
8585         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
8586         fonts, because the latter are too slow.
8588 2008-07-21  Bean  <bean123ch@gmail.com>
8590         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
8591         a20. Run keyboard test last, as it will cause macbook to halt.
8593 2008-07-18  Pavel Roskin  <proski@gnu.org>
8595         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
8596         load foreign architecture modules correctly anyway.  Keep
8597         support for loading host architecture modules, whether we
8598         compile them or not.
8600 2008-07-17  Pavel Roskin  <proski@gnu.org>
8602         * configure.ac: Use -m32 or -m64 regardless of whether we had to
8603         change target_cpu.  The compiler default can mismatch target_cpu
8604         in any case.
8606         * disk/efi/efidisk.c: Fix format warnings on x86_64.
8607         * kern/efi/efi.c: Likewise.
8609         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
8610         target compiler is functional.
8611         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
8612         are set up.
8614         * configure.ac: Default to efi platform for x86_64-apple.  Allow
8615         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
8616         adjustments from the rest, only do them if target is not
8617         explicitly given.  Merge other adjustments with the final sanity
8618         check.  Remove an extraneous check for supported CPU.  Be
8619         specific which CPU and which platform is not supported.
8621         * configure.ac: Default to pc platform for x86_64.
8623 2008-07-17  Robert Millan  <rmh@aybabtu.com>
8625         Partial LinuxBIOS -> Coreboot rename.
8627         * conf/i386-linuxbios.rmk: Renamed to ...
8628         * conf/i386-coreboot.rmk: ... this.
8629         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
8630         * configure.ac: Accept "coreboot" as input platform (but maintain
8631         compatibility with "linuxbios").
8632         * include/grub/i386/linuxbios: Renamed to ...
8633         * include/grub/i386/coreboot: ... this.
8635 2008-07-17  Bean  <bean123ch@gmail.com>
8637         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
8638         (appleldr_mod_SOURCE): New variable.
8639         (appleldr_mod_CFLAGS): Likewise.
8640         (appleldr_mod_LDFLAGS): Likewise.
8641         (pci_mod_SOURCES): Likewise.
8642         (pci_mod_CFLAGS): Likewise.
8643         (pci_mod_LDFLAGS): Likewise.
8644         (lspci_mod_SOURCES): Likewise.
8645         (lspci_mod_CFLAGS): Likewise.
8646         (lspci_mod_LDFLAGS): Likewise.
8648         * conf/x86_64-efi.rmk: New file.
8650         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
8651         macro.
8652         (grub_efidisk_write): Likewise.
8654         * include/efi/api.h (efi_call_0): New macro.
8655         (efi_call_1): Likewise.
8656         (efi_call_2): Likewise.
8657         (efi_call_3): Likewise.
8658         (efi_call_4): Likewise.
8659         (efi_call_5): Likewise.
8660         (efi_call_6): Likewise.
8662         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
8663         grub_rescue_cmd_chainloader.
8665         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
8666         (grub_pe32_optional_header): Change some fields based on i386 or
8667         x86_64 platform.
8668         (GRUB_PE32_PE32_MAGIC): Likewise.
8670         * include/grub/efi/uga_draw.h: New file.
8672         * include/grub/elf.h (STN_ABS): New constant.
8673         (R_X86_64_NONE): Relocation constant for x86_64.
8674         (R_X86_64_64): Likewise.
8675         (R_X86_64_PC32): Likewise.
8676         (R_X86_64_GOT32): Likewise.
8677         (R_X86_64_PLT32): Likewise.
8678         (R_X86_64_COPY): Likewise.
8679         (R_X86_64_GLOB_DAT): Likewise.
8680         (R_X86_64_JUMP_SLOT): Likewise.
8681         (R_X86_64_RELATIVE): Likewise.
8682         (R_X86_64_GOTPCREL): Likewise.
8683         (R_X86_64_32): Likewise.
8684         (R_X86_64_32S): Likewise.
8685         (R_X86_64_16): Likewise.
8686         (R_X86_64_PC16): Likewise.
8687         (R_X86_64_8): Likewise.
8688         (R_X86_64_PC8): Likewise.
8690         * include/grub/i386/efi/pci.h: New file.
8692         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
8693         Change it value based on platform.
8694         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
8695         (GRUB_E820_RAM): Likewise.
8696         (GRUB_E820_RESERVED): Likewise.
8697         (GRUB_E820_ACPI): Likewise.
8698         (GRUB_E820_NVS): Likewise.
8699         (GRUB_E820_EXEC_CODE): Likewise.
8700         (GRUB_E820_MAX_ENTRY): Likewise.
8701         (grub_e820_mmap): New structure.
8702         (linux_kernel_header): Change the efi field according to different
8703         kernel version, also field from linux_kernel_header.
8705         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
8707         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
8708         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
8709         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
8710         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
8711         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
8712         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
8713         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
8714         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
8715         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
8716         (GRUB_PCI_ADDR_IO_MASK): Likewise.
8718         * include/grub/x86_64/efi/kernel.h: New file.
8720         * include/grub/x86_64/efi/loader.h: Likewise.
8722         * include/grub/x86_64/efi/machine.h: Likewise.
8724         * include/grub/x86_64/efi/pci.h: Likewise.
8726         * include/grub/x86_64/efi/time.h: Likewise.
8728         * include/grub/x86_64/linux.h: Likewise.
8730         * include/grub/x86_64/setjmp.h: Likewise.
8732         * include/grub/x86_64/time.h: Likewise.
8734         * include/grub/x86_64/types.h: Likewise.
8736         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
8737          GRUB_TARGET_SIZEOF_VOID_P.
8739         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
8740         (grub_efi_locate_handle): Likewise.
8741         (grub_efi_open_protocol): Likewise.
8742         (grub_efi_set_text_mode): Likewise.
8743         (grub_efi_stall): Likewise.
8744         (grub_exit): Likewise.
8745         (grub_reboot): Likewise.
8746         (grub_halt): Likewise.
8747         (grub_efi_exit_boot_services): Likewise.
8748         (grub_get_rtc): Likewise.
8750         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
8751         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
8752         (grub_efi_allocate_pages): Wrap efi calls.
8753         (grub_efi_free_pages): Wrap efi calls.
8754         (grub_efi_get_memory_map): Wrap efi calls.
8756         * kern/x86_64/dl.c: New file.
8758         * kern/x86_64/efi/callwrap.S: Likewise.
8760         * kern/x86_64/efi/startup.S: Likewise.
8762         * loader/efi/appleloader.c: Likewise.
8764         * loader/efi/chainloader.c (cmdline): New variable.
8765         (grub_chainloader_unload): Wrap efi calls.
8766         (grub_chainloader_boot): Likewise.
8767         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
8768         command line.
8770         * loader/efi/chainloader_normal.c (chainloader_command):
8771         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
8772         command line.
8774         * loader/i386/efi/linux.c (allocate_pages): Change allocation
8775         method.
8776         (grub_e820_add_region): New function.
8777         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
8778         booting.
8779         (grub_find_video_card): New function.
8780         (grub_linux_setup_video): New function.
8781         (grub_rescue_cmd_linux): Probe for video information.
8783         * normal/x86_64/setjmp.S: New file.
8785         * term/efi/console.c (map_char): New function.
8786         (grub_console_putchar): Map unicode char.
8787         (grub_console_checkkey): Wrap efi calls.
8788         (grub_console_getkey): Likewise.
8789         (grub_console_getwh): Likewise.
8790         (grub_console_gotoxy): Likewise.
8791         (grub_console_cls): Likewise.
8792         (grub_console_setcolorstate): Likewise.
8793         (grub_console_setcursor): Likewise.
8795         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
8797 2008-07-16  Pavel Roskin  <proski@gnu.org>
8799         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
8800         format strings.
8802         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
8803         pointer, not an integer.  This fixes a warning and prevents
8804         precision loss on 64-bit systems.
8805         (relocate_addresses): Remove unneeded cast.
8807 2008-07-15  Pavel Roskin  <proski@gnu.org>
8809         * kern/i386/ieee1275/init.c: Include grub/cache.h.
8811         * term/ieee1275/ofconsole.c: Disable code unused on i386.
8813         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
8814         Fix comparison between signed and unsigned.
8816         * include/grub/i386/ieee1275/console.h: Declare
8817         grub_console_init() and grub_console_fini().
8819         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
8820         It's empty and unused.
8822         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
8823         beginning to avoid warnings with some compilers.
8825         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
8826         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
8828 2008-07-14  Pavel Roskin  <proski@gnu.org>
8830         * kern/env.c (grub_register_variable_hook): Don't copy empty
8831         string, it leaks memory.  Pass "" to grub_env_set(), it should
8832         handle constant strings.
8834         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
8835         * commands/cmp.c (grub_cmd_cmp): Likewise.
8836         * kern/dl.c (grub_dl_flush_cache): Likewise.
8837         (grub_dl_load_core): Likewise.
8838         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
8839         (grub_elf64_load_phdrs): Likewise.
8841 2008-07-13  Pavel Roskin  <proski@gnu.org>
8843         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
8844         between signed and unsigned.
8845         (LzmaEnc_Finish): Fix warning about an unused parameter.
8847 2008-07-13  Bean  <bean123ch@gmail.com>
8849         * Makefile.in (enable_lzo): New rule.
8851         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
8853         * configure.ac (ENABLE_LZO): New option --enable-lzo.
8855         * boot/i386/pc/lnxboot.S: #include <config.h>.
8857         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
8858         its value according to the compression algorithm used, lzo or lzma.
8860         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
8861         compression algorithm according to configure macro.
8863         * kern/i386/pc/startup.S (codestart): Likewise.
8865         * kern/i386/pc/lzma_decode.S: New file.
8867         * include/grub/lib/LzFind.h: Likewise.
8869         * include/grub/lib/LzHash.h: Likewise.
8871         * include/grub/lib/LzmaDec.h: Likewise.
8873         * include/grub/lib/LzmaEnc.h: Likewise.
8875         * include/grub/lib/LzmaTypes.h: Likewise.
8877         * lib/LzFind.c: Likewise.
8879         * lib/LzmaDec.c: Likewise.
8881         * lib/LzmaEnc.c: Likewise.
8883 2008-07-13  Bean  <bean123ch@gmail.com>
8885         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
8886         (grub_ext4_extent_header): New structure.
8887         (grub_ext4_extent): Likewise.
8888         (grub_ext4_extent_idx): Likewise.
8889         (grub_ext4_find_leaf): New function.
8890         (grub_ext2_read_block): Handle extents.
8892 2008-07-12  Robert Millan  <rmh@aybabtu.com>
8894         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
8896 2008-07-11  Robert Millan  <rmh@aybabtu.com>
8898         * util/grub.d/40_custom.in: New file. Example on how to add custom
8899         entries to /etc/grub.d.
8900         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
8901         40_custom (implicitly, by merging all the grub.d rules).
8903 2008-07-11  Pavel Roskin  <proski@gnu.org>
8905         * commands/read.c (grub_getline): Fix invalid memory access.
8906         Don't add newline to the variable value.
8908         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
8909         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
8910         (serial_hw_get_port): Check validity of the port number.
8911         (grub_cmd_serial): Check return value of serial_hw_get_port().
8913 2008-07-07  Pavel Roskin  <proski@gnu.org>
8915         * boot/i386/pc/diskboot.S (notification_string): Replace
8916         "Loading kernel" with just "loading".  This is shorter, less
8917         confusing and saves a few bytes for possible future changes.
8919 2008-07-05  Pavel Roskin  <proski@gnu.org>
8921         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
8922         size for ATAPI devices, they are undefined.  Output sector
8923         number in decimal form.
8925         * disk/ata.c: Use named constants for status bits.
8927 2008-07-04  Pavel Roskin  <proski@gnu.org>
8929         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
8930         grub_addr_t before casting it to the void pointer to fix a
8931         warning.  Non-addressable regions are discarded earlier.
8932         (grub_arch_modules_addr): Cast _end to grub_addr_t.
8933         * kern/i386/linuxbios/table.c: Include grub/misc.h.
8934         (check_signature): Don't shadow table_header.
8935         (grub_linuxbios_table_iterate): Cast numeric constants to
8936         grub_linuxbios_table_header_t.
8937         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
8938         grub_stop().
8940         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
8941         prevent warnings.
8943         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
8944         pointer, which can cause warnings.  Support 64-bit addresses.
8946         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
8947         of sizeof(long).  This fixes PowerPC image generation on x86_64.
8949 2008-07-04  Robert Millan  <rmh@aybabtu.com>
8951         This fixes a performance issue when pc & gpt partmap iterators
8952         didn't abort iteration even after our hook found what it was
8953         looking for (often causing expensive probes of non-existent drives).
8955         Some callers relied on previous buggy behaviour, since they would
8956         raise an error when their own hooks caused early abortion of its
8957         iteration.
8959         * kern/device.c (grub_device_open): Improve error message.
8960         * disk/lvm.c (grub_lvm_open): Likewise.
8961         * disk/raid.c (grub_raid_open): Likewise.
8963         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
8964         when hook requests it, independently of grub_errno.
8965         (pc_partition_map_probe): Do not fail when find_func() caused
8966         early abortion of pc_partition_map_iterate().
8968         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
8969         when hook requests it, independently of grub_errno.
8970         (gpt_partition_map_probe): Do not fail when find_func() caused
8971         early abortion of gpt_partition_map_iterate().
8973         * kern/partition.c (grub_partition_iterate): Abort parent iteration
8974         when hook requests it, independently of grub_errno.  Do not fail when
8975         part_map_iterate_hook() caused early abortion of p->iterate().
8977         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
8978         when grub_partition_iterate() returned with non-zero.
8980 2008-07-03  Pavel Roskin  <proski@gnu.org>
8982         * disk/ata.c (grub_ata_pio_write): Check status before writing,
8983         like we do in grub_ata_pio_read().
8984         (grub_ata_readwrite): Always write individual sectors.  Fix the
8985         sector count for the remainder.
8986         (grub_ata_write): Enable writing to ATA devices.  Correctly
8987         report error for ATAPI devices.
8989 2008-07-02  Pavel Roskin  <proski@gnu.org>
8991         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
8992         warning.
8994         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
8995         for every read sector, we already increment it for the whole
8996         batch.  This fixes reading more than 256 sectors at once.
8998         * util/grub-editenv.c (cmd_info): Cast argument to long
8999         explicitly.  ptrdiff_t reduces to int on i386.
9001         * util/grub-editenv.c (main): Be specific which parameter is
9002         missing.
9004         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
9005         (memdisk): Make memdisk_orig_addr a pointer.
9007         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
9008         for file offsets, use grub_off_t instead.  Fix printf format
9009         warnings.
9011         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
9012         there.  Real unexpected warnings should not drown in the noise
9013         about known problems.
9015         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
9016         grub_disk_addr_t for memory addresses.
9018         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
9019         explicitly to fix a warning.
9021         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
9023         * Makefile.in (MODULE_LDFLAGS): New variable.
9024         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
9025         the linker accepts --build-id=none.
9026         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
9027         MODULE_LDFLAGS.
9028         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
9030         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
9031         those in Linux XFS code.  Provide a way to access 64-bit parent
9032         inode.
9033         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
9034         the end of struct grub_xfs_dir_header.
9036 2008-07-02  Bean  <bean123ch@gmail.com>
9038         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
9039         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9040         and GRUB_IEEE1275_FLAG_NO_ANSI.
9042         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
9043         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9044         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
9046         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
9047         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
9049         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
9050         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
9052         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
9053         esc sequence on non ANSI terminal.
9054         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
9056         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
9057         beginning of file.
9059 2008-07-02  Bean  <bean123ch@gmail.com>
9061         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
9062         (grub_editenv_SOURCES): New variable.
9063         (pkglib_MODULES): Add loadenv.mod.
9064         (loadenv_mod_SOURCES): New variable.
9065         (loadenv_mod_CFLAGS): Likewise.
9066         (loadenv_mod_LDFLAGS): Likewise.
9068         * include/grub/envblk.h: New file.
9070         * util/envblk.c: New file.
9072         * util/grub-editenv.c: New file.
9074         * commands/loadenv.c: New file.
9076 2008-07-01  Pavel Roskin  <proski@gnu.org>
9078         * include/multiboot2.h (struct multiboot_tag_module): Use char,
9079         not unsigned char.  This fixes warnings and is consistent with
9080         other tags.
9082         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
9084         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
9086         * term/tparm.c (analyze): Always set *popcount.
9088         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
9089         cast to fix a warning.
9091         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
9092         cast to suppress a warning.
9094         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
9095         grub_fshelp_read_file() expects.
9097         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
9098         write uuid as a 32-bit value in CPU byte order, so declare and
9099         use it as such.
9101         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
9102         long if the format specifier expects it.
9103         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
9104         * partmap/pc.c (pc_partition_map_iterate): Likewise.
9105         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
9106         long to fix a warning.
9107         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
9108         grub_dprintf() arguments to fix warnings.
9110 2008-06-30  Pavel Roskin  <proski@gnu.org>
9112         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
9113         install_bsd_part immediately before core.img is embedded or
9114         modified on disk.  This fixes core.img verification if core.img
9115         cannot be embedded.
9117         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
9118         core_path to calculate the blocklist.
9119         Patch from Javier Martín <lordhabbit@gmail.com>
9121 2008-06-29  Robert Millan  <rmh@aybabtu.com>
9123         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
9124         block to disk block.
9125         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
9126         Patch from Niels Böhm <bitbucket@arcor.de>
9128 2008-06-29  Robert Millan  <rmh@aybabtu.com>
9130         * util/update-grub_lib.in (font_path): Search for fonts in
9131         /boot/grub first, which is more likely to be readable (we aren't
9132         deciding where fonts live, just looking for them).
9134 2008-06-26  Pavel Roskin  <proski@gnu.org>
9136         * util/biosdisk.c (read_device_map): Don't leave dead map
9137         entries for devices failing stat() check.
9139         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
9140         core_path_dev for the core.img path on the target device.
9142 2008-06-26  Robert Millan  <rmh@aybabtu.com>
9144         * disk/fs_uuid.c: New file.
9145         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
9146         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
9147         (fs_uuid_mod_LDFLAGS): New variables.
9148         * include/grub/disk.h (grub_disk_dev_id): Add
9149         `GRUB_DISK_DEVICE_UUID_ID'.
9150         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
9151         implement iterate().
9153 2008-06-26  Robert Millan  <rmh@aybabtu.com>
9155         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
9156         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
9157         Linux image includes no initrd.
9159 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
9161         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
9162         call to resolve the core image location that effectively appended the
9163         name twice.
9165 2008-06-21  Robert Millan  <rmh@aybabtu.com>
9167         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
9168         call from here ...
9170         * util/grub.d/10_hurd.in: ... to here ...
9171         * util/grub.d/10_linux.in: ... and here.
9173 2008-06-19  Robert Millan  <rmh@aybabtu.com>
9175         * kern/main.c (grub_main): Export `prefix' variable immediately
9176         after it has been set by grub_machine_set_prefix().
9178 2008-06-19  Robert Millan  <rmh@aybabtu.com>
9180         * commands/search.c (search_label, search_fs_uuid, search_file): Print
9181         search result when not saving to variable, not the other way around.
9182         When saving to variable, abort iteration as soon as a match is found.
9184 2008-06-19  Robert Millan  <rmh@aybabtu.com>
9186         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
9187         check for partition that provides /boot/grub.  Its logic is flawed,
9188         as it prevents prepare_grub_to_access_device() from being called
9189         multiple times.
9191 2008-06-19  Robert Millan  <rmh@aybabtu.com>
9193         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
9194         "insmod" command directly when abstraction modules are needed,
9195         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
9196         since it had already been processed).
9198 2008-06-19  Pavel Roskin  <proski@gnu.org>
9200         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
9201         changed.  This is needed in case GRUB_LIBDIR changes.
9202         * conf/i386-ieee1275.rmk: Likewise.
9203         * conf/i386-linuxbios.rmk: Likewise.
9204         * conf/i386-pc.rmk: Likewise.
9205         * conf/powerpc-ieee1275.rmk: Likewise.
9207 2008-06-18  Pavel Roskin  <proski@gnu.org>
9209         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
9210         kernel_elf_symlist.c to symlist.c for consistency with other
9211         architectures.  Update all users.
9212         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
9214 2008-06-18  Robert Millan  <rmh@aybabtu.com>
9216         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
9217         it in prefix.
9219         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
9220         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
9221         a RAID device, run setup() for all members independently on whether
9222         LVM abstraction is being used.
9223         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
9224         If grub-mkimage has set `*install_dos_part == -2', don't override this
9225         value.
9226         Perform *install_dos_part adjustments independently on whether
9227         we're embedding or not.
9228         Clarify error message when image is too big for embedding.
9229         Remove duplicate *install_dos_part stanza.
9231 2008-06-17  Robert Millan  <rmh@aybabtu.com>
9233         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
9234         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
9235         variables.
9236         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
9237         values in grub_ofconsole_normal_color and
9238         grub_ofconsole_highlight_color (they're not directly related to
9239         background and foreground).
9240         (grub_ofconsole_setcolorstate): Extract background and foreground
9241         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
9243 2008-06-17  Robert Millan  <rmh@aybabtu.com>
9245         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
9246         /boot/grub for the check in last commit, not /boot (they could be
9247         different partitions).
9249 2008-06-16  Robert Millan  <rmh@aybabtu.com>
9251         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
9252         asked to setup access for the same partition that provides /boot,
9253         don't bother using UUIDs since our root already has the value we
9254         want.
9256 2008-06-16  Robert Millan  <rmh@aybabtu.com>
9258         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
9259         I2O devices.
9260         Patch from Sven Mueller <sven@debian.org>.
9262 2008-06-16  Robert Millan  <rmh@aybabtu.com>
9264         * util/update-grub.in: Check for $EUID instead of $UID.
9265         Reported by Vincent Zweije.
9267 2008-06-16  Bean  <bean123ch@gmail.com>
9269         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
9270         (grub_ext2_read_block): Likewise.
9271         (grub_ext2_read_inode): Likewise.
9272         (grub_ext2_mount): Likewise.
9273         (grub_ext2_close): Likewise.
9274         (grub_ext3_get_journal): Removed.
9276         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
9277         (grub_reiserfs_read_symlink): Likewise.
9278         (grub_reiserfs_mount): Likewise.
9279         (grub_reiserfs_open): Likewise.
9280         (grub_reiserfs_read): Likewise.
9281         (grub_reiserfs_close): Likewise.
9282         (grub_reiserfs_get_journal): Removed.
9284         * fs/fshelp.c (grub_fshelp_read): Removed.
9285         (grub_fshelp_map_block): Likewise.
9287         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
9288         (grub_fshelp_journal): Likewise.
9289         (grub_fshelp_read): Likewise.
9290         (grub_fshelp_map_block): Likewise.
9292 2008-06-16  Pavel Roskin  <proski@gnu.org>
9294         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
9295         floating point anymore.
9296         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
9298 2008-06-15  Pavel Roskin  <proski@gnu.org>
9300         * commands/ls.c (grub_ls_list_files): Use integer calculations
9301         for human readable format, avoid floating point use.
9302         * kern/misc.c (grub_ftoa): Remove.
9303         (grub_vsprintf): Remove floating point support.
9305 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9307         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
9308         devices.
9309         Reported by Max Vozeler.
9311 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9313         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
9314         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
9315         skipped later.
9316         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
9317         the beginning of the prefix.
9319         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
9320         It is assumed that if we have a memdisk, grub-mkimage has set
9321         grub_prefix to include the "(memdisk)" drive in it.
9323 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9325         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
9326         Initialize keyboard controller after registering the terminal, so that
9327         grub_printf() can be called from grub_keyboard_controller_init().
9329 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9331         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
9332         extent-btree which is written as big endian on disk.
9333         Reported by Alain Greppin  <al@chilibi.org>.
9335 2008-06-14  Robert Millan  <rmh@aybabtu.com>
9337         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
9338         * util/i386/pc/grub-install.in (modules): Likewise.
9340 2008-06-13  Pavel Roskin  <proski@gnu.org>
9342         * commands/ls.c (grub_ls_list_files): Fix format warnings.
9344 2008-06-13  Bean  <bean123ch@gmail.com>
9346         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
9348         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
9350         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
9351         to indicate sparse block.
9353 2008-06-12  Pavel Roskin  <proski@gnu.org>
9355         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
9356         number, grub_fshelp_read() does it for us.
9358         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
9359         linear disk read with journal translation.
9360         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
9361         * include/grub/fshelp.h: Declare grub_fshelp_read().
9363 2008-06-09  Pavel Roskin  <proski@gnu.org>
9365         * fs/minix.c (grub_minix_mount): Handle error reading
9366         superblock.
9368 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9370         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
9371         don't append the RAID prefix afterwards.
9372         Reported by Clint Adams.
9374 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9376         Based on description from Pavel:
9377         * kern/disk.c (grub_disk_check_range): Rename to ...
9378         (grub_disk_adjust_range): ... this.  Add a comment explaining the
9379         tasks performed by this function.
9381 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9383         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
9384         `num_serial' (for consistency with other variables).
9385         (struct grub_ntfs_data): Add `uuid' member.
9386         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
9387         (grub_ntfs_uuid): New function.
9388         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
9390 2008-06-07  Pavel Roskin  <proski@gnu.org>
9392         * util/biosdisk.c (open_device): Revert last change to the
9393         function, it broke installation.  The sector needs to be
9394         different dependent on which device is opened.
9396 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9398         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
9399         rest of GRUB, and breakage doesn't happen if its value were modified.
9401         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9402         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
9403         a constant (same value).
9404         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
9405         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
9407 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9409         * util/biosdisk.c (open_device): Do not modify sector offset when
9410         accessing a partition.  kern/disk.c already handles this for us.
9412 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9414         * util/grub-emu.c (grub_machine_init): Move code in this function from
9415         here ...
9416         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
9417         segfault in case grub_printf() is called).
9419         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
9420         grub_probe.  Update all users not to explicitly add it again.
9421         (grub_device): New variable; contains corresponding device for grubdir.
9422         (fs_module, partmap_module, devabstraction_module): Pass
9423         `--device ${grub_device}' to grub_probe to avoid traversing /dev
9424         every time.
9426 2008-06-05  Robert Millan  <rmh@aybabtu.com>
9428         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
9429         is found, print it (same layout as with labels).
9431 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9433         * util/biosdisk.c (get_drive): Rename to ...
9434         (find_grub_drive): ... this.  Update all users.
9436         (get_os_disk): Rename to ...
9437         (convert_system_partition_to_system_disk): ... this.  Update all users.
9439         (find_drive): Rename to ...
9440         (find_system_device): ... this.  Update all users.
9442 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9444         * util/biosdisk.c (get_os_disk): Handle IDA devices.
9445         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9446         (make_device_map): Likewise.
9448 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9450         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
9451         before dereferencing it.
9453         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
9454         union with fat12/fat16-specific ones.  Add some new fields, including
9455         `num_serial' for both versions.
9456         (struct grub_fat_data): Add `uuid' member.
9457         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
9458         names.  Initialize `data->uuid' using `num_serial'.
9459         (grub_fat_uuid): New function.
9460         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
9462         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
9463         (grub_reiserfs_uuid): New function.
9464         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
9465         member.
9467         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
9468         (grub_xfs_uuid): New function.
9469         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
9471 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9473         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
9474         code that is backward compatible with pre-uuid search command.
9476 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9478         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
9479         floppies after everything else, to ensure floppy drive isn't accessed
9480         unnecessarily (patch from Bean).
9482 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9484         * commands/search.c (search_label, search_fs_uuid, search_file): Do
9485         not print device names when we were asked to set a variable.
9487 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9489         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
9490         using "cursor-on" and "cursor-off" commands (understood at least by
9491         the Open Firmware flavour on OLPC).
9493 2008-05-31  Michael Gorven  <michael@gorven.za.net>
9495         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
9496         on and off sequences.
9498 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9500         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
9501         * util/update-grub.in: Likewise.
9503 2008-05-30  Pavel Roskin  <proski@gnu.org>
9505         * util/biosdisk.c (linux_find_partition): Simplify logic and
9506         make the code more universal.  Keep special processing for
9507         devfs, but use a simple rule for all other devices.  If the
9508         device ends with a number, append 'p' and the partition number.
9509         Otherwise, append only the partition number.
9511 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9513         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
9514         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
9515         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
9516         the `root' parameter to Linux.
9518 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9520         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
9521         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
9522         --fs_uuid with --fs-uuid.
9523         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
9524         all filesystems support them).
9526 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9528         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
9529         grub_printf() flags, since we're printing in units of 2 bytes.
9531 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9533         * util/grub.d/00_header.in: Remove obsolete comment referencing
9534         convert_system_path_to_grub_path().
9535         * util/update-grub.in: Likewise.
9536         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
9537         (convert_system_path_to_grub_path): Add a warning message explaining
9538         that this function is deprecated.  Rely on is_path_readable_by_grub()
9539         for the readability checks.
9540         (font_path): Use is_path_readable_by_grub() for the readability
9541         check rather than convert_system_path_to_grub_path().
9543 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9545         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
9546         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
9547         converting it first.
9548         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
9549         grub.cfg for access to font file, and afterwards call it again to set
9550         the root device.
9552 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9554         * commands/search.c (options): Add --fs_uuid option.
9555         (search_fs_uuid): New function.
9556         (grub_cmd_search): Fix --set argument passing.
9557         Use search_fs_uuid() when requested via --fs_uuid.
9558         (grub_search_init): Update help message.
9559         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
9560         and redeclare it as an array of 16-bit words.
9561         (grub_ext2_uuid): New function.
9562         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
9563         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
9564         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
9565         (GRUB_DEVICE_BOOT_UUID): New variables.
9566         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
9567         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
9568         whenever possible.
9569         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
9570         just assume `root' variable has the right value.
9571         * util/grub.d/10_linux.in: Likewise.
9572         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
9573         via PRINT_FS_UUID.
9574         (main): Recognise `-t fs_uuid' argument.
9576 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9578         * util/biosdisk.c (map): Redefine structure to hold information
9579         about GRUB drive name.
9580         (get_drive): Reimplement without assuming (and verifying) BIOS-like
9581         drive names.
9582         (call_hook): Remove.
9583         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
9584         member.  Assume drive has partitions.
9585         (grub_util_biosdisk_open): Access device names via `.device' struct
9586         member.
9587         (open_device): Likewise.
9588         (find_drive): Likewise.
9589         (read_device_map): Adjust map[] usage to match the new struct
9590         definition.  Don't check for duplicates (still possible, but not cheap
9591         anymore).
9592         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
9593         (make_device_name): Remove assumption of BIOS-like drive names.
9595 2008-05-30  Pavel Roskin  <proski@gnu.org>
9597         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
9598         compiling execute.c doesn't need grub_script.tab.h anymore.
9599         (normal/command.c_DEPENDENCIES): Likewise.
9600         (normal/function.c_DEPENDENCIES): Likewise.
9601         * conf/i386-ieee1275.rmk: Likewise.
9602         * conf/i386-linuxbios.rmk: Likewise.
9603         * conf/i386-pc.rmk: Likewise.
9604         * conf/powerpc-ieee1275.rmk: Likewise.
9605         * conf/sparc64-ieee1275.rmk: Likewise.
9607 2008-05-29  Pavel Roskin  <proski@gnu.org>
9609         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
9610         when scanning metadata for volume group name.
9612         * include/grub/script.h: Don't include grub_script.tab.h.  It's
9613         a generated file, which may only be included from the files with
9614         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
9615         use union YYSTYPE, as the later allows forward declaration.
9616         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
9618 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9620         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
9621         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
9622         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
9623         (grub_console_checkkey): Add grub_dprintf() call to report unknown
9624         scan codes.
9626 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9628         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
9629         control key combinations.
9631 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9633         * util/powerpc/ieee1275/grub-install.in: Move from here ...
9634         * util/ieee1275/grub-install.in: ... to here.
9635         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
9636         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
9637         (grub_install_SOURCES): Likewise.
9639 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9641         * fs/affs.c: Update copyright year.
9642         * fs/ext2.c: Likewise.
9643         * fs/fshelp.c: Likewise.
9644         * fs/hfsplus.c: Likewise.
9645         * fs/ntfs.c: Likewise.
9646         * fs/xfs.c: Likewise.
9647         * include/grub/fshelp.h: Likewise.
9648         * util/grub-mkdevicemap.c: Likewise.
9650 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9652         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
9653         might need to be fatfs to support some firmware implementations
9654         (e.g. OFW or EFI).
9656 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9658         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
9659         devices.
9660         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9661         (make_device_map): Likewise.
9663 2008-05-20  Bean  <bean123ch@gmail.com>
9665         * fs/fshelp.c (grub_fshelp_map_block): New function.
9666         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
9667         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
9669         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
9670         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
9671         (grub_fshelp_journal): New structure.
9672         (grub_fshelp_map_block): New function prototype.
9673         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
9674         (grub_fshelp_map_block): Likewise.
9676         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
9677         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
9678         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
9679         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
9680         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
9681         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
9682         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
9683         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
9684         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
9685         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
9686         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
9687         (grub_ext2_sblock): New members for journal support.
9688         (grub_ext3_journal_header): New structure.
9689         (grub_ext3_journal_revoke_header): Likewise.
9690         (grub_ext3_journal_block_tag): Likewise.
9691         (grub_ext3_journal_sblock): Likewise.
9692         (grub_fshelp_node): New members logfile and journal.
9693         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
9694         grub_fshelp_map_block to get real block number.
9695         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
9696         number.
9697         (grub_ext2_read_inode): Likewise.
9698         (grub_ext3_get_journal): New function.
9699         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
9700         (grub_ext2_close): Release memory used by journal.
9702         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
9703         (REISERFS_MAGIC_DESC_BLOCK): New macro.
9704         (grub_reiserfs_transaction_header): Renamed to
9705         grub_reiserfs_description_block, replace field data with real_blocks.
9706         (grub_reiserfs_commit_block): New structure.
9707         (grub_reiserfs_data): New member journal.
9708         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
9709         number.
9710         (grub_reiserfs_read_symlink): Likewise.
9711         (grub_reiserfs_iterate_dir): Likewise.
9712         (grub_reiserfs_open): Likewise.
9713         (grub_reiserfs_read): Likewise.
9714         (grub_reiserfs_get_journal): New function.
9715         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
9716         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
9717         using grub_reiserfs_get_journal.
9718         (grub_reiserfs_close): Release memory used by journal.
9720         * fs/affs.c (grub_affs_read_block): Change block type to
9721         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
9723         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
9725         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
9727         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
9729         * fs/udf.c (grub_udf_read_block): Change block type to
9730         grub_disk_addr_t. Use type cast to avoid warning.
9732         * fs/xfs.c (grub_xfs_read_block): Likewise.
9734 2008-05-16  Christian Franke  <franke@computer.org>
9736         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
9737         to ensure that break with ESC will always work.
9738         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
9739         Remove ESC from keyboard queue.
9741 2008-05-16  Christian Franke  <franke@computer.org>
9743         * util/biosdisk.c: [__CYGWIN__] Add includes.
9744         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
9745         (get_os_disk): Move variable declarations to OS specific
9746         parts to avoid warning.
9747         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
9748         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
9749         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
9750         Cygwin.
9751         * util/getroot.c: [__CYGWIN__] Add includes.
9752         (strip_extra_slashes): Fix "/" case.
9753         [__CYGWIN__] (get_win32_path): New function.
9754         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
9755         [__CYGWIN__] (find_root_device): Disable.
9756         [__CYGWIN__] (get_bootsec_serial): New function.
9757         [__CYGWIN__] (find_cygwin_root_device): Likewise.
9758         [__linux__] (grub_guess_root_device): Add early returns to simplify
9759         structure.
9760         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
9761         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
9762         check for Linux only.
9764 2008-05-15  Bean  <bean123ch@gmail.com>
9766         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
9767         keyboard hang problem in apple's intel mac.
9769 2008-05-09  Robert Millan  <rmh@aybabtu.com>
9771         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
9772         devices.
9773         * util/grub-mkdevicemap.c (get_virtio_disk_name)
9774         (make_device_map): Likewise.
9775         Reported by Aurelien Jarno <aurel32@debian.org>
9777 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
9779         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
9780         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
9781         (make_device_map): Output entries for xvd type disks.
9783 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9785         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
9786         devices.
9787         * util/grub-mkdevicemap.c (get_cciss_disk_name)
9788         (make_device_map): Likewise.
9789         Reported by Roland Dreier <rdreier@cisco.com>
9791 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9793         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
9794         grub_strstr() call.  Correct a few mistakes in failure path handling.
9796 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9798         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9799         Do not print a trailing slash (therefore, the root directory is an
9800         empty string).
9801         (convert_system_path_to_grub_path): Do not remove trailing slash
9802         from make_system_path_relative_to_its_root() output.
9804         * util/i386/pc/grub-install.in: Add trailing slash to output from
9805         make_system_path_relative_to_its_root().
9807 2008-05-06  Robert Millan  <rmh@aybabtu.com>
9809         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
9810         ensures that output lines aren't intermangled with those sent to
9811         stderr (via grub_util_info()).
9812         * util/grub-probe.c (grub_refresh): Likewise.
9813         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
9815 2008-05-05  Christian Franke  <franke@computer.org>
9817         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
9818         Add Cygwin device names.
9819         (get_ide_disk_name) [__CYGWIN__]: Likewise.
9820         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
9821         (check_device): Return error instead of success on empty name.
9822         (make_device_map): Move label inside linux specific code to
9823         prevent compiler warning.
9825 2008-04-30  Robert Millan  <rmh@aybabtu.com>
9827         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
9828         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
9829         first boot option.
9830         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
9832 2008-04-29  Robert Millan  <rmh@aybabtu.com>
9834         * docs/grub.cfg: New file (example GRUB configuration).
9836 2008-04-26  Robert Millan  <rmh@aybabtu.com>
9838         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
9839         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
9840         and `disk/ieee1275/nand.c'.
9842 2008-04-25  Bean  <bean123ch@gmail.com>
9844         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
9845         i386-linuxbios.
9847         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
9848         change the buffer size to 4096 for cdrom device.
9850         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
9851         and nand.mod.
9852         (_linux_mod_SOURCES): New variable.
9853         (_linux_mod_CFLAGS): Likewise.
9854         (_linux_mod_LDFLAGS): Likewise.
9855         (linux_mod_SOURCES): Likewise.
9856         (linux_mod_CFLAGS): Likewise.
9857         (linux_mod_LDFLAGS): Likewise.
9858         (nand_mod_SOURCES): Likewise.
9859         (nand_mod_CFLAGS): Likewise.
9860         (nand_mod_LDFLAGS): Likewise.
9862         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
9863         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
9864         type property. (nand device in olpc don't have this property)
9866         * include/grub/disk.h (grub_disk_dev_id): New macro
9867         GRUB_DISK_DEVICE_NAND_ID.
9869         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
9870         function prototype.
9871         (grub_rescue_cmd_initrd): Likewise.
9873         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
9874         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
9875         ofw_cif_handler and ofw_idt, adjust padding number.
9877         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
9878         GRUB_MACHINE_IEEE1275 is defined.
9880         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
9881         Use NESTED_FUNC_ATTR attribute on the hook parameter.
9883         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
9884         on nested function heap_init.
9885         (grub_upper_mem): New variable for i386-ieee1275.
9886         (grub_get_extended_memory): New function for i386-ieee1275.
9887         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
9889         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
9890         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
9891         property.
9893         * loader/i386/ieee1275/linux.c: New file.
9895         * loader/i386/ieee1275/linux_normal.c: New file.
9897         * disk/ieee1275/nand.c: New file.
9899 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
9901         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
9902         value.
9903         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
9905 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9907         Restructures early code path on ieee1275 to unify grub_main() as
9908         the first C function that is executed in every platform.
9910         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
9911         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
9912         cmain().
9913         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
9914         * kern/ieee1275/cmain.c (cmain): Rename to ...
9915         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
9916         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
9917         at the beginning.
9919 2008-04-18  Robert Millan  <rmh@aybabtu.com>
9921         * util/update-grub.in: Fix syntax error when setting
9922         `GRUB_PRELOAD_MODULES'.
9923         Reported by Stephane Chazelas <stephane@artesyncp.com>
9925 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
9927         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
9928         section into account, newer toolchains generate unique build ids
9929         * configure.ac: remove the test for --build-id=none acceptance,
9930         we want build ids to be preserved
9931         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
9932         far from other sections don't cause the raw binary images grow
9933         size
9935 2008-04-15  Robert Millan  <rmh@aybabtu.com>
9937         * disk/lvm.c: Update copyright year.
9938         * kern/misc.c: Likewise.
9940 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9942         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
9943         there is no memory left for physical volume name.
9945 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
9947         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
9948         volume name mapping to support bigger than 9 character names properly.
9950 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9952         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
9953         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
9955 2008-04-13  Christian Franke  <franke@computer.org>
9957         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
9958         to create a floppy emulation boot CD when non emulation mode
9959         does not work.
9960         Enable Joliet CD filesystem extension.
9962 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9964         * kern/misc.c (grub_strncat): Fix off-by-one error.
9965         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
9967         * kern/env.c (grub_env_context_close): Clear current context, not
9968         previous one.
9969         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
9971         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
9973 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9975         Improve robustness when handling LVM.
9977         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
9978         (and leave `*p' unmodified).
9979         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
9980         through it.
9981         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
9982         iterating through it.
9983         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
9984         through it.
9985         (grub_lvm_scan_device): Check the return value (and fail gracefully
9986         when due) on each grub_lvm_getvalue() or grub_strstr() call.
9987         Don't assume `vg->pvs != NULL' when iterating through it.
9989 2008-04-13  Robert Millan  <rmh@aybabtu.com>
9991         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
9992         * genmk.rb (partmap): New variable.
9993         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
9994         (#{partmap}): New target rule.
9995         * genpartmaplist.sh: New file.
9996         * Makefile.in (pkglib_DATA): Add partmap.lst.
9997         (partmap.lst): New target rule.
9998         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
9999         modules (including all partition maps), instead of preloading them.
10001 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
10003         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
10004         `linux-boot-prober' (if installed) to detect other operating
10005         systems which are installed on the computer and add them to
10006         the boot menu.
10007         * conf/common.rmk: Build and install 30_os-prober.
10009 2008-04-12  Robert Millan  <rmh@aybabtu.com>
10011         * kern/powerpc/ieee1275/init.c: Move from here ...
10012         * kern/ieee1275/init.c: ... to here.  Update all users.
10014         * kern/powerpc/ieee1275/cmain.c: Move from here ...
10015         * kern/ieee1275/cmain.c: ... to here.  Update all users.
10017         * kern/powerpc/ieee1275/openfw.c: Move from here ...
10018         * kern/ieee1275/openfw.c: ... to here.  Update all users.
10020         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
10021         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
10023 2008-04-10  Pavel Roskin  <proski@gnu.org>
10025         * configure.ac: Always use "_cv_" in cache variables for
10026         compatibility with Autoconf 2.62.
10028 2008-04-07  Robert Millan  <rmh@aybabtu.com>
10030         Revert grub/machine/init.h addition by Pavel (since it breaks on
10031         i386-ieee1275 and others):
10032         * util/i386/pc/misc.c: Remove grub/machine/init.h.
10033         * util/powerpc/ieee1275/misc.c: Likewise.
10035 2008-04-07  Robert Millan  <rmh@aybabtu.com>
10037         * util/grub-probe.c (probe): Improve error message.
10039 2008-04-07  Robert Millan  <rmh@aybabtu.com>
10041         * util/biosdisk.c (read_device_map): Skip devices that don't exist
10042         (this prevents the presence of a bogus entry from ruining the whole
10043         thing).
10045 2008-04-06  Pavel Roskin  <proski@gnu.org>
10047         * util/biosdisk.c: Include grub/util/biosdisk.h.
10048         * util/grub-fstest.c (execute_command): Make static.
10049         * util/grub-mkdevicemap.c (check_device): Likewise.
10050         * util/i386/pc/misc.c: Include grub/machine/init.h.
10051         * util/powerpc/ieee1275/misc.c: Likewise.
10052         * util/lvm.c: Include grub/util/lvm.h.
10053         * util/misc.c: Include grub/kernel.h, grub/misc.h and
10054         grub/cache.h.
10055         * util/raid.c: Include grub/util/raid.h.
10056         (grub_util_getdiskname): Make static.
10058         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
10059         grub_hostfs_fini(), as they are called from grub_init_all() and
10060         grub_fini_all() respectively.  This fixes an infinite loop in
10061         grub-fstest due to double registration of hostfs.
10062         Reported by Christian Franke <Christian.Franke@t-online.de>
10064 2008-04-05  Pavel Roskin  <proski@gnu.org>
10066         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
10067         all 8 functions.  Otherwise, probe function 0 only.
10069 2008-04-04  Pavel Roskin  <proski@gnu.org>
10071         * commands/lspci.c (grub_lspci_iter): Print the bus number
10072         correctly.
10074         * commands/lspci.c (grub_pci_classes): Fix typos.
10075         (grub_lspci_iter): Don't print func twice.  Print vendor ID
10076         before device ID, as it's normally done.
10078         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10079         Fix signedness warnings.
10080         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
10081         Likewise.
10082         * util/ieee1275/get_disk_name.c: Include config.h so that
10083         _GNU_SOURCE is defined and getline() is declared.  Mark an
10084         unused argument as such.  Fix a signedness warning.
10086 2008-04-02  Pavel Roskin  <proski@gnu.org>
10088         * genkernsyms.sh.in: Use more robust assignments for CC and
10089         srcdir.  Quote srcdir.
10090         * gensymlist.sh.in: Likewise.  Assert at the compile time that
10091         the symbol table is not empty.
10093         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
10094         * fs/cpio.c (grub_cpio_read): Likewise.
10096 2008-04-01  Pavel Roskin  <proski@gnu.org>
10098         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
10099         * disk/host.c (grub_host_open): Likewise.
10100         * disk/loopback.c (grub_loopback_open): Likewise.
10101         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
10102         disk->id as in disk/host.c, not a multi-character constant.
10104         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
10105         later is obsolete, potentially dangerous and sets a bad example.
10106         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
10107         * util/misc.c (grub_util_get_image_size): Likewise.
10109         * disk/loopback.c (options): Improve help for "--partitions".
10111         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
10112         options to align them with the short options, e.g. "echo -e".
10114 2008-03-31  Bean  <bean123ch@gmail.com>
10116         * video/reader/png.c (grub_png_data): New member is_16bit and
10117         image_data.
10118         (grub_png_decode_image_header): Detect 16 bit png image.
10119         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
10120         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
10121         (grub_video_reader_png): Release memory occupied by image_data.
10123         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
10124         4096 bytes.
10125         (grub_nfs_mount): Skip the test for sector per cluster.
10127         * include/grub/ntfs.h (MAX_SPC): Removed.
10129 2008-03-31  Bean  <bean123ch@gmail.com>
10131         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
10132         (grub_probe_SOURCES): Add fs/afs.c.
10133         (grub_fstest_SOURCES): Likewise.
10134         (afs_mod_SOURCES): New variable.
10135         (afs_mod_CFLAGS): Likewise.
10136         (afs_mod_LDFLAGS): Likewise.
10138         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
10139         (grub_emu_SOURCES): Likewise.
10141         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10143         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10145         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10147         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10149         * fs/afs.c: New file.
10151 2008-03-30  Pavel Roskin  <proski@gnu.org>
10153         * disk/host.c: Include grub/misc.h to fix a warning.
10154         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
10155         warnings about implicit declarations.
10157         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
10158         variable.
10159         * include/grub/i386/loader.h: Change declaration of
10160         grub_linux_boot() to match what grub_loader_set() expects.
10161         * util/getroot.c (grub_guess_root_device): Return const char* to
10162         fix a warning.
10163         * util/grub-probe.c (probe): Fix a warning about uninitialized
10164         abstraction_name variable.
10165         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
10166         second argument as unused to fix a warning.
10168         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
10169         missing grub_error() call.
10171         * util/update-grub_lib.in: Define datarootdir, since Autoconf
10172         2.60 and newer uses it to define datadir.
10174         * commands/sleep.c: Fix warning about implicit declaration.
10175         * disk/memdisk.c: Likewise.
10176         * loader/aout.c: Likewise.
10177         * loader/i386/bsd_normal.c: Likewise.
10178         * util/grub-probe.c: Likewise.
10180         * commands/i386/cpuid.c (has_longmode): Make static.
10181         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
10182         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
10184         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
10185         GDT.  This is more robust, as %ds can change.
10186         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
10187         calling real_to_prot().
10188         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
10190 2008-03-28  Pavel Roskin  <proski@gnu.org>
10192         * kern/i386/pc/startup.S: Assert that uncompressed functions
10193         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
10194         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
10195         code, as they push parts of the code (error handlers) beyond
10196         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
10197         code as correctness and size.
10199 2008-03-28  Pavel Roskin  <proski@gnu.org>
10201         * kern/i386/pc/startup.S
10202         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
10203         data block address to the real mode, keep offset minimal.  This
10204         works around a bug in AWARD BIOS on old Athlon systems, which
10205         makes CD detection hang.
10207 2008-03-26  Pavel Roskin  <proski@gnu.org>
10209         * normal/color.c (grub_parse_color_name_pair): Make `name' a
10210         const.
10211         * include/grub/normal.h: Add grub_parse_color_name_pair()
10212         declaration.
10214 2008-03-24  Bean  <bean123ch@gmail.com>
10216         * disk/i386/pc/biosdisk.c (cd_start): Removed.
10217         (cd_count): Removed.
10218         (cd_drive): New variable.
10219         (grub_biosdisk_get_drive): Don't check for (cdN) device.
10220         (grub_biosdisk_call_hook): Likewise.
10221         (grub_biosdisk_iterate): Change cdrom detection method.
10222         (grub_biosdisk_open): Replace cd_start with cd_drive.
10223         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
10224         detect cdrom device.
10226         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
10227         Removed.
10228         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
10229         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
10230         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
10231         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
10232         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
10233         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
10234         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
10235         (grub_biosdisk_cdrp): New structure.
10236         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
10238         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
10240         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
10241         device.
10243         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
10244         New function.
10246 2008-03-20  Robert Millan  <rmh@aybabtu.com>
10248         Remove 2 TiB limit in ata.mod.
10249         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
10250         (grub_ata_dumpinfo): Print sector count with 0x%llx.
10251         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
10252         grub_uint64_t instead of grub_uint32_t.
10254 2008-03-05  Bean  <bean123ch@gmail.com>
10256         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
10257         (grub_multiboot): Set boot device.
10259         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
10261 2008-03-02  Bean  <bean123ch@gmail.com>
10263         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
10264         symlink_buffer.
10266 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
10268         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
10269         texinfo.tex.
10271         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
10272         modified.
10274         * docs/fdl.texi: New file.
10276         * docs/mdate-sh: New file. Copied from gnulib.
10277         * docs/texinfo.tex: Likewise.
10279         * config.guess: Updated from gnulib.
10280         * install-sh: Likewise.
10282 2008-02-28  Robert Millan  <rmh@aybabtu.com>
10284         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
10285         (aout_mod_SOURCES): New variable.
10286         (aout_mod_CFLAGS): Likewise.
10287         (aout_mod_LDFLAGS): Likewise.
10289         * conf/i386-ieee1275.rmk: Likewise.
10291 2008-02-28  Robert Millan  <rmh@aybabtu.com>
10293         * util/update-grub.in: Reorganise terminal validity check.  Accept
10294         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
10295         Based on suggestion by Franklin PIAT.
10297 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
10299         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
10300         function.
10301         * util/getroot.c (grub_util_check_block_device): New function that
10302         returns the given argument if it is a block device and returns NULL else.
10303         * util/grub-probe.c (argument_is_device): New variable.
10304         (probe): Promote device_name from a variable to an argument. Receive
10305         device_name from grub_util_check_block_device() if path is NULL and from
10306         grub_guess_root_device() else. Do not free() device_name anymore.
10307         (options): Introduce new parameter '-d, --device'.
10308         (main): Add description of the new parameter to the help screen.
10309         Rename path variable to argument. Set argument_is_device if the '-d'
10310         option is given. Pass argument to probe() depending on
10311         argument_is_device.
10313 2008-02-24  Bean  <bean123ch@gmail.com>
10315         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
10316         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
10317         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
10318         (GRUB_ISO9660_VOLDESC_PART): Likewise.
10319         (GRUB_ISO9660_VOLDESC_END): Likewise.
10320         (grub_iso9660_primary_voldesc): New member escape.
10321         (grub_iso9660_data): New member joliet.
10322         (grub_iso9660_convert_string): New function.
10323         (grub_iso9660_mount): Detect joliet extension.
10324         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
10325         (grub_iso9660_iso9660_label): Likewise.
10327         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
10328         (grub_setup_SOURCES): Add fs/udf.c.
10329         (grub_fstest_SOURCES): Likewise.
10330         (udf_mod_SOURCES): New variable.
10331         (udf_mod_CFLAGS): Likewise.
10332         (udf_mod_LDFLAGS): Likewise.
10334         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
10335         (grub_emu_SOURCES): Likewise.
10337         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10339         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10341         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10343         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10345         * fs/udf.c: New file.
10347 2008-02-24  Robert Millan  <rmh@aybabtu.com>
10349         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
10350         (normal/lexer.c_DEPENDENCIES): New variables.
10351         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10352         (normal/lexer.c_DEPENDENCIES): Likewise.
10353         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
10354         (normal/lexer.c_DEPENDENCIES): Likewise.
10355         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
10356         (normal/lexer.c_DEPENDENCIES): Likewise.
10357         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10358         (normal/lexer.c_DEPENDENCIES): Likewise.
10359         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10360         (normal/lexer.c_DEPENDENCIES): Likewise.
10362 2008-02-23  Robert Millan  <rmh@aybabtu.com>
10364         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
10365         since they were intended to be in hex.  This didn't break previously
10366         because of a bug in gpt_partition_map_iterate() (see below).
10368         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
10369         when checking the validity of GPT header.
10370         Remove `partno', since it always provides the same information as `i'.
10372 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
10374         * include/grub/efi/time.h: Fix a wrong comment.
10376 2008-02-19  Pavel Roskin  <proski@gnu.org>
10378         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
10379         message.
10381 2008-02-19  Bean  <bean123ch@gmail.com>
10383         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
10384         (aout_mod_SOURCES): New variable.
10385         (aout_mod_CFLAGS): Likewise.
10386         (aout_mod_LDFLAGS): Likewise.
10387         (_bsd_mod_SOURCES): New variable.
10388         (_bsd_mod_CFLAGS): Likewise.
10389         (_bsd_mod_LDFLAGS): Likewise.
10390         (bsd_mod_SOURCES): New variable.
10391         (bsd_mod_CFLAGS): Likewise.
10392         (bsd_mod_LDFLAGS): Likewise.
10394         * include/grub/aout.h: New file.
10396         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
10398         * include/grub/i386/bsd.h: New file.
10400         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
10401         to make it public.
10403         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
10404         function is called, so that it's possible to change it inside the hook.
10405         (grub_elf64_load): Likewise.
10406         (grub_elf_file): Don't close the file if elf header is not found.
10407         (grub_elf_close): Close the file if grub_elf_file fails (The new
10408         grub_elf_file won't close it).
10409         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
10410         (grub_elf64_size): Likewise.
10412         * kern/i386/loader.S (grub_unix_real_boot): New function.
10414         * loader/aout.c: New file.
10416         * loader/i386/bsd.c: New file.
10418         * loader/i386/bsd_normal.c: New file.
10420         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
10422         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
10423         can test other formats.
10425 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10427         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
10428         (grub_gpt_partition_type_empty): Redefine with macro from
10429         `<grub/gpt_partition.h>'.
10430         (gpt_partition_map_iterate): Adjust partition type comparison.
10432         Export `entry' as partmap-specific `part.data' struct.
10433         (grub_gpt_header, grub_gpt_partentry): Move from here ...
10435         * include/grub/gpt_partition.h (grub_gpt_header)
10436         (grub_gpt_partentry): ... to here (new file).
10438         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
10440         (grub_gpt_partition_type_bios_boot): New const variable, defined
10441         with macro from `<grub/gpt_partition.h>'.
10443         (setup): Replace `first_start' with `embed_region', which keeps
10444         track of the embed region (and is partmap-agnostic).
10446         Replace find_first_partition_start() with find_usable_region(),
10447         which finds a usable region for embedding using partmap-specific
10448         knowledge (supports PC/MSDOS and GPT).
10450         Fix all assumptions that the embed region start at sector 1, using
10451         `embed_region.start' from now on.  Similarly, use `embed_region.end'
10452         rather than `first_start' to calculate available size.
10454         In grub_util_info() message, replace "into after the MBR" with an
10455         indication of the specific sector our embed region starts at.
10457 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10459         * DISTLIST: Replace `commands/ieee1275/halt.c' and
10460         `commands/ieee1275/reboot.c' with `commands/halt.c' and
10461         `commands/reboot.c'.
10462         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10463         (halt_mod_SOURCES): Likewise.
10464         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10465         (halt_mod_SOURCES): Likewise.
10467 2008-02-17  Christian Franke  <franke@computer.org>
10469         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
10471 2008-02-17  Robert Millan  <rmh@aybabtu.com>
10473         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10474         set `first_start' to 0 for non-PC/MSDOS partition maps.
10476 2008-02-16  Robert Millan  <rmh@aybabtu.com>
10478         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10479         do not assume partition map is PC/MSDOS before performing checks that
10480         are specific to that layout.
10482 2008-02-13  Robert Millan  <rmh@aybabtu.com>
10484         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
10485         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
10486         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
10488 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
10490         * configure.ac: Only a cosmetic change on the handling of
10491         -fno-stack-protector.
10493 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
10495         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
10496         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
10497         reboot.c.
10498         (grub_install_SOURCES): Add halt.mod and reboot.mod.
10499         (halt_mod_SOURCES): New variable.
10500         (halt_mod_CFLAGS): Likewise.
10501         (halt_mod_LDFLAGS): Likewise.
10502         (reboot_mod_SOURCES): Likewise.
10503         (reboot_mod_CFLAGS): Likewise.
10504         (reboot_mod_LDFLAGS): Likewise.
10506         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
10507         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
10508         reboot.c.
10509         (halt_mod_SOURCES): Likewise.
10510         (reboot_mod_SOURCES): Likewise.
10512         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
10513         commands/i386/pc/reboot.c by commands/reboot.c.
10514         (reboot_mod_SOURCES): Likewise.
10516         * commands/i386/pc/reboot.c: merge this file ...
10518         * commands/ieee1275/reboot.c: ... and this file ...
10520         * commands/reboot.c: ... to this file.
10521         Add some precompiler directive to include the correct header for
10522         each machine.
10524         * commands/ieee1275/halt.c: move this file ...
10526         * commands/halt.c: ... to here.
10527         Add some precompiler directive to include the correct header for
10528         each machine.
10530         * include/grub/efi/efi.h (grub_reboot): New function declaration.
10531         (grub_halt): Likewise.
10533         * kern/efi/efi.c (grub_reboot): New function.
10534         (grub_halt): Likewise.
10536 2008-02-12  Robert Millan  <rmh@aybabtu.com>
10538         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
10539         /dev (like it is done for /dev/mapper).  This doesn't provide support
10540         for EVMS, but at least it is now easy to identify the problem when it
10541         arises.
10543 2008-02-11  Robert Millan  <rmh@aybabtu.com>
10545         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
10546         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
10547         comparing it with -1, not 0.
10549 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10551         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
10552         `disk/lvm.c'.
10553         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10554         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
10556         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
10557         `disk/lvm.c' to the end of the list.
10558         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10559         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10561 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10563         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
10564         grub_print_error() instead.  This will let user know why we're entering
10565         rescue mode.
10566         Based on suggestions from Sam Morris.
10568 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
10570         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
10571         on remaining N args, instead of "--" arg N times.
10573 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
10575         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
10576         (fill_with_default_glyph): Changed to use unknown_glyph for fill
10577         pattern for unknown glyphs.
10579 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10581         * configure.ac: Probe for `help2man'.
10582         * Makefile.in (builddir): New variable.
10583         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
10584         or otherwise add a few flags/options to it.
10585         (install-local): For every executable utility or script that is
10586         installed, invoke $(HELP2MAN) to install a manpage based on --help
10587         output.
10589         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
10590         that it doesn't prevent --help from working in build tree.
10592         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
10593         with `bug-grub@gnu.org'.
10594         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
10595         * util/update-grub.in (usage): New function.
10596         Implement proper argument check, with support for --help and --version
10597         (as well as existing -y).
10599 2008-02-09  Christian Franke  <franke@computer.org>
10601         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
10602         avoid overwriting previous output.
10603         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
10605 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10607         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
10608         drawing the menu.
10610 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10612         * commands/sleep.c: New file.
10613         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
10614         (sleep_mod_SOURCES): New variable.
10615         (sleep_mod_CFLAGS): Likewise.
10616         (sleep_mod_LDFLAGS): Likewise.
10618 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10620         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
10621         situations in which we can deduce the RAID size and the superblock
10622         doesn't match it.
10624 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10626         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
10627         and return a grub_diskmemberlist_t composed of LVM physical volumes.
10628         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
10630         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
10631         and return a grub_diskmemberlist_t composed of physical array members.
10632         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
10634         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
10635         prototype.
10636         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
10637         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
10638         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
10640         * util/grub-probe.c (probe): Move partmap probing code from here ...
10641         (probe_partmap): ... to here.
10642         (probe): Use probe_partmap() once for the disk we're probing, and
10643         additionally, when such disk contains a memberlist() struct member,
10644         once for each disk that is contained in the structure returned by
10645         memberlist().
10647 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10649         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
10650         environment variable to 'all' in order to obtain debug output from
10651         non-util/ code.
10652         * util/i386/pc/grub-setup.c (main): Likewise.
10654 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10656         * disk/raid.c (grub_raid_scan_device): Check for
10657         `array->device[sb.this_disk.number]' rather than for
10658         `array->device[sb.this_disk.number]->name', since the latter is not
10659         guaranteed to be accessible.
10661 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10663         * disk/raid.c: Update copyright.
10664         * fs/cpio.c: Likewise.
10665         * include/grub/raid.h: Likewise.
10666         * loader/i386/pc/multiboot.c: Likewise.
10667         * util/hostfs.c: Likewise.
10669 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10671         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
10672         to a grub_disk_t array.
10673         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
10674         `device[x]'.
10675         (grub_raid_scan_device): Replace `device[x].name' accesses with
10676         `device[x]->name'.  Simplify initialization of `array->device[x]'.
10678 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10680         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
10681         grub_dprintf() calls.
10682         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
10683         error message.
10685 2008-02-07  Christian Franke  <franke@computer.org>
10687         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
10688         instead of fseek and ftell to support large files.
10689         (grub_hostfs_read): Likewise.
10691 2008-02-07  Robert Millan  <rmh@aybabtu.com>
10693         Patch from Jeroen Dekkers.
10694         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
10695         failure, since successfully reading all array members might not be
10696         required.
10698 2008-02-06  Robert Millan  <rmh@aybabtu.com>
10700         * util/grub-probe.c (probe): Simplify partmap probing (with the
10701         assumption that the first word up to the underscore equals to
10702         the module name).
10704 2008-02-06  Christian Franke  <franke@computer.org>
10706         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
10707         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
10708         last block of a cpio or tar stream.
10709         Check for "TRAILER!!!" instead of any empty data
10710         block to detect last block of a cpio stream.
10711         (grub_cpio_dir): Fix constness of variable np.
10712         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
10713         cpio or tar trailer is detected.  This fixes a crash
10714         on open of a non existing file.
10716 2008-02-05  Bean  <bean123ch@gmail.com>
10718         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
10719         address of entry.
10720         (grub_multiboot_load_elf64): Likewise.
10721         (grub_multiboot): Initialize mbi structure.
10723         * util/grub-fstest.c: Don't include unused header file script.h.
10725         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
10726         of file.
10727         (grub_fstest_SOURCES): Likewise.
10729 2008-02-05  Robert Millan  <rmh@aybabtu.com>
10731         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
10732         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
10733         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
10734         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
10736         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
10737         (translation_table): Replace hardcoded values with macros
10738         provided by `<grub/term.h>'.
10740         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
10741         (keyboard_map): Correct/add a few values, with macros provided
10742         by `<grub/term.h>'.
10743         (keyboard_map_shift): Zero values that don't differ from their
10744         `keyboard_map' equivalents.
10745         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
10746         Discard the second scan code that is always sent by Caps lock.
10747         Only use `keyboard_map_shift' when it provides a non-zero value,
10748         otherwise fallback to `keyboard_map'.
10750 2008-02-04  Bean  <bean123ch@gmail.com>
10752         * Makefile.in (enable_grub_fstest): New variable.
10754         * conf/common.rmk (grub_fstest_init.lst): New rule.
10755         (grub_fstest_init.h): Likewise.
10756         (grub_fstest_init.c): Likewise.
10757         (util/grub-fstest.c_DEPENDENCIES): New variable.
10758         (grub_fstest_SOURCES): Likewise.
10760         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
10762         * util/grub-fstest.c: New file.
10764 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10766         Make grub-setup handle a separate root device.
10768         * util/i386/pc/grub-setup.c (setup): Always open the root device,
10769         so that the root device can be compared with the destination
10770         device.
10771         When embedding the core image, if the root and destination devices
10772         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
10773         0xFF.
10774         When not embedding, set ROOT_DRIVE to 0xFF.
10776 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10778         Add support for having a grub directory in a different drive. This
10779         is still only the data handling part.
10781         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
10782         (codestart): Save %dh in GRUB_ROOT_DRIVE.
10783         (grub_root_drive): New variable.
10785         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
10786         instead of GRUB_BOOT_DRIVE to construct a device name. Set
10787         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
10788         as it was.
10790         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
10792         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
10793         macro.
10794         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
10796         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
10797         is bogus, because PXE booting does not specify any drive
10798         correctly.
10800         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
10801         am not sure if this is really correct.
10803         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
10804         is always identical to the boot drive when booting from a CD.
10806         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
10807         longer.
10808         (root_drive): New variable.
10809         (real_start): Unconditionally set %dh to ROOT_DRIVE.
10810         (setup_sectors): Push %dx right after popping it, because %dh will
10811         be modified later.
10812         (copy_buffer): Restore %dx.
10814 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10816         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
10817         use `cdboot.img' for cdrom images.
10819 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10821         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
10822         only setup gfxterm when `font' command has succeeded.
10824 2008-02-03  Robert Millan  <rmh@aybabtu.com>
10826         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
10827         (grub_rescue_cmd_multiboot_loader)
10828         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
10830 2008-02-03  Pavel Roskin  <proski@gnu.org>
10832         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
10833         %edx and %esi from stack only after grub_gate_a20() is called.
10834         grub_gate_a20() clobbers %edx.
10836 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10838         * configure.ac (AC_INIT): Bumped to 1.96.
10840         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
10841         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
10842         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
10843         video/readers/png.c.
10845 2008-02-03  Bean  <bean123ch@gmail.com>
10847         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
10848         (cdboot_img_SOURCES): New variable.
10849         (cdboot_img_ASFLAGS): New variable.
10850         (cdboot_img_LDFLAGS): New variable.
10852         * boot/i386/pc/cdboot.S: New file.
10854         * disk/i386/pc/biosdisk.c (cd_start): New variable.
10855         (cd_count): Likewise.
10856         (grub_biosdisk_get_drive): Add support for cd device.
10857         (grub_biosdisk_call_hook): Likewise.
10858         (grub_biosdisk_iterate): Likewise.
10859         (grub_biosdisk_open): Likewise.
10860         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
10861         (grub_biosdisk_rw): Support reading from cd device.
10862         (GRUB_MOD_INIT): Iterate cd devices.
10864         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
10865         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
10866         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
10868         * kern/i386/pc/init.c (make_install_device): Check for cd device.
10870 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10872         * commands/read.c: New file.
10873         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
10874         (read_mod_SOURCES): New variable.
10875         (read_mod_CFLAGS): Likewise.
10876         (read_mod_LDFLAGS): Likewise.
10878 2008-02-02  Robert Millan  <rmh@aybabtu.com>
10880         * normal/main.c (grub_normal_execute): Check for `menu->size' when
10881         determining whether menu has to be displayed.
10883 2008-02-02  Marco Gerards  <marco@gnu.org>
10885         * bus/pci.c: New file.
10887         * include/grub/pci.h: Likewise.
10889         * include/grub/i386/pc/pci.h: Likewise.
10891         * commands/lspci.c: Likewise.
10893         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
10894         `lspci.mod'.
10895         (pci_mod_SOURCES): New variable.
10896         (pci_mod_CFLAGS): Likewise.
10897         (pci_mod_LDFLAGS): Likewise.
10898         (lspci_mod_SOURCES): Likewise.
10899         (lspci_mod_CFLAGS): Likewise.
10900         (lspci_mod_LDFLAGS): Likewise.
10902 2008-02-02  Bean  <bean123ch@gmail.com>
10904         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
10905         (grub_ufs_get_file_block): Fix indirect block calculation problem.
10907         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
10908         (grub_xfs_btree_node): New structure.
10909         (grub_xfs_btree_root): New structure.
10910         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
10911         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
10912         (GRUB_XFS_EXTENT_BLOCK): Likewise.
10913         (GRUB_XFS_EXTENT_SIZE): Likewise.
10914         (grub_xfs_read_block): Support btree format type.
10915         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
10916         Use directory block as basic unit.
10918         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
10920         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
10921         __attribute__ ((__regparm__ (1))).
10923 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10925         Correct a mistake in previous commit.
10927         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
10928         top.
10929         (normal/command.c_DEPENDENCIES): New variable.
10931 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10933         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
10934         top.
10935         (normal/command.c_DEPENDENCIES): New variable.
10936         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
10937         * conf/i386-ieee1275.rmk: Likewise.
10938         * conf/i386-linuxbios.rmk: Likewise.
10939         * conf/i386-pc.rmk: Likewise.
10940         * conf/sparc64-ieee1275.rmk: Likewise.
10941         * conf/powerpc-ieee1275.rmk: Likewise.
10942         (grub_emu_SOURCES): Add `fs/fshelp.c'.
10944         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
10946 2008-02-01  Robert Millan  <rmh@aybabtu.com>
10948         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
10949         call at beginning of function.
10951 2008-01-31  Pavel Roskin  <proski@gnu.org>
10953         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
10954         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
10955         (grub_mkrescue_SOURCES): Likewise.
10956         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
10958 2008-01-30  Robert Millan  <rmh@aybabtu.com>
10960         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
10961         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
10962         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
10963         (grub_probe_SOURCES): ... to here.
10965         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
10966         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
10967         * conf/i386-ieee1275.rmk: Likewise.
10968         * conf/i386-linuxbios.rmk: Likewise.
10969         * conf/powerpc-ieee1275.rmk: Likewise.
10971 2008-01-30  Tristan Gingold  <gingold@free.fr>
10973         * kern/rescue.c: Silently accept empty lines.
10975 2008-01-29  Bean  <bean123ch@gmail.com>
10977         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
10978         (real_code_2): Code cleanup and change comment style.
10979         (move_memory): Avoid using 32-bit address mode.
10981 2008-01-29  Bean  <bean123ch@gmail.com>
10983         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
10984         (png_mod_SOURCES): New variable.
10985         (png_mod_CFLAGS): Likewise.
10986         (png_mod_LDFLAGS): Likewise.
10988         * video/readers/png.c: New file.
10990 2008-01-28  Robert Millan  <rmh@aybabtu.com>
10992         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
10993         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
10994         `ifndef GRUB_MOD_GAP' hack.
10995         * util/elf/grub-mkimage.c (add_segments): Likewise.
10997 2008-01-27  Robert Millan  <rmh@aybabtu.com>
10999         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
11000         `GRUB_MOD_GAP' for platforms in which it's not defined.
11001         * util/elf/grub-mkimage.c (add_segments): Likewise.
11003 2008-01-27  Robert Millan  <rmh@aybabtu.com>
11005         Get grub-emu to build again (including parallel builds).
11007         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
11008         Split into ...
11009         (util/grub-emu.c_DEPENDENCIES): ... this, ...
11010         (normal/execute.c_DEPENDENCIES): ... this, ...
11011         (grub-emu_DEPENDENCIES): ... and this.
11013         * conf/i386-efi.rmk: Likewise.
11014         * conf/i386-linuxbios.rmk: Likewise.
11015         * conf/i386-ieee1275.rmk: Likewise.
11016         * conf/powerpc-ieee1275.rmk: Likewise.
11017         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
11019 2008-01-27  Robert Millan  <rmh@aybabtu.com>
11021         * NEWS: Add a few items.
11023 2008-01-27  Robert Millan  <rmh@aybabtu.com>
11025         Fix parallel builds with grub-emu.  Based on earlier commit for
11026         grub-probe and grub-setup.
11028         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11029         (util/grub-emu.c_DEPENDENCIES): ... this.
11030         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11031         (util/grub-emu.c_DEPENDENCIES): ... this.
11032         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11033         (util/grub-emu.c_DEPENDENCIES): ... this.
11034         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11035         (util/grub-emu.c_DEPENDENCIES): ... this.
11036         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11037         (util/grub-emu.c_DEPENDENCIES): ... this.
11039 2008-01-27  Pavel Roskin  <proski@gnu.org>
11041         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
11042         to create a gap between _end and the modules added to the image
11043         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
11044         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
11045         * util/elf/grub-mkimage.c (add_segments): Likewise.
11047 2008-01-26  Pavel Roskin  <proski@gnu.org>
11049         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
11050         just return an error.
11052 2008-01-26  Bean  <bean123ch@gmail.com>
11054         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
11055         (grub_reiserfs_get_item): Save offset of the next item.
11056         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
11058 2008-01-25  Robert Millan  <rmh@aybabtu.com>
11060         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
11061         make all filesystem sources appear together (possibly fixing omissions
11062         while at it).
11063         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11064         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11065         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11066         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11068         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
11069         add `kern/file.c'.
11070         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
11071         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11072         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
11073         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11075         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
11076         (probe): Add a sanity check to make sure of our ability to read
11077         requested files when probing for filesystem type.
11079         * genmk.rb: Update copyright year (2007).
11081         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
11082         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
11083         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
11084         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
11085         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
11086         : Remove function prototypes.
11088 2008-01-25  Robert Millan  <rmh@aybabtu.com>
11090         Revert my previous commits (based on wrong assumption of how grub_errno
11091         works).
11093         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
11094         * kern/file.c (grub_file_open): Likewise.
11096 2008-01-24  Pavel Roskin  <proski@gnu.org>
11098         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
11099         that hang if GRUB tries to setup colors.
11100         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
11101         colors for firmwares that don't support it.
11102         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
11103         Recognize Open Hack'Ware, set flags to work around its
11104         limitations.
11106 2008-01-24  Robert Millan  <rmh@aybabtu.com>
11108         * kern/file.c (grub_file_open): Do not account previous failures of
11109         unrelated functions when grub_errno is checked for.
11110         Reported by Oleg Strikov.
11112 2008-01-24  Bean  <bean123ch@gmail.com>
11114         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
11115         (grub_ufs_sblock): New member volume name.
11116         (grub_ufs_find_file): Fix string copy bug.
11117         (grub_ufs_label): Implement this function properly.
11119         * fs/hfs.c (grub_hfs_cnid_type): New enum.
11120         (grub_hfs_iterate_records): Use the correct file number for extents
11121         and catalog file. Fix problem in next index calculation.
11122         (grub_hfs_find_node): Replace recursive function call with loop.
11123         (grub_hfs_iterate_dir): Replace recursive function call with loop.
11125 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11127         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
11128         `<grub/symbol.h>' and `<grub/multiboot.h>'.
11129         (grub_multiboot2_real_boot): New function prototype.
11131         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
11132         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
11134         * kern/i386/ieee1275/init.c (grub_os_area_addr)
11135         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
11137 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11139         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
11140         #ifdef'ed out grub_printf().
11142 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11144         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
11145         grub_dprintf calls, since they make "debug=all" mode unusable.
11146         (grub_console_checkkey): Likewise.
11148 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11150         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
11151         `term/i386/pc/at_keyboard.c'.
11152         (pkglib_MODULES): Add `serial.mod'.
11153         (serial_mod_SOURCES): New variable.
11154         (serial_mod_CFLAGS): Likewise.
11155         (serial_mod_LDFLAGS): Likewise.
11157         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
11158         `<grub/powerpc/ieee1275/console.h>'.
11159         (grub_keyboard_controller_init): New function prototype.
11160         (grub_console_checkkey): Likewise.
11161         (grub_console_getkey): Likewise.
11163         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
11164         keyboard on i386.
11166         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
11167         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
11169 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11171         * kern/i386/pc/init.c (make_install_device): When memdisk image is
11172         present, "(memdisk)/boot/grub" becomes the default prefix.
11174         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
11175         a memdisk tarball with all the modules.  Add --overlay=DIR option that
11176         allows users to overlay additional files into the image.
11178 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11180         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
11181         and `machine/memory.h'.
11182         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
11183         (_multiboot_mod_SOURCES): New variable.
11184         (_multiboot_mod_CFLAGS): Likewise.
11185         (_multiboot_mod_LDFLAGS): Likewise.
11186         (multiboot_mod_SOURCES): Likewise.
11187         (multiboot_mod_CFLAGS): Likewise.
11188         (multiboot_mod_LDFLAGS): Likewise.
11190         * include/grub/i386/ieee1275/loader.h: New file.
11192         * include/grub/i386/ieee1275/machine.h: Likewise.
11194         * include/grub/i386/ieee1275/memory.h: Likewise.
11196         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
11197         variable declaration.
11198         (grub_os_area_size): Likewise.
11200         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
11201         (grub_lower_mem, grub_upper_mem): New variables.
11202         (grub_stop_floppy): New function (just to make
11203         grub_multiboot2_real_boot() happy).
11205         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
11206         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
11207         (grub_stop): New function.
11208         Include `"../realmode.S"' and `"../loader.S"'.
11210         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
11211         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
11213         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
11214         rely on grub_multiboot2_real_boot() for final boot.
11216 2008-01-22  Robert Millan  <rmh@aybabtu.com>
11218         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
11219         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
11220         device that doesn't look like an SD card.
11221         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11222         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
11223         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
11224         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
11225         found.
11227 2008-01-22  Robert Millan  <rmh@aybabtu.com>
11229         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
11230         avoid claiming over our own code.
11232 2008-01-22  Bean  <bean123ch@gmail.com>
11234         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
11235         (jpeg_mod_SOURCES): New variable.
11236         (jpeg_mod_CFLAGS): Likewise.
11237         (jpeg_mod_LDFLAGS): Likewise.
11239         * video/readers/jpeg.c : New file.
11241 2008-01-22  Bean  <bean123ch@gmail.com>
11243         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
11244         there are no more items.
11246 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11248         * kern/mm.c (grub_mm_init_region): Improve debug message.
11250 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11252         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
11253         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
11254         address.
11255         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
11256         a C macro.
11257         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
11258         Indicates start of upper memory.
11259         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
11260         (generate_image): Abort when image size is big enough to corrupt
11261         upper memory.
11263         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
11264         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
11265         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
11266         instead of hardcoding 0xA0000.
11267         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
11268         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
11269         instead of hardcoding 0xA0000.
11271 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11273         * disk/memdisk.c (memdisk_size): New variable.
11274         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
11275         `memdisk_size'.
11276         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
11277         image to dynamic memory.
11278         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
11279         `memdisk_size'.  Free memdisk block.
11281 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11283         Fix detection of very small filesystems (like tar).
11285         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
11286         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
11287         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
11288         a problem with this disk).
11290 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11292         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
11293         on grub_biosdisk_rw_standard() error.
11295 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11297         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
11298         recent changes.
11299         * kern/elf.c: Likewise.
11300         * kern/ieee1275/ieee1275.c: Likewise.
11301         * kern/powerpc/ieee1275/openfw.c: Likewise.
11302         * term/ieee1275/ofconsole.c: Likewise.
11304 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11306         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
11308         * include/grub/kernel.h (grub_arch_memdisk_addr)
11309         (grub_arch_memdisk_size): Moved from here ...
11311         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
11312         (grub_arch_memdisk_size): ... to here.
11314 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11316         Mostly based on bugfix from Bean.
11318         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
11319         attribute with hook() parameter.
11320         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
11321         declaration.
11322         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
11323         attribute with hook() parameter.
11324         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
11325         declaration.
11327 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11329         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
11330         (pkglib_MODULES): Add `memdisk.mod'.
11331         (memdisk_mod_SOURCES): New variable.
11332         (memdisk_mod_CFLAGS): Likewise.
11333         (memdisk_mod_LDFLAGS): Likewise.
11335         * disk/memdisk.c: New file.
11337         * include/grub/disk.h (grub_disk_dev_id): Add
11338         `GRUB_DISK_DEVICE_MEMDISK_ID'.
11340         * include/grub/i386/pc/kernel.h
11341         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
11342         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
11343         (grub_kernel_image_size): New variable declaration.
11344         (grub_total_module_size): Likewise.
11345         (grub_memdisk_image_size): Likewise.
11347         * include/grub/i386/pc/memory.h
11348         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
11350         * include/grub/kernel.h: Include `<grub/symbol.h>'.
11351         (grub_arch_memdisk_addr): New variable declaration.
11352         (grub_arch_memdisk_size): Likewise.
11354         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
11355         (grub_arch_memdisk_size): Likewise.
11357         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
11358         (codestart): Replace hardcoded `0x100000' with
11359         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
11361         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
11362         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
11363         not NULL, append the contents of the file it refers to, at the end of
11364         the compressed kernel image.  Initialize `grub_memdisk_image_size'
11365         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
11366         (options): Add "memdisk"|'m' option.
11367         (main): Parse --memdisk|-m option, and pass user-provided path as
11368         parameter to generate_image().
11370 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11372         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
11373         grub_dprintf() calls from here ...
11374         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
11376 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11378         Fix detection of "real mode" when /options/real-mode? doesn't exist.
11380         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
11381         declaration.
11382         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
11383         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
11384         `GRUB_IEEE1275_FLAG_REAL_MODE'.
11385         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
11386         property).
11387         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
11388         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
11390 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11392         Get rid of confusing function (superseded by
11393         `grub_ieee1275_get_integer_property')
11394         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
11395         prototype.
11396         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
11397         function.
11398         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
11399         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
11400         in native endianness from grub_ieee1275_get_integer_property().
11402 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11404         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
11405         command after "shut-down", since implementations differ on which
11406         the command for halt is.
11408 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11410         * include/grub/i386/linuxbios/console.h: Add header protection.
11411         (grub_keyboard_controller_init): New function prototype.
11412         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
11413         (KEYBOARD_COMMAND_READ): Likewise.
11414         (KEYBOARD_COMMAND_WRITE): Likewise.
11415         (KEYBOARD_SCANCODE_SET1): Likewise.
11416         (grub_keyboard_controller_write): New function.
11417         (grub_keyboard_controller_read): Likewise.
11418         (grub_keyboard_controller_init): Likewise.
11420         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
11421         (grub_console_init): On coreboot/LinuxBIOS, call
11422         grub_keyboard_controller_init().
11424 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11426         PowerPC changes provided by Pavel Roskin.
11428         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
11429         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
11430         don't rely on cmain() doing it.
11431         * kern/i386/ieee1275/startup.S (_start): Store %eax in
11432         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
11434 2008-01-16  Robert Millan  <rmh@aybabtu.com>
11436         * include/grub/i386/linuxbios/memory.h
11437         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
11438         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
11439         receive `table_header' as argument.  Instead, probe for it in the
11440         known memory ranges where it can be present.
11441         (grub_available_iterate): Do not pass a fixed `table_header' address
11442         to grub_linuxbios_table_iterate().
11444 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11446         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
11447         * conf/i386-ieee1275.rmk: New file.
11448         * include/grub/i386/ieee1275/console.h: Likewise.
11449         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
11450         * include/grub/i386/ieee1275/kernel.h: Likewise.
11451         * include/grub/i386/ieee1275/time.h: Likewise.
11452         * kern/i386/ieee1275/init.c: Likewise.
11453         * kern/i386/ieee1275/startup.S: Likewise.
11455 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11457         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
11458         when pointers are 32-bit (but still do set it to one when they are
11459         64-bit).
11461 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11463         * include/grub/ieee1275/ieee1275.h
11464         (grub_ieee1275_get_integer_property): New function prototype.
11466         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
11467         (grub_ieee1275_get_integer_property): New function.  Wraps around
11468         grub_ieee1275_get_property() to handle endianness.
11470         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
11471         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
11472         where appropriate.
11473         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
11474         (grub_map): Likewise.
11475         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
11477 2008-01-15  Bean  <bean123ch@gmail.com>
11479         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
11480         (grub_script_execute_cmdline): Reset grub_errno.
11482         * normal/main.c (read_config_file): Reset grub_errno.
11484         * normal/parse.y (script_init): New.
11485         (script): Move function and menuentry here.
11486         (delimiter): New.
11487         (command): Add delimiter at the end of command.
11488         (commands): Adjust to match the new command.
11489         (commandblock): Remove grub_script_lexer_record_start.
11490         (menuentry): Add grub_script_lexer_record_start, use the new commands.
11491         (if): Use the new commands.
11493         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
11495 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11497         * normal/menu.c (run_menu): Move timeout message from here ...
11498         (print_timeout): ... to here.
11499         (run_menu): Use print_timeout() once during initial draw to print
11500         the whole message, and again in every clock tick to update only
11501         the number of seconds.
11503 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11505         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
11506         actual size of `available' from grub_ieee1275_get_property(), and
11507         restrict parsing to that bound.
11509 2008-01-15  Christian Franke  <franke@computer.org>
11511         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
11512         (argp_program_version): Remove variable.
11513         (argp_program_bug_address): Likewise.
11514         (options): Convert from struct argp_option to struct option.
11515         (struct arguments): Remove.
11516         (parse_opt): Remove.
11517         (usage): New function.
11518         (main): Replace struct args members by simple variables.
11519         Replace argp_parse() by getopt_long().
11520         Add switch to evaluate options.
11521         Add missing "(...)" around root_dev in prefix string.
11523 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11525         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
11526         for grub_ieee1275_exit(), in order to improve portability.
11528 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11530         * util/grub.d/10_linux.in (prefix): Define.
11531         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
11533 2008-01-13  Pavel Roskin  <proski@gnu.org>
11535         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
11536         grub_errno if no errors have been detected.
11538 2008-01-12  Robert Millan  <rmh@aybabtu.com>
11540         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
11541         (grub_util_get_dev_abstraction): New function prototype.
11543         * util/getroot.c: Include `<grub/util/getroot.h>'
11544         (grub_util_get_grub_dev): Move detection of abstraction type to ...
11545         (grub_util_get_dev_abstraction): ... here (new function).
11547         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
11548         `PRINT_ABSTRACTION'.
11549         (probe): Probe for abstraction type when requested.
11550         (main): Understand `--target=abstraction'.
11552         * util/i386/efi/grub-install.in: Add abstraction module to core
11553         image when it is found to be necessary.
11554         * util/i386/pc/grub-install.in: Likewise.
11555         * util/powerpc/ieee1275/grub-install.in: Likewise.
11557         * util/update-grub_lib.in (font_path): Return system path without
11558         converting to GRUB path.
11559         * util/update-grub.in: Convert system path returned by font_path()
11560         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
11561         abstraction module is needed for loading fonts (if any).  Export
11562         that as `GRUB_PRELOAD_MODULES'.
11563         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
11564         insmod commands).
11566 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
11568         Remove some unused code from reiserfs.
11570         * fs/reiserfs.c (struct grub_reiserfs_key)
11571         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
11572         (struct grub_reiserfs_node_body): Removed.
11573         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11574         Likewise.
11575         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11576         Likewise.
11577         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11578         Likewise.
11579         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11580         Likewise.
11581         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11582         Likewise.
11583         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
11584         Likewise.
11585         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11586         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11587         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11589 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11591         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
11592         Determines if a file is garbage left by packaging systems, etc.
11593         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
11594         for processing /etc/grub.d scripts.
11595         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
11596         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
11597         as a condition for processing Linux images.
11599 2008-01-10  Pavel Roskin  <proski@gnu.org>
11601         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
11602         to compile reiserfs.c on PowerPC.
11604 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11606         * kern/device.c (grub_device_iterate): Do not abort device iteration
11607         when one of the devices cannot be opened.
11608         * kern/disk.c (grub_disk_open): Do not account previous failures of
11609         unrelated functions when grub_errno is checked for.
11611 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11613         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
11614         `! grub_linux_is_bzimage', change order of address comparison to make
11615         it more intuitive, and improve "too big zImage" error message.
11617 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11619         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
11620         `$(update-grub_DATA)'.
11621         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
11622         targets.
11624 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11626         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
11627         which instruction is modified by grub-setup during installation
11628         (since it wasn't obvious by only looking at this file).
11630 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11632         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
11633         listing actual TODO items.
11635 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11637         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
11638         correctly.
11639         (grub_reiserfs_get_key_offset): Likewise.
11640         (grub_reiserfs_set_key_offset): Likewise.
11641         (grub_reiserfs_set_key_type): Likewise.
11642         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
11644         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
11645         better to remove the bitfield version completely.
11647 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11649         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
11650         allocated from the heap, due to the fshelp implementation.
11651         (grub_reiserfs_dir): Free NODE, due to the same reason.
11653 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11655         Mostly from Vincent Pelletier:
11657         * fs/reiserfs.c: New file.
11659         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
11660         (reiserfs_mod_SOURCES): New variable.
11661         (reiserfs_mod_CFLAGS): Likewise.
11662         (reiserfs_mod_LDFLAGS): Likewise.
11664         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
11665         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
11666         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
11667         normal/color.c.
11669 2008-01-06  Robert Millan  <rmh@aybabtu.com>
11671         * normal/color.c: Remove `<grub/env.h>'.
11673 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
11675         * include/grub/normal.h: Include <grub/env.h>.
11677 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11679         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
11680         usage example with `(hd0,1)'.
11681         Reported by Samuel Thibault.
11683 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11685         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
11686         (grub_linux_boot_zimage): Rename to ...
11687         (grub_linux_boot): ... this.
11688         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
11689         (grub_linux_boot_zimage): Conditionalize zImage copy.
11691         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
11692         (grub_linux_boot_bzimage): Remove prototype.
11693         (grub_linux_boot_zimage): Rename to ...
11694         (grub_linux_boot): ... this.
11696         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
11697         (grub_linux_boot): Remove function.
11699 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11701         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
11702         (grub_env_write_color_highlight): Likewise.
11703         (grub_wait_after_message): Likewise.
11705         * normal/color.c: New file.
11707         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11708         (normal_mod_DEPENDENCIES): Likewise.
11710         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11711         (normal_mod_DEPENDENCIES): Likewise.
11713         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11714         (normal_mod_DEPENDENCIES): Likewise.
11716         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11717         (normal_mod_DEPENDENCIES): Likewise.
11719         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
11720         for waiting after a message is printed.
11721         * normal/main.c (read_config_file): Likewise.
11722         (grub_normal_init): Register grub_env_write_color_normal() and
11723         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
11724         `color_highlight' variables as global.
11726         * normal/menu.c (grub_wait_after_message): New function.
11727         (grub_color_menu_normal): New variable.  Replaces ...
11728         (GRUB_COLOR_MENU_NORMAL): ... this macro.
11729         (grub_color_menu_highlight): New variable.  Replaces ...
11730         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
11731         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
11732         `GRUB_TERM_COLOR_STANDARD'.
11733         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
11734         `normal_code' and `highlight_code' to `old_color_normal' and
11735         `old_color_highlight', respectively.
11736         (grub_menu_init_page): Update colors when drawing the menu, based on
11737         `menu_color_normal' and `menu_color_highlight' variables.
11738         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
11739         a message is printed.
11741 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11743         * kern/env.c (grub_env_context_open): Propagate hooks for global
11744         variables to new context.
11746         * kern/main.c (grub_set_root_dev): Export `root' variable.
11748 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11750         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
11751         discs unconditionally, since udev and others have options to provide
11752         them.
11754 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11756         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
11758 2008-01-04  Christian Franke  <franke@computer.org>
11760         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
11761         of eisa_mmap.
11763 2008-01-03  Pavel Roskin  <proski@gnu.org>
11765         * kern/i386/linuxbios/init.c: Put "void" to all function
11766         declarations with no arguments.
11767         * kern/powerpc/ieee1275/init.c: Likewise.
11768         * term/i386/pc/at_keyboard.c: Likewise.
11769         * term/i386/pc/vga_text.c: Likewise.
11770         * util/grub-mkdevicemap.c: Likewise.
11772 2008-01-02  Robert Millan  <rmh@aybabtu.com>
11774         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
11775         message when loaded image is out of bounds.
11776         (grub_multiboot_load_elf64): Likewise.
11778 2008-01-02  Pavel Roskin  <proski@gnu.org>
11780         * util/grub.d/10_linux.in: Try version without ".old" when
11781         looking for initrd.  It's better to use initrd from the newer
11782         kernel of the same version than no initrd at all.
11784 2008-01-01  Robert Millan  <rmh@aybabtu.com>
11786         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
11788 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
11790         * include/grub/video.h: Added grub_video_unmap_color and
11791         grub_video_get_active_render_target.
11792         (grub_video_adapter): Added unmap_color and get_active_render_target.
11794         * video/video.c: Added grub_video_unmap_color and
11795         grub_video_get_active_render_target.
11796         (grub_video_get_info): Changed method to accept NULL pointer as an
11797         argument to allow detection of active video adapter.
11799         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
11800         grub_video_vbe_unmap_color_int.
11801         Added grub_video_vbe_unmap_color and
11802         grub_video_vbe_get_active_render_target.
11803         (grub_video_vbe_adapter): Added unmap_color and
11804         get_active_render_target.
11806         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
11807         with grub_video_vbe_unmap_color_int.
11809         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
11810         (DEFAULT_NORMAL_COLOR): Likewise.
11811         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
11812         (DEFAULT_FG_COLOR): Removed.
11813         (DEFAULT_BG_COLOR): Likewise.
11814         (DEFAULT_CURSOR_COLOR): Changed value.
11815         (grub_virtual_screen): Added standard_color_setting,
11816         normal_color_setting, highlight_color_setting and term_color.
11817         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
11818         (bitmap_width): Added.
11819         (bitmap_height): Likewise.
11820         (bitmap): Likewise.
11821         (set_term_color): Likewise.
11822         (grub_virtual_screen_setup): Changed to use new terminal coloring
11823         settings.
11824         (grub_gfxterm_init): Added init for bitmap.
11825         (grub_gfxterm_fini): Added destroy for bitmap.
11826         (redraw_screen_rect): Updated to use background bitmap and new
11827         terminal coloring.
11828         (scroll_up): Added optimization for case when there is no bitmap.
11829         (grub_gfxterm_cls): Fixed to use correct background color.
11830         (grub_virtual_screen_setcolorstate): Changed to use new terminal
11831         coloring.
11832         (grub_virtual_screen_setcolor): Likewise.
11833         (grub_virtual_screen_getcolor): Added.
11834         (grub_gfxterm_background_image_cmd): Likewise.
11835         (grub_video_term): Added setcolor and getcolor.
11836         (MOD_INIT): Added registration of background_image command.
11837         (MOD_TERM): Added unregistration for background_image command.
11839 2007-12-30  Pavel Roskin  <proski@gnu.org>
11841         * loader/multiboot_loader.c: Fix multiboot command
11842         unregistration.  Fix all typos in the word "multiboot".
11844 2007-12-29  Pavel Roskin  <proski@gnu.org>
11846         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
11847         support for initrd names used in Fedora.
11849 2007-12-26  Bean  <bean123ch@gmail.com>
11851         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
11852         (cpio_mod_SOURCES): New variable.
11853         (cpio_mod_CFLAGS): Likewise.
11854         (cpio_mod_LDFLAGS): Likewise.
11856         * fs/cpio.c: New file.
11858         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
11860         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11862         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11864         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11866 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11868         * include/grub/term.h (struct grub_term): Add `getcolor' function.
11869         (grub_getcolor): New function.
11871         * kern/term.c (grub_getcolor): New function.
11872         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
11873         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
11874         (print_entry): Set normal and highlight colors to
11875         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
11876         respectively, before printing and restore them to old
11877         values afterwards.
11878         (grub_menu_init_page): Likewise.  Fill an additional colored space
11879         that would otherwise be left blank.
11881         * term/efi/console.c (grub_console_getcolor): New function.
11882         (struct grub_console_term.getcolor): New variable.
11883         * term/i386/pc/console.c (grub_console_getcolor): New function.
11884         (struct grub_console_term.getcolor): New variable.
11885         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
11886         (struct grub_console_term.getcolor): New variable.
11888         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
11889         (struct grub_console_term.setcolor): Remove variable.
11890         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
11891         (struct grub_console_term.setcolor): Remove variable.
11892         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
11893         (struct grub_console_term.setcolor): Remove variable.
11894         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
11895         (struct grub_console_term.setcolor): Remove variable.
11897 2007-12-25  Robert Millan  <rmh@aybabtu.com>
11899         * configure.ac: Search for possible unifont.hex locations, and
11900         define UNIFONT_HEX if found.
11902         * Makefile.in (UNIFONT_HEX): Define variable.
11903         (DATA): Rename to ...
11904         (PKGLIB): ... this.  Update all users.
11905         (PKGDATA): New variable.
11906         (pkgdata_IMAGES): Rename to ...
11907         (pkglib_IMAGES): ... this. Update all users.
11908         (pkgdata_MODULES): Rename to ...
11909         (pkglib_MODULES): ... this. Update all users.
11910         (pkgdata_PROGRAMS): Rename to ...
11911         (pkglib_PROGRAMS): ... this. Update all users.
11912         (pkgdata_DATA): Rename to ...
11913         (pkglib_DATA): ... this. Update all users.
11914         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
11915         (unicode.pff, ascii.pff): New rules.
11916         (all-local): Add `$(PKGDATA)' dependency.
11917         (install-local): Process `$(PKGDATA)'.
11919         * util/update-grub_lib.in (font_path): Search for *.pff files in
11920         a few more locations, including `${pkgdata}'.
11922 2007-12-23  Robert Millan  <rmh@aybabtu.com>
11924         Patch from Bean  <bean123ch@gmail.com>:
11925         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
11926         `size'.
11928 2007-12-21  Bean  <bean123ch@gmail.com>
11930         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
11931         (ntfscomp_mod_SOURCES): New variable.
11932         (ntfscomp_mod_CFLAGS): Likewise.
11933         (ntfscomp_mod_LDFLAGS): Likewise.
11935         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
11936         (grub_probe_SOURCES): Likewise.
11937         (grub_emu_SOURCES): Likewise.
11939         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11940         (grub_emu_SOURCES): Likewise.
11942         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11943         (grub_emu_SOURCES): Likewise.
11945         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11946         (grub_emu_SOURCES): Likewise.
11948         * fs/ntfs.c (grub_ntfscomp_func): New variable.
11949         (read_run_list): Renamed to grub_ntfs_read_run_list.
11950         (decomp_nextvcn): Moved to ntfscomp.c.
11951         (decomp_getch): Likewise.
11952         (decomp_get16): Likewise.
11953         (decomp_block): Likewise.
11954         (read_block): Likewise.
11955         (read_data): Partially moved to ntfscomp.c.
11956         (fixup): Change unsigned to grub_uint16_t.
11957         (read_mft): Change unsigned long to grub_uint32_t.
11958         (read_attr): Likewise.
11959         (read_data): Likewise.
11960         (read_run_data): Likewise.
11961         (read_run_list): Likewise.
11962         (read_mft): Likewise.
11964         * fs/ntfscomp.c: New file.
11966         * include/grub/ntfs.h: New file.
11968 2007-12-16  Robert Millan  <rmh@aybabtu.com>
11970         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
11971         IDE disk check, since Linux is known to support 20 IDE disks.
11972         Reported by Colin Watson.
11974 2007-12-15  Bean  <bean123ch@gmail.com>
11976         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
11977         (lnxboot_img_SOURCES): New variable.
11978         (lnxboot_img_ASFLAGS): Likewise.
11979         (lnxboot_img_LDFLAGS): Likewise.
11981         * boot/i386/pc/lnxboot.S: New file.
11983 2007-11-24  Pavel Roskin  <proski@gnu.org>
11985         * configure.ac: Test if '--build-id=none' is supported by the
11986         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
11987         objcopy to generate incorrect binary files (binutils
11988         2.17.50.0.18-1 as shipped by Fedora 8).
11989         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
11990         linking, so that build ID doesn't break the test.
11992 2007-11-24  Pavel Roskin  <proski@gnu.org>
11994         * include/grub/i386/time.h: use "void" in the argument list
11995         of grub_cpu_idle().
11996         * include/grub/powerpc/time.h: Likewise.
11997         * include/grub/sparc64/time.h: Likewise.
11999 2007-11-18  Christian Franke  <franke@computer.org>
12001         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
12002         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
12003         This fixes the problem that function keys did not work in grub-emu.
12005 2007-11-18  Christian Franke  <franke@computer.org>
12007         * disk/host.c (grub_host_open): Remove attribute unused from
12008         name parameter. Add check for "host". This fixes the problem
12009         that grub-emu does not find partitions.
12011 2007-11-18  Christian Franke  <franke@computer.org>
12013         * util/hostfs.c (is_dir): New function.
12014         (grub_hostfs_dir):  Handle missing dirent.d_type case.
12015         (grub_hostfs_read): Add missing fseek().
12016         (grub_hostfs_label): Clear label pointer.  This fixes a crash
12017         of grub-emu on "ls (host)".
12019 2007-11-18  Christian Franke  <franke@computer.org>
12021         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
12022         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
12023         to 64 bit boundary by default.
12025 2007-11-18  Bean  <bean123ch@gmail.com>
12027         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
12028         (hexdump_mod_SOURCES): New variable.
12029         (hexdump_mod_CFLAGS): Likewise.
12030         (hexdump_mod_LDFLAGS): Likewise.
12032         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12034         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12036         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12038         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12040         * include/grub/hexdump.h: New file.
12042         * commands/hexdump.c: New file.
12044 2007-11-10  Robert Millan  <rmh@aybabtu.com>
12046         * commands/i386/pc/play.c (beep_off): Switch order of arguments
12047         in grub_outb() calls.
12048         (beep_on): Likewise.
12050 2007-11-10  Christian Franke  <franke@computer.org>
12052         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
12053         (grub_menu_run): Likewise.
12055 2007-11-10  Robert Millan  <rmh@aybabtu.com>
12057         * include/grub/i386/efi/machine.h: New file.
12058         * include/grub/i386/linuxbios/machine.h: Likewise.
12059         * include/grub/i386/pc/machine.h: Likewise.
12060         * include/grub/powerpc/ieee1275/machine.h: Likewise.
12061         * include/grub/sparc64/ieee1275/machine.h: Likewise.
12063         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
12064         (serial_hw_io_addr): New variable.
12065         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
12066         instead of `(unsigned short *) 0x400'.
12068 2007-11-10  Bean  <bean123ch@gmail.com>
12070         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
12072 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
12074         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
12075         (vga_mod_SOURCES): Added.
12076         (vga_mod_CFLAGS): Likewise.
12077         (vga_mod_LDFLAGS): Likewise.
12079         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
12080         grub_outb() calls.
12081         (set_map_mask): Likewise.
12082         (set_read_map): Likewise.
12083         (set_read_address): Likewise.
12084         (vga_font): Removed variable.
12085         (get_vga_glyph): Removed function.
12086         (invalidate_char): Likewise.
12087         (write_char): Changed to use grub_font_get_glyph() for font
12088         information.
12089         (grub_vga_putchar): Likewise.
12090         (grub_vga_getcharwidth): Likewise.
12092 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
12094         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
12095         flags.
12096         (pxeboot_img_LDFLAGS): Likewise.
12097         (diskboot_img_LDFLAGS): Likewise.
12098         (kernel_img_LDFLAGS): Likewise.
12100 2007-11-06  Robert Millan  <rmh@aybabtu.com>
12102         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
12103         in grub_outb() calls.
12104         (serial_hw_init): Likewise.
12106 2007-11-05  Robert Millan  <rmh@aybabtu.com>
12108         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
12109         spaces.  Skip non-regular files.
12111 2007-11-05  Robert Millan  <rmh@aybabtu.com>
12113         * kern/disk.c (grub_disk_firmware_fini)
12114         (grub_disk_firmware_is_tainted): New variables.
12116         * include/grub/disk.h (grub_disk_firmware_fini)
12117         (grub_disk_firmware_is_tainted): Likewise.
12119         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
12120         (grub_disk_biosdisk_fini): ... to here.
12121         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
12122         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
12123         is set.  Register grub_disk_biosdisk_fini() in
12124         `grub_disk_firmware_fini'.
12126         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
12127         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
12128         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
12129         to finish existing firmware disk interface.
12131         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
12132         (ata_mod_SOURCES): New variable.
12133         (ata_mod_CFLAGS): Likewise.
12134         (ata_mod_LDFLAGS): Likewise.
12136 2007-11-05  Robert Millan  <rmh@aybabtu.com>
12138         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
12139         (grub_ata_wait): Reimplement using grub_millisleep().
12141         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
12142         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
12144 2007-11-03  Marco Gerards  <marco@gnu.org>
12146         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
12147         (CRTC_ADDR_PORT): New macro.
12148         (CRTC_DATA_PORT): Likewise.
12149         (CRTC_CURSOR): Likewise.
12150         (CRTC_CURSOR_ADDR_HIGH): Likewise.
12151         (CRTC_CURSOR_ADDR_LOW): Likewise.
12152         (update_cursor): New function.
12153         (grub_console_real_putchar): Call `update_cursor'.
12154         (grub_console_gotoxy): Likewise.
12155         (grub_console_cls): Set the default color when clearing the
12156         screen.
12157         (grub_console_setcursor): Implemented.
12159 2007-11-03  Marco Gerards  <marco@gnu.org>
12161         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
12162         become activate.
12163         (grub_ata_pio_write): Likewise.
12165         (grub_atapi_identify): Wait after issuing an ATA command.
12166         (grub_atapi_packet): Likewise.
12167         (grub_ata_identify): Likewise.
12168         (grub_ata_readwrite): Likewise.
12170 2007-11-03  Marco Gerards  <marco@gnu.org>
12172         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
12173         (grub_ata_pio_write): Likewise.
12174         (grub_ata_readwrite): Use `grub_error', instead of
12175         returning `grub_errno'.
12177 2007-11-03  Marco Gerards  <marco@gnu.org>
12179         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
12180         grub_ata_pio_write once for every single sector, instead of for
12181         multiple sectors.
12183 2007-10-31  Robert Millan  <rmh@aybabtu.com>
12185         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
12187         * conf/i386-linuxbios.rmk: New file.
12189         * kern/i386/pc/hardware.c: Likewise.
12190         * term/i386/pc/at_keyboard.c: Likewise.
12191         * term/i386/pc/vga_text.c: Likewise.
12193         * include/grub/i386/linuxbios/boot.h: Likewise.
12194         * include/grub/i386/linuxbios/console.h: Likewise.
12195         * include/grub/i386/linuxbios/init.h: Likewise.
12196         * include/grub/i386/linuxbios/kernel.h: Likewise.
12197         * include/grub/i386/linuxbios/loader.h: Likewise.
12198         * include/grub/i386/linuxbios/memory.h: Likewise.
12199         * include/grub/i386/linuxbios/serial.h: Likewise.
12200         * include/grub/i386/linuxbios/time.h: Likewise.
12202         * kern/i386/linuxbios/init.c: Likewise.
12203         * kern/i386/linuxbios/startup.S: Likewise.
12204         * kern/i386/linuxbios/table.c: Likewise.
12206 2007-10-31  Marco Gerards  <marco@gnu.org>
12208         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
12209         (ata_mod_SOURCES): New variable.
12210         (ata_mod_CFLAGS): Likewise.
12211         (ata_mod_LDFLAGS): Likewise.
12213         * disk/ata.c: New file.
12215         * include/grub/disk.h (grub_disk_dev_id): Add
12216         `GRUB_DISK_DEV_ATA_ID'.
12218 2007-10-31  Robert Millan  <rmh@aybabtu.com>
12220         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
12221         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
12223         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
12224         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
12226         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
12227         `<grub/types.h>'.
12229         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
12231 2007-10-27  Robert Millan  <rmh@aybabtu.com>
12233         * include/grub/types.h (ULONG_MAX): Define macro.
12235 2007-10-22  Robert Millan  <rmh@aybabtu.com>
12237         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
12238         `"../realmode.S"'.
12239         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
12241 2007-10-22  Robert Millan  <rmh@aybabtu.com>
12243         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
12244         (pkgdata_MODULES): Add `biosdisk.mod'.
12245         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
12246         variables.
12248         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
12249         (grub_biosdisk_init): Replace with ...
12250         (GRUB_MOD_INIT(biosdisk)): ... this.
12251         (grub_biosdisk_fini): Replace with ...
12252         (GRUB_MOD_FINI(biosdisk)): ... this.
12254         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
12255         (grub_machine_init): Remove call to grub_biosdisk_init().
12256         (grub_machine_fini): Remove call to grub_machine_fini().
12258         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
12260 2007-10-22  Robert Millan  <rmh@aybabtu.com>
12262         * include/grub/time.h: New file.
12263         * include/grub/i386/time.h: Likewise.
12264         * include/grub/powerpc/time.h: Likewise.
12265         * include/grub/sparc64/time.h: Likewise.
12267         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
12268         instances to ...
12269         (KERNEL_MACHINE_TIME_HEADER): ... this.
12270         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
12271         instances to ...
12272         (KERNEL_MACHINE_TIME_HEADER): ... this.
12273         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
12274         instances to ...
12275         (KERNEL_MACHINE_TIME_HEADER): ... this.
12277         * kern/i386/efi/init.c: Include `<grub/time.h>'.
12278         (grub_millisleep): New function.
12279         * kern/i386/pc/init.c: Include `<grub/time.h>'.
12280         (grub_millisleep): New function.
12281         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
12282         Remove `grub/machine/time.h' include.
12283         (grub_millisleep): New function.
12284         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
12285         Remove `grub/machine/time.h' include.
12286         (grub_millisleep): New function.
12288         * include/grub/misc.h (grub_div_roundup): New function.
12290         * kern/misc.c: Include `<grub/time.h>'.
12291         (grub_millisleep_generic): New function.
12293         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
12294         Add `time.h'.
12295         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
12296         Add `time.h'.
12297         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
12298         `machine/time.h'.  Add `time.h'.
12299         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12301 2007-10-21  Robert Millan  <rmh@aybabtu.com>
12303         * include/grub/misc.h (grub_max): New function.
12305 2007-10-21  Robert Millan  <rmh@aybabtu.com>
12307         * util/misc.c (grub_util_info): Call fflush() before returning.
12309 2007-10-20  Robert Millan  <rmh@aybabtu.com>
12311         * genmk.rb (Image): Copy `extra_flags' from here ...
12312         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
12314         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
12315         to `argc' and `args' arguments.
12317 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12319         * kern/i386/loader.S: New file.
12321         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
12322         * kern/i386/loader.S (grub_linux_prot_size)... to here.
12323         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
12324         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
12325         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
12326         * kern/i386/loader.S (grub_linux_real_addr)... to here.
12327         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
12328         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
12329         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
12330         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
12331         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
12332         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
12333         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
12334         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
12336         * kern/i386/realmode.S: New file.
12338         * kern/i386/pc/startup.S (protstack): Moved from here ...
12339         * kern/i386/realmode.S (protstack)... to here.
12340         * kern/i386/pc/startup.S (gdt): Moved from here ...
12341         * kern/i386/realmode.S (gdt)... to here.
12342         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
12343         * kern/i386/realmode.S (prot_to_real)... to here.
12345         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
12346         `kern/i386/realmode.S'.
12348 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12350         * include/grub/i386/loader.h: New file.
12352         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
12353         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12354         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12355         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12356         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
12357         * include/grub/i386/loader.h (grub_linux_prot_size)
12358         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12359         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12360         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12361         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
12363         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
12365 2007-10-15  Robert Millan  <rmh@aybabtu.com>
12367         * normal/misc.c (grub_normal_print_device_info): Do not probe for
12368         filesystem when dev->disk is unset.
12369         Do probe for filesystem even when dev->disk->has_partitions is set.
12370         In case a filesystem is found, always report it.
12371         In case it isn't, if dev->disk->has_partitions is set, report that
12372         a partition table was found instead of reporting that no filesystem
12373         could be identified.
12375 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12377         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
12378         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
12380         * include/grub/types.h (grub_host_to_target16): New macro.
12381         (grub_host_to_target32): Likewise.
12382         (grub_host_to_target64): Likewise.
12383         (grub_target_to_host16): Likewise.
12384         (grub_target_to_host32): Likewise.
12385         (grub_target_to_host64): Likewise.
12387         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12388         Renamed from to ...
12389         (GRUB_MOD_ALIGN): ...this.  Update all users.
12391         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
12392         grub_host_to_target32.
12393         Replace grub_be_to_cpu32 with grub_target_to_host32.
12394         (load_modules): Likewise.
12395         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
12396         Replace grub_be_to_cpu32 with grub_target_to_host32.
12397         Replace grub_cpu_to_be16 with grub_host_to_target16.
12398         Replace grub_cpu_to_be32 grub_host_to_target32.
12400 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12402         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
12403         * util/elf/grub-mkimage.c: ... here.
12405         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
12406         `util/powerpc/ieee1275/grub-mkimage.c'.
12408 2007-10-07  Robert Millan  <rmh@aybabtu.com>
12410         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
12411         and make it easier to figure out.
12412         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
12413         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
12414         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
12415         leave us with less than HEAP_MIN_SIZE total heap.
12416         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
12418 2007-10-03  Robert Millan  <rmh@aybabtu.com>
12420         * include/grub/i386/io.h: New file.
12421         * commands/i386/pc/play.c (inb): Removed.
12422         (outb): Removed.
12423         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12424         with grub_outb().
12425         * term/i386/pc/serial.c  (inb): Removed.
12426         (outb): Removed.
12427         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12428         with grub_outb().
12429         * term/i386/pc/vga.c  (inb): Removed.
12430         (outb): Removed.
12431         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12432         with grub_outb().
12434 2007-10-02  Robert Millan  <rmh@aybabtu.com>
12436         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
12437         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12438         Reported by Marcin Kurek.
12440 2007-09-07  Robert Millan  <rmh@aybabtu.com>
12442         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
12443         SmartFirmware version updates (as released by Sven Luther), and avoid
12444         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
12445         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
12446         known broken.
12448 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12450         From Hitoshi Ozeki:
12451         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
12452         when merging two regions.
12454 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12456         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
12457         * normal/completion.c (grub_normal_do_completion): Likewise.
12458         Reported by Hitoshi Ozeki.
12460 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12462         Do not use devices at boot in chainloading.
12464         * loader/i386/pc/chainloader.c (boot_drive): New variable.
12465         (boot_part_addr): Likewise.
12466         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
12467         with BOOT_DRIVE and BOOT_PART_ADDR.
12468         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
12469         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
12471 2007-08-29  Robert Millan  <rmh@aybabtu.com>
12473         Patch from Simon Peter <dn.tlp@gmx.net>:
12474         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
12475         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
12476         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
12477         util/i386/pc/grub-setup.c_DEPENDENCIES.
12478         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
12479         util/grub-probe.c_DEPENDENCIES.
12480         * conf/powerpc-ieee1275.rmk: Likewise.
12482 2007-08-28  Robert Millan  <rmh@aybabtu.com>
12484         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
12485         to tell grub-mkdevicemap how to name devices.
12486         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
12487         feature).
12489         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
12490         util/i386/get_disk_name.c.
12491         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
12492         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
12493         util/ieee1275/get_disk_name.c.
12495         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
12497         * DISTLIST: Add util/i386/get_disk_name.c and
12498         util/ieee1275/get_disk_name.c.
12500         * util/grub-mkdevicemap.c: Replace device naming logic with
12501         grub_util_get_disk_name() calls.
12503 2007-08-20  Robert Millan  <rmh@aybabtu.com>
12505         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
12506         (so that it works for both plural and singular quantities).
12508 2007-08-05  Robert Millan  <rmh@aybabtu.com>
12510         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
12511         so that [xz] isn't taken into account when determining order.
12513 2007-08-02  Marco Gerards  <marco@gnu.org>
12515         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
12516         `include/multiboot2.h', `include/grub/elfload.h',
12517         `include/multiboot.h', `include/grub/multiboot.h',
12518         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
12519         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
12520         `kern/elf.c', `loader/multiboot_loader.c',
12521         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
12522         `loader/i386/pc/multiboot2.c',
12523         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
12524         `util/i386/pc/grub-mkrescue.in'.  Remove
12525         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
12526         `include/grub/i386/pc/util/biosdisk.h' and
12527         `include/grub/powerpc/ieee1275/multiboot.h'.
12529 2007-08-02  Bean  <bean123ch@gmail.com>
12531         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
12532         (ntfs_mod_SOURCES): New variable.
12533         (ntfs_mod_CFLAGS): Likewise.
12534         (ntfs_mod_LDFLAGS): Likewise.
12536         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
12537         (grub_probe_SOURCES): Likewise.
12538         (grub_emu_SOURCES): Likewise.
12540         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12541         (grub_emu_SOURCES): Likewise.
12543         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12544         (grub_emu_SOURCES): Likewise.
12546         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
12548         * fs/ntfs.c: New file.
12550 2007-08-02  Bean  <bean123ch@gmail.com>
12552         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
12554         * file.h (grub_file): Likewise.
12556         * fshelp.h (grub_fshelp_read_file): Likewise.
12558         * util/i386/pc/grub-setup.c (setup): Likewise.
12559         (save_first_sector): Likewise.
12560         (save_blocklists): Likewise.
12562         * fs/affs.c (grub_affs_read_file): Likewise.
12564         * fs/ext2.c (grub_ext2_read_file): Likewise.
12566         * fs/fat.c (grub_fat_read_data): Likewise.
12568         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
12570         * fs/hfs.c (grub_hfs_read_file): Likewise.
12572         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12574         * fs/jfs.c (grub_jfs_read_file): Likewise.
12576         * fs/minix.c (grub_minix_read_file): Likewise.
12578         * fs/sfs.c (grub_sfs_read_file): Likewise.
12580         * fs/ufs.c (grub_ufs_read_file): Likewise.
12582         * fs/xfs.c (grub_xfs_read_file): Likewise.
12584         * command/blocklist.c (read_blocklist): Likewise.
12585         (print_blocklist): Likewise.
12587 2007-08-02  Marco Gerards  <marco@gnu.org>
12589         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
12590         `util/hostfs.c'.
12592         * disk/host.c: New file.
12594         * util/hostfs.c: Likewise.
12596         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
12597         return `GRUB_ERR_BAD_FS'.
12598         * fs/sfs.c (grub_sfs_mount): Likewise.
12599         * fs/xfs.c (grub_xfs_mount): Likewise.
12601         * include/grub/disk.h (enum grub_disk_dev_id): Add
12602         `GRUB_DISK_DEVICE_HOST_ID'.
12604         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
12606 2007-07-24  Jerone Young  <jerone@gmail.com>
12608         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
12609         modules for compilation.
12610         * conf/powerpc-ieee1275.rmk: Likewise.
12612         * include/multiboot.h: Move multiboot definitions to one file. Rename
12613         many definitions to not get grub specific.
12614         * include/multiboot2.h: Create header with multiboot 2 definitions.
12615         * include/grub/multiboot.h: Header for grub specific function
12616         prototypes and definitions.
12617         * include/grub/multiboot2.h: Likewise.
12618         * include/grub/multiboot_loader.h: Likewise.
12619         * include/grub/i386/pc/multiboot.h: Removed.
12620         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
12622         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
12623         and 2 to allow for one multiboot and module commands.
12624         * loader/multiboot2.c: Add multiboot2 functionality.
12625         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
12626         and definition names.
12627         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
12628         2 functions.
12629         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
12630         ieee1275 specific multiboot2 code.
12632         * kern/i386/pc/startup.S: Change headers and definition names for
12633         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
12635 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12637         * geninitheader.sh: Process file specified in first parameter rather
12638         than hardcoding grub_modules_init.lst.
12639         * geninit.sh: Likewise.  Also, construct header name dynamically rather
12640         than hardcoding grub_modules_init.h.
12642         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
12643         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
12644         grub_probe_init.[ch] and grub_setup_init.[ch].
12646         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
12647         grub_modules_init.h with grub_emu_init.h.
12648         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
12649         grub_probe_init.[ch] files.
12650         * conf/i386-efi.rmk: Likewise.
12651         * conf/i386-pc.rmk: Likewise.
12652         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
12653         grub_setup_init.[ch] files.
12655         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
12656         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
12657         to initialize modules rather than a list of hardcoded functions.
12658         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
12659         grub_init_all() to initialize modules rather than a list of hardcoded
12660         functions.
12662 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12664         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
12665         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
12667 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12669         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12670         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
12671         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
12672         flag when running on SmartFirmware.
12673         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
12674         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
12675         was set.
12677         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12678         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
12679         rather than decreasing it.
12681         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
12682         there's not enough space to do it, fail in the same way as when it
12683         can't be done because there are no partitions.
12685         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
12686         when nvsetenv failed.
12688 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12690         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
12691         because this rule is automatically generated.
12692         (grub-mkrescue): Removed for the same reason as above.
12694 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12696         Migrate to GNU General Public License Version 3.
12698         * COPYING: Replaced with the plain text version of GPLv3.
12700         * config.guess: Updated from gnulib.
12701         * config.sub: Likewise.
12703         * geninit.sh: Output a GPLv3 copyright notice.
12704         * geninitheader.sh: Likewise.
12705         * genmodsrc.sh: Likewise.
12706         * gensymlist.sh.in: Likewise.
12708         * boot/i386/pc/boot.S: Upgraded to GPLv3.
12709         * boot/i386/pc/diskboot.S: Likewise.
12710         * boot/i386/pc/pxeboot.S: Likewise.
12711         * commands/blocklist.c: Likewise.
12712         * commands/boot.c: Likewise.
12713         * commands/cat.c: Likewise.
12714         * commands/cmp.c: Likewise.
12715         * commands/configfile.c: Likewise.
12716         * commands/echo.c: Likewise.
12717         * commands/help.c: Likewise.
12718         * commands/ls.c: Likewise.
12719         * commands/search.c: Likewise.
12720         * commands/terminal.c: Likewise.
12721         * commands/test.c: Likewise.
12722         * commands/videotest.c: Likewise.
12723         * commands/i386/cpuid.c: Likewise.
12724         * commands/i386/pc/halt.c: Likewise.
12725         * commands/i386/pc/play.c: Likewise.
12726         * commands/i386/pc/reboot.c: Likewise.
12727         * commands/i386/pc/vbeinfo.c: Likewise.
12728         * commands/i386/pc/vbetest.c: Likewise.
12729         * commands/ieee1275/halt.c: Likewise.
12730         * commands/ieee1275/reboot.c: Likewise.
12731         * commands/ieee1275/suspend.c: Likewise.
12732         * disk/loopback.c: Likewise.
12733         * disk/lvm.c: Likewise.
12734         * disk/raid.c: Likewise.
12735         * disk/efi/efidisk.c: Likewise.
12736         * disk/i386/pc/biosdisk.c: Likewise.
12737         * disk/ieee1275/ofdisk.c: Likewise.
12738         * font/manager.c: Likewise.
12739         * fs/affs.c: Likewise.
12740         * fs/ext2.c: Likewise.
12741         * fs/fat.c: Likewise.
12742         * fs/fshelp.c: Likewise.
12743         * fs/hfs.c: Likewise.
12744         * fs/hfsplus.c: Likewise.
12745         * fs/iso9660.c: Likewise.
12746         * fs/jfs.c: Likewise.
12747         * fs/minix.c: Likewise.
12748         * fs/sfs.c: Likewise.
12749         * fs/ufs.c: Likewise.
12750         * fs/xfs.c: Likewise.
12751         * hello/hello.c: Likewise.
12752         * include/grub/acorn_filecore.h: Likewise.
12753         * include/grub/arg.h: Likewise.
12754         * include/grub/bitmap.h: Likewise.
12755         * include/grub/boot.h: Likewise.
12756         * include/grub/cache.h: Likewise.
12757         * include/grub/device.h: Likewise.
12758         * include/grub/disk.h: Likewise.
12759         * include/grub/dl.h: Likewise.
12760         * include/grub/elfload.h: Likewise.
12761         * include/grub/env.h: Likewise.
12762         * include/grub/err.h: Likewise.
12763         * include/grub/file.h: Likewise.
12764         * include/grub/font.h: Likewise.
12765         * include/grub/fs.h: Likewise.
12766         * include/grub/fshelp.h: Likewise.
12767         * include/grub/gzio.h: Likewise.
12768         * include/grub/hfs.h: Likewise.
12769         * include/grub/kernel.h: Likewise.
12770         * include/grub/loader.h: Likewise.
12771         * include/grub/lvm.h: Likewise.
12772         * include/grub/misc.h: Likewise.
12773         * include/grub/mm.h: Likewise.
12774         * include/grub/net.h: Likewise.
12775         * include/grub/normal.h: Likewise.
12776         * include/grub/parser.h: Likewise.
12777         * include/grub/partition.h: Likewise.
12778         * include/grub/pc_partition.h: Likewise.
12779         * include/grub/raid.h: Likewise.
12780         * include/grub/rescue.h: Likewise.
12781         * include/grub/script.h: Likewise.
12782         * include/grub/setjmp.h: Likewise.
12783         * include/grub/symbol.h: Likewise.
12784         * include/grub/term.h: Likewise.
12785         * include/grub/terminfo.h: Likewise.
12786         * include/grub/tparm.h: Likewise.
12787         * include/grub/types.h: Likewise.
12788         * include/grub/video.h: Likewise.
12789         * include/grub/efi/api.h: Likewise.
12790         * include/grub/efi/chainloader.h: Likewise.
12791         * include/grub/efi/console.h: Likewise.
12792         * include/grub/efi/console_control.h: Likewise.
12793         * include/grub/efi/disk.h: Likewise.
12794         * include/grub/efi/efi.h: Likewise.
12795         * include/grub/efi/pe32.h: Likewise.
12796         * include/grub/efi/time.h: Likewise.
12797         * include/grub/i386/linux.h: Likewise.
12798         * include/grub/i386/setjmp.h: Likewise.
12799         * include/grub/i386/types.h: Likewise.
12800         * include/grub/i386/efi/kernel.h: Likewise.
12801         * include/grub/i386/efi/loader.h: Likewise.
12802         * include/grub/i386/efi/time.h: Likewise.
12803         * include/grub/i386/pc/biosdisk.h: Likewise.
12804         * include/grub/i386/pc/boot.h: Likewise.
12805         * include/grub/i386/pc/chainloader.h: Likewise.
12806         * include/grub/i386/pc/console.h: Likewise.
12807         * include/grub/i386/pc/init.h: Likewise.
12808         * include/grub/i386/pc/kernel.h: Likewise.
12809         * include/grub/i386/pc/loader.h: Likewise.
12810         * include/grub/i386/pc/memory.h: Likewise.
12811         * include/grub/i386/pc/multiboot.h: Likewise.
12812         * include/grub/i386/pc/serial.h: Likewise.
12813         * include/grub/i386/pc/time.h: Likewise.
12814         * include/grub/i386/pc/vbe.h: Likewise.
12815         * include/grub/i386/pc/vbeblit.h: Likewise.
12816         * include/grub/i386/pc/vbefill.h: Likewise.
12817         * include/grub/i386/pc/vbeutil.h: Likewise.
12818         * include/grub/i386/pc/vga.h: Likewise.
12819         * include/grub/ieee1275/ieee1275.h: Likewise.
12820         * include/grub/ieee1275/ofdisk.h: Likewise.
12821         * include/grub/powerpc/libgcc.h: Likewise.
12822         * include/grub/powerpc/setjmp.h: Likewise.
12823         * include/grub/powerpc/types.h: Likewise.
12824         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
12825         * include/grub/powerpc/ieee1275/console.h: Likewise.
12826         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
12827         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
12828         * include/grub/powerpc/ieee1275/loader.h: Likewise.
12829         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
12830         * include/grub/powerpc/ieee1275/time.h: Likewise.
12831         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
12832         * include/grub/sparc64/libgcc.h: Likewise.
12833         * include/grub/sparc64/setjmp.h: Likewise.
12834         * include/grub/sparc64/types.h: Likewise.
12835         * include/grub/sparc64/ieee1275/console.h: Likewise.
12836         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12837         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12838         * include/grub/sparc64/ieee1275/time.h: Likewise.
12839         * include/grub/util/biosdisk.h: Likewise.
12840         * include/grub/util/getroot.h: Likewise.
12841         * include/grub/util/lvm.h: Likewise.
12842         * include/grub/util/misc.h: Likewise.
12843         * include/grub/util/raid.h: Likewise.
12844         * include/grub/util/resolve.h: Likewise.
12845         * io/gzio.c: Likewise.
12846         * kern/device.c: Likewise.
12847         * kern/disk.c: Likewise.
12848         * kern/dl.c: Likewise.
12849         * kern/elf.c: Likewise.
12850         * kern/env.c: Likewise.
12851         * kern/err.c: Likewise.
12852         * kern/file.c: Likewise.
12853         * kern/fs.c: Likewise.
12854         * kern/loader.c: Likewise.
12855         * kern/main.c: Likewise.
12856         * kern/misc.c: Likewise.
12857         * kern/mm.c: Likewise.
12858         * kern/parser.c: Likewise.
12859         * kern/partition.c: Likewise.
12860         * kern/rescue.c: Likewise.
12861         * kern/term.c: Likewise.
12862         * kern/efi/efi.c: Likewise.
12863         * kern/efi/init.c: Likewise.
12864         * kern/efi/mm.c: Likewise.
12865         * kern/i386/dl.c: Likewise.
12866         * kern/i386/efi/init.c: Likewise.
12867         * kern/i386/efi/startup.S: Likewise.
12868         * kern/i386/pc/init.c: Likewise.
12869         * kern/i386/pc/lzo1x.S: Likewise.
12870         * kern/i386/pc/startup.S: Likewise.
12871         * kern/ieee1275/ieee1275.c: Likewise.
12872         * kern/powerpc/cache.S: Likewise.
12873         * kern/powerpc/dl.c: Likewise.
12874         * kern/powerpc/ieee1275/cmain.c: Likewise.
12875         * kern/powerpc/ieee1275/crt0.S: Likewise.
12876         * kern/powerpc/ieee1275/init.c: Likewise.
12877         * kern/powerpc/ieee1275/openfw.c: Likewise.
12878         * kern/sparc64/cache.S: Likewise.
12879         * kern/sparc64/dl.c: Likewise.
12880         * kern/sparc64/ieee1275/init.c: Likewise.
12881         * kern/sparc64/ieee1275/openfw.c: Likewise.
12882         * loader/efi/chainloader.c: Likewise.
12883         * loader/efi/chainloader_normal.c: Likewise.
12884         * loader/i386/efi/linux.c: Likewise.
12885         * loader/i386/efi/linux_normal.c: Likewise.
12886         * loader/i386/pc/chainloader.c: Likewise.
12887         * loader/i386/pc/chainloader_normal.c: Likewise.
12888         * loader/i386/pc/linux.c: Likewise.
12889         * loader/i386/pc/linux_normal.c: Likewise.
12890         * loader/i386/pc/multiboot.c: Likewise.
12891         * loader/i386/pc/multiboot_normal.c: Likewise.
12892         * loader/powerpc/ieee1275/linux.c: Likewise.
12893         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12894         * normal/arg.c: Likewise.
12895         * normal/cmdline.c: Likewise.
12896         * normal/command.c: Likewise.
12897         * normal/completion.c: Likewise.
12898         * normal/execute.c: Likewise.
12899         * normal/function.c: Likewise.
12900         * normal/lexer.c: Likewise.
12901         * normal/main.c: Likewise.
12902         * normal/menu.c: Likewise.
12903         * normal/menu_entry.c: Likewise.
12904         * normal/misc.c: Likewise.
12905         * normal/parser.y: Likewise.
12906         * normal/script.c: Likewise.
12907         * normal/i386/setjmp.S: Likewise.
12908         * normal/powerpc/setjmp.S: Likewise.
12909         * normal/sparc64/setjmp.S: Likewise.
12910         * partmap/acorn.c: Likewise.
12911         * partmap/amiga.c: Likewise.
12912         * partmap/apple.c: Likewise.
12913         * partmap/gpt.c: Likewise.
12914         * partmap/pc.c: Likewise.
12915         * partmap/sun.c: Likewise.
12916         * term/gfxterm.c: Likewise.
12917         * term/terminfo.c: Likewise.
12918         * term/efi/console.c: Likewise.
12919         * term/i386/pc/console.c: Likewise.
12920         * term/i386/pc/serial.c: Likewise.
12921         * term/i386/pc/vesafb.c: Likewise.
12922         * term/i386/pc/vga.c: Likewise.
12923         * term/ieee1275/ofconsole.c: Likewise.
12924         * util/biosdisk.c: Likewise.
12925         * util/console.c: Likewise.
12926         * util/genmoddep.c: Likewise.
12927         * util/getroot.c: Likewise.
12928         * util/grub-emu.c: Likewise.
12929         * util/grub-mkdevicemap.c: Likewise.
12930         * util/grub-probe.c: Likewise.
12931         * util/lvm.c: Likewise.
12932         * util/misc.c: Likewise.
12933         * util/raid.c: Likewise.
12934         * util/resolve.c: Likewise.
12935         * util/update-grub.in: Likewise.
12936         * util/update-grub_lib.in: Likewise.
12937         * util/grub.d/00_header.in: Likewise.
12938         * util/grub.d/10_hurd.in: Likewise.
12939         * util/grub.d/10_linux.in: Likewise.
12940         * util/i386/efi/grub-install.in: Likewise.
12941         * util/i386/efi/grub-mkimage.c: Likewise.
12942         * util/i386/pc/grub-install.in: Likewise.
12943         * util/i386/pc/grub-mkimage.c: Likewise.
12944         * util/i386/pc/grub-mkrescue.in: Likewise.
12945         * util/i386/pc/grub-setup.c: Likewise.
12946         * util/i386/pc/misc.c: Likewise.
12947         * util/powerpc/ieee1275/grub-install.in: Likewise.
12948         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
12949         * util/powerpc/ieee1275/misc.c: Likewise.
12950         * video/bitmap.c: Likewise.
12951         * video/video.c: Likewise.
12952         * video/i386/pc/vbe.c: Likewise.
12953         * video/i386/pc/vbeblit.c: Likewise.
12954         * video/i386/pc/vbefill.c: Likewise.
12955         * video/i386/pc/vbeutil.c: Likewise.
12956         * video/readers/tga.c: Likewise.
12958 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12960         * conf/i386-efi.rmk: Replace obsolete reference to
12961         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
12962         with util/getroot.c.
12963         * conf/powerpc-ieee1275.rmk: Likewise.
12964         * conf/sparc64-ieee1275.rmk: Likewise.
12966         * util/grub-emu.c (main): Fix unchecked pointer handling.
12968 2007-07-02  Robert Millan  <rmh@aybabtu.com>
12970         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
12971         invocation to fail, in order to support partition-less media.
12973         * util/i386/pc/grub-install.in: Likewise.
12975         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
12976         which fs or partmap modules are needed (akin to its sister scripts).
12978         Also use grub-probe to get rid of unportable /proc/mounts check.
12980         Print the same informational message that the other scripts do, before
12981         exiting.
12983 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12985         * util/update-grub_lib.in (font_path): New function.  Determine whether
12986         a font file can be found and, if so, echo the GRUB path to it.
12988         * util/update-grub.in: Handle multiple terminals depending on user
12989         input, platform availability and font file presence.  Propagate
12990         variables of our findings to /etc/grub.d/ children.
12992         * util/grub.d/00_header.in: Handle multiple terminals, based on
12993         environment setup by update-grub.
12995 2007-06-23  Robert Millan  <rmh@aybabtu.com>
12997         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
12999 2007-06-21  Robert Millan  <rmh@aybabtu.com>
13001         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
13002         indicate end of data section in kernel image.
13003         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
13004         GRUB_KERNEL_MACHINE_DATA_END.
13006         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
13007         space for it.
13008         * kern/i386/efi/startup.S: Likewise.
13010         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
13011         during image generation.  Implement --prefix option to override this
13012         patch.
13013         * util/i386/efi/grub-mkimage.c: Likewise.
13015         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
13016         code to make path relative to its root into a separate function.
13018         * util/i386/pc/grub-install.in: Use newly provided
13019         make_system_path_relative_to_its_root() to convert ${grubdir}, then
13020         pass the result to grub-install --prefix.
13022 2007-06-13  Robert Millan  <rmh@aybabtu.com>
13024         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
13025         DEFAULT_DEVICE_MAP.
13026         * util/grub-emu.c: Use above definitions from misc.h instead of
13027         defining them.
13028         * util/grub-mkdevicemap.c: Likewise.
13029         * util/i386/pc/grub-setup.c: Likewise.
13030         * util/grub-probe.c: Likewise.
13031         (probe): Abort with grub_util_error() when either
13032         grub_guess_root_device or grub_util_get_grub_dev fails.
13034 2007-06-12  Robert Millan  <rmh@aybabtu.com>
13036         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
13037         "pager" assignment.
13038         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
13039         "pcdata".
13040         * util/grub-probe.c (probe): Likewise for "drive_name".
13042 2007-06-11  Robert Millan  <rmh@aybabtu.com>
13044         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
13045         not just the cdrom one.
13047 2007-06-11  Robert Millan  <rmh@aybabtu.com>
13049         * util/i386/pc/grub-mkrescue.in: Add "set -e".
13050         Add --pkglibdir=DIR option to override pkglibdir.
13051         Mention --image-type=TYPE in help output.
13052         Fix --grub-mkimage (it was a no-op).
13053         Abort gracefully when no parameter is given.
13055 2007-06-11  Robert Millan  <rmh@aybabtu.com>
13057         * util/i386/pc/grub-mkrescue.in: New file.
13058         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
13059         * Makefile.in: Handle bin_SCRIPTS.
13061 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
13063         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
13064         list of video modes.
13066 2007-06-06  Robert Millan  <rmh@aybabtu.com>
13068         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
13069         file doesn't exist, or if it is in a filesystem grub can't read.
13071         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
13072         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
13073         header comment to fit in 80 columns when the variables are resolved.
13075         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
13076         could be identified by update-grub.  Remove redundant check for
13077         unifont.pff existence (since convert_system_path_to_grub_path now
13078         handles that).
13080 2007-06-04  Robert Millan  <rmh@aybabtu.com>
13082         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
13084         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
13086         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
13088 2007-06-04  Robert Millan  <rmh@aybabtu.com>
13090         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
13092         * include/grub/partition.h: Declare grub_apple_partition_map_init and
13093         grub_apple_partition_map_fini.
13095         * util/biosdisk.c
13096         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
13097         to access >2 TiB disks).
13099         Print disk->total_sectors with %llu instead of %lu, since this
13100         variable is always 64-bit (prevents wrong disk size from being displayed
13101         on either >2 TiB disk or big-endian CPU).
13103         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
13104         into a generic case that supports all (sane) partition maps.
13106         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
13107         breaks big-endian.
13109         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
13110         and grub_apple_partition_map_fini() after that.
13112 2007-06-01  Robert Millan  <rmh@aybabtu.com>
13114         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
13116         * util/grub.d/00_header.in: Only enable gfxterm when
13117         convert_system_path_to_grub_path() succeeds.
13119 2007-05-20  Robert Millan  <rmh@aybabtu.com>
13121         * util/update-grub_lib.in: New file.
13122         * DISTLIST: Add update-grub_lib.in.
13123         * conf/common.rmk: Generate update-grub_lib and install it in
13124         $(lib_DATA).
13125         * Makefile.in: Add install routine for $(lib_DATA).
13127         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
13128         function provided by update-grub_lib to support arbitrary paths of
13129         unifont.pff.
13130         * util/update-grub.in: Use convert_system_path_to_grub_path() to
13131         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
13133 2007-05-19  Robert Millan  <rmh@aybabtu.com>
13135         * commands/i386/cpuid.c: New module.
13136         * DISTLIST: Add it.
13137         * conf/i386-efi.rmk: Enable cpuid.mod.
13138         * conf/i386-pc.rmk: Likewise.
13140 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13142         * kern/disk.c (grub_disk_read): Check return value of
13143         grub_realloc().
13145 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13147         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
13148         arrays.
13149         * disk/raid.c (grub_raid_open): Likewise.
13151 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
13153         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
13154         stack instead of on the heap.
13156         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
13157         before doing a read on it.
13159         * configure.ac: Only use -fno-stack-protector for the target
13160         environment.
13162 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
13164         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
13165         __attribute_ ((unused)) to mode_type argument.
13167         * util/getroot.c (grub_guess_root_device): Fix #endif.
13169         * kern/misc.c (memcmp): Fix prototype.
13171         * include/grub/partition.h [GRUB_UTIL]
13172         (grub_gpt_partition_map_init): Add prototype.
13173         (grub_gpt_partition_map_fini): Likewise.
13175         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
13176         at the right place.
13178         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
13179         (grub_fat_read_data): Likewise.
13180         (grub_fat_find_dir): Likewise.
13182         * font/manager.c (find_glyph): Make table a const.
13183         (grub_font_get_glyph): Remove bitmap from if statement.
13185 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
13187         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
13188         code, first search for device in /dev/mapper, then in /dev.
13189         (grub_util_get_grub_dev): New function.
13190         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
13191         prototype.
13192         * util/grub-probe.c (probe): Remove check for RAID, call
13193         grub_util_get_grub_dev() instead of
13194         grub_util_biosdisk_get_grub_dev().
13195         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
13196         grub_util_biosdisk_get_grub_dev().
13197         * util/i386/pc/grub-setup.c (main): Likewise.
13199 2007-05-16  Robert Millan  <rmh@aybabtu.com>
13201         * DISTLIST: Update for the latest changes.
13202         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
13203         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
13204         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
13205         grub/util/biosdisk.h.
13206         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
13207         grub/util/biosdisk.h.
13209 2007-05-16  Robert Millan  <rmh@aybabtu.com>
13211         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
13213 2007-05-16  Robert Millan  <rmh@aybabtu.com>
13215         * util/i386/efi/grub-install.in: New.
13216         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
13217         newly added grub-install.
13218         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
13219         include.
13220         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
13221         grub/util/biosdisk.h.
13222         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
13223         grub/util/biosdisk.h.
13225 2007-05-16  Robert Millan  <rmh@aybabtu.com>
13227         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
13228         * include/grub/util/biosdisk.h: ... here.
13229         * util/i386/pc/biosdisk.c: Moved to ...
13230         * util/biosdisk.c: ... here.
13231         * util/i386/pc/getroot.c: Moved to ...
13232         * util/getroot.c: ... here.
13233         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
13234         * util/grub-mkdevicemap.c: ... here.
13235         * util/i386/pc/grub-probe.c: Moved to ...
13236         * util/grub-probe.c: ... here.
13238 2007-05-15  Robert Millan  <rmh@aybabtu.com>
13240         * util/update-grub.in: Remove duplicated line in grub.cfg header
13241         message.
13243 2007-05-13  Robert Millan  <rmh@aybabtu.com>
13245         * util/update-grub.in: Fix a few assumptions about the devices holding
13246         /, /boot and /boot/grub being the same.
13247         * util/grub.d/00_header.in: Likewise.
13248         * util/grub.d/10_hurd.in: Likewise.
13249         * util/grub.d/10_linux.in: Likewise.
13251         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
13252         patterns.  Use that to define the `.old' suffix as older than `'.
13254         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
13256         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
13257         the grub.cfg header message.
13259 2007-05-11  Robert Millan  <rmh@aybabtu.com>
13261         * util/update-grub.in: Create device.map if it doesn't already exist,
13262         before attempting to run grub-probe.
13263         Check for grub-probe and grub-mkdevicemap with the same code
13264         grub-install is using.
13265         Remove test mode.
13267 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13269         * Makefile.in: Add the datarootdir autoconf variable.
13271 2007-05-09  Robert Millan  <rmh@aybabtu.com>
13273         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
13274         fail gracefully if dev->disk->partition == NULL.
13276 2007-05-07  Robert Millan  <rmh@aybabtu.com>
13278         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
13279         determine partition map module.
13280         * util/i386/pc/grub-install.in: Use this feature to decide which
13281         partition module to load, instead of hardcoding pc and gpt.
13283 2007-05-07  Robert Millan  <rmh@aybabtu.com>
13285         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
13286         source directory differs from build directory.
13288 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13290         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
13291         initialisation.
13293 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13295         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
13297 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13299         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
13300         command-line arguments via ${GRUB_CMDLINE_LINUX}.
13302 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13304         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
13305         (grub_probe_SOURCES): Likewise.
13306         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
13307         GPT and initialize dos_part and bsd_part accordingly.
13308         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
13309         install_bsd_part.
13310         (main): Activate gpt module for use during partition identification,
13311         and deactivate it afterwards.
13312         * util/i386/pc/grub-install.in: Add gpt module to core.img.
13313         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
13314         partition identification, and deactivate it afterwards.
13316 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13318         * term/i386/pc/console.c (grub_console_fini): Call
13319         grub_term_set_current() before grub_term_unregister().
13321 2007-05-04  Robert Millan  <rmh@aybabtu.com>
13323         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
13324         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
13325         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
13326         and update-grub_DATA.
13327         * conf/common.rmk: Build and install update-grub components.
13328         * conf/common.mk: Regenerate.
13329         * util/update-grub.in: New.  Core of update-grub.
13330         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
13331         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
13332         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
13333         * util/grub.d/README: New.  Document grub.d directory layout.
13335 2007-05-01  Robert Millan  <rmh@aybabtu.com>
13337         * util/grub-emu.c: Move initialization functions
13338         grub_util_biosdisk_init() and grub_init_all() before
13339         grub_util_biosdisk_get_grub_dev(), which relies on them.
13341 2007-04-19  Robert Millan  <rmh@aybabtu.com>
13343         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
13344         it is used later.
13346 2007-04-18  Jerone Young  <jerone@gmail.com>
13348         * kernel/elf.c: Add missing parenthesis for conditional statement
13349         stanza.
13351 2007-04-10  Jerone Young  <jerone@gmail.com>
13353         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
13354         continue on and look for device node with real device name.
13356 2007-04-10  Jerone Young  <jerone@gmail.com>
13358         * configure.ac: Add argument for autoconf to use transformation
13359         ability.
13360         * Makefile.in: Add autoconf package transformation code.
13361         * util/i386/pc/grub-install.in: Likewise.
13362         * util/powerpc/ieee1275/grub-install.in: Likewise.
13364 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
13366         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
13367         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
13368         (EXT2_REVISION): Likewise.
13369         (EXT2_INODE_SIZE): Likewise.
13370         (struct grub_ext2_block_group): Added a missing member
13371         "used_dirs".
13372         (grub_ext2_read_inode): Divide by the inode size in a superblock
13373         instead of 128 to obtain INODES_PER_BLOCK.
13374         Use the macro EXT2_INODE_SIZE instead of directly using
13375         SBLOCK->INODE_SIZE.
13377 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
13379         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
13380         superblock instead of the structure size to compute an
13381         offset. This fixes the problem that GRUB could not read a
13382         filesystem when inode size is different from 128-byte.
13384 2007-03-05  Marco Gerards  <marco@gnu.org>
13386         * normal/main.c (read_config_file): When "menu" is not set, create
13387         an initial context.
13389 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13391         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
13392         (HEAP_LIMIT): New macro.
13393         (grub_claim_heap): Claim memory up to `heaplimit'.
13395 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13397         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
13398         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
13399         (_start): Likewise.
13400         (grub_arch_modules_addr): Return address after `_end'.
13401         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
13402         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
13403         (add_segments): Calculate `_end' from phdr size and location.
13404         (ALIGN_UP): Moved to ...
13405         * include/grub/misc.h: here.
13406         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13407         New macro.
13408         (GRUB_IEEE1275_MODULE_BASE): Removed.
13410 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13412         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
13413         loop boundary.
13415 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13417         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
13418         All users updated.
13419         (grub_elf64_load_hook_t): Likewise.
13420         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
13421         debug output.
13423 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13425         * kern/mm.c: Update copyright.
13426         (grub_mm_debug): Correct syntax error.
13427         (grub_mm_dump_free): New function.
13428         (grub_debug_free): Call `grub_free'.
13429         * include/grub/mm.h: Update copyright.
13430         (grub_mm_dump_free): Add declaration.
13432 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13434         * include/grub/ieee1275/ieee1275.h: Update copyright.
13435         * kern/powerpc/ieee1275/init.c: Likewise.
13436         * kern/powerpc/ieee1275/openfw.c: Likewise.
13438         * loader/powerpc/ieee1275/linux.c: Likewise.
13439         * include/grub/elfload.h: Likewise.
13440         * kern/elf.c: Likewise.
13441         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
13442         callers.
13443         (grub_elf64_load): Likewise.
13444         (grub_elf32_load_segment): Move to a nested function.
13445         (grub_elf64_load_segment): Likewise.
13447 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13449         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
13450         prototype.
13451         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
13452         (grub_heap_len): Likewise.
13453         (HEAP_SIZE): New macro.
13454         (grub_claim_heap): New function.
13455         (grub_machine_init): Don't claim heap directly.  Call
13456         `grub_claim_heap'.
13457         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
13458         (grub_available_iterate): New function.
13460 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
13462         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
13463         * configure.ac: Use it for testing the HOST and TARGET compilers.
13465 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
13467         * Makefile.in (enable_grub_emu): New variable.
13468         * configure.ac (--enable-grub-emu): New option.
13469         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
13470         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
13471         * conf/i386-pc.rmk: Likewise.
13472         * conf/powerpc-ieee1275.rmk: Likewise.
13473         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
13475 2006-12-12  Marco Gerards  <marco@gnu.org>
13477         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
13479         * kern/env.c (grub_env_unset): Don't free the member `value' when
13480         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
13481         pointer.
13483         * normal/main.c (current_menu): Removed.
13484         (free_menu): Unset the `menu' environment variable.
13485         (grub_normal_menu_addentry): Make use of the environment variable
13486         `menu', instead of using the global `current_menu'.  Allocate
13487         memory for the sourcecode of this entry.
13488         (read_config_file): New argument `nested', changed all callers.
13489         Only in the case of a new context, initialize a new menu.  Set the
13490         `menu' environment variable.
13491         (grub_normal_execute): Don't set and unset the environment
13492         variable `menu' here anymore.  Only free the menu when leaving the
13493         context.
13495         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
13496         leak.
13498 2006-12-11  Marco Gerards  <marco@gnu.org>
13500         * normal/menu_entry.c (run): Fix off by one bug so the last line
13501         is executed.  Move the loader check to outside the loop.
13503 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
13505         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
13507 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
13509         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
13510         the number of sectors.  Reported by Andrey Shuvikov
13511         <mr_hyro@yahoo.com>.
13513 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
13515         * kern/disk.c (grub_disk_read): When there is a read error, always
13516         try to read only the necessary data.
13518         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
13519         disk/raid.c.
13520         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
13521         prototype.
13522         [GRUB_UTIL] (grub_raid_fini): Likewise.
13523         [GRUB_UTIL] (grub_lvm_init): Likewise.
13524         [GRUB_UTIL] (grub_lvm_fini): Likewise.
13525         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
13526         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
13527         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
13528         and grub_raid_fini().
13530 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13532         * include/grub/types.h (__unused): Rename to UNUSED.
13533         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
13534         (grub_elf64_size): Likewise.
13536 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13538         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
13539         grub_error_push and grub_error_pop in the error-handling path.
13540         (grub_elf32_load_segment): Only call grub_file_read with non-zero
13541         length.
13543 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13545         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
13546         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13547         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13548         (kernel_elf_SOURCES): Likewise.
13549         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
13550         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
13551         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13552         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13553         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
13554         (elf_mod_SOURCES): New variable.
13555         (elf_mod_CFLAGS): Likewise.
13556         (elf_mod_LDFLAGS): Likewise.
13557         * include/grub/types.h (__unused): New macro.
13558         * include/grub/elfload.h: New file.
13559         * kern/elf.c: Likewise.
13560         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
13561         (ELF32_LOADMASK): New macro.
13562         (ELF64_LOADMASK): Likewise.
13563         (vmlinux): Removed.
13564         (grub_linux_load32): New function.
13565         (grub_linux_load64): Likewise.
13566         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
13567         Use grub_elf_t instead of grub_file_t.
13569 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13571         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
13572         `catch_result' to struct set_color_args.
13574 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13576         * normal/menu.c: Include grub/script.h.
13577         * normal/menu_entry.c: Likewise.
13578         * include/grub/normal.h: Do not include grub/script.h.
13580 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13582         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
13584 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13586         * kern/disk.c (grub_disk_open): Print debug messages when opening a
13587         disk.
13588         (grub_disk_close): Print debug messages when closing a disk.
13589         (grub_disk_read): Print debug messages when disk read fails.
13590         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
13591         filesystem type.
13592         * kern/partition.c: Include misc.h.
13593         (grub_partition_iterate): Print debug messages when detecting
13594         partition type.
13596 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13598         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
13599         is negative.
13600         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
13602 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
13604         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13605         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
13607 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
13609         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
13610         instead of sizeof(lv). Patch by Michael Guntsche.
13612 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13614         * disk/lvm.c: Rename VGS to VG_LIST.
13615         (grub_lvm_iterate): Change VGS->LV to VG-LV.
13616         (grub_lvm_open): Likewise.
13617         Thanks to Michael Guntsche for finding this bug.
13619 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13621         * configure.ac (AC_INIT): Bumped to 1.95.
13623 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13625         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
13626         with "/dev/.static/dev/md".
13628 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13630         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
13631         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
13632         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
13633         DRIVE_NAME are always freed.
13635         * util/i386/pc/biosdisk.c (make_device_name): Add one into
13636         DOS_PART, as a DOS partition is counted from one instead of zero
13637         now. Reported by Robert Millan.
13639 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13641         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
13642         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
13643         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
13644         string returned by grub_guess_root_device.
13645         * util/i386/pc/grub-setup.c: Likewise.
13646         * util/i386/pc/grub-probefs.c: Likewise.
13648         * util/i386/pc/grub-probefs.c: Rename to ...
13649         * util/i386/pc/grub-probe.c: ... this.
13650         * DISTLIST: Remove grub-probefs, add grub-probe.
13651         * conf/i386-efi.rmk: Likewise.
13652         * conf/i386-pc.rmk: Likewise.
13653         * util/i386/pc/grub-install.in: Likewise.
13655         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
13656         choose which information we want to print.
13658 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13660         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
13661         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
13662         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
13663         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
13664         video/readers/tga.c and video/i386/pc/vbeutil.c.
13666 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
13668         Added support for RAID and LVM.
13670         * disk/lvm.c: New file.
13671         * disk/raid.c: Likewise.
13672         * include/grub/lvm.h: Likewise.
13673         * include/grub/raid.h: Likewise.
13674         * include/grub/util/lvm.h: Likewise.
13675         * include/grub/util/raid.h: Likewise.
13676         * util/lvm.c: Likewise.
13677         * util/raid.c: Likewise.
13679         * include/grub/disk.h (grub_disk_dev_id): Add
13680         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
13681         (grub_disk_get_size): New prototype.
13682         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
13683         returns a partition.
13684         (grub_disk_get_size): New function.
13686         * kern/i386/pc/init.c (make_install_device): Copy the prefix
13687         verbatim if grub_install_dos_part is -2.
13689         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
13690         and LVM devices.
13692         * util/i386/pc/grub-setup.c (setup): New argument
13693         MUST_EMBED. Force embedding of GRUB when the argument is
13694         true. Close FILE before returning.
13695         (main): Add support for RAID and LVM.
13697         * conf/common.rmk: Add RAID and LVM modules.
13698         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
13699         util/lvm.c.
13700         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
13702         * kern/misc.c (grub_strstr): New function.
13703         * include/grub/misc.h (grub_strstr): New prototype.
13705 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
13707         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
13709 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
13711         * kern/misc.c (grub_strtoull): Guess the base only if not
13712         specified.
13714 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13716         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
13717         PowerMac support.
13719 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13721         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
13723         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
13724         Remove `flags' argument.  All callers changed.
13725         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
13726         (IEEE1275_IHANDLE_INVALID): New variable.
13727         (IEEE1275_CELL_INVALID): New variable.
13728         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
13729         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
13730         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
13731         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
13732         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
13733         codes from Open Firmware.  All callers updated.
13734         (grub_ieee1275_next_property): Directly return Open Firmware return
13735         code.
13736         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
13737         Standardize error checking from `grub_ieee1275_get_property'.
13738         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
13739         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
13741 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13743         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
13744         `instance_to_package_args' to `instance_to_path_args'.
13746         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
13747         `grub_ieee1275_chosen'.
13749         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
13750         `grub_ieee1275_interpret'.
13752 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13754         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
13756 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13758         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
13759         (__cmpdi): Likewise.
13761         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
13762         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
13763         `grub_ssize_t'.
13765         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
13767         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
13768         to type `grub_ssize_t'.
13769         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
13771 2006-09-22  Marco Gerards  <marco@gnu.org>
13773         * normal/script.c (grub_script_create_cmdmenu): Skip leading
13774         newlines.
13776 2006-09-22  Marco Gerards  <marco@gnu.org>
13778         * commands/echo.c: New file.
13780         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
13782         * conf/common.rmk (echo_mod_SOURCES): New variable.
13783         (echo_mod_CFLAGS): Likewise.
13784         (echo_mod_LDFLAGS): Likewise.
13786 2006-09-22  Marco Gerards  <marco@gnu.org>
13788         * normal/main.c (get_line): Malloc memory instead of using
13789         preallocated memory.  Removed the arguments `cmdline' and
13790         `max_len'.  Updated all callers.
13792 2006-09-22  Marco Gerards  <marco@gnu.org>
13794         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
13795         (normal_mod_DEPENDENCIES): Likewise.
13797         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
13798         (normal_mod_DEPENDENCIES): Likewise.
13800         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
13802 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
13804         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
13805         programs.
13806         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
13807         (normal_mod_DEPENDENCIES): Likewise.
13808         * conf/i386-pc.mk: Regenerate.
13809         * conf/i386-efi.mk: Likewise
13810         * conf/common.mk: Likewise.
13811         * conf/powerpc-ieee1275.mk: Likewise.
13812         * conf/sparc64-ieee1275.mk: Likewise.
13814 2006-09-22  Robert Millan  <rmh@aybabtu.com>
13816         Sync with i386 version.
13817         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
13818         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
13820 2006-09-21  Robert Millan  <rmh@aybabtu.com>
13822         Import from GRUB Legacy (lib/device.c):
13823         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
13824         (init_device_map) [__linux__]: Add support for I2O devices.
13826 2006-09-14  Marco Gerards  <marco@gnu.org>
13828         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
13829         `-melf_i386'.
13831 2006-09-14  Robert Millan  <rmh@aybabtu.com>
13833         * util/i386/pc/grub-install.in: Skip menu.lst when removing
13834         /boot/grub/*.lst.
13836         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
13838         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
13839         before adding it to device.map.
13841 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
13843         * genmk.rb: Let GCC generate dependencies the first time it
13844         compiles a file; using the -MD option.
13845         * conf/common.mk: Regenerate.
13846         * conf/i386-pc.mk: Likewise.
13847         * conf/i386-efi.mk: Likewise.
13848         * conf/powerpc-ieee1275.mk: Likewise.
13849         * conf/sparc64-ieee1275.mk: Likewise.
13851 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
13853         Move the prototypes of grub_setjmp and grub_longjmp to
13854         cpu/setjmp.h, so that each architecture may specify different
13855         attributes.
13857         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
13858         (grub_longjmp): Likewise.
13859         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
13860         (grub_longjmp): Likewise.
13861         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
13862         (grub_longjmp): Likewise.
13864         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
13865         [!GRUB_UTIL] (grub_longjmp): Removed.
13867 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
13869         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
13870         "color!" method does not return any value.
13872 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13874         * include/grub/bitmap.h: New file.
13876         * include/grub/i386/pc/vbeutil.h: Likewise.
13878         * video/bitmap.c: Likewise.
13880         * video/readers/tga.c: Likewise.
13882         * video/i386/pc/vbeutil.c: Likewise.
13884         * commands/videotest.c: Code cleanup and updated to reflect to new
13885         video API.
13887         * term/gfxterm.c: Likewise.
13889         * video/video.c: Likewise.
13891         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
13892         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
13893         (bitmap_mod_SOURCES): New entry.
13894         (bitmap_mod_CFLAGS): Likewise.
13895         (bitmap_mod_LDFLAGS): Likewise.
13896         (tga_mod_SOURCES): Likewise.
13897         (tga_mod_CFLAGS): Likewise.
13898         (tga_mod_LDFLAGS): Likewise.
13900         * include/grub/video.h (grub_video_blit_operators): New enum type.
13901         (grub_video_render_target): Changed as forward declaration and moved
13902         actual definition to be video driver specific.
13903         (grub_video_adapter.blit_bitmap): Added blitting operator.
13904         (grub_video_adapter.blit_render_target): Likewise.
13905         (grub_video_blit_bitmap): Likewise.
13906         (grub_video_blit_render_target): Likewise.
13908         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
13909         driver specific render target definition.
13910         (grub_video_vbe_map_rgba): Added driver internal helper.
13911         (grub_video_vbe_unmap_color): Updated to use
13912         grub_video_i386_vbeblit_info.
13913         (grub_video_vbe_get_video_ptr): Likewise.
13915         * include/grub/i386/pc/vbeblit.h
13916         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
13917         grub_video_i386_vbeblit_info.
13918         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
13919         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
13920         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
13921         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
13922         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
13923         (grub_video_i386_vbeblit_index_index): Likewise.
13924         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
13925         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
13926         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
13927         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
13928         operator.
13929         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
13930         operator.
13932         * video/i386/pc/vbeblit.c: Updated to reflect changes on
13933         include/grub/i386/pc/vbeblit.h.
13935         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
13936         Updated to use grub_video_i386_vbeblit_info.
13937         (grub_video_i386_vbefill_R8G8B8): Likewise.
13938         (grub_video_i386_vbefill_index): Likewise.
13939         (grub_video_i386_vbefill): Added generic filler.
13941         * video/i386/pc/vbefill.c: Updated to reflect changes on
13942         include/grub/i386/pc/vbefill.h.
13944         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
13945         grub_video_i386_vbeblit_info.
13946         (grub_video_vbe_unmap_color): Likewise.
13947         (grub_video_vbe_blit_glyph): Likewise.
13948         (grub_video_vbe_scroll): Likewise.
13949         (grub_video_vbe_draw_pixel): Removed function.
13950         (grub_video_vbe_get_pixel): Likewise.
13951         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
13952         updated code to use it.
13953         (common_blitter): Added common blitter for render target and bitmap.
13954         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
13955         (grub_video_vbe_blit_render_target): Likewise.
13957 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
13959         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
13960         is in text mode if there is no console control protocol instance
13961         available.
13963 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13965         * include/grub/video.h: Code cleanup.
13967         * include/grub/i386/pc/vbe.h: Likewise.
13969         * video/i386/pc/vbe.c: Likewise.
13971         * video/i386/pc/vbeblit.c: Likewise.
13973         * video/i386/pc/vbefill.c: Likewise.
13975         * video/video.c: Likewise.  Also added more comments.
13977 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
13979         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
13980         (struct grub_biosdisk_dap): Likewise.
13982         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
13983         linkage settings for all functions.
13985 2006-07-12  Marco Gerards  <marco@gnu.org>
13987         * configure.ac (--enable-mm-debug): Fix typo.
13989         * genkernsyms.sh.in: Use proper quoting for `CC'.
13991 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
13993         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
13994         (normal_mod_ASFLAGS): Remove "-m32".
13996 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
13998         * util/misc.c: Include config.h.
13999         [!HAVE_MEMALIGN]: Do not include malloc.h.
14000         (grub_memalign): Use posix_memalign, if present. Then, use
14001         memalign, if present. Otherwise, emit an error.
14003         * util/grub-emu.c: Do not include malloc.h.
14005         * include/grub/util/misc.h: Include unistd.h. This is required for
14006         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
14007         D. Eades III <hde@foobar-qux.org>.
14009         * configure.ac (AC_GNU_SOURCE): Added.
14010         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
14011         type.
14013 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
14015         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
14016         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
14018 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
14020         * include/grub/types.h (grub_host_addr_t): Rename to
14021         grub_target_addr_t.
14022         (grub_host_off_t): Rename to grub_target_off_t.
14023         (grub_host_size_t): Rename to grub_target_size_t.
14024         (grub_host_ssize_t): Rename to grub_target_ssize_t.
14025         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
14027         * include/grub/kernel.h (struct grub_module_header): Change type
14028         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
14029         (grub_module_info): Likewise.
14031 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
14033         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
14034         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
14035         Velazquez <jesus.velazquez@gmail.com>.
14037 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
14039         Count partitions from 1 instead of 0 in the string representation
14040         of partitions. Still use 0-based internally.
14042         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
14043         (sun_partition_map_iterate): Use grub_partition_t instead of
14044         struct grub_partition *. Cast DESC->START_CYLINDER to
14045         grub_uint64_t after converting the endian.
14046         (sun_partition_map_probe): Subtract 1 for PARTNUM.
14047         (sun_partition_map_get_name): Add 1 to P->INDEX.
14049         * partmap/pc.c (grub_partition_parse): Subtract 1 for
14050         PCDATA->DOS_PART.
14051         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
14053         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
14054         zero instead of one.
14055         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
14056         (gpt_partition_map_get_name): Add 1 into P->INDEX.
14058         * partmap/apple.c (apple_partition_map_iterate): Change the type
14059         of POS to unsigned.
14060         (apple_partition_map_probe): Subtract 1 for PARTNUM.
14061         (apple_partition_map_get_name): Add 1 into P->INDEX.
14063         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
14064         of POS to unsigned.
14065         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
14066         calculate the offset of a partition.
14067         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
14068         (amiga_partition_map_get_name): Add 1 into P->INDEX.
14070         * partmap/acorn.c (acorn_partition_map_find): Change the type of
14071         SECTOR to grub_disk_addr_t.
14072         (acorn_partition_map_iterate): Likewise.
14073         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
14074         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
14075         top.
14076         (acorn_partition_map_get_name): Add 1 into P->INDEX.
14078         * kern/i386/pc/init.c (make_install_device): Add 1 into
14079         GRUB_INSTALL_DOS_PART.
14081         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
14082         conditional.
14084 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
14086         Clean up the code to support 64-bit addressing in disks and
14087         files. This change is not enough for filesystems yet.
14089         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
14090         type of "start" to grub_uint64_t.
14091         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
14092         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
14093         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
14094         convert addresses.
14096         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
14097         to grub_disk_addr_t.
14099         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
14100         string.
14102         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14104         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
14105         to char *.
14107         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
14109         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
14111         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
14113         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
14114         to grub_off_t, to detect an error from grub_file_seek.
14115         (grub_multiboot_load_elf32): Likewise.
14117         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
14118         maximum unsigned long value when an overflow is detected.
14119         (grub_strtoull): New function.
14120         (grub_divmod64): Likewise.
14121         (grub_lltoa): use grub_divmod64.
14123         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
14124         grub_disk_addr_t.
14125         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
14126         the pointer to next character. Use grub_strtoull instead of
14127         grub_strtoul.
14128         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
14129         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
14130         respectively.
14132         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
14133         return value is signed.
14134         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
14135         test if OFFSET is less than zero, as OFFSET is unsigned now.
14137         * kern/disk.c (struct grub_disk_cache): Change the type of
14138         "sector" to grub_disk_addr_t.
14139         (grub_disk_cache_get_index): Change the type of SECTOR to
14140         grub_disk_addr_t. Calculate the hash with SECTOR casted to
14141         unsigned after shifting.
14142         (grub_disk_cache_invalidate): Change the type of SECTOR to
14143         grub_disk_addr_t.
14144         (grub_disk_cache_unlock): Likewise.
14145         (grub_disk_cache_store): Likewise.
14146         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
14147         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
14148         grub_disk_addr_t and grub_uint64_t, respectively.
14149         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
14150         body, as the value of OFFSET is tweaked by
14151         grub_disk_check_range. Change the types of START_SECTOR, LEN and
14152         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
14153         respectively.
14154         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
14155         body, as the value of OFFSET is tweaked by
14156         grub_disk_check_range. Change the types of LEN and N to
14157         grub_size_t.
14159         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
14160         and "saved_offset" to grub_off_t.
14161         (test_header): Cast BUF to char *.
14162         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
14163         to char *.
14164         (grub_gzio_read): Change the types of OFFSET and SIZE to
14165         grub_off_t and grub_size_t, respectively.
14167         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
14168         Removed.
14169         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
14170         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
14171         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
14172         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
14173         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
14175         * include/grub/types.h (grub_off_t): Unconditionally set to
14176         grub_uint64_t.
14177         (grub_disk_addr_t): Changed to grub_uint64_t.
14179         * include/grub/partition.h (struct grub_partition): Change the
14180         types of "start", "len" and "offset" to grub_disk_addr_t,
14181         grub_uint64_t and grub_disk_addr_t, respectively.
14182         (grub_partition_get_start): Return grub_disk_addr_t.
14183         (grub_partition_get_len): Return grub_uint64_t.
14185         * include/grub/misc.h (grub_strtoull): New prototype.
14186         (grub_divmod64): Likewise.
14188         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
14189         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
14190         grub_off_t, respectively.
14191         All callers and references changed.
14193         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
14194         grub_size_t in "read".
14195         All callers and references changed.
14197         * include/grub/file.h (struct grub_file): Change the types of
14198         "offset" and "size" to grub_off_t and grub_off_t,
14199         respectively. Change the type of SECTOR to grub_disk_addr_t in
14200         "read_hook".
14201         (grub_file_read): Change the type of LEN to grub_size_t.
14202         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
14203         grub_off_t.
14204         (grub_file_size): Return grub_off_t.
14205         (grub_file_tell): Likewise.
14206         All callers and references changed.
14208         * include/grub/disk.h (struct grub_disk_dev): Change the types of
14209         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
14210         "write".
14211         (struct grub_disk): Change the type of "total_sectors" to
14212         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
14213         "read_hook".
14214         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
14215         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
14216         (grub_disk_write): Likewise.
14217         All callers and references changed.
14219         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
14220         char * for grub_strncmp to silence gcc.
14221         (grub_iso9660_mount): Likewise.
14222         (grub_iso9660_mount): Likewise.
14223         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
14224         return statement.
14225         (grub_iso9660_iterate_dir): Likewise.
14226         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
14228         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
14229         LEN to grub_disk_addr_t and grub_size_t, respectively.
14231         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
14233         * fs/jfs.c (grub_jfs_read_file): Likewise.
14235         * fs/minix.c (grub_jfs_read_file): Likewise.
14237         * fs/sfs.c (grub_jfs_read_file): Likewise.
14239         * fs/ufs.c (grub_jfs_read_file): Likewise.
14241         * fs/xfs.c (grub_jfs_read_file): Likewise.
14243         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
14244         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
14245         respectively.
14247         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
14248         BLKNR to -1 instead of returning GRUB_ERRNO.
14249         (grub_ext2_read_file): Change the types of SECTOR and
14250         LEN to grub_disk_addr_t and grub_size_t, respectively.
14252         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
14253         LEN to grub_disk_addr_t and grub_size_t, respectively.
14255         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
14256         grub_file_read.
14258         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
14259         string. Do not cast SECTOR explicitly.
14261         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
14262         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
14263         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
14264         grub_disk_addr_t and grub_size_t, respectively. If the sector is
14265         over 2TB and LBA mode is not supported, raise an error.
14266         (get_safe_sectors): New function.
14267         (grub_biosdisk_read): Use get_safe_sectors.
14268         (grub_biosdisk_write): Likewise.
14270         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
14271         (grub_efidisk_write): Likewise.
14273         * disk/loopback.c (delete_loopback): Cosmetic changes.
14274         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
14275         correctly.
14276         (grub_loopback_open): Likewise.
14277         (grub_loopback_read): Likewise. Also, change the type of POS to
14278         grub_off_t, and fix the usage of grub_memset.
14280         * commands/i386/pc/play.c: Include grub/machine/time.h.
14282         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
14283         print FILE->SIZE.
14285         * commands/configfile.c: Include grub/env.h.
14287         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
14288         GRUB_ERRNO directly instead. Change the type of POS to
14289         grub_off_t. Follow the coding standard.
14291         * commands/blocklist.c: Include grub/partition.h.
14292         (grub_cmd_blocklist): Return an error if the underlying device is
14293         not a disk. Take the starting sector of a partition into account,
14294         if a partition is used.
14296         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
14297         a length field.
14298         (lba_mode): Support 64-bit addresses.
14299         (chs_mode): Likewise.
14300         (copy_buffer): Adapted to the new offsets of a length field and a
14301         segment field.
14302         (blocklist_default_start): Allocate 64-bit space.
14304         * boot/i386/pc/boot.S (force_lba): Removed.
14305         (boot_drive): Moved to under KERNEL_SECTOR.
14306         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
14307         space.
14308         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
14309         is useless.
14310         (lba_mode): Refactored to support a 64-bit address. More size
14311         optimization.
14312         (setup_sectors): Likewise.
14314 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
14316         * DISTLIST: Added include/grub/i386/linux.h. Removed
14317         include/grub/i386/pc/linux.h
14319         * configure.ac (AC_INIT): Bumped to 1.94.
14321         * config.guess: Updated from gnulib.
14322         * config.sub: Likewise.
14323         * install-sh: Likewise.
14324         * mkinstalldirs: Likewise.
14326 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14328         * conf/common.rmk (grub_modules_init.lst): Depended on
14329         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
14330         MODSRCFILES.
14332         * genmk.rb (PModule::rule): Reverted the previous change.
14334 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14336         * conf/common.rmk (grub_modules_init.lst): Depends on
14337         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
14338         that the target does not exist before producing.
14339         (grub_modules_init.h): Remove the target before generating.
14340         (grub_emu_init.c): Likewise.
14342         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
14344 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
14346         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
14347         for the target-specific tests. Make sure that we also have the
14348         up-to-date target variables for those tests.
14350 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14352         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
14353         (PModule::rule): Likewise.
14355 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14357         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
14358         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
14359         target-specific flags should be prefixed.
14360         (PModule::rule): Likewise.
14362 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
14364         * configure.ac (CMP): Check if cmp is available explicitly.
14366 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
14368         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
14369         (target_cpu): New variable.
14370         (pkglibdir): Use target_cpu instead of host_cpu.
14372         * util/i386/pc/grub-install.in (host_cpu): Removed.
14373         (target_cpu): New variable.
14374         (pkglibdir): Use target_cpu instead of host_cpu.
14376         * util/genmoddep.c: Removed.
14378         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
14379         instead of GRUB_HOST_SIZEOF_VOID_P.
14380         * kern/dl.c: Likewise.
14382         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
14383         ...
14384         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14385         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14386         (GRUB_TARGET_SIZEOF_LONG): ... this.
14387         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14388         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14389         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14390         to ...
14391         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14392         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14393         (GRUB_TARGET_SIZEOF_LONG): ... this.
14394         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14395         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14396         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14397         to ...
14398         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14399         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14400         (GRUB_TARGET_SIZEOF_LONG): ... this.
14401         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14402         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14404         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
14405         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
14406         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
14407         instead of GRUB_HOST_SIZEOF_LONG.
14408         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
14409         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
14410         GRUB_CPU_WORDS_BIGENDIAN.
14411         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
14412         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
14413         grub_host_ssize_t.
14415         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
14416         (genmoddep_SOURCES): Likewise.
14417         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
14418         (genmoddep_SOURCES): Likewise.
14419         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
14420         (genmoddep_SOURCES): Likewise.
14421         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
14422         Likewise.
14423         (genmoddep_SOURCES): Likewise.
14425         * genmoddep.awk: New file.
14427         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
14428         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
14429         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
14430         (PModule::rule): Likewise.
14431         (Program::rule): Likewise.
14432         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
14433         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
14434         respectively.
14436         * configure.ac: Rewritten intensively to use host and target
14437         instead of build and host, respectively.
14439         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
14440         (host_cpu): Removed.
14441         (target_cpu): New variable.
14442         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
14443         (BUILD_CC): Removed.
14444         (BUILD_CFLAGS): Likewise.
14445         (BUILD_CPPFLAGS): Likewise.
14446         (TARGET_CC): New variable.
14447         (TARGET_CFLAGS): Likewise.
14448         (TARGET_CPPFLAGS): Likewise.
14449         (TARGET_LDFLAGS): Likewise.
14450         (AWK): Likewise.
14451         (include): Use target_cpu instead of host_cpu.
14452         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
14454         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
14456 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
14458         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
14459         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
14460         field 'false' to 'exec_on_false'.
14461         (grub_script_create_cmdif): Renamed argument names to reflect above
14462         changes.
14464         * normal/execute.c (grub_script_execute_cmdif): Likewise.
14466         * normal/script.c (grub_script_create_cmdif): Likewise.
14468 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
14470         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
14471         top.
14472         (grub_hfsplus_btree_recptr): Likewise.
14473         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
14474         FILEBLOCK both to pass a block number and store next block
14475         number.
14476         (grub_hfsplus_read_block): Rewritten heavily to support an extent
14477         overflow file correctly. Specify errors appropriately, because
14478         fshelp expects that GRUB_ERRNO is set when fails. Reuse
14479         grub_hfsplus_btree_recptr to get the pointer to a found key.
14480         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
14481         is found.
14483         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
14484         linux.mod.
14485         (_linux_mod_SOURCES): New variable.
14486         (_linux_mod_CFLAGS): Likewise.
14487         (_linux_mod_LDFLAGS): Likewise.
14488         (linux_mod_SOURCES): Likewise.
14489         (linux_mod_CFLAGS): Likewise.
14490         (linux_mod_LDFLAGS): Likewise.
14492         * DISTLIST: Added loader/i386/efi/linux.c,
14493         loader/i386/efi/linux_normal.c and
14494         include/grub/i386/efi/loader.h.
14496         * loader/i386/efi/linux.c: New file.
14497         * loader/i386/efi/linux_normal.c: Likewise.
14498         * include/grub/i386/efi/loader.h: Likewise.
14500 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
14502         * commands/blocklist.c: New file.
14504         * DISTLIST: Added commands/blocklist.c.
14506         * term/efi/console.c (grub_console_highlight_color): Use a lighter
14507         color for the background, and a darker color for the foreground.
14508         (grub_console_checkkey): Return READ_KEY.
14509         (grub_console_cls): Set the background to
14510         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
14512         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
14514         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
14515         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
14517         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
14518         prototype.
14520         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
14521         BG. The spec is wrong again.
14523         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
14524         prototype.
14525         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
14527         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14528         commands/blocklist.c.
14529         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14531         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
14532         (blocklist_mod_SOURCES): New variable.
14533         (blocklist_mod_CFLAGS): Likewise.
14534         (blocklist_mod_LDFLAGS): Likewise.
14536 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
14538         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
14539         duplication.
14540         (lba_mode): Use %eax more intensively to reduce the code size.
14542 2006-05-20  Marco Gerards  <marco@gnu.org>
14544         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
14546         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
14547         for `menuentry'.
14548         (script): Accept leading newlines.
14549         (newlines): New rule to describe 0 or more newlines.
14550         (commands): Accept `command' with trailing newline.  Fixed the
14551         order in which arguments were passed to `grub_script_add_cmd'.
14552         Accept commands separated by newlines.
14553         (function): Changed to accept newlines.
14554         (menuentry) Rewritten.
14556         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
14557         front of the list, instead of to the end.
14559 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
14561         * util/i386/pc/grub-install.in (bindir): New variable.
14562         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
14563         Shaver <lbgwjl@gmail.com>.
14565 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
14567         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
14568         grub/machine/linux.h
14569         * loader/i386/pc/linux.c: Likewise.
14571         * include/grub/i386/pc/linux.h: Moved to ...
14572         * include/grub/i386/linux.h: ... here.
14574         * include/grub/i386/linux.h (struct linux_kernel_params): New
14575         struct.
14577 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
14579         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
14580         checking.
14581         (grub_video_vbe_blit_glyph): Likewise.
14582         (grub_video_vbe_blit_bitmap): Likewise.
14583         (grub_video_vbe_blit_render_target): Likewise.
14585 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
14587         * configure.ac (--with-platform): Properly quote the square
14588         brackets.
14590 2006-05-08  Marco Gerards  <marco@gnu.org>
14592         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
14593         this...
14594         (kernel_elf_HEADERS): ...to this.  Updated all users.
14595         (grubof_symlist.c): Renamed from this...
14596         (kernel_elf_symlist.c): ...to this.  Updated all users.
14597         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14598         (grubof_SOURCES): Renamed from this...
14599         (kernel_elf_SOURCES): ...to this.
14600         (grubof_HEADERS): Renamed from this...
14601         (kernel_elf_HEADERS): ...to this.
14602         (grubof_CFLAGS): Renamed from this...
14603         (kernel_elf_CFLAGS): ...to this.
14604         (grubof_ASFLAGS): Renamed from this...
14605         (kernel_elf_ASFLAGS): ...to this.
14606         (grubof_LDFLAGS): Renamed from this...
14607         (kernel_elf_LDFLAGS): ...to this.
14609         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
14610         this...
14611         (kernel_elf_HEADERS): ...to this.  Updated all users.
14612         (grubof_symlist.c): Renamed from this...
14613         (kernel_elf_symlist.c): ...to this.  Updated all users.
14614         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14615         (grubof_SOURCES): Renamed from this...
14616         (kernel_elf_SOURCES): ...to this.
14617         (grubof_HEADERS): Renamed from this...
14618         (kernel_elf_HEADERS): ...to this.
14619         (grubof_CFLAGS): Renamed from this...
14620         (kernel_elf_CFLAGS): ...to this.
14621         (grubof_ASFLAGS): Renamed from this...
14622         (kernel_elf_ASFLAGS): ...to this.
14623         (grubof_LDFLAGS): Renamed from this...
14624         (kernel_elf_LDFLAGS): ...to this.
14626         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
14627         `kernel.elf' instead of `grubof'.
14629 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
14631         Add --with-platform to configure. Use pkglibdir instead of
14632         pkgdatadir. This is reported by Roger Leigh.
14634         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
14635         (host_vendor): Likewise.
14636         (host_os): Likewise.
14637         (pkgdatadir): Likewise.
14638         (platform): New variable.
14639         (pkglibdir): Likewise.
14640         Use PKGLIBDIR instead of PKGDATADIR.
14642         * util/i386/pc/grub-install.in (datadir): Removed.
14643         (host_vendor): Likewise.
14644         (host_os): Likewise.
14645         (pkgdatadir): Likewise.
14646         (platform): New variable.
14647         (pkglibdir): Likewise.
14648         Use PKGLIBDIR instead of PKGDATADIR.
14650         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
14651         instead of GRUB_DATADIR.
14652         (main): Likewise.
14653         * util/i386/pc/grub-mkimage.c (usage): Likewise.
14654         (main): Likewise.
14655         * util/i386/efi/grub-mkimage.c (usage): Likewise.
14656         (main): Likewise.
14658         * configure.ac (--with-platform): New option.
14659         Use PLATFORM instead of HOST_VENDOR to specify a platform.
14661         * Makefile.in: Include a makefile based on PLATFORM instead of
14662         HOST_VENDOR.
14663         (pkgdatadir): Not appended by the machine type.
14664         (pkglibdir): Appended by the machine type.
14665         (host_vendor): Removed.
14666         (platform): New variable.
14667         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
14668         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
14669         (uninstall): Likewise.
14671 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
14673         Use the environment context in the menu. Remove the commands
14674         "default" and "timeout", and use variables instead.
14676         * normal/menu.c: Include grub/env.h.
14677         (print_entry): Cast TITLE to silence gcc.
14678         (get_timeout): New function.
14679         (set_timeout): Likewise.
14680         (get_entry_number): Likewise.
14681         (run_menu): Use a default entry, a fallback entry and a timeout
14682         in the environment variables "default", "fallback" and
14683         "timeout". Also, tweak the default entry if it is not within the
14684         current menu entries.
14685         (grub_menu_run): Use a fallback entry in the environment variable
14686         "fallback".
14688         * normal/main.c (read_config_file): Do not initialize
14689         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
14690         NEWMENU->TIMEOUT.
14691         (grub_normal_execute): Use a data slot to store the menu.
14693         * include/grub/normal.h (struct grub_menu): Removed default_entry,
14694         fallback_entry and timeout.
14695         (struct grub_menu_list): Removed.
14696         (grub_menu_list_t): Likewise.
14697         (struct grub_context): Likewise.
14698         (grub_context_t): Likewise.
14699         (grub_context_get): Likewise.
14700         (grub_context_get_current_menu): Likewise.
14701         (grub_context_push_menu): Likewise.
14702         (grub_context_pop_menu): Likewise.
14703         (grub_default_init): Likewise.
14704         (grub_default_fini): Likewise.
14705         (grub_timeout_init): Likewise.
14706         (grub_timeout_fini): Likewise.
14708         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
14709         and timeout.mod.
14710         (normal_mod_SOURCES): Removed normal/context.c.
14712         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
14713         commands/default.c, commands/timeout.c and normal/context.c.
14714         (normal_mod_SOURCES): Removed normal/context.c.
14716         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
14717         commands/timeout.c and normal/context.c.
14718         (normal_mod_SOURCES): Removed normal/context.c.
14720         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
14721         commands/default.c, commands/timeout.c and normal/context.c.
14722         (normal_mod_SOURCES): Removed normal/context.c.
14724         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
14725         timeout.mod.
14726         (default_mod_SOURCES): Removed.
14727         (default_mod_CFLAGS): Likewise.
14728         (default_mod_LDFLAGS): Likewise.
14729         (timeout_mod_SOURCES): Removed.
14730         (timeout_mod_CFLAGS): Likewise.
14731         (timeout_mod_LDFLAGS): Likewise.
14733         * DISTLIST: Removed commands/default.c, commands/timeout.c and
14734         normal/context.c.
14736         * commands/default.c: Removed.
14737         * commands/timeout.c: Likewise.
14738         * normal/context.c: Likewise.
14740 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
14742         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
14744 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
14746         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
14747         "next" to "prev" for readability.
14748         (struct grub_env_sorted_var): New struct.
14749         (grub_env_context): Renamed to ...
14750         (initial_context): ... this.
14751         (grub_env_var_context): Renamed to ...
14752         (current_context): ... this.
14753         (grub_env_find): Look only at CURRENT_CONTEXT.
14754         (grub_env_context_open): Rewritten to copy exported variables from
14755         previous context.
14756         (grub_env_context_close): Rewritten according to the new
14757         scheme. Also, add an assertion to prevent the initial context from
14758         removed.
14759         (grub_env_insert): Removed the code for the sorted list.
14760         (grub_env_remove): Likewise.
14761         (grub_env_export): Simply mark the variable with
14762         GRUB_ENV_VAR_GLOBAL.
14763         (grub_env_set): A cosmetic change for naming consistency.
14764         (grub_env_get): Likewise.
14765         (grub_env_unset): Likewise.
14766         (grub_env_iterate): Rewritten to sort variables within this
14767         function.
14768         (grub_register_variable_hook): Fixed for naming consistency. Call
14769         grub_env_find again, only if NAME is not found at the first time.
14770         (mangle_data_slot_name): New function.
14771         (grub_env_set_data_slot): Likewise.
14772         (grub_env_get_data_slot): Likewise.
14773         (grub_env_unset_data_slot): Likewise.
14775         * include/grub/env.h (grub_env_var_type): New enum.
14776         (GRUB_ENV_VAR_LOCAL): New constant.
14777         (GRUB_ENV_VAR_GLOBAL): Likewise.
14778         (GRUB_ENV_VAR_DATA): Likewise.
14779         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
14780         "type".
14781         (grub_env_set): Replace VAR with NAME for consistency.
14782         (grub_register_variable_hook): Likewise.
14783         (grub_env_export): Specify the name of the argument.
14784         (grub_env_set_data_slot): New prototype.
14785         (grub_env_get_data_slot): Likewise.
14786         (grub_env_unset_data_slot): Likewise.
14788 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14790         Extend the loader so that GRUB can accept a loader which comes
14791         back to GRUB when a loaded image exits. Also, this change adds
14792         support for a chainloader on EFI.
14794         * term/efi/console.c: Include grub/misc.h.
14795         (grub_console_checkkey): Display a scan code on the top for
14796         debugging. This will be removed once the EFI port gets stable.
14797         Correct the scan code mapping.
14799         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
14800         allocate memory from larger regions, in order to reduce the number
14801         of allocated regions. Otherwise, the MacOSX loader panics.
14802         (filter_memory_map): Avoid less than 1MB for compatibility with
14803         other loaders.
14804         (add_memory_regions): Allocate from the tail of a region, if
14805         possible, to avoid allocating a region near to 1MB, for the MacOSX
14806         loader.
14808         * kern/efi/init.c (grub_efi_set_prefix): Specify
14809         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
14811         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
14812         argument IMAGE_HANDLE and specify it to get a loaded image.
14813         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
14814         grub_efi_get_loaded_image.
14815         (grub_efi_get_filename): Divide the length by the size of
14816         grub_efi_char16_t.
14817         (grub_efi_get_device_path): New function.
14818         (grub_efi_print_device_path): Print End Device Path nodes. Divide
14819         the length by the size of grub_efi_char16_t for a file path device
14820         path node.
14822         * kern/loader.c (grub_loader_noreturn): New variable.
14823         (grub_loader_set): Accept a new argument NORETURN. Set
14824         GRUB_LOADER_NORETURN to NORETURN.
14825         All callers changed.
14826         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
14827         grub_machine_fini.
14829         * include/grub/efi/efi.h (grub_efi_get_device_path): New
14830         prototype.
14831         (grub_efi_get_loaded_image): Take an argument to specify an image
14832         handle.
14834         * include/grub/loader.h (grub_loader_set): Added one more argument
14835         NORETURN.
14837         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
14838         instead of grub_efi_open_protocol.
14839         (grub_efidisk_get_device_name): Likewise.
14840         (grub_efidisk_close): Print a newline.
14841         (grub_efidisk_get_device_handle): Fixed to use
14842         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
14843         GRUB_EFI_DEVICE_PATH_TYPE.
14845         * disk/efi/efidisk.c (device_path_guid): Moved to ...
14846         * kern/efi/efi.c (device_path_guid): ... here.
14848         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
14849         chain.mod.
14850         (kernel_mod_HEADERS): Added efi/disk.h.
14851         (_chain_mod_SOURCES): New variable.
14852         (_chain_mod_CFLAGS): Likewise.
14853         (_chain_mod_LDFLAGS): Likewise.
14854         (chain_mod_SOURCES): Likewise.
14855         (chain_mod_CFLAGS): Likewise.
14856         (chain_mod_LDFLAGS): Likewise.
14858         * DISTLIST: Added include/grub/efi/chainloader.h,
14859         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
14861         * include/grub/efi/chainloader.h: New file.
14862         * loader/efi/chainloader.c: Likewise.
14863         * loader/efi/chainloader_normal.c: Likewise.
14865 2006-04-30  Marco Gerards  <marco@gnu.org>
14867         * commands/configfile.c (grub_cmd_source): New function.
14868         (GRUB_MOD_INIT): Register the commands `source' and `.'.
14869         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
14871 2006-04-30  Marco Gerards  <marco@gnu.org>
14873         * normal/execute.c (grub_script_execute_cmd): Change the return
14874         type to `grub_err_t'.  Correctly return the error.
14875         (grub_script_execute_cmdline): In case a command line is not a
14876         command or a function, try to interpret it as an assignment.
14878 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
14880         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
14881         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
14882         skip a node whose name is obviously invalid as UTF-16,
14883         i.e. contains a NUL character. Stop the iteration when the last
14884         directory entry is found. Instead of using the return value of
14885         grub_hfsplus_btree_iterate_node, store the value in RET and use
14886         it, because the iterator can be stopped by the last directory
14887         entry.
14889 2006-04-30  Marco Gerards  <marco@gnu.org>
14891         * include/grub/env.h (grub_env_export): New prototype.  Reported
14892         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
14894 2006-04-30  Marco Gerards  <marco@gnu.org>
14896         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
14897         size of the extents in a catalog file record.
14899 2006-04-29  Marco Gerards  <marco@gnu.org>
14901         * commands/configfile.c (grub_cmd_configfile): Execute the
14902         configfile within its own context.
14904         * include/grub/env.h (grub_env_context_open): New prototype.
14905         (grub_env_context_close): Likewise.
14907         * kern/env.c (grub_env): Removed.
14908         (grub_env_sorted): Likewise.
14909         (grub_env_context): New variable.
14910         (grub_env_var_context): Likewise.
14911         (grub_env_find): Search both the active context and the global
14912         context.
14913         (grub_env_context_open): New function.
14914         (grub_env_context_close): Likewise.
14915         (grub_env_insert): Likewise.
14916         (grub_env_remove): Likewise.
14917         (grub_env_export): Likewise.
14918         (grub_env_set): Changed to use helper functions to avoid code
14919         duplication.
14920         (grub_env_iterate): Rewritten so both the current context and the
14921         global context are being used.
14923         * normal/command.c (export_command): New function.
14924         (grub_command_init): Register the `export' function.
14926 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
14928         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
14929         explicitly to suppress gcc's warnings.
14930         * fs/fat.c (grub_fat_find_dir): Likewise.
14931         (grub_fat_label): Likewise.
14932         * fs/xfs.c (grub_xfs_read_inode): Likewise.
14933         (grub_xfs_mount): Likewise.
14934         (grub_xfs_label): Likewise.
14935         * fs/affs.c (grub_affs_mount): Likewise.
14936         (grub_affs_label): Likewise.
14937         (grub_affs_iterate_dir): Likewise.
14938         * fs/sfs.c (grub_sfs_mount): Likewise.
14939         (grub_sfs_iterate_dir): Likewise.
14940         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
14941         * fs/hfs.c (grub_hfs_mount): Likewise.
14942         (grub_hfs_cmp_catkeys): Likewise.
14943         (grub_hfs_find_dir): Likewise.
14944         (grub_hfs_dir): Likewise.
14945         (grub_hfs_label): Likewise.
14946         * fs/jfs.c (grub_jfs_mount): Likewise.
14947         (grub_jfs_opendir): Likewise.
14948         (grub_jfs_getent): Likewise.
14949         (grub_jfs_lookup_symlink): Likewise.
14950         (grub_jfs_label): Likewise.
14951         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
14952         (grub_hfsplus_iterate_dir): Likewise.
14953         (grub_hfsplus_btree_iterate_node): Made static.
14955         * util/grub-emu.c (prefix): New variable.
14956         (grub_machine_set_prefix): New function.
14957         (main): Do not set the environment variable "prefix" here. Only
14958         set PREFIX, which is used later by grub_machine_set_prefix.
14960         * include/grub/video.h: Do not include grub/symbol.h.
14961         (grub_video_register): Not exported. This symbol is not defined in
14962         the kernel.
14963         (grub_video_unregister): Likewise.
14964         (grub_video_iterate): Likewise.
14965         (grub_video_setup): Likewise.
14966         (grub_video_restore): Likewise.
14967         (grub_video_get_info): Likewise.
14968         (grub_video_get_blit_format): Likewise.
14969         (grub_video_set_palette): Likewise.
14970         (grub_video_get_palette): Likewise.
14971         (grub_video_set_viewport): Likewise.
14972         (grub_video_get_viewport): Likewise.
14973         (grub_video_map_color): Likewise.
14974         (grub_video_map_rgb): Likewise.
14975         (grub_video_map_rgba): Likewise.
14976         (grub_video_fill_rect): Likewise.
14977         (grub_video_blit_glyph): Likewise.
14978         (grub_video_blit_bitmap): Likewise.
14979         (grub_video_blit_render_target): Likewise.
14980         (grub_video_scroll): Likewise.
14981         (grub_video_swap_buffers): Likewise.
14982         (grub_video_create_render_target): Likewise.
14983         (grub_video_delete_render_target): Likewise.
14984         (grub_video_set_active_render_target): Likewise.
14986         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
14987         Undefined.
14988         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
14990         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
14991         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14992         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14993         instead of $(srcdir)/genkernsyms.sh.
14995         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
14996         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14997         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14998         instead of $(srcdir)/genkernsyms.sh.
15000         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
15001         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15002         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15003         instead of $(srcdir)/genkernsyms.sh.
15005         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
15006         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15007         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15008         instead of $(srcdir)/genkernsyms.sh.
15010         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
15011         genkernsyms.sh.
15013         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
15014         genkernsyms.sh.
15015         (gensymlist.sh): New target.
15016         (genkernsyms.sh): Likewise.
15018         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
15019         genkernsyms.sh.in and gensymlist.sh.in.
15021         * genkernsyms.sh: Removed.
15022         * gensymlist.sh: Likewise.
15024         * genkernsyms.sh.in: New file.
15025         * gensymlist.sh.in: Likewise.
15027 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
15029         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
15030         clobber "prefix", since we may have already set it manually.
15032 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
15034         * kern/misc.c (abort): New alias for grub_abort.
15036 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
15038         A new machine-specific function "grub_machine_set_prefix" is
15039         defined. This is called after loading modules, so that a prefix
15040         initialization can use modules. Also, this change adds an
15041         intensive debugging feature for the memory manager via the
15042         configure option "--enable-mm-debug".
15044         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
15045         PART.LEN.
15047         * kern/sparc64/ieee1275/init.c (abort): Removed.
15048         (grub_stop): Likewise.
15049         (grub_exit): New function.
15050         (grub_set_prefix): Renamed to ...
15051         (grub_machine_set_prefix): ... this.
15052         (grub_machine_init): Do not call grub_set_prefix.
15054         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
15055         (grub_machine_set_prefix): ... this.
15056         (grub_machine_init): Do not call grub_set_prefix.
15058         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
15059         (grub_machine_init): Do not set the prefix here.
15061         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
15063         * kern/efi/init.c: Include grub/mm.h.
15064         (grub_efi_set_prefix): New function.
15066         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
15067         (grub_efi_get_filename): New function.
15068         (grub_print_device_path): Renamed to ...
15069         (grub_efi_print_device_path): ... this.
15071         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
15072         [MM_DEBUG] (grub_realloc): Likewise.
15073         [MM_DEBUG] (grub_free): Likewise.
15074         [MM_DEBUG] (grub_memalign): Likewise.
15075         [MM_DEBUG] (grub_mm_debug): New variable.
15076         [MM_DEBUG] (grub_debug_malloc): New function.
15077         [MM_DEBUG] (grub_debug_free): New function.
15078         [MM_DEBUG] (grub_debug_realloc): New function.
15079         [MM_DEBUG] (grub_debug_memalign): New function.
15081         * kern/misc.c (grub_abort): Print a newline to distinguish
15082         the message.
15084         * kern/main.c (grub_main): Call grub_machine_set_prefix and
15085         grub_set_root_dev after loading modules. This is necessary when
15086         setting a prefix depends on modules.
15088         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
15089         (grub_efi_print_device_path): ... this.
15090         (grub_efi_get_filename): New prototype.
15091         (grub_efi_set_prefix): Likewise.
15093         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
15094         and grub/disk.h.
15095         (grub_efidisk_get_device_handle): New prototype.
15096         (grub_efidisk_get_device_name): Likewise.
15098         * include/grub/mm.h: Include config.h.
15099         (MM_DEBUG): Removed.
15100         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
15101         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
15102         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
15103         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
15104         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
15105         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
15106         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
15107         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
15108         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
15110         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
15112         * disk/efi/efidisk.c: Include grub/partition.h.
15113         (iterate_child_devices): New function.
15114         (add_device): First, compare only last device path nodes, so that
15115         devices are sorted by the types.
15116         (grub_efidisk_get_device_handle): New function.
15117         (grub_efidisk_get_device_name): Likewise.
15119         * configure.ac (--enable-mm-debug): New option to enable the
15120         memory manager debugging feature. This makes the binary much
15121         bigger, so is disabled by default.
15123 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
15125         Use grub_abort instead of grub_stop, and grub_exit must be
15126         define in each architecture now. Also, this change adds support
15127         for EFI disks.
15129         * util/i386/pc/grub-probefs.c: Include grub/term.h.
15130         (grub_getkey): New function.
15131         (grub_term_get_current): Likewise.
15133         * util/i386/pc/grub-setup.c: Include grub/term.h.
15134         (grub_getkey): New function.
15135         (grub_term_get_current): Likewise.
15137         * util/misc.c (grub_stop): Renamed to ...
15138         (grub_exit): ... this.
15140         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
15141         (grub_exit): ... this.
15142         (grub_machine_init): Use grub_abort instead of abort.
15143         (grub_stop): Removed.
15145         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
15146         abort.
15148         * kern/i386/pc/startup.S (grub_exit): New function.
15149         (cold_reboot): New label.
15151         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
15152         (grub_efi_init): Call grub_efidisk_init.
15153         (grub_efi_fini): Call grub_efidisk_fini.
15155         * kern/efi/efi.c: Include grub/mm.h.
15156         (grub_efi_console_control_guid): Renamed to ...
15157         (console_control_guid): ... this.
15158         (grub_efi_loaded_image_guid): Renamed to ...
15159         (loaded_image_guid): ... this.
15160         (grub_efi_locate_handle): New function.
15161         (grub_efi_open_protocol): Likewise.
15162         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
15163         GRUB_EFI_CONSOLE_CONTROL_GUID.
15164         (grub_efi_exit): Removed.
15165         (grub_stop): Likewise.
15166         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
15167         (grub_exit): New function.
15168         (grub_print_device_path): Likewise.
15170         * kern/rescue.c (grub_rescue_cmd_exit): New function.
15171         (grub_enter_rescue_mode): Register "exit".
15173         * kern/misc.c (grub_real_dprintf): A cosmetic change.
15174         (grub_abort): New function.
15176         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
15178         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
15180         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
15182         * include/grub/efi/efi.h (grub_efi_exit): Removed.
15183         (grub_print_device_path): New prototype.
15184         (grub_efi_locate_handle): Likewise.
15185         (grub_efi_open_protocol): Likewise.
15187         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
15188         * disk/efi/efidisk.c: Likewise.
15190         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
15192         * include/grub/efi/console_control.h
15193         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
15195         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
15196         last 8 bytes as an array.
15197         (GRUB_EFI_DISK_IO_GUID): New macro.
15198         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
15199         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
15200         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
15201         grub_uint8_t.
15202         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
15203         (struct grub_efi_device_path): Rename the member "sub_type" to
15204         "subtype".
15205         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
15206         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
15207         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
15208         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
15209         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
15210         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
15211         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
15212         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
15213         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
15214         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
15215         (struct grub_efi_pci_device_path): New structure.
15216         (grub_efi_pci_device_path_t): New type.
15217         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
15218         (struct grub_efi_pccard_device_path): New structure.
15219         (grub_efi_pccard_device_path_t): New type.
15220         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
15221         (struct grub_efi_memory_mapped_device_path): New structure.
15222         (grub_efi_memory_mapped_device_path_t): New type.
15223         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
15224         (struct grub_efi_vendor_device_path): New structure.
15225         (grub_efi_vendor_device_path_t): New type.
15226         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
15227         (struct grub_efi_controller_device_path): New structure.
15228         (grub_efi_controller_device_path_t): New type.
15229         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
15230         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
15231         (struct grub_efi_acpi_device_path): New structure.
15232         (grub_efi_acpi_device_path_t): New type.
15233         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
15234         (struct grub_efi_expanded_acpi_device_path): New structure.
15235         (grub_efi_expanded_acpi_device_path_t): New type.
15236         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
15237         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
15238         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
15239         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
15240         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
15241         (struct grub_efi_atapi_device_path): New structure.
15242         (grub_efi_atapi_device_path_t): New type.
15243         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
15244         (struct grub_efi_fibre_channel_device_path): New structure.
15245         (grub_efi_fibre_channel_device_path_t): New type.
15246         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
15247         (struct grub_efi_1394_device_path): New structure.
15248         (grub_efi_1394_device_path_t): New type.
15249         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
15250         (struct grub_efi_usb_device_path): New structure.
15251         (grub_efi_usb_device_path_t): New type.
15252         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
15253         (struct grub_efi_usb_class_device_path): New structure.
15254         (grub_efi_usb_class_device_path_t): New type.
15255         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
15256         (struct grub_efi_i2o_device_path): New structure.
15257         (grub_efi_i2o_device_path_t): New type.
15258         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
15259         (struct grub_efi_mac_address_device_path): New structure.
15260         (grub_efi_mac_address_device_path_t): New type.
15261         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
15262         (struct grub_efi_ipv4_device_path): New structure.
15263         (grub_efi_ipv4_device_path_t): New type.
15264         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
15265         (struct grub_efi_ipv6_device_path): New structure.
15266         (grub_efi_ipv6_device_path_t): New type.
15267         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
15268         (struct grub_efi_infiniband_device_path): New structure.
15269         (grub_efi_infiniband_device_path_t): New type.
15270         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
15271         (struct grub_efi_uart_device_path): New structure.
15272         (grub_efi_uart_device_path_t): New type.
15273         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
15274         (struct grub_efi_vendor_messaging_device_path): New structure.
15275         (grub_efi_vendor_messaging_device_path_t): New type.
15276         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
15277         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
15278         (struct grub_efi_hard_drive_device_path): New structure.
15279         (grub_efi_hard_drive_device_path_t): New type.
15280         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
15281         (struct grub_efi_cdrom_device_path): New structure.
15282         (grub_efi_cdrom_device_path_t): New type.
15283         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
15284         (struct grub_efi_vendor_media_device_path): New structure.
15285         (grub_efi_vendor_media_device_path_t): New type.
15286         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
15287         (struct grub_efi_file_path_device_path): New structure.
15288         (grub_efi_file_path_device_path_t): New type.
15289         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
15290         (struct grub_efi_protocol_device_path): New structure.
15291         (grub_efi_protocol_device_path_t): New type.
15292         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
15293         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
15294         (struct grub_efi_bios_device_path): New structure.
15295         (grub_efi_bios_device_path_t): New type.
15296         (struct grub_efi_disk_io): New structure.
15297         (grub_efi_disk_io_t): New type.
15298         (struct grub_efi_block_io_media): New structure.
15299         (grub_efi_block_io_media_t): New type.
15300         (struct grub_efi_block_io): New structure.
15301         (grub_efi_block_io_t): New type.
15303         * include/grub/misc.h (grub_stop): Removed.
15304         (grub_exit): New prototype.
15305         (grub_abort): Likewise.
15307         * include/grub/disk.h (enum grub_disk_dev_id): Added
15308         GRUB_DISK_DEVICE_EFIDISK_ID.
15310         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
15311         disk/efi/efidisk.c.
15312         (kernel_syms.lst): Remove the target if an error occurs.
15314 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
15316         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
15317         as it was simply too buggy.
15319 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
15321         * kern/misc.c (grub_lltoa): New function.
15322         (grub_vsprintf): Added support for the long long suffix,
15323         i.e. "ll".
15325 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
15327         * Makefile.in (LDFLAGS): Add variable.
15328         (LD): Remove variable.
15329         * configure.ac: Add -m32 to LDFLAGS.
15330         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
15331         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
15332         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
15333         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
15334         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
15335         variables.
15336         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
15337         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
15338         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
15340 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
15342         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
15343         length for unknown glyph.
15345 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15347         Add support for pre-loaded modules into the EFI port.
15349         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
15350         completely. Accept one more argument DIR. The caller has changed.
15352         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
15354         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
15355         (grub_efi_loaded_image_guid): New variable.
15356         (grub_efi_get_loaded_image): New function.
15357         (grub_arch_modules_addr): Likewise.
15359         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
15360         prototype.
15362         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
15363         (struct grub_efi_loaded_image): New structure.
15364         (grub_efi_loaded_image_t): New type.
15366 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15368         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
15369         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
15370         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
15372 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
15374         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
15376 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
15378         * DISTLIST: Added include/grub/efi/console.h,
15379         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
15380         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15382         * include/grub/efi/console.h: New file.
15383         * include/grub/efi/time.h: Likewise.
15384         * include/grub/i386/efi/kernel.h: Likewise.
15385         * kern/efi/init.c: Likewise.
15386         * kern/efi/mm.c: Likewise.
15387         * term/efi/console.c: Likewise.
15389         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
15390         (grub_stop): Removed.
15391         (grub_get_rtc): Likewise.
15392         (grub_machine_init): Simply call grub_efi_init.
15393         (grub_machine_fini): Call grub_efi_fini.
15395         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
15396         (grub_efi_output_string): Removed.
15397         (grub_efi_stall): New function.
15398         (grub_stop): Likewise.
15399         (grub_get_rtc): Likewise.
15401         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
15402         (grub_efi_stall): New prototype.
15403         (grub_efi_allocate_pages): Likewise.
15404         (grub_efi_free_pages): Likewise.
15405         (grub_efi_get_memory_map): Likewise.
15406         (grub_efi_mm_init): Likewise.
15407         (grub_efi_mm_fini): Likewise.
15408         (grub_efi_init): Likewise.
15409         (grub_efi_fini): Likewise.
15411         * include/grub/i386/efi/time.h: Do not include
15412         grub/symbol.h. Include grub/efi/time.h.
15413         (GRUB_TICKS_PER_SECOND): Removed.
15414         (grub_get_rtc): Likewise.
15416         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
15417         Added padding. The EFI spec is buggy.
15418         (GRUB_EFI_BLACK): New macro.
15419         (GRUB_EFI_BLUE): Likewise.
15420         (GRUB_EFI_GREEN): Likewise.
15421         (GRUB_EFI_CYAN): Likewise.
15422         (GRUB_EFI_RED): Likewise.
15423         (GRUB_EFI_MAGENTA): Likewise.
15424         (GRUB_EFI_BROWN): Likewise.
15425         (GRUB_EFI_LIGHTGRAY): Likewise.
15426         (GRUB_EFI_BRIGHT): Likewise.
15427         (GRUB_EFI_DARKGRAY): Likewise.
15428         (GRUB_EFI_LIGHTBLUE): Likewise.
15429         (GRUB_EFI_LIGHTGREEN): Likewise.
15430         (GRUB_EFI_LIGHTCYAN): Likewise.
15431         (GRUB_EFI_LIGHTRED): Likewise.
15432         (GRUB_EFI_LIGHTMAGENTA): Likewise.
15433         (GRUB_EFI_YELLOW): Likewise.
15434         (GRUB_EFI_WHITE): Likewise.
15435         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
15436         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
15437         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
15438         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
15439         (GRUB_EFI_BACKGROUND_RED): Likewise.
15440         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
15441         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
15442         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
15443         (GRUB_EFI_TEXT_ATTR): Likewise.
15445         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
15446         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15447         (kernel_mod_HEADERS): Added efi/time.h.
15449 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
15451         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
15452         include/grub/efi/api.h, include/grub/efi/console_control.h,
15453         include/grub/efi/efi.h, include/grub/efi/pe32.h,
15454         include/grub/i386/efi/time.h, kern/efi/efi.c,
15455         kern/i386/efi/init.c, kern/i386/efi/startup.S,
15456         and util/i386/efi/grub-mkimage.c.
15458         * Makefile.in (RMKFILES): Added i386-efi.rmk.
15460         * genmk.rb (PModule#rule): Do not export symbols if
15461         #{prefix}_EXPORTS is set to "no".
15463         * conf/i386-efi.mk: New file.
15464         * conf/i386-efi.rmk: Likewise.
15465         * include/grub/efi/api.h: Likewise.
15466         * include/grub/efi/console_control.h: Likewise.
15467         * include/grub/efi/efi.h: Likewise.
15468         * include/grub/efi/pe32.h: Likewise.
15469         * include/grub/i386/efi/time.h: Likewise.
15470         * kern/efi/efi.c: Likewise.
15471         * kern/i386/efi/init.c: Likewise.
15472         * kern/i386/efi/startup.S: Likewise.
15473         * util/i386/efi/grub-mkimage.c: Likewise.
15475 2006-04-17  Marco Gerards  <marco@gnu.org>
15477         * include/grub/script.h: Include <grub/parser.h> and
15478         "grub_script.tab.h".
15479         (struct grub_lexer_param): New struct.
15480         (struct grub_parser_param): Likewise.
15481         (grub_script_create_arglist): Pass the state in an argument.
15482         (grub_script_add_arglist): Likewise.
15483         (grub_script_create_cmdline): Likewise.
15484         (grub_script_create_cmdblock): Likewise.
15485         (grub_script_create_cmdif): Likewise.
15486         (grub_script_create_cmdmenu): Likewise.
15487         (grub_script_add_cmd): Likewise.
15488         (grub_script_arg_add): Likewise.
15489         (grub_script_lexer_ref): Likewise.
15490         (grub_script_lexer_deref): Likewise.
15491         (grub_script_lexer_record_start): Likewise.
15492         (grub_script_lexer_record_stop): Likewise.
15493         (grub_script_mem_record): Likewise.
15494         (grub_script_mem_record_stop): Likewise.
15495         (grub_script_malloc): Likewise.
15496         (grub_script_yylex): Likewise.
15497         (grub_script_yyparse): Likewise.
15498         (grub_script_yyerror): Likewise.
15499         (grub_script_yylex): Likewise.
15500         (grub_script_lexer_init): Return the state.
15502         * normal/lexer.c (grub_script_lexer_state): Removed variable.
15503         (grub_script_lexer_done): Likewise.
15504         (grub_script_lexer_getline): Likewise.
15505         (grub_script_lexer_refs): Likewise.
15506         (script): Likewise.
15507         (newscript): Likewise.
15508         (record): Likewise.
15509         (recording): Likewise.
15510         (recordpos): Likewise.
15511         (recordlen): Likewise.
15512         (grub_script_lexer_init): Return the state instead of setting
15513         global variables.
15514         (grub_script_lexer_ref): Use the newly added argument for state
15515         instead of globals.
15516         (grub_script_lexer_deref): Likewise.
15517         (grub_script_lexer_record_start): Likewise.
15518         (grub_script_lexer_record_stop): Likewise.
15519         (recordchar): Likewise.
15520         (nextchar): Likewise.
15521         (grub_script_yylex2): Likewise.
15522         (grub_script_yylex): Likewise.
15523         (grub_script_yyerror): Likewise.
15525         * normal/parser.y (func_mem): Removed variable.
15526         (menu_entry): Likewise.
15527         (err): Likewise.
15528         (%lex-param): New parser option.
15529         (%parse-param): Likewise.
15530         (script): Always return the AST.
15531         (argument): Pass the state around.
15532         (arguments): Likewise.
15533         (grubcmd): Likewise.
15534         (commands): Likewise.
15535         (function): Likewise.
15536         (menuentry): Likewise.
15537         (if_statement): Likewise.
15538         (if): Likewise.
15540         * normal/script.c (grub_script_memused): Removed variable.
15541         (grub_script_parsed): Likewise.
15542         (grub_script_malloc): Added a state argument.  Use that instead of
15543         global variables.
15544         (grub_script_mem_record): Likewise.
15545         (grub_script_mem_record_stop): Likewise.
15546         (grub_script_arg_add): Likewise.
15547         (grub_script_add_arglist): Likewise.
15548         (grub_script_create_cmdline): Likewise.
15549         (grub_script_create_cmdif): Likewise.
15550         (grub_script_create_cmdmenu): Likewise.
15551         (grub_script_add_cmd): Likewise.
15552         (grub_script_parse): Setup the state before calling the parser.
15554 2006-04-16  Marco Gerards  <marco@gnu.org>
15556         * normal/command.c (grub_command_init): Remove the title command.
15558         * normal/lexer.c (grub_script_yylex): Renamed from this...
15559         (grub_script_yylex2): ... to this.
15560         (grub_script_yylex): New function.  Temporary
15561         introduced to filter some tokens.
15562         (grub_script_yyerror): Print a newline.
15564         * normal/main.c (read_config_file): Output information about the
15565         lines that contain errors.  Wait for a key after all lines have
15566         been processed.  Don't return an empty menu.
15568         * normal/parser.y (func_mem): Don't initialize.
15569         (menu_entry): Likewise.
15570         (err): New variable.
15571         (script): Don't return anything when an error was encountered.
15572         (ws, returns): Removed rules.
15573         (argument): Disabled concatenated variable support.
15574         (arguments): Remove explicit separators.
15575         (grubcmd): Likewise.
15576         (function): Likewise.
15577         (menuentry): Likewise.
15578         (if): Likewise.
15579         (commands): Likewise.  Add error handling.
15581         * normal/script.c (grub_script_create_cmdline): If
15582         `grub_script_parsed' is 0, assume the parser encountered an error.
15584 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
15586         * configure.ac: Add support for EFI. Fix the typo
15587         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
15589 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15591         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
15592         foreign multibyte characters should be shown correctly.
15594 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15596         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
15597         calculation.
15598         (read_config_file): Made it to close file before returning.
15600 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
15602         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
15603         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
15604         video/i386/pc/vbefill.c.
15606         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
15607         video/i386/pc/vbefill.c.
15609         * include/grub/video.h (grub_video_blit_format): New enum.
15610         (grub_video_mode_info): Added new member blit_format.
15611         (grub_video_get_blit_format): New function prototype.
15613         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
15614         function prototype.
15615         (grub_video_vbe_map_rgb): Likewise.
15616         (grub_video_vbe_unmap_color): Likewise.
15618         * include/grub/i386/pc/vbeblit.h: New file.
15620         * include/grub/i386/pc/vbefill.h: New file.
15622         * video/video.c (grub_video_get_blit_format): New function.
15623         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
15624         (grub_video_vbe_map_rgb): Likewise.
15625         (grub_video_vbe_unmap_color): Likewise.
15627         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
15628         optimized fills.
15629         (grub_video_vbe_blit_render_target): Changed to use more optimized
15630         blits.
15631         (grub_video_vbe_setup): Added detection for optimized settings.
15632         (grub_video_vbe_create_render_target): Likewise.
15634         * video/i386/pc/vbeblit.c: New file.
15636         * video/i386/pc/vbefill.c: New file.
15638 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
15640         * font/manager.c (grub_font_get_glyph): Removed font fixup from
15641         here...
15643         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
15644         parsing to support both hex and dec ranges.  If filename was missing
15645         show usage information.
15647 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
15649         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
15650         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
15652         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
15653         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
15654         (video_mod_SOURCES): Added.
15655         (video_mod_CFLAGS): Likewise.
15656         (video_mod_LDFLAGS): Likewise.
15657         (gfxterm_mod_SOURCES): Likewise.
15658         (gfxterm_mod_CFLAGS): Likewise.
15659         (gfxterm_mod_LDFLAGS): Likewise.
15660         (videotest_mod_SOURCES): Likewise.
15661         (videotest_mod_CFLAGS): Likewise.
15662         (videotest_mod_LDFLAGS): Likewise.
15663         (vesafb_mod_SOURCES): Removed.
15664         (vesafb_mod_CFLAGS): Likewise.
15665         (vesafb_mod_LDFLAGS): Likewise.
15666         (vga_mod_SOURCES): Likewise.
15667         (vga_mod_CFLAGS): Likewise.
15668         (vga_mod_LDFLAGS): Likewise.
15670         * commands/videotest.c: New file.
15672         * font/manager.c (fill_with_default_glyph): Modified to use
15673         grub_font_glyph.
15674         (grub_font_get_glyph): Likewise.
15675         (fontmanager): Renamed from this...
15676         (font_manager): ... to this.
15678         * include/grub/font.h (grub_font_glyph): Added new structure.
15679         (grub_font_get_glyph): Modified to use grub_font_glyph.
15681         * include/grub/misc.h (grub_abs): Added as inline function.
15683         * include/grub/video.h: New file.
15685         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
15686         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
15687         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
15688         (grub_vbe_get_controller_info): Renamed from this...
15689         (grub_vbe_bios_get_controller_info): ... to this.
15690         (grub_vbe_get_mode_info): Renamed from this...
15691         (grub_vbe_bios_get_mode_info): ... to this.
15692         (grub_vbe_set_mode): Renamed from this...
15693         (grub_vbe_bios_set_mode): ... to this.
15694         (grub_vbe_get_mode): Renamed from this...
15695         (grub_vbe_bios_get_mode): ... to this.
15696         (grub_vbe_set_memory_window): Renamed from this...
15697         (grub_vbe_bios_set_memory_window): ... to this.
15698         (grub_vbe_get_memory_window): Renamed from this...
15699         (grub_vbe_bios_get_memory_window): ... to this.
15700         (grub_vbe_set_scanline_length): Renamed from this...
15701         (grub_vbe_set_scanline_length): ... to this.
15702         (grub_vbe_get_scanline_length): Renamed from this...
15703         (grub_vbe_bios_get_scanline_length): ... to this.
15704         (grub_vbe_set_display_start): Renamed from this...
15705         (grub_vbe_bios_set_display_start): ... to this.
15706         (grub_vbe_get_display_start): Renamed from this...
15707         (grub_vbe_bios_get_display_start): ... to this.
15708         (grub_vbe_set_palette_data): Renamed from this...
15709         (grub_vbe_bios_set_palette_data): ... to this.
15710         (grub_vbe_set_pixel_rgb): Removed.
15711         (grub_vbe_set_pixel_index): Likewise.
15713         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
15714         from this...
15715         (grub_vbe_bios_get_controller_info): ... to this.
15716         (grub_vbe_get_mode_info): Renamed from this...
15717         (grub_vbe_bios_get_mode_info): ... to this.
15718         (grub_vbe_set_mode): Renamed from this...
15719         (grub_vbe_bios_set_mode): ... to this.
15720         (grub_vbe_get_mode): Renamed from this...
15721         (grub_vbe_bios_get_mode): ... to this.
15722         (grub_vbe_set_memory_window): Renamed from this...
15723         (grub_vbe_bios_set_memory_window): ... to this.
15724         (grub_vbe_get_memory_window): Renamed from this...
15725         (grub_vbe_bios_get_memory_window): ... to this.
15726         (grub_vbe_set_scanline_length): Renamed from this...
15727         (grub_vbe_set_scanline_length): ... to this.
15728         (grub_vbe_get_scanline_length): Renamed from this...
15729         (grub_vbe_bios_get_scanline_length): ... to this.
15730         (grub_vbe_set_display_start): Renamed from this...
15731         (grub_vbe_bios_set_display_start): ... to this.
15732         (grub_vbe_get_display_start): Renamed from this...
15733         (grub_vbe_bios_get_display_start): ... to this.
15734         (grub_vbe_set_palette_data): Renamed from this...
15735         (grub_vbe_bios_set_palette_data): ... to this.
15736         (grub_vbe_bios_get_controller_info): Fixed problem with registers
15737         getting corrupted after calling it.  Added more pushes and pops.
15738         (grub_vbe_bios_set_mode): Likewise.
15739         (grub_vbe_bios_get_mode): Likewise.
15740         (grub_vbe_bios_get_memory_window): Likewise.
15741         (grub_vbe_bios_set_scanline_length): Likewise.
15742         (grub_vbe_bios_get_scanline_length): Likewise.
15743         (grub_vbe_bios_get_display_start): Likewise.
15744         (grub_vbe_bios_set_palette_data): Likewise.
15746         * normal/cmdline.c (cl_set_pos): Refresh the screen.
15747         (cl_insert): Likewise.
15748         (cl_delete): Likewise.
15750         * term/gfxterm.c: New file.
15752         * term/i386/pc/vesafb.c: Removed file.
15754         * video/video.c: New file.
15756         * video/i386/pc/vbe.c (real2pm): Added new function.
15757         (grub_video_vbe_draw_pixel): Likewise.
15758         (grub_video_vbe_get_video_ptr): Likewise.
15759         (grub_video_vbe_get_pixel): Likewise
15760         (grub_video_vbe_init): Likewise.
15761         (grub_video_vbe_fini): Likewise.
15762         (grub_video_vbe_setup): Likewise.
15763         (grub_video_vbe_get_info): Likewise.
15764         (grub_video_vbe_set_palette): Likewise.
15765         (grub_video_vbe_get_palette): Likewise.
15766         (grub_video_vbe_set_viewport): Likewise.
15767         (grub_video_vbe_get_viewport): Likewise.
15768         (grub_video_vbe_map_color): Likewise.
15769         (grub_video_vbe_map_rgb): Likewise.
15770         (grub_video_vbe_map_rgba): Likewise.
15771         (grub_video_vbe_unmap_color): Likewise.
15772         (grub_video_vbe_fill_rect): Likewise.
15773         (grub_video_vbe_blit_glyph): Likewise.
15774         (grub_video_vbe_blit_bitmap): Likewise.
15775         (grub_video_vbe_blit_render_target): Likewise.
15776         (grub_video_vbe_scroll): Likewise.
15777         (grub_video_vbe_swap_buffers): Likewise.
15778         (grub_video_vbe_create_render_target): Likewise.
15779         (grub_video_vbe_delete_render_target): Likewise.
15780         (grub_video_vbe_set_active_render_target): Likewise.
15781         (grub_vbe_set_pixel_rgb): Remove function.
15782         (grub_vbe_set_pixel_index): Likewise.
15783         (index_color_mode): Remove static variable.
15784         (active_mode): Likewise.
15785         (framebuffer): Likewise.
15786         (bytes_per_scan_line): Likewise.
15787         (grub_video_vbe_adapter): Added new static variable.
15788         (framebuffer): Likewise.
15789         (render_target): Likewise.
15790         (initial_mode): Likewise.
15791         (mode_in_use): Likewise.
15792         (mode_list): Likewise.
15794 2006-03-10  Marco Gerards  <marco@gnu.org>
15796         * configure.ac (AC_INIT): Bumped to 1.93.
15798         * DISTLIST: Added `include/grub/hfs.h'.
15800 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
15802         * boot/i386/pc/boot.S (general_error): Before looping, try INT
15803         18H, which might help the BIOS falling back to next boot media.
15805 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
15807         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
15808         Poe Chen <poe.poechen@gmail.com>.
15810 2006-01-17  Marco Gerards  <marco@gnu.org>
15812         * include/grub/normal.h: Include <grub/script.h>.
15813         (grub_command_list): Removed struct.
15814         (grub_command_list_t): Removed type.
15815         (grub_menu_entry): Remove members `num' and `command_list'.  Add
15816         members `commands' and `sourcecode'.
15817         * include/grub/script.h: Add inclusion guards.
15818         (grub_script_cmd_menuentry): New struct.
15819         (grub_script_execute_menuentry): New prototype.
15820         (grub_script_lexer_record_start): Likewise.
15821         (grub_script_lexer_record_stop): Likewise.
15822         * normal/execute.c (grub_script_execute_menuentry): New function.
15823         * normal/lexer.c (record, recording, recordpos, recordlen): New
15824         variables.
15825         (grub_script_lexer_record_start): New function.
15826         (grub_script_lexer_record_stop): Likewise.
15827         (recordchar): Likewise.
15828         (nextchar): Likewise.
15829         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
15830         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
15831         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
15832         (current_menu): New variable.
15833         (free_menu): Mainly rewritten.
15834         (grub_normal_menu_addentry): New function.
15835         (read_config_file): Rewritten.
15836         * normal/menu.c (run_menu_entry): Mainly rewritten.
15837         * normal/menu_entry.c (make_screen): Rewritten the code to insert
15838         the menu entry.
15839         (run): Mainly rewritten.
15840         * normal/parser.y (menu_entry): New variable.
15841         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
15842         (menuentry): New rule.
15843         (command): Add `menuentry'.
15844         (if_statement): Allow additional returns before `fi'.
15845         * normal/script.c (grub_script_create_cmdmenu): New function.
15847 2006-01-03  Marco Gerards  <marco@gnu.org>
15849         * INSTALL: GNU Bison is required.
15850         * configure.ac: Rewritten the test to detect Bison.
15851         * Makefile.in (YACC): New variable.  Reported by Xun Sun
15852         <xun.sun.cn@gmail.com>.
15854 2006-01-03  Marco Gerards  <marco@gnu.org>
15856         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
15857         the HFS+ filesystem to filesystem blocks.
15858         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
15859         GCC warning is silenced.
15861 2006-01-03  Marco Gerards  <marco@gnu.org>
15863         * partmap/apple.c (apple_partition_map_iterate): Convert the data
15864         read from disk from big endian to host byte order.
15866 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15868         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
15869         documentation.
15870         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
15871         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
15872         embedded HFS+ filesystem.
15873         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
15874         (grub_hfs_sblock): Move from here...
15875         * include/grub/hfs.h: To here...  New file.
15876         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
15877         documentation.
15878         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
15879         New macros.
15880         (grub_hfsplus_volheader): Change type of member `magic' to
15881         `grub_uint16_t'.
15882         (grub_hfsplus_data): Add new member `embedded_offset'.
15883         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
15884         returned block.
15885         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
15886         Calculate the offset.
15888 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15890         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
15891         Removed.
15892         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
15894 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15896         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
15897         ENV->NAME is NULL after allocating ENV->VALUE.
15899 2005-12-25  Marco Gerards  <marco@gnu.org>
15901         * kern/env.c (grub_env_set): Rewritten the error handling code.
15903 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15905         * geninit.sh: Made more robust, and more portable.
15907 2005-12-25  Marco Gerards  <marco@gnu.org>
15909         Add support for Apple HFS+ filesystems.
15911         * fs/hfsplus.c: New file.
15913         * DISTLIST: Added `fs/hfsplus.c'.
15915         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
15916         (hfsplus_mod_SOURCES): New variable.
15917         (hfsplus_mod_CFLAGS): Likewise.
15918         (hfsplus_mod_LDFLAGS): Likewise.
15919         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
15920         (grub_setup_SOURCES): Likewise.
15921         (grub_mkdevicemap_SOURCES): Likewise.
15922         (grub_emu_SOURCES): Likewise.
15923         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15925         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
15927         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
15929 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
15931         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
15932         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
15933         include/grub/parser.h, include/grub/script.h, kern/parser.c,
15934         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
15935         normal/lexer.c, normal/parser.y, normal/script.c, and
15936         partmap/gpt.c.
15937         Removed kern/sparc64/cache.c.
15939         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
15940         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
15941         grub_emu_init.c.
15943         * configure.ac (AC_INIT): Bumped to 1.92.
15945 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
15947         * kern/err.c (grub_error_push): Added new function to support error
15948         stacks.
15949         (grub_error_pop): Likewise.
15950         (grub_error_stack_items): New local variable to support error stacks.
15951         (grub_error_stack_pos): Likewise.
15952         (grub_error_stack_assert): Likewise.
15953         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
15954         stack depth.
15955         (grub_print_error): Added support to print errors from error stack.
15957         * include/grub/err.h (grub_error_push): Added function prototype.
15958         (grub_error_pop): Likewise.
15960 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
15962         * configure.ac: Accept `powerpc64' as host_cpu.
15963         (amd64): Rename to `biarch32'.
15965         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
15966         non-cacheline-aligned addresses.
15968         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
15969         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
15970         if `size' is non-zero.
15972 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
15974         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
15975         and `cd' to make sure the filename is not prefixed with a
15976         directory name.
15977         (pkgdata_MODULES): Add `gpt.mod'.
15978         (gpt_mod_SOURCES): New variable.
15979         (gpt_mod_CFLAGS): Likewise.
15980         (gpt_mod_LDFLAGS): Likewise.
15982         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
15984         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
15985         New macro.
15987         * partmap/gpt.c: New file.
15989         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
15990         GPT partition map is detected.
15992 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
15994         * commands/i386/pc/play.c: New file.
15995         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
15996         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
15997         macros.
15999 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
16001         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
16002         ((unused))' to silence gcc warning.
16004 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
16006         * configure.ac: Correct `AC_PROG_YACC' test.
16008 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
16010         * util/powerpc/ieee1275/grub-install.in: Run the mount point
16011         check before installing files.
16013 2005-11-22  Mike Small  <smallm@panix.com>
16015         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
16016         number regex so multidigit numbers are recognized correctly.
16018 2005-11-22  Mike Small  <smallm@panix.com>
16020         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
16021         debugging message before attempting to claim memory.
16022         (grub_rescue_cmd_initrd): Add a claim debugging message and try
16023         multiple addresses in case of failure.
16025 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
16027         * term/tparm.c (get_space): Remove empty `if' statement.
16029         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
16031         * kern/parser.c (check_varstate): Rename `state' to 's'.
16033 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
16035         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
16036         variable definitions to the beginning of each function.  Sort stack
16037         variables by size.
16038         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
16039         `buf' argument to `char *'.
16041 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
16043         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
16044         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
16045         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
16046         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16047         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16048         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16049         configfile.mod, search.mod, gzio.mod and test.mod.
16050         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16051         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16052         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16053         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16054         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16055         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16056         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16057         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16058         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16059         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16060         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16061         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16062         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16063         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16064         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16065         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16066         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16067         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16068         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16069         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16070         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16071         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16072         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
16074         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
16075         `grep --include'.
16076         (pkgdata_MODULES): Add test.mod.
16078 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16080         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
16081         appending to variables with "+=".
16082         (PModule): Use full pathname to generate *.lst filenames.
16084         * Makefile.in: Fixed list rules moved from genmk.rb.
16085         (.DELETE_ON_ERROR): New special target.
16086         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
16088         * conf/i386-pc.rmk: Include conf/common.mk.
16089         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
16090         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
16091         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16092         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16093         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16094         configfile.mod, search.mod, gzio.mod and test.mod.
16095         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16096         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16097         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16098         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16099         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16100         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16101         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16102         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16103         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16104         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16105         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16106         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16107         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16108         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16109         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16110         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16111         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16112         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16113         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16114         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16115         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16116         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16117         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
16118         here...
16119         * conf/common.rmk: ... to here.  New file.
16121         * conf/common.mk: New file.
16123 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
16125         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
16126         (grub_script.tab.c): ... here.
16128         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
16129         (grub_script.tab.c): ... here.
16131         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
16132         (grub_script.tab.c): ... here.
16134         * normal/command.c (grub_command_find): Fixed a memory leak of
16135         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
16137 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16139         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
16140         "@" which marks the start of a comment on ARM.
16141         (VARIABLE): Likewise.
16143 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16145         Add support for Linux/ADFS partition tables.
16147         * partmap/acorn.c: New file.
16149         * include/grub/acorn_filecore.h: Likewise.
16151         * DISTLIST: Added `partmap/acorn.c' and
16152         `include/grub/acorn_filecore.h'.
16154         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16155         `partmap/acorn.c'.
16156         (pkgdata_MODULES): Add `acorn.mod'.
16157         (acorn_mod_SOURCES): New variable.
16158         (acorn_mod_CFLAGS): Likewise.
16160         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
16161         `partmap/acorn.c'.
16162         (pkgdata_MODULES): Add `acorn.mod'.
16163         (acorn_mod_SOURCES): New variable.
16164         (acorn_mod_CFLAGS): Likewise.
16166         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
16167         (pkgdata_MODULES): Add `acorn.mod'.
16168         (acorn_mod_SOURCES): New variable.
16169         (acorn_mod_CFLAGS): Likewise.
16170         (acorn_mod_LDFLAGS): Likewise.
16172         * include/types.h (grub_disk_addr_t): New typedef.
16174 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
16176         * geninit.sh: New file.
16178         * geninitheader.sh: Likewise.
16180         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
16181         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
16182         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
16183         * commands/configfile.c (grub_configfile_init)
16184         (grub_configfile_fini): Likewise.
16185         * commands/default.c (grub_default_init, grub_default_fini):
16186         Likewise.
16187         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
16188         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
16189         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
16190         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
16191         Likewise.
16192         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
16193         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
16194         Likewise.
16195         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
16196         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
16197         Likewise.
16198         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
16199         Likewise.
16200         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
16201         Likewise.
16202         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
16203         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
16204         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
16205         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
16206         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
16207         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
16208         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
16209         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
16210         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
16211         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
16212         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
16213         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
16214         * partmap/amiga.c (grub_amiga_partition_map_init)
16215         (grub_amiga_partition_map_fini): Likewise.
16216         * partmap/apple.c (grub_apple_partition_map_init)
16217         (grub_apple_partition_map_fini): Likewise.
16218         * partmap/pc.c (grub_pc_partition_map_init)
16219         (grub_pc_partition_map_fini): Likewise.
16220         * partmap/sun.c (grub_sun_partition_map_init,
16221         grub_sun_partition_map_fini): Likewise.
16222         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
16223         Likewise.
16225         * util/grub-emu.c: Include <grub_modules_init.h>.
16226         (main): Don't initialize and de-initialize any modules directly,
16227         use `grub_init_all' and `grub_fini_all' instead.
16229         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
16230         `grub_vesafb_mod_init'.
16231         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
16232         all users.
16233         * term/i386/pc/vga.c (grub_vga_init): Renamed to
16234         `grub_vga_mod_init'.  Updated all users.
16235         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
16237         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
16238         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
16239         rules.
16241         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
16242         Generate a function to initialize the module in utilities.
16243         Updated all callers.
16244         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
16245         initialize the module in utilities.  Updated all callers.
16247 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
16249         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
16250         escape sequence and a literal ^L to clear the screen.
16252         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
16253         when returning from Open Firmware.
16255 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
16257         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
16258         (grub_ofconsole_height): Likewise.
16259         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
16260         manually insert a '\n'.
16261         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
16262         `grub_ofconsole_height'.  Return early if these are already set.
16264 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
16266         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
16267         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
16268         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
16269         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
16270         and `normal/script.c'.
16271         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16272         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16273         (test_mod_SOURCES): New variable.
16274         (test_mod_CFLAGS): Likewise.
16275         (test_mod_LDFLAGS): Likewise.
16276         (pkgdata_MODULES): Add `test.mod'.
16277         (grub_script.tab.c): New rule.
16278         (grub_script.tab.h): Likewise.
16280 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
16282         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16283         `commands/test.c', `normal/execute.c', `normal/lexer.c',
16284         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16285         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16286         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16287         (test_mod_SOURCES): New variable.
16288         (test_mod_CFLAGS): Likewise.
16289         (pkgdata_MODULES): Add `test.mod'.
16290         (grub_script.tab.c): New rule.
16291         (grub_script.tab.h): Likewise.
16293 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
16295         Add initial scripting support.
16297         * commands/test.c: New file.
16298         * include/grub/script.h: Likewise.
16299         * normal/execute.c: Likewise.
16300         * normal/function.c: Likewise.
16301         * normal/lexer.c: Likewise.
16302         * normal/parser.y: Likewise.
16303         * normal/script.c: Likewise.
16305         * configure.ac: Add `AC_PROG_YACC' test.
16307         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
16308         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
16309         `normal/function.c' and `normal/script.c'.
16310         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16311         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16312         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
16313         variables.
16314         (pkgdata_MODULES): Add `test.mod'.
16315         (grub_script.tab.c): New rule.
16316         (grub_script.tab.h): Likewise.
16318         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
16320         * include/grub/normal.h (grub_test_init): New prototype.
16321         (grub_test_fini): Likewise.
16323         * normal/command.c: Include <grub/script.h>.
16324         (grub_command_execute): Rewritten.
16326         * util/grub-emu.c (main): Call `grub_test_init' and
16327         `grub_test_fini'.
16329 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16331         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
16332         to 0.
16333         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
16334         there are no pending characters.
16336 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16338         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
16339         `grub_strndup' to drop device arguments. Replace unnecessary
16340         `grub_strndup' with `grub_strdup'.
16342 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16344         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
16345         `debug' environment variable has been set.
16347 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16349         * Makefile.in (install-local): Use $(DATA).
16350         (uninstall): Likewise.
16351         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
16352         (sbin_UTILITIES): ... to here.
16353         (sbin_SCRIPTS): New variable.
16354         (grub_install_SOURCES): New variable.
16355         * util/powerpc/ieee1275/grub-install.in: New file.
16356         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
16357         variable.
16358         (add_segments): Call `grub_util_get_path'.
16360 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
16362         From Timothy Baldwin:
16363         * commands/ls.c (grub_ls_list_files): Close FILE with
16364         grub_file_close.
16365         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
16367 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
16369         * include/grub/parser.h: New file.
16371         * kern/parser.c: Likewise.
16373         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
16374         (grub_setup_SOURCES): Likewise.
16375         (grub_probefs_SOURCES): Likewise.
16376         (grub_emu_SOURCES): Likewise.
16377         (kernel_img_HEADERS): Add `parser.h'.
16379         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16380         (grub_emu_SOURCES): Add `kern/parser.c'.
16381         (grubof_SOURCES): Likewise.
16383         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16384         (grubof_SOURCES): Add `kern/parser.c'.
16386         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
16388         * kern/misc.c (grub_split_cmdline): Removed function.
16390         * kern/rescue.c: Include <grub/parser.h>.
16391         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
16392         of `grub_split_cmdline'.
16394         * normal/command.c: Include <grub/parser.h>.
16395         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
16396         of `grub_split_cmdline'.
16398         * normal/completion.c: Include <grub/parser.h>.
16399         (cmdline_state): New variable.
16400         (iterate_dir): End the filename with a quote depending on the
16401         command line state.
16402         (get_state): new function.
16403         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
16404         split the arguments and determine the current argument.  When the
16405         argument string is not quoted, escape all spaces.
16407 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16409         * normal/sparc64/setjmp.S: New file.
16411 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16413         * include/grub/sparc64/libgcc.h: New file.
16414         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
16415         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
16416         normal/sparc64/setjmp.c.
16418 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16420         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
16421         * kern/sparc64/cache.S: New file.
16422         * kern/sparc64/cache.c: Removed.
16423         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
16424         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
16425         -mtune=ultrasparc.
16426         (COMMON_LDFLAGS): Add -melf64_sparc.
16427         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
16428         (grubof_SOURCES): Use cache.S instead of cache.c.
16429         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
16430         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
16431         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
16432         commented though.
16433         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
16434         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
16435         (linux_mod_CFLAGS): Commented out.
16436         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
16437         out because module isn't built.
16438         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
16439         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
16440         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
16441         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
16442         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
16443         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16444         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16445         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
16446         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
16447         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
16448         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16449         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16450         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
16451         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
16453 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
16455         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
16456         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
16457         longer, because HFS should not be used on PC.
16459 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16461         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
16462         consistently within the loop.
16464 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
16466         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
16467         directory can not be read.
16469 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16471         * configure.ac (AC_INIT): Increase the version number to 1.91.
16473         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
16474         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
16475         term/i386/pc/serial.c.
16477 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16479         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
16480         file size must be permitted.
16482         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
16483         between %ah and %al.
16485 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16487         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
16488         grub_uint64_t.
16489         Call the hook with a NUL-terminated filename.
16490         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
16491         grub_cpu_to_be32.
16493         * kern/term.c (cursor_state): New variable.
16494         (grub_term_set_current): Reset the cursor state on a new
16495         terminal.
16496         (grub_setcursor): Rewritten to use CURSOR_STATE.
16497         (grub_getcursor): New function.
16499         * include/grub/term.h (grub_getcursor): New prototype.
16501         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
16502         integers on ARM. Reported by Timothy Baldwin
16503         <T.E.Baldwin99@members.leeds.ac.uk>.
16505 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
16507         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
16508         allocated.
16509         (grub_sfs_dir): Likewise.
16511 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
16513         Add support for the SFS filesystem.
16515         * fs/sfs.c: New file.
16517         * DISTLIST: Added `fs/sfs.c'.
16519         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
16520         (grub_probefs_SOURCES): Likewise.
16521         (grub_emu_SOURCES): Likewise.
16522         (pkgdata_MODULES): Add `sfs.mod'.
16523         (sfs_mod_SOURCES): New variable.
16524         (sfs_mod_CFLAGS): Likewise.
16525         (sfs_mod_LDFLAGS): Likewise.
16527         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
16528         (pkgdata_MODULES): Add `sfs.mod'.
16529         (sfs_mod_SOURCES): New variable.
16530         (sfs_mod_CFLAGS): Likewise.
16532         * util/grub-emu.c (main): Call `grub_sfs_init' and
16533         `grub_sfs_fini'.
16535         * include/grub/fs.h (grub_sfs_init): New prototype.
16536         (grub_sfs_fini): Likewise.
16538 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
16540         Add support for the AFFS filesystem.
16542         * fs/affs.c: New file.
16544         * DISTLIST: Added `fs/affs.c'.
16546         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
16547         (grub_probefs_SOURCES): Likewise.
16548         (grub_emu_SOURCES): Likewise.
16549         (pkgdata_MODULES): Add `affs.mod'.
16550         (affs_mod_SOURCES): New variable.
16551         (affs_mod_CFLAGS): Likewise.
16552         (affs_mod_LDFLAGS): Likewise.
16554         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
16555         (pkgdata_MODULES): Add `affs.mod'.
16556         (affs_mod_SOURCES): New variable.
16557         (affs_mod_CFLAGS): Likewise.
16559         * util/grub-emu.c (main): Call `grub_affs_init' and
16560         `grub_affs_fini'.
16562         * include/grub/fs.h (grub_affs_init): New prototype.
16563         (grub_affs_fini): Likewise.
16565 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16567         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
16569 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16571         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
16572         `-m32' to CFLAGS.
16574         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
16575         linking.
16577         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
16578         (COMMON_LDFLAGS): New variable.
16579         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
16580         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
16581         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
16582         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
16583         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
16584         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
16585         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
16586         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
16587         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
16588         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
16589         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16590         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16591         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
16592         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
16593         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
16594         variables.
16595         (normal_mod_ASFLAGS): Add `-m32'.
16597         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
16598         (grub_host_size_t, grub_host_ssize_t): New types.
16599         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
16600         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
16601         `GRUB_HOST_SIZEOF_VOID_P'.
16603         * include/grub/kernel.h (struct grub_module_header): Type of
16604         member offset changed to `grub_host_off_t'.  Type of member size
16605         changed to `grub_host_size_t'.
16606         (struct grub_module_info): Type of member offset changed to
16607         `grub_host_off_t'.  Type of member size changed to
16608         `grub_host_size_t'.
16610 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
16612         Make GRUB's kernel compliant to Multiboot Specification.
16614         * kern/i386/pc/startup.S (multiboot_header): New label.
16615         (multiboot_entry): Likewise.
16616         (multiboot_trampoline): Likewise.
16618         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16619         Increased to 0x4A0.
16621         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
16622         put parentheses after a question mark.
16623         [!GRUB_UTIL] (my_mod): New variable.
16625         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
16627 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
16629         Adds support for the XFS filesystem.  Btrees are not supported
16630         yet.
16632         * fs/xfs.c: New file.
16634         * DISTLIST: Added `fs/xfs.c'.
16636         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
16637         (grub_probefs_SOURCES): Likewise.
16638         (grub_emu_SOURCES): Likewise.
16639         (pkgdata_MODULES): Add `xfs.mod'.
16640         (xfs_mod_SOURCES): New variable.
16641         (xfs_mod_CFLAGS): Likewise.
16643         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
16644         (pkgdata_MODULES): Add `xfs.mod'.
16645         (xfs_mod_SOURCES): New variable.
16646         (xfs_mod_CFLAGS): Likewise.
16648         * util/grub-emu.c (main): Call `grub_xfs_init' and
16649         `grub_xfs_fini'.
16651         * include/grub/fs.h (grub_xfs_init): New prototype.
16652         (grub_xfs_fini): Likewise.
16655 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
16657         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
16658         color modes, allow greater than 16 colors to be configured as
16659         a default palette.
16661 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
16663         * normal/completion.c (complete_arguments): Add the qualifier
16664         const into OPTIONS.
16666         From Omniflux <omniflux+lists@omniflux.com>:
16667         * include/grub/terminfo.h: New file.
16668         * include/grub/tparm.h: Likewise.
16669         * include/grub/i386/pc/serial.h: Likewise.
16670         * term/terminfo.c: Likewise.
16671         * term/tparm.c: Likewise.
16672         * term/i386/pc/serial.c: Likewise.
16673         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
16674         serial.mod.
16675         (terminfo_mod_SOURCES): New variable.
16676         (terminfo_mod_CFLAGS): Likewise.
16677         (serial_mod_SOURCES): Likewise.
16678         (serial_mod_CFLAGS): Likewise.
16680 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
16682         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
16683         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
16684         and kern/powerpc/ieee1275/cmain.c, respectively.
16686         * boot/powerpc/ieee1275/crt0.S: Moved to ...
16687         * kern/powerpc/ieee1275/crt0.S: ... here.
16689         * boot/powerpc/ieee1275/cmain.c: Moved to ...
16690         * kern/powerpc/ieee1275/cmain.c: ... here.
16692         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
16693         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
16694         instead of boot/powerpc/ieee1275/crt0.S and
16695         boot/powerpc/ieee1275/cmain.c, respectively.
16697         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
16698         sectors. It was not used anyway.
16700 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16702         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
16703         `unused parameter' warning.
16705 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16707         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
16708         function.
16709         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
16710         getcharwidth.
16712 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
16714         * include/grub/normal.h (enum grub_completion_type): Added
16715         `GRUB_COMPLETION_TYPE_ARGUMENT'.
16717         * normal/cmdline.c (print_completion): Handle
16718         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
16719         * normal/menu_entry.c (store_completion): Likewise.
16721         * normal/completion.c (complete_arguments): New function.
16722         (grub_normal_do_completion): Call `complete_arguments' when the
16723         current words start with a dash.
16725 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
16727         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
16728         `gzio.mod' instead of `io.mod').
16730 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
16732         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
16733         (DISTDIRS): Added io and video.
16734         Rewrite the search routine to make an output consistently.
16736         * DISTLIST: Added conf/sparc64-ieee1275.mk,
16737         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
16738         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
16739         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
16740         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
16741         util/powerpc/ieee1275/misc.c.
16743         * include/grub/gzio.h: New file.
16744         * io/gzio.c: Likewise.
16746         * kern/file.c (grub_file_close): Call grub_device_close only if
16747         FILE->DEVICE is not NULL.
16749         * include/grub/mm.h [!NULL] (NULL): New macro.
16751         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
16753         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
16754         (pkgdata_MODULES): Added gzio.mod.
16755         (gzio_mod_SOURCES): New variable.
16756         (gzio_mod_CFLAGS): Likewise.
16758         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
16759         (pkgdata_MODULES): Added gzio.mod.
16760         (gzio_mod_SOURCES): New variable.
16761         (gzio_mod_CFLAGS): Likewise.
16763         * commands/cat.c: Include grub/gzio.h.
16764         (grub_cmd_cat): Use grub_gzfile_open instead of
16765         grub_file_open.
16767         * commands/cmp.c: Include grub/gzio.h.
16768         (grub_cmd_cmp): Use grub_gzfile_open instead of
16769         grub_file_open.
16771         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
16772         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
16773         grub_file_open.
16774         (grub_rescue_cmd_module): Likewise.
16776 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16778         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
16779         kern/sparc64/ieee1275/init.c because it contains _start.
16780         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
16782 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16784         * configure.ac: Add support for sparc64 host with ieee1275
16785         firmware.
16786         * configure: Generated from configure.ac.
16787         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
16788         instead of int.
16789         (grub_ofdisk_read): Likewise.
16790         (grub_ofdisk_open): Use %p to print pointer values, and cast the
16791         pointers as (void *) to remove a warning.
16792         (grub_ofdisk_close): Likewise.
16793         (grub_ofdisk_read): Likewise.
16794         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
16795         returns, so make it return void to remove a warning.
16796         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
16797         Corresponding prototype change.
16798         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
16799         values, and cast the pointers as (void *) to remove a warning.
16800         (grub_mm_dump): Likewise.
16801         * conf/sparc64-ieee1275.mk: New file.
16802         * conf/sparc64-ieee1275.rmk: Likewise.
16803         * include/grub/sparc64/setjmp.h: Likewise.
16804         * include/grub/sparc64/types.h: Likewise.
16805         * include/grub/sparc64/ieee1275/console.h: Likewise.
16806         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
16807         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
16808         * include/grub/sparc64/ieee1275/time.h: Likewise.
16809         * kern/sparc64/cache.c: Likewise.
16810         * kern/sparc64/dl.c: Likewise.
16811         * kern/sparc64/ieee1275/init.c: Likewise.
16812         * kern/sparc64/ieee1275/openfw.c: Likewise.
16814 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16816         * util/console.c (grub_ncurses_putchar): If C is greater than
16817         0x7f, set C to a question mark.
16818         (grub_ncurses_getcharwidth): New function.
16819         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
16820         getcharwidth.
16822         * normal/menu.c (print_entry): Made aware of Unicode. First,
16823         convert TITLE to UCS-4, and predict the cursor position by
16824         grub_getcharwidth.
16826         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
16827         const to SRC.
16828         * kern/misc.c (grub_utf16_to_utf8): Likewise.
16830 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16832         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
16833         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16834         grub_strcat.
16836         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
16837         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16838         grub_strcpy and grub_strlen. Take it into account that a space
16839         character is inserted as a delimiter.
16841 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16843         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
16844         invalid magic in the error.
16846         * commands/search.c: New file.
16848         * util/grub-emu.c (main): Call grub_search_init and
16849         grub_search_fini.
16851         * kern/rescue.c (grub_rescue_print_disks): Removed.
16852         (grub_rescue_print_devices): New function.
16853         (grub_rescue_cmd_ls): Use grub_device_iterate with
16854         grub_rescue_print_devices instead of grub_disk_dev_iterate with
16855         grub_rescue_print_disks.
16857         * kern/partition.c (grub_partition_iterate): Return the result of
16858         PARTMAP->ITERATE instead of GRUB_ERRNO.
16860         * kern/device.c: Include grub/partition.h.
16861         (grub_device_iterate): New function.
16863         * include/grub/partition.h (grub_partition_iterate): Return int
16864         instead of grub_err_t.
16866         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
16867         prototype.
16868         [GRUB_UTIL] (grub_search_fini): Likewise.
16870         * include/grub/device.h (grub_device_iterate): New prototype.
16872         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16873         commands/search.c.
16874         (pkgdata_MODULES): Added search.mod.
16875         (search_mod_SOURCES): New variable.
16876         (search_mod_CFLAGS): Likewise.
16878         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
16879         (pkgdata_MODULES): Added search.mod.
16880         (search_mod_SOURCES): New variable.
16881         (search_mod_CFLAGS): Likewise.
16883         * commands/ls.c (grub_ls_list_disks): Renamed to ...
16884         (grub_ls_list_devices): ... this, and use grub_device_iterate.
16885         All callers changed.
16887         * DISTLIST: Added commands/search.c.
16889 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
16891         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
16892         conversion.
16893         (grub_getcharwidth): New function.
16895         * kern/misc.c (grub_utf8_to_ucs4): New function.
16897         * include/grub/term.h (struct grub_term): Added a new member
16898         "getcharwidth".
16899         (grub_getcharwidth): New prototype.
16901         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
16903         * term/i386/pc/console.c (map_char): New function. Segregated from
16904         grub_console_putchar.
16905         (grub_console_putchar): Use map_char.
16906         (grub_console_getcharwidth): New function.
16907         (grub_console_term): Specified grub_console_getcharwidth as
16908         getcharwidth.
16910         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
16911         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
16913         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
16914         GRUB_ERRNO.
16915         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
16916         on grub_strtoul completely.
16917         (write_char): Declare local variables in the beginning of the
16918         function.
16919         (grub_vesafb_getcharwidth): New function.
16920         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
16921         getcharwidth.
16923 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
16925         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
16926         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
16927         commands/i386/pc/vbetest.c.
16929         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
16930         call grub_vbe_get_controller_info again, because the returned
16931         information is volatile.
16932         (grub_vbe_set_video_mode): Mostly rewritten.
16933         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
16934         grub_vbe_status_t correctly.
16935         (grub_vbe_get_video_mode_info): Likewise.
16936         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
16937         several if statements.
16939         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
16940         * commands/i386/pc/vbeinfo.c: ... this.
16942         * commands/i386/pc/vbe_test.c: Renamed to ...
16943         * commands/i386/pc/vbetest.c: ... this.
16945         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
16946         ...
16947         (grub_cmd_vbeinfo): ... this. Save video modes before
16948         iterating. Skip a video mode, if it is not available, not enough
16949         information is given or it is monochrome. Show the memory
16950         model. Leave the interpretation of MODEVAR to grub_strtoul
16951         completely.
16952         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
16953         (GRUB_MOD_FINI): Likewise.
16955         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
16956         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
16957         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
16958         duplicated grub_env_get. Leave the interpretation of MODEVAR to
16959         grub_strtoul completely.
16960         (real2pm): Removed.
16961         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
16962         (GRUB_MOD_FINI): Likewise.
16964         * normal/misc.c: Include grub/mm.h.
16966         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
16967         vbe_list_modes with vbetest.mod and vbeinfo.mod.
16968         (vbe_list_modes_mod_SOURCES): Removed.
16969         (vbe_list_modes_mod_CFLAGS): Likewise.
16970         (vbe_test_mod_SOURCES): Likewise.
16971         (vbe_test_mod_CFLAGS): Likewise.
16972         (vbeinfo_mod_SOURCES): New variable.
16973         (vbeinfo_mod_CFLAGS): Likewise.
16974         (vbetest_mod_SOURCES): Likewise.
16975         (vbetest_mod_CFLAGS): Likewise.
16977 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
16979         * normal/misc.c: New file.
16981         * DISTLIST: Added normal/misc.c.
16983         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
16984         DISK to HOOK. Call HOOK with DISK.
16985         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16986         * partmap/pc.c (pc_partition_map_iterate): Likewise.
16987         * partmap/sun.c (sun_partition_map_iterate): Likewise.
16989         * normal/menu_entry.c (struct screen): Added a new member
16990         "completion_shown".
16991         (completion_buffer): New global variable.
16992         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
16993         (store_completion): New function.
16994         (complete): Likewise.
16995         (clear_completions): Likewise.
16996         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
16997         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
16998         a tab, call complete.
17000         * normal/completion.c (disk_dev): Removed.
17001         (print_simple_completion): Likewise.
17002         (print_partition_completion): Likewise.
17003         (print_func): New global variable.
17004         (add_completion): Do not take the arguments WHAT or PRINT any
17005         longer. Added a new argument TYPE. Instead of printing directly,
17006         call PRINT_FUNC if not NULL.
17007         All callers changed.
17008         (complete_device): Use a local variable DEV instead of
17009         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
17010         (grub_normal_do_completion): Take a new argument HOOK. Do not
17011         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
17012         empty string, return NULL instead.
17013         All callers changed.
17015         * normal/cmdline.c (print_completion): New function.
17017         * kern/partition.c (grub_partition_iterate): Add an argument DISK
17018         to HOOK.
17019         All callers changed.
17021         * kern/disk.c (grub_print_partinfo): Removed.
17023         * include/grub/partition.h (struct grub_partition_map): Add a new
17024         argument DISK into HOOK of ITERATE.
17025         (grub_partition_iterate): Add a new argument DISK to HOOK.
17027         * include/grub/normal.h (enum grub_completion_type): New enum.
17028         (grub_completion_type_t): New type.
17029         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
17030         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
17031         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
17032         (GRUB_COMPLETION_TYPE_FILE): Likewise.
17033         (grub_normal_do_completion): Added a new argument HOOK.
17034         (grub_normal_print_device_info): New prototype.
17036         * include/grub/disk.h (grub_print_partinfo): Removed.
17038         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
17039         (normal_mod_SOURCES): Likewise.
17040         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17041         (normal_mod_SOURCES): Likewise.
17043         * commands/ls.c (grub_ls_list_disks): Use
17044         grub_normal_print_device_info instead of grub_print_partinfo. Free
17045         PNAME.
17046         (grub_ls_list_files): Use grub_normal_print_device_info instead of
17047         duplicating the code.
17049 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
17051         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
17052         follow GCS more precisely.
17053         * commands/i386/pc/vbe_test.c: Likewise.
17054         * include/grub/i386/pc/vbe.h: Likewise.
17055         * term/i386/pc/vesafb.c: Likewise.
17056         * video/i386/pc/vbe.c: Likewise.
17058 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
17060         * DISTLIST: Added term/i386/pc/vesafb.c
17061         DISTLIST: Added video/i386/pc/vbe.c
17062         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
17063         DISTLIST: Added commands/i386/pc/vbe_test.c.
17064         * commands/i386/pc/vbe_list_modes.c: New file.
17065         * commands/i386/pc/vbe_test.c: Likewise.
17066         * term/i386/pc/vesafb.c: Likewise.
17067         * video/i386/pc/vbe.c: Likewise.
17068         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
17069         (grub_vbe_probe) Added prototype.
17070         (grub_vbe_set_video_mode) Likewise.
17071         (grub_vbe_get_video_mode) Likewise.
17072         (grub_vbe_get_video_mode_info) Likewise.
17073         (grub_vbe_set_pixel_rgb) Likewise.
17074         (grub_vbe_set_pixel_index) Likewise.
17075         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
17076         (pkgdata_MODULES): Added vesafb.mod.
17077         (pkgdata_MODULES): Added vbe_list_modes.mod.
17078         (pkgdata_MODULES): Added vbe_test.mod.
17079         (vbe_mod_SOURCES): Added.
17080         (vbe_mod_CFLAGS): Likewise.
17081         (vesafb_mod_SOURCES): Likewise.
17082         (vesafb_mod_CFLAGS): Likewise.
17083         (vbe_list_modes_mod_SOURCES): Likewise.
17084         (vbe_list_modes_mod_CFLAGS): Likewise.
17085         (vbe_test_mod_SOURCES): Likewise.
17086         (vbe_test_mod_CFLAGS): Likewise.
17088 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
17090         * normal/command.c (grub_command_execute): If INTERACTIVE is
17091         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
17092         CMDLINE. Disable the pager if INTERACTIVE is true.
17093         All callers are changed.
17095         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
17096         before reading a config file.
17097         * normal/main.c (read_config_file): Even if a command is not
17098         found, register it if it is within an entry.
17100         * util/grub-emu.c: Include sys/types.h and unistd.h.
17101         (options): Added --hold.
17102         (struct arguments): Added a new member "hold".
17103         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
17104         missing.
17105         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
17106         cleared by a debugger, if it is not zero.
17108         * include/grub/normal.h (grub_command_execute): Add an argument
17109         INTERACTIVE.
17111 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
17113         * DISTLIST: Added include/grub/i386/pc/vbe.h.
17115 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
17117         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
17118         program with another one, because the old one didn't detect a bug
17119         in gcc-3.4. Always use regparm 2, because the new test is still
17120         not enough for gcc-4.0. Someone must investigate a simple test
17121         case which detects a bug in gcc-4.0.
17123 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
17125         * DISTLIST: Added normal/completion.c.
17127         * normal/completion.c: New file.
17129         * term/i386/pc/console.c (grub_console_getwh): New function.
17130         (grub_console_term): Assign grub_console_getwh to getwh.
17132         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
17133         function is defined in normal/completion.c as
17134         grub_normal_do_completion.
17135         (grub_cmdline_get): Use grub_normal_do_completion instead of
17136         grub_tab_complete.
17138         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
17139         returns non-zero, otherwise return 0.
17140         (grub_partition_iterate): First, probe the partition map. Then,
17141         call ITERATE only for this partition map.
17143         * kern/misc.c (grub_strncmp): Rewritten.
17145         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
17146         returns non-zero. Otherwise return 0.
17148         * include/grub/partition.h (grub_partition_map_iterate): Return
17149         int instead of void.
17151         * include/grub/normal.h (grub_normal_do_completion): New prototype.
17153         * include/grub/misc.h (grub_strncmp): Change the type of N to
17154         grub_size_t.
17156         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
17157         of void.
17159         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
17160         unsigned explicitly before comparing it with I.
17162         * kern/main.c (grub_env_write_root): Add the attribute unused into
17163         VAR.
17165         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17166         normal/completion.c.
17167         (normal_mod_SOURCES): Likewise.
17168         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
17169         (normal_mod_SOURCES): Likewise.
17171         * normal/command.c (grub_iterate_commands): If ITERATE returns
17172         non-zero, return one immediately.
17174 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
17176         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
17177         * kern/i386/pc/startup.S: Updated Global Descriptor table's
17178         descriptions.
17179         (grub_vbe_get_controller_info): New function.
17180         (grub_vbe_get_mode_info): Likewise.
17181         (grub_vbe_set_mode): Likewise.
17182         (grub_vbe_get_mode): Likewise.
17183         (grub_vbe_set_memory_window): Likewise.
17184         (grub_vbe_get_memory_window): Likewise.
17185         (grub_vbe_set_scanline_length): Likewise.
17186         (grub_vbe_get_scanline_length): Likewise.
17187         (grub_vbe_set_display_start): Likewise.
17188         (grub_vbe_get_display_start): Likewise.
17189         (grub_vbe_set_palette_data): Likewise.
17190         * include/grub/i386/pc/vbe.h: New file.
17192 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
17194         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17195         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
17196         * DISTLIST: Likewise.
17197         * kern/ieee1275/of.c: Moved to ...
17198         * kern/ieee1275/ieee1275.c: ... here.
17200 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
17202         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
17203         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
17204         Pass 0 as `end' parameter to grub_strtoul().
17206 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
17208         * include/grub/powerpc/ieee1275/console.h: Do not include
17209         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
17210         ifdef.
17211         (grub_console_cur_color): Remove i386-specific prototype.
17212         (grub_console_real_putchar): Likewise.
17213         (grub_console_checkkey): Likewise.
17214         (grub_console_getkey): Likewise.
17215         (grub_console_getxy): Likewise.
17216         (grub_console_gotoxy): Likewise.
17217         (grub_console_cls): Likewise.
17218         (grub_console_setcursor): Likewise.
17219         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
17220         Include <grub/machine/console.h>.
17221         * term/ieee1275/ofconsole.c: Likewise.
17223 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
17225         * Makefile.in (LIBLZO): New variable.
17227         * configure.ac: Check for LZO version 2.
17229         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
17230         lzo/lzo1x.h instead of lzo1x.h.
17232         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
17233         of -llzo.
17235         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
17236         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
17238         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
17239         copying the data from PARTITION to P.
17241 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
17243         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
17244         negative, unload the module.
17246         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
17247         map is "pc_partition_map" but not "pc".
17248         (usage): Fix the description. The options are --boot-image and
17249         --core-image but not --boot-file or --core-file.
17250         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
17251         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
17252         DEFAULT_DIRECTORY.
17254         * util/i386/pc/grub-install.in: Do not specify --boot-file or
17255         --core-file. Specify INSTALL_DEVICE as an argument.
17257         * util/console.c: Include config.h.
17258         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
17259         [HAVE_NCURSES_H]: Include ncurses.h.
17260         [HAVE_CURSES_H]: Include curses.h.
17261         [!A_NORMAL] (A_NORMAL): Defined as zero.
17262         [!A_STANDOUT] (A_STANDOUT): Likewise.
17264         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
17265         -lncurses.
17266         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
17268         * configure.ac: Check for curses libraries and headers.
17270         * Makefile.in (LIBCURSES): New variable.
17272         * genmk.rb (Script::rule): Set the executable bits.
17274         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
17275         name of the PC partition map is "pc_partition_map" but not "pc".
17277 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
17279         * util/i386/pc/grub-install.in (grub_probefs): New variable.
17280         (modules): Likewise.
17281         (usage): Added descriptions for --modules and --grub-probefs.
17282         Handle --modules and --grub-probefs. Save the arguments in MODULES
17283         and GRUB_PROBEFS, respectively.
17284         Auto-detect a filesystem module against GRUBDIR. If the result is
17285         empty and modules are not specified explicitly, abort the
17286         installation. Add the result to MODULES.
17288         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
17289         disk/powerpc/ieee1275/ofdisk.c,
17290         include/grub/powerpc/ieee1275/init.h and
17291         term/powerpc/ieee1275/ofconsole.c.
17292         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
17293         term/ieee1275/ofconsole.c.
17295         * include/grub/powerpc/ieee1275/console.h: Resurrected.
17297         * COPYING: Upgraded to the latest version. Only the address of the
17298         FSF office has changed.
17300 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
17302         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17303         kern/ieee1275.c with kern/ieee1275/of.c.
17305         * kern/ieee1275.c: Moved to ...
17306         * kern/ieee1275/of.c: ... here.
17308 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
17310         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
17311         readability.
17313         * config.guess: Updated to the latest version from gnulib.
17314         * config.sub: Likewise.
17315         * install.sh: Likewise.
17316         * mkinstalldirs: Likewise.
17318         * include/grub/console.h: Removed. This file is arch-specific. Do
17319         not put this in include/grub.
17321         * include/grub/i386/pc/console.h: Resurrected.
17323         * util/console.c: Include grub/machine/console.h instead of
17324         grub/console.h.
17325         * util/grub-emu.c: Likewise.
17327 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
17329         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
17330         hardcoded value.
17332         From Vincent Pelletier  <subdino2004@yahoo.fr>
17333         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
17334         Redefined to use grub_getwh.
17335         (grub_term): New member named getwh.
17336         (grub_getwh): New prototype.
17337         * kern/term.c (grub_getwh): New function.
17338         * term/i386/pc/console.c (grub_console_getwh): New function.
17339         (grub_console_term): New member `getwh'.
17340         * term/i386/pc/vga.c (grub_vga_getwh): New function.
17341         (grub_vga_term): New member `getwh'.
17342         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
17343         grub_ssize_t.
17344         (grub_ofconsole_getw): New function.
17345         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
17346         (grub_ofconsole_term): New field named getwh and new initial
17347         value.
17349 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
17351         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
17352         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
17353         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
17354         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
17355         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
17356         of <grub/machine/ieee1275.h>.
17357         * commands/ieee1275/reboot.c: Likewise.
17358         * boot/powerpc/ieee1275/ieee1275.c: Move ...
17359         * kern/ieee1275.c: ... to here.  All users updated.  Change all
17360         parameter structs to use new type `grub_ieee1275_cell_t'.
17361         * term/powerpc/ieee1275/ofconsole.c: Move ...
17362         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
17363         * disk/powerpc/ieee1275/ofdisk.c: Move ...
17364         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
17365         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
17366         to return int.
17367         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
17368         Remove unused prototypes.  All users updated.
17369         * include/grub/powerpc/ieee1275/console.h: Removed.
17370         * include/grub/powerpc/ieee1275/ieee1275.h: Define
17371         `grub_ieee1275_cell_t'.
17372         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
17373         Cast comparisons with -1 to the correct type.
17374         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
17375         type to match `grub_ieee1275_entry_fn'.
17377 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
17379         * DISTLIST: Added util/i386/pc/grub-probefs.c.
17381         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
17382         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
17383         partmap/sun.c.
17384         (grub_probefs_SOURCES): New variable.
17386         * util/i386/pc/grub-probefs.c: New file.
17388         * util/i386/pc/grub-setup.c (main): Call
17389         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
17390         grub_hfs_init and grub_jfs_init to initialize the system. Call
17391         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
17392         grub_pc_partition_map_fini to finish the system.
17394 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
17396         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
17397         function.
17398         (grub_multiboot_load_elf32): Likewise.
17399         (grub_multiboot_is_elf64): Likewise.
17400         (grub_multiboot_load_elf64): Likewise.
17401         (grub_multiboot_load_elf): Likewise.
17402         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
17403         an ELF32 or ELF64 file.
17404         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
17406         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
17407         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
17408         NULL before calling FS->LABEL.
17409         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
17410         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
17411         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
17412         before calling FS->LABEL.
17414 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
17416         * util/i386/pc/grub-install.in (datadir): New variable.
17417         (libdir): Removed.
17418         (pkgdatadir): New variable.
17419         (pkglibdir): Removed.
17421 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
17423         * DISTLIST: Added util/i386/pc/grub-install.in.
17425         * util/i386/pc/grub-install.in: New file.
17427         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
17428         (grub_install_SOURCES): Likewise.
17430         * genmk.rb: Added support for scripts.
17431         (Script): New class.
17432         (scripts): New variable.
17434         * Makefile.in (install-local): Install sbin_SCRIPTS by
17435         INSTALL_SCRIPT.
17436         (uninstall): Remove sbin_SCRIPTS.
17438         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
17439         device, try to get a GRUB device by
17440         grub_util_biosdisk_get_grub_dev.
17441         Free DEST_DEV.
17443         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
17444         description for --device-map.
17446 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17448         Change the semantics of variable hooks. They now return strings
17449         instead of error values.
17451         * util/i386/pc/grub-setup.c: Include grub/env.h.
17452         (setup): Use grub_device_set_root instead of grub_env_set.
17454         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
17455         grub_env_get instead of grub_device_set_root and
17456         grub_device_get_root, respectively.
17458         * kern/main.c (grub_env_write_root): New function.
17459         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
17460         grub_env_set instead of grub_device_set_root.
17462         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
17463         many variables.
17464         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
17465         rather than calling ENV->WRITE_HOOK afterwards.
17466         (grub_env_get): Return the result of ENV->READ_HOOK rather than
17467         passing a pointer of a pointer.
17468         (grub_register_variable_hook): Change the types of "read_hook" and
17469         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
17470         respectively.
17471         Allocate the default empty string on the heap, because this string
17472         may be freed later.
17474         * kern/device.c: Include grub/env.h.
17475         (grub_device_set_root): Removed.
17476         (grub_device_get_root): Likewise.
17477         (grub_device_open): Use grub_env_get instead of
17478         grub_device_get_root.
17480         * include/grub/env.h (grub_env_read_hook_t): New type.
17481         (grub_env_write_hook_t): Likewise.
17482         (grub_env_var): Change the types of "read_hook" and "write_hook"
17483         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
17484         (grub_register_variable_hook): Likewise.
17486         * include/grub/device.h (grub_device_set_root): Removed.
17487         (grub_device_set_root): Likewise.
17489         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
17490         make sure that DIRNAME terminates with '/', so that
17491         grub_fat_find_dir will fail if PATH is not a directory.
17493         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
17494         from DIRNAME.
17495         Use the qualifier auto for print_files and print_files_long.
17496         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
17497         as a regular file.
17498         Put a newline only if there is no error.
17499         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
17500         used.
17502 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17504         * kern/partition.c (grub_partition_probe): Initialize PART to
17505         NULL. Otherwise, when no partition map is registered, this returns
17506         a garbage.
17508 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
17510         * partmap/apple.c (apple_partition_map_iterate): Check if POS
17511         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
17512         valid.
17514 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
17516         * commands/ls.c (grub_ls_list_disks): Print the filesystem
17517         information on each device, if it does not have partitions. Print
17518         "Device" instead of "Disk", because this function is not specific
17519         to disk devices.
17521         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
17522         static to ensure that it is put on the memory rather than a
17523         register.
17525 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17527         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
17528         (grub_cat_init): Likewise.
17529         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
17530         (options): Likewise.
17531         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
17532         (grub_configfile_init): Likewise.
17533         * font/manager.c (GRUB_MOD_INIT): Likewise.
17534         * commands/help.c (GRUB_MOD_INIT): Likewise.
17535         (grub_help_init): Likewise.
17536         * normal/command.c (grub_command_init): Likewise.
17537         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
17538         * disk/loopback.c (grub_loop_init): Likewise.
17539         (GRUB_MOD_INIT): Likewise.
17540         * commands/ls.c (grub_ls_init): Likewise.
17541         (GRUB_MOD_INIT): Likewise.
17542         (options): Likewise.
17543         * commands/boot.c (grub_boot_init): Likewise.
17544         (GRUB_MOD_INIT): Likewise.
17545         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
17546         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
17547         (GRUB_MOD_INIT): Likewise.
17548         * commands/cmp.c (grub_cmp_init): Likewise.
17549         (GRUB_MOD_INIT): Likewise.
17551         * normal/arg.c: Use <> instead of "" to include header files.
17552         (SHORT_ARG_HELP): New macro.
17553         (SHORT_ARG_USAGE): Likewise.
17554         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
17555         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
17556         descriptions.
17557         (find_short): Check if C is 'h' or 'u' explicitly.
17558         (grub_arg_show_help): Use space characters instead of tabs. Treat
17559         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
17560         are shown with --help and --usage only if they are not used for
17561         the command itself.
17562         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
17563         'h' and 'u'.
17565         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
17566         const into "longarg". Change the type of "shortarg" to int.
17568 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17570         * boot/i386/pc/boot.S (boot_drive_check): New label.
17572         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
17573         macro.
17575         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
17576         which do not pass a boot drive correctly. Copied from GRUB Legacy.
17578 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17580         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
17581         When turning off Gate A20, skip the check and return immediately,
17582         because this is not fatal usually.
17584 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17586         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
17587         be 0x7C00 instead of 0x8000.
17589         * boot/i386/pc/pxeboot.S: Rewritten.
17591         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
17592         EXT_C.
17593         (gate_a20_check_state): Read a byte from 0x108000. Invert the
17594         result.
17596 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
17598         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
17599         robustness. This routine now supports a BIOS call and System
17600         Control Port A to modify the gate A20.
17602         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17603         Increased to 0x440.
17605 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
17607         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
17608         device path and resulting ihandle.
17609         (grub_ofdisk_close): dprintf the ihandle being closed.
17610         (grub_ofdisk_read): dprintf function parameters.
17611         * kern/mm.c (grub_mm_init_region): Likewise.
17612         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
17613         (grub_linux_boot): dprintf the Linux entry point, initrd address and
17614         size, and boot arguments.
17615         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
17616         before loading into memory.
17617         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
17618         before loading into memory.
17620 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
17622         * kern/mm.c: Added much documentation.
17623         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
17624         8, set to 5 instead of 8.
17626 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17628         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
17630         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
17631         (grub_mkdevicemap_SOURCES): New variable.
17633         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
17634         lib/device.c of GRUB Legacy.
17636 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17638         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
17639         instead of PATH is NULL.
17641 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
17643         * commands/cmp.c (BUFFER_SIZE): New macro.
17644         (grub_cmd_cmp): Close the right file at the right time.  Compare
17645         only data just read.  Don't report files of different  size as
17646         identical.  Dynamically allocate buffers.  Move variable
17647         declarations at the beginning of function.
17649 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
17651         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
17652         reverse.
17654 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
17656         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
17657         when backspace is pressed at beginning of line.
17659 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
17661         * DISTLIST: Added genfslist.sh.
17663         * normal/main.c (fs_module_list): New variable.
17664         (autoload_fs_module): New function.
17665         (read_fs_list): Likewise.
17666         (grub_normal_execute): Call read_fs_list.
17668         * kern/fs.c (grub_fs_autoload_hook): New variable.
17669         (grub_fs_probe): Added support for auto-loading.
17671         * include/grub/normal.h (struct grub_fs_module_list): New struct.
17672         (grub_fs_module_list_t): New type.
17674         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
17675         (grub_fs_autoload_hook): New prototype.
17677         * genfslist.sh: New file.
17679         * genmk.rb: Added a rule to generate a filesystem list.
17681 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
17683         * configure.ac: Fix the test for cross-compiling.
17685         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
17686         define GRUB_UTIL anymore.
17688         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
17689         so this function works on other systems than just big endian.
17690         (load_modules): Likewise.
17691         (add_segments): Likewise.
17693 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
17695         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
17696         contains `l' modifier, get a long from va_arg().
17698 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
17700         * kern/mm.c (grub_free): If the next free block which is being
17701         merged is the first free block, set the first block to the block
17702         being freed.
17703         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
17705 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17707         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
17708         `grub_ieee1275_chosen'.
17710 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17712         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
17713         (grub_ieee1275_chosen): New variable.
17714         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
17715         `chosen'.
17716         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
17717         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17718         Rename first argument to `phandle' for consistency.
17719         (grub_ieee1275_get_property_length): Likewise.
17720         (grub_ieee1275_next_property): Likewise.  Change type of first argument
17721         to grub_ieee1275_phandle_t.
17722         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
17723         Move export next to declaration.
17724         (grub_ieee1275_chosen): New variable.
17725         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
17726         Correct cosmetic typo.
17727         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
17728         `grub_ieee1275_chosen'.
17729         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
17730         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
17731         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
17732         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
17733         `grub_ieee1275_chosen'.
17735 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
17737         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
17738         /chosen/bootargs.
17739         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
17740         /chosen/bootargs as "variable=value" pairs.
17742 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
17744         * include/grub/misc.h (grub_dprintf): New macro.
17745         (grub_real_dprintf): New prototype.
17746         (grub_strword): Likewise.
17747         (grub_iswordseparator): Likewise.
17748         * kern/misc.c (grub_real_dprintf): New function.
17749         (grub_strword): Likewise.
17750         (grub_iswordseparator): Likewise.
17752 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
17754         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
17755         (roundup): Remove macro.
17756         (grub_ieee1275_flags): Make static.
17757         (grub_ieee1275_realmode): Remove.
17758         (grub_ieee1275_test_flag): New function.
17759         (grub_ieee1275_set_flag): Likewise.
17760         (find_options): Rename to `grub_ieee1275_find_options'; update
17761         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
17762         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
17763         (cmain): New prototype.
17764         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
17765         `grub_ieee1275_flags' directly.
17766         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
17767         machine/biosdisk.h.
17768         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
17769         Don't include grub/machine/init.h.
17770         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
17771         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17772         Remove prototype.
17773         (grub_ieee1275_realmode): Likewise.
17774         (grub_ieee1275_flag): New enum.
17775         (grub_ieee1275_test_flag): New prototype.
17776         (grub_ieee1275_set_flag): New prototype.
17777         * include/grub/powerpc/ieee1275/init.h: Remove file.
17778         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
17779         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
17780         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
17781         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
17782         comment.
17783         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
17784         `grub_ieee1275_test_flag'.
17785         (grub_ieee1275_encode_devname): Likewise.
17787 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
17789         * include/grub/powerpc/ieee1275/ieee1275.h
17790         (grub_ieee1275_encode_devname): New prototype.
17791         (grub_ieee1275_get_filename): Likewise.
17792         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
17793         function.
17794         (grub_set_prefix): Likewise.
17795         (grub_machine_init): Call grub_set_prefix.
17796         * kern/powerpc/ieee1275/openfw.c: Fix typos.
17797         (grub_parse_type): New enum.
17798         (grub_ieee1275_get_devargs): New function.
17799         (grub_ieee1275_get_devname): Likewise.
17800         (grub_ieee1275_parse_args): Likewise.
17801         (grub_ieee1275_get_filename): Likewise.
17802         (grub_ieee1275_encode_devname): Likewise.
17804 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
17806         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
17807         `grub_loader_unset'.
17809 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
17811         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
17812         instead of grub_ieee1275_interpret.
17813         (grub_halt_init): New function.
17814         (grub_halt_fini): Likewise.
17815         (GRUB_MOD_INIT): Correct message grammar.
17816         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
17817         instead of grub_ieee1275_interpret.
17818         (grub_reboot_init): New function.
17819         (grub_reboot_fini): Likewise.
17820         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
17821         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
17822         util/i386/pc/misc.c with commands/ieee1275/halt.c,
17823         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
17824         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
17825         function.
17826         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
17827         Add prototype.
17828         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
17829         prototype.
17830         (grub_halt): Likewise.
17831         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
17832         (cmain): Remove __attribute__((unused)).
17833         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
17834         (grub_heap_len): Likewise.
17835         (grub_machine_fini): New function.
17836         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
17837         (grub_halt): Likewise.
17838         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
17839         function.
17840         * util/powerpc/ieee1275/misc.c: New file.
17842 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
17844         * DISTLIST: New file.
17845         * gendistlist.sh: Likewise.
17847         * Makefile.in (COMMON_DISTFILES): Removed.
17848         (BOOT_DISTFILES): Likewise.
17849         (CONF_DISTFILES): Likewise.
17850         (DISK_DISTFILES): Likewise.
17851         (FS_DISTFILES): Likewise.
17852         (INCLUDE_DISTFILES): Likewise.
17853         (KERN_DISTFILES): Likewise.
17854         (LOADER_DISTFILES): Likewise.
17855         (TERM_DISTFILES): Likewise.
17856         (UTIL_DISTFILES): Likewise.
17857         (DISTFILES): Likewise.
17858         (uninstall): Uninstall files in $(pkgdata_DATA).
17859         (DISTLIST): New target.
17860         (distdir): Use the contents of the file DISTLIST to get a list of
17861         distributed files.
17863 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
17865         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
17866         descriptor. This is ported from GRUB Legacy.
17868         * gencmdlist.sh: Added an extra semicolon to make it work with
17869         old sed versions. Reported by Robert Bihlmeyer
17870         <robbe@orcus.priv.at>.
17872 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
17874         Automatic loading of commands is supported.
17876         * normal/main.c (read_command_list): New function.
17877         (grub_normal_execute): Call read_command_list.
17879         * normal/command.c (grub_register_command): Return zero or CMD.
17880         Allocate CMD->NAME from the heap.
17881         Initialize CMD->MODULE_NAME to zero.
17882         Find the same name as well. If the same command is found and it is
17883         a dummy command, overwrite members. If it is not a dummy command,
17884         return zero.
17885         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
17886         (grub_command_find): If a dummy command is found, load a module
17887         and retry to find a command only once.
17889         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
17890         make sure that each command is loaded.
17892         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
17893         macro.
17894         (struct grub_command): Remove const from the member `name'.
17895         Add a new member `module_name'.
17896         (grub_register_command): Return grub_command_t.
17898         * commands/help.c (grub_cmd_help): Call grub_command_find to make
17899         sure that each command is loaded.
17901         * genmk.rb (PModule::rule): Specify a module name without the
17902         suffix ".mod" to gencmdlist.sh.
17904 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17906         * gencmdlist.sh: New file.
17908         * genmk.rb (PModule::rule): Generate a rule for a command list.
17909         Clean command.lst.
17910         Generate command.lst from $(COMMANDFILES).
17912         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
17913         (DATA): Added $(pkgdata_DATA).
17914         (install-local): Install files in $(pkgdata_DATA).
17916 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
17918         * term/i386/pc/vga.c (debug_command): Removed.
17919         (GRUB_MOD_INIT): Do not register the command "debug".
17921         From Hollis Blanchard:
17922         * commands/configfile.c: New file.
17923         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17924         commands/configfile.c.
17925         (pkgdata_MODULES): Added configfile.mod.
17926         (configfile_mod_SOURCES): New variable.
17927         (configfile_mod_CFLAGS): Likewise.
17928         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17929         commands/configfile.c.
17930         (pkgdata_MODULES): Added configfile.mod.
17931         (configfile_mod_SOURCES): New variable.
17932         (configfile_mod_CFLAGS): Likewise.
17933         * util/grub-emu.c (main): Call grub_configfile_init and
17934         grub_configfile_fini.
17935         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
17936         prototype.
17937         [GRUB_UTIL] (grub_configfile_fini): Likewise.
17939 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17941         * normal/arg.c (grub_arg_show_help): Do not show the bug report
17942         address.
17944         * commands/help.c (grub_cmd_help): Do not print newlines after
17945         the last command in print_command_help.
17947 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
17949         * commands/default.h: New file.
17950         * commands/timeout.h: Likewise.
17951         * normal/context.c: Likewise.
17953         * util/misc.c: Do not include sys/times.h.
17954         Include sys/time.h and grub/machine/time.h.
17955         (grub_get_rtc): Rewritten with gettimeofday.
17957         * util/grub-emu.c (main): Call grub_default_init and
17958         grub_timeout_init before grub_normal_init, and call
17959         grub_timeout_fini and grub_default_fini after grub_main.
17961         * util/console.c (grub_ncurses_checkkey): Return the read
17962         character or -1.
17964         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
17965         timeouts.
17967         * normal/main.c (read_config_file): Push MENU. If this fails,
17968         print an error and wait for a user input.
17969         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
17970         If a menu is empty or an error occurs, pop MENU.
17971         (grub_normal_execute): Pop and free MENU after grub_menu_run
17972         returns.
17974         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
17976         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
17977         include time.h.
17978         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17979         without GRUB_UTIL.
17980         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
17981         time.h.
17982         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17983         without GRUB_UTIL.
17985         * include/grub/normal.h (struct grub_menu_list): New struct.
17986         (grub_menu_list_t): New type.
17987         (struct grub_context): New struct.
17988         (grub_context_t): New type.
17989         (grub_register_command): Got rid of EXPORT_FUNC.
17990         (grub_unregister_command): Likewise.
17991         (grub_context_get): New prototype.
17992         (grub_context_get_current_menu): Likewise.
17993         (grub_context_push_menu): Likewise.
17994         (grub_context_pop_menu): Likewise.
17995         [GRUB_UTIL] (grub_default_init): Likewise.
17996         [GRUB_UTIL] (grub_default_fini): Likewise.
17997         [GRUB_UTIL] (grub_timeout_init): Likewise.
17998         [GRUB_UTIL] (grub_timeout_fini): Likewise.
18000         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
18001         commands/timeout.c and normal/context.c.
18002         (pkgdata_MODULES): Added default.mod and timeout.mod.
18003         (normal_mod_SOURCES): Added normal/context.c.
18004         (default_mod_SOURCES): New variable.
18005         (default_mod_CFLAGS): Likewise.
18006         (timeout_mod_SOURCES): Likewise.
18007         (timeout_mod_CFLAGS): Likewise.
18008         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
18009         conf/i386-pc.rmk.
18010         (pkgdata_MODULES): Added default.mod and timeout.mod.
18011         (normal_mod_SOURCES): Added normal/context.c.
18012         (default_mod_SOURCES): New variable.
18013         (default_mod_CFLAGS): Likewise.
18014         (timeout_mod_SOURCES): Likewise.
18015         (timeout_mod_CFLAGS): Likewise.
18017         * Makefile.in (all-local): Added $(MKFILES).
18019 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
18021         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
18022         (grub_emu_SOURCES): Likewise.
18023         (pkgdata_MODULES): Add `sun.mod'.
18024         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18025         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18026         `partmap/sun.c'.
18027         (pkgdata_MODULES): Add `sun.mod'.
18028         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18029         * include/grub/partition.h (grub_sun_partition_map_init): New
18030         prototype.
18031         (grub_sun_partition_map_fini): Likewise.
18032         * partmap/sun.c: New file.
18033         * util/grub-emu.c (main): Initialize and de-initialize the sun
18034         partitionmap support.
18036 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
18038         This implements an Emacs-like menu entry editor.
18040         * normal/menu_entry.c: New file.
18042         * util/console.c (grub_ncurses_putchar): Translate some Unicode
18043         characters to ASCII.
18044         (saved_char): New variable.
18045         (grub_ncurses_checkkey): Rewritten completely.
18046         (grub_ncurses_getkey): Likewise.
18047         (grub_ncurses_init): Call raw instead of cbreak.
18049         * normal/menu.c (print_entry): Do not put a space.
18050         (init_page): Renamed to ...
18051         (grub_menu_init_page): ... this. All callers changed.
18052         (edit_menu_entry): Removed.
18053         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
18055         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
18057         * kern/misc.c (grub_vprintf): Call grub_refresh.
18059         * normal/menu.c (DISP_LEFT): Renamed to ...
18060         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
18061         * normal/menu.c (DISP_UP): Renamed to ...
18062         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
18063         * normal/menu.c (DISP_RIGHT): Renamed to ...
18064         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
18065         * normal/menu.c (DISP_DOWN): Renamed to ...
18066         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
18067         * normal/menu.c (DISP_HLINE): Renamed to ...
18068         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
18069         * normal/menu.c (DISP_VLINE): Renamed to ...
18070         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
18071         * normal/menu.c (DISP_UL): Renamed to ...
18072         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
18073         * normal/menu.c (DISP_UR): Renamed to ...
18074         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
18075         * normal/menu.c (DISP_LL): Renamed to ...
18076         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
18077         * normal/menu.c (DISP_LR): Renamed to ...
18078         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
18079         * normal/menu.c (TERM_WIDTH): Renamed to ...
18080         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
18081         * normal/menu.c (TERM_HEIGHT): Renamed to ...
18082         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
18083         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
18084         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
18085         * normal/menu.c (TERM_MARGIN): Renamed to ...
18086         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
18087         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
18088         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
18089         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
18090         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
18091         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
18092         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
18093         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
18094         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
18095         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
18096         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
18097         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
18098         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
18099         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
18100         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
18101         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
18102         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
18103         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
18104         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
18105         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
18106         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
18107         All callers changed.
18109         * include/grub/normal.h: New prototype.
18111         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18112         normal/menu_entry.c.
18113         (normal_mod_SOURCES): Likewise.
18114         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
18115         (normal_mod_SOURCES): Likewise.
18117 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
18119         * include/grub/normal.h (grub_halt_init): New prototype.
18120         (grub_halt_fini): Likewise.
18121         (grub_reboot_init): Likewise.
18122         (grub_reboot_fini): Likewise.
18124         * util/grub-emu.c: Include signal.h.
18125         (main_env): New global variable.
18126         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
18127         catch C-c.
18128         (grub_machine_fini): New function.
18129         (main): Call grub_halt_init and grub_reboot_init before
18130         grub_main, and grub_reboot_fini and grub_halt_fini after it.
18131         Call setjmp with MAIN_ENV to go back afterwards.
18132         Call grub_machine_fini right before return.
18134         * include/grub/util/misc.h: Include setjmp.h.
18135         (main_env): New prototype.
18137         * include/grub/kernel.h (grub_machine_fini): New prototype.
18138         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
18139         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
18141         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
18142         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
18143         * term/i386/pc/console.c (grub_console_fini): Likewise.
18145         * util/i386/pc/misc.c: New file.
18147         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18148         util/i386/pc/misc.c, commands/i386/pc/halt.c and
18149         commands/i386/pc/reboot.c.
18151 2005-02-14  Guillem Jover  <guillem@hadrons.org>
18153         * include/grub/dl.h (grub_dl_check_header): New prototype.
18154         (grub_arch_dl_check_header): Change return type to grub_err_t,
18155         remove size parameter and export function.  Update all callers.
18156         * kern/dl.c (grub_dl_check_header): New function.
18157         (grub_dl_load_core): Use `grub_dl_check_header' instead of
18158         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
18159         are inside the core.
18160         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
18161         independent ELF header checks.
18162         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18163         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
18164         `grub_dl_check_header' instead of explicit checks.  Check for the
18165         ELF type.
18166         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
18167         `grub_dl_check_header' instead of explicit checks.  Remove arch
18168         specific ELF header checks.
18170         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
18171         argument SIZE.
18173 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
18175         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
18176         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
18178 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
18180         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
18181         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
18182         (part_map_iterate): Clear `grub_errno' and return 0 if
18183         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
18184         * partmap/amiga.c (amiga_partition_map_iterate): Return
18185         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
18186         * partmap/apple.c (apple_partition_map_iterate): Likewise.
18188 2005-02-01  Guillem Jover  <guillem@hadrons.org>
18190         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
18191         help info.
18193 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
18195         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
18196         Removed prototype.
18197         (grub_rescue_cmd_linux): New prototype.
18198         (grub_rescue_cmd_initrd): Likewise.
18199         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
18200         `bi_rec'.
18201         (grub_linux_release_mem): Release the memory for the initrd.
18202         (grub_load_linux): Renamed from this...
18203         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
18204         Changed `entry' not to be static.  Loop over memory regions to
18205         find another one when the default fails.
18206         (grub_rescue_cmd_initrd): New function.
18207         (grub_linux_init): Remove function.
18208         (grub_linux_fini): Likewise.
18209         (GRUB_MOD_INIT): Register `initrd'.
18210         (GRUB_MOD_FINI): Unregister `initrd'.
18211         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
18212         Function removed.
18213         (grub_linux_normal_fini): Likewise.
18214         (GRUB_MOD_INIT): Register `initrd'.
18215         (GRUB_MOD_FINI): Unregister `initrd'.
18217 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
18219         * commands/help.c: New file.
18220         * normal/arg.c (show_help): Renamed to...
18221         (grub_arg_show_help): ... this.
18222         * commands/i386/pc/halt.c: New file.
18223         * commands/i386/pc/reboot.c: Likewise.
18224         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
18225         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
18226         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
18227         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
18228         variables.
18229         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18230         `commands/help.c'.
18231         (pkgdata_MODULES): Add `help.mod'.
18232         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
18233         * grub/i386/pc/init.h (grub_reboot): New prototype.
18234         (grub_halt): Likewise.
18235         * include/grub/normal.h (grub_arg_show_help): New prototype.
18236         (grub_help_init): Likewise.
18237         (grub_help_fini): Likewise.
18238         * util/grub-emu.c (main): Initialize and deinitialize the help
18239         command.
18241         * normal/cmdline.c (grub_cmdline_get): Doc fix.
18243         * normal/command.c (grub_command_init): Fixed the description of
18244         the `set' and `unset' commands.
18246 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
18248         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
18249         function.
18250         * commands/ieee1275/halt.c: New file.
18251         * commands/ieee1275/reboot.c: Likewise.
18252         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
18253         `__attribute__ ((unused))'.  Some GCS related fixed.
18254         (grub_suspend_init) [GRUB_UTIL]: Function removed.
18255         (grub_suspend_fini): Likewise.
18256         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
18257         and `halt.mod'.
18258         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
18259         (halt_mod_CFLAGS): New variables.
18260         * include/grub/powerpc/ieee1275/ieee1275.h
18261         (grub_ieee1275_interpret): New prototype.
18263 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
18265         * include/grub/misc.h (memmove): New prototype.
18266         (memcpy): Likewise.
18268 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
18270         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
18271         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
18273 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
18275         * kern/misc.c (grub_strndup): Function rewritten.
18277 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
18279         * normal/menu.c (TERM_WIDTH): Macro redefined.
18280         (TERM_TOP_BORDER_Y): Likewise.
18281         (draw_border): Replaced while-loop by a for-loop.  Make the number
18282         of lines consistent with the number of lines displayed in
18283         print_entries.  Added a margin below the rectangle.
18284         (print_entry): Make the entry fit in the rectangle.
18285         (print_entries): Display the scroll arrows next to the right
18286         border.
18288 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
18290         * fs/minix.c (grub_minix_find_file): Reserve more space for
18291         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
18292         `grub_strncpy' to copy `path' into it.
18294 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
18296         Add the loopback device, a device via which files can be accessed
18297         as devices.
18299         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
18300         (pkgdata_MODULES): Add loopback.mod.
18301         (loopback_mod_SOURCES): New variable.
18302         (loopback_mod_CFLAGS): Likewise.
18303         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18304         `disk/loopback.c'.
18305         (pkgdata_MODULES): Add loopback.mod.
18306         (loopback_mod_SOURCES): New variable.
18307         (loopback_mod_CFLAGS): Likewise.
18308         * disk/loopback.c: new file.
18309         * include/grub/normal.h (grub_loop_init): New prototype.
18310         (grub_loop_fini): New prototype.
18311         * util/grub-emu.c (main): Initialize and de-initialize loopback
18312         support.
18313         * include/grub/disk.h (grub_disk_dev_id): Add
18314         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
18316 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
18318         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
18319         function.
18320         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
18321         (suspend_mod_SOURCES): New variable.
18322         (suspend_mod_CFLAGS): Likewise.
18323         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
18324         New prototype.
18325         * commands/ieee1275/suspend.c: New file.
18327 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
18329         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
18330         ((unused))' to `__attribute__ ((used))'.
18331         (GRUB_MOD_FINI): Likewise.
18332         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
18333         * genmk.rb (PModule): Assign space to common symbols when linking
18334         modules.
18336 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
18338         * include/grub/mm.h (grub_mm_init_region): Change the type of the
18339         `unsigned' arguments to `grub_size_t'.
18340         (grub_malloc): Likewise.
18341         (grub_realloc): Likewise.
18342         (grub_memalign): Likewise.
18343         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
18344         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18345         * util/misc.c (grub_malloc): Likewise.
18346         (grub_realloc): Likewise.
18347         * kern/mm.c (get_header_from_pointer): Change the casts to
18348         `unsigned' into a cast to `grub_size_t'.
18350         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
18351         point to `currnode' when `currnode' is changed.
18353         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
18354         Schottelius <nico-linux@schottelius.org>.
18356 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
18358         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
18359         (note_path): Remove variable.
18360         (GRUB_IEEE1275_NOTE_NAME): New macro.
18361         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
18362         (grub_ieee1275_note_hdr): New structure.
18363         (grub_ieee1275_note_desc): Likewise.
18364         (grub_ieee1275_note): Likewise.
18365         (load_note): Remove `dir' argument.  All callers updated.  Remove
18366         `note_img' and `path'.  Do not load a file from `note_path'.
18367         Initialize a struct grub_ieee1275_note and write that to `out'.
18368         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
18370 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
18372         * util/misc.c (grub_util_read_image): Revert last change.  It
18373         called `grub_util_read_at', which seeks from the beginning of the
18374         file.
18376 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
18378         * TODO: Add note about endianness in grub-mkimage.
18379         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
18380         section.
18381         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
18382         (grub_mkimage_SOURCES): New target.
18383         * include/grub/kernel.h (grub_start_addr): Remove variable.
18384         (grub_end_addr): Likewise.
18385         (grub_total_module_size): Likewise.
18386         (grub_kernel_image_size): Likewise.
18387         (GRUB_MODULE_MAGIC): New constant.
18388         (grub_module_info): New structure.
18389         (grub_arch_modules_addr): New prototype.
18390         (grub_get_end_addr): Remove prototype.
18391         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
18392         * include/grub/powerpc/ieee1275/kernel.h: New file.
18393         * include/grub/util/misc.h (grub_util_get_fp_size): New
18394         prototype.
18395         (grub_util_read_at): Likewise.
18396         (grub_util_write_image_at): Likewise.
18397         * kern/main.c (grub_get_end_addr): Remove function.
18398         (grub_load_modules): Call grub_arch_modules_addr instead of using
18399         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
18400         the grub_module_info fields instead of calling grub_get_end_addr
18401         as loop conditions.  Move grub_add_unused_region code here.
18402         (grub_add_unused_region): Remove function.
18403         * kern/i386/pc/init.c: Include grub/cache.h.
18404         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
18405         one call to add_mem_region.
18406         (grub_arch_modules_addr): New function.
18407         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
18408         (grub_total_module_size): Likewise.
18409         Include grub/machine/kernel.h.
18410         (grub_arch_modules_addr): New function.
18411         * util/grub-emu.c (grub_end_addr): Remove variable.
18412         (grub_total_module_size): Likewise.
18413         (grub_arch_modules_addr): New function.
18414         * util/misc.c: Include unistd.h.
18415         (grub_util_get_fp_size): New function.
18416         (grub_util_read_at): Likewise.
18417         (grub_util_write_image_at): Likewise.
18418         (grub_util_read_image): Call grub_util_read_at.
18419         (grub_util_write_image): Call grub_util_write_image_at.
18420         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
18421         additional memory in kernel_img for a struct grub_module_info.
18422         Fill in that grub_module_info.
18423         * util/powerpc/ieee1275/grub-mkimage.c: New file.
18425 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18427         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
18428         New function.
18429         * include/grub/powerpc/ieee1275/ieee1275.h
18430         (grub_ieee1275_milliseconds): New prototype.
18431         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
18432         Change to 1000.
18433         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
18434         grub_ieee1275_milliseconds.
18436 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18438         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
18439         variable.
18440         (find_options): New function.
18441         (cmain): Call find_options.
18442         * include/grub/powerpc/ieee1275/ieee1275.h
18443         (grub_ieee1275_realmode): New extern variable.
18444         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
18445         grub_map if grub_ieee1275_realmode is false.
18447 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
18449         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
18450         lines are inserted and make it work like readline.  Reported by
18451         Vincent Pelletier <subdino2004@yahoo.fr>.
18453 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
18455         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
18457         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
18458         `kern/powerpc/cache.S'.
18460 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
18462         * genmk.rb: Handle the `Program' class in the main loop.  Written
18463         by Johan Rydberg <jrydberg@gnu.org>.
18464         (Program): New class.
18465         (programs): New variable.
18466         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
18467         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
18468         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
18469         (help_arch): Function removed.
18470         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
18471         `powerpc/libgcc.h' and `loader.h'.
18472         (pkgdata_PROGRAMS): New variable.
18473         (sbin_UTILITIES): Variable removed.
18474         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
18475         (grubof_SOURCES): Variable re-defined so it only includes the
18476         core functionality.
18477         (grubof_CFLAGS): Remove `-DGRUBOF'.
18478         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
18479         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
18480         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
18481         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
18482         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
18483         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
18484         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
18485         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
18486         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
18487         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
18488         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
18489         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
18490         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
18491         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
18492         (pc_mod_CFLAGS): New variables.
18493         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
18494         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
18495         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
18496         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
18497         Moved from here...
18498         * include/grub/i386/pc/init.h (grub_os_area_addr)
18499         (rub_os_area_size): ... to here.
18500         * include/grub/powerpc/ieee1275/ieee1275.h
18501         (grub_ieee1275_entry_fn): Export symbol.
18502         * include/grub/powerpc/ieee1275/init.h: New file.
18503         * include/grub/powerpc/libgcc.h: Likewise.
18504         * include/grub/cache.h: Likewise.
18505         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
18506         <hollis@penguinppc.org>.
18507         * kern/dl.c: Include <grub/cache.h>.
18508         (grub_dl_flush_cache): New function.
18509         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
18510         for this module.
18511         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
18512         (grub_console_init): Removed prototypes.
18513         (grub_machine_init): Don't initialize the modules anymore.
18514         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
18515         static.
18516         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
18517         Macro undef removed.
18518         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
18519         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
18520         relocation `R_PPC_REL32'.  Return an error when the relocation is
18521         unknown.
18522         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
18523         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
18524         * util/misc.c (grub_arch_sync_caches): Likewise.
18526 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
18528         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
18529         `symlist.c', add `grubof_symlist.c'.
18530         (symlist.c): Variable removed.
18531         (grubof_HEADERS): Variable added.
18532         (grubof_symlist.c): New target.
18533         (kernel_syms.lst): Use `grubof_HEADERS' instead of
18534         `kernel_img_HEADERS'.
18535         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
18536         * kern/powerpc/dl.c: New file.
18537         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
18538         Function removed.
18539         (grub_arch_dl_relocate_symbols): Likewise.
18540         (grub_register_exported_symbols): Likewise.
18542 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
18544         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
18545         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
18546         to fail instead.  Reported by Vincent Pelletier
18547         <subdino2004@yahoo.fr>.
18549         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
18550         it is not allocated.  Reported by Vincent Pelletier
18551         <subdino2004@yahoo.fr>.
18553         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
18554         output so the output looks better.
18556 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
18558         Modulize the partition map support and add support for the amiga
18559         partition map.
18561         * commands/ls.c: Include <grub/partition.h> instead of
18562         <grub/machine/partition.h>.
18563         * kern/disk.c: Likewise.
18564         * kern/rescue.c: Likewise.
18565         * loader/i386/pc/chainloader.c: Likewise.
18566         * normal/cmdline.c: Likewise.
18567         * kern/powerpc/ieee1275/init.c: Likewise.
18568         (grub_machine_init): Call `grub_pc_partition_map_init',
18569         `grub_amiga_partition_map_init' and
18570         `grub_apple_partition_map_init'.
18571         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
18572         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
18573         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
18574         `partition.h' and `pc_partition.h'.
18575         (grub_setup_SOURCES): Remove
18576         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
18577         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18578         (grub_emu_SOURCES): Likewise.
18579         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
18580         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
18581         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
18582         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18583         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
18584         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18585         (grubof_SOURCES): Likewise.
18586         * disk/i386/pc/partition.c: File removed.
18587         * disk/powerpc/ieee1275/partition.c: Likewise.
18588         * include/grub/powerpc/ieee1275/partition.h: Likewise.
18589         * include/grub/i386/pc/partition.h: Likewise.
18590         * kern/partition.c: New file.
18591         * partmap/amiga.c: Likewise.
18592         * partmap/apple.c: Likewise.
18593         * partmap/pc.c: Likewise.
18594         * include/grub/partition.h: Likewise..
18595         * include/grub/pc_partition.h: Likewise.
18596         * util/grub-emu.c: Include <grub/partition.h> instead of
18597         <grub/machine/partition.h>.
18598         (main): Call `grub_pc_partition_map_init',
18599         `grub_amiga_partition_map_init' and
18600         `grub_apple_partition_map_init' and deinitialize afterwards.
18601         * util/i386/pc/biosdisk.c: Include `#include
18602         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18603         `<grub/machine/partition.h>'.
18604         * util/i386/pc/grub-setup.c: Likewise.
18605         * util/i386/pc/biosdisk.c: Likewise.
18606         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
18607         partition information in case of a PC partition.
18608         * util/i386/pc/grub-setup.c: Include `#include
18609         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18610         `<grub/machine/partition.h>'.
18611         (setup): Only access the PC specific partition information in case
18612         of a PC partition.
18614 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
18616         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
18617         (grub_longjmp): Likewise.
18618         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
18619         20.
18620         * normal/powerpc/setjmp.S: New file.
18621         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18622         `normal/powerpc/setjmp.S'.
18623         (grubof_CFLAGS): Add `-DGRUBOF'.
18624         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
18625         [GRUB_UTIL && !GRUBOF].
18627 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
18629         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
18630         property named `name'.  Correctly handle the error returned by
18631         `grub_ieee1275_finddevice' if a device can not be opened.
18633 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
18635         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
18636         `actual' for negativity.
18637         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18638         kern/fshelp.c.
18640 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18642         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
18643         (PAGE_OFFSET): New macro.
18644         (CRTC_ADDR_PORT): Likewise.
18645         (CRTC_DATA_PORT): Likewise.
18646         (START_ADDR_HIGH_REGISTER): Likewise.
18647         (START_ADDR_LOW_REGISTER): Likewise.
18648         (GRAPHICS_ADDR_PORT): Likewise.
18649         (GRAPHICS_DATA_PORT): Likewise.
18650         (READ_MAP_REGISTER): Likewise.
18651         (INPUT_STATUS1_REGISTER): Likewise.
18652         (INPUT_STATUS1_VERTR_BIT): Likewise.
18653         (page): New variable.
18654         (wait_vretrace): New function.
18655         (set_read_map): Likewise.
18656         (set_start_address): Likewise.
18657         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
18658         the right page.
18659         (check_vga_mem): Take the page into account.
18660         (write_char): Likewise.
18661         (write_cursor): Likewise.
18662         (scroll_up): Likewise.  Copy the page to the page that is not
18663         shown and switch between both pages.
18664         (grub_vga_putchar): Fix off by one error.
18665         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
18666         account.
18668 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18670         Add support for iso9660 (including rockridge).
18672         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18673         (iso9660_mod_SOURCES): New variable.
18674         (iso9660_mod_CFLAGS): Likewise.
18675         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18676         * include/grub/fs.h (grub_iso9660_init): New prototype.
18677         * util/grub-emu.c (main): Call `grub_iso9660_init'.
18678         * fs/iso9660.c: New file.
18680         * include/grub/misc.h (grub_strncat): New prototype.
18681         * kern/misc.c (grub_strncat): New function.
18683         * fs/hfs.c (grub_hfs_mount): Translate the error
18684         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
18685         * fs/jfs.c (grub_jfs_mount): Likewise.
18686         * fs/ufs.c (grub_ufs_mount): Likewise.
18688 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
18690         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
18691         which initialized BAT registers.
18692         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
18693         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18694         Move from here...
18695         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
18696         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18697         ... to here.
18698         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
18699         (grub_mapclaim): Likewise.
18700         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
18701         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
18702         hand.
18704 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
18706         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
18707         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
18708         -ffreestanding and -msoft-float.
18710 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
18712         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
18713         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
18714         set in grub_ieee1275_flags.
18716 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
18718         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
18719         prototype.
18720         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
18721         grub_console_init first.
18722         Change the memory range used for grub_ieee1275_claim and
18723         grub_mm_init_region.
18724         Print an error message if the claim fails.
18725         Include <grub/misc.h>.
18727 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
18729         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
18730         Call grub_children_iterate for device nodes of type `scsi',
18731         `ide', or `ata'.
18732         (grub_ofdisk_open): Remove manual device alias resolution.
18733         Fix memory leak when device cannot be opened.
18734         * include/grub/powerpc/ieee1275/ieee1275.h
18735         (grub_children_iterate): New prototype.
18736         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
18737         New function.
18738         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18739         Return -1 if args.size was -1.
18741 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18743         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
18744         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
18745         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
18746         Open Firmware's memory for it; claim memory from _start to _end.
18747         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
18748         (_end): New extern.
18749         (_start): Zero BSS from __bss_start to _end.
18750         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18751         New extern.
18752         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
18754 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18756         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
18757         -1 if args.base was -1.
18759 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
18761         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
18762         escape sequence instead of a literal ^L. Also call
18763         grub_ofconsole_gotoxy.
18765 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
18767         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
18768         void *  arguments to grub_addr_t.  All callers updated.  Also make
18769         the `result' argument optional.
18770         (grub_ieee1275_release): change void * arguments to grub_addr_t.
18771         All callers updated.
18773 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
18775         * commands/ls.c (grub_ls_list_files): Use the string following the
18776         initial ')', if present, as the filesystem path.
18777         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
18779         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
18781 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
18783         Make the source code of the menu interface more readable.
18785         * normal/menu.c: Include grub/mm.h.
18786         (TERM_WIDTH): New macro.
18787         (TERM_HEIGHT): Likewise.
18788         (TERM_INFO_HEIGHT): Likewise.
18789         (TERM_MARGIN): Likewise.
18790         (TERM_SCROLL_WIDTH): Likewise.
18791         (TERM_TOP_BORDER_Y): Likewise.
18792         (TERM_LEFT_BORDER_X): Likewise.
18793         (TERM_BORDER_WIDTH): Likewise.
18794         (TERM_MESSAGE_HEIGHT): Likewise.
18795         (TERM_BORDER_HEIGHT): Likewise.
18796         (TERM_NUM_ENTRIES): Likewise.
18797         (TERM_FIRST_ENTRY_Y): Likewise.
18798         (TERM_ENTRY_WIDTH): Likewise.
18799         (TERM_CURSOR_X): Likewise.
18800         (draw_border): Use macros instead of magic numbers.
18801         (print_entry): Likewise.
18802         (print_entries): Likewise.
18803         (run_menu): Likewise. Also, handle the key 'e'.
18804         (run_menu_entry): Ignore empty command lines.
18805         (print_message): Added a new argument EDIT. If EDIT is true,
18806         print a different message.
18807         (init_page): Likewise.
18808         (edit_menu_entry): New function. Not implemented yet.
18810 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
18812         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
18813         can be loaded from normal mode.
18815         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
18816         `multiboot.mod'.
18817         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
18818         (multiboot_mod_CFLAGS): New variables.
18819         * loader/i386/pc/linux_normal.c: New file.
18820         * loader/i386/pc/multiboot_normal.c: Likewise.
18822         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
18823         attribute `unused'.
18825         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
18826         `fdiro' to read the mode information from instead of `diro'.
18828         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
18829         looking up a symlink.
18831         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
18832         macro.
18833         * normal/command.c (grub_command_execute): Don't parse the
18834         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
18835         flags of the command.
18837         * normal/menu.c (grub_menu_run): Fix typo.
18839 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
18841         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
18843         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
18844         `y + 1' instead of `y - 1'.
18846         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
18848 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
18850         From Hollis Blanchard <hollis@penguinppc.org>:
18851         * kern/misc.c (memmove): New alias for grub_memmove.
18852         (memcmp): New alias for grub_memcmp.
18853         (memset): New alias for grub_memset.
18854         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18855         Change "int handle" to "grub_ieee1275_phandle_t handle".
18856         * include/grub/powerpc/ieee1275/ieee1275.h
18857         (grub_ieee1275_get_property): Likewise.
18859 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
18861         Added normal mode command `chainloader' as module chain.mod, which
18862         depends on normal.mod and _chain.mod.
18864         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
18865         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
18866         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
18867         Deleted prototype.
18868         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
18869         but arguments parsing moved to ...
18870         (grub_chainloader_cmd): ... here.  New function.
18871         * include/grub/i386/pc/chainloader.h: New file.
18872         * loader/i386/pc/chainloader_normal.c: Likewise.
18874 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
18876         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
18877         (grub_mkimage_LDFLAGS): Likewise.
18878         (grub_emu_SOURCES): Likewise.
18879         (kernel_img_HEADERS): Added fshelp.h.
18880         * fs/ext2.c: Include <grub/fshelp.h>.
18881         (FILETYPE_REG): New macro.
18882         (FILETYPE_INO_REG): Likewise.
18883         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
18884         Changed all users.
18885         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
18886         all users.
18887         (grub_fshelp_node): New struct.
18888         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
18889         to a pointer.
18890         (grub_ext2_get_file_block): Removed function.
18891         (grub_ext2_read_block): New function.
18892         (grub_ext2_read_file): Replaced parameter `data' by `node'.
18893         This function was written.
18894         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
18895         (grub_ext2_find_file): Removed function.
18896         (grub_ext2_read_symlink): New function.
18897         (grub_ext2_iterate_dir): Likewise.
18898         (grub_ext2_open): Rewritten.
18899         (grub_ext2_dir): Rewritten.
18900         * include/grub/fshelp.h: New file.
18901         * fs/fshelp.c: Likewise.
18903 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
18905         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
18906         (print_message): Add a missing newline.
18907         (run_menu): Added timeout support.
18908         (run_menu_entry): New local function.
18909         (grub_menu_run): Added support for booting.
18911         * kern/loader.c (grub_loader_is_loaded): New function.
18913         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
18914         (grub_get_rtc): Exported.
18916         * include/grub/i386/pc/time.h: Include grub/symbol.h.
18917         (grub_get_rtc): Exported.
18919         * include/grub/normal.h (struct grub_command_list): Remove
18920         constant from the member `command'.
18922         * include/grub/loader.h (grub_loader_is_loaded): Declared.
18924         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
18926         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
18928 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
18930         Add support for the JFS filesystem.
18932         * fs/jfs.c: New file.
18933         * include/grub/fs.h (grub_jfs_init): New prototype.
18934         (grub_jfs_fini): New prototype.
18935         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
18936         (grub_emu_SOURCES): Likewise.
18937         (pkgdata_MODULES): Add jfs.mod.
18938         (jfs_mod_SOURCES): New variable.
18939         (jfs_mod_CFLAGS): Likewise.
18940         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
18941         (grubof_SOURCES): Likewise.
18942         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
18944         * fs/fat.c (grub_fat_find_dir): Convert the filename little
18945         endian to the host endian.
18946         (grub_fat_utf16_to_utf8): Move function from there...
18947         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
18948         the endianness of the source string anymore.
18949         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
18951 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
18953         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
18954         (grub_boot_fini) [GRUB_UTIL]: Likewise.
18955         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
18956         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
18958         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
18959         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
18960         for `node_found' and `it_dir'.
18961         (grub_hfs_dir): Add prototype for `dir_hook'.
18963         * fs/minix.c (grub_minix_get_file_block): Add prototype for
18964         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
18965         and `indir32' to silence a gcc warning.
18967         * include/grub/fs.h (grub_hfs_init): New prototype.
18968         (grub_hfs_fini): Likewise.
18971 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
18973         Each disk device has its own id now. This is useful to make use
18974         of multiple disk devices.
18976         * include/grub/disk.h (grub_disk_dev_id): New enum.
18977         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
18978         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
18980         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
18981         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18983         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
18984         GRUB_DISK_DEVICE_OFDISK_ID as an id.
18986         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
18987         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18989         * include/grub/disk.h (struct grub_disk_dev): Added a new member
18990         "id" which is used by the cache manager.
18992         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
18993         of just "GRUB".
18995 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
18997         * fs/hfs.c: New file.
18998         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
18999         (grub_emu_SOURCES): Likewise.
19000         (pkgdata_MODULES): Add hfs.mod.
19001         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
19002         (grubof_SOURCES): Likewise.
19003         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
19005         * include/grub/misc.h (grub_strncasecmp): Add prototype.
19006         * kern/misc.c (grub_strncasecmp): Add function.
19008 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
19010         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
19011         with parentheses.
19013         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
19014         (grub_ext2_dir): In case the directory entry type is unknown, read
19015         it from the inode.
19017 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
19019         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
19020         grub_load_linux instead of grub_rescue_cmd_linux as second
19021         argument of grub_rescue_register_command.
19023         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
19025 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
19027         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
19028         function.
19029         * commands/boot.c: Remove the check for `GRUB_UTIL'.
19030         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19031         `loader/powerpc/ieee1275/linux.c',
19032         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
19033         * include/grub/powerpc/ieee1275/ieee1275.h
19034         (grub_ieee1275_release): New prototype.
19035         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
19036         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
19037         normal, boot, linux and linux_normal.
19038         * loader/powerpc/ieee1275/linux.c: New file.
19039         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
19041 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
19043         * normal/arg.c (grub_arg_parse): Correct error handling after
19044         reallocating the argumentlist (check if `argl' is not null instead
19045         of checking if `args' is not null).
19046         * kern/mm.c (grub_realloc): Return the same pointer when using the
19047         same region, instead of returning the header address.
19049 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
19051         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
19052         one block instead of two when looking for the initial partition.
19053         (grub_partition_probe): Initialize the local variable `p' with 0.
19054         Use base 10 for the grub_strtoul call.
19055         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
19056         need for one local variable.
19057         (grub_strtoul): Don't add the new value to `num', instead of that
19058         just assign it.
19060 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
19062         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
19063         (pxeboot_img_SOURCES): New variable.
19064         (pxeboot_img_ASFLAGS): Likewise.
19065         (pxeboot_img_LDFLAGS): Likewise.
19066         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
19067         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
19068         <lode_leroy@hotmail.com>.
19070 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
19072         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
19073         there was no input.
19075 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
19077         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
19078         the history buffer logic.
19080 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
19082         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
19083         (FILETYPE_INO_SYMLINK): New macros.
19084         (grub_ext2_find_file): Check if the node is a directory using the
19085         inode stat information instead of using the filetype in the
19086         dirent.  Exclude the first character of an absolute symlink.
19087         (grub_ext2_dir): Mask out the filetype part of the mode member of
19088         the inode.
19090 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
19092         Add support for UFS version 1 and 2.  Add support for the minix
19093         filesystem version 1 and 2, both the variants with 14 and 30 long
19094         filenames.
19096         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
19097         fs/minix.c.
19098         (grub_emu_SOURCES): Likewise.
19099         (pkgdata_MODULES): Add ufs.mod and minix.mod.
19100         (ufs_mod_SOURCES): New variable.
19101         (ufs_mod_CFLAGS): Likewise.
19102         (minix_mod_SOURCES): Likewise.
19103         (minix_mod_CFLAGS): Likewise.
19104         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
19105         fs/minix.c.
19106         (grubof_SOURCES): Likewise.
19107         * fs/ufs.c: New file.
19108         * fs/minix.c: New file.
19109         * include/grub/fs.h (grub_ufs_init): New prototype.
19110         (grub_ufs_fini): Likewise.
19111         (grub_minix_init): Likewise.
19112         (grub_minix_fini): Likewise.
19113         * util/grub-emu.c (main): Initialize and deinitialize UFS and
19114         minix fs.
19116 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
19118         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
19119         commands/ls.c, commands/terminal.c, commands/boot.c,
19120         commands/cmp.c and commands/cat.c.
19121         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
19123         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
19124         "env.h"
19126 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
19128         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
19129         and grub_, respectively. Because the conversion is trivial and
19130         mechanical, I omit the details here. Please refer to the CVS
19131         if you need more information.
19133 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
19135         * include/pupa: Renamed to ...
19136         * include/grub: ... this.
19137         * util/i386/pc/pupa-mkimage.c: Renamed to ...
19138         * util/i386/pc/grub-mkimage.c: ... this.
19139         * util/i386/pc/pupa-setup.c: Renamed to ...
19140         * util/i386/pc/grub-setup.c: ... this.
19141         * util/pupa-emu.c: Renamed to ...
19142         * util/grub-emu.c: ... this.
19144 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
19146         Add support for the newworld apple macintosh (PPC).  This has been
19147         tested on the powerbook 2000 only.  It only adds support for
19148         generic ieee1275 functions, console and disk support.  This should
19149         be easy to port to other architectures with support for Open
19150         Firmware.
19152         * configure.ac: Accept the powerpc as host_cpu.  In the case of
19153         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
19154         specific tests are only executed while building for the i386.
19155         Inverse test for crosscompile.
19156         * genmk.rb (Utility): Allow assembler files.
19157         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
19158         * conf/powerpc-ieee1275.rmk: New file.
19159         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
19160         * disk/powerpc/ieee1275/partition.c: Likewise.
19161         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
19162         * include/pupa/powerpc/ieee1275/console.h: Likewise.
19163         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
19164         * include/pupa/powerpc/ieee1275/time.h: Likewise.
19165         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
19166         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
19167         * include/pupa/powerpc/ieee1275/loader.h
19168         * include/pupa/powerpc/setjmp.h: Likewise.
19169         * include/pupa/powerpc/types.h: Likewise.
19170         * kern/powerpc/ieee1275/init.c: Likewise.
19171         * kern/powerpc/ieee1275/openfw.c: Likewise.
19172         * term/powerpc/ieee1275/ofconsole.c: Likewise.
19174         These files were written by Johan Rydberg
19175         (jrydberg@night.trouble.net) and I only modified them slightly.
19177         * boot/powerpc/ieee1275/cmain.c: New file.
19178         * boot/powerpc/ieee1275/crt0.S: Likewise.
19179         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
19180         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
19182 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
19184         * Makefile.in: Update copyright.
19185         * genmodsrc.sh: Likewise.
19186         * gensymlist.sh: Likewise.
19187         * term/i386/pc/vga.c: Indent correctly.
19189         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
19190         bugreporting address.
19191         * util/i386/pc/pupa-setup.c (usage): Likewise,
19192         (main): Call pupa_ext2_init and pupa_ext2_fini.
19194         * fs/fat.c (log2): Renamed to ...
19195         (fat_log2): ... this.
19196         All callers changed.
19197         * kern/misc.c (memcpy): Alias to pupa_memmove.
19198         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
19199         lvalue cast.
19200         * util/console.c (pupa_ncurses_fini): Return 0.
19202         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
19203         Move fail label here.
19204         [__GNU__]: Don't warn when using stat.
19205         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
19206         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
19207         long int. Use strtol instead of strtoul.
19209 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
19211         * commands/boot.c: New file.
19212         * commands/cat.c: Likewise.
19213         * commands/cmp.c: Likewise.
19214         * commands/ls.c: Likewise.
19215         * commands/terminal.c: Likewise.
19216         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
19217         (pupa_register_command): Changed interface to match the new
19218         argument parser.
19219         (pupa_command_execute): Changed (almost rewritten) so it uses
19220         pupa_split_command.  Added support for setting variables using the
19221         syntax `foo=bar'.
19222         (rescue_command): Changed to work with the new argument parser.
19223         (terminal_command): Moved from here to commands/terminal.c.
19224         (set_command): New function.
19225         (unset_command): New function.
19226         (insmod_command): New function.
19227         (rmmod_command): New function.
19228         (lsmod_command): New function.
19229         (pupa_command_init): Don't initialize the command terminal
19230         anymore.  Initialize the commands set, unset, insmod, rmmod and
19231         lsmod.
19232         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
19233         (kernel_img_HEADERS): Add arg.h and env.h.
19234         (pupa_mkimage_LDFLAGS): Add kern/env.c.
19235         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
19236         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
19237         normal/arg.c.
19238         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
19239         terminal.mod.
19240         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
19241         (boot_mod_SOURCES): New variable.
19242         (terminal_mod_SOURCES): Likewise.
19243         (ls_mod_SOURCES): Likewise.
19244         (cmp_mod_SOURCES): Likewise.
19245         (cat_mod_SOURCES): Likewise.
19247         * normal/arg.c: New file.
19248         * kern/env.c: Likewise.
19249         * include/pupa/arg.h: Likewise.
19250         * include/pupa/env.h: Likewise.
19251         * font/manager.c (font_command): Changed to match argument parsing
19252         interface changes.
19253         (PUPA_MOD_INIT): Likewise.
19254         * hello/hello.c (pupa_cmd_hello): Likewise.
19255         (PUPA_MOD_INIT): Likewise.
19256         * include/pupa/disk.h: Include <pupa/device.h>.
19257         (pupa_print_partinfo): New prototype.
19258         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
19259         (pupa_dl_get_prefix): Likewise.
19260         * include/pupa/misc.h: Include <pupa/err.h>.
19261         (pupa_isgraph): New prototype.
19262         (pupa_isdigit): Likewise.
19263         (pupa_split_cmdline): Likewise.
19264         * include/pupa/normal.h: Include <pupa/arg.h>.
19265         (pupa_command): Changed the prototype of the member `func' to
19266         match the argument parsing interface.  Added member `options'.
19267         (pupa_register_command): Updated to match function.
19268         (pupa_arg_parse): New prototype.
19269         (pupa_hello_init) [PUPA_UTIL]: New prototype.
19270         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
19271         (pupa_ls_init) [PUPA_UTIL]: Likewise.
19272         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
19273         (pupa_cat_init) [PUPA_UTIL]: Likewise.
19274         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
19275         (pupa_boot_init) [PUPA_UTIL]: Likewise.
19276         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
19277         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
19278         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
19279         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
19280         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
19281         * kern/disk.c: Include <pupa/file.h>.
19282         (pupa_print_partinfo): New function.
19283         * kern/dl.c: Include <pupa/env.h>.
19284         (pupa_dl_dir): Variable removed.
19285         (pupa_dl_load): Use the environment variable `prefix' instead of
19286         the variable pupa_dl_dir.
19287         (pupa_dl_set_prefix): Function removed.
19288         (pupa_dl_get_prefix): Likewise.
19289         * kern/i386/pc/init.c: Include <pupa/env.h>.
19290         (pupa_machine_init): Use the environment variable `prefix' instead of
19291         using pupa_dl_set_prefix to set the prefix.
19292         * kern/main.c: Include <pupa/env.h>.
19293         (pupa_set_root_dev): Use the environment variable `prefix' instead of
19294         using pupa_dl_get_prefix to get the prefix.
19295         * kern/misc.c: Include <pupa/env.h>.
19296         (pupa_isdigit): New function.
19297         (pupa_isgraph): Likewise.
19298         (pupa_ftoa): Likewise.
19299         (pupa_vsprintf): Added support for printing values of the type
19300         `double'.  Make it possible to format variable output when using
19301         formatting like `%1.2%f'.
19302         (pupa_split_cmdline): New function.
19303         * kern/rescue.c: Include <pupa/env.h>.
19304         (next_word): Removed function.
19305         (pupa_rescue_cmd_prefix): Likewise.
19306         (pupa_rescue_cmd_set): New function.
19307         (pupa_rescue_cmd_unset): New function.
19308         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
19309         split the command line instead of splitting it here.  Added
19310         support for setting variables using the syntax `foo=bar'.  Don't
19311         initialize the prefix command anymore.  Initialized the set and
19312         unset commands.
19313         * normal/cmdline.c: Include <pupa/env.h>.
19314         (pupa_tab_complete): Added prototypes for print_simple_completion,
19315         print_partition_completion, add_completion, iterate_commands,
19316         iterate_dev, iterate_part and iterate_dir. Moved code to print
19317         partition information from here to kern/disk.c.
19318         (pupa_cmdline_run): Don't check if the function exists anymore.
19319         * normal/main.c: Include <pupa/env.h>.
19320         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
19321         instead of using pupa_dl_get_prefix to get the prefix.
19322         * term/i386/pc/vga.c: Include <pupa/arg.h>.
19323         (check_vga_mem): Cast pointers to `void *' to silence a gcc
19324         warning.
19325         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
19326         (pupa_vga_setcolor): Declare unused variables with `__attribute__
19327         ((unused))' to silence a gcc warning.
19328         (pupa_vga_setcolor): Likewise.
19329         (debug_command): Changed to match argument parsing
19330         interface changes.
19331         * util/pupa-emu.c: Include <pupa/env.h>.
19332         (options): Added 0's for unused fields to silence a gcc warning.
19333         (argp): Likewise.
19334         (main): Use the environment variable `prefix' instead of using
19335         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
19336         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
19337         and terminal.
19339         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
19340         * util/misc.c: Include <malloc.h>.
19341         (pupa_malloc): Rewritten so errors are correctly reported.
19342         (pupa_realloc): Likewise.
19343         (pupa_memalign): Likewise.
19344         (pupa_mm_init_region): Declare unused variables with
19345         `__attribute__ ((unused))' to silence a gcc warning.
19346         * normal/i386/setjmp.S: Remove tab at the end of the file to
19347         silence a gcc warning.
19348         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
19349         variables with `__attribute__ ((unused))' to silence a gcc
19350         warning.
19351         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
19352         local variable i unsigned to silence a gcc warning.
19354         * kern/term.c: Include <pupa/misc.h>.
19355         (pupa_more_lines): New variable.
19356         (pupa_more): Likewise.
19357         (pupa_putcode): When the pager is active pause at the end of every
19358         screen.
19359         (pupa_set_more): New function.
19360         * include/pupa/term.h (pupa_set_more): New prototype.
19363 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
19365         Now this project is GRUB 2 rather than PUPA. The location of
19366         the CVS repository was moved to GRUB's.
19368         * configure.ac: Use bug-grub as the reporting address.
19369         Use GRUB instead of PUPA.
19370         Change the version number to 1.90.
19372 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
19374         * genkernsyms.sh: Updated copyright information.
19375         * genmk.rb: Likewise.
19376         * genmodsrc.sh: Likewise.
19377         * gensymlist.sh: Likewise.
19378         * boot/i386/pc/boot.S: Likewise.
19379         * boot/i386/pc/diskboot.S: Likewise.
19380         * disk/i386/pc/biosdisk.c: Likewise.
19381         * disk/i386/pc/partition.c: Likewise.
19382         * font/manager.c: Likewise.
19383         * fs/ext2.c: Likewise.
19384         * fs/fat.c: Likewise.
19385         * include/pupa/boot.h: Likewise.
19386         * include/pupa/device.h: Likewise.
19387         * include/pupa/disk.h: Likewise.
19388         * include/pupa/dl.h: Likewise.
19389         * include/pupa/elf.h: Likewise.
19390         * include/pupa/err.h: Likewise.
19391         * include/pupa/file.h: Likewise.
19392         * include/pupa/font.h: Likewise.
19393         * include/pupa/fs.h: Likewise.
19394         * include/pupa/kernel.h: Likewise.
19395         * include/pupa/loader.h: Likewise.
19396         * include/pupa/misc.h: Likewise.
19397         * include/pupa/mm.h: Likewise.
19398         * include/pupa/net.h: Likewise.
19399         * include/pupa/normal.h: Likewise.
19400         * include/pupa/rescue.h: Likewise.
19401         * include/pupa/setjmp.h: Likewise.
19402         * include/pupa/symbol.h: Likewise.
19403         * include/pupa/term.h: Likewise.
19404         * include/pupa/types.h: Likewise.
19405         * include/pupa/i386/setjmp.h: Likewise.
19406         * include/pupa/i386/types.h: Likewise.
19407         * include/pupa/i386/pc/biosdisk.h: Likewise.
19408         * include/pupa/i386/pc/boot.h: Likewise.
19409         * include/pupa/i386/pc/console.h: Likewise.
19410         * include/pupa/i386/pc/init.h: Likewise.
19411         * include/pupa/i386/pc/kernel.h: Likewise.
19412         * include/pupa/i386/pc/linux.h: Likewise.
19413         * include/pupa/i386/pc/loader.h: Likewise.
19414         * include/pupa/i386/pc/memory.h: Likewise.
19415         * include/pupa/i386/pc/multiboot.h: Likewise.
19416         * include/pupa/i386/pc/partition.h: Likewise.
19417         * include/pupa/i386/pc/time.h: Likewise.
19418         * include/pupa/i386/pc/vga.h: Likewise.
19419         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
19420         * include/pupa/util/getroot.h: Likewise.
19421         * include/pupa/util/misc.h: Likewise.
19422         * include/pupa/util/resolve.h: Likewise.
19423         * kern/device.c: Likewise.
19424         * kern/disk.c: Likewise.
19425         * kern/dl.c: Likewise.
19426         * kern/err.c: Likewise.
19427         * kern/file.c: Likewise.
19428         * kern/fs.c: Likewise.
19429         * kern/loader.c: Likewise.
19430         * kern/main.c: Likewise.
19431         * kern/misc.c: Likewise.
19432         * kern/mm.c: Likewise.
19433         * kern/rescue.c: Likewise.
19434         * kern/term.c: Likewise.
19435         * kern/i386/dl.c: Likewise.
19436         * kern/i386/pc/init.c: Likewise.
19437         * kern/i386/pc/lzo1x.S: Likewise.
19438         * kern/i386/pc/startup.S: Likewise.
19439         * loader/i386/pc/chainloader.c: Likewise.
19440         * loader/i386/pc/linux.c: Likewise.
19441         * loader/i386/pc/multiboot.c: Likewise.
19442         * normal/cmdline.c: Likewise.
19443         * normal/command.c: Likewise.
19444         * normal/main.c: Likewise.
19445         * normal/menu.c: Likewise.
19446         * normal/i386/setjmp.S: Likewise.
19447         * term/i386/pc/console.c: Likewise.
19448         * term/i386/pc/vga.c: Likewise.
19449         * util/console.c: Likewise.
19450         * util/genmoddep.c: Likewise.
19451         * util/misc.c: Likewise.
19452         * util/pupa-emu.c: Likewise.
19453         * util/resolve.c: Likewise.
19454         * util/unifont2pff.rb: Likewise.
19455         * util/i386/pc/biosdisk.c: Likewise.
19456         * util/i386/pc/getroot.c: Likewise.
19457         * util/i386/pc/pupa-mkimage.c: Likewise.
19458         * util/i386/pc/pupa-setup.c: Likewise.
19460 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
19462         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
19463         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
19464         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
19465         reading and reset it after reading.
19466         (pupa_ext2_close): Return PUPA_ERR_NONE.
19468         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
19469         Correct value.
19470         (struct linux_kernel_header): Add kernel_version and
19471         initrd_addr_max.
19472         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
19473         pupa_file_read succeeds.
19474         (pupa_rescue_cmd_initrd): Implement.
19476 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
19478         * fs/ext2.c (pupa_ext2_label): New function.
19479         (pupa_ext2_fs): Added label.
19480         * fs/fat.c (pupa_fat_label): New function.
19481         (pupa_fat_fs): Added label.
19482         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
19484         * kern/misc.c (pupa_strndup): New function.
19485         * include/pupa/misc.h (pupa_strndup): New prototype.
19487         * include/pupa/normal.h: Include <pupa/err.h>.
19488         (pupa_set_history): New prototype.
19489         (pupa_iterate_commands): New prototype.
19490         * normal/cmdline.c: Include <pupa/machine/partition.h>,
19491         <pupa/disk.h>, <pupa/file.h>.
19492         (hist_size): New variable.
19493         (hist_lines): Likewise.
19494         (hist_end): Likewise.
19495         (hist_used): Likewise.
19496         (pupa_set_history): New function.
19497         (pupa_history_get): Likewise.
19498         (pupa_history_add): Likewise.
19499         (pupa_history_replace): Likewise.
19500         (pupa_tab_complete): Likewise.
19501         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
19502         completion shows partitionnames while completing partitions, this
19503         feature was suggested by Jeff Bailey.
19504         * normal/command.c (pupa_iterate_commands): New function.
19505         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
19506         (pupa_normal_init): Initialize history buffer.
19507         (PUPA_MOD_INIT): Likewise.
19508         (pupa_normal_fini): Free the history buffer.
19509         (PUPA_MOD_FINI): Likewise.
19511         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
19512         key.
19514         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
19515         * configure.ac [i386]: Check for regparam bug.
19516         (NESTED_FUNC_ATTR) [! i386]: Defined.
19518 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
19520         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
19521         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
19522         (pupa_emu_SOURCES): New variable.
19523         (pupa_emu_LDFLAGS): Likewise.
19524         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
19525         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
19526         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
19527         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19528         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
19529         (pupa_jmp_buf): New typedef.
19530         (pupa_setjmp) [PUPA_UTIL]: New macro.
19531         (pupa_longjmp) [PUPA_UTIL]: Likewise.
19532         * include/pupa/term.h (struct pupa_term): New member `refresh'.
19533         (pupa_refresh): New prototype.
19534         * include/pupa/util/getroot.h: New file.
19535         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
19536         it.
19537         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
19538         (pupa_rescue_cmd_cat): Likewise.
19539         (pupa_rescue_cmd_ls): Likewise.
19540         (pupa_rescue_cmd_testload): Likewise.
19541         (pupa_rescue_cmd_lsmod): Likewise.
19542         * normal/cmdline.c (pupa_cmdline_get): Likewise.
19543         * normal/menu.c (run_menu): Likewise.
19544         * kern/term.c (pupa_cls): Likewise.
19545         (pupa_refresh): New function.
19546         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
19547         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19548         * util/console.c: New file.
19550         * util/i386/pc/getroot.c: New file.
19551         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
19552         (pupa_putchar): New function.
19553         (pupa_refresh): Likewise.
19554         (xgetcwd): Function moved to ...
19555         (strip_extra_slashes): Likewise.
19556         (get_prefix): Likewise.
19557         * util/i386/pc/getroot.c: ... here.
19558         (find_root_device): Function moved and renamed to...
19559         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
19560         Changed all callers.
19561         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
19562         and renamed to...
19563         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
19564         Changed all callers.
19565         * util/misc.c (pupa_memalign): New function.
19566         (pupa_mm_init_region): Likewise.
19567         (pupa_register_exported_symbols): Likewise.
19568         (pupa_putchar): Function removed.
19569         * util/pupa-emu.c: New file.
19571 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
19573         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
19574         (_multiboot_mod_SOURCES): New variable.
19575         (_multiboot_mod_CFLAGS): Likewise.
19576         * loader/i386/pc/multiboot.c: New file.
19577         * include/pupa/i386/pc/multiboot.h: Likewise.
19578         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
19579         (pupa_multiboot_real_boot): New function.
19580         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
19581         (pupa_multiboot_real_boot): New prototype.
19582         (pupa_rescue_cmd_multiboot): Likewise
19583         (pupa_rescue_cmd_module): Likewise.
19585         * kern/loader.c (pupa_loader_set): Continue when
19586         pupa_loader_unload_func() fails.
19587         (pupa_loader_unset): New function.
19588         * include/pupa/loader.h (pupa_loader_unset): New prototype.
19590         * kern/misc.c (pupa_stpcpy): New function.
19591         * include/pupa/misc.h (pupa_stpcpy): New prototype.
19593 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
19595         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
19596         for available extensions.
19598         * include/pupa/i386/pc/time.h: New file.
19599         * kern/disk.c: Include <pupa/machine/time.h>.
19600         (PUPA_CACHE_TIMEOUT): New macro.
19601         (pupa_last_time): New variable.
19602         (pupa_disk_open): Flush the cache when there was a timeout.
19603         (pupa_disk_close): Reset the timer.
19604         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
19605         pupa_currticks.
19606         * util/misc.c: Include <sys/times.h>
19607         (pupa_get_rtc): New function.
19609 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
19611         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
19612         as blocks.
19613         (pupa_ext2_get_file_block): Use blocks member.
19615         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
19616         first block. Return -1 instead of pupa_errno on error.
19618 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
19620         * README: In the pupa-mkimage example use _chain instead of chain
19621         and ext2 instead of fat.
19622         * TODO: Replace ext2fs with jfs as an example.  Add an item for
19623         adding journal playback for ext2fs.
19624         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
19625         (pkgdata_MODULES): Added ext2.mod.
19626         (ext2_mod_SOURCES): New variable.
19627         (ext2_mod_CFLAGS): Likewise.
19628         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
19629         * include/pupa/misc.h (pupa_strncpy): New prototype.
19630         (pupa_strcat): Likewise.
19631         (pupa_strncmp): Likewise.
19632         * kern/misc.c (pupa_strcat): Enable function.
19633         (pupa_strncpy): New function.
19634         (pupa_strncmp): Likewise.
19635         * fs/ext2.c: New file.
19637         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
19638         when the read failed before retrying.
19639         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
19640         (_FILE_OFFSET_BITS): Likewise.
19641         * configure.ac: Added AC_SYS_LARGEFILE.
19643 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19645         * genmk.rb (PModule#rule): Make sure to get only symbol names
19646         from the output of nm.
19647         Reported by Robert Millan <zeratul2@wanadoo.es>.
19649 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19651         I forgot to check in these changes for a long time. This adds
19652         incomplete support for VGA console, and this is still very
19653         buggy. Also, a lot of consideration is required for I18N,
19654         UNICODE, and VGA font issues. Therefore, assume that this is
19655         such that "better than nothing".
19657         * font/manager.c: New file.
19658         * include/pupa/font.h: Likewise.
19659         * include/pupa/i386/pc/vga.h: Likewise.
19660         * term/i386/pc/vga.c: Likewise.
19661         * util/unifont2pff.rb: Likewise.
19663         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
19664         (pkgdata_MODULES): Added vga.mod and font.mod.
19665         (vga_mod_SOURCES): New variables.
19666         (vga_mod_CFLAGS): Likewise.
19667         (font_mod_SOURCES): Likewise.
19668         (font_mod_CFLAGS): Likewise.
19670         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
19672         * include/pupa/term.h: Include pupa/err.h.
19673         (struct pupa_term): Added init and fini.
19674         Changed the argument of putchar to pupa_uint32_t.
19676         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
19677         (pupa_console_real_putchar): New prototype.
19678         (pupa_console_putchar): Removed.
19679         (pupa_console_checkkey): Exported.
19680         (pupa_console_getkey): Likewise.
19682         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
19683         characters.
19685         * kern/term.c (pupa_term_set_current): Rewritten.
19686         (pupa_putchar): Likewise.
19687         (pupa_putcode): New function.
19689         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
19690         (pupa_console_real_putchar): ... this.
19691         (pupa_vga_set_mode): New function.
19692         (pupa_vga_get_font): Likewise.
19694         * normal/command.c: Include pupa/term.h.
19695         (terminal_command): New function.
19696         (pupa_command_init): Register the command "terminal".
19698         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
19699         (DISP_UP): Likewise.
19700         (DISP_RIGHT): Likewise.
19701         (DISP_DOWN): Likewise.
19702         (DISP_HLINE): Likewise.
19703         (DISP_VLINE): Likewise.
19704         (DISP_UL): Likewise.
19705         (DISP_UR): Likewise.
19706         (DISP_LL): Likewise.
19707         (DISP_LR): Likewise.
19709         * term/i386/pc/console.c (pupa_console_putchar): New function.
19711 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
19713         * util/resolve.c (pupa_util_resolve_dependencies): BUG
19714         FIX. Reverse the path_list.
19716         * include/pupa/normal.h: Export pupa_register_command and
19717         pupa_unregister_command.
19719         * hello/hello.c (pupa_cmd_hello): New module.
19720         * conf/i386-pc.rmk: Added hello.mod.
19722 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
19724         * kern/i386/pc/lzo1x.S: New file.
19726         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
19727         (compress_kernel): New variable.
19728         (generate_image): Heavily modified to support compressing a
19729         large part of the core image.
19731         * util/misc.c (pupa_util_read_image): Fix a file descriptor
19732         leak.
19733         (pupa_util_load_image): New function.
19735         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
19736         (pupa_compressed_size): New variable.
19737         (codestart): Enable Gate A20 here.
19738         Decompress the compressed part of the core image.
19739         Rearrange the code to put functions and variables which are
19740         required for initialization in the non-compressed part.
19741         Include lzo1x.S.
19743         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
19744         here.
19746         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
19748         * include/pupa/i386/pc/kernel.h
19749         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
19750         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
19751         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19752         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19753         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
19755         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
19757         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
19758         (Utility#rule): Likewise.
19760         * configure.ac: Check if LZO is available.
19762 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
19764         * include/pupa/normal.h: New file.
19765         * include/pupa/setjmp.h: Likewise.
19766         * include/pupa/i386/setjmp.h: Likewise.
19767         * normal/cmdline.c: Likewise.
19768         * normal/command.c: Likewise.
19769         * normal/main.c: Likewise.
19770         * normal/menu.c: Likewise.
19771         * normal/i386/setjmp.S: Likewise.
19773         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
19774         (pupa_rescue_cmd_initrd): Likewise.
19776         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
19777         Likewise.
19779         * kern/i386/pc/startup.S (translation_table): New variable.
19780         (translate_keycode): New function.
19781         (pupa_console_getkey): Call translate_keycode.
19783         * kern/rescue.c (attempt_normal_mode): New function.
19784         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
19785         it failed, print a message.
19787         * kern/mm.c (pupa_real_malloc): Print more information when a
19788         free magic is broken.
19789         (pupa_free): If the first free header is not free actually, set
19790         it to P.
19792         * kern/main.c (pupa_load_normal_mode): Just load the module
19793         "normal".
19794         (pupa_main): Don't print the message
19795         "Entering into rescue mode..." here.
19797         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
19798         Declared.
19799         (pupa_rescue_cmd_initrd): Likewise.
19800         (pupa_rescue_cmd_initrd): Likewise.
19802         * include/pupa/symbol.h (FUNCTION): Specify the type.
19803         (VARIABLE): Likewise.
19805         * include/pupa/err.h (pupa_err_t): Added
19806         PUPA_ERR_UNKNOWN_COMMAND.
19808         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
19809         (pupa_dl_get_prefix): Likewise.
19811         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
19812         Added _chain.mod and _linux.mod instead of chain.mod and
19813         linux.mod.
19814         (chain_mod_SOURCES): Renamed to ...
19815         (_chain_mod_SOURCES): ... this.
19816         (chain_mod_CFLAGS): Renamed to ...
19817         (_chain_mod_CFLAGS): ... this.
19818         (linux_mod_SOURCES): Renamed to ...
19819         (_linux_mod_SOURCES): ... this.
19820         (linux_mod_CFLAGS): Renamed to ...
19821         (_linux_mod_CFLAGS): ... this.
19822         (normal_mod_SOURCES): New variable.
19823         (normal_mod_CFLAGS): Likewise.
19824         (normal_mod_ASFLAGS): Likewise.
19826 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
19828         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
19829         possible.
19831         * kern/dl.c (pupa_dl_ref): Refer depending modules
19832         recursively.
19833         (pupa_dl_unref): Unrefer depending modules recursively.
19834         Don't call pupa_dl_unload implicitly, because PUPA can crash if
19835         a module is unloaded before one depending on that module is
19836         unloaded.
19837         (pupa_dl_unload): Unload depending modules explicitly,
19838         if possible.
19840 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
19842         * include/pupa/i386/pc/linux.h: New file.
19843         * loader/i386/pc/linux.c: Likewise.
19845         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
19846         Removed.
19847         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
19848         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
19849         of PUPA_CHAINLOADER_BOOT_SECTOR.
19851         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
19852         (pupa_linux_prot_size): New variable.
19853         (pupa_linux_tmp_addr): Likewise.
19854         (pupa_linux_real_addr): Likewise.
19855         (pupa_linux_boot_zimage): New function.
19856         (pupa_linux_boot_bzimage): Likewise.
19858         * kern/i386/pc/init.c (struct mem_region): New structure.
19859         (MAX_REGIONS): New macro.
19860         (mem_regions): New variable.
19861         (num_regions): Likewise.
19862         (pupa_os_area_addr): Likewise.
19863         (pupa_os_area_size): Likewise.
19864         (pupa_lower_mem): Likewise.
19865         (pupa_upper_mem): Likewise.
19866         (add_mem_region): New function.
19867         (compact_mem_regions): Likewise.
19868         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
19869         the size of the conventional memory and that of so-called upper
19870         memory (before the first memory hole).
19871         Instead of adding each found region to free memory, use
19872         add_mem_region and add them after removing overlaps.
19873         Also, add only 1/4 of the upper memory to free memory. The rest
19874         is used for loading OS images. Maybe this is ad hoc, but this
19875         makes it much easier to relocate OS images when booting.
19877         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
19878         (pupa_enter_rescue_mode): Don't register initrd and module.
19880         * kern/mm.c: Include pupa/dl.h.
19882         * kern/main.c: Include pupa/file.h and pupa/device.h.
19884         * kern/loader.c (pupa_loader_load_module_func): Removed.
19885         (pupa_loader_load_module): Likewise.
19887         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
19888         ``.o''.
19890         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
19891         (pupa_linux_tmp_addr): Likewise.
19892         (pupa_linux_real_addr): Likewise.
19893         (pupa_linux_boot_zimage): Likewise.
19894         (pupa_linux_boot_bzimage): Likewise.
19896         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
19897         (pupa_upper_mem): Likewise.
19898         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
19899         module is too dangerous.
19901         * include/pupa/loader.h (pupa_os_area_addr): Declared.
19902         (pupa_os_area_size): Likewise.
19903         (pupa_loader_set): Remove the first argument. Loader doesn't
19904         manage modules or initrd any longer.
19905         (pupa_loader_load_module): Removed.
19907         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
19908         (linux_mod_SOURCES): New variable.
19909         (linux_mod_CFLAGS): Likewise.
19911 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
19913         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
19914         the length of a blocklist correctly.
19916         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
19917         Use ioctl only if the OS file is a block device.
19918         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
19919         not very useful for normal files.
19921         * kern/main.c (pupa_set_root_dev): New function.
19922         (pupa_load_normal_mode): Likewise.
19923         (pupa_main): Call those above.
19925         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
19926         pupa_uint16_t.
19928         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
19930 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
19932         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
19933         (setup): Configure the installed partition information and the
19934         dl prefix.
19936         * loader/i386/pc/chainloader.c (my_mod): New variable.
19937         (pupa_chainloader_unload): New function.
19938         (pupa_rescue_cmd_chainloader): Refer itself.
19939         (PUPA_MOD_INIT): Save its own module in MY_MOD.
19941         * kern/i386/pc/startup.S (install_partition): Removed.
19942         (version_string): Likewise.
19943         (config_file): Likewise.
19944         (pupa_install_dos_part): New variable.
19945         (pupa_install_bsd_part): Likewise.
19946         (pupa_prefix): Likewise.
19947         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
19949         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
19950         and pupa/misc.h.
19951         (make_install_device): New function.
19952         (pupa_machine_init): Set the dl prefix.
19954         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
19955         (buf): Renamed to ...
19956         (linebuf): ... this.
19957         (pupa_rescue_cmd_prefix): New function.
19958         (pupa_rescue_cmd_insmod): Likewise.
19959         (pupa_rescue_cmd_rmmod): Likewise.
19960         (pupa_rescue_cmd_lsmod): Likewise.
19961         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
19962         rmmod and lsmod.
19964         * kern/mm.c (pupa_memalign): If failed even after invalidating
19965         disk caches, unload unneeded modules and retry.
19967         * kern/misc.c (pupa_memmove): New function.
19968         (pupa_memcpy): Removed.
19969         (pupa_strcpy): New function.
19970         (pupa_itoa): Made static.
19972         * kern/dl.c (pupa_dl_iterate): New function.
19973         (pupa_dl_ref): Likewise.
19974         (pupa_dl_unref): Likewise.
19975         (pupa_dl_unload): Return if succeeded or not.
19976         (pupa_dl_unload_unneeded): New function.
19977         (pupa_dl_unload_all): Likewise.
19978         (pupa_dl_init): Renamed to ...
19979         (pupa_dl_set_prefix): ... this.
19980         (pupa_dl_get_prefix): New function.
19982         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
19983         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
19984         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19985         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19986         (pupa_install_dos_part): Declared.
19987         (pupa_install_bsd_part): Likewise.
19988         (pupa_prefix): Likewise.
19989         (pupa_boot_drive): Likewise.
19991         * include/pupa/types.h: Fix a typo.
19993         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
19994         pupa_memmove.
19995         (pupa_memmove): Declared.
19996         (pupa_strcpy): Likewise.
19998         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
19999         pupa_mod_init takes one argument, its own module.
20000         (pupa_dl_unload_unneeded): Declared.
20001         (pupa_dl_unload_all): Likewise.
20002         (pupa_dl_ref): Likewise.
20003         (pupa_dl_unref): Likewise.
20004         (pupa_dl_iterate): Likewise.
20005         (pupa_dl_init): Renamed to ...
20006         (pupa_dl_set_prefix): ... this.
20007         (pupa_dl_get_prefix): Declared.
20009         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
20010         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
20011         unloaded.
20012         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
20013         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
20015         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
20016         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
20018 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
20020         * util/i386/pc/pupa-setup.c (setup): Define the internal
20021         function find_first_partition_start at the top level, because GCC
20022         3.0.x cannot compile internal functions in deeper scopes
20023         correctly.
20024         (find_root_device): Use lstat instead of stat.
20025         Don't follow symbolic links.
20026         Fix the path-constructing code.
20028         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
20029         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
20030         by a BLKGETSIZE ioctl first, because block devices don't fill
20031         the member st_mode of the structure stat on Linux.
20032         [__linux__] (linux_find_partition): Use a temporary buffer
20033         REAL_DEV for the working space. Copy it to DEV before returning.
20034         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
20035         buffer cache consistent.
20036         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
20037         strncmp. The previous value was merely wrong.
20038         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
20040         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
20041         FAT size is 12. The previous value was merely wrong.
20043         * kern/main.c (pupa_main): Don't split the starting message from
20044         newlines.
20046         * kern/term.c (pupa_putchar): Put CR after LF instead of before
20047         LF, because BIOS goes crazy about character attributes in this
20048         case.
20050 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
20052         * include/i386/pc/util/biosdisk.h: New file.
20053         * util/i386/pc/biosdisk.c: Likewise.
20054         * util/i386/pc/pupa-setup.c: Likewise.
20056         * Makefile.in (INCLUDE_DISTFILES): Added
20057         include/pupa/i386/pc/util/biosdisk.h.
20058         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
20059         directory util/i386/pc.
20060         (install-local): Added a rule for sbin_UTILITIES.
20061         (uninstall): Likewise.
20063         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
20065         * util/misc.c (xrealloc): New function.
20066         (pupa_malloc): Likewise.
20067         (pupa_free): Likewise.
20068         (pupa_realloc): Likewise.
20069         (pupa_stop): Likewise.
20070         (pupa_putchar): Likewise.
20072         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
20074         * include/pupa/util/misc.h (xrealloc): Declared.
20076         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
20077         macro.
20078         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
20079         (PUPA_BOOT_MACHINE_BPB_END): ... this.
20081         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
20082         [PUPA_UTIL] (pupa_fat_fini): Likewise.
20084         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
20085         way should be implemented.
20086         [PUPA_UTIL] (pupa_fat_fini): Likewise.
20088         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
20089         the size of NAME for safety.
20090         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
20091         0x88.
20093         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
20094         (pupa_setup_SOURCES): Likewise.
20096         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
20098 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
20100         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
20101         bunch of pushl's from pusha, because this destroys the return
20102         value.
20104 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
20106         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
20107         This means that any missing prototypes could be fatal. Also, you
20108         must take care when writing assembly code. See the comments at
20109         the beginning of startup.S, for more details.
20111         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
20112         compilation mechanism.
20113         (pupa_chainloader_real_boot): Likewise.
20114         (pupa_biosdisk_rw_int13_extensions): Likewise.
20115         (pupa_biosdisk_rw_standard): Likewise.
20116         (pupa_biosdisk_check_int13_extensions): Likewise.
20117         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
20118         (pupa_biosdisk_get_diskinfo_standard): Likewise.
20119         (pupa_get_memsize): Likewise.
20120         (pupa_get_mmap_entry): Likewise.
20121         (pupa_console_putchar): Likewise.
20122         (pupa_console_setcursor): Likewise.
20123         (pupa_getrtsecs): Use pushl instead of push.
20125         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
20126         memory instead of the stack for a mmap entry, because some
20127         BIOSes may ignore the maximum size and overflow.
20129         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
20131         * genmk.rb (PModule#rule): Compile automatically generated
20132         sources with module-specific CFLAGS as well as other sources.
20134 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
20136         * configure.ac: Check ld.
20137         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
20138         respectively, before checking endianness and sizes.
20140         * Makefile.in (LD): New variable.
20142 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
20144         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
20146 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
20148         * Changelog: New file.