2009-11-01 Robert Millan <rmh.grub@aybabtu.com>
[grub2/phcoder/solaris.git] / ChangeLog
blob5a3f80e05d4e2c6dd49bb25e6e91b78c4465cc13
1 2009-11-01  Robert Millan  <rmh.grub@aybabtu.com>
3         Based on patch from BVK Chaitanya  <bvk.groups@gmail.com>
4         * kern/misc.c (grub_strchr, grub_strrchr): Fix to handle c == '\0'
5         case.
7 2009-11-01  Felix Zielcke  <fzielcke@z-51.de>
9         * Makefile.in (TARGET_CPPFLAGS): Add `-I$(srcdir)/include'.
11 2009-10-30  Robert Millan  <rmh.grub@aybabtu.com>
13         Fix build problem.
15         * Makefile.in (TARGET_CPPFLAGS): Replace `-nostdinc' with
16         `-isystem=$(srcdir)/include'.
18 2009-10-30  Robert Millan  <rmh.grub@aybabtu.com>
20         * util/i386/pc/grub-install.in: Remove hint that device.map should be
21         checked (grub-install doesn't currently rely on it).
23 2009-10-29  Robert Millan  <rmh.grub@aybabtu.com>
25         Revert SVN r2660.
27         * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): Moved from here ...
28         * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
29         * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): ... and here.
30         * conf/i386-ieee1275.rmk: Likewise.
31         * conf/i386-pc.rmk: Likewise.
32         * conf/powerpc-ieee1275.rmk: Likewise.
33         * conf/sparc64-ieee1275.rmk: Likewise.
34         * conf/x86_64-efi.rmk: Likewise.
36 2009-10-28  Robert Millan  <rmh.grub@aybabtu.com>
38         * Makefile.in (TARGET_CPPFLAGS): Add `-nostdinc'.
40 2009-10-28  Robert Millan  <rmh.grub@aybabtu.com>
42         * include/grub/misc.h: Stop checking for APPLE_CC.
44 2009-10-28  Robert Millan  <rmh.grub@aybabtu.com>
46         * kern/i386/coreboot/init.c (grub_exit): Reimplement in a way that
47         doesn't cause an infinite call loop.
49 2009-10-28  Felix Zielcke  <fzielcke@z-51.de>
51         * commands/acpi.c (grub_cmd_acpi): Fix the out of memory error
52         strings.
54 2009-10-26  Robert Millan  <rmh.grub@aybabtu.com>
56         * autogen.sh: Support addition of external modules via `GRUB_CONTRIB'
57         variable.
58         * Makefile.in: Likewise.
60 2009-10-26  Robert Millan  <rmh.grub@aybabtu.com>
62         * gendistlist.sh: Simplify .svn check.  Skip .bzr as well.
64 2009-10-26  Robert Millan  <rmh.grub@aybabtu.com>
66         * Makefile.in (RMKFILES): Rewrite using $(wildcard).
68 2009-10-26  Robert Millan  <rmh.grub@aybabtu.com>
70         * disk/scsi.c: Remove `<grub/machine/kernel.h>' (not needed).
72 2009-10-26  Robert Millan  <rmh.grub@aybabtu.com>
74         * gensymlist.sh.in (COMPILE_TIME_ASSERT): Copy macro declaration
75         from here ...
76         * include/grub/misc.h (COMPILE_TIME_ASSERT): ... to here.
78 2009-10-26  Robert Millan  <rmh.grub@aybabtu.com>
80         * Makefile.in (docs/grub.info): Use make syntax to ignore errors
81         in $(MAKEINFO) invocation.  This makes it clear in output that
82         errors are being ignored.
84 2009-10-26  Robert Millan  <rmh.grub@aybabtu.com>
86         * conf/i386-coreboot.rmk (script/sh/lexer.c_DEPENDENCIES): Moved
87         from here ...
88         * conf/common.rmk (script/sh/lexer.c_DEPENDENCIES): ... to here.
89         * conf/i386-efi.rmk (script/sh/lexer.c_DEPENDENCIES): Remove.
90         * conf/i386-ieee1275.rmk: Likewise.
91         * conf/i386-pc.rmk: Likewise.
92         * conf/powerpc-ieee1275.rmk: Likewise.
93         * conf/sparc64-ieee1275.rmk: Likewise.
94         * conf/x86_64-efi.rmk: Likewise.
96 2009-10-26  Colin Watson  <cjwatson@ubuntu.com>
98         * util/grub-editenv.c (main): If only a command is given, use
99         DEFAULT_DIRECTORY "/" GRUB_ENVBLK_DEFCFG as a default file name.
100         (usage): FILENAME is now optional and has a default.
102 2009-10-26  Colin Watson  <cjwatson@ubuntu.com>
104         Improve grub-mkconfig performance when there are several menu
105         entries on a single filesystem.
107         * util/grub.d/10_linux.in (linux_entry): Cache the output of
108         prepare_grub_to_access_device.
109         * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
110         * util/grub.d/30_os-prober.in: Likewise.
112 2009-10-26  Robert Millan  <rmh.grub@aybabtu.com>
114         * util/grub.d/10_freebsd.in: Remove.
115         * util/grub.d/10_kfreebsd.in: New file (based on 10_linux.in).
116         * configure.ac: Set host_kernel=kfreebsd for FreeBSD and GNU/kFreeBSD.
118 2009-10-26  Robert Millan  <rmh.grub@aybabtu.com>
120         * docs/grub.cfg: Fix example usage of *BSD loaders.
122 2009-10-25  Robert Millan  <rmh.grub@aybabtu.com>
124         * util/i386/pc/grub-setup.c (setup): Add missing parameter to
125         grub_util_error() call.
127 2009-10-25  Robert Millan  <rmh.grub@aybabtu.com>
129         * include/grub/fs.h [GRUB_UTIL] (struct grub_fs): Add
130         `reserved_first_sector' member.
131         * fs/ext2.c [GRUB_UTIL] (grub_ext2_fs): Initialize
132         `reserved_first_sector' to 1.
133         * fs/fat.c [GRUB_UTIL] (grub_fat_fs): Likewise.
134         * fs/ntfs.c [GRUB_UTIL] (grub_ntfs_fs): Likewise.
135         * fs/hfsplus.c [GRUB_UTIL] (grub_hfsplus_fs): Likewise.
136         * util/i386/pc/grub-setup.c (setup): Add safety check that probes for
137         filesystems which begin at first sector.
138         (options): New option --skip-fs-probe.
139         (main): Handle --skip-fs-probe and pass it to setup().
141 2009-10-25  Robert Millan  <rmh.grub@aybabtu.com>
143         * include/grub/misc.h: Fix wrong evaluation of APPLE_CC.
144         (memset): Fix function prototype.
146 2009-10-25  Robert Millan  <rmh.grub@aybabtu.com>
147 2009-10-25  Vasily Averin  <vvs@parallels.com>
149         * fs/ext2.c (grub_ext2_iterate_dir): Avoid infinite loop when
150         `dirent.direntlen == 0'.
152 2009-10-25  Robert Millan  <rmh.grub@aybabtu.com>
154         * fs/cpio.c [MODE_USTAR]: Initialize `tar' module instead of
155         `cpio'.
156         [! MODE_USTAR]: Initialize `cpio' module instead of `tar'.
158 2009-10-25  Robert Millan  <rmh.grub@aybabtu.com>
160         * configure.ac: Check for `__ashldi3', `__ashrdi3', `__lshrdi3',
161         `__trampoline_setup' and `__ucmpdi2'.
162         * include/grub/powerpc/libgcc.h: Only export symbols for functions
163         that libgcc provides.
165 2009-10-25  Robert Millan  <rmh.grub@aybabtu.com>
167         * include/grub/powerpc/libgcc.h (memset): Remove function prototype.
168         * include/grub/sparc64/libgcc.h (memset): Likewise.
169         * include/grub/misc.h (memset, memcmp): New function prototypes.
171 2009-10-25  Robert Millan  <rmh.grub@aybabtu.com>
173         * fs/cpio.c [MODE_USTAR]: Finish `tar' module instead of
174         `cpio'.
175         [! MODE_USTAR]: Finish `cpio' module instead of `tar'.
177 2009-10-25  Robert Millan  <rmh.grub@aybabtu.com>
179         Patch from Samuel Thibault <samuel.thibault@ens-lyon.org>
180         * docs/grub.cfg: Compensate for recent change in multiboot
181         loader (since 2009-08-14 it won't pass filename to payload).
182         * util/grub.d/10_hurd.in: Likewise.
184 2009-10-21  Felix Zielcke  <fzielcke@z-51.de>
186         * config.guess: Update to latest version from config git
187         repository.
188         * config.sub: Likewise.
190 2009-10-20  Robert Millan  <rmh.grub@aybabtu.com>
192         Fix build on sparc64.
194         * configure.ac: Perform checks for libgcc symbols before
195         adding `-nostdlib' to LDFLAGS.
197 2009-10-16  Vladimir Serbinenko  <phcoder@gmail.com>
199         Let user specify OpenBSD root device.
201         * loader/i386/bsd.c (openbsd_root): New variable.
202         (openbsd_opts): New option 'root'.
203         (OPENBSD_ROOT_ARG): New macro.
204         (grub_openbsd_boot): Use 'openbsd_root'.
205         (grub_cmd_openbsd): Fill 'openbsd_root'.
207 2009-10-16  Robert Millan  <rmh.grub@aybabtu.com>
209         * NEWS: Misc adjustments.
211 2009-10-16  Vladimir Serbinenko  <phcoder@gmail.com>
213         * NEWS: Mentioned XNU, ACPI, gptsync, password and parttool.
215 2009-10-16  Robert Millan  <rmh.grub@aybabtu.com>
217         * configure.ac: Bump version to 1.97.
219 2009-10-16  Colin Watson  <cjwatson@ubuntu.com>
221         * configure.ac (TARGET_CFLAGS): Add -mno-mmx -mno-sse -mno-sse2
222         -mno-3dnow on x86 architectures.  Some toolchains enable these
223         features by default, but they rely on registers that aren't enabled
224         in GRUB.  Thanks to Vladimir Serbinenko for the suggestion.
226 2009-10-15  Robert Millan  <rmh.grub@aybabtu.com>
228         Make entry text a bit more readable.
230         * util/grub.d/10_linux.in: Add `with' before `Linux'.
232 2009-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
234         * loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image.
236 2009-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
238         * commands/xnu_uuid.c (grub_cmd_xnu_uuid): Remove duplicated bitwise
239         operations.
241 2009-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
243         * configure.ac: Add missing dollar.
245 2009-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
247         Revert 2009-06-10  Pavel Roskin  <proski@gnu.org>
249         * configure.ac: Put checks for __bswapsi2 and __bswapdi2.
250         * include/grub/powerpc/libgcc.h: Don't use weak attribute for all
251         exports.
252         * include/grub/sparc64/libgcc.h: Likewise.  Use
253         preprocessor conditionals.
255 2009-10-14  Robert Millan  <rmh.grub@aybabtu.com>
257         * conf/common.rmk (grub-dumpbios): Remove rule.
258         (sbin_SCRIPTS, CLEANFILES): Remove `grub-dumpbios'.
259         * util/grub-dumpbios.in: Remove file.
261 2009-10-14  Robert Millan  <rmh.grub@aybabtu.com>
263         Refer to kernel of FreeBSD "kFreeBSD" to avoid confusion between
264         the Operating System (FreeBSD) and its kernel (kernel of FreeBSD).
266         * loader/i386/bsd.c (grub_freebsd_boot): Read kernel environment
267         from "kFreeBSD" namespace (rather than "FreeBSD").  Update all
268         users.
270         (GRUB_MOD_INIT (bsd)): Rename "freebsd" command to "kfreebsd",
271         "openbsd" to "kopenbsd", "netbsd" to "knetbsd", "freebsd_loadenv"
272         to "kfreebsd_loadenv", "freebsd_module" to "kfreebsd_module",
273         and "freebsd_module_elf" to "kfreebsd_module_elf".  Update all
274         users.
276 2009-10-12  Robert Millan  <rmh.grub@aybabtu.com>
278         * term/tparm.c: Switch to GPLv3.
280 2009-10-09  Robert Millan  <rmh.grub@aybabtu.com>
282         * include/grub/i386/cpuid.h: Add header protection.
284 2009-10-09  Robert Millan  <rmh.grub@aybabtu.com>
286         Fail gracefuly when attempting to load 64-bit kFreeBSD on IA32 CPU.
288         * include/grub/i386/cpuid.h: New file.
289         * commands/i386/cpuid.c: Include `<grub/i386/cpuid.h>'.
290         (has_longmode): Rename to ...
291         (grub_cpuid_has_longmode): ... this.  Update all users.  Remove
292         `static' attribute.
293         * loader/i386/bsd.c: Include `<grub/i386/cpuid.h>'.
294         (grub_bsd_load_elf): Fail if load of 64-bit kernel was requested
295         on a CPU that doesn't implement AMD64 instruction set.
297 2009-10-06  Colin Watson  <cjwatson@ubuntu.com>
299         * Makefile.in (docs/stamp-vti): Depend on configure.ac as well, so
300         that version.texi is rebuilt on version number changes.
302 2009-10-06  Colin Watson  <cjwatson@ubuntu.com>
304         * Makefile.in: Don't set info_INFOS unless makeinfo was found.
305         Fixes bug #27602.
307 2009-10-06  Colin Watson  <cjwatson@ubuntu.com>
309         * util/i386/pc/grub-install.in: Source
310         ${libdir}/grub/grub-mkconfig_lib before option processing, in order
311         that the --grub-probe option will work.
312         * util/sparc64/ieee1275/grub-install.in: Likewise.
314 2009-10-05  Robert Millan  <rmh.grub@aybabtu.com>
316         * configure.ac: Bump version to 1.97~beta4.
318 2009-10-03  Robert Millan  <rmh.grub@aybabtu.com>
320         Resync grub-mkdevicemap in x86_64-efi.
322         * conf/x86_64-efi.rmk (sbin_UTILITIES): Enable `grub-mkdevicemap'.
323         (grub_mkdevicemap_SOURCES): Add missing `util/deviceiter.c' and
324         `util/devicemap.c'.
326 2009-10-01  Colin Watson  <cjwatson@ubuntu.com>
328         * util/grub-editenv.c (create_envblk_file): Write new block with a
329         .new suffix and then rename it into place, to ensure atomic
330         creation.
332 2009-09-28  Robert Millan  <rmh.grub@aybabtu.com>
334         Do not automatically install headers.
336         * Makefile.in (include_DATA): Remove.  Update all users.
338 2009-09-26  Robert Millan  <rmh.grub@aybabtu.com>
340         * conf/common.rmk (pkglib_MODULES): Remove `lua.mod'.
341         (lua_mod_SOURCES, lua_mod_CFLAGS, lua_mod_LDFLAGS): Remove.
343         * util/osdetect.lua: Remove.
344         * script/lua/lauxlib.c: Likewise.
345         * script/lua/ldebug.c: Likewise.
346         * script/lua/grub_main.c: Likewise.
347         * script/lua/lauxlib.h: Likewise.
348         * script/lua/ldebug.h: Likewise.
349         * script/lua/ltablib.c: Likewise.
350         * script/lua/liolib.c: Likewise.
351         * script/lua/lstrlib.c: Likewise.
352         * script/lua/lualib.h: Likewise.
353         * script/lua/ldo.c: Likewise.
354         * script/lua/ldump.c: Likewise.
355         * script/lua/ldo.h: Likewise.
356         * script/lua/loslib.c: Likewise.
357         * script/lua/lundump.c: Likewise.
358         * script/lua/grub_lib.c: Likewise.
359         * script/lua/ldblib.c: Likewise.
360         * script/lua/lundump.h: Likewise.
361         * script/lua/lmem.c: Likewise.
362         * script/lua/grub_lib.h: Likewise.
363         * script/lua/lmathlib.c: Likewise.
364         * script/lua/lstate.c: Likewise.
365         * script/lua/ltm.c: Likewise.
366         * script/lua/lvm.c: Likewise.
367         * script/lua/lmem.h: Likewise.
368         * script/lua/lstate.h: Likewise.
369         * script/lua/ltm.h: Likewise.
370         * script/lua/ltable.c: Likewise.
371         * script/lua/lvm.h: Likewise.
372         * script/lua/llex.c: Likewise.
373         * script/lua/lgc.c: Likewise.
374         * script/lua/grub_lua.h: Likewise.
375         * script/lua/loadlib.c: Likewise.
376         * script/lua/lfunc.c: Likewise.
377         * script/lua/lopcodes.c: Likewise.
378         * script/lua/lparser.c: Likewise.
379         * script/lua/ltable.h: Likewise.
380         * script/lua/llex.h: Likewise.
381         * script/lua/lgc.h: Likewise.
382         * script/lua/lfunc.h: Likewise.
383         * script/lua/lbaselib.c: Likewise.
384         * script/lua/lopcodes.h: Likewise.
385         * script/lua/lparser.h: Likewise.
386         * script/lua/lzio.c: Likewise.
387         * script/lua/linit.c: Likewise.
388         * script/lua/lobject.c: Likewise.
389         * script/lua/llimits.h: Likewise.
390         * script/lua/lstring.c: Likewise.
391         * script/lua/lzio.h: Likewise.
392         * script/lua/lapi.c: Likewise.
393         * script/lua/lcode.c: Likewise.
394         * script/lua/lua.h: Likewise.
395         * script/lua/lobject.h: Likewise.
396         * script/lua/lstring.h: Likewise.
397         * script/lua/lapi.h: Likewise.
398         * script/lua/lcode.h: Likewise.
399         * script/lua/luaconf.h: Likewise.
401 2009-09-26  Colin Watson  <cjwatson@ubuntu.com>
403         * docs/grub.texi (Command-line and menu entry commands): Document
404         date and echo commands.
406 2009-09-24  Pavel Roskin  <proski@gnu.org>
408         * include/grub/kernel.h (struct grub_module_header): Remove
409         `grub_module_header_types'.  Make `type' unsigned.  Make `size'
410         32-bit on all platforms.
411         * util/elf/grub-mkimage.c (load_modules): Treat `type' as an
412         8-bit field.  Use grub_host_to_target32() for `size'.
413         * util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
414         * util/i386/pc/grub-mkimage.c (generate_image): Likewise.
415         * util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.
417 2009-09-24  Robert Millan  <rmh.grub@aybabtu.com>
419         Fix "lost keypress" bug in at_keyboard.
421         * term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function.
422         Checks for readyness of input buffer (without flushing it).
423         (grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather
424         than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.
426 2009-09-24  Robert Millan  <rmh.grub@aybabtu.com>
428         * util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
429         size check within GRUB_MACHINE_PCBIOS section.
431 2009-09-24  Robert Millan  <rmh.grub@aybabtu.com>
433         * include/grub/i386/at_keyboard.h (KEYBOARD_ISREADY): Negate
434         return value.
435         * term/i386/pc/at_keyboard.c (grub_keyboard_getkey): Negate
436         KEYBOARD_ISREADY check.
437         (grub_at_keyboard_checkkey): Rename to ...
438         (grub_at_keyboard_getkey_noblock): ... this.  Update all users.
439         Remove gratuitous cast.
441 2009-09-23  Colin Watson  <cjwatson@ubuntu.com>
443         * configure.ac: Call AC_PROG_MKDIR_P.
444         * Makefile.in (docs/stamp-vti): Create docs directory.  Create
445         version.texi in $(builddir) rather than $(srcdir).
446         (docs/grub.info): Create docs directory.  Prepend $(builddir)/docs
447         to makeinfo's @include search path.
449 2009-09-23  Felix Zielcke  <fzielcke@z-51.de>
451         * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Cope with `*.dpkg-*'
453 2009-09-23  Felix Zielcke  <fzielcke@z-51.de>
455         * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
456         for `*.dpkg-new'.
458 2009-09-21  Colin Watson  <cjwatson@ubuntu.com>
460         Build info documentation.  Some code borrowed from Automake.
462         * configure.ac: Check for makeinfo.
463         * Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
464         (MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
465         docs/version.texi.
466         (MOSTLYCLEANFILES): Add vti.tmp.
467         (docs/version.texi, docs/stamp-vti): Update automatically.
468         (docs/grub.info): Build info documentation.  Use --force and ignore
469         errors for now.
470         (all-local): Add $(INFOS).
471         (install-local): Install info files.
472         (uninstall): Uninstall info files.
473         * docs/version.texi: Remove from revision control.  This file is
474         automatically generated on build now.
475         * gendistlist.sh: Add `*.info'.
477 2009-09-21  Felix Zielcke  <fzielcke@z-51.de>
479         * kern/term.c: Fix indentation.
481 2009-09-21  Felix Zielcke  <fzielcke@z-51.de>
483         * util/hostdisk.c: Fix a comment.
485 2009-09-20  Robert Millan  <rmh.grub@aybabtu.com>
487         Fix regression introduced in r2539.
489         * term/usb_keyboard.c (USB_HID_DEVICE_TO_HOST): Change from 0x61
490         to 0xA1.
492 2009-09-19  Colin Watson  <cjwatson@ubuntu.com>
494         * util/grub.d/30_os-prober.in: Don't throw away stderr from
495         os-prober. Under normal operation, it does not print anything to
496         stderr; if it does, we need to debug it, and throwing away stderr
497         makes that excessively difficult.
499 2009-09-16  Vladimir Serbinenko  <phcoder@gmail.com>
501         * mmap/mmap.c (grub_cmd_badram): Fix off-by-one error.
503 2009-09-16  Robert Millan  <rmh.grub@aybabtu.com>
505         * aclocal.m4 (AC_LANG_PROGRAM): New macro.  Overrides stock
506         AC_LANG_PROGRAM from autoconf.
507         (grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing
508         prototypes (fixes warning).
510         * configure.ac: Add `-Werror' to TARGET_CFLAGS unless
511         `--disable-werror' was used.
513 2009-09-16  Robert Millan  <rmh.grub@aybabtu.com>
515         * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
516         uninitialized `lastaddr'.
518 2009-09-15  Vladimir Serbinenko  <phcoder@gmail.com>
520         * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
522 2009-09-14  Colin Watson  <cjwatson@ubuntu.com>
524         * commands/test.c (get_fileinfo): Return immediately if
525         grub_fs_probe fails.
527 2009-09-14  José Martínez  <xosemp@gmail.com>
529         * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
531 2009-09-14  Colin Watson  <cjwatson@ubuntu.com>
533         * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
534         output.
536 2009-09-13  Robert Millan  <rmh.grub@aybabtu.com>
538         * configure.ac: Remove --enable-grub-pe2elf.  Only build
539         grub-pe2elf when needed by the build system itself.
540         * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
542 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
544         * configure.ac: Bump version to 1.97~beta3.
545         * docs/version.texi: Likewise.
547 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
549         * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
550         mode special handling (grub_vbe_bios_set_dac_palette_width() call)
551         from here ...
552         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
553         (grub_linux_setup_video): ... to here (with some adjustments).
555 2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>
557         Fix memory corruption issue (spotted by Colin Watson).
559         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
560         causing returned size to be stored in an incorrect memory location.
561         Fix use of uninitialized value when storing the returned size.
563 2009-09-12  Yves Blusseau  <blusseau@zetam.org>
565         Change clean rules to properly remove files
567         * genmk.rb: add new clean rules
568         * Makefile.in (clean): add the new targets
569         (mostlyclean): likewise
571 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
573         * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
574         to grub_uint64_t.
575         * fs/ntfs.c (init_file): Understand 64-bit sizes for
576         non-resident files.
578 2009-09-11  Colin Watson  <cjwatson@ubuntu.com>
580         * configure.ac: Don't look for help2man when cross-compiling.  Fixes
581         part of bug #27349.
583 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
585         * util/grub-mkconfig.in: Make the created config mode 400 and
586         print a warning if it fails.
588 2009-09-10  Robert Millan  <rmh.grub@aybabtu.com>
590         * util/grub.d/40_custom.in: Ask user to type custom entries below
591         comment, rather than below 'exec tail' line.
593 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
595         * util/grub.d/40_custom.in: Make sure that the explanatory text is
596         visible in grub.cfg.
598 2009-09-10  Colin Watson  <cjwatson@ubuntu.com>
600         * util/grub.d/40_custom.in: Make it a little clearer how to use this
601         file.
603 2009-09-10  Felix Zielcke  <fzielcke@z-51.de>
605         * docs/grub.cfg: Add an example menu entry for memtest86+.
607 2009-09-09  Felix Zielcke  <fzielcke@z-51.de>
609         * config.guess: Update to latest version from config git.
610         * config.sub: Likewise.
612 2009-09-08  Colin Watson  <cjwatson@ubuntu.com>
614         * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
615         unknown-command case.  Fixes bug #27320.
617 2009-09-08  Felix Zielcke  <fzielcke@z-51.de>
619         * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
620         `help' if the command exists.
622 2009-09-06  Robert Millan  <rmh.grub@aybabtu.com>
624         * INSTALL: Require GCC 4.1.3 or later.
626 2009-09-06  Yves Blusseau  <blusseau@zetam.org>
628         * Makefile.in (RMKFILES): add i386-qemu.rmk
629         (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
630         $(srcdir)/stamp-h.in
632 2009-09-05  Robert Millan  <rmh.grub@aybabtu.com>
634         * util/grub-probe.c (probe): Comment out buggy codepath, which
635         was unexpectedly enabled by Colin Watson's 2009-09-02 fix.  This
636         should be re-enabled after 1.97.
638 2009-09-05  Felix Zielcke  <fzielcke@z-51.de>
640         * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
641         find searches for.
643 2009-09-04  Vladimir Serbinenko  <phcoder@gmail.com>
645         * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
646         unnecessary calls to grub_error.
648 2009-09-04  Colin Watson  <cjwatson@ubuntu.com>
650         * NEWS: Mention `keystatus' and Unicode fonts.
652 2009-09-04  Robert Millan  <rmh.grub@aybabtu.com>
654         * configure.ac: Bump version to 1.97~beta2.
655         * docs/version.texi: Likewise.
657 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
659         * configure.ac: By default, GCC 4.4 generates .eh_frame sections
660         containing unwind information in some cases where it previously did
661         not. Use -fno-dwarf2-cfi-asm if available to restore the old
662         behaviour. See http://patchwork.kernel.org/patch/8555/ for related
663         discussion.
665 2009-09-02  Yves BLUSSEAU  <blusseau@zetam.org>
667         Embedding loadenv module into grub-emu
669         * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
670         commands/loadenv.c
671         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
672         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
673         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
674         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
675         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
676         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
678 2009-09-03  Magnus Granberg  <zorry@ume.nu>
680         * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
681         include -fPIE in the default specs.
682         * configure.ac: Check if pie_possible is yes and add -fno-PIE
683         to TARGET_CFLAGS.
685 2009-09-03  Felix Zielcke  <fzielcke@z-51.de>
687         * INSTALL: Note that GNU Bison 2.3 or later is required.
689 2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
691         * kern/i386/pc/startup.S: Fix typo.
693 2009-09-02  Vladimir Serbinenko  <phcoder@gmail.com>
695         * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
696         according to GCS.
698 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
700         * docs/grub.texi (Naming convention): Describe one-based partition
701         numbering.
702         (Device syntax): Likewise.
703         (File name syntax): Likewise.
704         (Block list syntax): Likewise.
705         (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
706         menu.lst.
707         (File name syntax): Likewise.
708         (Command-line and menu entry commands): Document acpi, blocklist,
709         crc, export, insmod, keystatus, ls, set, and unset commands.
711 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
713         * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
714         to avoid implying that only one of --shift, --ctrl, or --alt may be
715         used.
717 2009-09-02  Colin Watson  <cjwatson@ubuntu.com>
719         * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
720         rather than comparing against S_IFREG, which will almost never work.
722 2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>
724         * commands/loadenv.c (check_blocklists): Fix off-by-one error.
725         (write_blocklists): Likewise.
727 2009-09-01  Colin Watson  <cjwatson@ubuntu.com>
729         * script/lua/grub_lua.h (fputs): Supply a format string as the first
730         argument to grub_printf.
732 2009-09-01  Felix Zielcke  <fzielcke@z-51.de>
734         * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
735          non GNU test.
737 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
739         * kern/file.c (grub_file_read): Spelling fix
741 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
743         * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
744         loading of headers in some cases.
746 2009-08-30  Robert Millan  <rmh.grub@aybabtu.com>
748         * configure.ac: Bump version to 1.97~beta1.
749         * docs/version.texi: Likewise.
751 2009-08-29  Vladimir Serbinenko  <phcoder@gmail.com>
753         * include/grub/i386/xnu.h: Add license header.
754         include grub/err.h explicitly.
756 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
758         * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
759         to `ufs' in the vfs.root.mountfrom kernel parameter.
761 2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>
763         * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
765         [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
766         value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
768         [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
769         `ARRAY_SIZE' macro.
771 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
773         * kern/file.c (grub_file_read): Check offset.
774         * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
775         * fs/jfs.c (grub_jfs_read_file): Likewise.
776         * fs/ntfs.c (grub_ntfs_read): Likewise.
777         * fs/reiserfs.c (grub_reiserfs_read): Likewise.
778         * fs/minix.c (grub_minix_read_file): Correct offset check.
779         * fs/ufs.c (grub_ufs_read_file): Likewise.
781 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
783         * term/i386/pc/console.c (bios_data_area): Cast
784         GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
786 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
788         1-bit optimised blitters.
790         * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
791         prototype.
792         (grub_video_fbblit_replace_24bit_1bit): Likewise.
793         (grub_video_fbblit_replace_16bit_1bit): Likewise.
794         (grub_video_fbblit_replace_8bit_1bit): Likewise.
795         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
796         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
797         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
798         * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
799         function.
800         (grub_video_fbblit_replace_24bit_1bit): Likewise.
801         (grub_video_fbblit_replace_16bit_1bit): Likewise.
802         (grub_video_fbblit_replace_8bit_1bit): Likewise.
803         (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
804         (grub_video_fbblit_blend_XXX888_1bit): Likewise.
805         (grub_video_fbblit_blend_XXX565_1bit): Likewise.
806         * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
807         when possible.
808         * video/video.c (grub_video_get_blit_format): Return
809         GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
811 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
813         * normal/cmdline.c (grub_cmdline_get): Supply a format string as
814         the first argument to grub_printf.
816 2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
817 2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>
819         Add `getkeystatus' terminal method.  Add a new `keystatus' command
820         to query it.
822         * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
823         GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
824         modifier key bitmasks.
825         (struct grub_term_input): Add `getkeystatus' member.
826         (grub_getkeystatus): Add prototype.
827         * kern/term.c (grub_getkeystatus): New function.
829         * include/grub/i386/pc/memory.h
830         (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
831         (struct grub_machine_bios_data_area): Define necessary parts of BIOS
832         Data Area layout.
833         * term/i386/pc/console.c (grub_console_getkeystatus): New function.
834         (grub_console_term_input): Set `getkeystatus' member.
835         * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
836         constants.
837         (grub_usb_keyboard_getreport): Likewise.
838         (grub_usb_keyboard_checkkey): Likewise.
839         (grub_usb_keyboard_getkeystatus): New function.
840         (grub_usb_keyboard_term): Set `getkeystatus' member.
842         * commands/keystatus.c: New file.
843         * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
844         (keystatus_mod_SOURCES): New variable.
845         (keystatus_mod_CFLAGS): Likewise.
846         (keystatus_mod_LDFLAGS): Likewise.
847         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
848         commands/keystatus.c.
849         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
850         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
851         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
852         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
853         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
854         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
856 2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>
858         Split befs.mod and afs.mod into *_be.mod and *.mod
860         * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
861         (grub_fstest_SOURCES): Likewise.
862         (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
863         (afs_be_mod_SOURCES): New variable.
864         (afs_be_mod_CFLAGS): Likewise.
865         (afs_be_mod_LDFLAGS): Likewise.
866         (befs_be_mod_SOURCES): Likewise.
867         (befs_be_mod_CFLAGS): Likewise.
868         (befs_be_mod_LDFLAGS): Likewise.
869         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
870         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
871         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
872         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
873         (grub_emu_SOURCES): Likewise.
874         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
875         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
876         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
877         * fs/afs_be.c: New file.
878         * fs/befs_be.c: New file.
879         * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
880         (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
881         (U16): Replaced with ...
882         (grub_afs_to_cpu16): ...this. All users updated.
883         (U32): Replaced with ...
884         (grub_afs_to_cpu32): ...this. All users updated.
885         (U64): Replaced with ...
886         (grub_afs_to_cpu64): ...this. All users updated.
887         (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
888         (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
889         (grub_afs_validate_sblock): Check only one endianness.
890         (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
891         (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
892         (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
893         (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
894         (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
895         (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
896         (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
897         (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
899 2009-08-26  Bean  <bean123ch@gmail.com>
901         * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
902         64-bit number.
903         (GRUB_XFS_FSB_TO_BLOCK): Likewise.
904         (grub_xfs_inode_block): Change return type to grub_uint64_t.
905         (grub_xfs_read_inode): Change type of block to grub_uint64_t.
907 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
909         NetBSD memory map support.
911         * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
912         (grub_netbsd_btinfo_mmap_header): New structure.
913         (grub_netbsd_btinfo_mmap_entry): Likewise.
914         * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
916 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
918         Enable bsd.mod on coreboot.
920         * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
921         (bsd_mod_SOURCES): New variable.
922         (bsd_mod_CFLAGS): Likewise.
923         (bsd_mod_LDFLAGS): Likewise.
924         (bsd_mod_ASFLAGS): Likewise.
925         * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
926         (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
928 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
930         Cleanup NetBSD root support.
932         * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
933         grub_bsd_get_device.
934         Fix typo.
936 2009-08-25  Felix Zielcke  <fzielcke@z-51.de>
938         * util/grub.d/00_header.in: Move check for the video backend of
939         gfxterm from here ...
940         * util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
941         a suitable video backend.
943 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
945         Fix breakage in grub-setup.
947         * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
948         "msdos_partition_map".
950 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
952         Fix breakage in normal/auth.c.
954         * normal/auth.c (grub_iswordseparator): New function.
956 2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>
958         Authentication support.
960         * commands/password.c: New file.
961         * conf/common.rmk (pkglib_MODULES): Add password.mod.
962         (password_mod_SOURCES): New variable.
963         (password_mod_CFLAGS): Likewise.
964         (password_mod_LDFLAGS): Likewise.
965         (normal_mod_SOURCES): Add normal/auth.c.
966         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
967         normal/auth.c.
968         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
969         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
970         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
971         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
972         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
973         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
974         * include/grub/auth.h: New file.
975         * include/grub/err.h (grub_err_t): New enum value
976         GRUB_ERR_ACCESS_DENIED.
977         * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
978         'users'.
979         * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
980         * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
981         users updated.
982         * normal/auth.c: New file.
983         * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
984         (grub_cmdline_run): Don't allow to go to command line without
985         authentication.
986         * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
987         * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
988         menuentry without superuser rights.
989         * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
990         user isn't a superuser.
992 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
994         Save space by inlining misc.c functions.
996         * kern/misc.c (grub_iswordseparator): Made static.
997         * kern/misc.c (grub_strcat): Moved from here ...
998         * include/grub/misc.h (grub_strcat): ... here. Inlined.
999         * kern/misc.c (grub_strncat): Moved from here ...
1000         * include/grub/misc.h (grub_strncat): ... here. Inlined.
1001         * kern/misc.c (grub_strcasecmp): Moved from here ...
1002         * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
1003         * kern/misc.c (grub_strncasecmp): Moved from here ...
1004         * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
1005         * kern/misc.c (grub_isalpha): Moved from here ...
1006         * include/grub/misc.h (grub_isalpha): ... here. Inlined.
1007         * kern/misc.c (grub_isdigit): Moved from here ...
1008         * include/grub/misc.h (grub_isdigit): ... here. Inlined.
1009         * kern/misc.c (grub_isgraph): Moved from here ...
1010         * include/grub/misc.h (grub_isgraph): ... here. Inlined.
1011         * kern/misc.c (grub_tolower): Moved from here ...
1012         * include/grub/misc.h (grub_tolower): ... here. Inlined.
1014 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
1016         * script/sh/function.c (grub_script_function_find): Cut error message
1017         not to flood terminal.
1018         * script/sh/lexer.c (grub_script_yylex): Remove command line length
1019         limit.
1020         * script/sh/script.c (grub_script_arg_add): Duplicate string.
1022 2009-08-24  Colin Watson  <cjwatson@ubuntu.com>
1024         * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
1025         `report' grub_uint8_t *.
1026         (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
1027         Use a 50-millisecond timeout rather than just repeating
1028         grub_usb_keyboard_getreport 50 times.
1029         (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
1031 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
1033         Rename *_partition_map to part_*
1035         * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
1036         * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
1037         * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
1038         * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
1039         All users updated.
1040         * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
1041         All users updated.
1042         * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
1043         * util/grub-probe.c (probe_partmap): Don't transform partition name
1044         to get module name.
1046 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
1048         Fix OpenBSD and NetBSD support.
1050         * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
1051         memory address conflict.
1052         (OPENBSD_MMAP_ACPI): New definition.
1053         (OPENBSD_MMAP_NVS): Likewise.
1054         * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
1055         and OPENBSD_MMAP_NVS.
1056         Add memory map terminator
1057         Explicit cast when calling grub_unix_real_boot.
1058         (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
1060 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
1062         Let user specify NetBSD root device.
1064         * loader/i386/bsd.c (netbsd_root): New variable.
1065         (netbsd_opts): New option 'root'.
1066         (NETBSD_ROOT_ARG): New macro.
1067         (grub_netbsd_boot): Use 'netbsd_root'.
1068         (grub_bsd_unload): Free 'netbsd_root'.
1069         (grub_cmd_netbsd): Fill 'netbsd_root'.
1071 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
1073         Support for 64-bit NetBSD.
1075         * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
1076         point when booting non-FreeBSD.
1078 2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>
1080         Support --no-smp and --no-acpi for NetBSD.
1082         * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
1083         (NETBSD_AB_NOACPI): Likewise.
1084         * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
1085         (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
1087 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
1089         * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
1090         errors.
1091         (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
1092         errors. Call grub_error when needed.
1094 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
1096         * commands/search.c (search_fs): Try searching without autoload first.
1097         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
1098         filesystem module explicitly for faster booting.
1100 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
1102         * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
1104 2009-08-23  Colin Watson  <cjwatson@ubuntu.com>
1106         * util/grub.d/30_os-prober.in: Disable os-prober if
1107         `GRUB_DISABLE_OS_PROBER' was set to true.
1109 2009-08-23  Robert Millan  <rmh.grub@aybabtu.com>
1111         * partmap/pc.c: Rename to ...
1112         * partmap/msdos.c: ... this.  Update all users.
1113         (grub_pc_partition_map): Rename to ...
1114         (grub_msdos_partition_map): ... this.  Update all users.
1116         * parttool/pcpart.c: Rename to ...
1117         * parttool/msdospart.c: ... this.  Update all users.
1119         * include/grub/pc_partition.h: Rename to ...
1120         * include/grub/msdos_partition.h: ... this.  Update all users.
1121         (grub_pc_partition_bsd_entry): Rename to ...
1122         (grub_msdos_partition_bsd_entry): ... this.  Update all users.
1123         (grub_pc_partition_disk_label): Rename to ...
1124         (grub_msdos_partition_disk_label): ... this.  Update all users.
1125         (grub_pc_partition_entry): Rename to ...
1126         (grub_msdos_partition_entry): ... this.  Update all users.
1127         (grub_pc_partition_mbr): Rename to ...
1128         (grub_msdos_partition_mbr): ... this.  Update all users.
1129         (grub_pc_partition): Rename to ...
1130         (grub_msdos_partition): ... this.  Update all users.
1131         (grub_pc_partition_is_empty): Rename to ...
1132         (grub_msdos_partition_is_empty): ... this.  Update all users.
1133         (grub_pc_partition_is_extended): Rename to ...
1134         (grub_msdos_partition_is_extended): ... this.  Update all users.
1135         (grub_pc_partition_is_bsd): Rename to ...
1136         (grub_msdos_partition_is_bsd): ... this.  Update all users.
1138         * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
1139         (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
1140         (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
1141         (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
1142         (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
1143         (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
1144         (gpt_mod_LDFLAGS): Rename to ...
1145         (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
1146         (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
1147         (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
1148         (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
1149         (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
1150         (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
1151         (part_gpt_mod_LDFLAGS): ... this.
1152         (pkglib_MODULES): Prefix partition modules with `part_'.  Rename
1153         `pcpart.mod' to `msdospart.mod'.
1154         (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
1155         to ...
1156         (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
1157         (msdospart_mod_LDFLAGS): ... this.
1159 2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>
1161         * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
1162         (openbsd_opts): Likewise.
1163         (netbsd_opts): Likewise.
1164         (freebsd_flags): Added 0 terminator.
1165         (openbsd_flags): Likewise.
1166         (netbsd_flags): Likewise.
1167         (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
1168         (grub_cmd_freebsd): Transformed into extended command.
1169         (grub_cmd_openbsd): Likewise.
1170         (grub_cmd_netbsd): Likewise.
1171         (cmd_freebsd): Changed type to grub_extcmd_t.
1172         (cmd_openbsd): Likewise.
1173         (cmd_netbsd): Likewise.
1174         (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
1175         grub_cmd_openbsd as extended commands.
1176         (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
1177         cmd_netbsd and cmd_openbsd
1179 2009-08-22  Vladimir Serbinenko  <phcoder@gmail.com>
1181         * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
1183 2009-08-21  Pavel Roskin  <proski@gnu.org>
1185         * Makefile.in (install-local): When checking if a file is in the
1186         build directory, use "test -e" to detect symlinks.
1188         * Makefile.in (install-local): Remove all files in
1189         $(DESTDIR)$(pkglibdir) before installing new files there.
1191 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
1193         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
1194         grub-mkelfimage.
1196 2009-08-18  Felix Zielcke  <fzielcke@z-51.de>
1198         * util/grub-mkconfig.in: Don't use gfxterm by default if not
1199         explicitly specified by the user.
1201 2009-08-18  Pavel Roskin  <proski@gnu.org>
1203         * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
1204         grub_uint8_t pointer for data.
1205         * include/grub/fbutil.h (struct grub_video_fbblit_info):
1206         Likewise.
1207         * video/fb/fbutil.c: Remove unnecessary casts.
1209 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
1211         VBE cleanup.
1213         * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
1214         (grub_vbe_set_video_mode): Save active mode info
1215         only after setting the mode.
1216         (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
1217         second argument.
1219 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
1221         Rename variables for clarity.
1223         * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
1224         (active_vbe_mode_info): ... this. All users updated.
1225         (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
1226         All users updated.
1227         (initial_mode): Rename to ...
1228         (initial_vbe_mode): ... this. All users updated.
1229         (mode_in_use): Rename to ..
1230         (vbe_mode_in_use): ... this. All users updated.
1231         (mode_list): Rename to ..
1232         (vbe_mode_list): ... this. All users updated.
1233         (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
1234         'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
1235         (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
1236         'mode_list_size' to 'vbe_mode_list_size'.
1237         (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
1238         'best_mode_info' to 'best_vbe_mode_info' and
1239         'best_mode' to 'best_vbe_mode'
1241 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
1243         Remove duplicate grub_video_fb_get_video_ptr.
1245         * include/grub/fbutil.h (get_data_ptr): Rename to ...
1246         (grub_video_fb_get_video_ptr): ... this.
1247         * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
1248         * video/fb/fbutil.c: Add comment about addressing.
1249         (get_data_ptr): Rename to ...
1250         (grub_video_fb_get_video_ptr): ... this. All users updated.
1251         * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
1253 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
1255         * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
1256         grub_dprintf() that was just added.
1258 2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>
1260         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
1261         (DEFAULT_VIDEO_MODE): Remove macros.
1262         (grub_linux_boot): Remove assumption that Linux has FB support,
1263         and use "text" as default video mode.
1265 2009-08-15  Vladimir Serbinenko  <phcoder@gmail.com>
1267         * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
1268         grub_dprintf.
1269         * fs/fat.c (grub_fat_read_data): Likewise.
1271 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1273         * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
1274         payload.
1275         (grub_module): Likewise.
1277 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1279         * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
1280         mbi->cmdline but free playground.
1282 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1284         Handle group offset on UFS1.
1286         * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
1287         (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
1289 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1291         Split ufs.mod into ufs1.mod and ufs2.mod.
1293         * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
1294         (grub_fstest_SOURCES): Likewise.
1295         (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
1296         (ufs_mod_SOURCES): Remove.
1297         (ufs_mod_CFLAGS): Likewise.
1298         (ufs_mod_LDFLAGS): Likewise.
1299         (ufs1_mod_SOURCES): New variable.
1300         (ufs1_mod_CFLAGS): Likewise.
1301         (ufs1_mod_LDFLAGS): Likewise.
1302         (ufs2_mod_SOURCES): New variable.
1303         (ufs2_mod_CFLAGS): Likewise.
1304         (ufs2_mod_LDFLAGS): Likewise.
1305         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
1306         * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1307         Likewise.
1308         (grub_emu_SOURCES): Likewise.
1309         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1310         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1311         (grub_setup_SOURCES): Likewise.
1312         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1313         * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
1314         (grub_setup_SOURCES): Likewise.
1315         * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
1316         Likewise.
1317         * fs/ufs2.c: New file.
1318         * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
1320 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
1322         Framebuffer split.
1324         * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
1325         subsystem at the end.
1326         * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
1327         (video_fb_mod_SOURCES): New variable.
1328         (video_fb_mod_CFLAGS): Likewise.
1329         (video_fb_mod_LDFLAGS): Likewise.
1330         * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
1331         video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
1332         * video/i386/pc/vbeblit.c: Moved from here ...
1333         * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
1334         * video/i386/pc/vbefill.c: Moved from here ...
1335         * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
1336         * video/i386/pc/vbeutil.c: Moved from here ...
1337         * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
1338         * include/grub/i386/pc/vbeblit.h: Moved from here ...
1339         * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
1340         * include/grub/i386/pc/vbefill.h: Moved from here ...
1341         * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
1342         * include/grub/i386/pc/vbeutil.h: Moved from here ...
1343         * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
1344         * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
1345         * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
1346         * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
1347         (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
1348         (grub_video_adapter): Added 'get_info_and_fini'.
1349         (grub_video_get_info_and_fini): New prototype.
1350         (grub_video_set_mode): make modestring const char *.
1351         * loader/i386/linux.c (grub_linux_setup_video): Use
1352         grub_video_get_info_and_fini.
1353         (grub_linux_boot): Move modesetting just before booting.
1354         * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
1355         grub_video_get_info_and_fini.
1356         * video/i386/pc/vbe.c: Moved framebuffer part ...
1357         * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
1358         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
1359         grub_video_fbstd_colors and grub_video_fb_set_palette.
1360         (grub_video_vbe_init): Clear 'framebuffer' variable and use
1361         grub_video_fb_init.
1362         (grub_video_vbe_fini): Use grub_video_fb_fini.
1363         (grub_video_vbe_setup): Use framebuffer.render_target instead of
1364         render_target and use grub_video_fb_set_active_render_target and
1365         grub_video_fb_set_palette.
1366         (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
1367         (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
1368         (grub_video_vbe_adapter): Use framebuffer.
1369         * video/video.c (grub_video_get_info_and_fini): New function.
1370         (grub_video_set_mode): Make modestring const char *.
1371         (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
1372         values are already initialised.
1374 2009-08-14  Pavel Roskin  <proski@gnu.org>
1376         * boot/i386/pc/cdboot.S: Use LOCAL for local labels.  Eliminate
1377         ABS and APPLE_CC.
1378         * boot/i386/pc/diskboot.S: Likewise.
1379         * boot/i386/pc/lnxboot.S: Likewise.  Hardcode the number of code
1380         sectors allow compilation on MacOSX.
1381         * conf/i386-pc.rmk: Enable unconditional compilation of
1382         lnxboot.img.
1384 2009-08-13  Colin Watson  <cjwatson@ubuntu.com>
1386         * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
1387         * util/grub.d/00_header.in: Enter interruptible sleep if
1388         GRUB_HIDDEN_TIMEOUT is set.
1390 2009-08-13  Yves Blusseau  <blusseau@zetam.org>
1392         * include/grub/symbol.h: Add the LOCAL macro.
1393         * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
1394         starting with "L_".
1396 2009-08-13  Pavel Roskin  <proski@gnu.org>
1398         * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
1399         any modern compilers we support.
1401         * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
1402         Use local labels starting with "L_" so that Apple assembler
1403         knows they are local.
1405 2009-08-10  Robert Millan  <rmh.grub@aybabtu.com>
1407         * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
1408         (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
1409         (bsd_kernel_types): ... this enum.
1411         * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
1412         (grub_cmd_freebsd_module_elf): Abort with "You need to load the
1413         kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
1415         (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
1416         (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
1417         (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
1418         messages.
1420 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
1422         * util/grub-dumpdevtree: Moved from here ...
1423         * util/i386/efi/grub-dumpdevtree: ... to here.
1424         (hexify): New function.  Converts a string to its hex version.
1425         Generate hex versions of "efi" and "device-properties" by calling
1426         hexify() on the ASCII strings rather than by hardcoding numbers.
1428 2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>
1430         * fs/jfs.c: Update copyright year.
1432 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
1434         * util/grub.d/00_header.in: Fix a comment.
1435         * util/grub.d/10_linux.in: Likewise.
1436         * util/grub.d/10_windows.in: Likewise.
1437         * util/grub.d/10_hurd.in: Likewise.
1439 2009-08-08  Felix Zielcke  <fzielcke@z-51.de>
1441         * util/grub-mkconfig.in: Allow the user to specify the used font
1442         with GRUB_FONT.
1444 2009-08-08  Pavel Roskin  <proski@gnu.org>
1446         * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
1447         available, xfs.mod needs it now.
1449         * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
1450         the "g" modifier in sed when the intention is to strip something
1451         once.  This fixes comparison of kernels with multiple dashes.
1453         * util/grub-mkconfig.in: Define datarootdir, datadir may depend
1454         on it.  Add missing space before closing bracket.  Fix
1455         misleading formatting.
1457 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1459         * docs/grub.texi: Major overhaul.  Remove all sections that are
1460         specific to GRUB Legacy, or mostly composed of Legacy-specific
1461         information.
1463 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1465         * docs/version.texi: New file.  Provides version information for
1466         grub.texi.
1468 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1470         * docs/grub.texi: Update CVS information to SVN.
1471         Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
1473 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
1475         * util/grub-mkconfig.in: Remove a wrong `fi'.
1477 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
1479         * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
1480         (grub_jfs_uuid): New function.
1481         (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
1483 2009-08-07  Felix Zielcke  <fzielcke@z-51.de>
1485         * util/grub-mkconfig_lib.in (font_path): Move the functionality
1486         of it to ...
1487         * util/grub-mkconfig.in: ... here.  Prefer unicode.pf2 and
1488         unifont.pf2 over ascii.pf2.  Export LANG=C in case ascii.pf2 gets used.
1490 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1492         * util/grub.d/10_linux.in (test_numeric): Moved from here ...
1493         * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
1494         Update all users.
1496         * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
1497         not just "vmlinu[zx]".
1498         Moved from here ...
1499         * util/grub-mkconfig_lib.in (version_test_gt): ... to here.  Update
1500         all users.
1502         * util/grub.d/10_linux.in (find_latest): Moved from here ...
1503         * util/grub-mkconfig_lib.in (version_find_latest): ... to here.  Update
1504         all users.
1506 2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>
1508         * util/grub.d/10_freebsd.in: Use an absolute device path for
1509         `vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.
1511 2009-08-06  Felix Zielcke  <fzielcke@z-51.de>
1513         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
1514         handling of multiple abstraction modules.
1516 2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>
1518         Fix a bug resulting in black screen when loading Linux using a
1519         packed video mode.
1521         * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
1522         function.
1524         * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
1525         (grub_vbe_bios_getset_dac_palette_width): New function.
1526         (grub_vbe_bios_get_dac_palette_width)
1527         (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
1528         grub_vbe_bios_getset_dac_palette_width()).
1530         * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
1531         check for return status.
1532         (grub_vbe_get_video_mode_info): When getting information for a packed
1533         mode (<= 8 bpp), obtain DAC palette width using
1534         grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
1535         {red,green,blue}_mark_size.
1537 2009-08-04  Felix Zielcke  <fzielcke@z-51.de>
1539         * commands/search.c (options): Fix help output to match actual code.
1541 2009-08-02  Vladimir Serbinenko  <phcoder@gmail.com>
1543         * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
1544         of homegrown code.
1546 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1548         * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
1549         on XFS or ReiserFS.
1551 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1553         Support Apple partition map with sector size different from 512 bytes.
1555         * partmap/apple.c (grub_apple_header): New field 'blocksize'.
1556         (apple_partition_map_iterate): Respect 'aheader.blocksize'
1557         and 'apart.partmap_size'.
1559 2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
1560 2009-08-01  Robert Millan  <rmh.grub@aybabtu.com>
1562         Fix cpuid command.
1564         * commands/i386/cpuid.c (options): New variable.
1565         (grub_cmd_cpuid): Return real error.
1566         (GRUB_MOD_INIT(cpuid)): Declare options.
1568 2009-07-31  Vladimir Serbinenko  <phcoder@gmail.com>
1570         * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
1571         valid.
1573 2009-07-31  Bean  <bean123ch@gmail.com>
1575         * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
1576         log2_inode.
1577         (grub_fshelp_node): Move inode field to the end.
1578         (grub_xfs_data): Remove inode field.
1579         (grub_xfs_inode_block): Calculate inode size using sblock.
1580         (grub_xfs_inode_offset): Likewise.
1581         (grub_xfs_read_inode): Calculate inode size using sblock.
1582         (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
1583         (grub_xfs_iterate_dir): Calculate inode size using sblock.
1584         (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
1585         to match inode size.
1586         (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
1587         not accessible when data is null.
1588         (grub_xfs_open): Likewise.
1590 2009-07-31  Bean  <bean123ch@gmail.com>
1592         * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
1593         Don't change pv->disk if it's already set.
1595         * disk/raid.c (grub_raid_scan_device): Merge this function into ...
1596         (grub_raid_register): ... here.
1597         (grub_raid_rescan): Removed.
1599         * include/grub/raid.h (grub_raid_rescan): Removed.
1601         * util/grub-fstest.c: Remove include file <grub/raid.h>.
1602         (fstest): Replace grub_raid_rescan with module fini function followed
1603         by init function.
1605         * util/grub-probe.c: Add include file <grub/raid.h>.
1606         (probe_raid_level): New function.
1607         (probe): Detect abstraction by walking the disk device, support two
1608         level of abstraction (LVM on RAID) when detecting partition map.
1610 2009-07-31  Pavel Roskin  <proski@gnu.org>
1612         * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
1613         to grub_zalloc(), it was erroneous.
1614         Reported by Bean <bean123ch@gmail.com>
1616 2009-07-30  Vladimir Serbinenko  <phcoder@gmail.com>
1618         * util/i386/pc/grub-setup.c (setup): Check that no partition is in
1619         embedding zone, not only the first one.
1621 2009-07-29  Joe Auricchio  <jauricchio@gmail.com>
1623         * term/gfxterm.c (clear_char): New function.
1624         (grub_virtual_screen_setup): Use clear_char.
1625         (scroll_up): Likewise.
1626         (grub_virtual_screen_cls): Likewise.
1628 2009-07-29  Felix Zielcke  <fzielcke@z-51.de>
1630         * util/deviceiter.c (get_acceleraid_disk_name): New static
1631         function.
1632         (grub_util_iterate_devices): Handle Accelraid devices.
1633         * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
1635 2009-07-28  Robert Millan  <rmh.grub@aybabtu.com>
1637         * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
1638         separator for the suggested gfxpayload string (';' collides with the
1639         parser and needs escaping).
1641 2009-07-28  Vladimir Serbinenko  <phcoder@gmail.com>
1643         * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
1644         Clear direction flag before jumping to OS.
1645         (grub_multiboot2_real_boot): Likewise.
1647 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1649         * util/i386/pc/grub-install: Fix parsing of --disk-module
1650         option.
1652 2009-07-28  Felix Zielcke  <fzielcke@z-51.de>
1654         * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
1655         when embedding.
1657 2009-07-26  Felix Zielcke  <fzielcke@z-51.de>
1659         * util/grub-mkconfig.in (package_version): New variable.
1660         Use it do display the version.
1662 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1664         * kern/file.c (grub_file_open): Revert to previous check with
1665         grub_errno.
1667 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1669         * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
1670         from help line. It's out of sync with code.
1672 2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>
1674         * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
1675         entries on failed boot.
1677 2009-07-25  Felix Zielcke  <fzielcke@z-51.de>
1679         * kern/file.c (grub_file_open): Fix an error check.
1681 2009-07-24  Vladimir Serbinenko  <phcoder@gmail.com>
1683         * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
1684         partition map couldn't be identified.
1686 2009-07-23  Pavel Roskin  <proski@gnu.org>
1688         * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
1689         instead of WORDS_BIGENDIAN.  Use grub_le_to_cpu32(), so that the
1690         case of little endian words becomes just an optimization.
1691         Respect const modifier.
1692         (md5_final): Use code that doesn't depend on endianness.
1694         * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
1695         to avoid loss of upper bits if align is unsigned and shorter
1696         than addr.
1698 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1700         UUID support for UFS
1702         * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
1703         (grub_ufs_uuid): New function.
1704         (grub_ufs_fs): add .uuid
1706 2009-07-21  Pavel Roskin  <proski@gnu.org>
1708         * kern/dl.c (grub_dl_check_header): Make static.
1710 2009-07-21  Felix Zielcke  <fzielcke@z-51.de>
1712         * util/grub.d/30_os-prober.in: Remove unused CHAINROOT.  Don't
1713         add drivemap for Vista.  It breaks Windows 7.
1715 2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
1717         * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
1718         128 bytes
1720 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1722         Add BFS support
1724         * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
1725         (grub_fstest_SOURCES): Likewise.
1726         (pkglib_MODULES): Add befs.mod.
1727         (befs_mod_SOURCES): New variable.
1728         (befs_mod_CFLAGS): Likewise.
1729         (befs_mod_LDFLAGS): Likewise.
1730         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1731         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1732         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1733         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1734         (grub_setup_SOURCES): Likewise.
1735         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1736         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1737         (grub_setup_SOURCES): Likewise.
1738         * fs/befs.c: New file.
1739         * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
1740         (GRUB_AFS_SBLOCK_SECTOR): Likewise.
1741         (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
1742         (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
1743         (B_KEY_INDEX_ALIGN): New declaration.
1744         (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
1745         (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
1746         (grub_afs_btree) [MODE_BFS]: New conditional declaration.
1747         (grub_afs_sblock) [MODE_BFS]: Remove link_count.
1748         (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
1749         (grub_afs_mount) [MODE_BFS]: Likewise.
1750         (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
1751         (grub_afs_fs): Use GRUB_AFS_FSNAME
1752         (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
1753         (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
1754         (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
1755         (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
1757 2009-07-19  Yves BLUSSEAU  <yves.grub-devel@zetam.org>
1759         * util/getroot.c (find_root_device): Add support for MacOSX.
1760         * util/hostdisk.c: Likewise.
1762 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1764         * font/font.c (find_glyph): Check whether a font is present to avoid
1765         segmentation fault.
1767 2009-07-20  Joe Auricchio  <jauricchio@gmail.com>
1769         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
1771 2009-07-20  Pavel Roskin  <proski@gnu.org>
1773         * configure.ac: Trim excessively wordy excuses.
1775 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1777         Add symlink, mtime and label support to AtheFS.
1779         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
1780         (grub_afs_iterate_dir): Handle symlinks.
1781         (grub_afs_open): Use grub_afs_read_symlink.
1782         (grub_afs_dir): Likewise.
1783         Pass mtime.
1784         (grub_afs_label): New function.
1785         (grub_afs_fs): Add grub_afs_label.
1786         (grub_afs_read_symlink): New function.
1788 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
1790         Fix AtheFS support.
1792         * fs/afs.c: Fix comments style.
1793         (grub_afs_blockrun): Declare as packed.
1794         (grub_afs_datastream): Likewise.
1795         (grub_afs_bnode): Likewise.
1796         (grub_afs_btree): Likewise.
1797         (grub_afs_sblock): Likewise.
1798         Declare `name' as char.
1799         (grub_afs_inode): Declare as packed.
1800         Change void *vnode to grub_uint32_t unused.
1801         (grub_afs_iterate_dir): Check that key_size is positive.
1802         (grub_afs_mount): Don't read superblock twice.
1803         (grub_afs_dir): Don't free node in case of error,
1804         grub_fshelp_find_file already handles this.
1805         (grub_afs_open): Likewise.
1807 2009-07-19  Pavel Roskin  <proski@gnu.org>
1809         * Makefile.in: Remove LIBLZO and enable_lzo.
1810         * conf/i386-pc.rmk: Remove lzo support.
1811         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
1812         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
1813         support.
1814         * kern/i386/pc/lzo1x.S: Remove.
1815         * kern/i386/pc/startup.S: Remove lzo support.
1816         * util/i386/pc/grub-mkimage.c: Likewise.
1818 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
1820         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
1821         * fs/xfs.c (grub_xfs_dir): Likewise.
1822         * fs/afs.c (grub_afs_dir): Likewise.
1823         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
1824         (grub_iso9660_open): Likewise.
1825         * fs/jfs.c (grub_jfs_open): Likewise.
1826         * fs/ext2.c (grub_ext2_dir): Likewise.
1827         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
1828         * script/sh/lexer.c (grub_script_yylex): Likewise.
1830 2009-07-16  Pavel Roskin  <proski@gnu.org>
1832         * configure.ac: Never add "-c" to CFLAGS.
1834         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
1836         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
1837         grub_cv_cc_efiemu should be used.
1839         * configure.ac: Typo fixes.
1841         * kern/mm.c (grub_zalloc): New function.
1842         (grub_debug_zalloc): Likewise.
1843         * include/grub/mm.h: Declare grub_zalloc() and
1844         grub_debug_zalloc().
1845         * util/misc.c (grub_zalloc): New function.
1846         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
1847         instead of grub_malloc(), remove unneeded initializations.
1848         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
1849         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
1850         * commands/parttool.c (grub_cmd_parttool): Likewise.
1851         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
1852         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
1853         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
1854         * disk/usbms.c (grub_usbms_finddevs): Likewise.
1855         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
1856         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
1857         (grub_cmd_efiemu_pnvram): Likewise.
1858         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
1859         * fs/iso9660.c (grub_iso9660_mount): Likewise.
1860         (grub_iso9660_iterate_dir): Likewise.
1861         * fs/jfs.c (grub_jfs_opendir): Likewise.
1862         * fs/ntfs.c (list_file): Likewise.
1863         (grub_ntfs_mount): Likewise.
1864         * kern/disk.c (grub_disk_open): Likewise.
1865         * kern/dl.c (grub_dl_load_core): Likewise.
1866         * kern/elf.c (grub_elf_file): Likewise.
1867         * kern/env.c (grub_env_context_open): Likewise.
1868         (grub_env_set): Likewise.
1869         (grub_env_set_data_slot): Likewise.
1870         * kern/file.c (grub_file_open): Likewise.
1871         * kern/fs.c (grub_fs_blocklist_open): Likewise.
1872         * loader/i386/multiboot.c (grub_module): Likewise.
1873         * loader/xnu.c (grub_xnu_create_key): Likewise.
1874         (grub_xnu_create_value): Likewise.
1875         * normal/main.c (grub_normal_add_menu_entry): Likewise.
1876         (read_config_file): Likewise.
1877         * normal/menu_entry.c (make_screen): Likewise.
1878         * partmap/sun.c (sun_partition_map_iterate): Likewise.
1879         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
1880         * script/sh/script.c (grub_script_parse): Likewise.
1881         * video/bitmap.c (grub_video_bitmap_create): Likewise.
1882         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
1883         * video/readers/png.c (grub_png_output_byte): Likewise.
1884         (grub_video_reader_png): Likewise.
1886 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1888         Enable all targets that can be built by default
1890         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
1891         grub-mkfont and grub-fstest if they can be built
1893 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1895         Fix hang and segmentation fault in grub-emu-usb
1897         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
1898         * util/usb.c (grub_libusb_devices): likewise
1899         (grub_libusb_init): rename to ...
1900         (GRUB_MOD_INIT (libusb)):...this
1901         (grub_libusb_fini): rename to ..
1902         (GRUB_MOD_FINI (libusb)):...this
1903         * disk/usbms.c (grub_usbms_transfer): fix retry logic
1904         * include/grub/disk.h (grub_raid_init): removed, it's useless
1905         (grub_raid_fini): likewise
1906         (grub_lvm_init): likewise
1907         (grub_lvm_fini): likewise
1908         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
1909         by grub_init_all
1911 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1913         Fix libusb
1915         * Makefile.in (LIBUSB): new macro
1916         * genmk.rb (Utility/print_tail): new method
1917         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
1918         (top level): call util.print_tail at the end.
1920 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1922         Make FreeBSD accept zpool.cache
1924         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
1925         type is /boot/zfs/zpool.cache
1927 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
1929         Fix 64-bit efiemu
1931         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
1932         correct wrong typedef
1933         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
1935 2009-07-15  Pavel Roskin  <proski@gnu.org>
1937         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
1938         * kern/disk.c (struct grub_disk_cache): Likewise.
1940         * commands/probe.c (options): Typo fix.
1942         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
1943         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
1944         accordingly.
1945         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
1947         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
1948         the end of "Error" to make the message more readable.
1950         * boot/i386/pc/boot.S (kernel_segment): Remove.
1951         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
1952         for destination.
1954         * boot/i386/pc/boot.S (boot_version): Remove.
1955         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
1956         Remove.
1958         * include/grub/i386/pc/boot.h: Sort all offsets.
1959         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
1960         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
1961         * boot/i386/pc/boot.S: Assert location of every offset listed in
1962         include/grub/i386/pc/boot.h.
1964 2009-07-13  Pavel Roskin  <proski@gnu.org>
1966         * include/grub/i386/coreboot/machine.h: Rename
1967         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
1968         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
1969         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
1971         * kern/dl.c: Force native word size to suppress warnings when
1972         compiling grub-emu.
1974         * kern/device.c (grub_device_iterate): Change struct part_ent to
1975         hold the name, not a pointer to it.  Use one grub_malloc() per
1976         partition, not two.  Free partition_name if grub_malloc() fails.
1977         Set ents to NULL only before grub_partition_iterate() is called.
1979 2009-07-11  Bean  <bean123ch@gmail.com>
1981         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
1982         childname.
1984 2009-07-10  Bean  <bean123ch@gmail.com>
1985 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
1987         * kern/ieee1275/openfw.c (grub_children_iterate)
1988         (grub_devalias_iterate): Fix size evaluation for property or path
1989         strings, which was broken since r2132.
1991 2009-07-07  Pavel Roskin  <proski@gnu.org>
1993         * commands/search.c (search_file): Merge into ...
1994         (search_fs): ... this.  Accept search type as argument.
1995         (grub_cmd_search): Pass search type to search_fs().
1997         * include/grub/util/console.h: New file.
1998         * util/console.c: Use it instead of grub/machine/console.h.
1999         * util/grub-emu.c: Likewise.
2001         * lib/arg.c (find_long_option): Remove.
2002         (find_long): Add `len' argument, make `s' const char *.
2003         (grub_arg_parse): Parse long options in place, not in a
2004         temporary buffer.
2006 2009-07-06  Pavel Roskin  <proski@gnu.org>
2008         * commands/search.c (search_fs): Fix potential NULL pointer
2009         dereference.
2011         * commands/search.c (search_fs): Replace QUID macro with quid_fn
2012         function pointer.
2014 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
2016         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
2017         comparison.
2019 2009-07-05  Pavel Roskin  <proski@gnu.org>
2021         * include/grub/i386/linux.h (struct linux_kernel_params):
2022         Restore padding3, it's still needed.
2024         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
2025         FreeBSD.
2026         * util/osdetect.lua: Likewise.
2028 2009-07-05  Bean  <bean123ch@gmail.com>
2030         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
2032         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
2033         (grub_lua_getenv): Likewise.
2034         (grub_lua_setenv): Likewise.
2035         (save_errno): New function.
2036         (push_result): Likewise.
2037         (grub_lua_enum_device): Likewise.
2038         (grub_lua_enum_file): Likewise.
2039         (grub_lua_file_open): Likewise.
2040         (grub_lua_file_close): Likewise.
2041         (grub_lua_file_seek): Likewise.
2042         (grub_lua_file_read): Likewise.
2043         (grub_lua_file_getline): Likewise.
2044         (grub_lua_file_getsize): Likewise.
2045         (grub_lua_file_getpos): Likewise.
2046         (grub_lua_file_eof): Likewise.
2047         (grub_lua_file_exist): Likewise.
2048         (grub_lua_add_menu): Likewise.
2050         * script/lua/grub_lua.h (isupper): New inline function.
2051         (islower): Likewise.
2052         (ispunct): Likewise.
2053         (isxdigit): Likewise.
2054         (strcspn): Change to normal function.
2055         (strpbkr): New function declaration.
2056         (memchr): Likewise.
2058         * script/lua/grub_main.c (scan_str): New function.
2059         (strcspn): Likewise.
2060         (strpbrk): Likewise.
2061         (memchr): Likewise.
2063         * script/lua/linit.c (lualibs): Enable the string library.
2065         * util/osdetect.lua: New file.
2067 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
2069         * include/grub/i386/linux.h (struct linux_kernel_params): Add
2070         `capabilities' member.
2072 2009-07-02  Pavel Roskin  <proski@gnu.org>
2074         * genparttoollist.sh: Add missing newline at the end.
2076 2009-07-01  Pavel Roskin  <proski@gnu.org>
2078         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
2080         * util/hostdisk.c (open_device): Remove `const' from
2081         `sysctl_size', as sysctlbyname() can change it (in this case it
2082         doesn't actually happen).
2084         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
2085         using signed long int constants.
2087         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
2088         constant to avoid a warning on FreeBSD.
2090         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
2091         where it's needed.
2093         * Makefile.in: Install include/grub/machine symlink.
2095         * Makefile.in: When installing symlinks, use "cp -fR", which
2096         works on FreeBSD and MacOSX.
2097         From Yves Blusseau <cl7m42e02@sneakemail.com>
2099         * kern/dl.c (grub_dl_resolve_symbol): Make static.
2100         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
2102         * util/misc.c: Move grub_reboot() and grub_halt() ...
2103         * util/grub-emu.c: ... here.  Make main_env static.
2104         * include/grub/util/misc.h: Remove main_env.
2106         * kern/mm.c: Use correct format to print size_t.
2108         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
2109         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
2110         * kern/powerpc/dl.c: Likewise.
2111         * kern/sparc64/dl.c: Likewise.
2112         * kern/x86_64/dl.c: Likewise.
2114 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
2116         Fix grub-emu build on sparc64-ieee1275.
2118         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
2119         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
2121 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
2123         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
2124         (grub_reboot, grub_halt): New functions.
2126         * util/i386/pc/misc.c: Delete.  Update all users.
2127         * util/sparc64/ieee1275/misc.c: Likewise.
2128         * util/powerpc/ieee1275/misc.c: Likewise.
2130 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
2132         * conf/i386.rmk (setjmp_mod_SOURCES)
2133         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
2134         * conf/common.rmk (setjmp_mod_SOURCES)
2135         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
2136         to use $(target_cpu).
2137         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
2138         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
2139         * conf/powerpc-ieee1275.rmk: Likewise.
2140         * conf/sparc64-ieee1275.rmk: Likewise.
2142         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
2143         $(target_cpu) for kern/$(target_cpu)/dl.c.
2144         * conf/i386-efi.rmk: Likewise.
2145         * conf/i386-ieee1275.rmk: Likewise.
2146         * conf/x86_64-efi.rmk: Likewise.
2147         * conf/i386-coreboot.rmk: Likewise.
2148         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
2149         $(target_cpu) for kern/$(target_cpu)/dl.c and for
2150         kern/$(target_cpu)/cache.S.
2151         * conf/sparc64-ieee1275.rmk: Likewise.
2153 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
2155         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
2156         type to `grub_uint8_t', and adjust `padding9' accordingly.
2158 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
2160         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
2162         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
2163         assembly in final jump, using register constraints.
2165         (grub_linux_boot): For text mode, initialize `have_vga' using
2166         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
2168         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
2169         right before the final jump.
2171         Set `video_mode' to 0x3.
2173         Document initialization of `video_page', `video_mode' and
2174         `video_ega_bx'.
2176 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
2178         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
2179         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
2180         and set GRUB_LINUX_FLAG_QUIET appropriately.
2182 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
2184         Fix build on Debian / sparc.
2186         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
2188 2009-06-28  Pavel Roskin  <proski@gnu.org>
2190         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
2191         fix a warning.
2193         * util/grub.d/10_linux.in: Match SUSE style initrd names.
2195 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
2197         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
2198         `err'.
2200 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
2202         Revert r2338.
2204         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
2205         file can't be opened.  grub_file_open() is already supposed to set
2206         grub_errno / grub_errmsg appropriately.
2207         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2209 2009-06-27  Pavel Roskin  <proski@gnu.org>
2210 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
2212         * include/grub/dl.h: Include grub/elf.h.
2213         (struct grub_dl): Add symtab field.
2214         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
2215         GRUB_MODULES_MACHINE_READONLY.
2216         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
2217         of the header for read-only modules.
2218         (grub_dl_unload): Free mod->symtab for read-only modules.
2219         * kern/i386/dl.c: Use mod->symtab.
2220         * kern/powerpc/dl.c: Likewise.
2221         * kern/sparc64/dl.c: Likewise.
2222         * kern/x86_64/dl.c: Likewise.
2224         * conf/i386-qemu.rmk: New file.
2225         * kern/i386/qemu/startup.S: Likewise.
2226         * kern/i386/qemu/mmap.c: Likewise.
2227         * boot/i386/qemu/boot.S: Likewise.
2228         * include/grub/i386/qemu/time.h: Likewise.
2229         * include/grub/i386/qemu/serial.h: Likewise.
2230         * include/grub/i386/qemu/kernel.h: Likewise.
2231         * include/grub/i386/qemu/console.h: Likewise.
2232         * include/grub/i386/qemu/boot.h: Likewise.
2233         * include/grub/i386/qemu/init.h: Likewise.
2234         * include/grub/i386/qemu/machine.h: Likewise.
2235         * include/grub/i386/qemu/loader.h: Likewise.
2236         * include/grub/i386/qemu/memory.h: Likewise.
2238         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
2239         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
2240         [qemu] (pkglib_IMAGES): Add `boot.img'.
2241         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
2242         [qemu] (boot_img_FORMAT): New variables.
2243         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
2244         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
2245         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
2246         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
2247         [qemu] (kernel_img_FORMAT): New variables.
2249         * configure.ac: Recognise `i386-qemu'.
2251         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
2252         (for no compression).
2253         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
2254         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
2255         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
2256         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
2257         ifdefs).
2259 2009-06-27  Pavel Roskin  <proski@gnu.org>
2261         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
2262         read.
2263         * efiemu/prepare32.c: Likewise.
2264         * efiemu/prepare64.c: Likewise.
2266 2009-06-26  Pavel Roskin  <proski@gnu.org>
2268         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
2269         * include/grub/elf.h: Define symbols without "32" or "64" based
2270         on GRUB_TARGET_WORDSIZE.
2271         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
2272         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
2273         ELF definitions.
2274         * efiemu/loadcore64.c: Likewise.
2275         * loader/i386/bsd32.c: Likewise.
2276         * loader/i386/bsd64.c: Likewise.
2277         * kern/dl.c: Remove own ELF definitions.
2278         * util/i386/efi/grub-mkimage.c: Likewise.
2280 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
2282         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
2283         segment 0x0 unconditionally, because the reference generated by
2284         GAS is an absolute address.
2286 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2288         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
2289         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
2291 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2293         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
2294         indexes.  Check for -f explicitly.
2295         (search_file): Improve error message.
2296         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
2298 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2300         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
2301         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
2303 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2305         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
2306         * conf/i386-ieee1275.rmk: Likewise.
2307         * conf/i386-coreboot.rmk: Likewise.
2309         * kern/i386/pc/startup.S (grub_stop): Remove function.
2310         * kern/i386/ieee1275/startup.S: Likewise.
2311         * kern/i386/coreboot/startup.S: Likewise.
2312         * kern/i386/misc.S (grub_stop): New function.
2314 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2316         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
2317         * kern/i386/realmode.S (real_to_prot): ... to here.
2319 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
2321         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
2322         with `kernel.img'.
2323         (kernel_elf_SOURCES): Rename to ...
2324         (kernel_img_SOURCES): ... this.
2325         (kernel_elf_HEADERS): Rename to ...
2326         (kernel_img_HEADERS): ... this.  Update all users.
2327         (kernel_elf_ASFLAGS): Rename to ...
2328         (kernel_img_ASFLAGS): ... this.
2329         (kernel_elf_CFLAGS): Rename to ...
2330         (kernel_img_CFLAGS): ... this.
2331         (kernel_elf_LDFLAGS): Rename to ...
2332         (kernel_img_LDFLAGS): ... this.
2333         * conf/i386-coreboot.rmk: Likewise.
2334         * conf/powerpc-ieee1275.rmk: Likewise.
2336         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
2337         with "kernel.img".
2339 2009-06-21  Pavel Roskin  <proski@gnu.org>
2341         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
2342         to match nested functions.
2343         * loader/sparc64/ieee1275/linux.c: Likewise.
2345         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
2347 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
2349         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
2350         all i386 platforms.
2352 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
2354         Fix asm file handling on ELF, and remove workarounds.
2356         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
2357         and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
2358         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
2359         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
2361 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
2363         Load BSD ELF modules
2365         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
2366         and loader/i386/bsd64.c
2367         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
2368         (FREEBSD_MODTYPE_ELF_MODULE): New definition
2369         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
2370         (grub_freebsd_load_elfmodule32): New declaration
2371         (grub_freebsd_load_elfmoduleobj64): Likewise
2372         (grub_freebsd_load_elf_meta32): Likewise
2373         (grub_freebsd_load_elf_meta64): Likewise
2374         (grub_freebsd_add_meta): Likewise
2375         (grub_freebsd_add_meta_module): Likewise
2376         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
2377         (grub_freebsd_add_meta_module): Likewise and move module-specific
2378         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
2379         (grub_cmd_freebsd): Add elf-kernel specific parts
2380         based on grub_freebsd_add_meta_module
2381         (grub_cmd_freebsd_module): Add type parsing moved from
2382         grub_freebsd_add_meta_module
2383         (grub_cmd_freebsd_module_elf): New function
2384         (cmd_freebsd_module_elf): New variable
2385         (GRUB_MOD_INIT): Register freebsd_module_elf
2386         * loader/i386/bsd32.c: New file
2387         * loader/i386/bsd64.c: Likewise
2388         * loader/i386/bsdXX.c: Likewise
2389         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
2390         (grub_elf64_load): Likewise
2391         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
2392         All users updated
2393         (grub_elf64_load_hook_t): Likewise
2395 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
2397         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
2398         variable.
2399         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
2400         don't write a menu entry for recovery mode.
2402 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
2404         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
2405         after it's no longer needed.
2407 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
2409         * include/grub/i386/loader.h (grub_linux_prot_size)
2410         (grub_linux_tmp_addr, grub_linux_real_addr)
2411         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
2412         GRUB_MACHINE_PCBIOS.
2413         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
2414         common grub_util_info() call to ...
2415         (generate_image): ... here.
2416         Fix use of uninitialized memory, comparison of signed with
2417         unsigned integers and memory leak.
2418         Remove bogus module address message.
2420 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
2422         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
2423         grub_raid_register
2424         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
2426 2009-06-19  Pavel Roskin  <proski@gnu.org>
2428         * configure.ac: Remove stray AC_MSG_CHECKING.
2430 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
2432         * disk/scsi.c (grub_scsi_open): use continue instead of big if
2434 2009-06-18  Pavel Roskin  <proski@gnu.org>
2436         * conf/common.rmk: Add fs_file.mod.
2437         * disk/fs_file.c: New file.
2438         * include/grub/disk.h (enum grub_disk_dev_id): Add
2439         GRUB_DISK_DEVICE_FILE_ID.
2441 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
2443         Fix build with Apple's toolchain. Part 2
2445         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
2446         a fake start
2448 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
2450         Fix build with Apple's toolchain. Part 1
2452         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
2453         for long calls
2454         * configure.ac: remove a leftover AC_MSG_RESULT
2455         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
2456         Apple's toolchain
2458 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
2460         Fix warnings
2462         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
2463         (decomp_block): initialize ch
2464         use grub_memcpy instead of memcpy
2466 2009-06-17  Pavel Roskin  <proski@gnu.org>
2468         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
2469         version, use declarations needed to use vga_text as the startup
2470         console.
2472         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
2473         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
2474         the kernel.
2475         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
2476         and grub_at_keyboard_fini(), it's done on module load and
2477         unload.
2479 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
2481         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
2482         file can't be found.
2483         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2485 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
2487         Fix newline handling
2489         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
2490         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
2491         (grub_script_yylex): don't segfault on unterminated script
2492         newline terminates command and variable
2494 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
2496         avoid double grub_adjust_range call. Bug reported by David Simner
2498         * kern/disk.c (grub_disk_write): change to raw disk access before
2499         calling disk_read
2501 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
2503         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
2504         spaces, for the benefit of help2man.
2505         * util/i386/efi/grub-mkimage.c (usage): Likewise.
2507 2009-06-16  Pavel Roskin  <proski@gnu.org>
2509         * kern/i386/halt.c: Include grub/machine/init.h.
2510         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
2512 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
2514         * util/grub.d/30_os-prober.in: Use ${root} in the generated
2515         drivemap menuentry.
2517 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
2519         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
2520         `echo' command.
2522 2009-06-16  Pavel Roskin  <proski@gnu.org>
2524         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
2525         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
2526         save %dx, we only need %dl and we never change it.
2527         * boot/i386/pc/cdboot.S: Don't set the root drive.
2528         * boot/i386/pc/pxeboot.S: Likewise.
2529         * include/grub/i386/pc/boot.h: Remove
2530         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
2531         GRUB_BOOT_MACHINE_DRIVE_CHECK.
2532         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
2533         * kern/i386/pc/init.c (make_install_device): Remove references
2534         to grub_root_drive.
2535         * kern/i386/pc/startup.S: Likewise.
2536         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
2538 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2540         xnu_uuid command
2542         * commands/xnu_uuid.c: new file
2543         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
2544         (xnu_uuid_mod_SOURCES): new variable
2545         (xnu_uuid_mod_CFLAGS): likewise
2546         (xnu_uuid_mod_LDFLAGS): likewise
2547         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2548         * conf/i386-ieee1275.rmk: likewise
2549         * conf/i386-pc.rmk: likewise
2550         * conf/powerpc-ieee1275.rmk: likewise
2551         * conf/sparc64-ieee1275.rmk: likewise
2552         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
2554 2009-06-16  Pavel Roskin  <proski@gnu.org>
2556         * configure.ac: Avoid '==' in test command, it's not portable.
2558 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
2560         Probe command
2562         * commands/probe.c: new file
2563         * conf/common.rmk (pkglib_MODULES): add probe.mod
2564         (probe_mod_SOURCES): new variable
2565         (probe_mod_CFLAGS): likewise
2566         (probe_mod_LDFLAGS): likewise
2567         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2568         * conf/i386-ieee1275.rmk: likewise
2569         * conf/i386-pc.rmk: likewise
2570         * conf/powerpc-ieee1275.rmk: likewise
2571         * conf/sparc64-ieee1275.rmk: likewise
2573 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
2575         Fix handling of string like \"hello\" and "a
2576         b"
2578         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
2579         (grub_script_yylex): fix parsing of quoting, escaping and newline
2581 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
2583         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
2584         handling
2586 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
2588         * util/grub-mkconfig.in: Fix parsing of --output option.
2590 2009-06-12  Pavel Roskin  <proski@gnu.org>
2592         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
2593         genmk.rb don't need to be generated or installed.
2595 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
2597         * commands/i386/pc/drivemap_int13h.S: add more comments
2599 2009-06-11  Pavel Roskin  <proski@gnu.org>
2601         * Makefile.in (uninstall): Uninstall manuals.
2603         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
2604         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
2605         and update-grub_lib in two places.
2606         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
2608         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
2609         a compiler warning.
2611         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
2612         `entry_lo' to fix variable shadowing.
2614 2009-06-11  Christian Franke  <franke@computer.org>
2616         * kern/misc.c (__enable_execute_stack): Add missing return type
2617         to prevent gcc warning.
2619 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2621         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
2623 2009-06-11  Pavel Roskin  <proski@gnu.org>
2625         * Makefile.in: Don't rely on any scripts being executable.
2626         Always use $(SHELL) to run shell scripts.
2628         * configure.ac: Always define ___main if using -nostdlib.  This
2629         fixes tests on Cygwin.
2631 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
2633         UDF fix
2635         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
2636         is in bytes and not in blocks
2638 2009-06-11  Pavel Roskin  <proski@gnu.org>
2640         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
2641         warning.
2643 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
2645         * util/grub.d/30_os-prober.in: Fix a comment. Source
2646         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
2647         to set the root device.  Place drivemap command in the generated
2648         chain entry.
2650 2009-06-11  Pavel Roskin  <proski@gnu.org>
2652         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
2653         have long been resolved.
2655 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
2657         * util/grub.d/10_linux.in: Capitalise "Linux".
2659         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
2661 2009-06-11  Pavel Roskin  <proski@gnu.org>
2663         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
2664         fix a gcc warning and ensure that the function won't ever exit.
2666         * kern/i386/ieee1275/init.c: Add missing prototype for
2667         grub_stop_floppy().
2669         * loader/ieee1275/multiboot2.c [__i386__]: Include
2670         grub/cpu/multiboot.h.
2672         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
2673         casts to short - they are not portable and cause warnings.  Fix
2674         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
2676 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
2678         Drivemap fixes
2680         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
2681         new function
2682         (grub_get_root_biosnumber_saved): new variable
2683         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
2684         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
2685         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
2686         %dx after the call if necessary
2687         * conf/common.rmk (pkglib_MODULES): remove boot.mod
2688         (boot_mod_SOURCES): remove
2689         (boot_mod_CFLAGS): remove
2690         (boot_mod_LDFLAGS): remove
2691         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
2692         (boot_mod_SOURCES): new variable
2693         (boot_mod_CFLAGS): likewise
2694         (boot_mod_LDFLAGS): likewise
2695         * conf/i386-efi.rmk: likewise
2696         * conf/i386-ieee1275.rmk: likewise
2697         * conf/i386-pc.rmk: likewise
2698         * conf/powerpc-ieee1275.rmk: likewise
2699         * conf/sparc64-ieee1275.rmk: likewise
2700         * conf/x86_64-efi.rmk: likewise
2701         * include/grub/i386/pc/biosnum.h: new file
2702         * lib/i386/pc/biosnum.c: likewise
2703         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
2704         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
2705         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2707 2009-06-10  Pavel Roskin  <proski@gnu.org>
2709         * io/gzio.c (test_header): Don't reuse one buffer for all data.
2710         Use separate variables.  Read only the file size at the end, but
2711         not the checksum that we don't use.
2713         * kern/file.c (grub_file_read): Use void pointer for the buffer.
2714         Adjust all callers.
2716         * kern/ieee1275/openfw.c: Remove libc includes.
2717         * kern/ieee1275/cmain.c: Likewise.
2718         * include/grub/ieee1275/ieee1275.h: Likewise.
2720         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
2721         compiler warnings.
2723 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2725         * Makefile.in: Remove all trailing whitespace.
2726         * conf/i386-pc.rmk: Likewise.
2727         * conf/powerpc-ieee1275.rmk: Likewise.
2728         * conf/sparc64-ieee1275.rmk: Likewise.
2729         * docs/grub.texi: Likewise.
2730         * docs/texinfo.tex: Likewise.
2731         * disk/fs_uuid.c: Likewise.
2732         * disk/lvm.c: Likewise.
2733         * disk/scsi.c: Likewise.
2734         * disk/ata.c: Likewise.
2735         * disk/ieee1275/ofdisk.c: Likewise.
2736         * disk/i386/pc/biosdisk.c: Likewise.
2737         * disk/host.c: Likewise.
2738         * disk/raid.c: Likewise.
2739         * disk/efi/efidisk.c: Likewise.
2740         * disk/usbms.c: Likewise.
2741         * disk/memdisk.c: Likewise.
2742         * disk/loopback.c: Likewise.
2743         * kern/powerpc/dl.c: Likewise.
2744         * kern/device.c: Likewise.
2745         * kern/dl.c: Likewise.
2746         * kern/sparc64/dl.c: Likewise.
2747         * kern/ieee1275/ieee1275.c: Likewise.
2748         * kern/term.c: Likewise.
2749         * kern/fs.c: Likewise.
2750         * kern/i386/dl.c: Likewise.
2751         * kern/i386/pc/startup.S: Likewise.
2752         * kern/i386/pc/init.c: Likewise.
2753         * kern/i386/pc/mmap.c: Likewise.
2754         * kern/i386/pc/lzo1x.S: Likewise.
2755         * kern/i386/ieee1275/init.c: Likewise.
2756         * kern/i386/realmode.S: Likewise.
2757         * kern/i386/tsc.c: Likewise.
2758         * kern/partition.c: Likewise.
2759         * kern/corecmd.c: Likewise.
2760         * kern/file.c: Likewise.
2761         * kern/efi/efi.c: Likewise.
2762         * kern/efi/init.c: Likewise.
2763         * kern/efi/mm.c: Likewise.
2764         * kern/main.c: Likewise.
2765         * kern/err.c: Likewise.
2766         * kern/env.c: Likewise.
2767         * kern/disk.c: Likewise.
2768         * kern/generic/millisleep.c: Likewise.
2769         * kern/generic/rtc_get_time_ms.c: Likewise.
2770         * kern/misc.c: Likewise.
2771         * kern/parser.c: Likewise.
2772         * genmk.rb: Likewise.
2773         * configure.ac: Likewise.
2774         * boot/i386/pc/diskboot.S: Likewise.
2775         * boot/i386/pc/pxeboot.S: Likewise.
2776         * boot/i386/pc/boot.S: Likewise.
2777         * boot/i386/pc/lnxboot.S: Likewise.
2778         * boot/i386/pc/cdboot.S: Likewise.
2779         * parttool/pcpart.c: Likewise.
2780         * video/readers/tga.c: Likewise.
2781         * video/video.c: Likewise.
2782         * video/bitmap.c: Likewise.
2783         * lib/envblk.c: Likewise.
2784         * lib/i386/setjmp.S: Likewise.
2785         * fs/xfs.c: Likewise.
2786         * fs/afs.c: Likewise.
2787         * fs/fat.c: Likewise.
2788         * fs/ntfs.c: Likewise.
2789         * fs/udf.c: Likewise.
2790         * fs/affs.c: Likewise.
2791         * fs/iso9660.c: Likewise.
2792         * fs/hfs.c: Likewise.
2793         * fs/fshelp.c: Likewise.
2794         * fs/ext2.c: Likewise.
2795         * fs/jfs.c: Likewise.
2796         * fs/reiserfs.c: Likewise.
2797         * fs/hfsplus.c: Likewise.
2798         * fs/minix.c: Likewise.
2799         * fs/cpio.c: Likewise.
2800         * fs/sfs.c: Likewise.
2801         * fs/ufs.c: Likewise.
2802         * efiemu/prepare.c: Likewise.
2803         * efiemu/loadcore_common.c: Likewise.
2804         * efiemu/runtime/efiemu.sh: Likewise.
2805         * efiemu/runtime/efiemu.S: Likewise.
2806         * efiemu/runtime/efiemu.c: Likewise.
2807         * efiemu/pnvram.c: Likewise.
2808         * efiemu/main.c: Likewise.
2809         * efiemu/i386/pc/cfgtables.c: Likewise.
2810         * efiemu/i386/loadcore64.c: Likewise.
2811         * efiemu/i386/loadcore32.c: Likewise.
2812         * efiemu/loadcore.c: Likewise.
2813         * efiemu/symbols.c: Likewise.
2814         * efiemu/mm.c: Likewise.
2815         * include/grub/autoefi.h: Likewise.
2816         * include/grub/datetime.h: Likewise.
2817         * include/grub/term.h: Likewise.
2818         * include/grub/hfs.h: Likewise.
2819         * include/grub/lvm.h: Likewise.
2820         * include/grub/i386/tsc.h: Likewise.
2821         * include/grub/i386/linux.h: Likewise.
2822         * include/grub/i386/xnu.h: Likewise.
2823         * include/grub/i386/efiemu.h: Likewise.
2824         * include/grub/i386/pc/biosdisk.h: Likewise.
2825         * include/grub/i386/pc/memory.h: Likewise.
2826         * include/grub/i386/pc/vbe.h: Likewise.
2827         * include/grub/parttool.h: Likewise.
2828         * include/grub/video.h: Likewise.
2829         * include/grub/memory.h: Likewise.
2830         * include/grub/fs.h: Likewise.
2831         * include/grub/partition.h: Likewise.
2832         * include/grub/xnu.h: Likewise.
2833         * include/grub/efi/api.h: Likewise.
2834         * include/grub/efi/pe32.h: Likewise.
2835         * include/grub/efi/memory.h: Likewise.
2836         * include/grub/multiboot.h: Likewise.
2837         * include/grub/usbdesc.h: Likewise.
2838         * include/grub/multiboot2.h: Likewise.
2839         * include/grub/acpi.h: Likewise.
2840         * include/grub/efiemu/efiemu.h: Likewise.
2841         * include/grub/disk.h: Likewise.
2842         * include/grub/ieee1275/ieee1275.h: Likewise.
2843         * include/grub/net.h: Likewise.
2844         * include/grub/machoload.h: Likewise.
2845         * include/grub/macho.h: Likewise.
2846         * include/multiboot.h: Likewise.
2847         * genmoddep.awk: Likewise.
2848         * normal/main.c: Likewise.
2849         * normal/menu_entry.c: Likewise.
2850         * normal/menu_viewer.c: Likewise.
2851         * normal/completion.c: Likewise.
2852         * normal/cmdline.c: Likewise.
2853         * normal/misc.c: Likewise.
2854         * normal/datetime.c: Likewise.
2855         * bus/usb/usbtrans.c: Likewise.
2856         * bus/usb/ohci.c: Likewise.
2857         * bus/usb/uhci.c: Likewise.
2858         * bus/usb/usb.c: Likewise.
2859         * mmap/efi/mmap.c: Likewise.
2860         * mmap/i386/pc/mmap_helper.S: Likewise.
2861         * mmap/i386/pc/mmap.c: Likewise.
2862         * mmap/i386/mmap.c: Likewise.
2863         * mmap/i386/uppermem.c: Likewise.
2864         * mmap/mmap.c: Likewise.
2865         * commands/acpi.c: Likewise.
2866         * commands/echo.c: Likewise.
2867         * commands/blocklist.c: Likewise.
2868         * commands/loadenv.c: Likewise.
2869         * commands/usbtest.c: Likewise.
2870         * commands/boot.c: Likewise.
2871         * commands/parttool.c: Likewise.
2872         * commands/search.c: Likewise.
2873         * commands/cat.c: Likewise.
2874         * commands/i386/pc/play.c: Likewise.
2875         * commands/i386/pc/drivemap.c: Likewise.
2876         * commands/i386/pc/vbeinfo.c: Likewise.
2877         * commands/i386/pc/acpi.c: Likewise.
2878         * commands/i386/pc/vbetest.c: Likewise.
2879         * commands/ls.c: Likewise.
2880         * commands/cmp.c: Likewise.
2881         * commands/test.c: Likewise.
2882         * commands/efi/acpi.c: Likewise.
2883         * commands/gptsync.c: Likewise.
2884         * commands/help.c: Likewise.
2885         * partmap/amiga.c: Likewise.
2886         * partmap/apple.c: Likewise.
2887         * partmap/acorn.c: Likewise.
2888         * partmap/pc.c: Likewise.
2889         * partmap/sun.c: Likewise.
2890         * partmap/gpt.c: Likewise.
2891         * script/sh/lexer.c: Likewise.
2892         * script/sh/function.c: Likewise.
2893         * font/font.c: Likewise.
2894         * font/font_cmd.c: Likewise.
2895         * loader/powerpc/ieee1275/linux.c: Likewise.
2896         * loader/efi/chainloader.c: Likewise.
2897         * loader/multiboot_loader.c: Likewise.
2898         * loader/macho.c: Likewise.
2899         * loader/i386/multiboot.c: Likewise.
2900         * loader/i386/linux.c: Likewise.
2901         * loader/i386/pc/linux.c: Likewise.
2902         * loader/i386/pc/multiboot2.c: Likewise.
2903         * loader/i386/pc/chainloader.c: Likewise.
2904         * loader/i386/pc/xnu.c: Likewise.
2905         * loader/i386/bsd_trampoline.S: Likewise.
2906         * loader/i386/efi/linux.c: Likewise.
2907         * loader/i386/multiboot_elfxx.c: Likewise.
2908         * loader/i386/bsd_helper.S: Likewise.
2909         * loader/i386/bsd.c: Likewise.
2910         * loader/i386/linux_trampoline.S: Likewise.
2911         * loader/i386/xnu_helper.S: Likewise.
2912         * loader/i386/xnu.c: Likewise.
2913         * loader/i386/bsd_pagetable.c: Likewise.
2914         * loader/i386/multiboot_helper.S: Likewise.
2915         * loader/xnu.c: Likewise.
2916         * loader/xnu_resume.c: Likewise.
2917         * io/gzio.c: Likewise.
2918         * term/efi/console.c: Likewise.
2919         * term/terminfo.c: Likewise.
2920         * term/ieee1275/ofconsole.c: Likewise.
2921         * term/i386/pc/serial.c: Likewise.
2922         * term/i386/pc/vesafb.c: Likewise.
2923         * term/i386/pc/vga.c: Likewise.
2924         * term/usb_keyboard.c: Likewise.
2925         * term/gfxterm.c: Likewise.
2926         * aclocal.m4: Likewise.
2927         * util/lvm.c: Likewise.
2928         * util/grub.d/30_os-prober.in: Likewise.
2929         * util/grub.d/10_hurd.in: Likewise.
2930         * util/console.c: Likewise.
2931         * util/grub-macho2img.c: Likewise.
2932         * util/grub-probe.c: Likewise.
2933         * util/hostfs.c: Likewise.
2934         * util/i386/pc/grub-mkimage.c: Likewise.
2935         * util/i386/pc/grub-setup.c: Likewise.
2936         * util/i386/efi/grub-mkimage.c: Likewise.
2937         * util/grub-mkconfig.in: Likewise.
2938         * util/raid.c: Likewise.
2939         * util/resolve.c: Likewise.
2940         * util/grub-mkdevicemap.c: Likewise.
2941         * util/grub-emu.c: Likewise.
2942         * util/getroot.c: Likewise.
2943         * util/hostdisk.c: Likewise.
2944         * util/usb.c: Likewise.
2945         * util/grub-editenv.c: Likewise.
2946         * util/misc.c: Likewise.
2948 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
2950         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
2951         `genparttoollist.sh'.
2952         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
2953         Add `*.sh' to the list find searches for and change `mdate.sh'
2954         to `mdate-sh'.
2956 2009-06-10  Pavel Roskin  <proski@gnu.org>
2958         * include/grub/multiboot2.h: Provide compatibility defines for
2959         multiboot2.h.
2960         * include/multiboot2.h: Include stdint.h only if needed, using
2961         angle brackets.
2962         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
2963         grub/multiboot2.h.
2964         * loader/ieee1275/multiboot2.c: Likewise.
2965         * loader/multiboot2.c: Likewise.
2966         * loader/multiboot_loader.c: Likewise.
2968         * configure.ac: Use -nostdlib when probing for the target.  It
2969         should not be required to have libc for the target.
2971         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
2972         they fail without libc headers for the target.
2973         * include/grub/powerpc/libgcc.h: Use weak attribute for all
2974         exports.
2975         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
2976         preprocessor conditionals.
2978         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
2979         build system doesn't need to be aware of the tar.c internals.
2981 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
2983         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
2985 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
2987         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
2988         disk limit to 26 for IDE, Virtio, Xen and SCSI.
2990 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
2992         * util/i386/pc/grub-install.in: Change the error message if UUIDs
2993         aren't available if ata.mod gets used.
2995 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
2997         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
2998         initialising controller.
2999         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3001 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
3003         * util/i386/pc/grub-install.in: Add a parameter --disk-module
3004         to choose between ata and biosdisk module on i386-pc.
3006 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
3008         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
3009         Subclass and Programming Interface fields in terms of the 3 byte
3010         Class Code register.
3011         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3013         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
3014         interface is OHCI.  Add grub_dprintf for symmetry with
3015         bus/usb/uhci.c.
3016         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
3017         interface is UHCI.  Add interf variable for programming
3018         interface.  Print interface with class/subclass.
3020         * bus/usb/ohci.c: Set interf with correct field.
3022         * bus/usb/uhci.c: Remove unneeded doubled lines.
3023         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
3024         Remove whitespace inside comment.
3026 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
3028         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
3029         as fallback an equivalent option without depth.
3031 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
3033         Not fail if unable to retrieve C/H/S on LBA disks
3035         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
3036         if unable to retrieve C/H/S on LBA disks
3038 2009-06-08  Pavel Roskin  <proski@gnu.org>
3040         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
3041         about aliasing.
3043 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
3045         * Makefile.in (uninstall): Remove all $lib_DATA files.
3047 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
3049         Bugfix: install on partitionless device
3051         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
3052         is a whole disk
3054 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
3056         * Makefile.in (uninstall): Remove all $include_DATA files.
3058 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
3060         * commands/true.c: New file.  Implement the true and false commands.
3061         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
3062         (true_mod_SOURCES): New variable.
3063         (true_mod_CFLAGS): Likewise.
3064         (true_mod_LDFLAGS): Likewise.
3066 2009-06-05  Colin D Bennett  <colin@gibibit.com>
3068         Optimized font character lookup using binary search instead of linear
3069         search.  Fonts now are required to have the character index ordered by
3070         code point.
3072         * font/font.c (load_font_index): Verify that fonts have ordered
3073         character indices.
3074         (find_glyph): Use binary search instead of linear search to find a
3075         character in a font.
3077 2009-06-05  Michael Scherer  <misc@mandriva.org>
3079         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
3080         uses case sensitive btree.
3081         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
3082         only for case insensitive filesystems.
3084 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
3086         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
3087         * conf/common.rmk (search_mod_CFLAGS): likewise
3089 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3091         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
3092         compensate a compiler bug
3094 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3096         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
3097         instead of '\b'
3099 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3101         Definitions for creating asm symbols with Apple's CC
3103         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
3104         [APPLE_CC] (VARIABLE): likewise
3106 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3108         Disable lnxboot.img when compiled
3109         with Apple's CC
3111         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
3112         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
3113         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
3114         [! APPLE_CC] (CODE_LENG): skip
3115         [! APPLE_CC] (setup_sects): likewise
3116         [! APPLE_CC]: skip filling
3118 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3120         Address in trampolines based on 32-bit registers when compiled
3121         with Apple's CC
3123         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
3124         for addresses
3125         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
3127 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3129         Avoid aliases when compiling with Apple's CC for PCBIOS machine
3131         * kern/misc.c [APPLE_CC] (memcpy): new function
3132         [APPLE_CC] (memmove): likewise
3133         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
3134         (memcpy): define alias conditionally on !APPLE_CC
3135         (memset): likewise
3136         (abort): likewise
3137         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
3138         APPLE_CC are defined
3139         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
3140         (grub_assert_fail): make prototype conditional
3142 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3144         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
3146         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
3147         grub-macho2img
3148         (CLEANFILES): add grub-macho2img
3149         (grub_macho2img_SOURCES): new variable
3150         * kern/i386/pc/startup.S (bss_start): new variable
3151         (bss_end): likewise
3152         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
3153         * util/grub-macho2img.c: new file
3155 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3157         Use objconv when compiling with Apple's CC
3159         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
3160         (efiemu64.o): likewise
3161         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
3162         when compiling with Apple's CC
3163         (efiemu64_s.o): likewise
3164         * configure.ac: check for objconv when compiling with Apple's CC
3165         * genmk.rb: use objconv for modules when compiled with Apple's CC
3167 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3169         Define segment as well as section when compiling with
3170         Apple's CC
3172         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
3173         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
3174         (efiemu_convert_pointer): likewise
3175         (efiemu_set_virtual_address_map): likewise
3176         (efiemu_convert_pointer): likewise
3177         (efiemu_getcrc32): likewise
3178         (init_crc32_table): likewise
3179         (reflect): likewise
3180         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
3181         (GRUB_MOD_DEP): likewise
3183 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3185         Allow a compilation without -mcmodel=large
3187         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
3188         when compiled without -mcmodel=large
3189         (filter_memory_map): remove memory post 4 GiB when compiled
3190         without -mcmodel=large
3191         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
3192         TARGET_CFLAGS when -mcmodel=large isn't supported
3194 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3196         Remove nested functions in efiemu core
3198         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
3200 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3202         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
3204         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
3205         temporary storage
3206         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
3207         using Apple's CC
3208         (grub_cpu_is_tsc_supported): likewise
3209         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
3211 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3213         Absolute addressing through constant with Apple's cc
3215         * kern/i386/pc/startup.S: Define necessary constants
3216         and address through it when using ABS with Apple's CC
3217         * boot/i386/pc/diskboot.S: likewise
3218         * boot/i386/pc/boot.S: likewise
3219         * boot/i386/pc/lnxboot.S: likewise
3220         * boot/i386/pc/cdboot.S: likewise
3221         * mmap/i386/pc/mmap_helper.S: likewise
3222         * commands/i386/pc/drivemap_int13h.S: likewise
3224 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3226         Check if compiler is apple cc
3228         * Makefile.in (ASFLAGS): new variable
3229         (TARGET_ASFLAGS): likewise
3230         (TARGET_MODULE_FORMAT): likewise
3231         (TARGET_APPLE_CC): likewise
3232         (OBJCONV): likewise
3233         (TARGET_IMG_CFLAGS): likewise
3234         (TARGET_CPPFLAGS): add includedir
3235         * configure.ac: call grub_apple_cc and grub_apple_target_cc
3236         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
3237         Check for linker script only if compiler isn't Apple's CC
3238         (TARGET_MODULE_FORMAT): set
3239         (TARGET_APPLE_CC): likewise
3240         (TARGET_ASFLAGS): likewise
3241         (ASFLAGS): likewise
3242         Check for objcopy only if compiler isn't Apple's CC
3243         Check for BSS symbol only if compiler isn't Apple's CC
3244         * genmk.rb: adapt nm options if we use Apple's utils
3245         * aclocal.m4 (grub_apple_cc): new test
3246         (grub_apple_target_cc): likewise
3248 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3250         Simplify sed expressions and improve awk
3252         * Makefile.in (install-local): simplify sed expression
3253         * gencmdlist.sh: likewise
3254         * genmoddep.awk: avoid adding module as a dependency of itself
3256 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3258         Add missing start symbols
3260         * boot/i386/pc/boot.S: add start
3261         * boot/i386/pc/pxeboot.S: likewise
3263 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3265         Fix wrong assumptions with grub-mkimage on EFI
3267         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
3268         (relocate_addresses): consider both r_addend and value at offset
3269         (make_mods_section): zerofill modinfo and header
3270         (convert_elf): write prefix here
3272 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3274         Use .asciz instead of .string
3276         * i386/pc/diskboot.S: use .asciz instead of .string
3277         * i386/pc/boot.S: likewise
3278         * include/grub/dl.h (GRUB_MOD_DEP): likewise
3279         (GRUB_MOD_NAME): likewise
3281 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3283         gfxpayload support
3285         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
3286         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
3287         (grub_video_setup): remove
3288         (grub_video_set_mode): new prototype
3289         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
3290         (vid_mode): remove
3291         (linux_vesafb_res): compile only on PCBIOS
3292         (grub_linux_boot): support gfxpayload
3293         * loader/i386/pc/xnu.c (video_hook): new function
3294         (grub_xnu_set_video): support gfxpayload
3295         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
3296         (DEFAULT_VIDEO_HEIGHT): likewise
3297         (DEFAULT_VIDEO_FLAGS): likewise
3298         (DEFAULT_VIDEO_MODE): new definition
3299         (video_hook): new function
3300         (grub_gfxterm_init): use grub_video_set_mode
3301         * util/grub.d/30_os-prober.in: remove explicit modesetting before
3302         loading xnu
3303         * video/video.c (grub_video_setup): removed
3304         (grub_video_set_mode): new function based on grub_gfxterm_init and
3305         grub_video_setup
3307 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3309         Avoid calling biosdisk in drivemap
3311         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
3312         (revparse_biosdisk): likewise
3313         (list_mappings): derive name from id directly
3314         (grub_cmd_drivemap): use tryparse_diskstring
3316 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
3318         Script fixes
3320         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
3321         (grub_lexer_param): add tokenonhold
3322         (grub_script_create_cmdline): remove cmdline. All callers updated
3323         (grub_script_function_create): make functionname
3324         grub_script_arg. All callers updated
3325         (grub_script_execute_argument_to_string): new prototype
3326         * kern/parser.c (state_transitions): reorder
3327         (grub_parser_cmdline_state): fix a bug and make more compact
3328         * script/sh/execute.c (grub_script_execute_argument_to_string):
3329         make global
3330         (grub_script_execute_cmdline): use new format
3331         * script/sh/function.c (grub_script_function_create): make functionname
3332         grub_script_arg. All callers updated
3333         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
3334         (grub_script_yylex): remove
3335         (grub_script_yylex2): renamed to ...
3336         (grub_script_yylex): ...renamed
3337         parse the expressions like a${b}c
3338         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
3339         (GRUB_PARSER_TOKEN_VAR): remove
3340         (GRUB_PARSER_TOKEN_NAME): likewise
3341         ("if"): declare as typeless
3342         ("while"): likewise
3343         ("function"): likewise
3344         ("else"): likewise
3345         ("then"): likewise
3346         ("fi"): likewise
3347         (text): remove
3348         (argument): likewise
3349         (script): accept empty scripts and make exit on error
3350         (arguments): use GRUB_PARSER_TOKEN_ARG
3351         (function): likewise
3352         (command): move error handling to script
3353         (menuentry): move grub_script_lexer_ref before
3354         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
3355         argument. All callers updated
3357 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
3359         Prevent GRUB from probing floppies during boot.
3361         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
3362         * commands/search.c (options): Add --no-floppy.
3363         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
3364         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
3365         --no-floppy when searching for UUIDs.
3367 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
3369         Simplify the code duplication in commands/search.c.
3371         * commands/search.c (search_label, search_fs_uuid): Merge into ...
3372         (search_fs): ... this.  Update all users.
3374 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
3376         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
3378 2009-05-28  Pavel Roskin  <proski@gnu.org>
3380         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
3381         Remove the original symlink explicitly.
3383         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
3384         just one slash.  That's how grub_fshelp_find_file() does it.
3386 2009-05-26  Pavel Roskin  <proski@gnu.org>
3388         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
3389         to `str'.
3391         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
3392         possibly unused.
3394 2009-05-25  Christian Franke  <franke@computer.org>
3396         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
3397         register.
3398         (grub_atapi_identify): Add wait after drive select.
3399         (grub_ata_identify): Do more strict status register check before
3400         calling grub_atapi_identify ().  Suppress error message if status
3401         register is 0x00 after command failure.  Add status register
3402         check after PIO read to avoid bogus identify due to stuck DRQ.
3403         Thanks to Pavel Roskin for testing.
3404         (grub_device_initialize): Remove unsafe status register check.
3405         Thanks to 'phcoder' for problem report and patch.
3406         Prevent sign extension in debug message.
3408 2009-05-23  Colin D Bennett  <colin@gibibit.com>
3410         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
3411         definition file, and functions defined in `normal/menu.c' have had
3412         their prototypes moved to `include/grub/menu.h' for consistency.
3414         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
3415         from normal.h.
3416         (grub_menu_get_entry): Likewise.
3417         (grub_menu_get_timeout): Likewise.
3418         (grub_menu_set_timeout): Likewise.
3419         (grub_menu_execute_entry): Likewise.
3420         (grub_menu_execute_with_fallback): Likewise.
3421         (grub_menu_entry_run): Likewise.
3423         * include/grub/normal.h: Re-ordered and grouped function
3424         prototypes by file that the function is defined in.
3425         (grub_menu_execute_callback): Removed; moved to menu.h.
3426         (grub_menu_get_entry): Likewise.
3427         (grub_menu_get_timeout): Likewise.
3428         (grub_menu_set_timeout): Likewise.
3429         (grub_menu_execute_entry): Likewise.
3430         (grub_menu_execute_with_fallback): Likewise.
3431         (grub_menu_entry_run): Likewise.
3432         (grub_menu_addentry): Renamed from this ...
3433         (grub_normal_add_menu_entry): ... to this.
3435         * normal/main.c (grub_menu_addentry): Renamed from this ...
3436         (grub_normal_add_menu_entry): ... to this.
3438         * script/sh/execute.c (grub_script_execute_menuentry): Update
3439         reference to renamed grub_menu_addentry function.
3441 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
3443         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
3445 2009-05-22  Pavel Roskin  <proski@gnu.org>
3447         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
3448         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
3449         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
3450         compiling for the i386 targets, but not for the utilities.
3452         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
3453         to grub_uint8_t.
3454         (grub_root_drive): Likewise.
3455         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
3456         remove alignment.
3457         (grub_root_drive): Change size to byte.
3458         (grub_start_addr): Remove.
3459         (grub_end_addr): Likewise.
3460         (grub_apm_bios_info): Likewise.
3462 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
3464         * normal/i386: Remove.
3465         * normal/powerpc: Likewise.
3466         * normal/sparc64: Likewise.
3467         * normal/x86_64: Likewise.
3469 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
3471         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
3472         * loader/i386/linux_trampoline.S: Fix indentation
3473         * loader/i386/xnu_helper.S: Likewise
3475 2009-05-18  Colin D Bennett  <colin@gibibit.com>
3477         Display error messages when parsing a Lua statement fails.
3478         Previously, executing a syntactically invalid statement like
3479         ")foo" or "bar;" would silently fail.
3481         * script/lua/grub_main.c (handle_lua_error): New function.
3482         (grub_lua_parse_line): Improved reporting of Lua parser and
3483         execution errors.
3485 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
3487         Remove -Werror which causes build to fail on some systems
3489         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
3490         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
3491         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
3493 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
3495         trampoline for linux on 64-bit platform
3497         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
3498         loader/i386/efi/linux_trampoline.S
3499         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
3500         declaration
3501         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
3502         here
3503         * loader/i386/linux_trampoline.S: moved here
3504         * loader/i386/efi/linux.c (allocate_pages): reserve space for
3505         trampoline
3506         (jumpvector): removed
3507         (grub_linux_trampoline_start): new declaration
3508         (grub_linux_trampoline_end): likewise
3509         (grub_linux_boot): use trampoline when on 64-bit platform
3510         * loader/i386/linux.c: likewise
3512 2009-05-16  Pavel Roskin  <proski@gnu.org>
3514         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
3515         const to avoid a warning.
3516         (grub_lua_setenv): Likewise.
3517         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
3518         lmsg to fix a warning.
3520 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
3522         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
3523         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3524         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
3525         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3526         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3527         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3528         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3529         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3531 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
3533         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
3535 2009-05-16  Bean  <bean123ch@gmail.com>
3537         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
3538         (lua_mod_SOURCES): New variable.
3539         (lua_mod_CFLAGS): Likewise.
3540         (lua_mod_LDFLAGS): Likewise.
3542         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
3543         (setjmp_mod_SOURCES): New variable.
3544         (setjmp_mod_CFLAGS): Likewise.
3545         (setjmp_LDFLAGS): Likewise.
3547         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
3548         (setjmp_mod_SOURCES): New variable.
3549         (setjmp_mod_CFLAGS): Likewise.
3550         (setjmp_LDFLAGS): Likewise.
3552         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3553         (setjmp_mod_SOURCES): New variable.
3554         (setjmp_mod_CFLAGS): Likewise.
3555         (setjmp_LDFLAGS): Likewise.
3557         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3558         (setjmp_mod_SOURCES): New variable.
3559         (setjmp_mod_CFLAGS): Likewise.
3560         (setjmp_LDFLAGS): Likewise.
3562         * normal/i386/setjmp.S: Moved from here ...
3563         * lib/i386/setjmp.S: ... Moved here
3564         * normal/x86_64/setjmp.S: Moved from here ...
3565         * lib/x86_64/setjmp.S: ... Moved here
3566         * normal/powerpc/setjmp.S: Moved from here ...
3567         * lib/powerpc/setjmp.S: ... Moved here
3568         * normal/sparc64/setjmp.S: Moved from here ...
3569         * lib/sparc64/setjmp.S: ... Moved here
3571         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
3572         returns_twice in mingw.
3574         * script/lua/grub_lib.c: New file.
3575         * script/lua/grub_lib.h: Likewise.
3576         * script/lua/grub_lua.h: Likewise.
3577         * script/lua/grub_main.c: Likewise.
3578         * script/lua/lapi.c: Likewise.
3579         * script/lua/lapi.h: Likewise.
3580         * script/lua/lauxlib.c: Likewise.
3581         * script/lua/lauxlib.h: Likewise.
3582         * script/lua/lbaselib.c: Likewise.
3583         * script/lua/lcode.c: Likewise.
3584         * script/lua/lcode.h: Likewise.
3585         * script/lua/ldblib.c: Likewise.
3586         * script/lua/ldebug.c: Likewise.
3587         * script/lua/ldebug.h: Likewise.
3588         * script/lua/ldo.c: Likewise.
3589         * script/lua/ldo.h: Likewise.
3590         * script/lua/ldump.c: Likewise.
3591         * script/lua/lfunc.c: Likewise.
3592         * script/lua/lfunc.h: Likewise.
3593         * script/lua/lgc.c: Likewise.
3594         * script/lua/lgc.h: Likewise.
3595         * script/lua/linit.c: Likewise.
3596         * script/lua/liolib.c: Likewise.
3597         * script/lua/llex.c: Likewise.
3598         * script/lua/llex.h: Likewise.
3599         * script/lua/llimits.h: Likewise.
3600         * script/lua/lmathlib.c: Likewise.
3601         * script/lua/lmem.c: Likewise.
3602         * script/lua/lmem.h: Likewise.
3603         * script/lua/loadlib.c: Likewise.
3604         * script/lua/lobject.c: Likewise.
3605         * script/lua/lobject.h: Likewise.
3606         * script/lua/lopcodes.c: Likewise.
3607         * script/lua/lopcodes.h: Likewise.
3608         * script/lua/loslib.c: Likewise.
3609         * script/lua/lparser.c: Likewise.
3610         * script/lua/lparser.h: Likewise.
3611         * script/lua/lstate.c: Likewise.
3612         * script/lua/lstate.h: Likewise.
3613         * script/lua/lstring.c: Likewise.
3614         * script/lua/lstring.h: Likewise.
3615         * script/lua/lstrlib.c: Likewise.
3616         * script/lua/ltable.c: Likewise.
3617         * script/lua/ltable.h: Likewise.
3618         * script/lua/ltablib.c: Likewise.
3619         * script/lua/ltm.c: Likewise.
3620         * script/lua/ltm.h: Likewise.
3621         * script/lua/lua.h: Likewise.
3622         * script/lua/luaconf.h: Likewise.
3623         * script/lua/lualib.h: Likewise.
3624         * script/lua/lundump.c: Likewise.
3625         * script/lua/lundump.h: Likewise.
3626         * script/lua/lvm.c: Likewise.
3627         * script/lua/lvm.h: Likewise.
3628         * script/lua/lzio.c: Likewise.
3629         * script/lua/lzio.h: Likewise.
3631 2009-05-16  Bean  <bean123ch@gmail.com>
3633         * include/grub/kernel.h (grub_module_header_types): Add type
3634         OBJ_TYPE_CONFIG.
3636         * kern/main.c (grub_load_config): New function.
3637         (grub_main): Call grub_load_config to read boot config.
3639         * grub-mkimage (generate_image): New parameter config_path.
3640         (options): New option --config.
3641         (main): Parse --config option, and pass it to generate_image.
3643 2009-05-14  Christian Franke  <franke@computer.org>
3645         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
3646         This fixes build on Cygwin.
3648 2009-05-14  Pavel Roskin  <proski@gnu.org>
3650         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
3651         jump.  This saves two bytes, so the typical case of 2 swapped
3652         drives would fit 32 bytes.
3654 2009-05-13  Pavel Roskin  <proski@gnu.org>
3656         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
3657         grub_uint32_t to avoid a warning.
3659         * loader/i386/linux.c (allocate_pages): When assigning
3660         real_mode_mem, cast through grub_size_t to fix a warning.  The
3661         code already makes sure that the value would fit a pointer.
3662         (grub_linux_setup_video): Cast render_target->data to
3663         grub_size_t to fix a warning.
3665 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
3667         * commands/i386/pc/drivemap.c: New file - implement drivemap
3668         command.
3669         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
3670         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
3672 2009-05-13  Pavel Roskin  <proski@gnu.org>
3674         * util/i386/pc/grub-setup.c (setup): Remove unused variable
3675         embedding_area_exists.
3677 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
3679         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
3680         it easier to understand / work with.
3681         Improve warning messages for cases where there's no embedding area,
3682         or when it is too small (or core.img too large).
3684 2009-05-13  Pavel Roskin  <proski@gnu.org>
3686         * loader/i386/pc/multiboot2.c: Add necessary includes for
3687         grub_multiboot2_real_boot().
3689         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
3690         PX record is always little-endian.  We only need the lower 2
3691         bytes of the mode.
3693         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
3694         facilitate code reuse.
3695         (grub_cpio_mount): Use "struct head", not a char buffer.  This
3696         fixes a warning reported by gcc 4.4.
3698         * kernel/disk.c (grub_disk_read): Use void pointer for the
3699         buffer.
3700         (grub_disk_write): Use const void pointer for the buffer.
3701         Adjust all callers.  Remove unnecessary casts.
3703 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
3705         * util/i386/pc/grub-install.in: Update copyright year.
3707 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3709         gptsync
3711         * commands/gptsync.c: new file
3712         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
3713         (gptsync_mod_SOURCES): new variable
3714         (gptsync_mod_CFLAGS): likewise
3715         (gptsync_mod_LDFLAGS): likewise
3716         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
3717         new definition
3718         (GRUB_PC_PARTITION_TYPE_HFS): likewise
3719         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
3720         * conf/i386-ieee1275.rmk: likewise
3721         * conf/i386-pc.rmk: likewise
3722         * conf/powerpc-ieee1275.rmk: likewise
3724 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
3726         Fixed grub-emu
3728         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
3729         (grub_dl_ref): likewise
3731 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
3733         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
3734         split in two functions (one for msdos and one for gpt).
3736 2009-05-08  Pavel Roskin  <proski@gnu.org>
3738         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
3739         not modified.
3741         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
3742         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
3743         Initialize them with -1.  Add sanity check for bad1.  Eliminate
3744         nerr variable.
3746 2009-05-08  David S. Miller  <davem@davemloft.net>
3748         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
3750 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
3752         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
3753         existence.
3755 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
3757         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3758         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
3760 2009-05-05  David S. Miller  <davem@davemloft.net>
3762         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
3764 2009-05-05  Pavel Roskin  <proski@gnu.org>
3766         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
3767         of grub_dl_ref() and grub_dl_unref().
3768         * commands/parttool.c: Remove preprocessor conditionals around
3769         grub_dl_ref() and grub_dl_unref().
3770         * fs/affs.c: Likewise.
3771         * fs/afs.c: Likewise.
3772         * fs/cpio.c: Likewise.
3773         * fs/ext2.c: Likewise.
3774         * fs/fat.c: Likewise.
3775         * fs/hfs.c: Likewise.
3776         * fs/hfsplus.c: Likewise.
3777         * fs/iso9660.c: Likewise.
3778         * fs/jfs.c: Likewise.
3779         * fs/minix.c: Likewise.
3780         * fs/ntfs.c: Likewise.
3781         * fs/reiserfs.c: Likewise.
3782         * fs/sfs.c: Likewise.
3783         * fs/udf.c: Likewise.
3784         * fs/ufs.c: Likewise.
3785         * fs/xfs.c: Likewise.
3786         * include/grub/dl.h: Likewise.
3787         * loader/xnu.c: Likewise.
3789 2009-05-04  Pavel Roskin  <proski@gnu.org>
3791         * commands/acpi.c: Remove unused variable my_mod.
3792         * partmap/amiga.c: Likewise.
3793         * partmap/apple.c: Likewise.
3794         * partmap/gpt.c: Likewise.
3795         * partmap/pc.c: Likewise.
3796         * partmap/sun.c: Likewise.
3797         * term/gfxterm.c: Likewise.
3798         * term/i386/pc/vesafb.c: Likewise.
3799         * term/i386/pc/vga.c: Likewise.
3801 2009-05-04  David S. Miller  <davem@davemloft.net>
3803         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
3804         pointer args to grub_ieee1275_get_property().
3806         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
3808         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
3809         devices, and do not traverse down under controller nodes.
3811         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
3812         (grub_ofdisk_open): Use it to un-escape "," characters.
3813         * kern/disk.c (find_part_sep): New.
3814         (grub_disk_open): Use it to find the first non-escaped ','
3815         character in the disk name.
3816         * util/ieee1275/devicemap.c (escape_of_path): New.
3817         (grub_util_emit_devicemap_entry): Use it.
3818         * util/sparc64/ieee1275/grub-install.in: Update script to
3819         strip partition specifiers properly by not triggering on
3820         '\' escaped ',' characters.
3822 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3824         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
3825         to 0x300.
3826         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
3827         resolutions.
3828         (linux_vesafb_modes): Add a lot of additional modes to the list (based
3829         on documentation from Wikipedia).
3831 2009-05-04  Pavel Roskin  <proski@gnu.org>
3833         * disk/ata.c: Spelling fixes.
3834         * disk/raid.c: Likewise.
3835         * disk/usbms.c: Likewise.
3836         * disk/dmraid_nvidia.c: Likewise.
3837         * kern/ieee1275/openfw.c: Likewise.
3838         * kern/ieee1275/init.c: Likewise.
3839         * kern/ieee1275/cmain.c: Likewise.
3840         * boot/i386/pc/cdboot.S: Likewise.
3841         * video/readers/png.c: Likewise.
3842         * video/i386/pc/vbe.c: Likewise.
3843         * fs/udf.c: Likewise.
3844         * fs/hfs.c: Likewise.
3845         * fs/reiserfs.c: Likewise.
3846         * efiemu/runtime/efiemu.c: Likewise.
3847         * efiemu/main.c: Likewise.
3848         * efiemu/mm.c: Likewise.
3849         * include/grub/elf.h: Likewise.
3850         * include/grub/xnu.h: Likewise.
3851         * include/grub/usbdesc.h: Likewise.
3852         * include/grub/usb.h: Likewise.
3853         * include/grub/script_sh.h: Likewise.
3854         * include/grub/lib/LzmaEnc.h: Likewise.
3855         * include/grub/efiemu/efiemu.h: Likewise.
3856         * include/grub/command.h: Likewise.
3857         * normal/menu.c: Likewise.
3858         * normal/main.c: Likewise.
3859         * normal/datetime.c: Likewise.
3860         * bus/usb/uhci.c: Likewise.
3861         * mmap/i386/uppermem.c: Likewise.
3862         * mmap/mmap.c: Likewise.
3863         * commands/acpi.c: Likewise.
3864         * commands/test.c: Likewise.
3865         * partmap/apple.c: Likewise.
3866         * font/font.c: Likewise.
3867         * loader/sparc64/ieee1275/linux.c: Likewise.
3868         * loader/macho.c: Likewise.
3869         * loader/i386/bsd_trampoline.S: Likewise.
3870         * loader/i386/bsd.c: Likewise.
3871         * loader/xnu.c: Likewise.
3872         * term/i386/pc/vesafb.c: Likewise.
3873         * term/usb_keyboard.c: Likewise.
3874         * util/resolve.c: Likewise.
3875         * util/getroot.c: Likewise.
3877 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3879         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
3881 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3883         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
3884         build error.
3886 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3888         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
3889         parameter only available on BIOS.
3891 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3893         Removed wrong semicolon in declaration
3895         * grub/misc.h (grub_dprintf): remove semicolon
3897 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3899         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
3900         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
3901         is done by grub_cmd_linux() now).
3902         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
3903         restore video to text mode.
3904         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
3905         indicates lack of "vga=" parameter.  "vga=0" is mapped to
3906         `GRUB_LINUX_VID_MODE_NORMAL'.
3908 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
3910         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
3911         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
3912         and `normal/script.c'.  Add `kern/rescue_reader.c',
3913         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
3914         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
3915         `grub_script.tab.c'.
3917         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3918         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3919         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3920         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3921         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3923         * Makefile.in: Remove duplicated 2008 in Copyright line.
3925 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
3927         * util/misc.c (grub_util_warn): New function.  Emits a warning
3928         unconditionally.
3929         * include/grub/util/misc.h (grub_util_warn): New declaration.
3931         * util/i386/pc/grub-install.in: Understand --force and pass it down
3932         to grub-setup.
3934         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
3935         down to setup().
3936         (setup): Improve error messages and add warnings when requested to
3937         install in odd layouts.  Refuse to install using blocklists unless
3938         --force was set.
3940 2009-05-04  martin f. krafft  <madduck@madduck.net>
3942         * disk/raid.c (grub_raid_scan_device): Improve debug message.
3944 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3946         Updated copyright year
3948         * fs/hfsplus.c: updated copyright year
3950 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
3952         HFS+ UUID
3954         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
3955         in the space previously used by unused3
3956         (grub_hfsplus_uuid): new function
3957         (grub_hfsplus_fs): added uuid field
3959 2009-05-03  Pavel Roskin  <proski@gnu.org>
3961         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
3962         suppress warnings.  It's no longer needed.
3963         * disk/host.c: Likewise.
3964         * disk/ata_pthru.c: Likewise.
3965         * disk/loopback.c: Likewise.
3966         * hook/datehook.c: Likewise.
3967         * parttool/pcpart.c: Likewise.
3968         * fs/i386/pc/pxe.c: Likewise.
3969         * fs/ntfscomp.c: Likewise.
3970         * efiemu/main.c: Likewise.
3971         * mmap/mmap.c: Likewise.
3972         * commands/crc.c: Likewise.
3973         * commands/hexdump.c: Likewise.
3974         * commands/hdparm.c: Likewise.
3975         * commands/acpi.c: Likewise.
3976         * commands/echo.c: Likewise.
3977         * commands/minicmd.c: Likewise.
3978         * commands/blocklist.c: Likewise.
3979         * commands/memrw.c: Likewise.
3980         * commands/loadenv.c: Likewise.
3981         * commands/usbtest.c: Likewise.
3982         * commands/lsmmap.c: Likewise.
3983         * commands/boot.c: Likewise.
3984         * commands/parttool.c: Likewise.
3985         * commands/configfile.c: Likewise.
3986         * commands/search.c: Likewise.
3987         * commands/ieee1275/suspend.c: Likewise.
3988         * commands/cat.c: Likewise.
3989         * commands/i386/pc/pxecmd.c: Likewise.
3990         * commands/i386/pc/play.c: Likewise.
3991         * commands/i386/pc/halt.c: Likewise.
3992         * commands/i386/pc/vbeinfo.c: Likewise.
3993         * commands/i386/pc/vbetest.c: Likewise.
3994         * commands/lspci.c: Likewise.
3995         * commands/date.c: Likewise.
3996         * commands/handler.c: Likewise.
3997         * commands/ls.c: Likewise.
3998         * commands/test.c: Likewise.
3999         * commands/cmp.c: Likewise.
4000         * commands/efi/loadbios.c: Likewise.
4001         * commands/efi/fixvideo.c: Likewise.
4002         * commands/halt.c: Likewise.
4003         * commands/help.c: Likewise.
4004         * commands/reboot.c: Likewise.
4005         * hello/hello.c: Likewise.
4006         * script/sh/main.c: Likewise.
4007         * loader/xnu.c: Likewise.
4008         * term/terminfo.c: Likewise.
4009         * term/i386/pc/serial.c: Likewise.
4010         * term/usb_keyboard.c: Likewise.
4012 2009-05-03  David S. Miller  <davem@davemloft.net>
4014         * normal/menu.c: Include grub/parser.h
4016 2009-05-03  Pavel Roskin  <proski@gnu.org>
4018         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
4019         not char*.
4020         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
4021         Suggested by Javier Martín <lordhabbit@gmail.com>
4023         * util/i386/pc/grub-mkrescue.in: Allow for the case when
4024         efiemu??.o doesn't exist.
4025         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
4026         copying.
4028 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
4030         FreeBSD 64-bit support
4032         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
4033         and loader/i386/bsd_trampoline.S
4034         (bsd_mod_ASFLAGS): new variable
4035         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
4036         (FREEBSD_MODTYPE_KERNEL64): likewise
4037         (grub_bsd64_trampoline_start): likewise
4038         (grub_bsd64_trampoline_end): likewise
4039         (grub_bsd64_trampoline_selfjump): likewise
4040         (grub_bsd64_trampoline_gdt): likewise
4041         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
4042         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
4043         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
4044         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
4045         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
4046         of "attrib" member
4047         * loader/i386/bsd_pagetable.c: new file
4048         * loader/i386/bsd_trampoline.S: likewise
4049         * loader/i386/bsd.c (ALIGN_QWORD): new macro
4050         (ALIGN_VAR): likewise
4051         (entry_hi): new variable
4052         (kern_end_mdofs): likewise
4053         (is_64bit): likewise
4054         (grub_freebsd_add_meta): use ALIGN_VAR
4055         (grub_e820_mmap): new declaration
4056         (grub_freebsd_add_mmap): new function
4057         (grub_freebsd_add_meta_module): support 64 bit kernels
4058         (grub_freebsd_list_modules): use ALIGN_VAR
4059         (gdt_descriptor): new declaration
4060         (grub_freebsd_boot): support 64 bit kernels
4061         (grub_bsd_elf64_hook): new function
4062         (grub_bsd_load_elf): support elf64
4064 2009-05-03  Bean  <bean123ch@gmail.com>
4066         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
4067         after we get the result of if statement.
4069 2009-05-03  Bean  <bean123ch@gmail.com>
4071         * Makefile.in (enable_efiemu): New variable.
4073         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
4074         set.
4075         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
4076         path.
4077         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
4078         path, add -mno-red-zone option.
4079         (efiemu64_s.o): Likewise.
4080         (efiemu64.o): Use macro $^ for source file.
4082         * configure.ac (--enable-efiemu): New option.
4084 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
4086         xnu support
4088         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
4089         (pkglib_MODULES): add xnu.mod
4090         (xnu_mod_SOURCES): new variable
4091         (xnu_mod_CFLAGS): likewise
4092         (xnu_mod_LDFLAGS): likewise
4093         (xnu_mod_ASFLAGS): likewise
4094         * conf/i386-pc.rmk: likewise
4095         * conf/x86_64-efi.rmk: likewise
4096         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
4097         new declaration
4098         * include/grub/i386/macho.h: new file
4099         * include/grub/i386/xnu.h: likewise
4100         * include/grub/macho.h: likewise
4101         * include/grub/machoload.h: likewise
4102         * include/grub/x86_64/macho.h: likewise
4103         * include/grub/x86_64/xnu.h: likewise
4104         * include/grub/xnu.h: likewise
4105         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
4106         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
4107         * loader/i386/efi/xnu.c: new file
4108         * loader/i386/pc/xnu.c: likewise
4109         * loader/i386/xnu.c: likewise
4110         * loader/i386/xnu_helper.S: likewise
4111         * loader/macho.c: likewise
4112         * loader/xnu.c: likewise
4113         * loader/xnu_resume.c: likewise
4114         * util/grub-dumpdevtree: likewise
4115         * include/grub/i386/pit.h: include grub/err.h
4116         (grub_pit_wait): export
4117         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
4119 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
4121         Efiemu
4123         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
4124         _linux_efi, linux_efi.
4125         new files in grub-emu
4126         new targets efiemu32.o and efiemu64.o
4127         * loader/linux_normal_efiemu.c: likewise
4128         * loader/i386/efi/linux.c: added preliminary efiemu support
4129         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
4130         files to copy
4131         * include/grub/autoefi.h: new file
4132         * include/grub/i386/efiemu.h: likewise
4133         * include/grub/i386/pc/efiemu.h: likewise
4134         * include/grub/efi/api.h: add LL suffix when necessary
4135         new definitions relating to tables
4136         * include/grub/efiemu/efiemu.h: new file
4137         * include/grub/efiemu/runtime.h: likewise
4138         * efiemu/prepare.c: likewise
4139         * efiemu/loadcore_common.c: likewise
4140         * efiemu/loadcore64.c: likewise
4141         * efiemu/runtime/efiemu.sh: likewise
4142         * efiemu/runtime/efiemu.S: likewise
4143         * efiemu/runtime/efiemu.c: likewise
4144         * efiemu/runtime/config.h: likewise
4145         * efiemu/prepare32.c: likewise
4146         * efiemu/main.c: likewise
4147         * efiemu/modules/pnvram.c: likewise
4148         * efiemu/modules/i386: likewise
4149         * efiemu/modules/i386/pc: likewise
4150         * efiemu/modules/acpi.c: likewise
4151         * efiemu/i386/pc/cfgtables.c: likewise
4152         * efiemu/i386/loadcore64.c: likewise
4153         * efiemu/i386/loadcore32.c: likewise
4154         * efiemu/prepare64.c: likewise
4155         * efiemu/loadcore.c: likewise
4156         * efiemu/symbols.c: likewise
4157         * efiemu/mm.c: likewise
4158         * efiemu/loadcore32.c: likewise
4160 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
4162         ACPI spoofing
4164         * commands/acpi.c: new file
4165         * commands/i386/pc/acpi.c: likewise
4166         * commands/efi/acpi.c: likewise
4167         * include/grub/acpi.h: likewise
4168         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
4169         (acpi_mod_SOURCES): new variable
4170         (acpi_mod_CFLAGS): likewise
4171         (acpi_mod_LDFLAGS): likewise
4172         * conf/i386-efi.rmk: likewise
4173         * conf/x86_64-efi.rmk: likewise
4175 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
4177         Missing part from mmap patch
4179         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
4180         (grub_mmap_unregister)
4181         (grub_mmap_free_and_unregister): use grub_mmap_register
4183 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
4185         Mmap services
4187         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
4188         * loader/i386/linux.c (find_mmap_size): likewise
4189         (allocate_pages): likewise
4190         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
4191         (grub_fill_multiboot_mmap): likewise
4192         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
4193         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
4194         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
4195         (OPENBSD_MMAP_RESERVED): likewise
4196         * include/grub/i386/pc/memory.h: include grub/memory.h
4197         (grub_lower_mem): removed
4198         (grub_upper_mem): likewise
4199         (GRUB_MACHINE_MEMORY_ACPI): new definition
4200         (GRUB_MACHINE_MEMORY_NVS): likewise
4201         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
4202         (GRUB_MACHINE_MEMORY_HOLE): likewise
4203         (grub_machine_mmap_register): likewise
4204         (grub_machine_mmap_unregister): likewise
4205         (grub_machine_get_upper): likewise
4206         (grub_machine_get_lower): likewise
4207         (grub_machine_get_post64): likewise
4208         * include/grub/i386/efi/memory.h: new file
4209         * include/grub/x86_64/efi/memory.h: likewise
4210         * include/grub/efi/memory.h: likewise
4211         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
4212         (mmap_mod_SOURCES): new variable
4213         (mmap_mod_LDFLAGS): likewise
4214         (mmap_mod_ASFLAGS): likewise
4215         * conf/i386-coreboot.rmk: likewise
4216         * conf/i386-ieee1275.rmk: likewise
4217         * conf/i386-efi.rmk: likewise
4218         * conf/x86_64-efi.rmk: likewise
4219         * include/grub/types.h (UINT_TO_PTR): new macro
4220         (PTR_TO_UINT32): likewise
4221         (PTR_TO_UINT64): likewise
4222         * include/grub/memory.h: new file
4223         * mmap/i386/pc/mmap.c: likewise
4224         * mmap/i386/pc/mmap_helper.S: likewise
4225         * mmap/i386/uppermem.c: likewise
4226         * mmap/mmap.c: likewise
4227         * mmap/efi/mmap.c: likewise
4228         * kern/i386/coreboot/init.c (grub_machine_init): don't use
4229         grub_upper_mem
4230         * kern/i386/pc/init.c (grub_lower_mem): removed variable
4231         (grub_upper_mem): likewise
4232         (grub_machine_init): don't use grub_upper_mem,
4233         make grub_lower_mem local
4234         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
4235         grub_mmap_iterate and grub_mmap_get_upper
4236         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
4238 2009-05-02  Bean  <bean123ch@gmail.com>
4240         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
4241         script/sh/parser.y.
4242         (pkglib_MODULES): Add normal.mod and sh.mod.
4243         (normal_SOURCES): New variable.
4244         (normal_mod_CFLAGS): Likewise.
4245         (normal_mod_LDFLAGS): Likewise.
4246         (sh_mod_SOURCES): Likewise.
4247         (sh_mod_CFLAGS): Likewise.
4248         (sh_mod_LDFLAGS): Likewise.
4250         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
4251         script/sh/lexer.c_DEPENDENCIES.
4252         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
4253         kern/rescue_reader.c and kern/rescue_parser.c.
4254         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
4255         (grub_emu_SOURCES): Change source files.
4256         (pkglib_MODULES): Remove normal.mod.
4257         (normal_SOURCES): Removed.
4258         (normal_mod_CFLAGS): Likewise.
4259         (normal_mod_LDFLAGS): Likewise.
4260         * conf/i386-coreboot.rmk: Likewise.
4261         * conf/i386-efi.rmk: Likewise.
4262         * conf/i386-ieee1276.rmk: Likewise.
4263         * conf/powerpc-ieee1275.rmk: Likewise.
4264         * conf/sparc64-ieee1275.rmk: Likewise.
4265         * conf/x86_64-efi.rmk: Likewise.
4267         * include/grub/command.h (grub_command_execute): New inline function.
4269         * include/grub/menu.h (grub_menu_entry): Removed commands field.
4271         * include/grub/normal.h: Remove <grub/setjmp.h>.
4272         (grub_fs_module_list): Moved to normal/autofs.c.
4273         (grub_exit_env): Removed.
4274         (grub_command_execute): Likewise.
4275         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
4276         parameter script.
4277         (read_command_list): New function declaration.
4278         (read_fs_list): Likewise.
4280         * include/parser.h: Include <grub/reader.h>.
4281         (grub_parser_split_cmdline): Change type of getline parameter.
4282         (grub_parser): New structure.
4283         (grub_parser_class): New variable.
4284         (grub_parser_execute): New function declaration.
4285         (grub_register_rescue_parser): Likewise.
4286         (grub_parser_register): New inline function.
4287         (grub_parser_unregister): Likewise.
4288         (grub_parser_get_current): Likewise.
4289         (grub_parser_set_current): Likewise.
4291         * include/grub/reader.h: New file.
4292         * kern/reader.c: Likewise.
4293         * kern/rescue_parser.c: Likewise.
4294         * kern/rescue_reader.c: Likewise.
4295         * normal/autofs.c: Likewise.
4296         * normal/dyncmd.c: Likewise.
4298         * include/grub/rescue.h: Removed.
4299         * normal/command.h: Likewise.
4301         * include/grub/script.h: Moved to ...
4302         * include/grub/script_sh.h: ... Moved here.
4303         * normal/execute.c: Moved to ...
4304         * script/sh/execute.c: ... Moved here.
4305         * normal/function.c: Moved to ...
4306         * script/sh/function.c: ... Moved here.
4307         * normal/lexer.c: Moved to ...
4308         * script/sh/lexer.c: ... Moved here.
4309         * normal/parser.y: Moved to ...
4310         * script/sh/parser.y: ... Moved here.
4311         * normal/script.c: Moved to ...
4312         * script/sh/script.c: ... Moved here.
4314         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
4315         <grub/reader.h>.
4316         (grub_exit_env): Removed.
4317         (fs_module_list): Moved to normal/autofs.c.
4318         (grub_file_getline): Don't handle comment here.
4319         (free_menu): Skip removed field entry->commands.
4320         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
4321         script parameter.
4322         (read_config_file): Removed nested parameter, change getline function.
4323         (grub_enter_normal_mode): Removed.
4324         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
4325         (read_command_list): Likewise.
4326         (autoload_fs_module): Moved to normal/autofs.c.
4327         (read_fs_list): Likewise.
4328         (reader_nested): New variable.
4329         (grub_normal_execute): Run parser.sh to switch to sh parser.
4330         (grub_cmd_rescue): Removed.
4331         (cmd_normal): Removed.
4332         (grub_cmd_normal): Unregister itself at the beginning. Don't register
4333         rescue command.
4334         (grub_cmdline_run): New function.
4335         (grub_normal_reader_init): Likewise.
4336         (grub_normal_read_line): Likewise.
4337         (grub_env_write_pager): Likewise.
4338         (cmdline): New variable.
4339         (grub_normal_reader): Likewise.
4340         (GRUB_MOD_INIT): Register normal reader and set as current, register
4341         pager hook, register normal command with grub_register_command_prio,
4342         so that it won't show up in command.lst.
4343         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
4344         grub_fs_autoload_hook.
4346         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
4347         (grub_menu_execute_entry): Replace grub_script_execute with
4348         grub_parser_execute, change parameter to grub_command_execute.
4350         * normal/menu_text.c: Remove <grub/script.h>.
4352         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
4353         and <grub/parser.h>.
4354         (run): Change editor_getline to use new parser interface. Change
4355         parameter to grub_command_execute.
4357         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
4358         <grub/reader.h> and <grub/parser.h>.
4359         (grub_load_normal_mode): Execute normal command.
4360         (grub_main): Call grub_register_core_commands,
4361         grub_register_rescue_parser and grub_register_rescue_reader, use
4362         grub_reader_loop to enter input loop.
4364         * kern/parser.c (grub_parser_split_cmdline): Change type of
4365         getline parameter.
4366         (grub_parser_class): New variable.
4367         (grub_parser_execute): New function.
4369         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
4370         * loader/multiboot2.c: Likewise.
4371         * loader/sparc64/ieee1275/linux.c: Likewise.
4373         * util/grub-emu.c (read_command_list): New dummy function.
4375 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
4377         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
4378         count to 16 for CCISS and IDA.
4380 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
4382         * normal/menu_text.c  (grub_wait_after_message): Print a newline
4383         after waiting for user input.
4385         * loader/i386/linux.c: Include `<grub/normal.h>'.
4386         (grub_cmd_linux): Improve the error message about `ask' mode, by
4387         waiting for user input so it's not missed (we can do this, since
4388         user requested interaction).
4390 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
4392         Added missing lst to grub-mkrescue
4394         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
4395         and ${input_dir}/parttool.lst
4397 2009-04-30  David S. Miller  <davem@davemloft.net>
4399         * util/hostdisk.c (device_is_wholedisk): New function.
4400         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
4401         zero only if device_is_wholedisk() returns true.
4403         * util/hostdisk.c (convert_system_partition_to_system_disk):
4404         Handle virtual disk devices named /dev/vdiskX as found on sparc
4405         and powerpc.
4407         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
4408         lettered partition specifier is found, convert to numbered.
4410 2009-04-29  David S. Miller  <davem@davemloft.net>
4412         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
4413         * include/grub/sparc64/ieee1275/memory.h: Likewise.
4415         * normal/command.c: Add missing newline at end of file.
4417         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
4418         warnings.
4419         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
4420         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
4421         grub_ofdisk_read): Likewise, and deal similarly with the fact that
4422         ihandles have a 32-bit type but need to be stored in a "void *".
4424 2009-04-28  Pavel Roskin  <proski@gnu.org>
4426         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
4427         not disk.  Adjust all dependencies.
4428         (grub_fs_uuid_close): Use grub_device_close(), not
4429         grub_disk_close().
4431         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
4432         parent's partition, don't copy it by reference, as it gets freed
4433         on close.
4435 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
4437         Preboot hooks support
4439         * commands/boot.c (struct grub_preboot_t): new declaration
4440         (preboots_head): new variable
4441         (preboots_tail): likewise
4442         (grub_loader_register_preboot_hook): new function
4443         (grub_loader_unregister_preboot_hook): likewise
4444         (grub_loader_set): launch preboot hooks
4445         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
4446         (grub_loader_register_preboot_hook): new declaration
4447         (grub_loader_unregister_preboot_hook): likewise
4449 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
4451         Warning fix
4453         * disk/scsi.c (grub_scsi_open): added missing cast when
4454         calling grub_dprintf
4456 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
4458         Bug and warning fixes
4460         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
4461         declaration
4462         * commands/test.c (test_parse): fixed bug with file tests and corrected
4463         declaration of find_file
4465 2009-04-26  Pavel Roskin  <proski@gnu.org>
4467         * Makefile.in: Don't install empty manual pages if help2man is
4468         missing.  Use help2man option for output, not shell redirection.
4470 2009-04-26  David S. Miller  <davem@davemloft.net>
4472         * util/grub-mkdevicemap.c (make_device_map): Add missing
4473         NESTED_FUNC_ATTR to process_device().
4475 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
4477         Test command
4479         * commands/test.c: rewritten to use bash-like test
4481 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
4483         Parttool autoloading and improvements
4485         * Makefile.in (pkglib_DATA): add parttool.lst
4486         (parttool.lst): new target
4487         * genmk.rb: generate parttool-*
4488         (CLEANFILES): add #{parttool}
4489         (PARTTOOLFILES): new variable
4490         * genparttoollist.sh: new file
4491         * parttool/pcpart.c (grub_pcpart_boot): more feedback
4492         (grub_pcpart_type): likewise
4493         * commands/parttool.c (helpmsg): new variable
4494         (grub_cmd_parttool): output help if not enough arguments are supplied
4495         autoload modules
4496         (GRUB_MOD_INIT(parttool)): use helpmsg
4498 2009-04-24  David S. Miller  <davem@davemloft.net>
4500         Avoiding opening same device multiple times in device iterator.
4502         * kern/device.c: (grub_device_iterate): Define struct part_ent,
4503         and use it to build a list of partitions in iterate_disk() and
4504         iterate_partition().
4506         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
4507         on disk->data.
4509         * disk/ieee1275/nand.c (grub_nand_iterate): Return
4510         grub_devalias_iterate() result instead of unconditional 0.
4511         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
4512         Also, capture hook return value, either directly or via
4513         grub_children_iterate(), and propagate to caller.
4514         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
4515         grub_children_iterate): Return value is now 'int' instead of
4516         'grub_err_t'.
4517         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
4518         like a proper iterator, stopping when hooks return non-zero.
4519         (grub_devalias_iterate): Likewise.
4521 2009-04-23  David S. Miller  <davem@davemloft.net>
4523         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
4525 2009-04-22  David S. Miller  <davem@davemloft.net>
4527         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
4528         is larger than address_cells, use that value for address_cells too.
4530         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
4531         IEEE1275_MAX_PATH_LEN): Define.
4532         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
4533         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
4534         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
4535         'devtype'.  Explicitly NULL terminate devalias expansion.
4537         * util/sparc64/ieee1275/misc.c: New file.
4538         * util/sparc64/ieee1275/grub-setup.c: New file.
4539         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
4540         * util/sparc64/ieee1275/grub-mkimage.c: New file.
4541         * util/sparc64/ieee1275/grub-install.in: New file.
4542         * util/ieee1275/ofpath.c: New file.
4543         * util/ieee1275/devicemap.c: New file.
4544         * util/devicemap.c: New file.
4545         * util/deviceiter.c: New file.
4546         * kern/sparc64/ieee1275/init.c: New file.
4547         * include/grub/util/ofpath.h: New file.
4548         * include/grub/util/deviceiter.h: New file.
4549         * util/grub-mkdevicemap.c: Include deviceiter.h.
4550         Implement using grub_util_emit_devicemap_entry and
4551         grub_util_iterate_devices.
4552         * conf/i386-corebook.rmk: Build util/deviceiter.c and
4553         util/devicemap.c into grub-mkdevicemap
4554         * conf/i386-efi.rmk: Likewise.
4555         * conf/i386-ieee1275.rmk: Likewise.
4556         * conf/i386-pc.rmk: Likewise.
4557         * conf/powerpc-ieee1275.rmk: Likewise.
4558         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
4559         images and installation utilities.  Build kernel as image
4560         instead of as elf binary.  Use common rules as much as possible.
4562 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
4564         Correct GPT definition
4566         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
4567         of "attrib" member
4569 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
4571         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
4573 2009-04-19  David S. Miller  <davem@davemloft.net>
4575         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
4576         (grub_rescue_cmd_linux): Rename to...
4577         (grub_cmd_linux): and fix prototype.
4578         (grub_rescue_cmd_initrd): Rename to...
4579         (grub_cmd_initrd): and fix prototype.
4580         (cmd_linux, cmd_initrd): New.
4581         (GRUB_MOD_INIT(linux)): Use grub_register_command().
4582         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
4584 2009-04-17  Pavel Roskin  <proski@gnu.org>
4586         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
4587         format.
4588         (grub_ohci_transfer): Likewise.
4590         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
4592         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
4593         return without a value.  Fix inconsistent indentation.
4595         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
4596         match struct grub_fs.
4598         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
4599         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
4600         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4601         * commands/lspci.c (grub_lspci_iter): Likewise.
4603 2009-04-16  Bean  <bean123ch@gmail.com>
4605         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
4606         value.
4608 2009-04-15  Pavel Roskin  <proski@gnu.org>
4610         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
4611         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
4612         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
4613         definitions.
4615 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4617         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
4618         that no multiple data or metadata areas are supported and `Unknown
4619         metadata header'.
4621 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4623         Move loader out of the kernel
4625         * kern/loader.c: moved to ...
4626         * commands/boot.c: ... moved here
4627         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
4628         * commands/boot.c (grub_cmd_boot): moved here. All users updated
4629         * include/grub/kernel.h (grub_machine_fini): export
4630         * include/grub/loader.h (grub_loader_is_loaded): update declaration
4631         (grub_loader_set): likewise
4632         (grub_loader_unset): likewise
4633         (grub_loader_boot): likewise
4634         * conf/common.rmk: new module boot.mod
4635         (pkglib_MODULES): add boot.mod
4636         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
4637         (grub_emu_SOURCES): likewise
4638         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
4639         (grub_emu_SOURCES): likewise
4640         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
4641         (grub_emu_SOURCES): likewise
4642         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
4643         (grub_emu_SOURCES): likewise
4644         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
4645         (grub_emu_SOURCES): likewise
4646         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
4647         (grub_emu_SOURCES): likewise
4648         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
4649         (grub_emu_SOURCES): likewise
4651 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4653         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
4655         * kern/misc.c (grub_itoa): Removed function
4656         (grub_ltoa): likewise
4657         (grub_vsprintf): use grub_lltoa
4659 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
4661         Restore grub-emu
4663         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
4664         * conf/i386-coreboot.rmk: likewise
4665         * conf/i386-ieee1275.rmk: likewise
4666         * conf/powerpc-ieee1275.rmk: likewise
4668 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
4670         * INSTALL: Add that `./autogen.sh' needs to be run before
4671         `./configure.'.
4673 2009-04-14  Bean  <bean123ch@gmail.com>
4675         * Makefile.in (pkglib_DATA): Add handler.lst.
4676         (handler.lst): New rule.
4678         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
4679         * conf/i386-coreboot.rmk: Likewise.
4680         * conf/i386-ieee1275.rmk: Likewise.
4681         * conf/i386-efi.rmk: Likewise.
4682         * conf/x86_64-efi.rmk: Likewise.
4683         * conf/powerpc-ieee1275.rmk: Likewise.
4684         * conf/sparc64-ieee1275.rmk: Likewise.
4686         * genhandlerlist.sh: New file.
4688         * genmk.rb: Add rules to generate handler.lst.
4690         * include/grub/normal.h (grub_file_getline): New function definition.
4691         (read_handler_list): Likewise.
4692         (free_handler_list): Likewise.
4694         * include/grub/term.h (grub_term_register_input): Add name parameter
4695         for auto generation of handler.lst.
4696         (grub_term_register_output): Likewise.
4698         * normal/handler.c: New file.
4700         * normal/main.c (get_line): Renamed to grub_file_getline.
4701         (read_config_file): Use the newly renamed grub_file_getline.
4702         (read_command_list): Likewise.
4703         (read_fs_list): Likewise.
4704         (grub_normal_execute): Call read_handler_list to parse handler.lst.
4705         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
4707         * term/efi/console.c (grub_console_init): Add name parameter for auto
4708         generation of handler.lst.
4709         * term/gfxterm.c: Likewise.
4710         * term/i386/pc/at_keyboard.c: Likewise.
4711         * term/i386/pc/console.c: Likewise.
4712         * term/i386/pc/serial.c: Likewise.
4713         * term/i386/pc/vesafb.c: Likewise.
4714         * term/i386/pc/vga.c: Likewise.
4715         * term/i386/pc/vga_text.c: Likewise.
4716         * term/ieee1275/ofconsole.c: Likewise.
4717         * term/usb_keyboard.c: Likewise.
4719 2009-04-14  Bean  <bean123ch@gmail.com>
4721         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
4722         properly with null character.
4724 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4726         * configure: Remove.
4727         * config.h.in: Likewise.
4728         * stamp-h.in: Likewise.
4729         * DISTLIST: Likewise.
4730         * conf/common.mk: Likewise.
4731         * conf/i386-coreboot.mk: Likewise.
4732         * conf/i386-efi.mk: Likewise.
4733         * conf/i386-ieee1275.mk: Likewise.
4734         * conf/i386.mk: Likewise.
4735         * conf/i386-pc.mk: Likewise.
4736         * conf/powerpc-ieee1275.mk: Likewise.
4737         * conf/sparc64-ieee1275.mk: Likewise.
4738         * conf/x86_64-efi.mk: Likewise.
4740         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
4741         develop on GRUB.
4743 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
4744             David S. Miller  <davem@davemloft.net>
4746         * util/hostdisk.c (make_device_name): Fix buffer length
4747         calculations.
4749 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
4751         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
4752         <sys/param.h> and <sys/sysctl.h>.
4753         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
4754         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
4755         opening the device and reset them afterwards.
4757 2009-04-13  Pavel Roskin  <proski@gnu.org>
4759         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
4760         Reported by John Stanley <jpsinthemix@verizon.net>
4762 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4764         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
4765         that name for menuentries when appropriate.
4767 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4769         * util/grub.d/10_freebsd.in: Add a missing `fi'.
4771 2009-04-13  Robert Millan  <rmh@aybabtu.com>
4773         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
4774         to Linux, simply abort telling the user it's no longer supported.
4776 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4778         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
4779         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
4780         `freebsd_loadenv' only when devices.hints exist.
4782 2009-04-13  Pavel Roskin  <proski@gnu.org>
4784         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
4786 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
4788         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
4789         partition number.
4790         (grub_drive): Likewise.
4792 2009-04-13  David S. Miller  <davem@davemloft.net>
4794         * kern/sparc64/ieee1275/ieee1275.c: New file.
4795         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
4796         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
4797         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
4798         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
4799         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
4800         grub_ieee1275_alloc_physmem): Declare new exported functions.
4802         * include/grub/sparc64/ieee1275/loader.h: New file.
4803         * include/grub/sparc64/ieee1275/memory.h: Likewise.
4804         * include/grub/sparc64/kernel.h: Likewise.
4805         * loader/sparc64/ieee1275/linux.c: Likewise.
4807         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
4808         (grub_fstest_SOURCES): Likewise.
4810         * util/hostdisk.c (make_device_name): Do not make any assumptions
4811         about the length of drive names.
4813         * kern/dl.c (grub_dl_load_file): Close file immediately when
4814         we are done using it.
4816 2009-04-12  David S. Miller  <davem@davemloft.net>
4818         * kern/misc.c (grub_ltoa): Fix cast when handling negative
4819         values.  Noticed by Pavel Roskin.
4821         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
4822         target compiler.
4824         * genmk.rb: Add more flexible image type specification, also
4825         pass --strip-unneeded to objcopy.
4826         * conf/i386-pc.rmk: Use *_FORMAT.
4827         * conf/i386-pc.mk: Rebuilt.
4829         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
4830         (OFDISK_HASH_SZ): Define.
4831         (ofdisk_hash): New hash table.
4832         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
4833         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
4834         instead of device phandle which is not unique.
4836         * kern/sparc64/ieee1275/init.c: Delete, replace with...
4837         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
4838         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
4839         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
4840         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
4841         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
4842         GRUB_KERNEL_MACHINE_DATA_END): Define.
4843         (grub_kernel_image_size, grub_total_module_size): Declare.
4845 2009-04-12  Pavel Roskin  <proski@gnu.org>
4847          * configure.ac: Change the logic when we check for target tools.
4848          Do it when the target is specified and it's different from the
4849          specified value of the host.
4851 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
4853         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
4854         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
4855         GNU/kFreeBSD. Check if a device is a character device. Use
4856         DIOCGMEDIASIZE to get the size.
4857         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
4858         support for GNU/kFreeBSD.
4859         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
4860         is a character device instead of a block device. Add support for
4861         FreeBSD device names.
4863         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
4864         is a character device instead of a block device.
4866         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
4867         is a character device instead of a block device.
4869 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
4871         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
4872         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
4873         FreeBSD. Check if a device is a character device. Use
4874         DIOCGMEDIASIZE to get the size.
4875         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
4876         support for FreeBSD.
4877         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
4878         is a character device instead of a block device. Add support for
4879         FreeBSD device names.
4881         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
4882         a character device instead of a block device.
4883         (grub_util_check_char_device): New function.
4885         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
4886         a character device instead of a block device.
4888         * include/grub/util/getroot.h (grub_util_check_char_device): New
4889         prototype.
4891 2009-04-11  David S. Miller  <davem@davemloft.net>
4893         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
4894         static libgcc.
4895         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
4896         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
4897         function, if present.
4898         (__bswapdi2): Likewise.
4900         * include/grub/sparc64/ieee1275/boot.h: New file.
4901         * boot/sparc64/ieee1275/boot.S: Likewise.
4902         * boot/sparc64/ieee1275/diskboot.S: Likewise.
4904         * kern/misc.c (grub_ltoa): New function.
4905         (grub_vsprintf): Use it to format 'long' integers.
4907 2009-04-10  David S. Miller  <davem@davemloft.net>
4909         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
4910         slots are of type grub_ieee1275_cell_t.
4911         (grub_nand_read): Likewise.
4912         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
4913         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
4914         macros are used to compare values in arg/ret block of the call.
4915         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4916         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
4917         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
4918         grub_ieee1275_instance_to_path, grub_ieee1275_write,
4919         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
4920         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
4921         grub_ieee1275_close, grub_ieee1275_set_property,
4922         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
4923         grub_ieee1275_cell_t.
4924         * kern/ieee1275/openfw.c (grub_map): Likewise.
4925         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
4926         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
4928         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
4929         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
4930         (grub_devalias_iterate): Likewise.
4932 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
4934         UFS improvements
4936         * fs/ufs.c (INODE_NBLOCKS): new definition
4937         (struct grub_ufs_dirent): added fields for non-BSD dirents
4938         (grub_ufs_get_file_block): fixed double indirect handling
4939         (grub_ufs_lookup_symlink): use more robust way to determine whether
4940         symlink is inline
4941         (grub_ufs_find_file): support for non-BSD dirents
4942         (grub_ufs_dir): support for non-BSD dirents
4944 2009-04-10  Bean  <bean123ch@gnail.com>
4946         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
4947         attribute, otherwise the size would be wrong for i386 platform.
4949         * include/grub/pci.h (grub_pci_read_word): New inline function.
4950         (grub_pci_read_byte): Likewise.
4951         (grub_pci_write): Likewise.
4952         (grub_pci_write_word): Likewise.
4953         (grub_pci_write_byte): Likewise.
4955         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
4957         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
4958         (find_framebuf): Scan pci to locate the frame buffer address.
4960         * commands/efi/fixvideo.c: New file.
4962         * commands/efi/loadbios.c: Likewise.
4964         * commands/memrw.c: Likewise.
4966         * util/grub-dumpbios.in: Likewise.
4968         * conf/common.rmk (grub-dumpbios): New utility.
4969         (pkglib_MODULES): New module memrw.mod.
4970         (memrw_mod_SOURCE): New macro.
4971         (memrw_mod_CFLAGS): Likewise.
4972         (memrw_mod_LDFLAGS): Likewise.
4974         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
4975         fixvideo.mod.
4976         (loadbios_mod_SOURCE): New macro.
4977         (loadbios_mod_CFLAGS): Likewise.
4978         (loadbios_mod_LDFLAGS): Likewise.
4979         (fixvideo_mod_SOURCE): Likewise.
4980         (fixvideo_mod_CFLAGS): Likewise.
4981         (fixvideo_mod_LDFLAGS): Likewise.
4983         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
4984         fixvideo.mod.
4985         (loadbios_mod_SOURCE): New macro.
4986         (loadbios_mod_CFLAGS): Likewise.
4987         (loadbios_mod_LDFLAGS): Likewise.
4988         (fixvideo_mod_SOURCE): Likewise.
4989         (fixvideo_mod_CFLAGS): Likewise.
4990         (fixvideo_mod_LDFLAGS): Likewise.
4992 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
4994         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
4996 2009-04-07  David S. Miller  <davem@davemloft.net>
4998         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
4999         support for R_SPARC_OLO10 relocations.  Fix compile warning for
5000         R_SPARC_WDISP30 case.
5001         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
5003 2009-04-06  Pavel Roskin  <proski@gnu.org>
5005         * include/grub/misc.h (ARRAY_SIZE): New macro.
5006         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
5007         New macro.
5008         * loader/i386/linux.c (allocate_pages): Use free_pages().
5009         (grub_linux_unload): Don't use free_pages().
5010         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
5011         wrong index.  Treat all other modes as text modes.
5012         (grub_cmd_linux): Initialize vid_mode unconditionally to
5013         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
5015         * commands/help.c (print_command_help): Use cmd->prio, not
5016         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
5018 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
5020         Parttool
5022         * parttool/pcpart.c: new file
5023         * commands/parttool.c: likewise
5024         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
5025         (parttool_mod_SOURCES): new variable
5026         (parttool_mod_CFLAGS): likewise
5027         (parttool_mod_LDFLAGS): likewise
5028         (pcpart_mod_SOURCES): likewise
5029         (pcpart_mod_CFLAGS): likewise
5030         (pcpart_mod_LDFLAGS): likewise
5031         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
5032         and parttool/pcpart.c
5033         * conf/i386-efi.rmk: likewise
5034         * conf/i386-ieee1275.rmk: likewise
5035         * conf/i386-pc.rmk: likewise
5036         * conf/powerpc-ieee1275.rmk: likewise
5037         * conf/sparc64-ieee1275.rmk: likewise
5038         * conf/x86_64-ieee1275.rmk: likewise
5040 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
5042         Support for mtime and further expandability of dir command
5044         * include/grub/lib/datetime.h: moved to ...
5045         * include/grub/datetime.h: ... moved here and added
5046         declaration of grub_unixtime2datetime. All users updated
5047         * include/grub/fs.h: new syntax for dir and mtime functions in
5048         struct grub_fs
5049         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
5050         and GRUB_FSHELP_FLAGS_MASK
5051         * commands/ls.c (grub_ls_list_files): Write mtime in long format
5052         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
5053         (grub_ext2_mtime): new function
5054         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
5055         (grub_hfsplus_mtime): new function
5056         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
5057         (GRUB_UFS_ATTR_FILE): likewise
5058         (GRUB_UFS_ATTR_LNK): likewise
5059         (struct grub_ufs_sblock): new fields mtime
5060         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
5061         all users updated
5062         (grub_ufs_dir): mtime support
5063         (grub_ufs_mtime): new function
5064         * fs/affs.c (grub_affs_dir): use new dir syntax
5065         * fs/afs.c (grub_afs_dir): likewise
5066         * fs/cpio.c (grub_cpio_dir): likewise
5067         * fs/fat.c (grub_fat_find_dir): likewise
5068         * fs/hfs.c (grub_hfs_dir): likewise
5069         * fs/iso9660.c (grub_iso9660_dir): likewise
5070         * fs/jfs.c (grub_jfs_dir): likewise
5071         * fs/minix.c (grub_minix_dir): likewise
5072         * fs/ntfs.c (grub_ntfs_dir): likewise
5073         * fs/reiserfs.c (grub_reiserfs_dir): likewise
5074         * fs/sfs.c (grub_sfs_dir): likewise
5075         * fs/xfs.c (grub_xfs_dir): likewise
5076         * util/hostfs.c (grub_hostfs_dir): likewise
5077         * lib/datetime.c: moved to ...
5078         * normal/datetime.c: ... moved here
5079         (grub_unixtime2datetime): new function
5080         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
5081         * normal/completion.c (iterate_dir): use new dir syntax
5082         * normal/misc.c (grub_normal_print_device_info): tell the
5083         last modification time of a volume
5084         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
5085         * conf/common.rmk: added lib/datetime.c to ls.mod
5086         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
5087         (normal_mod_SOURCES): likewise
5088         (datetime_mod_SOURCES): Removed lib/datetime.c
5089         * conf/i386-efi.rmk: likewise
5090         * conf/i386-ieee1275.rmk: likewise
5091         * conf/i386-pc.rmk: likewise
5092         * conf/powerpc-ieee1275.rmk: likewise
5093         * conf/sparc64-ieee1275.rmk: likewise
5094         * conf/x86_64-efi.rmk: likewise
5096 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
5098         Trim trailing spaces in FAT label and support mtools-like labels
5100         * fs/fat.c (grub_fat_iterate_dir): New function based
5101         on grub_fat_find_dir
5102         (grub_fat_find_dir): use grub_fat_iterate_dir
5103         (grub_fat_label): likewise
5105 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
5107         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
5108         and command.h
5109         remove extraneous kernel_elf_HEADERS
5111 2009-04-04  Bean  <bean123ch@gnail.com>
5113         * include/grub/util/misc.h: Add dummy function fsync for mingw.
5115         * util/misc.c: Likewise.
5117 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
5119         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
5120         instead of grub_printf.
5122 2009-04-03  Robert Millan  <rmh@aybabtu.com>
5124         * loader/i386/linux.c (grub_linux_setup_video): Fill
5125         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
5126         values from `mode info' structure instead of hardcoded
5127         values.
5129 2009-04-01  Pavel Roskin  <proski@gnu.org>
5131         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
5132         unused now.
5133         * genmk.rb: Likewise.
5134         * configure.ac: Likewise.
5136 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
5138         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
5139         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
5141 2009-04-01  David S. Miller  <davem@davemloft.net>
5143         * normal/sparc64/setjmp.S: Fix setjmp implementation.
5144         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5145         (grub_setjmp): Mark with 'returns_twice' attribute.
5146         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
5147         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
5148         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
5150 2009-04-01  Robert Millan  <rmh@aybabtu.com>
5152         Reapply fix from 2008-07-28 which was accidentally reverted; also
5153         perform the same fix to a similar check in same function.
5155         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5156         with the same number are found, just use issue a warning with
5157         grub_dprintf(), as this error has been reported to be non-fatal.
5159 2009-03-31  Pavel Roskin  <proski@gnu.org>
5161         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
5162         for cross-compilation.
5164 2009-03-30  Robert Millan  <rmh@aybabtu.com>
5166         Fix i386-ieee1275 build.
5168         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
5169         Remove declaration.
5171 2009-03-30  Pavel Roskin  <proski@gnu.org>
5173         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
5174         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
5175         zero-terminated, rely only on the strlen value.  Fix comparison
5176         of strings differing in length.
5178 2009-03-30  Robert Millan  <rmh@aybabtu.com>
5180         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
5181         checking for abi version.  Improve error messages on BIOS to notify
5182         user about `linux16' command.
5184 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
5186         Leak fixes
5188         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
5189         in case of collision
5190         * disk/scsi.c (grub_scsi_open): free scsi in case of error
5192 2009-03-29  Robert Millan  <rmh@aybabtu.com>
5194         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
5195         set `vid_mode' accordingly.
5196         (grub_linux_boot): Process `vid_mode' and set video mode.
5198 2009-03-29  Robert Millan  <rmh@aybabtu.com>
5200         * util/grub.d/10_linux.in (linux_entry): New function.
5201         Factorize generation of Linux boot entries.
5203 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
5205         Make the format of Environment Block plain text. The boot loader
5206         part is not tested well yet.
5208         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
5209         (buffer): Removed.
5210         (envblk): Likewise.
5211         (usage): Remove "info" and "clear". Add "unset". Update the
5212         description of "set", as this does not delete variables any
5213         longer.
5214         (create_envblk_file): Complete rewrite.
5215         (open_envblk_file): Likewise.
5216         (cmd_info): Removed.
5217         (cmd_list): Likewise.
5218         (cmd_set): Likewise.
5219         (cmd_clear): Likewise.
5220         (list_variables): New function.
5221         (write_envblk): Likewise.
5222         (set_variables): Likewise.
5223         (unset_variables): Likewise.
5224         (main): Complete rewrite.
5226         * commands/loadenv.c (buffer): Removed.
5227         (envblk): Likewise.
5228         (open_envblk_file): New function.
5229         (read_envblk_file): Complete rewrite.
5230         (grub_cmd_load_env): Likewise.
5231         (grub_cmd_list_env): Likewise.
5232         (struct blocklist): New struct.
5233         (free_blocklists): New function.
5234         (check_blocklists): Likewise.
5235         (write_blocklists): Likewise.
5236         (grub_cmd_save_env): Complete rewrite.
5238         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
5239         a plain text signature.
5240         (GRUB_ENVBLK_MAXLEN): Removed.
5241         (struct grub_envblk): Complete rewrite.
5242         (grub_envblk_find): Removed.
5243         (grub_envblk_insert): Likewise.
5244         (grub_envblk_open): New prototype.
5245         (grub_envblk_set): Likewise.
5246         (grub_envblk_delete): Put const to VALUE.
5247         (grub_envblk_iterate): Put const to NAME and VALUE.
5248         (grub_envblk_close): New prototype.
5249         (grub_envblk_buffer): New inline function.
5250         (grub_envblk_size): Likewise.
5252         * lib/envblk.c: Include grub/mm.h.
5253         (grub_env_find): Removed.
5254         (grub_envblk_open): New function.
5255         (grub_envblk_close): Likewise.
5256         (escaped_value_len): Likewise.
5257         (find_next_line): Likewise.
5258         (grub_envblk_insert): Removed.
5259         (grub_envblk_set): New function.
5260         (grub_envblk_delete): Complete rewrite.
5261         (grub_envblk_iterate): Likewise.
5263 2009-03-28  Robert Millan  <rmh@aybabtu.com>
5265         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
5266         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
5267         variables.  Use 16-bit loader.
5268         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
5269         loader.
5270         * kern/i386/loader.S (grub_linux_boot): Rename to ...
5271         (grub_linux16_boot): ... this.  Update all users.
5272         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
5273         (grub_linux_boot): ... this.  Update all users.
5275         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
5276         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
5277         commands to `linux16' and `initrd16'.
5278         (GRUB_MOD_FINI(linux)): Rename to ...
5279         (GRUB_MOD_FINI(linux16)): ... this.
5281 2009-03-24  Pavel Roskin  <proski@gnu.org>
5283         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
5284         not just for compilation.
5286 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
5288         Move multiboot helper out of kernel
5290         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
5291         `loader/i386/multiboot_helper.S'.
5292         * conf/i386-coreboot.rmk: Likewise
5293         * conf/i386-ieee1275.rmk: Likewise
5295         * kern/i386/loader.S: Move multiboot helpers from here...
5296         * loader/i386/multiboot_helper.S: ...moved here
5297         * include/grub/i386/loader.h: Move declarations of multiboot
5298         helpers from here...
5299         * include/grub/i386/multiboot.h: ...moved here
5300         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
5302 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
5304         * kern/env.c (grub_env_context_open): Added an argument to specify
5305         whether a new context inherits exported variables from current
5306         one. This is useful when making a sandbox to interpret a config
5307         file.
5308         All callers updated.
5310         * include/grub/env.h (grub_env_context_open): Updated the prototype.
5312 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
5314         * kern/env.c (grub_env_context_close): Fix memory leaks.
5316 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
5318         * normal/main.c (grub_normal_execute): Added an argument
5319         BATCH to specify if an interactive interface should be provided
5320         after reading a config file.
5321         All callers updated.
5322         (read_command_list): Prevent being executed twice.
5323         (read_fs_list): Likewise.
5325         * include/grub/normal.h (grub_normal_execute): Updated the
5326         prototype.
5328 2009-03-22  Pavel Roskin  <proski@gno.org>
5330         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
5331         _start.
5332         * kern/i386/pc/startup.S: Likewise.
5333         * kern/i386/efi/startup.S: Likewise.
5334         * kern/i386/ieee1275/startup.S: Likewise.
5335         * kern/i386/coreboot/startup.S: Likewise.
5336         * kern/x86_64/efi/startup.S: Likewise.
5338         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
5339         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
5340         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
5342 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
5344         Bugfixes in multiboot for bugs uncovered by solaris kernel.
5346         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
5347         limit detection.
5348         Use vaddr of correct segment for entry_point.
5350 2009-03-21  Bean  <bean123ch@gmail.com>
5352         * commands/blocklist.c: Add include file <grub/command.h>, remove
5353         <grub/normal.h> and <grub/arg.h>.
5354         (grub_cmd_blocklist): Use the new command interface.
5355         (GRUB_MOD_INIT): Likewise.
5356         (GRUB_MOD_FINI): Likewise.
5357         * commands/boot.c: Likewise.
5358         * commands/cat.c: Likewise.
5359         * commands/cmp.c: Likewise.
5360         * commands/configfile.c: Likewise.
5361         * commands/crc.c: Likewise.
5362         * commands/echo.c: Likewise.
5363         * commands/halt.c: Likewise.
5364         * commands/handler.c: Likewise.
5365         * commands/hdparm.c: Likewise.
5366         * commands/help.c: Likewise.
5367         * commands/hexdump.c: Likewise.
5368         * commands/loadenv.c: Likewise.
5369         * commands/ls.c: Likewise.
5370         * commands/lsmmap.c: Likewise.
5371         * commands/lspci.c: Likewise.
5372         * commands/loadenv.c: Likewise.
5373         * commands/read.c: Likewise.
5374         * commands/reboot.c: Likewise.
5375         * commands/search.c: Likewise.
5376         * commands/sleep.c: Likewise.
5377         * commands/test.c: Likewise.
5378         * commands/usbtest.c: Likewise.
5379         * commands/videotest.c: Likewise.
5380         * commands/i386/cpuid.c: Likewise.
5381         * commands/i386/pc/halt.c: Likewise.
5382         * commands/i386/pc/play.c: Likewise.
5383         * commands/i386/pc/pxecmd.c: Likewise.
5384         * commands/i386/pc/vbeinfo.c: Likewise.
5385         * commands/i386/pc/vbetest.c: Likewise.
5386         * commands/ieee1275/suspend.c: Likewise.
5387         * disk/loopback.c: Likewise.
5388         * font/font_cmd.c: Likewise.
5389         * hello/hello.c: Likewise.
5390         * loader/efi/appleloader.c: Likewise.
5391         * loader/efi/chainloader.c: Likewise.
5392         * loader/i386/bsd.c: Likewise.
5393         * loader/i386/efi/linux.c: Likewise.
5394         * loader/i386/ieee1275/linux.c: Likewise.
5395         * loader/i386/linux.c: Likewise.
5396         * loader/i386/pc/chainloader.c: Likewise.
5397         * loader/i386/pc/linux.c: Likewise.
5398         * loader/powerpc/ieee1275/linux.c: Likewise.
5399         * loader/multiboot_loader.c: Likewise.
5400         * term/gfxterm.c: Likewise.
5401         * term/i386/pc/serial.c: Likewise.
5402         * term/terminfo.c: Likewise.
5404         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
5405         * term/i386/pc/vga.c: Likewise.
5406         * video/readers/jpeg.c: Likewise.
5407         * video/readers/png.c: Likewise.
5408         * video/readers/tga.c: Likewise.
5410         * util/grub-fstest (cmd_loopback): Removed.
5411         (cmd_blocklist): Likewise.
5412         (cmd_ls): Likewise.
5413         (grub_register_command): Likewise.
5414         (grub_unregister_command): Likewise.
5415         (execute_command): Use grub_command_find to locate command and execute
5416         it.
5418         * include/grub/efi/chainloader.h: Removed.
5419         * loader/efi/chainloader_normal.c: Likewise.
5420         * loader/i386/bsd_normal.c: Likewise.
5421         * loader/i386/pc/chainloader_normal.c: Likewise.
5422         * loader/i386/pc/multiboot_normal.c: Likewise.
5423         * loader/linux_normal.c: Likewise.
5424         * loader/multiboot_loader_normal.c: Likewise.
5425         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5427         * gencmdlist.sh: Scan new registration command grub_register_extcmd
5428         and grub_register_command_p1.
5430         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
5431         kern/command.c, lib/arg.c and commands/extcmd.c.
5432         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
5433         (minicmd_mod_SOURCES): New variable.
5434         (minicmd_mod_CFLAGS): Likewise.
5435         (minicmd_mod_LDFLAGS): Likewise.
5436         (extcmd_mod_SOURCES): Likewise.
5437         (extcmd_mod_CFLAGS): Likewise.
5438         (extcmd_mod_LDFLAGS): Likewise.
5439         (boot_mod_SOURCES): Removed.
5440         (boot_mod_CFLAGS): Likewise.
5441         (boot_mod_LDFLAGS): Likewise.
5443         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
5444         kern/corecmd.c.
5445         (kernel_img_HEADERS): Add command.h.
5446         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
5447         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
5448         and lib/arg.c.
5449         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
5450         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
5451         remove the corresponding normal mode command.
5452         (normal_mod_SOURCES): Remove normal/arg.c.
5453         * conf/i386-coreboot.rmk: Likewise.
5454         * conf/i386-efi.rmk: Likewise.
5455         * conf/i386-ieee1275.rmk: Likewise.
5456         * conf/powerpc-ieee1275.rmk: Likewise.
5457         * conf/x86_64-efi.rmk: Likewise.
5459         * include/grub/arg.h: Move from here ...
5460         * include/grub/lib/arg.h: ... to here.
5462         * normal/arg.c: Move from here ...
5463         * lib/arg.c: ... to here.
5465         * commands/extcmd.c: New file.
5466         * commands/minicmd.c: Likewise.
5467         * include/grub/command.h: Likewise.
5468         * include/grub/extcmd.h: Likewise.
5469         * kern/command.c: Likewise.
5470         * kern/corecmd.c: Likewise.
5472         * kern/list.c (grub_list_iterate): Return int instead of void.
5473         (grub_list_insert): New function.
5474         (grub_prio_list_insert): Likewise.
5476         * kern/rescue.c (grub_rescue_command): Removed.
5477         (grub_rescue_command_list): Likewise.
5478         (grub_rescue_register_command): Likewise.
5479         (grub_rescue_unregister_command): Likewise.
5480         (grub_rescue_cmd_boot): Move to minicmd.c
5481         (grub_rescue_cmd_help): Likewise.
5482         (grub_rescue_cmd_info): Likewise.
5483         (grub_rescue_cmd_boot): Likewise.
5484         (grub_rescue_cmd_testload): Likewise.
5485         (grub_rescue_cmd_dump): Likewise.
5486         (grub_rescue_cmd_rmmod): Likewise.
5487         (grub_rescue_cmd_lsmod): Likewise.
5488         (grub_rescue_cmd_exit): Likewise.
5489         (grub_rescue_print_devices): Moved to corecmd.c.
5490         (grub_rescue_print_files): Likewise.
5491         (grub_rescue_cmd_ls): Likewise.
5492         (grub_rescue_cmd_insmod): Likewise.
5493         (grub_rescue_cmd_set): Likewise.
5494         (grub_rescue_cmd_unset): Likewise.
5495         (attempt_normal_mode): Use grub_command_find to get normal module.
5496         (grub_enter_rescue_mode): Use grub_register_core_commands to register
5497         commands, remove grub_rescue_register_command calls.
5499         * normal/command.c (grub_register_command): Removed.
5500         (grub_unregister_command): Likewise.
5501         (grub_command_find): Likewise.
5502         (grub_iterate_commands): Likewise.
5503         (rescue_command): Likewise.
5504         (export_command): Moved to corecmd.c.
5505         (set_command): Removed.
5506         (unset_command): Likewise.
5507         (insmod_command): Likewise.
5508         (rmmod_command): Likewise.
5509         (lsmod_command): Likewise.
5510         (grub_command_init): Likewise.
5512         * normal/completion.c (iterate_command): Use cmd->prio to check for
5513         active command.
5514         (complete_arguments): Use grub_extcmd_t structure to find options.
5515         (grub_normal_do_completion): Change function grub_iterate_commands to
5516         grub_command_iterate.
5518         * normal/execute.c (grub_script_execute_cmd): No need to parse
5519         argument here.
5521         * normal/main.c (grub_dyncmd_dispatcher): New function.
5522         (read_command_list): Register unload commands as dyncmd.
5523         (grub_cmd_normal): Use new command interface, register rescue,
5524         unregister normal at entry, register normal, unregister rescue at exit.
5526         * include/grub/list.h (grub_list_test_t): New type.
5527         (grub_list_iterate): Return int instead of void.
5528         (grub_list_insert): New function.
5529         (GRUB_AS_NAMED_LIST_P): New macro.
5530         (GRUB_AS_PRIO_LIST): Likewise.
5531         (GRUB_AS_PRIO_LIST_P): Likewise.
5532         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
5533         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
5534         (grub_prio_list): New structure.
5535         (grub_prio_list_insert): New function.
5536         (grub_prio_list_remove): New inline function.
5538         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
5539         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
5540         (GRUB_COMMAND_FLAG_MENU): Likewise.
5541         (GRUB_COMMAND_FLAG_BOTH): Likewise.
5542         (GRUB_COMMAND_FLAG_TITLE): Likewise.
5543         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
5544         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
5545         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
5546         (grub_command): Likewise.
5547         (grub_register_command): Likewise.
5548         (grub_command_find): Likewise.
5549         (grub_iterate_commands): Likewise.
5550         (grub_command_init): Likewise.
5551         (grub_arg_parse): Likewise.
5552         (grub_arg_show_help): Likewise.
5554         * include/grub/rescue.h (grub_rescue_register_command): Removed.
5555         (grub_rescue_unregister_command): Likewise.
5557         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
5558         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
5559         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
5561         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
5562         grub_rescue_cmd_initrd.
5563         * include/grub/i386/loader.h: Likewise.
5564         * include/grub/x86_64/loader.h: Likewise.
5566         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
5568 2009-03-21  Bean  <bean123ch@gmail.com>
5570         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
5571         instead of stat in mingw environment.
5573         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
5575         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
5577         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
5578         AC_CONFIG_LINKS.
5580 2009-03-21  Bean  <bean123ch@gmail.com>
5582         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
5583         out of range error.
5585 2009-03-18  Michel Dänzer  <michel@daenzer.net>
5587         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
5588         checking inode flags for EXT4_EXTENTS_FLAG.
5590 2009-03-18  Robert Millan  <rmh@aybabtu.com>
5592         * loader/i386/linux.c: Include `<grub/video.h>' and
5593         `<grub/i386/pc/vbe.h>'..
5594         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
5595         (grub_linux32_boot): Attempt to configure video settings with
5596         grub_linux_setup_video().
5597         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
5598         to avoid grub_console_fini() which would step out of graphical mode
5599         unconditionally.
5601 2009-03-14  Robert Millan  <rmh@aybabtu.com>
5603         Fix build on powerpc.
5604         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
5606 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
5608         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
5609         background image command.
5611 2009-03-12  Colin D Bennett  <colin@gibibit.com>
5613         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
5614         (grub_gfxterm_putchar): Extract pairs of identical calls to
5615         draw_cursor out of conditional blocks.
5617 2009-03-11  Pavel Roskin  <proski@gnu.org>
5619         * fs/hfs.c (grub_hfs_strncasecmp): New function.
5620         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
5622 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5624         * loader/i386/multiboot_elfxx.c
5625         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
5627 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
5629         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
5630         `kern/handler.c'.
5632 2009-03-11  Robert Millan  <rmh@aybabtu.com>
5634         * loader/i386/multiboot.c (code_size): New variable.
5635         (grub_multiboot): Define offsets by adding to `code_size' rather
5636         than subtracting from `grub_multiboot_payload_size'.  Provide
5637         4-byte alignment to MBI and others by increasing
5638         `boot_loader_name_length' appropriately.
5640         * loader/i386/multiboot_elfxx.c
5641         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
5643 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
5645         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
5646         `fs/ext2.c'.
5648 2009-03-08  Robert Millan  <rmh@aybabtu.com>
5650         Make loader/i386/linux.c usable on i386-pc again.
5652         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
5653         memory to heap.
5654         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
5655         `#error' stanza.
5657 2009-03-07  Bean  <bean123ch@gmail.com>
5659         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
5660         allocation.
5662 2009-03-06  Robert Millan  <rmh@aybabtu.com>
5664         Fix display issue on terminals with screen size other than 80x25
5665         (e.g. gfxterm with resolution higher than 640x480).
5667         * normal/main.c (grub_normal_init_page): Display title text in a
5668         position relative to the center of the terminal instead of relying
5669         on a hardcoded offset.
5671 2009-03-04  Robert Millan  <rmh@aybabtu.com>
5673         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
5674         installed.
5676         * Makefile.in (host_kernel): New variable.
5677         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
5678         scripts instead of just the windows one.
5679         * configure.ac: Initialize and AC_SUBST `host_kernel'.
5681 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5683         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
5684         `kern/handler.c'.
5685         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5686         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5687         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5688         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5689         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5690         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5692 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5694         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
5695         or if there's no space for the disk label and print the partition number on a
5696         invalid magic.
5698 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
5700         * util/misc.c: Include <time.h>.
5701         (grub_millisleep): New function.
5703 2009-03-04  Bean  <bean123ch@gmail.com>
5705         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
5706         another option -mno-red-zone.
5708         * commands/handler.c: Change module description.
5710         * kern/handler.c: Add missing space at the end of description line.
5712         * kern/list.c: Likewise.
5714 2009-03-03  Robert Millan  <rmh@aybabtu.com>
5716         Move more components to the relocation area, and fix mbi pointer
5717         handling to use the destination rather than the origin (thanks to
5718         Vladimir Serbinenko for spotting).
5720         * loader/i386/multiboot.c (mbi_dest): New variable.
5721         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
5722         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
5723         relocation area.
5725 2009-03-01  Bean  <bean123ch@gmail.com>
5727         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
5728         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
5729         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
5730         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
5732         * loader/i386/efi/linux.c (acpi_guid): New variable.
5733         (acpi_guid): Likewise.
5734         (EBDA_SEG_ADDR): New constant.
5735         (LOW_MEM_ADDR): Likewise.
5736         (FAKE_EBDA_SEG): Likewise.
5737         (fake_bios_data): New function.
5738         (grub_linux_boot): Call fake_bios_data.
5740 2009-03-01  Bean  <bean123ch@gmail.com>
5742         * commands/terminal.c: Removed.
5744         * commands/handler.c: New file.
5746         * include/grub/list.h: Likewise.
5748         * include/grub/handler.h: Likewise.
5750         * kern/list.c: Likewise.
5752         * kern/handler.c: Likewise.
5754         * kern/term.h: Include header file <grub/handler.h>.
5755         (grub_term_input): Move next field to the beginning.
5756         (grub_term_output): Likewise.
5757         (grub_term_input_class): New variable.
5758         (grub_term_output_class): Likewise.
5759         (grub_term_register_input): Changed to inline function.
5760         (grub_term_register_output): Likewise.
5761         (grub_term_unregister_input): Likewise.
5762         (grub_term_unregister_output): Likewise.
5763         (grub_term_set_current_input): Likewise.
5764         (grub_term_set_current_output): Likewise.
5765         (grub_term_get_current_input): Likewise.
5766         (grub_term_get_current_output): Likewise.
5767         (grub_term_iterate_input): Removed.
5768         (grub_term_iterate_output): Likewise.
5770         * kern/term.c (grub_term_list_input): Removed.
5771         (grub_term_list_output): Likewise.
5772         (grub_term_input_class): New variable.
5773         (grub_term_output_class): Likewise.
5774         (grub_cur_term_input): Change variable as macro.
5775         (grub_cur_term_output): Likewise.
5776         (grub_term_register_input): Removed.
5777         (grub_term_register_output): Likewise.
5778         (grub_term_unregister_input): Likewise.
5779         (grub_term_unregister_output): Likewise.
5780         (grub_term_set_current_input): Likewise.
5781         (grub_term_set_current_output): Likewise.
5782         (grub_term_iterate_input): Likewise.
5783         (grub_term_iterate_output): Likewise.
5784         (grub_term_get_current_input): Likewise.
5785         (grub_term_get_current_output): Likewise.
5787         * util/grub-editenv.c: Include header file <grub/handler.h>.
5788         (grub_term_get_current_input): Removed.
5789         (grub_term_get_current_output): Likewise.
5790         (grub_term_input_class): New variable.
5791         (grub_term_output_class): Likewise.
5793         * util/grub-fstest.c (grub_term_get_current_input): Removed.
5794         (grub_term_get_current_output): Likewise.
5795         (grub_term_input_class): New variable.
5796         (grub_term_output_class): Likewise.
5798         * util/grub-probe.c (grub_term_get_current_input): Removed.
5799         (grub_term_get_current_output): Likewise.
5800         (grub_term_input_class): New variable.
5801         (grub_term_output_class): Likewise.
5803         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
5804         (grub_term_get_current_output): Likewise.
5805         (grub_term_input_class): New variable.
5806         (grub_term_output_class): Likewise.
5808         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
5809         (terminal_mod_SOURCES): Likewise.
5810         (terminal_mod_CFLAGS): Likewise.
5811         (terminal_mod_LDFLAGS): Likewise.
5813         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
5814         handler.c.
5815         (kernel_img_SOURCES): Add list.c and handler.c.
5816         (kernel_img_HEADERS): Add list.h and handler.h.
5818         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5819         handler.c.
5820         (kernel_mod_SOURCES): Add list.c and handler.c.
5821         (kernel_mod_HEADERS): Add list.h and handler.h.
5823         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
5824         handler.c.
5825         (kernel_elf_SOURCES): Add list.c and handler.c.
5826         (kernel_elf_HEADERS): Add list.h and handler.h.
5828         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5829         handler.c.
5830         (kernel_elf_SOURCES): Add list.c and handler.c.
5831         (kernel_elf_HEADERS): Add list.h and handler.h.
5833         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5834         handler.c.
5835         (kernel_mod_SOURCES): Add list.c and handler.c.
5836         (kernel_mod_HEADERS): Add list.h and handler.h.
5838         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5839         handler.c.
5840         (kernel_elf_SOURCES): Add list.c and handler.c.
5841         (kernel_elf_HEADERS): Add list.h and handler.h.
5843 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5845         Factorize elf32 / elf64 code in Multiboot loader.  This will
5846         prevent it from getting out of sync again.
5848         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
5849         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
5850         grub_multiboot_load_elf64): Move from here ...
5851         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
5852         grub_multiboot_load_elf): ... to here (new file).
5854 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5856         * util/grub.d/10_linux.in: Rename "single-user mode" to
5857         "recovery mode".
5859 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
5861         Don't leak in SCSI code.
5862         * disk/scsi.c (grub_scsi_close): free `scsi'.
5864 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5866         * loader/i386/pc/multiboot.c: Move from here ...
5867         * loader/i386/multiboot.c: ... to here.  Update all users.
5869 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5871         Patch from Alexandre Bique <bique.alexandre@gmail.com>
5872         * util/i386/pc/grub-setup.c (setup): Fix directory path.
5874 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
5876         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
5877         b-tree.
5879 2009-02-27  Robert Millan  <rmh@aybabtu.com>
5881         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
5882         `0x' qualifier as 0 when base is specified as parameter).
5884 2009-02-24  Bean  <bean123ch@gmail.com>
5886         * configure.ac: Check for -mcmodel=large in x86_64 target.
5888         * include/grub/efi/api.h (efi_call_10): New macro.
5889         (efi_wrap_10): New function.
5891         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
5892         (GRUB_PE32_REL_BASED_HIGH): Likewise.
5893         (GRUB_PE32_REL_BASED_LOW): Likewise.
5894         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
5895         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
5896         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
5897         (GRUB_PE32_REL_BASED_SECTION): Likewise.
5898         (GRUB_PE32_REL_BASED_REL): Likewise.
5899         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
5900         (GRUB_PE32_REL_BASED_DIR64): Likewise.
5901         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
5903         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
5904         issue.
5906         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
5907         (efi_wrap_10): New function.
5909         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
5911         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
5912         MB/MBP model (NV chipset).
5913         (devdata_devs): Add devpath_5 to the list.
5915         * load/i386/efi/linux.c (video_base): Remove variable.
5916         (RGB_MASK): New macro.
5917         (RGB_MAGIC): Likewise.
5918         (LINE_MIN): Likewise.
5919         (LINE_MAX): Likewise.
5920         (FBTEST_STEP): Likewise.
5921         (FBTEST_COUNT): Likewise.
5922         (fb_list): New variable.
5923         (grub_find_video_card): Remove function.
5924         (find_framebuf): New function.
5925         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
5926         line length.
5928         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
5929         problem for x86_64.
5931 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
5933         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
5935         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
5936         coding tool name.
5938 2009-02-22  Robert Millan  <rmh@aybabtu.com>
5940         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
5941         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
5942         in our relocation, instead of using it directly from heap.  Also
5943         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
5945 2009-02-21  Robert Millan  <rmh@aybabtu.com>
5947         Implement USB keyboard support (based on patch by Marco Gerards)
5949         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
5950         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
5951         (usb_keyboard_mod_LDFLAGS): New variables.
5953         * term/usb_keyboard.c: New file.
5955 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
5957         Corrected wrong declaration
5959         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
5961 2009-02-14  Christian Franke  <franke@computer.org>
5963         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
5964         (grub_lspci_iter): Print class code and programming interface byte.
5966 2009-02-14  Christian Franke  <franke@computer.org>
5968         * gendistlist.sh: Ignore `.svn' directories.
5970 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
5972         * fs/fat.c: Add 2009 to Copyright line.
5974 2009-02-14  Christian Franke  <franke@computer.org>
5976         * commands/hdparm.c: New file.  Provides `hdparm' command
5977         which sends ATA commands via grub_disk_ata_pass_through ().
5979         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
5981         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
5982         and <grub/cpu/io.h> to include/grub/ata.h.
5983         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
5984         (GRUB_CDROM_SECTOR_SIZE): Remove.
5985         (GRUB_ATA_*): Move to include/grub/ata.h.
5986         (GRUB_ATAPI_*): Likewise.
5987         (enum grub_ata_commands): Likewise.
5988         (enum grub_ata_timeout_milliseconds): Likewise.
5989         (struct grub_ata_device): Likewise.
5990         (grub_ata_regset): Likewise.
5991         (grub_ata_regget): Likewise.
5992         (grub_ata_regset2): Likewise.
5993         (grub_ata_regget2): Likewise.
5994         (grub_ata_check_ready): Likewise.
5995         (grub_ata_wait_not_busy): Remove static, exported in
5996         include/grub/ata.h.
5997         (grub_ata_wait_drq): Likewise.
5998         (grub_ata_pio_read): Likewise.
6000         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
6001         function for hdparm.mod.
6003         * include/grub/ata.h: New file, contains declarations from
6004         disk/ata.c.
6005         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
6007         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
6008         (grub_disk_ata_pass_through): New exported variable.
6010         * kern/disk.c (grub_disk_ata_pass_through): New variable.
6012 2009-02-13  Colin D Bennett  <colin@gibibit.com>
6014         Support multiple fallback entries, and provide an API to support
6015         executing default+fallback menu entries.  Renamed the `terminal' menu
6016         viewer to `text'.
6018         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
6019         variable declaration.
6020         (grub_menu_execute_callback): New structure declaration.
6021         (grub_menu_execute_callback_t): New typedef.
6022         (grub_menu_execute_with_fallback): New function declaration.
6023         (grub_menu_get_entry): Likewise.
6024         (grub_menu_get_timeout): Likewise.
6025         (grub_menu_set_timeout): Likewise.
6027         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
6029         * normal/menu.c (grub_wait_after_message): Moved to
6030         `normal/menu_text.c'.
6031         (draw_border): Likewise.
6032         (print_message): Likewise.
6033         (print_entry): Likewise.
6034         (print_entries): Likewise.
6035         (grub_menu_init_page): Likewise.
6036         (get_entry_number): Likewise.
6037         (print_timeout): Likewise.
6038         (run_menu): Likewise.
6039         (grub_menu_execute_entry): Likewise.
6040         (show_text_menu): Likewise.
6041         (get_and_remove_first_entry_number): New function.
6042         (grub_menu_execute_with_fallback): Likewise.
6043         (get_entry): Renamed to ...
6044         (grub_menu_get_entry): .. this and made it global.
6045         (get_timeout): Renamed to ...
6046         (grub_menu_get_timeout): ... this and made it global.
6047         (set_timeout): Renamed to ...
6048         (grub_menu_set_timeout): ... this and made it global.
6049         (grub_normal_terminal_menu_viewer): Renamed to ...
6050         (grub_normal_text_menu_viewer): ... this.
6052         * normal/menu_text.c: New file.  Extracted text-menu-specific code
6053         from normal/menu.c.
6055         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
6056         (normal_mod_SOURCES): Likewise.
6058         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6059         (normal_mod_SOURCES): Likewise.
6061         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6062         (normal_mod_SOURCES): Likewise.
6064         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
6065         (normal_mod_SOURCES): Likewise.
6067         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6068         (normal_mod_SOURCES): Likewise.
6070         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6071         (normal_mod_SOURCES): Likewise.
6073         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6074         (normal_mod_SOURCES): Likewise.
6076 2009-02-11  Robert Millan  <rmh@aybabtu.com>
6078         * util/grub.d/00_header.in: Update old reference to `font' command.
6080 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
6082         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
6084         Based on patch from Javier Martín.
6086 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
6088         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
6089         to avoid false positives with FAT.
6090         (grub_fstest_SOURCES): Likewise.
6091         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6092         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6093         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6094         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6095         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6096         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6098 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
6100         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6101         bpb.version_specific.fat12_or_fat16.fstype and
6102         bpb.version_specific.fat32.fstype.
6104 2009-02-08  Robert Millan  <rmh@aybabtu.com>
6106         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
6108 2009-02-08  Robert Millan  <rmh@aybabtu.com>
6110         * Makefile.in (host_os, host_cpu): New variables.
6111         (target_os): Remove.  Update all users.
6113 2009-02-08  Marco Gerards  <marco@gnu.org>
6115         * Makefile.in (enable_grub_emu_usb): New variable.
6116         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
6117         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
6118         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
6119         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
6120         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
6121         `usbtest.mod' and `usbms.mod'.
6122         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
6123         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
6124         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
6125         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
6126         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
6127         variables.
6129         * disk/usbms.c: New file.
6131         * include/grub/usb.h: Likewise.
6133         * include/grub/usbtrans.h: Likewise.
6135         * include/grub/usbdesc.h: Likewise.
6137         * bus/usb/usbtrans.c: Likewise.
6139         * bus/usb/ohci.c: Likewise.
6141         * bus/usb/uhci.c: Likewise.
6143         * bus/usb/usbhub.c: Likewise.
6145         * bus/usb/usb.c: Likewise.
6147         * commands/usbtest.c: Likewise.
6149         * util/usb.c: Likewise.
6151         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
6153         * configure.ac: Test for libusb presence.
6155         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
6157 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
6159         * kern/mm.c: Add more comments.
6161 2009-02-08  Robert Millan  <rmh@aybabtu.com>
6163         Patch from Javier Martín.
6164         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
6165         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
6167 2009-02-08  Robert Millan  <rmh@aybabtu.com>
6169         * fs/cpio.c: Split tar functionality to ...
6170         * fs/tar.c: ... here (new file).  Update all users.
6172 2009-02-07  Robert Millan  <rmh@aybabtu.com>
6174         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
6175         backward-incompatible features.
6177         Based on patch from Javier Martín, with some adjustments.
6179 2009-02-07  Michael Scherer  <misc@mandriva.org>
6181         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
6183 2009-02-07  Robert Millan  <rmh@aybabtu.com>
6185         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
6186         position of `disk/lvm.c' to ensure grub_init_all() always picks it
6187         after the RAID stuff.
6189 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
6191         Fixes problem when running vbetest command as reported by
6192         Vladimir Serbinenko <phcoder@gmail.com>.
6194         * (grub_vbe_set_video_mode): Fixed problem with text modes.
6196 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
6198         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
6199         /dev/md/NpN style mdraid devices.
6201 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
6203         * util/unifont2pff.rb: Remove.
6205 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
6207         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
6208         `#'.
6210 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
6212         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
6213         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6214         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6215         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
6216         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6217         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6218         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6220 2009-02-02  Christian Franke  <franke@computer.org>
6222         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
6224 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
6226         * INSTALL: Note that we now require at least autoconf 2.59 and
6227         that LZO is optional.
6229 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
6231         Base on patch on bug #24154 created by Tomas Tintera
6232         <trosos@seznam.cz>.
6234         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
6236 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
6238         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
6239         <bero@arklinux.org>.
6241         * normal/parser.y (script_init): Add missing semicolon.
6243 2009-01-31  Colin D Bennett  <colin@gibibit.com>
6245         * normal/main.c: Add include to grub/menu_viewer.h.
6246         (free_menu_entry_classes): Added.
6247         (grub_normal_menu_addentry): Added class property handling.
6248         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
6249         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
6251         * normal/menu_viewer.c: New file.
6253         * normal/menu.c (run_menu_entry): Renamed to ...
6254         (grub_menu_execute_entry): ... this and made it as global.
6255         (grub_menu_run): Renamed to ...
6256         (show_text_menu): ... this and made it local.
6257         (show_text_menu): Adapt to new function names.
6258         (grub_normal_terminal_menu_viewer): New global variable.
6260         * include/grub/menu.h: New file.
6262         * include/grub/menu_viewer.h: New file.
6264         * include/grub/normal.h: Added include to grub/menu.h.
6265         (grub_menu_entry): Moved to include/grub/menu.h.
6266         (grub_menu_entry_t): Likewise.
6267         (grub_menu): Likewise.
6268         (grub_menu_t): Likewise.
6269         (grub_normal_terminal_menu_viewer): Added.
6270         (grub_menu_execute_entry): Likewise.
6271         (grub_menu_run): Removed.
6273         * DISTLIST: Added include/grub/menu.h.
6274         Added include/grub/menu_viewer.h.
6275         Added normal/menu_viewer.c.
6277 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
6279         * normal/execute.c (grub_script_execute_menuentry): Changed to use
6280         arglist for menutitle arguments.
6282         * normal/main.c (grub_normal_menu_addentry): Likewise.
6284         * normal/parser.y (menuentry): Likewise.
6286         * normal/script.c (grub_script_create_cmdmenu): Likewise.
6288         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
6289         (grub_script_create_cmdmenu): Likewise.
6291         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
6293         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
6294         changes.
6296         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
6298         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
6300         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
6302         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6304         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6306         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
6308 2009-01-30  Christian Franke  <franke@computer.org>
6310         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
6311         in option help text.
6313 2009-01-27  Pavel Roskin  <proski@gnu.org>
6315         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
6317 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
6319         * commands/lsmmap.c: Add include to grub/machine/memory.h.
6321         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
6323         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
6324         unregister function.
6326 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
6328         * disk/scsi.c (grub_scsi_read): Fix sign problem.
6330         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
6332         * util/grub-mkfont.c (usage): Fix typo.
6334         * util/elf/grub-mkimage.c (load_modules): Fix warning.
6336 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
6338         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
6340         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
6342         * kern/misc.c (grub_strcasecmp): New function.
6343         (grub_strcasecmp): Use grub_size_t instead of int for length.
6344         Fix return value.
6345         * include/grub/misc.h: Update function prototypes.
6347 2009-01-26  Robert Millan  <rmh@aybabtu.com>
6349         * configure.ac: Fix cross-compilation check.
6351 2009-01-22  Christian Franke  <franke@computer.org>
6353         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
6354         (precision) digit string.  Allow `.format2' without `format1' (width).
6355         Limit input chars for `%s' output to `format2' if specified.  This is
6356         compatible with standard printf ().
6358 2009-01-22  Christian Franke  <franke@computer.org>
6360         * disk/ata.c (grub_ata_wait_status): Replace by ...
6361         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
6362         other status bits may be invalid while BSY is asserted.
6363         (grub_ata_check_ready): New function.
6364         (grub_ata_cmd): Removed.
6365         (grub_ata_wait_drq): New function.
6366         (grub_ata_strncpy): Remove inline.
6367         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
6368         and error check now done by grub_ata_wait_drq ().
6369         (grub_ata_pio_write): Likewise.
6370         (grub_atapi_identify): Set DEV before check for !BSY.  Use
6371         grub_ata_wait_drq () to wait for data.
6372         (grub_ata_device_initialize): Add status register check to
6373         detect missing SATA slave devices.  Add debug messages.
6374         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
6375         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
6376         transfer loop by grub_ata_pio_write ().
6377         (grub_ata_identify): Set DEV before check for !BSY. Use
6378         grub_ata_wait_drq () to wait for data.
6379         (grub_ata_setaddress): Set DEV before check for !BSY.
6380         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
6381         read/write in one loop.  Fix invalid command on write.  Fix incomplete
6382         command on (size % batch) == 0.  Add missing error check after write of
6383         last block.  Add debug messages.
6384         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
6386 2009-01-19  Christian Franke  <franke@computer.org>
6388         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
6389         (GRUB_ATAPI_IREASON_*): Likewise.
6390         (grub_ata_pio_write): Fix timeout error return.
6391         (grub_atapi_identify): Add grub_ata_wait () after cmd.
6392         (grub_atapi_wait_drq): New function.
6393         (grub_atapi_packet): New parameter `size'.
6394         Use grub_atapi_wait_drq () and direct write instead of
6395         grub_ata_pio_write ().
6396         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
6397         reads the number of bytes requested by the device for each DRQ
6398         assertion.
6399         (grub_atapi_write): Remove old implementation, return not
6400         implemented instead.
6402 2009-01-19  Christian Franke  <franke@computer.org>
6404         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
6405         of 512 to calculate data size.
6406         (grub_scsi_read12): Likewise.
6407         (grub_scsi_write10): Likewise.
6408         (grub_scsi_write12): Likewise.
6409         (grub_scsi_read): Adjust size according to blocksize.
6410         Add checks for invalid blocksize and unaligned transfer.
6412 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
6414         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
6416         * term/gfxterm.c (write_char): Fix background rendering for wide
6417         width glyphs.
6419 2009-01-19  Robert Millan  <rmh@aybabtu.com>
6421         * config.guess: Update to latest version from config git.
6422         * config.sub: Likewise.
6424 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
6426         * Makefile.in: Change font compilation to use new grub-mkfont instead
6427         of java version.
6429         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
6430         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6431         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6432         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6433         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6434         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6435         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6436         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6437         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6439 2009-01-16  Christian Franke  <franke@computer.org>
6441         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
6442         (enum grub_ata_timeout_milliseconds): New enum.
6443         (grub_ata_wait_status): Add parameter milliseconds.
6444         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
6445         recovery from timed-out commands.
6446         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
6447         return grub_errno instead of REG_ERROR.
6448         (grub_ata_pio_write): Add parameter milliseconds.
6449         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
6450         Pass milliseconds to grub_ata_wait_status () and
6451         grub_ata_pio_read ().
6452         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
6453         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
6454         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
6455         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
6456         It is not suitable for device detection, because DEV bit is ignored,
6457         the command may run too long, and not all devices set the signature
6458         properly.
6459         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
6460         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
6461         Fix device selection, DEV bit must be set first to address the registers
6462         of the correct device.
6463         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
6464         grub_ata_pio_read/write ().
6465         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
6466         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
6468 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
6470         * util/grub-editenv.c (main): Use fseeko(), not fseek().
6472 2009-01-13  Bean  <bean123ch@gmail.com>
6474         * util/grub-mkfont.c (write_font): forget to remove some debug code.
6476 2009-01-13  Bean  <bean123ch@gmail.com>
6478         * Makefile.in: (enable_grub_mkfont): New variable.
6479         (freetype_cflags): Likewise.
6480         (freetype_libs): Likewise.
6482         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
6483         (grub_mkfont_SOURCES): New variable.
6484         (grub_mkfont_CFLAGS): Likewise.
6485         (grub_mkfont_LDFLAGS): Likewise.
6487         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
6488         library if `--enable-grub-mkfont' is requested.
6489         (enable_grub_mkfont): New variable.
6490         (freetype_cflags): Likewise.
6491         (freetype_libs): Likewise.
6493         * util/grub-mkfont.c: New file.
6495 2009-01-12  Christian Franke  <franke@computer.org>
6497         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
6498         mode check.  Fix setting of compat_use[].
6500 2009-01-10  Robert Millan  <rmh@aybabtu.com>
6502         Update a few copyright years which we forgot to do in 2008 (only for
6503         files whose changes made in 2008 were copyright-significant)
6505         * Makefile.in: Add 2008 to Copyright line.
6506         * disk/ieee1275/ofdisk.c: Likewise.
6507         * disk/efi/efidisk.c: Likewise.
6508         * kern/dl.c: Likewise.
6509         * kern/sparc64/ieee1275/init.c: Likewise.
6510         * kern/mm.c: Likewise.
6511         * kern/efi/mm.c: Likewise.
6512         * boot/i386/pc/boot.S: Likewise.
6513         * genfslist.sh: Likewise.
6514         * fs/iso9660.c: Likewise.
6515         * fs/hfs.c: Likewise.
6516         * fs/jfs.c: Likewise.
6517         * fs/minix.c: Likewise.
6518         * fs/ufs.c: Likewise.
6519         * gensymlist.sh.in: Likewise.
6520         * genkernsyms.sh.in: Likewise.
6521         * include/grub/misc.h: Likewise.
6522         * include/grub/types.h: Likewise.
6523         * include/grub/symbol.h: Likewise.
6524         * include/grub/elf.h: Likewise.
6525         * include/grub/kernel.h: Likewise.
6526         * include/grub/disk.h: Likewise.
6527         * include/grub/dl.h: Likewise.
6528         * include/grub/i386/linux.h: Likewise.
6529         * include/grub/i386/pc/biosdisk.h: Likewise.
6530         * include/grub/efi/api.h: Likewise.
6531         * include/grub/efi/pe32.h: Likewise.
6532         * include/grub/util/misc.h: Likewise.
6533         * normal/execute.c: Likewise.
6534         * normal/arg.c: Likewise.
6535         * normal/completion.c: Likewise.
6536         * normal/lexer.c: Likewise.
6537         * normal/parser.y: Likewise.
6538         * normal/misc.c: Likewise.
6539         * commands/i386/pc/vbeinfo.c: Likewise.
6540         * commands/hexdump.c: Likewise.
6541         * commands/terminal.c: Likewise.
6542         * commands/ls.c: Likewise.
6543         * commands/help.c: Likewise.
6544         * partmap/pc.c: Likewise.
6545         * loader/efi/chainloader.c: Likewise.
6546         * loader/multiboot_loader.c: Likewise.
6547         * loader/i386/pc/multiboot2.c: Likewise.
6548         * term/efi/console.c: Likewise.
6549         * term/i386/pc/serial.c: Likewise.
6550         * util/lvm.c: Likewise.
6551         * util/console.c: Likewise.
6552         * util/i386/efi/grub-mkimage.c: Likewise.
6553         * util/raid.c: Likewise.
6555 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
6557         * commands/videotest.c: Removed include to grub/machine/memory.h.
6559         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
6560         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
6561         (video_mod_SOURCES): Removed.
6562         (video_mod_CFLAGS): Likewise.
6563         (video_mod_LDFLAGS): Likewise.
6564         (gfxterm_mod_SOURCES): Likewise.
6565         (gfxterm_mod_CFLAGS): Likewise.
6566         (gfxterm_mod_LDFLAGS): Likewise.
6567         (videotest_mod_SOURCES): Likewise.
6568         (videotest_mod_CFLAGS): Likewise.
6569         (videotest_mod_LDFLAGS): Likewise.
6570         (bitmap_mod_SOURCES): Likewise.
6571         (bitmap_mod_CFLAGS): Likewise.
6572         (bitmap_mod_LDFLAGS): Likewise.
6573         (tga_mod_SOURCES): Likewise.
6574         (tga_mod_CFLAGS): Likewise.
6575         (tga_mod_LDFLAGS): Likewise.
6576         (jpeg_mod_SOURCES): Likewise.
6577         (jpeg_mod_CFLAGS): Likewise.
6578         (jpeg_mod_LDFLAGS): Likewise.
6579         (png_mod_SOURCES): Likewise.
6580         (png_mod_CFLAGS): Likewise.
6581         (png_mod_LDFLAGS): Likewise.
6583         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
6584         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
6585         (video_mod_SOURCES): Added.
6586         (video_mod_CFLAGS): Likewise.
6587         (video_mod_LDFLAGS): Likewise.
6588         (videotest_mod_SOURCES): Likewise.
6589         (videotest_mod_CFLAGS): Likewise.
6590         (videotest_mod_LDFLAGS): Likewise.
6591         (bitmap_mod_SOURCES): Likewise.
6592         (bitmap_mod_CFLAGS): Likewise.
6593         (bitmap_mod_LDFLAGS): Likewise.
6594         (tga_mod_SOURCES): Likewise.
6595         (tga_mod_CFLAGS): Likewise.
6596         (tga_mod_LDFLAGS): Likewise.
6597         (jpeg_mod_SOURCES): Likewise.
6598         (jpeg_mod_CFLAGS): Likewise.
6599         (jpeg_mod_LDFLAGS): Likewise.
6600         (png_mod_SOURCES): Likewise.
6601         (png_mod_CFLAGS): Likewise.
6602         (png_mod_LDFLAGS): Likewise.
6603         (gfxterm_mod_SOURCES): Likewise.
6604         (gfxterm_mod_CFLAGS): Likewise.
6605         (gfxterm_mod_LDFLAGS): Likewise.
6607         * term/gfxterm.c: Removed include to grub/machine/memory.h,
6608         grub/machine/console.h.
6610 2009-01-04  Jerone Young  <jerone@gmail.com>
6612         Make on screen instructions clearer
6614         Based on patch created by Jidanni <jidanni@jidanni.org>
6616         * normal/menu.c: print clearer instructions on the screen
6618 2009-01-02  Colin D Bennett  <colin@gibibit.com>
6620         New font engine.
6622         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
6623         build system and fixed gfxterm.c to work with different sized fonts.
6625         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
6627         * configure: Re-generated.
6629         * DISTLIST: Removed font/manager.c.
6630         Added font/font.c.
6631         Added font/font_cmd.c.
6633         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
6634         compilation.
6636         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
6638         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
6640         * kern/term.c: Changed users of grub_utf8_to_ucs4.
6642         * normal/menu.c: Likewise.
6644         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
6645         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
6647         * include/grub/font.h: Replaced with new file.
6649         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
6650         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
6651         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
6652         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
6653         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
6654         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
6655         fg_red, fg_green, fg_blue, fg_alpha.
6656         (grub_video_adapter): Removed blit_glyph.
6657         (grub_video_blit_glyph): Removed.
6659         * font/manager.c: Removed file.
6661         * font/font.c: New file.
6663         * font/font_cmd.c: Likewise.
6665         * video/video.c (grub_video_blit_glyph): Removed.
6667         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
6668         (grub_video_vbe_map_rgba): Likewise.
6669         (grub_video_vbe_unmap_color_int): Likewise.
6670         (grub_video_vbe_blit_glyph): Removed.
6671         (grub_video_vbe_adapter): Removed blit_glyph.
6673         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
6674         (get_pixel): Likewise.
6675         (set_pixel): Likewise.
6677         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
6679         * term/gfxterm.c: Adapted to new font engine.
6681         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
6683         * term/i386/pc/vga.c: Likewise.
6685         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
6687         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6689         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6691         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6693         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6695         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6697         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6699         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6701         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6703         * util/grub.d/00_header.in: Changed to use new loadfont command.
6705         * util/grub-mkconfig_lib.in: Changed font extension.
6707 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
6709         * util/getroot.c (grub_util_get_grub_dev): Add support for
6710         /dev/md/dNNpNN style partitionable mdraid devices.
6712 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
6714         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
6715         at a time limit of the PXE TFTP API correctly.
6716         (grub_pxefs_close): Likewise.
6718 2008-11-29  Robert Millan  <rmh@aybabtu.com>
6720         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
6721         grub_ata_device_initialize() calls.
6723 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
6725         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
6726         iteration failed.
6727         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
6729 2008-11-28  Robert Millan  <rmh@aybabtu.com>
6731         Fix build on powerpc-ieee1275.  Based on patch created by
6732         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
6733         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6734         `kern/ieee1275/mmap.c'.
6735         * include/grub/powerpc/ieee1275/memory.h: New file.
6737         Provide grub-install on coreboot.
6738         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
6739         (grub_install_SOURCES): New variable.
6740         * util/i386/pc/grub-install.in: Add a few condition checks to make it
6741         usable on coreboot.
6743 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
6745         * util/grub-fstest.c (grub_term_get_current_input): Change return type
6746         to `grub_term_input_t'.
6747         (grub_term_get_current_output): Change return type to
6748         `grub_term_output_t'.
6750 2008-11-22  Robert Millan  <rmh@aybabtu.com>
6752         Fix breakage on coreboot due to declaration mismatch.
6753         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
6754         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
6755         grub_vga_text_cls().
6757         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
6758         comments.  Avoid copying one more byte than necessary (just in case).
6760         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
6761         to 0x200000 (avoids trouble with some OFW implementations, and matches
6762         with the one in Yaboot).
6763         Reported by Manoel Abranches
6765 2008-11-20  Robert Millan  <rmh@aybabtu.com>
6767         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
6768         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
6770         * util/grub-mkconfig_lib.in (grub_warn): New function.
6771         (convert_system_path_to_grub_path): Use grub_warn() when issuing
6772         warnings, to obtain consistent formatting.
6773         * util/grub.d/00_header.in: Likewise.
6774         * util/update-grub_lib.in: Likewise.
6776         * loader/i386/linux.c (allocate_pages): Fix a warning.
6777         Move comment text to `#error' stanza.
6779         Harmonize ieee1275's grub_available_iterate() with the generic
6780         grub_machine_mmap_iterate() interface (fixes a recently-introduced
6781         build problem on i386-ieee1275):
6782         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
6783         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
6784         parameter `type'.  Update all users of this function.
6785         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6786         `kern/ieee1275/mmap.c'.
6787         * kern/ieee1275/init.c
6788         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
6789         with ...
6790         (grub_machine_mmap_iterate): ... this.
6791         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
6792         return type to `grub_err_t'.  Update all implementations of this
6793         function prototype.
6794         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
6795         Likewise.
6797         Add `lsmmap' command (lists firmware-provided memory map):
6798         * commands/lsmmap.c: New file.
6799         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
6800         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
6801         variables.
6802         * conf/powerpc-ieee1275.rmk: Likewise.
6803         * conf/i386-coreboot.rmk: Likewise.
6804         * conf/i386-ieee1275.rmk: Likewise.
6806 2008-11-19  Robert Millan  <rmh@aybabtu.com>
6808         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
6809         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
6810         constraints to initrd allocation (based on code from
6811         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
6812         for Linux to find it.
6814 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6816         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
6817         order to cope with duplicate slashes.
6819 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6821         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
6822         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
6823         don't want to mess with lower memory, because it is used in the Linux
6824         loader.
6826         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
6827         an appropriate place in lower memory, between 0x10000 and 0x90000,
6828         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
6829         is in our heap (probably as a result of it being corrupted during
6830         decompression).  Add #error instance with comment to explain why this
6831         loader isn't currently usable on PC/BIOS.
6833 2008-11-14  Robert Millan  <rmh@aybabtu.com>
6835         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
6836         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
6838 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6840         Make loader/i386/linux.c buildable on i386-pc (although disabled).
6842         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
6843         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
6844         from here ...
6845         * include/grub/i386/pc/memory.h: ... to here.
6847 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6849         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
6850         split).
6852         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
6853         (grub_console_cur_color, grub_console_real_putchar)
6854         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6855         (grub_console_setcolorstate, grub_console_setcolor)
6856         (grub_console_getcolor): Move from here ...
6857         * include/grub/i386/vga_common.h: ... to here (new file).
6859         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
6860         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
6861         `<grub/i386/io.h>'.
6862         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
6863         `<grub/i386/vga_common.h>'.
6865 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6867         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
6868         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
6869         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
6870         variables.
6871         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6872         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
6874         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
6875         grub_console_init() with call to grub_vga_text_init().
6876         (grub_machine_fini): Replace call to
6877         grub_console_fini() with call to grub_vga_text_fini() and
6878         grub_at_keyboard_fini().
6880         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
6881         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6882         (grub_console_setcolorstate, grub_console_setcolor)
6883         (grub_console_getcolor): New function prototypes.
6885         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
6886         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
6887         (grub_vga_text_setcursor): Static-ize.
6888         (grub_vga_text_term): New structure.
6889         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
6891         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
6892         (grub_console_cur_color, grub_console_standard_color)
6893         (grub_console_normal_color, grub_console_highlight_color)
6894         (map_char, grub_console_putchar, grub_console_getcharwidth)
6895         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
6896         (grub_console_getcolor): Move from here ...
6897         * term/i386/vga_common.c: ... to here (same function names).
6899 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6901         Use newly-added Multiboot support in coreboot.
6903         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6904         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
6906         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
6907         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
6908         (codestart): Store the MBI in `startup_multiboot_info' when we're
6909         being loaded using Multiboot.
6911         * kern/i386/coreboot/init.c (grub_machine_init): Move
6912         grub_at_keyboard_init() call to beginning of function (useful for
6913         debugging).  Call grub_machine_mmap_init() before attempting to use
6914         grub_machine_mmap_iterate().
6915         (grub_lower_mem, grub_upper_mem): Move from here ...
6916         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
6917         here (new file).
6919         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
6920         function prototype.
6922 2008-11-12  Robert Millan  <rmh@aybabtu.com>
6924         Fix a regression introduced by the at_keyboard.mod split.  Because
6925         some terminals are default on some platforms and non-default on
6926         others, the first terminal being registered determines which is
6927         going to be default.
6929         * kern/term.c (grub_term_register_input): If this is the first
6930         terminal being registered, set it as the current one.
6931         (grub_term_register_output): Likewise.
6933         * term/efi/console.c (grub_console_init): Do not call
6934         grub_term_set_current_output() or grub_term_set_current_input().
6935         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
6936         * term/i386/pc/console.c (grub_console_init): Likewise.
6937         (grub_console_fini): Do not call grub_term_set_current_input()
6938         (but leave grub_term_set_current_output() to restore text mode).
6940 2008-11-10  Robert Millan  <rmh@aybabtu.com>
6942         * util/grub.d/00_header.in: Add backward compatibility check for
6943         versions of terminal.mod that don't understand `terminal_input' or
6944         `terminal_output'.
6946 2008-11-09  Robert Millan  <rmh@aybabtu.com>
6948         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
6949         `terminal_input' / `terminal_output', not `terminal'.
6951 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6953         * Makefile.in (include_DATA): Fix srcdir=. assumption.
6954         (DISTCLEANFILES): Add `build_env.mk'.
6956 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6958         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
6959         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
6960         members.  Update all users.
6961         * util/console.c (grub_ncurses_term): Split in ...
6962         (grub_ncurses_term_input): ... this, and ...
6963         (grub_ncurses_term_output): ... this.  Update all users.
6964         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
6966 2008-11-08  Robert Millan  <rmh@aybabtu.com>
6968         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
6969         (PKGDATA): Add $(pkgdata_SRCDIR).
6970         (pkglib_BUILDDIR): New variable.
6971         (pkgdata_SRCDIR): New variable.
6972         (build_env.mk): New target.
6973         (include_DATA): New variable.
6974         (install-local): Install $(include_DATA) files in $(includedir).
6976 2008-11-07  Pavel Roskin  <proski@gnu.org>
6978         * gendistlist.sh: Use C locale for sorting to ensure consistent
6979         output on all systems.
6981         * util/grub.d/00_header.in: Remove incorrect space before
6982         "serial".
6984 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6986         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
6987         per specification.
6988         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
6989         * loader/multiboot_loader.c (find_multi_boot2_header): New function
6990         (based on find_multi_boot1_header).
6991         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
6992         using find_multi_boot2_header(), and abort if neither Multiboot or
6993         Multiboot headers were found.
6995 2008-11-07  Robert Millan  <rmh@aybabtu.com>
6997         Modularize at_keyboard.mod:
6999         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
7000         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
7001         (at_keyboard_mod_LDFLAGS): New variables.
7003         Actual terminal split:
7005         * include/grub/term.h (struct grub_term): Split in ...
7006         (struct grub_term_input): ... this, and ...
7007         (struct grub_term_output): ... this.  Update all users.
7008         (grub_term_set_current): Split in ...
7009         (grub_term_set_current_input): ... this, and ...
7010         (grub_term_set_current_output): ... this.
7011         (grub_term_get_current): Split in ...
7012         (grub_term_get_current_input): ... this, and ...
7013         (grub_term_get_current_output): ... this.
7014         (grub_term_register): Split in ...
7015         (grub_term_register_input): ... this, and ...
7016         (grub_term_register_output): ... this.
7017         (grub_term_unregister): Split in ...
7018         (grub_term_unregister_input): ... this, and ...
7019         (grub_term_unregister_output): ... this.
7020         (grub_term_iterate): Split in ...
7021         (grub_term_iterate_input): ... this, and ...
7022         (grub_term_iterate_output): ... this.
7024         * kern/term.c (grub_term_list): Split in ...
7025         (grub_term_list_input): ... this, and ...
7026         (grub_term_list_output): ... this.  Update all users.
7027         (grub_cur_term): Split in ...
7028         (grub_cur_term_input): ... this, and ...
7029         (grub_cur_term_output): ... this.  Update all users.
7030         (grub_term_set_current): Split in ...
7031         (grub_term_set_current_input): ... this, and ...
7032         (grub_term_set_current_output): ... this.
7033         (grub_term_get_current): Split in ...
7034         (grub_term_get_current_input): ... this, and ...
7035         (grub_term_get_current_output): ... this.
7036         (grub_term_register): Split in ...
7037         (grub_term_register_input): ... this, and ...
7038         (grub_term_register_output): ... this.
7039         (grub_term_unregister): Split in ...
7040         (grub_term_unregister_input): ... this, and ...
7041         (grub_term_unregister_output): ... this.
7042         (grub_term_iterate): Split in ...
7043         (grub_term_iterate_input): ... this, and ...
7044         (grub_term_iterate_output): ... this.
7046         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
7047         a check for input and one for output (and only attempt to get keys
7048         from user when input works).
7050         * util/grub-probe.c (grub_term_get_current): Split in ...
7051         (grub_term_get_current_input): ... this, and ...
7052         (grub_term_get_current_output): ... this.
7053         * util/grub-fstest.c: Likewise.
7054         * util/i386/pc/grub-setup.c: Likewise.
7055         * util/grub-editenv.c: Likewise.
7057         Portability adjustments:
7059         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
7060         `term/i386/pc/at_keyboard.c'.
7061         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
7062         grub_keyboard_controller_init() (now handled by terminal .init).
7063         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
7064         grub_at_keyboard_init().
7065         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
7066         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
7067         at_keyboard.mod via input terminal interface).
7068         * include/grub/i386/coreboot/console.h: Convert into a stub for
7069         `<grub/i386/pc/console.h>'.
7071         Migrate full terminals to new API:
7073         * term/efi/console.c (grub_console_term): Split into ...
7074         (grub_console_term_input): ... this, and ...
7075         (grub_console_term_output): ... this.  Update all users.
7076         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
7077         (grub_ofconsole_init): Split into ...
7078         (grub_ofconsole_init_input): ... this, and ...
7079         (grub_ofconsole_init_output): ... this.
7080         (grub_ofconsole_term): Split into ...
7081         (grub_ofconsole_term_input): ... this, and ...
7082         (grub_ofconsole_term_output): ... this.  Update all users.
7083         * term/i386/pc/serial.c (grub_serial_term): Split into ...
7084         (grub_serial_term_input): ... this, and ...
7085         (grub_serial_term_output): ... this.  Update all users.
7086         * term/i386/pc/console.c (grub_console_term): Split into ...
7087         (grub_console_term_input): ... this, and ...
7088         (grub_console_term_output): ... this.  Update all users.
7089         (grub_console_term_input): Only enable it on PC/BIOS platform.
7090         (grub_console_init): Remove grub_keyboard_controller_init() call.
7092         Migrate input terminals to new API:
7094         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
7095         `i386' and `i386/pc' to enable build on x86_64 (this driver is
7096         i386-specific anyway).
7097         (grub_console_checkkey): Rename to ...
7098         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
7099         users.
7100         (grub_keyboard_controller_orig): New variable.
7101         (grub_console_getkey): Rename to ...
7102         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
7103         users.
7104         (grub_keyboard_controller_init): Static-ize.  Save original
7105         controller value so that it can be restored ...
7106         (grub_keyboard_controller_fini): ... here (new function).
7107         (grub_at_keyboard_term): New structure.
7108         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
7109         functions.
7111         Migrate output terminals to new API:
7113         * term/i386/pc/vga.c (grub_vga_term): Change type to
7114         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
7115         members.  Update all users.
7116         * term/gfxterm.c (grub_video_term): Change type to
7117         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
7118         members.  Update all users.
7119         * include/grub/i386/pc/console.h (grub_console_checkkey)
7120         (grub_console_getkey): Do not export (no longer needed by gfxterm,
7121         etc).
7123         Migrate `terminal' command and userland tools to new API:
7125         * commands/terminal.c (grub_cmd_terminal): Split into ...
7126         (grub_cmd_terminal_input): ... this, and ...
7127         (grub_cmd_terminal_output): ... this.
7128         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
7129         `terminal_input' and `terminal_output'.
7130         * util/grub.d/00_header.in: Adjust `terminal' calls to new
7131         `terminal_input' / `terminal_output' API.
7132         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
7133         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
7134         provided ${GRUB_TERMINAL}, convert it).
7136 2008-11-04  Robert Millan  <rmh@aybabtu.com>
7138         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
7139         for FreeBSD.
7140         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
7142 2008-11-03  Bean  <bean123ch@gmail.com>
7144         * kern/elf.c (grub_elf32_load): Revert to previous code.
7145         (grub_elf64_load): Likewise.
7147         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
7149 2008-11-01  Robert Millan  <rmh@aybabtu.com>
7151         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
7152         (TARGET_CPPFLAGS): Likewise.
7153         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
7155 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
7157         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
7159 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
7161         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
7162         addition of objects until the code is not going to be able to fail.
7164 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
7166         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
7167         (add a missing NULL check, and correct them by moving the pointer
7168         operations after the actual check).
7170 2008-10-29  Robert Millan  <rmh@aybabtu.com>
7172         * util/i386/pc/grub-install.in: Handle empty string as output from
7173         make_system_path_relative_to_its_root().
7175 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
7177         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
7178         circular metadata worst case scenario. If the metadata is circular
7179         then copy the wrap in place.
7180         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
7181         project lib/format_text/layout.h
7182         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
7184 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
7186         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
7188 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
7190         * util/update-grub_lib.in: Mention filename in warning message.
7192 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
7194         * NEWS: Update for rename of update-grub to grub-mkconfig.
7196 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
7198         * util/update-grub_lib.in: Copy to ...
7199         * util/grub-mkconfig_lib.in: ... this.  Update all users.
7200         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
7201         * util/update-grub.in: Rename to ...
7202         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
7203         option. Add `--output' option to allow users to specify the generated
7204         configuration file.  Default to stdout.
7205         (update_grub_dir): Rename to ...
7206         (grub_mkconfig_dir): ... this.
7207         (grub_cfg): Default to an empty string.
7208         * conf/common.rmk (update-grub): Rename to ...
7209         (grub-mkconfig): ... this.
7210         (update-grub_lib): Copy to ...
7211         (grub-mkconfig_lib): ... this.
7212         (update-grub_SCRIPTS): Copy to ...
7213         (grub-mkconfig_SCRIPTS): ... this. Update all users.
7214         (update-grub_DATA): Rename to ...
7215         (grub-mkconfig_DATA): ... this.
7217 2008-09-28  Robert Millan  <rmh@aybabtu.com>
7219         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
7220         to `modified'.  Add the real `created' field.
7221         (grub_iso9660_uuid): Use `modified' rather than `created' for
7222         constructing the UUID.
7224 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
7226         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
7227         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
7229 2008-09-28  Bean  <bean123ch@gmail.com>
7231         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
7232         Thanks to Christian Franke for finding this bug.
7234 2008-09-25  Robert Millan  <rmh@aybabtu.com>
7236         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
7237         instances of grub_util_get_disk_name() (see previous commit).
7239 2008-09-25  Robert Millan  <rmh@aybabtu.com>
7241         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
7242         `util/i386/get_disk_name.c'.
7243         * conf/i386-efi.rmk: Likewise.
7244         * conf/x86_64-efi.rmk: Likewise.
7245         * conf/i386-coreboot.rmk: Likewise.
7246         * conf/i386-ieee1275.rmk: Likewise.
7247         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
7248         `util/ieee1275/get_disk_name.c'.
7249         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
7250         * util/ieee1275/get_disk_name.c: Remove file.
7251         * util/i386/get_disk_name.c: Remove file.
7252         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
7253         "hd%d" for device.map entries, rather than using
7254         grub_util_get_disk_name().
7256 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
7258         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
7259         warning.
7260         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
7262 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
7264         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
7265         Changed to 0x5100.
7266         (GRUB_TERM_PPAGE): Changed to 0x4900.
7268 2008-09-24  Robert Millan  <rmh@aybabtu.com>
7270         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
7271         macros (they were i386-pc specific).
7272         * include/grub/sparc64/ieee1275/console.h: Likewise.
7273         * include/grub/efi/console.h: Likewise.
7275 2008-09-22  Bean  <bean123ch@gmail.com>
7277         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
7278         resident and in attribute list.
7280         * include/grub/ntfs.h (BMP_LEN): Removed.
7282 2008-09-22  Bean  <bean123ch@gmail.com>
7284         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
7285         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
7287         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
7288         error occurs, as grub_disk_open will call grub_disk_close, which will
7289         call p->close (scsi).
7291 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
7293         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
7294         (AC_PREREQ): Bumped to 2.59.
7295         (AC_TRY_COMPILE): Replace obsolete macro with ...
7296         (AC_COMPILE_IFELSE): ... this.
7297         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
7298         (AC_LINK_IFELSE): ... this.
7300 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
7302         * autogen.sh: Add a call to `gendistlist.sh'.
7304 2008-09-19  Christian Franke  <franke@computer.org>
7306         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
7307         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
7308         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
7309         Export __enable_execute_stack() to modules.
7310         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
7311         New function.
7313 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
7315         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
7316         Sort the list.
7318 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
7320         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7321         #include <grub/util/hostdisk.h>.
7323 2008-09-08  Robert Millan  <rmh@aybabtu.com>
7325         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
7326         segments when their filesz is zero (grub_file_read() interprets
7327         zero-size as "read until EOF", which results in memory corruption).
7328         Use `lowest_segment' rather than 0 for calculating the current
7329         segment load address.
7331 2008-09-08  Robert Millan  <rmh@aybabtu.com>
7333         * util/hostdisk.c (open_device): Replace a grub_util_info() call
7334         with grub_dprintf("hostdisk", ...), as it was so verbose that it
7335         clobbered useful information.
7337 2008-09-08  Robert Millan  <rmh@aybabtu.com>
7339         * include/grub/util/biosdisk.h: Move to ...
7340         * include/grub/util/hostdisk.h: ... here.  Update all users.
7341         * util/biosdisk.c: Move to ...
7342         * util/hostdisk.c: ... here.  Update all users.
7344 2008-09-07  Robert Millan  <rmh@aybabtu.com>
7346         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
7347         variables.
7348         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
7349         and length can be stored directly in the `mbi->mmap_addr' and
7350         `mbi->mmap_length' struct fields.
7352 2008-09-07  Robert Millan  <rmh@aybabtu.com>
7354         * conf/i386.rmk: New file.  Provides declaration for building
7355         `cpuid.mod'.
7356         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
7357         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
7358         variables.
7359         Include `conf/i386.mk'.
7360         * conf/i386-efi.rmk: Likewise.
7361         * conf/x86_64-efi.rmk: Likewise.
7362         * conf/i386-coreboot.rmk: Likewise.
7363         * conf/i386-ieee1275.rmk: Likewise.
7365 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
7367         Based on patch created by Colin D Bennett <colin@gibibit.com>.
7368         Adds optimization support for BGR based modes.
7370         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
7371         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
7372         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7373         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7374         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7375         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7376         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7377         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7378         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7379         (grub_video_i386_vbeblit_index_index): Likewise.
7380         (grub_video_i386_vbeblit_replace_directN): Added.
7381         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
7382         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
7383         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
7384         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
7385         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
7386         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
7387         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
7388         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
7389         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
7390         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
7391         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
7392         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
7393         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
7395         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
7396         (grub_video_i386_vbefill_R8G8B8): Likewise.
7397         (grub_video_i386_vbefill_index): Likewise.
7398         (grub_video_i386_vbefill_direct32): Added.
7399         (grub_video_i386_vbefill_direct24): Likewise.
7400         (grub_video_i386_vbefill_direct16): Likewise.
7401         (grub_video_i386_vbefill_direct8): Likewise.
7403         * include/grub/video.h (grub_video_blit_format): Removed
7404         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
7405         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
7406         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
7407         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
7408         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
7410         * video/video.c (grub_video_get_blit_format): Updated to use new
7411         blit formats.  Added handling for 16 bit color modes.
7413         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
7414         fillers.
7415         (common_blitter): Updated to use new blitters.
7417         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
7418         Removed.
7419         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
7420         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7421         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7422         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7423         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7424         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7425         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7426         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7427         (grub_video_i386_vbeblit_index_index): Likewise.
7428         (grub_video_i386_vbeblit_replace_directN): Added.
7429         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
7430         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
7431         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
7432         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
7433         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
7434         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
7435         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
7436         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
7437         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
7438         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
7439         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
7440         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
7441         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
7443         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
7444         (grub_video_i386_vbefill_R8G8B8): Likewise.
7445         (grub_video_i386_vbefill_index): Likewise.
7446         (grub_video_i386_vbefill_direct32): Added.
7447         (grub_video_i386_vbefill_direct24): Likewise.
7448         (grub_video_i386_vbefill_direct16): Likewise.
7449         (grub_video_i386_vbefill_direct8): Likewise.
7451         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
7452         types.
7454         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
7455         types.
7457         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
7458         blitter types.
7460         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
7461         types.
7463 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
7465         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
7466         RAID level 1.
7468 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
7470         * fs/iso9660.c (grub_iso9660_date): New structure.
7471         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
7472         (grub_iso9660_uuid): New function.
7474 2008-09-05  Bean  <bean123ch@gmail.com>
7476         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
7478         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
7479         insensitive bit for names in Win32 and Win32 & DOS namespace.
7481         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
7483         * include/grub/types.h (LONG_MAX): Likewise.
7485 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
7487         * util/getroot.c: Include <config.h>.
7488         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
7489         add support for /dev/md/N devices and handle LVM double dash escaping.
7491 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
7493         * config.guess: Update to latest version from config git.
7494         * config.sub: Likewise.
7496 2008-09-03  Robert Millan  <rmh@aybabtu.com>
7498         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
7499         `disk->total_sectors'.
7501 2008-09-01  Colin D Bennett  <colin@gibibit.com>
7503         * include/grub/normal.h: Fixed incorrect comment for
7504         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
7506 2008-09-01  Colin D Bennett  <colin@gibibit.com>
7508         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
7509         values with defines.
7511         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
7512         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
7513         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
7514         (GRUB_VBE_MODEATTR_COLOR): Likewise.
7515         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
7516         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
7517         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
7518         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
7519         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
7520         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
7521         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
7522         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
7523         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
7524         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
7525         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
7526         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
7527         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
7528         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
7529         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
7531 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7533         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
7534         declaration.
7535         (grub_multiboot): Fix a few warnings.
7537 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7539         * loader/i386/pc/multiboot.c: Update comment not to say that
7540         boot_device support is unimplemented.
7542 2008-08-31  Robert Millan  <rmh@aybabtu.com>
7544         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
7545         or memory map support are unimplemented.
7547 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7549         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
7551 2008-08-31  Colin D Bennett  <colin@gibibit.com>
7553         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
7554         total video memory in 'vbeinfo' output; show color format details for
7555         each video mode.
7557 2008-08-30  Pavel Roskin  <proski@gnu.org>
7559         * util/genmoddep.c: Remove for real this time.
7560         * DISTLIST: Remove util/genmoddep.c.
7562 2008-08-30  Robert Millan  <rmh@aybabtu.com>
7564         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
7565         as required by Multiboot spec (it was already 4-byte aligned, but
7566         only by chance).
7568 2008-08-29  Pavel Roskin  <proski@gnu.org>
7570         * kern/powerpc/ieee1275/crt0.S: Rename to ...
7571         * kern/powerpc/ieee1275/startup.S: ... this.
7572         * conf/powerpc-ieee1275.rmk: Adjust for the above.
7573         * DISTLIST: Likewise.
7575         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
7576         grub/cpu/kernel.h.  Add start label for consistency with other
7577         platforms.  Add grub_prefix immediately after start.  Add jump
7578         to the code after grub_prefix.
7579         * include/grub/powerpc/kernel.h: Provide valid values for
7580         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
7582 2008-08-29  Bean  <bean123ch@gmail.com>
7584         * configure.ac: Change host_os to cygwin for mingw.
7585         (asprintf): New check for function.
7587         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
7588         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
7590         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
7591         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
7592         sync, sleep and grub_util_get_disk_size for mingw.
7594         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
7595         to get size in mingw.
7596         (open_device): Use flag O_BINARY if it's defined.
7597         (find_root_device): Add dummy code for mingw.
7599         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
7600         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
7601         (get_scsi_disk_name): Return 0 for mingw.
7603         * util/hostfs.c: #include <grub/util/misc.h>.
7604         (grub_hostfs_open): Use "rb" flag to open file, use
7605         grub_util_get_disk_size to get disk size for mingw.
7607         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
7608         (asprintf): New function if HAVE_ASPRINTF is not set.
7609         (sync): New function for mingw.
7610         (sleep): Likewise.
7611         (grub_util_get_disk_size): Likewise.
7613 2008-08-28  Pavel Roskin  <proski@gnu.org>
7615         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7616         kern/time.c.
7618 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7620         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
7622 2008-08-28  Robert Millan  <rmh@aybabtu.com>
7624         Change find_grub_drive() syntax so it doesn't prevent it from
7625         detecting NULL names as errors.
7627         * util/biosdisk.c (find_grub_drive): Move free slot search code
7628         from here ...
7629         (find_free_slot): ... to here.
7630         (read_device_map): Use find_free_slot() to search for free slots.
7632 2008-08-27  Marco Gerards  <marco@gnu.org>
7634         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
7635         (scsi_mod_SOURCES): New variable.
7636         (scsi_mod_CFLAGS): Likewise
7637         (scsi_mod_LDFLAGS): Likewise.
7639         * disk/scsi.c: New file.
7641         * include/grub/scsi.h: Likewise.
7643         * include/grub/scsicmd.h: Likewise.
7645         * disk/ata.c: Include <grub/scsi.h>.
7646         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
7647         instead.
7648         (grub_ata_iterate): Skip ATAPI devices.
7649         (grub_ata_open): Only handle ATAPI devices.
7650         (struct grub_atapi_read): Removed.
7651         (grub_atapi_readsector): Likewise.
7652         (grub_ata_read): No longer handle ATAPI devices.
7653         (grub_ata_write): Likewise.
7654         (grub_atapi_iterate): New function.
7655         (grub_atapi_read): Likewise.
7656         (grub_atapi_write): Likewise.
7657         (grub_atapi_open): Likewise.
7658         (grub_atapi_close): Likewise.
7659         (grub_atapi_dev): New variable.
7660         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
7661         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
7663         * include/grub/disk.h (enum grub_disk_dev_id): Add
7664         `GRUB_DISK_DEVICE_SCSI_ID'.
7666 2008-08-26  Robert Millan  <rmh@aybabtu.com>
7668         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
7669         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
7670         descriptive.
7672 2008-08-23  Bean  <bean123ch@gmail.com>
7674         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
7675         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
7676         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
7677         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
7678         dm_nv.mod.
7679         (raid5rec_mod_SOURCES): New macro.
7680         (raid5rec_mod_CFLAGS): Likewise.
7681         (raid5rec_mod_LDFLAGS): Likewise.
7682         (raid6rec_mod_SOURCES): Likewise.
7683         (raid6rec_mod_CFLAGS): Likewise.
7684         (raid6rec_mod_LDFLAGS): Likewise.
7685         (mdraid_mod_SOURCES): Likewise.
7686         (mdraid_mod_CFLAGS): Likewise.
7687         (mdraid_mod_LDFLAGS): Likewise.
7688         (dm_nv_mod_SOURCES): Likewise.
7689         (dm_nv_mod_CFLAGS): Likewise.
7690         (dm_nv_mod_LDFLAGS): Likewise.
7692         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
7693         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
7694         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7696         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
7697         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7699         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7701         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7703         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7705         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7707         * disk/raid5_recover.c: New file.
7709         * disk/raid6_recover.c: Likewise.
7711         * disk/mdraid_linux.c: Likewise.
7713         * disk/dmraid_nvidia.c: Likewise.
7715         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
7716         ULONG_MAX.
7718         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
7719         calculate the size of raid device.
7720         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
7721         different layout of raid5.
7722         (grub_raid_scan_device): Remove code specific to mdraid.
7723         (grub_raid_list): New variable.
7724         (free_array): New function.
7725         (grub_raid_register): Likewise.
7726         (grub_raid_unregister): Likewise.
7727         (grub_raid_rescan): Likewise.
7728         (GRUB_MOD_INIT): Don't iterate device here.
7729         (GRUB_MOD_FINI): Use free_array to release resource.
7731         * include/grub/raid.h: Remove macro and structure specific to mdraid.
7732         (grub_raid5_recover_func_t): New function variable type.
7733         (grub_raid6_recover_func_t): Likewise.
7734         (grub_raid5_recover_func): New variable.
7735         (grub_raid6_recover_func): Likewise.
7736         (grub_raid_register): New function.
7737         (grub_raid_unregister): Likewise.
7738         (grub_raid_rescan): Likewise.
7739         (grub_raid_block_xor): Likewise.
7741         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
7742         (CMD_CRC): New macro.
7743         (part): Removed.
7744         (read_file): Handle device as well as file.
7745         (cmd_crc): New function.
7746         (fstest): Handle multiple disks.
7747         (options): Remove part, raw and long, add root and diskcount.
7748         (usage): Add crc, remove -p, -r, -l, add -r and -c.
7749         (main): Find the first non option entry and ignore subsequent options,
7750         add handling for the new options, support multiple disks.
7752         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
7754 2008-08-23  Bean  <bean123ch@gmail.com>
7756         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
7758         * genfslist.sh: Ignore kernel.mod.
7760         * genpartmaplist.sh: Likewise.
7762 2008-08-23  Robert Millan  <rmh@aybabtu.com>
7764         * util/getroot.c (find_root_device): Skip anything that starts with
7765         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
7767 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
7769         * util/update-grub.in (GRUB_GFXMODE): Export variable.
7770         * util/grub.d/00_header.in: Allow the administrator to change default
7771         gfxmode via ${GRUB_GFXMODE}.
7773 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
7775         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
7777 2008-08-21  Robert Millan  <rmh@aybabtu.com>
7779         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
7780         loader.
7781         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
7782         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
7784 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
7786         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
7787         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
7789 2008-08-19  Robert Millan  <rmh@aybabtu.com>
7791         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
7792         (struct grub_virtual_screen): Remove `cursor_color'.
7793         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
7794         initialization.
7795         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
7797 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7799         Unify (identical) linux_normal.c files.
7800         * loader/i386/efi/linux_normal.c: Move from here ...
7801         * loader/linux_normal.c: ... to here.  Update all users.
7802         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
7803         * loader/i386/ieee1275/linux_normal.c: Likewise.
7805 2008-08-18  Robert Millan  <rmh@aybabtu.com>
7807         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
7808         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
7809         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
7810         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
7811         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
7812         New macros.
7813         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
7814         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
7815         (GRUB_LINUX_CL_END_OFFSET): ... to here.
7816         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
7817         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
7818         (GRUB_EFI_CL_END_OFFSET): Rename to ...
7819         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
7820         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
7821         Initialize `params->video_cursor_x' and `params->video_cursor_y'
7822         portably using grub_getxy().
7823         Replace `-EFI' with `-bzImage' in boot message.
7825 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7827         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
7829 2008-08-17  Robert Millan  <rmh@aybabtu.com>
7831         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
7833         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
7834         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
7835         (grub_machine_mmap_iterate): New function declaration.
7836         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
7837         structure.
7838         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
7839         macros.
7841         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
7842         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
7843         Move e820 parsing from here ...
7844         * kern/i386/pc/mmap.c: New file.
7845         (grub_machine_mmap_iterate): ... to here.
7847         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
7848         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
7849         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
7850         (grub_available_iterate): Redeclare to return `void', and redeclare
7851         its hook to use grub_uint64_t as addr and size parameters, and rename
7852         to ...
7853         (grub_machine_mmap_iterate): ... this.  Update all users.
7855         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
7856         to make it more readable.  Rename to ...
7857         (grub_machine_mmap_iterate): ... this.
7859         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
7860         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
7861         (grub_multiboot): Allocate an extra region after the payload, and fill
7862         it with a Multiboot memory map.  Adjust a.out loader to calculate size
7863         with the extra space.
7864         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
7865         with the extra space.
7867 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
7869         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
7871 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
7873         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
7874         mdate-sh to the list `find' searches for.
7875         * DISTLIST: Regenerated.
7877 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
7879         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
7880         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
7881         genmoddep.awk, gensymlist.sh.in.
7882         (DISTDIRS): Add bus, docs, hook, lib.
7883         * DISTLIST: Regenerated.
7884         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
7886 2008-08-16  Robert Millan  <rmh@aybabtu.com>
7888         * disk/raid.c (grub_raid_init): Handle/report errors set by
7889         grub_device_iterate().
7890         * disk/lvm.c (grub_lvm_init): Likewise.
7892 2008-08-15  Bean  <bean123ch@gmail.com>
7894         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7895         and datehook.mod.
7896         (datetime_mod_SOURCES): New macro.
7897         (datetime_mod_CFLAGS): Likewise.
7898         (datetime_mod_LDFLAGS): Likewise.
7899         (date_mod_SOURCES): Likewise.
7900         (date_mod_CFLAGS): Likewise.
7901         (date_mod_LDFLAGS): Likewise.
7902         (datehook_mod_SOURCES): Likewise.
7903         (datehook_mod_CFLAGS): Likewise.
7904         (datehook_mod_LDFLAGS): Likewise.
7906         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7907         and datehook.mod.
7908         (datetime_mod_SOURCES): New macro.
7909         (datetime_mod_CFLAGS): Likewise.
7910         (datetime_mod_LDFLAGS): Likewise.
7911         (date_mod_SOURCES): Likewise.
7912         (date_mod_CFLAGS): Likewise.
7913         (date_mod_LDFLAGS): Likewise.
7914         (datehook_mod_SOURCES): Likewise.
7915         (datehook_mod_CFLAGS): Likewise.
7916         (datehook_mod_LDFLAGS): Likewise.
7918         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7919         and datehook.mod.
7920         (datetime_mod_SOURCES): New macro.
7921         (datetime_mod_CFLAGS): Likewise.
7922         (datetime_mod_LDFLAGS): Likewise.
7923         (date_mod_SOURCES): Likewise.
7924         (date_mod_CFLAGS): Likewise.
7925         (date_mod_LDFLAGS): Likewise.
7926         (datehook_mod_SOURCES): Likewise.
7927         (datehook_mod_CFLAGS): Likewise.
7928         (datehook_mod_LDFLAGS): Likewise.
7930         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7931         and datehook.mod.
7932         (datetime_mod_SOURCES): New macro.
7933         (datetime_mod_CFLAGS): Likewise.
7934         (datetime_mod_LDFLAGS): Likewise.
7935         (date_mod_SOURCES): Likewise.
7936         (date_mod_CFLAGS): Likewise.
7937         (date_mod_LDFLAGS): Likewise.
7938         (datehook_mod_SOURCES): Likewise.
7939         (datehook_mod_CFLAGS): Likewise.
7940         (datehook_mod_LDFLAGS): Likewise.
7942         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7943         and datehook.mod.
7944         (datetime_mod_SOURCES): New macro.
7945         (datetime_mod_CFLAGS): Likewise.
7946         (datetime_mod_LDFLAGS): Likewise.
7947         (date_mod_SOURCES): Likewise.
7948         (date_mod_CFLAGS): Likewise.
7949         (date_mod_LDFLAGS): Likewise.
7950         (datehook_mod_SOURCES): Likewise.
7951         (datehook_mod_CFLAGS): Likewise.
7952         (datehook_mod_LDFLAGS): Likewise.
7954         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
7956         * commands/date.c: New file.
7958         * hook/datehook.c: Likewise.
7960         * include/grub/lib/datetime.h: Likewise.
7962         * include/grub/i386/cmos.h: Likewise.
7964         * lib/datetime.c: Likewise.
7966         * lib/i386/datetime.c: Likewise.
7968         * lib/efi/datetime.c: Likewise.
7970 2008-08-14  Robert Millan  <rmh@aybabtu.com>
7972         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
7973         (grub_mkelfimage_SOURCES): New variable.
7974         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
7976         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
7977         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
7978         * conf/powerpc-ieee1275.rmk: Likewise.
7979         * conf/i386-ieee1275.rmk: Likewise.
7981         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
7982         * kern/i386/coreboot/init.c: Likewise.
7984         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
7985         with `<grub/cpu/kernel.h>'.
7986         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
7987         to ...
7988         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
7989         * kern/i386/coreboot/startup.S: Likewise.
7991         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
7992         (GRUB_MOD_GAP): Remove.
7993         * include/grub/powerpc/kernel.h: New file.
7994         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
7995         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7996         * include/grub/i386/kernel.h: New file.
7997         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
7998         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
7999         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
8001         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
8002         `grub-mkelfimage'.
8003         Use --directory when invoking grub_mkimage.
8005         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
8006         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
8007         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
8008         and GRUB_KERNEL_CPU_PREFIX.
8010 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
8012         * include/grub/err.h (grub_err_printf): New function prototype.
8013         * util/misc.c (grub_err_printf): New function.
8014         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
8015         grub_printf.
8016         * kern/err.c (grub_print_error): Use grub_err_printf.
8018 2008-08-13  Robert Millan  <rmh@aybabtu.com>
8020         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
8022 2008-08-13  Robert Millan  <rmh@aybabtu.com>
8024         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
8025         boot entry.
8027 2008-08-12  Robert Millan  <rmh@aybabtu.com>
8029         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
8030         of the relocation code from here ...
8031         (grub_multiboot): ... to here.
8032         (forward_relocator, backward_relocator): Move from here ...
8033         * kern/i386/loader.S (grub_multiboot_forward_relocator)
8034         (grub_multiboot_backward_relocator): ... to here.
8035         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
8036         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
8037         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
8038         (grub_multiboot_forward_relocator_end)
8039         (grub_multiboot_backward_relocator)
8040         (grub_multiboot_backward_relocator_end): New variables.
8042 2008-08-12  Bean  <bean123ch@gmail.com>
8044         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
8046 2008-08-11  Robert Millan  <rmh@aybabtu.com>
8048         * kern/i386/linuxbios/startup.S: Move from here ...
8049         * kern/i386/coreboot/startup.S: ... to here.
8051         * kern/i386/linuxbios/init.c: Move from here ...
8052         * kern/i386/coreboot/init.c: ... to here.
8054         * kern/i386/linuxbios/table.c: Move from here ...
8055         * kern/i386/coreboot/mmap.c: ... to here.
8057         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
8059 2008-08-11  Robert Millan  <rmh@aybabtu.com>
8061         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
8062         errors.  Leave it to the upper layer to handle them.
8064 2008-08-09  Christian Franke  <franke@computer.org>
8066         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
8067         * conf/common.rmk: Install `grub-pe2elf' only if requested.
8068         Install `grub.d/10_windows' only on Cygwin.
8069         * configure.ac: Add subst of `target_os'.
8070         Check `target_os' also before setting TARGET_OBJ2ELF.
8071         Add `--enable-grub-pe2elf'.
8073 2008-08-08  Robert Millan  <rmh@aybabtu.com>
8075         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8076         (grub_last_time): Change type to grub_uint64_t.
8077         (grub_disk_open): Migrate code from to using grub_get_time_ms().
8078         (grub_disk_close): Likewise.
8080         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
8081         (run_menu): Migrate code from to using grub_get_time_ms().
8083         * util/misc.c (grub_get_time_ms): New function.
8085 2008-08-08  Marco Gerards  <marco@gnu.org>
8087         * disk/ata.c (grub_ata_regget): Change return type to
8088         `grub_uint8_t'.
8089         (grub_ata_regget2): Likewise.
8090         (grub_ata_wait_status): New function.
8091         (grub_ata_wait_busy): Removed function, updated all users to use
8092         `grub_ata_wait_status'.
8093         (grub_ata_wait_drq): Likewise.
8094         (grub_ata_cmd): New function.
8095         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
8096         error handling.
8097         (grub_ata_pio_write): Add error handling.
8098         (grub_atapi_identify): Likewise.
8099         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
8100         handling.
8101         (grub_ata_identify): Use `grub_ata_cmd' and improve error
8102         handling.  Actually use the detected registers.  Reorder the
8103         detection logic such that it is easier to read.
8104         (grub_ata_pciinit): Do not assign the same ID to each controller.
8105         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
8106         handling.
8107         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
8109         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
8111 2008-08-08  Marco Gerards  <marco@gnu.org>
8113         * NEWS: Update.
8115 2008-08-07  Bean  <bean123ch@gmail.com>
8117         * include/grub/x86_64/pci.h: New file.
8119 2008-08-07  Christian Franke  <franke@computer.org>
8121         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
8122         (TIMER2_GATE): Likewise.
8123         (grub_pit_wait): Add enable/disable of the timer2 gate
8124         bit of port 0x61.  This fixes a possible infinite loop.
8126 2008-08-07  Bean  <bean123ch@gmail.com>
8128         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
8129         kern/i386/tsc.c and kern/i386/pit.c.
8131         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
8132         x86_64 platform.
8134         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
8135         <grub/i386/tsc.h>.
8137         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
8139 2008-08-07  Bean  <bean123ch@gmail.com>
8141         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
8143         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
8145         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
8146         multiple inclusion. Add #include <grub/types.h>.
8148 2008-08-06  Christian Franke  <franke@computer.org>
8150         * conf/common.rmk: Build and install `10_windows'.
8151         * util/grub.d/10_windows.in: New script.
8153 2008-08-06  Pavel Roskin  <proski@gnu.org>
8155         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
8157 2008-08-06  Robert Millan  <rmh@aybabtu.com>
8159         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
8160         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
8162 2008-08-06  Bean  <bean123ch@gmail.com>
8164         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
8165         (grub_pxefs_fs_int): Remove dummy definition.
8166         (grub_pxefs_open): Use data->block_size to store the current block
8167         size setting.
8168         (grub_pxefs_read): Use block size stored in data->block_size. As the
8169         value of grub_pxe_blksize can be changed after the file is opened.
8171 2008-08-06  Bean  <bean123ch@gmail.com>
8173         * fs/i386/pc/pxe.c (curr_file): new variable.
8174         (grub_pxefs_open): Simply the handling of pxe file system. Don't
8175         require the dummy internal file system anymore.
8176         (grub_pxefs_read): Removed.
8177         (grub_pxefs_close): Likewise.
8178         (grub_pxefs_fs_int): Likewise.
8179         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
8180         connection when we switch file.
8181         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
8183 2008-08-06  Robert Millan  <rmh@aybabtu.com>
8185         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
8186         `halt.mod'.
8187         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
8188         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
8190         * kern/i386/halt.c: New file.
8191         * kern/i386/reboot.c: Likewise.
8192         * include/grub/i386/reboot.h: Likewise.
8193         * include/grub/i386/halt.h: Likewise.
8195         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
8196         Include `<grub/cpu/halt.h>'.
8197         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
8198         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
8200         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
8201         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
8202         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
8203         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
8204         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
8205         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
8206         from here ...
8207         * include/grub/i386/at_keyboard.h: ... to here.
8209 2008-08-05  Robert Millan  <rmh@aybabtu.com>
8211         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
8212         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
8213         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
8214         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8215         `kern/generic/millisleep.c'.
8217         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
8218         instead of grub_get_rtc().
8219         (grub_tsc_init): Initialize `tsc_boot_time'.
8221         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
8222         (grub_machine_init): Use grub_tsc_init() rather than
8223         installing an RTC-based handler via grub_install_get_time_ms().
8225         * kern/i386/pit.c: New file.
8226         * include/grub/i386/pit.h: Likewise.
8228 2008-08-05  Bean  <bean123ch@gmail.com>
8230         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
8232         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
8233         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
8234         (pxe_mod_SOURCES): New macro.
8235         (pxe_mod_CFLAGS): Likewise.
8236         (pxe_mod_LDFLAGS): Likewise.
8237         (pxecmd_mod_SOURCES): Likewise.
8238         (pxecmd_mod_CFLAGS): Likewise.
8239         (pxecmd_mod_LDFLAGS): Likewise.
8241         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
8242         (grub_pxe_call): Likewise.
8244         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
8246         * commands/i386/pc/pxecmd.c: New file.
8248         * fs/i386/pc/pxe.c: Likewise.
8250         * include/grub/i386/pc/pxe.h: Likewise.
8252 2008-08-05  Bean  <bean123ch@gmail.com>
8254         * util/console.c (grub_console_cur_color): New variable.
8255         (grub_console_standard_color): Likewise.
8256         (grub_console_normal_color): Likewise.
8257         (grub_console_highlight_color): Likewise.
8258         (color_map): Likewise.
8259         (use_color): Likewise.
8260         (NUM_COLORS): New macro.
8261         (grub_ncurses_setcolorstate): Handle color properly.
8262         (grub_ncurses_setcolor): Don't change color here, just remember the
8263         settings, color will be set in grub_ncurses_setcolorstate.
8264         (grub_ncurses_getcolor): New function.
8265         (grub_ncurses_init): Initialize color pairs.
8266         (grub_ncurses_term): New member grub_ncurses_getcolor.
8268 2008-08-05  Colin D Bennett  <colin@gibibit.com>
8270         High resolution timer support.  Implemented for x86 CPUs using TSC.
8271         Extracted generic grub_millisleep() so it's linked in only as needed.
8272         This requires a Pentium compatible CPU; if the RDTSC instruction is
8273         not supported, then it falls back on the generic grub_get_time_ms()
8274         implementation that uses the machine's RTC.
8276         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
8277         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
8278         `kern/generic/millisleep.c'.
8280         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
8281         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
8283         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
8284         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
8286         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8288         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
8289         `kern/generic/millisleep.c'.
8291         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8293         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
8295         * kern/generic/rtc_get_time_ms.c: New file.
8297         * kern/generic/millisleep.c: New file.
8299         * kern/misc.c: Don't include
8300         <kern/time.h> anymore.
8301         (grub_millisleep_generic): Removed.
8303         * commands/sleep.c (grub_interruptible_millisleep): Uses
8304         grub_get_time_ms() instead of grub_get_rtc().
8306         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
8307         function.
8308         (grub_cpu_is_cpuid_supported): New inline function.
8309         (grub_cpu_is_tsc_supported): New inline function.
8310         (grub_tsc_init): New function prototype.
8311         (grub_tsc_get_time_ms): New function prototype.
8313         * kern/i386/tsc.c (grub_get_time_ms): New file.
8315         * include/grub/time.h: Include <grub/types.h.
8316         (grub_millisleep_generic): Removed.
8317         (grub_get_time_ms): New prototype.
8318         (grub_install_get_time_ms): New prototype.
8319         (grub_rtc_get_time_ms): New prototype.
8321         * kern/time.c (grub_get_time_ms): New function.
8322         (grub_install_get_time_ms): New function.
8324         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
8325         <grub/time.h> anymore.
8326         (grub_millisleep): Removed.
8327         (grub_machine_init): Call grub_tsc_init.
8329         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
8330         get_time_ms() implementation.
8332         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
8333         (ieee1275_get_time_ms): New function.
8334         (grub_machine_init): Install get_time_ms() implementation.
8336         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
8337         (grub_machine_init): Call grub_tsc_init().
8338         (grub_millisleep): Removed.
8340         * kern/ieee1275/init.c (grub_millisleep): Removed.
8341         (grub_machine_init): Install ieee1275_get_time_ms()
8342         implementation.
8343         (ieee1275_get_time_ms): New function.
8344         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
8345         real work.
8347 2008-08-05  Marco Gerards  <marco@gnu.org>
8349         * disk/ata.c: Include <grub/pci.h>.
8350         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
8351         (grub_ata_initialize): Rewritten.
8352         (grub_ata_device_initialize): New function.
8354 2008-08-04  Pavel Roskin  <proski@gnu.org>
8356         * kern/main.c: Include grub/mm.h.
8358 2008-08-04  Robert Millan  <rmh@aybabtu.com>
8360         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
8361         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
8362         corruption problem).
8364 2008-08-04  Robert Millan  <rmh@aybabtu.com>
8366         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
8367         warnings introduced in my last commit.
8369 2008-08-03  Robert Millan  <rmh@aybabtu.com>
8371         Make PCI available on all i386 architectures.
8373         * include/grub/i386/pc/pci.h: Move from here ...
8374         * include/grub/i386/pci.h: ... to here.
8376         * include/grub/i386/pc/pci.h: Remove.
8377         * include/grub/i386/efi/pci.h: Remove.
8378         * include/grub/x86_64/efi/pci.h: Remove.
8380         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
8381         `<grub/cpu/pci.h>'.
8383         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
8384         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
8385         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
8387         * conf/i386-ieee1275.rmk: Likewise.
8389 2008-08-03  Robert Millan  <rmh@aybabtu.com>
8391         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
8392         (grub_console_setcursor): Make it possible to set cursor off.
8394 2008-08-03  Robert Millan  <rmh@aybabtu.com>
8396         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
8397         of modules instead of assuming which platform provides what.
8398         * util/update-grub.in: Likewise.
8400 2008-08-03  Robert Millan  <rmh@aybabtu.com>
8402         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
8403         instead of `grub_install_dos_part' to determine whether a drive needs
8404         to be prepended to prefix (`grub_install_dos_part' is not reliable,
8405         because it can be overridden when loading GRUB via Multiboot).
8407 2008-08-02  Robert Millan  <rmh@aybabtu.com>
8409         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
8411 2008-08-02  Robert Millan  <rmh@aybabtu.com>
8413         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
8414         of informational grub_dprintf() calls.
8416 2008-08-02  Robert Millan  <rmh@aybabtu.com>
8418         * disk/memdisk.c (memdisk_size): Don't initialize.
8419         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
8421         * include/grub/i386/pc/kernel.h
8422         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
8423         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
8424         (grub_memdisk_image_size, grub_arch_memdisk_addr)
8425         (grub_arch_memdisk_size): Remove.
8427         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
8428         field (was only used to transfer a constant).  Add `type' field to
8429         support multiple module types.
8430         (grub_module_iterate): New function.
8432         * kern/device.c (grub_device_open): Do not hide error messages
8433         when grub_disk_open() fails.  Use grub_print_error() instead.
8435         * kern/i386/pc/init.c (grub_arch_modules_addr)
8436         (grub_arch_memdisk_size): Remove functions.
8437         (grub_arch_modules_addr): Return the module address in high memory
8438         (now that it isn't copied anymore).
8440         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
8441         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
8442         decompression routine (grub_total_module_size already includes that
8443         now).  Don't copy modules back to low memory.
8445         * kern/main.c: Include `<grub/mm.h>'.
8446         (grub_load_modules): Split out (and use) ...
8447         (grub_module_iterate): ... this function, which iterates through
8448         module objects and runs a hook.
8449         Comment out grub_mm_init_region() call, as it would cause non-ELF
8450         modules to be overwritten.
8452         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
8453         the memdisk image in its own region, make it part of the module list.
8454         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
8455         (main): Parse --memdisk|-m option, and pass user-provided path as
8456         parameter to generate_image().
8457         (add_segments): Pass `memdisk_path' down to load_modules().
8458         (load_modules): Embed memdisk image in module section when requested.
8459         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
8460         `header.type' instead of `header.offset'.
8462         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
8463         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
8464         (memdisk_mod_LDFLAGS): New variables.
8465         * conf/i386-coreboot.rmk: Likewise.
8466         * conf/i386-ieee1275.rmk: Likewise.
8468 2008-08-02  Robert Millan  <rmh@aybabtu.com>
8470         * loader/i386/pc/multiboot.c (playground, forward_relocator)
8471         (backward_relocator): New variables.  Used to allocate and relocate
8472         the payload, respectively.
8473         (grub_multiboot_load_elf32): Load into heap instead of requested
8474         address, install the appropriate relocator code in each bound of
8475         the payload, and set the entry point such that
8476         grub_multiboot_real_boot() will jump to one of them.
8478         * kern/i386/loader.S (grub_multiboot_payload_size)
8479         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
8480         (grub_multiboot_payload_entry_offset): New variables.
8481         (grub_multiboot_real_boot): Set cpu context to what the relocator
8482         expects, and jump to the relocator instead of the payload.
8484         * include/grub/i386/loader.h (grub_multiboot_payload_size)
8485         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
8486         (grub_multiboot_payload_entry_offset): Export.
8488 2008-08-01  Bean  <bean123ch@gmail.com>
8490         * normal/menu_entry.c (editor_getline): Don't return the original
8491         string as result, as it will be released by lexer once it has done
8492         using it.
8494 2008-08-01  Robert Millan  <rmh@aybabtu.com>
8496         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
8497         within menuentries, not before them.
8498         util/grub.d/10_hurd.in: Likewise.
8500 2008-08-01  Bean  <bean123ch@gmail.com>
8502         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
8503         (bufio_mod_SOURCES): New macro.
8504         (bufio_mod_CFLAGS): Likewise.
8505         (bufio_mod_LDFLAGS): Likewise.
8507         * include/grub/bufio.h: New file.
8509         * io/bufio.c: Likewise.
8511         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
8512         (grub_video_reader_png): Use grub_buffile_open to open file.
8514         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
8515         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
8517         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
8518         (grub_video_reader_tga): Use grub_buffile_open to open file.
8520         * font/manager.c: Include <grub/bufio.h>.
8521         (add_font): Use grub_buffile_open to open file.
8523 2008-07-31  Robert Millan  <rmh@aybabtu.com>
8525         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
8526         ELF segments, use a macro for arbitrarily accessing any of them instead
8527         of preparing a pointer that allows access to one at a time.
8528         (grub_multiboot_load_elf64): Likewise.
8530 2008-07-31  Bean  <bean123ch@gmail.com>
8532         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
8533         GRUB_KERNEL_MACHINE_DATA_END.
8535 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8537         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
8538         Increase from 0x50 to 0x60.
8539         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
8540         use UUIDs to identify the root drive for them.  If that's not
8541         possible, abort.
8542         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
8543         check, for cross-disk installs.
8545 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8547         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
8548         is non-empty, use it to set the `prefix' environment variable instead
8549         of the usual approach.
8550         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
8551         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
8552         environment variable instead of dummy make_install_device().
8554         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
8555         (start): Insert a data section, with `grub_prefix' variable.
8556         * kern/i386/linuxbios/startup.S: Likewise.
8558         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
8559         New variable reference.
8560         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
8561         New macro.  Defines offset of `grub_prefix' within startup.S (relative
8562         to `start').
8563         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
8564         section within startup.S (relative to `start').
8565         * include/grub/i386/coreboot/kernel.h: Likewise.
8567         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
8568         Overwrite grub_prefix with its contents, at the beginning of the
8569         first segment.
8570         (main): Understand -p|--prefix.
8572 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8574         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
8576 2008-07-30  Robert Millan  <rmh@aybabtu.com>
8578         * term/i386/pc/vga_text.c (grub_console_cls): Use
8579         grub_console_gotoxy() to go back to beginning of the screen.
8580         Found by Patrick Georgi <patrick.georgi@coresystems.de>
8582 2008-07-29  Christian Franke  <franke@computer.org>
8584         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8585         Add conversion of emulated mount points on Cygwin.
8587 2008-07-29  Christian Franke  <franke@computer.org>
8589         * util/update-grub.in: Add a check for admin
8590         group on Cygwin.
8591         Remove old `grub.cfg.new' before creation.
8592         Add `-f' to `mv' to handle the different filesystem
8593         semantics of Windows.
8595 2008-07-29  Bean  <bean123ch@gmail.com>
8597         * normal/main.c (get_line): Fix buffer overflow bug.
8599 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8601         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
8602         (struct grub_apple_header): New struct.  Describes the layout of
8603         the partmap header.
8604         (apple_partition_map_iterate): Check the header magic as well as the
8605         partition magic (which was already being checked).
8607 2008-07-28  Pavel Roskin  <proski@gnu.org>
8609         * genmk.rb: Add a warning to the beginning of the output that
8610         it's a generated file and should not be edited.
8612 2008-07-28  Robert Millan  <rmh@aybabtu.com>
8614         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
8615         with the same number are found, just use issue a warning with
8616         grub_dprintf(), as this error has been reported to be non-fatal.
8618 2008-07-27  Robert Millan  <rmh@aybabtu.com>
8620         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
8621         information.
8623 2008-07-27  Bean  <bean123ch@gmail.com>
8625         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
8626         (grub_fat_find_dir): Ignore case when comparing filename.
8628 2008-07-27  Bean  <bean123ch@gmail.com>
8630         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
8631         smallino, as it's more descriptive, and i8count can be confused with
8632         the other field count.
8633         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
8634         inode type.
8636 2008-07-27  Bean  <bean123ch@gmail.com>
8638         * commands/crc.c: New file.
8640         * lib/crc.c: Likewise.
8642         * include/grub/lib/crc.h: Likewise.
8644         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
8646         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
8647         (hexdump): Move this function to ...
8649         * lib/hexdump.c: ... here.
8651         * include/grub/hexdump.h: Renamed to ...
8653         * include/grub/lib/hexdump.h: ... this.
8655         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
8657         * util/grub-editenv.c: Likewise.
8659         * include/envblk.h: Renamed to ...
8661         * include/lib/envblk.h: ... this.
8663         * util/envblk.c: Renamed to ...
8665         * lib/envblk.c: ... this.
8667         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
8668         lib/hexdump.c.
8669         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
8670         (pkglib_MODULES): Add crc.mod.
8671         (hexdump_mod_SOURCES): Add lib/hexdump.c.
8672         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
8673         (crc_mod_SOURCES): New macro.
8674         (crc_mod_CFLAGS): Likewise.
8675         (crc_mod_LDFLAGS): Likewise.
8677         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
8679         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8681         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8683         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8685         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8687 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
8689         * commands/help.c: Include <grub/term.h>.
8690         (TERM_WIDTH): Removed.  Updated all users.
8692 2008-07-27  Pavel Roskin  <proski@gnu.org>
8694         * util/getroot.c (find_root_device): Rephrase a comment to avoid
8695         spurious warnings about a comment within a comment.
8697 2008-07-25  Robert Millan  <rmh@aybabtu.com>
8699         * util/getroot.c (find_root_device): Skip devices that match
8700         /dev/dm-[0-9].  This lets the real device be found for any type of
8701         abstraction (LVM, EVMS, RAID..).
8702         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
8703         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
8704         device is found first, find_root_device() will now skip it.
8706 2008-07-24  Pavel Roskin  <proski@gnu.org>
8708         * include/grub/types.h: Use __builtin_bswap32() and
8709         __builtin_bswap64() with gcc 4.3 and newer.
8711 2008-07-24  Christian Franke  <franke@computer.org>
8713         * util/i386/pc/grub-install.in: If `--debug' is specified,
8714         pass `--verbose' to grub-setup.
8715         Abort script if make_system_path_relative_to_its_root() fails.
8717 2008-07-24  Bean  <bean123ch@gmail.com>
8719         * configure.ac: Fixed a bug caused by the previous cygwin patch,
8720         variable `target_platform' should be `platform'.
8722 2008-07-24  Bean  <bean123ch@gmail.com>
8724         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
8725         (grub_png_init_fixed_block): New function.
8726         (grub_png_decode_image_data): Handle fixed huffman code compression.
8728 2008-07-24  Bean  <bean123ch@gmail.com>
8730         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
8731         (grub_pe2elf_SOURCES): New macro.
8732         (CLEANFILES): Add grub-pe2elf.
8734         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
8735         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
8736         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
8737         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
8738         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
8739         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
8740         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
8741         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
8742         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
8743         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
8744         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
8745         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
8746         (GRUB_PE32_DT_FUNCTION): Likewise.
8747         (GRUB_PE32_REL_I386_DIR32): Likewise.
8748         (GRUB_PE32_REL_I386_REL32): Likewise.
8749         (grub_pe32_symbol): New structure.
8750         (grub_pe32_reloc): Likewise.
8752         * util/grub-pe2elf.c: New file.
8754         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
8755         start symbol in non pc platform.
8757         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
8759         The following patches are from Christian Franke.
8761         * include/grub/dl.h: Remove .previous, gas supports this only
8762         for ELF format.
8764         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
8765         Remove .type, gas supports this only for ELF format.
8767         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
8768         nullbytes in symbol table. This fixes an infinite loop if table is
8769         zero filled.
8771         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
8772         TARGET_IMG_LDFLAGS and EXEEXT.
8774         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
8775         TARGET_IMG_LDFLAGS_AC.
8776         (grub_CHECK_STACK_ARG_PROBE): New function.
8778         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
8780         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
8782         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
8783         to set TARGET_IMG_LD* accordingly.
8784         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
8785         Add call to grub_CHECK_STACK_ARG_PROBE.
8786         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
8788         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
8790         * genmk.rb: Add EXEEXT to CLEANFILES.
8792 2008-07-23  Robert Millan  <rmh@aybabtu.com>
8794         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
8795         define the codes for arrows and lines used for the menu).
8796         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
8797         as well.
8799         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
8800         fonts, because the latter are too slow.
8802 2008-07-21  Bean  <bean123ch@gmail.com>
8804         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
8805         a20. Run keyboard test last, as it will cause macbook to halt.
8807 2008-07-18  Pavel Roskin  <proski@gnu.org>
8809         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
8810         load foreign architecture modules correctly anyway.  Keep
8811         support for loading host architecture modules, whether we
8812         compile them or not.
8814 2008-07-17  Pavel Roskin  <proski@gnu.org>
8816         * configure.ac: Use -m32 or -m64 regardless of whether we had to
8817         change target_cpu.  The compiler default can mismatch target_cpu
8818         in any case.
8820         * disk/efi/efidisk.c: Fix format warnings on x86_64.
8821         * kern/efi/efi.c: Likewise.
8823         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
8824         target compiler is functional.
8825         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
8826         are set up.
8828         * configure.ac: Default to efi platform for x86_64-apple.  Allow
8829         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
8830         adjustments from the rest, only do them if target is not
8831         explicitly given.  Merge other adjustments with the final sanity
8832         check.  Remove an extraneous check for supported CPU.  Be
8833         specific which CPU and which platform is not supported.
8835         * configure.ac: Default to pc platform for x86_64.
8837 2008-07-17  Robert Millan  <rmh@aybabtu.com>
8839         Partial LinuxBIOS -> Coreboot rename.
8841         * conf/i386-linuxbios.rmk: Renamed to ...
8842         * conf/i386-coreboot.rmk: ... this.
8843         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
8844         * configure.ac: Accept "coreboot" as input platform (but maintain
8845         compatibility with "linuxbios").
8846         * include/grub/i386/linuxbios: Renamed to ...
8847         * include/grub/i386/coreboot: ... this.
8849 2008-07-17  Bean  <bean123ch@gmail.com>
8851         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
8852         (appleldr_mod_SOURCE): New variable.
8853         (appleldr_mod_CFLAGS): Likewise.
8854         (appleldr_mod_LDFLAGS): Likewise.
8855         (pci_mod_SOURCES): Likewise.
8856         (pci_mod_CFLAGS): Likewise.
8857         (pci_mod_LDFLAGS): Likewise.
8858         (lspci_mod_SOURCES): Likewise.
8859         (lspci_mod_CFLAGS): Likewise.
8860         (lspci_mod_LDFLAGS): Likewise.
8862         * conf/x86_64-efi.rmk: New file.
8864         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
8865         macro.
8866         (grub_efidisk_write): Likewise.
8868         * include/efi/api.h (efi_call_0): New macro.
8869         (efi_call_1): Likewise.
8870         (efi_call_2): Likewise.
8871         (efi_call_3): Likewise.
8872         (efi_call_4): Likewise.
8873         (efi_call_5): Likewise.
8874         (efi_call_6): Likewise.
8876         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
8877         grub_rescue_cmd_chainloader.
8879         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
8880         (grub_pe32_optional_header): Change some fields based on i386 or
8881         x86_64 platform.
8882         (GRUB_PE32_PE32_MAGIC): Likewise.
8884         * include/grub/efi/uga_draw.h: New file.
8886         * include/grub/elf.h (STN_ABS): New constant.
8887         (R_X86_64_NONE): Relocation constant for x86_64.
8888         (R_X86_64_64): Likewise.
8889         (R_X86_64_PC32): Likewise.
8890         (R_X86_64_GOT32): Likewise.
8891         (R_X86_64_PLT32): Likewise.
8892         (R_X86_64_COPY): Likewise.
8893         (R_X86_64_GLOB_DAT): Likewise.
8894         (R_X86_64_JUMP_SLOT): Likewise.
8895         (R_X86_64_RELATIVE): Likewise.
8896         (R_X86_64_GOTPCREL): Likewise.
8897         (R_X86_64_32): Likewise.
8898         (R_X86_64_32S): Likewise.
8899         (R_X86_64_16): Likewise.
8900         (R_X86_64_PC16): Likewise.
8901         (R_X86_64_8): Likewise.
8902         (R_X86_64_PC8): Likewise.
8904         * include/grub/i386/efi/pci.h: New file.
8906         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
8907         Change it value based on platform.
8908         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
8909         (GRUB_E820_RAM): Likewise.
8910         (GRUB_E820_RESERVED): Likewise.
8911         (GRUB_E820_ACPI): Likewise.
8912         (GRUB_E820_NVS): Likewise.
8913         (GRUB_E820_EXEC_CODE): Likewise.
8914         (GRUB_E820_MAX_ENTRY): Likewise.
8915         (grub_e820_mmap): New structure.
8916         (linux_kernel_header): Change the efi field according to different
8917         kernel version, also field from linux_kernel_header.
8919         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
8921         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
8922         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
8923         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
8924         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
8925         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
8926         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
8927         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
8928         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
8929         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
8930         (GRUB_PCI_ADDR_IO_MASK): Likewise.
8932         * include/grub/x86_64/efi/kernel.h: New file.
8934         * include/grub/x86_64/efi/loader.h: Likewise.
8936         * include/grub/x86_64/efi/machine.h: Likewise.
8938         * include/grub/x86_64/efi/pci.h: Likewise.
8940         * include/grub/x86_64/efi/time.h: Likewise.
8942         * include/grub/x86_64/linux.h: Likewise.
8944         * include/grub/x86_64/setjmp.h: Likewise.
8946         * include/grub/x86_64/time.h: Likewise.
8948         * include/grub/x86_64/types.h: Likewise.
8950         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
8951          GRUB_TARGET_SIZEOF_VOID_P.
8953         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
8954         (grub_efi_locate_handle): Likewise.
8955         (grub_efi_open_protocol): Likewise.
8956         (grub_efi_set_text_mode): Likewise.
8957         (grub_efi_stall): Likewise.
8958         (grub_exit): Likewise.
8959         (grub_reboot): Likewise.
8960         (grub_halt): Likewise.
8961         (grub_efi_exit_boot_services): Likewise.
8962         (grub_get_rtc): Likewise.
8964         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
8965         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
8966         (grub_efi_allocate_pages): Wrap efi calls.
8967         (grub_efi_free_pages): Wrap efi calls.
8968         (grub_efi_get_memory_map): Wrap efi calls.
8970         * kern/x86_64/dl.c: New file.
8972         * kern/x86_64/efi/callwrap.S: Likewise.
8974         * kern/x86_64/efi/startup.S: Likewise.
8976         * loader/efi/appleloader.c: Likewise.
8978         * loader/efi/chainloader.c (cmdline): New variable.
8979         (grub_chainloader_unload): Wrap efi calls.
8980         (grub_chainloader_boot): Likewise.
8981         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
8982         command line.
8984         * loader/efi/chainloader_normal.c (chainloader_command):
8985         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
8986         command line.
8988         * loader/i386/efi/linux.c (allocate_pages): Change allocation
8989         method.
8990         (grub_e820_add_region): New function.
8991         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
8992         booting.
8993         (grub_find_video_card): New function.
8994         (grub_linux_setup_video): New function.
8995         (grub_rescue_cmd_linux): Probe for video information.
8997         * normal/x86_64/setjmp.S: New file.
8999         * term/efi/console.c (map_char): New function.
9000         (grub_console_putchar): Map unicode char.
9001         (grub_console_checkkey): Wrap efi calls.
9002         (grub_console_getkey): Likewise.
9003         (grub_console_getwh): Likewise.
9004         (grub_console_gotoxy): Likewise.
9005         (grub_console_cls): Likewise.
9006         (grub_console_setcolorstate): Likewise.
9007         (grub_console_setcursor): Likewise.
9009         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
9011 2008-07-16  Pavel Roskin  <proski@gnu.org>
9013         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
9014         format strings.
9016         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
9017         pointer, not an integer.  This fixes a warning and prevents
9018         precision loss on 64-bit systems.
9019         (relocate_addresses): Remove unneeded cast.
9021 2008-07-15  Pavel Roskin  <proski@gnu.org>
9023         * kern/i386/ieee1275/init.c: Include grub/cache.h.
9025         * term/ieee1275/ofconsole.c: Disable code unused on i386.
9027         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
9028         Fix comparison between signed and unsigned.
9030         * include/grub/i386/ieee1275/console.h: Declare
9031         grub_console_init() and grub_console_fini().
9033         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
9034         It's empty and unused.
9036         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
9037         beginning to avoid warnings with some compilers.
9039         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
9040         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
9042 2008-07-14  Pavel Roskin  <proski@gnu.org>
9044         * kern/env.c (grub_register_variable_hook): Don't copy empty
9045         string, it leaks memory.  Pass "" to grub_env_set(), it should
9046         handle constant strings.
9048         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
9049         * commands/cmp.c (grub_cmd_cmp): Likewise.
9050         * kern/dl.c (grub_dl_flush_cache): Likewise.
9051         (grub_dl_load_core): Likewise.
9052         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
9053         (grub_elf64_load_phdrs): Likewise.
9055 2008-07-13  Pavel Roskin  <proski@gnu.org>
9057         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
9058         between signed and unsigned.
9059         (LzmaEnc_Finish): Fix warning about an unused parameter.
9061 2008-07-13  Bean  <bean123ch@gmail.com>
9063         * Makefile.in (enable_lzo): New rule.
9065         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
9067         * configure.ac (ENABLE_LZO): New option --enable-lzo.
9069         * boot/i386/pc/lnxboot.S: #include <config.h>.
9071         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
9072         its value according to the compression algorithm used, lzo or lzma.
9074         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
9075         compression algorithm according to configure macro.
9077         * kern/i386/pc/startup.S (codestart): Likewise.
9079         * kern/i386/pc/lzma_decode.S: New file.
9081         * include/grub/lib/LzFind.h: Likewise.
9083         * include/grub/lib/LzHash.h: Likewise.
9085         * include/grub/lib/LzmaDec.h: Likewise.
9087         * include/grub/lib/LzmaEnc.h: Likewise.
9089         * include/grub/lib/LzmaTypes.h: Likewise.
9091         * lib/LzFind.c: Likewise.
9093         * lib/LzmaDec.c: Likewise.
9095         * lib/LzmaEnc.c: Likewise.
9097 2008-07-13  Bean  <bean123ch@gmail.com>
9099         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
9100         (grub_ext4_extent_header): New structure.
9101         (grub_ext4_extent): Likewise.
9102         (grub_ext4_extent_idx): Likewise.
9103         (grub_ext4_find_leaf): New function.
9104         (grub_ext2_read_block): Handle extents.
9106 2008-07-12  Robert Millan  <rmh@aybabtu.com>
9108         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
9110 2008-07-11  Robert Millan  <rmh@aybabtu.com>
9112         * util/grub.d/40_custom.in: New file. Example on how to add custom
9113         entries to /etc/grub.d.
9114         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
9115         40_custom (implicitly, by merging all the grub.d rules).
9117 2008-07-11  Pavel Roskin  <proski@gnu.org>
9119         * commands/read.c (grub_getline): Fix invalid memory access.
9120         Don't add newline to the variable value.
9122         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
9123         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
9124         (serial_hw_get_port): Check validity of the port number.
9125         (grub_cmd_serial): Check return value of serial_hw_get_port().
9127 2008-07-07  Pavel Roskin  <proski@gnu.org>
9129         * boot/i386/pc/diskboot.S (notification_string): Replace
9130         "Loading kernel" with just "loading".  This is shorter, less
9131         confusing and saves a few bytes for possible future changes.
9133 2008-07-05  Pavel Roskin  <proski@gnu.org>
9135         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
9136         size for ATAPI devices, they are undefined.  Output sector
9137         number in decimal form.
9139         * disk/ata.c: Use named constants for status bits.
9141 2008-07-04  Pavel Roskin  <proski@gnu.org>
9143         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
9144         grub_addr_t before casting it to the void pointer to fix a
9145         warning.  Non-addressable regions are discarded earlier.
9146         (grub_arch_modules_addr): Cast _end to grub_addr_t.
9147         * kern/i386/linuxbios/table.c: Include grub/misc.h.
9148         (check_signature): Don't shadow table_header.
9149         (grub_linuxbios_table_iterate): Cast numeric constants to
9150         grub_linuxbios_table_header_t.
9151         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
9152         grub_stop().
9154         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
9155         prevent warnings.
9157         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
9158         pointer, which can cause warnings.  Support 64-bit addresses.
9160         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
9161         of sizeof(long).  This fixes PowerPC image generation on x86_64.
9163 2008-07-04  Robert Millan  <rmh@aybabtu.com>
9165         This fixes a performance issue when pc & gpt partmap iterators
9166         didn't abort iteration even after our hook found what it was
9167         looking for (often causing expensive probes of non-existent drives).
9169         Some callers relied on previous buggy behaviour, since they would
9170         raise an error when their own hooks caused early abortion of its
9171         iteration.
9173         * kern/device.c (grub_device_open): Improve error message.
9174         * disk/lvm.c (grub_lvm_open): Likewise.
9175         * disk/raid.c (grub_raid_open): Likewise.
9177         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
9178         when hook requests it, independently of grub_errno.
9179         (pc_partition_map_probe): Do not fail when find_func() caused
9180         early abortion of pc_partition_map_iterate().
9182         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
9183         when hook requests it, independently of grub_errno.
9184         (gpt_partition_map_probe): Do not fail when find_func() caused
9185         early abortion of gpt_partition_map_iterate().
9187         * kern/partition.c (grub_partition_iterate): Abort parent iteration
9188         when hook requests it, independently of grub_errno.  Do not fail when
9189         part_map_iterate_hook() caused early abortion of p->iterate().
9191         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
9192         when grub_partition_iterate() returned with non-zero.
9194 2008-07-03  Pavel Roskin  <proski@gnu.org>
9196         * disk/ata.c (grub_ata_pio_write): Check status before writing,
9197         like we do in grub_ata_pio_read().
9198         (grub_ata_readwrite): Always write individual sectors.  Fix the
9199         sector count for the remainder.
9200         (grub_ata_write): Enable writing to ATA devices.  Correctly
9201         report error for ATAPI devices.
9203 2008-07-02  Pavel Roskin  <proski@gnu.org>
9205         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
9206         warning.
9208         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
9209         for every read sector, we already increment it for the whole
9210         batch.  This fixes reading more than 256 sectors at once.
9212         * util/grub-editenv.c (cmd_info): Cast argument to long
9213         explicitly.  ptrdiff_t reduces to int on i386.
9215         * util/grub-editenv.c (main): Be specific which parameter is
9216         missing.
9218         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
9219         (memdisk): Make memdisk_orig_addr a pointer.
9221         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
9222         for file offsets, use grub_off_t instead.  Fix printf format
9223         warnings.
9225         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
9226         there.  Real unexpected warnings should not drown in the noise
9227         about known problems.
9229         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
9230         grub_disk_addr_t for memory addresses.
9232         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
9233         explicitly to fix a warning.
9235         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
9237         * Makefile.in (MODULE_LDFLAGS): New variable.
9238         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
9239         the linker accepts --build-id=none.
9240         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
9241         MODULE_LDFLAGS.
9242         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
9244         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
9245         those in Linux XFS code.  Provide a way to access 64-bit parent
9246         inode.
9247         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
9248         the end of struct grub_xfs_dir_header.
9250 2008-07-02  Bean  <bean123ch@gmail.com>
9252         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
9253         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9254         and GRUB_IEEE1275_FLAG_NO_ANSI.
9256         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
9257         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
9258         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
9260         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
9261         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
9263         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
9264         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
9266         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
9267         esc sequence on non ANSI terminal.
9268         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
9270         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
9271         beginning of file.
9273 2008-07-02  Bean  <bean123ch@gmail.com>
9275         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
9276         (grub_editenv_SOURCES): New variable.
9277         (pkglib_MODULES): Add loadenv.mod.
9278         (loadenv_mod_SOURCES): New variable.
9279         (loadenv_mod_CFLAGS): Likewise.
9280         (loadenv_mod_LDFLAGS): Likewise.
9282         * include/grub/envblk.h: New file.
9284         * util/envblk.c: New file.
9286         * util/grub-editenv.c: New file.
9288         * commands/loadenv.c: New file.
9290 2008-07-01  Pavel Roskin  <proski@gnu.org>
9292         * include/multiboot2.h (struct multiboot_tag_module): Use char,
9293         not unsigned char.  This fixes warnings and is consistent with
9294         other tags.
9296         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
9298         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
9300         * term/tparm.c (analyze): Always set *popcount.
9302         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
9303         cast to fix a warning.
9305         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
9306         cast to suppress a warning.
9308         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
9309         grub_fshelp_read_file() expects.
9311         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
9312         write uuid as a 32-bit value in CPU byte order, so declare and
9313         use it as such.
9315         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
9316         long if the format specifier expects it.
9317         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
9318         * partmap/pc.c (pc_partition_map_iterate): Likewise.
9319         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
9320         long to fix a warning.
9321         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
9322         grub_dprintf() arguments to fix warnings.
9324 2008-06-30  Pavel Roskin  <proski@gnu.org>
9326         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
9327         install_bsd_part immediately before core.img is embedded or
9328         modified on disk.  This fixes core.img verification if core.img
9329         cannot be embedded.
9331         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
9332         core_path to calculate the blocklist.
9333         Patch from Javier Martín <lordhabbit@gmail.com>
9335 2008-06-29  Robert Millan  <rmh@aybabtu.com>
9337         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
9338         block to disk block.
9339         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
9340         Patch from Niels Böhm <bitbucket@arcor.de>
9342 2008-06-29  Robert Millan  <rmh@aybabtu.com>
9344         * util/update-grub_lib.in (font_path): Search for fonts in
9345         /boot/grub first, which is more likely to be readable (we aren't
9346         deciding where fonts live, just looking for them).
9348 2008-06-26  Pavel Roskin  <proski@gnu.org>
9350         * util/biosdisk.c (read_device_map): Don't leave dead map
9351         entries for devices failing stat() check.
9353         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
9354         core_path_dev for the core.img path on the target device.
9356 2008-06-26  Robert Millan  <rmh@aybabtu.com>
9358         * disk/fs_uuid.c: New file.
9359         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
9360         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
9361         (fs_uuid_mod_LDFLAGS): New variables.
9362         * include/grub/disk.h (grub_disk_dev_id): Add
9363         `GRUB_DISK_DEVICE_UUID_ID'.
9364         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
9365         implement iterate().
9367 2008-06-26  Robert Millan  <rmh@aybabtu.com>
9369         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
9370         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
9371         Linux image includes no initrd.
9373 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
9375         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
9376         call to resolve the core image location that effectively appended the
9377         name twice.
9379 2008-06-21  Robert Millan  <rmh@aybabtu.com>
9381         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
9382         call from here ...
9384         * util/grub.d/10_hurd.in: ... to here ...
9385         * util/grub.d/10_linux.in: ... and here.
9387 2008-06-19  Robert Millan  <rmh@aybabtu.com>
9389         * kern/main.c (grub_main): Export `prefix' variable immediately
9390         after it has been set by grub_machine_set_prefix().
9392 2008-06-19  Robert Millan  <rmh@aybabtu.com>
9394         * commands/search.c (search_label, search_fs_uuid, search_file): Print
9395         search result when not saving to variable, not the other way around.
9396         When saving to variable, abort iteration as soon as a match is found.
9398 2008-06-19  Robert Millan  <rmh@aybabtu.com>
9400         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
9401         check for partition that provides /boot/grub.  Its logic is flawed,
9402         as it prevents prepare_grub_to_access_device() from being called
9403         multiple times.
9405 2008-06-19  Robert Millan  <rmh@aybabtu.com>
9407         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
9408         "insmod" command directly when abstraction modules are needed,
9409         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
9410         since it had already been processed).
9412 2008-06-19  Pavel Roskin  <proski@gnu.org>
9414         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
9415         changed.  This is needed in case GRUB_LIBDIR changes.
9416         * conf/i386-ieee1275.rmk: Likewise.
9417         * conf/i386-linuxbios.rmk: Likewise.
9418         * conf/i386-pc.rmk: Likewise.
9419         * conf/powerpc-ieee1275.rmk: Likewise.
9421 2008-06-18  Pavel Roskin  <proski@gnu.org>
9423         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
9424         kernel_elf_symlist.c to symlist.c for consistency with other
9425         architectures.  Update all users.
9426         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
9428 2008-06-18  Robert Millan  <rmh@aybabtu.com>
9430         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
9431         it in prefix.
9433         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
9434         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
9435         a RAID device, run setup() for all members independently on whether
9436         LVM abstraction is being used.
9437         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
9438         If grub-mkimage has set `*install_dos_part == -2', don't override this
9439         value.
9440         Perform *install_dos_part adjustments independently on whether
9441         we're embedding or not.
9442         Clarify error message when image is too big for embedding.
9443         Remove duplicate *install_dos_part stanza.
9445 2008-06-17  Robert Millan  <rmh@aybabtu.com>
9447         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
9448         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
9449         variables.
9450         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
9451         values in grub_ofconsole_normal_color and
9452         grub_ofconsole_highlight_color (they're not directly related to
9453         background and foreground).
9454         (grub_ofconsole_setcolorstate): Extract background and foreground
9455         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
9457 2008-06-17  Robert Millan  <rmh@aybabtu.com>
9459         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
9460         /boot/grub for the check in last commit, not /boot (they could be
9461         different partitions).
9463 2008-06-16  Robert Millan  <rmh@aybabtu.com>
9465         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
9466         asked to setup access for the same partition that provides /boot,
9467         don't bother using UUIDs since our root already has the value we
9468         want.
9470 2008-06-16  Robert Millan  <rmh@aybabtu.com>
9472         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
9473         I2O devices.
9474         Patch from Sven Mueller <sven@debian.org>.
9476 2008-06-16  Robert Millan  <rmh@aybabtu.com>
9478         * util/update-grub.in: Check for $EUID instead of $UID.
9479         Reported by Vincent Zweije.
9481 2008-06-16  Bean  <bean123ch@gmail.com>
9483         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
9484         (grub_ext2_read_block): Likewise.
9485         (grub_ext2_read_inode): Likewise.
9486         (grub_ext2_mount): Likewise.
9487         (grub_ext2_close): Likewise.
9488         (grub_ext3_get_journal): Removed.
9490         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
9491         (grub_reiserfs_read_symlink): Likewise.
9492         (grub_reiserfs_mount): Likewise.
9493         (grub_reiserfs_open): Likewise.
9494         (grub_reiserfs_read): Likewise.
9495         (grub_reiserfs_close): Likewise.
9496         (grub_reiserfs_get_journal): Removed.
9498         * fs/fshelp.c (grub_fshelp_read): Removed.
9499         (grub_fshelp_map_block): Likewise.
9501         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
9502         (grub_fshelp_journal): Likewise.
9503         (grub_fshelp_read): Likewise.
9504         (grub_fshelp_map_block): Likewise.
9506 2008-06-16  Pavel Roskin  <proski@gnu.org>
9508         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
9509         floating point anymore.
9510         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
9512 2008-06-15  Pavel Roskin  <proski@gnu.org>
9514         * commands/ls.c (grub_ls_list_files): Use integer calculations
9515         for human readable format, avoid floating point use.
9516         * kern/misc.c (grub_ftoa): Remove.
9517         (grub_vsprintf): Remove floating point support.
9519 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9521         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
9522         devices.
9523         Reported by Max Vozeler.
9525 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9527         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
9528         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
9529         skipped later.
9530         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
9531         the beginning of the prefix.
9533         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
9534         It is assumed that if we have a memdisk, grub-mkimage has set
9535         grub_prefix to include the "(memdisk)" drive in it.
9537 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9539         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
9540         Initialize keyboard controller after registering the terminal, so that
9541         grub_printf() can be called from grub_keyboard_controller_init().
9543 2008-06-15  Robert Millan  <rmh@aybabtu.com>
9545         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
9546         extent-btree which is written as big endian on disk.
9547         Reported by Alain Greppin  <al@chilibi.org>.
9549 2008-06-14  Robert Millan  <rmh@aybabtu.com>
9551         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
9552         * util/i386/pc/grub-install.in (modules): Likewise.
9554 2008-06-13  Pavel Roskin  <proski@gnu.org>
9556         * commands/ls.c (grub_ls_list_files): Fix format warnings.
9558 2008-06-13  Bean  <bean123ch@gmail.com>
9560         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
9562         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
9564         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
9565         to indicate sparse block.
9567 2008-06-12  Pavel Roskin  <proski@gnu.org>
9569         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
9570         number, grub_fshelp_read() does it for us.
9572         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
9573         linear disk read with journal translation.
9574         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
9575         * include/grub/fshelp.h: Declare grub_fshelp_read().
9577 2008-06-09  Pavel Roskin  <proski@gnu.org>
9579         * fs/minix.c (grub_minix_mount): Handle error reading
9580         superblock.
9582 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9584         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
9585         don't append the RAID prefix afterwards.
9586         Reported by Clint Adams.
9588 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9590         Based on description from Pavel:
9591         * kern/disk.c (grub_disk_check_range): Rename to ...
9592         (grub_disk_adjust_range): ... this.  Add a comment explaining the
9593         tasks performed by this function.
9595 2008-06-08  Robert Millan  <rmh@aybabtu.com>
9597         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
9598         `num_serial' (for consistency with other variables).
9599         (struct grub_ntfs_data): Add `uuid' member.
9600         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
9601         (grub_ntfs_uuid): New function.
9602         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
9604 2008-06-07  Pavel Roskin  <proski@gnu.org>
9606         * util/biosdisk.c (open_device): Revert last change to the
9607         function, it broke installation.  The sector needs to be
9608         different dependent on which device is opened.
9610 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9612         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
9613         rest of GRUB, and breakage doesn't happen if its value were modified.
9615         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9616         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
9617         a constant (same value).
9618         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
9619         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
9621 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9623         * util/biosdisk.c (open_device): Do not modify sector offset when
9624         accessing a partition.  kern/disk.c already handles this for us.
9626 2008-06-06  Robert Millan  <rmh@aybabtu.com>
9628         * util/grub-emu.c (grub_machine_init): Move code in this function from
9629         here ...
9630         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
9631         segfault in case grub_printf() is called).
9633         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
9634         grub_probe.  Update all users not to explicitly add it again.
9635         (grub_device): New variable; contains corresponding device for grubdir.
9636         (fs_module, partmap_module, devabstraction_module): Pass
9637         `--device ${grub_device}' to grub_probe to avoid traversing /dev
9638         every time.
9640 2008-06-05  Robert Millan  <rmh@aybabtu.com>
9642         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
9643         is found, print it (same layout as with labels).
9645 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9647         * util/biosdisk.c (get_drive): Rename to ...
9648         (find_grub_drive): ... this.  Update all users.
9650         (get_os_disk): Rename to ...
9651         (convert_system_partition_to_system_disk): ... this.  Update all users.
9653         (find_drive): Rename to ...
9654         (find_system_device): ... this.  Update all users.
9656 2008-06-04  Robert Millan  <rmh@aybabtu.com>
9658         * util/biosdisk.c (get_os_disk): Handle IDA devices.
9659         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9660         (make_device_map): Likewise.
9662 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9664         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
9665         before dereferencing it.
9667         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
9668         union with fat12/fat16-specific ones.  Add some new fields, including
9669         `num_serial' for both versions.
9670         (struct grub_fat_data): Add `uuid' member.
9671         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
9672         names.  Initialize `data->uuid' using `num_serial'.
9673         (grub_fat_uuid): New function.
9674         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
9676         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
9677         (grub_reiserfs_uuid): New function.
9678         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
9679         member.
9681         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
9682         (grub_xfs_uuid): New function.
9683         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
9685 2008-06-01  Robert Millan  <rmh@aybabtu.com>
9687         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
9688         code that is backward compatible with pre-uuid search command.
9690 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9692         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
9693         floppies after everything else, to ensure floppy drive isn't accessed
9694         unnecessarily (patch from Bean).
9696 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9698         * commands/search.c (search_label, search_fs_uuid, search_file): Do
9699         not print device names when we were asked to set a variable.
9701 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9703         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
9704         using "cursor-on" and "cursor-off" commands (understood at least by
9705         the Open Firmware flavour on OLPC).
9707 2008-05-31  Michael Gorven  <michael@gorven.za.net>
9709         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
9710         on and off sequences.
9712 2008-05-31  Robert Millan  <rmh@aybabtu.com>
9714         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
9715         * util/update-grub.in: Likewise.
9717 2008-05-30  Pavel Roskin  <proski@gnu.org>
9719         * util/biosdisk.c (linux_find_partition): Simplify logic and
9720         make the code more universal.  Keep special processing for
9721         devfs, but use a simple rule for all other devices.  If the
9722         device ends with a number, append 'p' and the partition number.
9723         Otherwise, append only the partition number.
9725 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9727         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
9728         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
9729         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
9730         the `root' parameter to Linux.
9732 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9734         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
9735         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
9736         --fs_uuid with --fs-uuid.
9737         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
9738         all filesystems support them).
9740 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9742         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
9743         grub_printf() flags, since we're printing in units of 2 bytes.
9745 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9747         * util/grub.d/00_header.in: Remove obsolete comment referencing
9748         convert_system_path_to_grub_path().
9749         * util/update-grub.in: Likewise.
9750         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
9751         (convert_system_path_to_grub_path): Add a warning message explaining
9752         that this function is deprecated.  Rely on is_path_readable_by_grub()
9753         for the readability checks.
9754         (font_path): Use is_path_readable_by_grub() for the readability
9755         check rather than convert_system_path_to_grub_path().
9757 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9759         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
9760         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
9761         converting it first.
9762         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
9763         grub.cfg for access to font file, and afterwards call it again to set
9764         the root device.
9766 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9768         * commands/search.c (options): Add --fs_uuid option.
9769         (search_fs_uuid): New function.
9770         (grub_cmd_search): Fix --set argument passing.
9771         Use search_fs_uuid() when requested via --fs_uuid.
9772         (grub_search_init): Update help message.
9773         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
9774         and redeclare it as an array of 16-bit words.
9775         (grub_ext2_uuid): New function.
9776         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
9777         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
9778         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
9779         (GRUB_DEVICE_BOOT_UUID): New variables.
9780         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
9781         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
9782         whenever possible.
9783         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
9784         just assume `root' variable has the right value.
9785         * util/grub.d/10_linux.in: Likewise.
9786         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
9787         via PRINT_FS_UUID.
9788         (main): Recognise `-t fs_uuid' argument.
9790 2008-05-30  Robert Millan  <rmh@aybabtu.com>
9792         * util/biosdisk.c (map): Redefine structure to hold information
9793         about GRUB drive name.
9794         (get_drive): Reimplement without assuming (and verifying) BIOS-like
9795         drive names.
9796         (call_hook): Remove.
9797         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
9798         member.  Assume drive has partitions.
9799         (grub_util_biosdisk_open): Access device names via `.device' struct
9800         member.
9801         (open_device): Likewise.
9802         (find_drive): Likewise.
9803         (read_device_map): Adjust map[] usage to match the new struct
9804         definition.  Don't check for duplicates (still possible, but not cheap
9805         anymore).
9806         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
9807         (make_device_name): Remove assumption of BIOS-like drive names.
9809 2008-05-30  Pavel Roskin  <proski@gnu.org>
9811         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
9812         compiling execute.c doesn't need grub_script.tab.h anymore.
9813         (normal/command.c_DEPENDENCIES): Likewise.
9814         (normal/function.c_DEPENDENCIES): Likewise.
9815         * conf/i386-ieee1275.rmk: Likewise.
9816         * conf/i386-linuxbios.rmk: Likewise.
9817         * conf/i386-pc.rmk: Likewise.
9818         * conf/powerpc-ieee1275.rmk: Likewise.
9819         * conf/sparc64-ieee1275.rmk: Likewise.
9821 2008-05-29  Pavel Roskin  <proski@gnu.org>
9823         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
9824         when scanning metadata for volume group name.
9826         * include/grub/script.h: Don't include grub_script.tab.h.  It's
9827         a generated file, which may only be included from the files with
9828         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
9829         use union YYSTYPE, as the later allows forward declaration.
9830         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
9832 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9834         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
9835         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
9836         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
9837         (grub_console_checkkey): Add grub_dprintf() call to report unknown
9838         scan codes.
9840 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9842         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
9843         control key combinations.
9845 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9847         * util/powerpc/ieee1275/grub-install.in: Move from here ...
9848         * util/ieee1275/grub-install.in: ... to here.
9849         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
9850         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
9851         (grub_install_SOURCES): Likewise.
9853 2008-05-29  Robert Millan  <rmh@aybabtu.com>
9855         * fs/affs.c: Update copyright year.
9856         * fs/ext2.c: Likewise.
9857         * fs/fshelp.c: Likewise.
9858         * fs/hfsplus.c: Likewise.
9859         * fs/ntfs.c: Likewise.
9860         * fs/xfs.c: Likewise.
9861         * include/grub/fshelp.h: Likewise.
9862         * util/grub-mkdevicemap.c: Likewise.
9864 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9866         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
9867         might need to be fatfs to support some firmware implementations
9868         (e.g. OFW or EFI).
9870 2008-05-28  Robert Millan  <rmh@aybabtu.com>
9872         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
9873         devices.
9874         * util/grub-mkdevicemap.c (get_mmc_disk_name)
9875         (make_device_map): Likewise.
9877 2008-05-20  Bean  <bean123ch@gmail.com>
9879         * fs/fshelp.c (grub_fshelp_map_block): New function.
9880         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
9881         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
9883         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
9884         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
9885         (grub_fshelp_journal): New structure.
9886         (grub_fshelp_map_block): New function prototype.
9887         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
9888         (grub_fshelp_map_block): Likewise.
9890         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
9891         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
9892         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
9893         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
9894         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
9895         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
9896         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
9897         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
9898         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
9899         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
9900         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
9901         (grub_ext2_sblock): New members for journal support.
9902         (grub_ext3_journal_header): New structure.
9903         (grub_ext3_journal_revoke_header): Likewise.
9904         (grub_ext3_journal_block_tag): Likewise.
9905         (grub_ext3_journal_sblock): Likewise.
9906         (grub_fshelp_node): New members logfile and journal.
9907         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
9908         grub_fshelp_map_block to get real block number.
9909         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
9910         number.
9911         (grub_ext2_read_inode): Likewise.
9912         (grub_ext3_get_journal): New function.
9913         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
9914         (grub_ext2_close): Release memory used by journal.
9916         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
9917         (REISERFS_MAGIC_DESC_BLOCK): New macro.
9918         (grub_reiserfs_transaction_header): Renamed to
9919         grub_reiserfs_description_block, replace field data with real_blocks.
9920         (grub_reiserfs_commit_block): New structure.
9921         (grub_reiserfs_data): New member journal.
9922         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
9923         number.
9924         (grub_reiserfs_read_symlink): Likewise.
9925         (grub_reiserfs_iterate_dir): Likewise.
9926         (grub_reiserfs_open): Likewise.
9927         (grub_reiserfs_read): Likewise.
9928         (grub_reiserfs_get_journal): New function.
9929         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
9930         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
9931         using grub_reiserfs_get_journal.
9932         (grub_reiserfs_close): Release memory used by journal.
9934         * fs/affs.c (grub_affs_read_block): Change block type to
9935         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
9937         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
9939         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
9941         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
9943         * fs/udf.c (grub_udf_read_block): Change block type to
9944         grub_disk_addr_t. Use type cast to avoid warning.
9946         * fs/xfs.c (grub_xfs_read_block): Likewise.
9948 2008-05-16  Christian Franke  <franke@computer.org>
9950         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
9951         to ensure that break with ESC will always work.
9952         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
9953         Remove ESC from keyboard queue.
9955 2008-05-16  Christian Franke  <franke@computer.org>
9957         * util/biosdisk.c: [__CYGWIN__] Add includes.
9958         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
9959         (get_os_disk): Move variable declarations to OS specific
9960         parts to avoid warning.
9961         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
9962         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
9963         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
9964         Cygwin.
9965         * util/getroot.c: [__CYGWIN__] Add includes.
9966         (strip_extra_slashes): Fix "/" case.
9967         [__CYGWIN__] (get_win32_path): New function.
9968         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
9969         [__CYGWIN__] (find_root_device): Disable.
9970         [__CYGWIN__] (get_bootsec_serial): New function.
9971         [__CYGWIN__] (find_cygwin_root_device): Likewise.
9972         [__linux__] (grub_guess_root_device): Add early returns to simplify
9973         structure.
9974         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
9975         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
9976         check for Linux only.
9978 2008-05-15  Bean  <bean123ch@gmail.com>
9980         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
9981         keyboard hang problem in apple's intel mac.
9983 2008-05-09  Robert Millan  <rmh@aybabtu.com>
9985         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
9986         devices.
9987         * util/grub-mkdevicemap.c (get_virtio_disk_name)
9988         (make_device_map): Likewise.
9989         Reported by Aurelien Jarno <aurel32@debian.org>
9991 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
9993         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
9994         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
9995         (make_device_map): Output entries for xvd type disks.
9997 2008-05-07  Robert Millan  <rmh@aybabtu.com>
9999         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
10000         devices.
10001         * util/grub-mkdevicemap.c (get_cciss_disk_name)
10002         (make_device_map): Likewise.
10003         Reported by Roland Dreier <rdreier@cisco.com>
10005 2008-05-07  Robert Millan  <rmh@aybabtu.com>
10007         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
10008         grub_strstr() call.  Correct a few mistakes in failure path handling.
10010 2008-05-06  Robert Millan  <rmh@aybabtu.com>
10012         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
10013         Do not print a trailing slash (therefore, the root directory is an
10014         empty string).
10015         (convert_system_path_to_grub_path): Do not remove trailing slash
10016         from make_system_path_relative_to_its_root() output.
10018         * util/i386/pc/grub-install.in: Add trailing slash to output from
10019         make_system_path_relative_to_its_root().
10021 2008-05-06  Robert Millan  <rmh@aybabtu.com>
10023         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
10024         ensures that output lines aren't intermangled with those sent to
10025         stderr (via grub_util_info()).
10026         * util/grub-probe.c (grub_refresh): Likewise.
10027         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
10029 2008-05-05  Christian Franke  <franke@computer.org>
10031         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
10032         Add Cygwin device names.
10033         (get_ide_disk_name) [__CYGWIN__]: Likewise.
10034         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
10035         (check_device): Return error instead of success on empty name.
10036         (make_device_map): Move label inside linux specific code to
10037         prevent compiler warning.
10039 2008-04-30  Robert Millan  <rmh@aybabtu.com>
10041         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
10042         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
10043         first boot option.
10044         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
10046 2008-04-29  Robert Millan  <rmh@aybabtu.com>
10048         * docs/grub.cfg: New file (example GRUB configuration).
10050 2008-04-26  Robert Millan  <rmh@aybabtu.com>
10052         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
10053         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
10054         and `disk/ieee1275/nand.c'.
10056 2008-04-25  Bean  <bean123ch@gmail.com>
10058         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
10059         i386-linuxbios.
10061         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
10062         change the buffer size to 4096 for cdrom device.
10064         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
10065         and nand.mod.
10066         (_linux_mod_SOURCES): New variable.
10067         (_linux_mod_CFLAGS): Likewise.
10068         (_linux_mod_LDFLAGS): Likewise.
10069         (linux_mod_SOURCES): Likewise.
10070         (linux_mod_CFLAGS): Likewise.
10071         (linux_mod_LDFLAGS): Likewise.
10072         (nand_mod_SOURCES): Likewise.
10073         (nand_mod_CFLAGS): Likewise.
10074         (nand_mod_LDFLAGS): Likewise.
10076         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
10077         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
10078         type property. (nand device in olpc don't have this property)
10080         * include/grub/disk.h (grub_disk_dev_id): New macro
10081         GRUB_DISK_DEVICE_NAND_ID.
10083         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
10084         function prototype.
10085         (grub_rescue_cmd_initrd): Likewise.
10087         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
10088         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
10089         ofw_cif_handler and ofw_idt, adjust padding number.
10091         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
10092         GRUB_MACHINE_IEEE1275 is defined.
10094         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
10095         Use NESTED_FUNC_ATTR attribute on the hook parameter.
10097         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
10098         on nested function heap_init.
10099         (grub_upper_mem): New variable for i386-ieee1275.
10100         (grub_get_extended_memory): New function for i386-ieee1275.
10101         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
10103         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
10104         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
10105         property.
10107         * loader/i386/ieee1275/linux.c: New file.
10109         * loader/i386/ieee1275/linux_normal.c: New file.
10111         * disk/ieee1275/nand.c: New file.
10113 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
10115         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
10116         value.
10117         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
10119 2008-04-18  Robert Millan  <rmh@aybabtu.com>
10121         Restructures early code path on ieee1275 to unify grub_main() as
10122         the first C function that is executed in every platform.
10124         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
10125         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
10126         cmain().
10127         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
10128         * kern/ieee1275/cmain.c (cmain): Rename to ...
10129         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
10130         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
10131         at the beginning.
10133 2008-04-18  Robert Millan  <rmh@aybabtu.com>
10135         * util/update-grub.in: Fix syntax error when setting
10136         `GRUB_PRELOAD_MODULES'.
10137         Reported by Stephane Chazelas <stephane@artesyncp.com>
10139 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
10141         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
10142         section into account, newer toolchains generate unique build ids
10143         * configure.ac: remove the test for --build-id=none acceptance,
10144         we want build ids to be preserved
10145         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
10146         far from other sections don't cause the raw binary images grow
10147         size
10149 2008-04-15  Robert Millan  <rmh@aybabtu.com>
10151         * disk/lvm.c: Update copyright year.
10152         * kern/misc.c: Likewise.
10154 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
10156         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
10157         there is no memory left for physical volume name.
10159 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
10161         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
10162         volume name mapping to support bigger than 9 character names properly.
10164 2008-04-13  Robert Millan  <rmh@aybabtu.com>
10166         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
10167         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
10169 2008-04-13  Christian Franke  <franke@computer.org>
10171         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
10172         to create a floppy emulation boot CD when non emulation mode
10173         does not work.
10174         Enable Joliet CD filesystem extension.
10176 2008-04-13  Robert Millan  <rmh@aybabtu.com>
10178         * kern/misc.c (grub_strncat): Fix off-by-one error.
10179         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
10181         * kern/env.c (grub_env_context_close): Clear current context, not
10182         previous one.
10183         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
10185         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
10187 2008-04-13  Robert Millan  <rmh@aybabtu.com>
10189         Improve robustness when handling LVM.
10191         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
10192         (and leave `*p' unmodified).
10193         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
10194         through it.
10195         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
10196         iterating through it.
10197         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
10198         through it.
10199         (grub_lvm_scan_device): Check the return value (and fail gracefully
10200         when due) on each grub_lvm_getvalue() or grub_strstr() call.
10201         Don't assume `vg->pvs != NULL' when iterating through it.
10203 2008-04-13  Robert Millan  <rmh@aybabtu.com>
10205         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
10206         * genmk.rb (partmap): New variable.
10207         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
10208         (#{partmap}): New target rule.
10209         * genpartmaplist.sh: New file.
10210         * Makefile.in (pkglib_DATA): Add partmap.lst.
10211         (partmap.lst): New target rule.
10212         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
10213         modules (including all partition maps), instead of preloading them.
10215 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
10217         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
10218         `linux-boot-prober' (if installed) to detect other operating
10219         systems which are installed on the computer and add them to
10220         the boot menu.
10221         * conf/common.rmk: Build and install 30_os-prober.
10223 2008-04-12  Robert Millan  <rmh@aybabtu.com>
10225         * kern/powerpc/ieee1275/init.c: Move from here ...
10226         * kern/ieee1275/init.c: ... to here.  Update all users.
10228         * kern/powerpc/ieee1275/cmain.c: Move from here ...
10229         * kern/ieee1275/cmain.c: ... to here.  Update all users.
10231         * kern/powerpc/ieee1275/openfw.c: Move from here ...
10232         * kern/ieee1275/openfw.c: ... to here.  Update all users.
10234         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
10235         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
10237 2008-04-10  Pavel Roskin  <proski@gnu.org>
10239         * configure.ac: Always use "_cv_" in cache variables for
10240         compatibility with Autoconf 2.62.
10242 2008-04-07  Robert Millan  <rmh@aybabtu.com>
10244         Revert grub/machine/init.h addition by Pavel (since it breaks on
10245         i386-ieee1275 and others):
10246         * util/i386/pc/misc.c: Remove grub/machine/init.h.
10247         * util/powerpc/ieee1275/misc.c: Likewise.
10249 2008-04-07  Robert Millan  <rmh@aybabtu.com>
10251         * util/grub-probe.c (probe): Improve error message.
10253 2008-04-07  Robert Millan  <rmh@aybabtu.com>
10255         * util/biosdisk.c (read_device_map): Skip devices that don't exist
10256         (this prevents the presence of a bogus entry from ruining the whole
10257         thing).
10259 2008-04-06  Pavel Roskin  <proski@gnu.org>
10261         * util/biosdisk.c: Include grub/util/biosdisk.h.
10262         * util/grub-fstest.c (execute_command): Make static.
10263         * util/grub-mkdevicemap.c (check_device): Likewise.
10264         * util/i386/pc/misc.c: Include grub/machine/init.h.
10265         * util/powerpc/ieee1275/misc.c: Likewise.
10266         * util/lvm.c: Include grub/util/lvm.h.
10267         * util/misc.c: Include grub/kernel.h, grub/misc.h and
10268         grub/cache.h.
10269         * util/raid.c: Include grub/util/raid.h.
10270         (grub_util_getdiskname): Make static.
10272         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
10273         grub_hostfs_fini(), as they are called from grub_init_all() and
10274         grub_fini_all() respectively.  This fixes an infinite loop in
10275         grub-fstest due to double registration of hostfs.
10276         Reported by Christian Franke <Christian.Franke@t-online.de>
10278 2008-04-05  Pavel Roskin  <proski@gnu.org>
10280         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
10281         all 8 functions.  Otherwise, probe function 0 only.
10283 2008-04-04  Pavel Roskin  <proski@gnu.org>
10285         * commands/lspci.c (grub_lspci_iter): Print the bus number
10286         correctly.
10288         * commands/lspci.c (grub_pci_classes): Fix typos.
10289         (grub_lspci_iter): Don't print func twice.  Print vendor ID
10290         before device ID, as it's normally done.
10292         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10293         Fix signedness warnings.
10294         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
10295         Likewise.
10296         * util/ieee1275/get_disk_name.c: Include config.h so that
10297         _GNU_SOURCE is defined and getline() is declared.  Mark an
10298         unused argument as such.  Fix a signedness warning.
10300 2008-04-02  Pavel Roskin  <proski@gnu.org>
10302         * genkernsyms.sh.in: Use more robust assignments for CC and
10303         srcdir.  Quote srcdir.
10304         * gensymlist.sh.in: Likewise.  Assert at the compile time that
10305         the symbol table is not empty.
10307         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
10308         * fs/cpio.c (grub_cpio_read): Likewise.
10310 2008-04-01  Pavel Roskin  <proski@gnu.org>
10312         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
10313         * disk/host.c (grub_host_open): Likewise.
10314         * disk/loopback.c (grub_loopback_open): Likewise.
10315         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
10316         disk->id as in disk/host.c, not a multi-character constant.
10318         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
10319         later is obsolete, potentially dangerous and sets a bad example.
10320         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
10321         * util/misc.c (grub_util_get_image_size): Likewise.
10323         * disk/loopback.c (options): Improve help for "--partitions".
10325         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
10326         options to align them with the short options, e.g. "echo -e".
10328 2008-03-31  Bean  <bean123ch@gmail.com>
10330         * video/reader/png.c (grub_png_data): New member is_16bit and
10331         image_data.
10332         (grub_png_decode_image_header): Detect 16 bit png image.
10333         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
10334         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
10335         (grub_video_reader_png): Release memory occupied by image_data.
10337         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
10338         4096 bytes.
10339         (grub_nfs_mount): Skip the test for sector per cluster.
10341         * include/grub/ntfs.h (MAX_SPC): Removed.
10343 2008-03-31  Bean  <bean123ch@gmail.com>
10345         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
10346         (grub_probe_SOURCES): Add fs/afs.c.
10347         (grub_fstest_SOURCES): Likewise.
10348         (afs_mod_SOURCES): New variable.
10349         (afs_mod_CFLAGS): Likewise.
10350         (afs_mod_LDFLAGS): Likewise.
10352         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
10353         (grub_emu_SOURCES): Likewise.
10355         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10357         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10359         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10361         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10363         * fs/afs.c: New file.
10365 2008-03-30  Pavel Roskin  <proski@gnu.org>
10367         * disk/host.c: Include grub/misc.h to fix a warning.
10368         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
10369         warnings about implicit declarations.
10371         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
10372         variable.
10373         * include/grub/i386/loader.h: Change declaration of
10374         grub_linux_boot() to match what grub_loader_set() expects.
10375         * util/getroot.c (grub_guess_root_device): Return const char* to
10376         fix a warning.
10377         * util/grub-probe.c (probe): Fix a warning about uninitialized
10378         abstraction_name variable.
10379         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
10380         second argument as unused to fix a warning.
10382         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
10383         missing grub_error() call.
10385         * util/update-grub_lib.in: Define datarootdir, since Autoconf
10386         2.60 and newer uses it to define datadir.
10388         * commands/sleep.c: Fix warning about implicit declaration.
10389         * disk/memdisk.c: Likewise.
10390         * loader/aout.c: Likewise.
10391         * loader/i386/bsd_normal.c: Likewise.
10392         * util/grub-probe.c: Likewise.
10394         * commands/i386/cpuid.c (has_longmode): Make static.
10395         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
10396         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
10398         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
10399         GDT.  This is more robust, as %ds can change.
10400         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
10401         calling real_to_prot().
10402         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
10404 2008-03-28  Pavel Roskin  <proski@gnu.org>
10406         * kern/i386/pc/startup.S: Assert that uncompressed functions
10407         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
10408         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
10409         code, as they push parts of the code (error handlers) beyond
10410         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
10411         code as correctness and size.
10413 2008-03-28  Pavel Roskin  <proski@gnu.org>
10415         * kern/i386/pc/startup.S
10416         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
10417         data block address to the real mode, keep offset minimal.  This
10418         works around a bug in AWARD BIOS on old Athlon systems, which
10419         makes CD detection hang.
10421 2008-03-26  Pavel Roskin  <proski@gnu.org>
10423         * normal/color.c (grub_parse_color_name_pair): Make `name' a
10424         const.
10425         * include/grub/normal.h: Add grub_parse_color_name_pair()
10426         declaration.
10428 2008-03-24  Bean  <bean123ch@gmail.com>
10430         * disk/i386/pc/biosdisk.c (cd_start): Removed.
10431         (cd_count): Removed.
10432         (cd_drive): New variable.
10433         (grub_biosdisk_get_drive): Don't check for (cdN) device.
10434         (grub_biosdisk_call_hook): Likewise.
10435         (grub_biosdisk_iterate): Change cdrom detection method.
10436         (grub_biosdisk_open): Replace cd_start with cd_drive.
10437         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
10438         detect cdrom device.
10440         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
10441         Removed.
10442         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
10443         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
10444         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
10445         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
10446         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
10447         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
10448         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
10449         (grub_biosdisk_cdrp): New structure.
10450         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
10452         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
10454         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
10455         device.
10457         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
10458         New function.
10460 2008-03-20  Robert Millan  <rmh@aybabtu.com>
10462         Remove 2 TiB limit in ata.mod.
10463         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
10464         (grub_ata_dumpinfo): Print sector count with 0x%llx.
10465         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
10466         grub_uint64_t instead of grub_uint32_t.
10468 2008-03-05  Bean  <bean123ch@gmail.com>
10470         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
10471         (grub_multiboot): Set boot device.
10473         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
10475 2008-03-02  Bean  <bean123ch@gmail.com>
10477         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
10478         symlink_buffer.
10480 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
10482         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
10483         texinfo.tex.
10485         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
10486         modified.
10488         * docs/fdl.texi: New file.
10490         * docs/mdate-sh: New file. Copied from gnulib.
10491         * docs/texinfo.tex: Likewise.
10493         * config.guess: Updated from gnulib.
10494         * install-sh: Likewise.
10496 2008-02-28  Robert Millan  <rmh@aybabtu.com>
10498         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
10499         (aout_mod_SOURCES): New variable.
10500         (aout_mod_CFLAGS): Likewise.
10501         (aout_mod_LDFLAGS): Likewise.
10503         * conf/i386-ieee1275.rmk: Likewise.
10505 2008-02-28  Robert Millan  <rmh@aybabtu.com>
10507         * util/update-grub.in: Reorganise terminal validity check.  Accept
10508         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
10509         Based on suggestion by Franklin PIAT.
10511 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
10513         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
10514         function.
10515         * util/getroot.c (grub_util_check_block_device): New function that
10516         returns the given argument if it is a block device and returns NULL else.
10517         * util/grub-probe.c (argument_is_device): New variable.
10518         (probe): Promote device_name from a variable to an argument. Receive
10519         device_name from grub_util_check_block_device() if path is NULL and from
10520         grub_guess_root_device() else. Do not free() device_name anymore.
10521         (options): Introduce new parameter '-d, --device'.
10522         (main): Add description of the new parameter to the help screen.
10523         Rename path variable to argument. Set argument_is_device if the '-d'
10524         option is given. Pass argument to probe() depending on
10525         argument_is_device.
10527 2008-02-24  Bean  <bean123ch@gmail.com>
10529         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
10530         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
10531         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
10532         (GRUB_ISO9660_VOLDESC_PART): Likewise.
10533         (GRUB_ISO9660_VOLDESC_END): Likewise.
10534         (grub_iso9660_primary_voldesc): New member escape.
10535         (grub_iso9660_data): New member joliet.
10536         (grub_iso9660_convert_string): New function.
10537         (grub_iso9660_mount): Detect joliet extension.
10538         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
10539         (grub_iso9660_iso9660_label): Likewise.
10541         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
10542         (grub_setup_SOURCES): Add fs/udf.c.
10543         (grub_fstest_SOURCES): Likewise.
10544         (udf_mod_SOURCES): New variable.
10545         (udf_mod_CFLAGS): Likewise.
10546         (udf_mod_LDFLAGS): Likewise.
10548         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
10549         (grub_emu_SOURCES): Likewise.
10551         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10553         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10555         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10557         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10559         * fs/udf.c: New file.
10561 2008-02-24  Robert Millan  <rmh@aybabtu.com>
10563         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
10564         (normal/lexer.c_DEPENDENCIES): New variables.
10565         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10566         (normal/lexer.c_DEPENDENCIES): Likewise.
10567         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
10568         (normal/lexer.c_DEPENDENCIES): Likewise.
10569         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
10570         (normal/lexer.c_DEPENDENCIES): Likewise.
10571         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10572         (normal/lexer.c_DEPENDENCIES): Likewise.
10573         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10574         (normal/lexer.c_DEPENDENCIES): Likewise.
10576 2008-02-23  Robert Millan  <rmh@aybabtu.com>
10578         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
10579         since they were intended to be in hex.  This didn't break previously
10580         because of a bug in gpt_partition_map_iterate() (see below).
10582         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
10583         when checking the validity of GPT header.
10584         Remove `partno', since it always provides the same information as `i'.
10586 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
10588         * include/grub/efi/time.h: Fix a wrong comment.
10590 2008-02-19  Pavel Roskin  <proski@gnu.org>
10592         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
10593         message.
10595 2008-02-19  Bean  <bean123ch@gmail.com>
10597         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
10598         (aout_mod_SOURCES): New variable.
10599         (aout_mod_CFLAGS): Likewise.
10600         (aout_mod_LDFLAGS): Likewise.
10601         (_bsd_mod_SOURCES): New variable.
10602         (_bsd_mod_CFLAGS): Likewise.
10603         (_bsd_mod_LDFLAGS): Likewise.
10604         (bsd_mod_SOURCES): New variable.
10605         (bsd_mod_CFLAGS): Likewise.
10606         (bsd_mod_LDFLAGS): Likewise.
10608         * include/grub/aout.h: New file.
10610         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
10612         * include/grub/i386/bsd.h: New file.
10614         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
10615         to make it public.
10617         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
10618         function is called, so that it's possible to change it inside the hook.
10619         (grub_elf64_load): Likewise.
10620         (grub_elf_file): Don't close the file if elf header is not found.
10621         (grub_elf_close): Close the file if grub_elf_file fails (The new
10622         grub_elf_file won't close it).
10623         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
10624         (grub_elf64_size): Likewise.
10626         * kern/i386/loader.S (grub_unix_real_boot): New function.
10628         * loader/aout.c: New file.
10630         * loader/i386/bsd.c: New file.
10632         * loader/i386/bsd_normal.c: New file.
10634         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
10636         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
10637         can test other formats.
10639 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10641         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
10642         (grub_gpt_partition_type_empty): Redefine with macro from
10643         `<grub/gpt_partition.h>'.
10644         (gpt_partition_map_iterate): Adjust partition type comparison.
10646         Export `entry' as partmap-specific `part.data' struct.
10647         (grub_gpt_header, grub_gpt_partentry): Move from here ...
10649         * include/grub/gpt_partition.h (grub_gpt_header)
10650         (grub_gpt_partentry): ... to here (new file).
10652         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
10654         (grub_gpt_partition_type_bios_boot): New const variable, defined
10655         with macro from `<grub/gpt_partition.h>'.
10657         (setup): Replace `first_start' with `embed_region', which keeps
10658         track of the embed region (and is partmap-agnostic).
10660         Replace find_first_partition_start() with find_usable_region(),
10661         which finds a usable region for embedding using partmap-specific
10662         knowledge (supports PC/MSDOS and GPT).
10664         Fix all assumptions that the embed region start at sector 1, using
10665         `embed_region.start' from now on.  Similarly, use `embed_region.end'
10666         rather than `first_start' to calculate available size.
10668         In grub_util_info() message, replace "into after the MBR" with an
10669         indication of the specific sector our embed region starts at.
10671 2008-02-19  Robert Millan  <rmh@aybabtu.com>
10673         * DISTLIST: Replace `commands/ieee1275/halt.c' and
10674         `commands/ieee1275/reboot.c' with `commands/halt.c' and
10675         `commands/reboot.c'.
10676         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10677         (halt_mod_SOURCES): Likewise.
10678         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10679         (halt_mod_SOURCES): Likewise.
10681 2008-02-17  Christian Franke  <franke@computer.org>
10683         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
10685 2008-02-17  Robert Millan  <rmh@aybabtu.com>
10687         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10688         set `first_start' to 0 for non-PC/MSDOS partition maps.
10690 2008-02-16  Robert Millan  <rmh@aybabtu.com>
10692         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10693         do not assume partition map is PC/MSDOS before performing checks that
10694         are specific to that layout.
10696 2008-02-13  Robert Millan  <rmh@aybabtu.com>
10698         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
10699         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
10700         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
10702 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
10704         * configure.ac: Only a cosmetic change on the handling of
10705         -fno-stack-protector.
10707 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
10709         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
10710         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
10711         reboot.c.
10712         (grub_install_SOURCES): Add halt.mod and reboot.mod.
10713         (halt_mod_SOURCES): New variable.
10714         (halt_mod_CFLAGS): Likewise.
10715         (halt_mod_LDFLAGS): Likewise.
10716         (reboot_mod_SOURCES): Likewise.
10717         (reboot_mod_CFLAGS): Likewise.
10718         (reboot_mod_LDFLAGS): Likewise.
10720         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
10721         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
10722         reboot.c.
10723         (halt_mod_SOURCES): Likewise.
10724         (reboot_mod_SOURCES): Likewise.
10726         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
10727         commands/i386/pc/reboot.c by commands/reboot.c.
10728         (reboot_mod_SOURCES): Likewise.
10730         * commands/i386/pc/reboot.c: merge this file ...
10732         * commands/ieee1275/reboot.c: ... and this file ...
10734         * commands/reboot.c: ... to this file.
10735         Add some precompiler directive to include the correct header for
10736         each machine.
10738         * commands/ieee1275/halt.c: move this file ...
10740         * commands/halt.c: ... to here.
10741         Add some precompiler directive to include the correct header for
10742         each machine.
10744         * include/grub/efi/efi.h (grub_reboot): New function declaration.
10745         (grub_halt): Likewise.
10747         * kern/efi/efi.c (grub_reboot): New function.
10748         (grub_halt): Likewise.
10750 2008-02-12  Robert Millan  <rmh@aybabtu.com>
10752         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
10753         /dev (like it is done for /dev/mapper).  This doesn't provide support
10754         for EVMS, but at least it is now easy to identify the problem when it
10755         arises.
10757 2008-02-11  Robert Millan  <rmh@aybabtu.com>
10759         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
10760         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
10761         comparing it with -1, not 0.
10763 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10765         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
10766         `disk/lvm.c'.
10767         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10768         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
10770         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
10771         `disk/lvm.c' to the end of the list.
10772         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10773         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10775 2008-02-10  Robert Millan  <rmh@aybabtu.com>
10777         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
10778         grub_print_error() instead.  This will let user know why we're entering
10779         rescue mode.
10780         Based on suggestions from Sam Morris.
10782 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
10784         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
10785         on remaining N args, instead of "--" arg N times.
10787 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
10789         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
10790         (fill_with_default_glyph): Changed to use unknown_glyph for fill
10791         pattern for unknown glyphs.
10793 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10795         * configure.ac: Probe for `help2man'.
10796         * Makefile.in (builddir): New variable.
10797         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
10798         or otherwise add a few flags/options to it.
10799         (install-local): For every executable utility or script that is
10800         installed, invoke $(HELP2MAN) to install a manpage based on --help
10801         output.
10803         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
10804         that it doesn't prevent --help from working in build tree.
10806         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
10807         with `bug-grub@gnu.org'.
10808         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
10809         * util/update-grub.in (usage): New function.
10810         Implement proper argument check, with support for --help and --version
10811         (as well as existing -y).
10813 2008-02-09  Christian Franke  <franke@computer.org>
10815         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
10816         avoid overwriting previous output.
10817         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
10819 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10821         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
10822         drawing the menu.
10824 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10826         * commands/sleep.c: New file.
10827         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
10828         (sleep_mod_SOURCES): New variable.
10829         (sleep_mod_CFLAGS): Likewise.
10830         (sleep_mod_LDFLAGS): Likewise.
10832 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10834         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
10835         situations in which we can deduce the RAID size and the superblock
10836         doesn't match it.
10838 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10840         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
10841         and return a grub_diskmemberlist_t composed of LVM physical volumes.
10842         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
10844         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
10845         and return a grub_diskmemberlist_t composed of physical array members.
10846         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
10848         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
10849         prototype.
10850         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
10851         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
10852         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
10854         * util/grub-probe.c (probe): Move partmap probing code from here ...
10855         (probe_partmap): ... to here.
10856         (probe): Use probe_partmap() once for the disk we're probing, and
10857         additionally, when such disk contains a memberlist() struct member,
10858         once for each disk that is contained in the structure returned by
10859         memberlist().
10861 2008-02-09  Robert Millan  <rmh@aybabtu.com>
10863         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
10864         environment variable to 'all' in order to obtain debug output from
10865         non-util/ code.
10866         * util/i386/pc/grub-setup.c (main): Likewise.
10868 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10870         * disk/raid.c (grub_raid_scan_device): Check for
10871         `array->device[sb.this_disk.number]' rather than for
10872         `array->device[sb.this_disk.number]->name', since the latter is not
10873         guaranteed to be accessible.
10875 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10877         * disk/raid.c: Update copyright.
10878         * fs/cpio.c: Likewise.
10879         * include/grub/raid.h: Likewise.
10880         * loader/i386/pc/multiboot.c: Likewise.
10881         * util/hostfs.c: Likewise.
10883 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10885         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
10886         to a grub_disk_t array.
10887         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
10888         `device[x]'.
10889         (grub_raid_scan_device): Replace `device[x].name' accesses with
10890         `device[x]->name'.  Simplify initialization of `array->device[x]'.
10892 2008-02-08  Robert Millan  <rmh@aybabtu.com>
10894         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
10895         grub_dprintf() calls.
10896         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
10897         error message.
10899 2008-02-07  Christian Franke  <franke@computer.org>
10901         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
10902         instead of fseek and ftell to support large files.
10903         (grub_hostfs_read): Likewise.
10905 2008-02-07  Robert Millan  <rmh@aybabtu.com>
10907         Patch from Jeroen Dekkers.
10908         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
10909         failure, since successfully reading all array members might not be
10910         required.
10912 2008-02-06  Robert Millan  <rmh@aybabtu.com>
10914         * util/grub-probe.c (probe): Simplify partmap probing (with the
10915         assumption that the first word up to the underscore equals to
10916         the module name).
10918 2008-02-06  Christian Franke  <franke@computer.org>
10920         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
10921         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
10922         last block of a cpio or tar stream.
10923         Check for "TRAILER!!!" instead of any empty data
10924         block to detect last block of a cpio stream.
10925         (grub_cpio_dir): Fix constness of variable np.
10926         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
10927         cpio or tar trailer is detected.  This fixes a crash
10928         on open of a non existing file.
10930 2008-02-05  Bean  <bean123ch@gmail.com>
10932         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
10933         address of entry.
10934         (grub_multiboot_load_elf64): Likewise.
10935         (grub_multiboot): Initialize mbi structure.
10937         * util/grub-fstest.c: Don't include unused header file script.h.
10939         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
10940         of file.
10941         (grub_fstest_SOURCES): Likewise.
10943 2008-02-05  Robert Millan  <rmh@aybabtu.com>
10945         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
10946         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
10947         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
10948         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
10950         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
10951         (translation_table): Replace hardcoded values with macros
10952         provided by `<grub/term.h>'.
10954         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
10955         (keyboard_map): Correct/add a few values, with macros provided
10956         by `<grub/term.h>'.
10957         (keyboard_map_shift): Zero values that don't differ from their
10958         `keyboard_map' equivalents.
10959         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
10960         Discard the second scan code that is always sent by Caps lock.
10961         Only use `keyboard_map_shift' when it provides a non-zero value,
10962         otherwise fallback to `keyboard_map'.
10964 2008-02-04  Bean  <bean123ch@gmail.com>
10966         * Makefile.in (enable_grub_fstest): New variable.
10968         * conf/common.rmk (grub_fstest_init.lst): New rule.
10969         (grub_fstest_init.h): Likewise.
10970         (grub_fstest_init.c): Likewise.
10971         (util/grub-fstest.c_DEPENDENCIES): New variable.
10972         (grub_fstest_SOURCES): Likewise.
10974         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
10976         * util/grub-fstest.c: New file.
10978 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10980         Make grub-setup handle a separate root device.
10982         * util/i386/pc/grub-setup.c (setup): Always open the root device,
10983         so that the root device can be compared with the destination
10984         device.
10985         When embedding the core image, if the root and destination devices
10986         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
10987         0xFF.
10988         When not embedding, set ROOT_DRIVE to 0xFF.
10990 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
10992         Add support for having a grub directory in a different drive. This
10993         is still only the data handling part.
10995         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
10996         (codestart): Save %dh in GRUB_ROOT_DRIVE.
10997         (grub_root_drive): New variable.
10999         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
11000         instead of GRUB_BOOT_DRIVE to construct a device name. Set
11001         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
11002         as it was.
11004         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
11006         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
11007         macro.
11008         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
11010         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
11011         is bogus, because PXE booting does not specify any drive
11012         correctly.
11014         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
11015         am not sure if this is really correct.
11017         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
11018         is always identical to the boot drive when booting from a CD.
11020         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
11021         longer.
11022         (root_drive): New variable.
11023         (real_start): Unconditionally set %dh to ROOT_DRIVE.
11024         (setup_sectors): Push %dx right after popping it, because %dh will
11025         be modified later.
11026         (copy_buffer): Restore %dx.
11028 2008-02-03  Robert Millan  <rmh@aybabtu.com>
11030         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
11031         use `cdboot.img' for cdrom images.
11033 2008-02-03  Robert Millan  <rmh@aybabtu.com>
11035         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
11036         only setup gfxterm when `font' command has succeeded.
11038 2008-02-03  Robert Millan  <rmh@aybabtu.com>
11040         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
11041         (grub_rescue_cmd_multiboot_loader)
11042         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
11044 2008-02-03  Pavel Roskin  <proski@gnu.org>
11046         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
11047         %edx and %esi from stack only after grub_gate_a20() is called.
11048         grub_gate_a20() clobbers %edx.
11050 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
11052         * configure.ac (AC_INIT): Bumped to 1.96.
11054         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
11055         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
11056         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
11057         video/readers/png.c.
11059 2008-02-03  Bean  <bean123ch@gmail.com>
11061         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
11062         (cdboot_img_SOURCES): New variable.
11063         (cdboot_img_ASFLAGS): New variable.
11064         (cdboot_img_LDFLAGS): New variable.
11066         * boot/i386/pc/cdboot.S: New file.
11068         * disk/i386/pc/biosdisk.c (cd_start): New variable.
11069         (cd_count): Likewise.
11070         (grub_biosdisk_get_drive): Add support for cd device.
11071         (grub_biosdisk_call_hook): Likewise.
11072         (grub_biosdisk_iterate): Likewise.
11073         (grub_biosdisk_open): Likewise.
11074         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
11075         (grub_biosdisk_rw): Support reading from cd device.
11076         (GRUB_MOD_INIT): Iterate cd devices.
11078         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
11079         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
11080         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
11082         * kern/i386/pc/init.c (make_install_device): Check for cd device.
11084 2008-02-02  Robert Millan  <rmh@aybabtu.com>
11086         * commands/read.c: New file.
11087         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
11088         (read_mod_SOURCES): New variable.
11089         (read_mod_CFLAGS): Likewise.
11090         (read_mod_LDFLAGS): Likewise.
11092 2008-02-02  Robert Millan  <rmh@aybabtu.com>
11094         * normal/main.c (grub_normal_execute): Check for `menu->size' when
11095         determining whether menu has to be displayed.
11097 2008-02-02  Marco Gerards  <marco@gnu.org>
11099         * bus/pci.c: New file.
11101         * include/grub/pci.h: Likewise.
11103         * include/grub/i386/pc/pci.h: Likewise.
11105         * commands/lspci.c: Likewise.
11107         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
11108         `lspci.mod'.
11109         (pci_mod_SOURCES): New variable.
11110         (pci_mod_CFLAGS): Likewise.
11111         (pci_mod_LDFLAGS): Likewise.
11112         (lspci_mod_SOURCES): Likewise.
11113         (lspci_mod_CFLAGS): Likewise.
11114         (lspci_mod_LDFLAGS): Likewise.
11116 2008-02-02  Bean  <bean123ch@gmail.com>
11118         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
11119         (grub_ufs_get_file_block): Fix indirect block calculation problem.
11121         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
11122         (grub_xfs_btree_node): New structure.
11123         (grub_xfs_btree_root): New structure.
11124         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
11125         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
11126         (GRUB_XFS_EXTENT_BLOCK): Likewise.
11127         (GRUB_XFS_EXTENT_SIZE): Likewise.
11128         (grub_xfs_read_block): Support btree format type.
11129         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
11130         Use directory block as basic unit.
11132         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
11134         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
11135         __attribute__ ((__regparm__ (1))).
11137 2008-02-01  Robert Millan  <rmh@aybabtu.com>
11139         Correct a mistake in previous commit.
11141         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
11142         top.
11143         (normal/command.c_DEPENDENCIES): New variable.
11145 2008-02-01  Robert Millan  <rmh@aybabtu.com>
11147         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
11148         top.
11149         (normal/command.c_DEPENDENCIES): New variable.
11150         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
11151         * conf/i386-ieee1275.rmk: Likewise.
11152         * conf/i386-linuxbios.rmk: Likewise.
11153         * conf/i386-pc.rmk: Likewise.
11154         * conf/sparc64-ieee1275.rmk: Likewise.
11155         * conf/powerpc-ieee1275.rmk: Likewise.
11156         (grub_emu_SOURCES): Add `fs/fshelp.c'.
11158         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
11160 2008-02-01  Robert Millan  <rmh@aybabtu.com>
11162         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
11163         call at beginning of function.
11165 2008-01-31  Pavel Roskin  <proski@gnu.org>
11167         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
11168         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
11169         (grub_mkrescue_SOURCES): Likewise.
11170         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
11172 2008-01-30  Robert Millan  <rmh@aybabtu.com>
11174         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
11175         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
11176         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
11177         (grub_probe_SOURCES): ... to here.
11179         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
11180         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
11181         * conf/i386-ieee1275.rmk: Likewise.
11182         * conf/i386-linuxbios.rmk: Likewise.
11183         * conf/powerpc-ieee1275.rmk: Likewise.
11185 2008-01-30  Tristan Gingold  <gingold@free.fr>
11187         * kern/rescue.c: Silently accept empty lines.
11189 2008-01-29  Bean  <bean123ch@gmail.com>
11191         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
11192         (real_code_2): Code cleanup and change comment style.
11193         (move_memory): Avoid using 32-bit address mode.
11195 2008-01-29  Bean  <bean123ch@gmail.com>
11197         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
11198         (png_mod_SOURCES): New variable.
11199         (png_mod_CFLAGS): Likewise.
11200         (png_mod_LDFLAGS): Likewise.
11202         * video/readers/png.c: New file.
11204 2008-01-28  Robert Millan  <rmh@aybabtu.com>
11206         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
11207         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
11208         `ifndef GRUB_MOD_GAP' hack.
11209         * util/elf/grub-mkimage.c (add_segments): Likewise.
11211 2008-01-27  Robert Millan  <rmh@aybabtu.com>
11213         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
11214         `GRUB_MOD_GAP' for platforms in which it's not defined.
11215         * util/elf/grub-mkimage.c (add_segments): Likewise.
11217 2008-01-27  Robert Millan  <rmh@aybabtu.com>
11219         Get grub-emu to build again (including parallel builds).
11221         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
11222         Split into ...
11223         (util/grub-emu.c_DEPENDENCIES): ... this, ...
11224         (normal/execute.c_DEPENDENCIES): ... this, ...
11225         (grub-emu_DEPENDENCIES): ... and this.
11227         * conf/i386-efi.rmk: Likewise.
11228         * conf/i386-linuxbios.rmk: Likewise.
11229         * conf/i386-ieee1275.rmk: Likewise.
11230         * conf/powerpc-ieee1275.rmk: Likewise.
11231         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
11233 2008-01-27  Robert Millan  <rmh@aybabtu.com>
11235         * NEWS: Add a few items.
11237 2008-01-27  Robert Millan  <rmh@aybabtu.com>
11239         Fix parallel builds with grub-emu.  Based on earlier commit for
11240         grub-probe and grub-setup.
11242         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11243         (util/grub-emu.c_DEPENDENCIES): ... this.
11244         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11245         (util/grub-emu.c_DEPENDENCIES): ... this.
11246         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11247         (util/grub-emu.c_DEPENDENCIES): ... this.
11248         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11249         (util/grub-emu.c_DEPENDENCIES): ... this.
11250         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
11251         (util/grub-emu.c_DEPENDENCIES): ... this.
11253 2008-01-27  Pavel Roskin  <proski@gnu.org>
11255         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
11256         to create a gap between _end and the modules added to the image
11257         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
11258         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
11259         * util/elf/grub-mkimage.c (add_segments): Likewise.
11261 2008-01-26  Pavel Roskin  <proski@gnu.org>
11263         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
11264         just return an error.
11266 2008-01-26  Bean  <bean123ch@gmail.com>
11268         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
11269         (grub_reiserfs_get_item): Save offset of the next item.
11270         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
11272 2008-01-25  Robert Millan  <rmh@aybabtu.com>
11274         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
11275         make all filesystem sources appear together (possibly fixing omissions
11276         while at it).
11277         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11278         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11279         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11280         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11282         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
11283         add `kern/file.c'.
11284         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
11285         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11286         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
11287         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
11289         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
11290         (probe): Add a sanity check to make sure of our ability to read
11291         requested files when probing for filesystem type.
11293         * genmk.rb: Update copyright year (2007).
11295         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
11296         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
11297         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
11298         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
11299         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
11300         : Remove function prototypes.
11302 2008-01-25  Robert Millan  <rmh@aybabtu.com>
11304         Revert my previous commits (based on wrong assumption of how grub_errno
11305         works).
11307         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
11308         * kern/file.c (grub_file_open): Likewise.
11310 2008-01-24  Pavel Roskin  <proski@gnu.org>
11312         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
11313         that hang if GRUB tries to setup colors.
11314         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
11315         colors for firmwares that don't support it.
11316         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
11317         Recognize Open Hack'Ware, set flags to work around its
11318         limitations.
11320 2008-01-24  Robert Millan  <rmh@aybabtu.com>
11322         * kern/file.c (grub_file_open): Do not account previous failures of
11323         unrelated functions when grub_errno is checked for.
11324         Reported by Oleg Strikov.
11326 2008-01-24  Bean  <bean123ch@gmail.com>
11328         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
11329         (grub_ufs_sblock): New member volume name.
11330         (grub_ufs_find_file): Fix string copy bug.
11331         (grub_ufs_label): Implement this function properly.
11333         * fs/hfs.c (grub_hfs_cnid_type): New enum.
11334         (grub_hfs_iterate_records): Use the correct file number for extents
11335         and catalog file. Fix problem in next index calculation.
11336         (grub_hfs_find_node): Replace recursive function call with loop.
11337         (grub_hfs_iterate_dir): Replace recursive function call with loop.
11339 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11341         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
11342         `<grub/symbol.h>' and `<grub/multiboot.h>'.
11343         (grub_multiboot2_real_boot): New function prototype.
11345         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
11346         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
11348         * kern/i386/ieee1275/init.c (grub_os_area_addr)
11349         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
11351 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11353         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
11354         #ifdef'ed out grub_printf().
11356 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11358         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
11359         grub_dprintf calls, since they make "debug=all" mode unusable.
11360         (grub_console_checkkey): Likewise.
11362 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11364         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
11365         `term/i386/pc/at_keyboard.c'.
11366         (pkglib_MODULES): Add `serial.mod'.
11367         (serial_mod_SOURCES): New variable.
11368         (serial_mod_CFLAGS): Likewise.
11369         (serial_mod_LDFLAGS): Likewise.
11371         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
11372         `<grub/powerpc/ieee1275/console.h>'.
11373         (grub_keyboard_controller_init): New function prototype.
11374         (grub_console_checkkey): Likewise.
11375         (grub_console_getkey): Likewise.
11377         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
11378         keyboard on i386.
11380         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
11381         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
11383 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11385         * kern/i386/pc/init.c (make_install_device): When memdisk image is
11386         present, "(memdisk)/boot/grub" becomes the default prefix.
11388         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
11389         a memdisk tarball with all the modules.  Add --overlay=DIR option that
11390         allows users to overlay additional files into the image.
11392 2008-01-23  Robert Millan  <rmh@aybabtu.com>
11394         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
11395         and `machine/memory.h'.
11396         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
11397         (_multiboot_mod_SOURCES): New variable.
11398         (_multiboot_mod_CFLAGS): Likewise.
11399         (_multiboot_mod_LDFLAGS): Likewise.
11400         (multiboot_mod_SOURCES): Likewise.
11401         (multiboot_mod_CFLAGS): Likewise.
11402         (multiboot_mod_LDFLAGS): Likewise.
11404         * include/grub/i386/ieee1275/loader.h: New file.
11406         * include/grub/i386/ieee1275/machine.h: Likewise.
11408         * include/grub/i386/ieee1275/memory.h: Likewise.
11410         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
11411         variable declaration.
11412         (grub_os_area_size): Likewise.
11414         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
11415         (grub_lower_mem, grub_upper_mem): New variables.
11416         (grub_stop_floppy): New function (just to make
11417         grub_multiboot2_real_boot() happy).
11419         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
11420         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
11421         (grub_stop): New function.
11422         Include `"../realmode.S"' and `"../loader.S"'.
11424         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
11425         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
11427         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
11428         rely on grub_multiboot2_real_boot() for final boot.
11430 2008-01-22  Robert Millan  <rmh@aybabtu.com>
11432         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
11433         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
11434         device that doesn't look like an SD card.
11435         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11436         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
11437         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
11438         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
11439         found.
11441 2008-01-22  Robert Millan  <rmh@aybabtu.com>
11443         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
11444         avoid claiming over our own code.
11446 2008-01-22  Bean  <bean123ch@gmail.com>
11448         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
11449         (jpeg_mod_SOURCES): New variable.
11450         (jpeg_mod_CFLAGS): Likewise.
11451         (jpeg_mod_LDFLAGS): Likewise.
11453         * video/readers/jpeg.c : New file.
11455 2008-01-22  Bean  <bean123ch@gmail.com>
11457         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
11458         there are no more items.
11460 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11462         * kern/mm.c (grub_mm_init_region): Improve debug message.
11464 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11466         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
11467         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
11468         address.
11469         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
11470         a C macro.
11471         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
11472         Indicates start of upper memory.
11473         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
11474         (generate_image): Abort when image size is big enough to corrupt
11475         upper memory.
11477         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
11478         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
11479         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
11480         instead of hardcoding 0xA0000.
11481         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
11482         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
11483         instead of hardcoding 0xA0000.
11485 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11487         * disk/memdisk.c (memdisk_size): New variable.
11488         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
11489         `memdisk_size'.
11490         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
11491         image to dynamic memory.
11492         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
11493         `memdisk_size'.  Free memdisk block.
11495 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11497         Fix detection of very small filesystems (like tar).
11499         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
11500         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
11501         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
11502         a problem with this disk).
11504 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11506         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
11507         on grub_biosdisk_rw_standard() error.
11509 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11511         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
11512         recent changes.
11513         * kern/elf.c: Likewise.
11514         * kern/ieee1275/ieee1275.c: Likewise.
11515         * kern/powerpc/ieee1275/openfw.c: Likewise.
11516         * term/ieee1275/ofconsole.c: Likewise.
11518 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11520         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
11522         * include/grub/kernel.h (grub_arch_memdisk_addr)
11523         (grub_arch_memdisk_size): Moved from here ...
11525         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
11526         (grub_arch_memdisk_size): ... to here.
11528 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11530         Mostly based on bugfix from Bean.
11532         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
11533         attribute with hook() parameter.
11534         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
11535         declaration.
11536         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
11537         attribute with hook() parameter.
11538         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
11539         declaration.
11541 2008-01-21  Robert Millan  <rmh@aybabtu.com>
11543         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
11544         (pkglib_MODULES): Add `memdisk.mod'.
11545         (memdisk_mod_SOURCES): New variable.
11546         (memdisk_mod_CFLAGS): Likewise.
11547         (memdisk_mod_LDFLAGS): Likewise.
11549         * disk/memdisk.c: New file.
11551         * include/grub/disk.h (grub_disk_dev_id): Add
11552         `GRUB_DISK_DEVICE_MEMDISK_ID'.
11554         * include/grub/i386/pc/kernel.h
11555         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
11556         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
11557         (grub_kernel_image_size): New variable declaration.
11558         (grub_total_module_size): Likewise.
11559         (grub_memdisk_image_size): Likewise.
11561         * include/grub/i386/pc/memory.h
11562         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
11564         * include/grub/kernel.h: Include `<grub/symbol.h>'.
11565         (grub_arch_memdisk_addr): New variable declaration.
11566         (grub_arch_memdisk_size): Likewise.
11568         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
11569         (grub_arch_memdisk_size): Likewise.
11571         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
11572         (codestart): Replace hardcoded `0x100000' with
11573         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
11575         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
11576         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
11577         not NULL, append the contents of the file it refers to, at the end of
11578         the compressed kernel image.  Initialize `grub_memdisk_image_size'
11579         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
11580         (options): Add "memdisk"|'m' option.
11581         (main): Parse --memdisk|-m option, and pass user-provided path as
11582         parameter to generate_image().
11584 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11586         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
11587         grub_dprintf() calls from here ...
11588         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
11590 2008-01-20  Robert Millan  <rmh@aybabtu.com>
11592         Fix detection of "real mode" when /options/real-mode? doesn't exist.
11594         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
11595         declaration.
11596         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
11597         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
11598         `GRUB_IEEE1275_FLAG_REAL_MODE'.
11599         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
11600         property).
11601         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
11602         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
11604 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11606         Get rid of confusing function (superseded by
11607         `grub_ieee1275_get_integer_property')
11608         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
11609         prototype.
11610         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
11611         function.
11612         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
11613         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
11614         in native endianness from grub_ieee1275_get_integer_property().
11616 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11618         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
11619         command after "shut-down", since implementations differ on which
11620         the command for halt is.
11622 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11624         * include/grub/i386/linuxbios/console.h: Add header protection.
11625         (grub_keyboard_controller_init): New function prototype.
11626         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
11627         (KEYBOARD_COMMAND_READ): Likewise.
11628         (KEYBOARD_COMMAND_WRITE): Likewise.
11629         (KEYBOARD_SCANCODE_SET1): Likewise.
11630         (grub_keyboard_controller_write): New function.
11631         (grub_keyboard_controller_read): Likewise.
11632         (grub_keyboard_controller_init): Likewise.
11634         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
11635         (grub_console_init): On coreboot/LinuxBIOS, call
11636         grub_keyboard_controller_init().
11638 2008-01-19  Robert Millan  <rmh@aybabtu.com>
11640         PowerPC changes provided by Pavel Roskin.
11642         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
11643         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
11644         don't rely on cmain() doing it.
11645         * kern/i386/ieee1275/startup.S (_start): Store %eax in
11646         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
11648 2008-01-16  Robert Millan  <rmh@aybabtu.com>
11650         * include/grub/i386/linuxbios/memory.h
11651         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
11652         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
11653         receive `table_header' as argument.  Instead, probe for it in the
11654         known memory ranges where it can be present.
11655         (grub_available_iterate): Do not pass a fixed `table_header' address
11656         to grub_linuxbios_table_iterate().
11658 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11660         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
11661         * conf/i386-ieee1275.rmk: New file.
11662         * include/grub/i386/ieee1275/console.h: Likewise.
11663         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
11664         * include/grub/i386/ieee1275/kernel.h: Likewise.
11665         * include/grub/i386/ieee1275/time.h: Likewise.
11666         * kern/i386/ieee1275/init.c: Likewise.
11667         * kern/i386/ieee1275/startup.S: Likewise.
11669 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11671         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
11672         when pointers are 32-bit (but still do set it to one when they are
11673         64-bit).
11675 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11677         * include/grub/ieee1275/ieee1275.h
11678         (grub_ieee1275_get_integer_property): New function prototype.
11680         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
11681         (grub_ieee1275_get_integer_property): New function.  Wraps around
11682         grub_ieee1275_get_property() to handle endianness.
11684         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
11685         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
11686         where appropriate.
11687         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
11688         (grub_map): Likewise.
11689         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
11691 2008-01-15  Bean  <bean123ch@gmail.com>
11693         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
11694         (grub_script_execute_cmdline): Reset grub_errno.
11696         * normal/main.c (read_config_file): Reset grub_errno.
11698         * normal/parse.y (script_init): New.
11699         (script): Move function and menuentry here.
11700         (delimiter): New.
11701         (command): Add delimiter at the end of command.
11702         (commands): Adjust to match the new command.
11703         (commandblock): Remove grub_script_lexer_record_start.
11704         (menuentry): Add grub_script_lexer_record_start, use the new commands.
11705         (if): Use the new commands.
11707         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
11709 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11711         * normal/menu.c (run_menu): Move timeout message from here ...
11712         (print_timeout): ... to here.
11713         (run_menu): Use print_timeout() once during initial draw to print
11714         the whole message, and again in every clock tick to update only
11715         the number of seconds.
11717 2008-01-15  Robert Millan  <rmh@aybabtu.com>
11719         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
11720         actual size of `available' from grub_ieee1275_get_property(), and
11721         restrict parsing to that bound.
11723 2008-01-15  Christian Franke  <franke@computer.org>
11725         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
11726         (argp_program_version): Remove variable.
11727         (argp_program_bug_address): Likewise.
11728         (options): Convert from struct argp_option to struct option.
11729         (struct arguments): Remove.
11730         (parse_opt): Remove.
11731         (usage): New function.
11732         (main): Replace struct args members by simple variables.
11733         Replace argp_parse() by getopt_long().
11734         Add switch to evaluate options.
11735         Add missing "(...)" around root_dev in prefix string.
11737 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11739         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
11740         for grub_ieee1275_exit(), in order to improve portability.
11742 2008-01-14  Robert Millan  <rmh@aybabtu.com>
11744         * util/grub.d/10_linux.in (prefix): Define.
11745         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
11747 2008-01-13  Pavel Roskin  <proski@gnu.org>
11749         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
11750         grub_errno if no errors have been detected.
11752 2008-01-12  Robert Millan  <rmh@aybabtu.com>
11754         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
11755         (grub_util_get_dev_abstraction): New function prototype.
11757         * util/getroot.c: Include `<grub/util/getroot.h>'
11758         (grub_util_get_grub_dev): Move detection of abstraction type to ...
11759         (grub_util_get_dev_abstraction): ... here (new function).
11761         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
11762         `PRINT_ABSTRACTION'.
11763         (probe): Probe for abstraction type when requested.
11764         (main): Understand `--target=abstraction'.
11766         * util/i386/efi/grub-install.in: Add abstraction module to core
11767         image when it is found to be necessary.
11768         * util/i386/pc/grub-install.in: Likewise.
11769         * util/powerpc/ieee1275/grub-install.in: Likewise.
11771         * util/update-grub_lib.in (font_path): Return system path without
11772         converting to GRUB path.
11773         * util/update-grub.in: Convert system path returned by font_path()
11774         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
11775         abstraction module is needed for loading fonts (if any).  Export
11776         that as `GRUB_PRELOAD_MODULES'.
11777         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
11778         insmod commands).
11780 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
11782         Remove some unused code from reiserfs.
11784         * fs/reiserfs.c (struct grub_reiserfs_key)
11785         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
11786         (struct grub_reiserfs_node_body): Removed.
11787         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11788         Likewise.
11789         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11790         Likewise.
11791         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11792         Likewise.
11793         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11794         Likewise.
11795         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11796         Likewise.
11797         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
11798         Likewise.
11799         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11800         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11801         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11803 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11805         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
11806         Determines if a file is garbage left by packaging systems, etc.
11807         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
11808         for processing /etc/grub.d scripts.
11809         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
11810         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
11811         as a condition for processing Linux images.
11813 2008-01-10  Pavel Roskin  <proski@gnu.org>
11815         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
11816         to compile reiserfs.c on PowerPC.
11818 2008-01-10  Robert Millan  <rmh@aybabtu.com>
11820         * kern/device.c (grub_device_iterate): Do not abort device iteration
11821         when one of the devices cannot be opened.
11822         * kern/disk.c (grub_disk_open): Do not account previous failures of
11823         unrelated functions when grub_errno is checked for.
11825 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11827         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
11828         `! grub_linux_is_bzimage', change order of address comparison to make
11829         it more intuitive, and improve "too big zImage" error message.
11831 2008-01-08  Robert Millan  <rmh@aybabtu.com>
11833         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
11834         `$(update-grub_DATA)'.
11835         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
11836         targets.
11838 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11840         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
11841         which instruction is modified by grub-setup during installation
11842         (since it wasn't obvious by only looking at this file).
11844 2008-01-07  Robert Millan  <rmh@aybabtu.com>
11846         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
11847         listing actual TODO items.
11849 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11851         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
11852         correctly.
11853         (grub_reiserfs_get_key_offset): Likewise.
11854         (grub_reiserfs_set_key_offset): Likewise.
11855         (grub_reiserfs_set_key_type): Likewise.
11856         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
11858         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
11859         better to remove the bitfield version completely.
11861 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11863         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
11864         allocated from the heap, due to the fshelp implementation.
11865         (grub_reiserfs_dir): Free NODE, due to the same reason.
11867 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
11869         Mostly from Vincent Pelletier:
11871         * fs/reiserfs.c: New file.
11873         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
11874         (reiserfs_mod_SOURCES): New variable.
11875         (reiserfs_mod_CFLAGS): Likewise.
11876         (reiserfs_mod_LDFLAGS): Likewise.
11878         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
11879         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
11880         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
11881         normal/color.c.
11883 2008-01-06  Robert Millan  <rmh@aybabtu.com>
11885         * normal/color.c: Remove `<grub/env.h>'.
11887 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
11889         * include/grub/normal.h: Include <grub/env.h>.
11891 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11893         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
11894         usage example with `(hd0,1)'.
11895         Reported by Samuel Thibault.
11897 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11899         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
11900         (grub_linux_boot_zimage): Rename to ...
11901         (grub_linux_boot): ... this.
11902         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
11903         (grub_linux_boot_zimage): Conditionalize zImage copy.
11905         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
11906         (grub_linux_boot_bzimage): Remove prototype.
11907         (grub_linux_boot_zimage): Rename to ...
11908         (grub_linux_boot): ... this.
11910         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
11911         (grub_linux_boot): Remove function.
11913 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11915         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
11916         (grub_env_write_color_highlight): Likewise.
11917         (grub_wait_after_message): Likewise.
11919         * normal/color.c: New file.
11921         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11922         (normal_mod_DEPENDENCIES): Likewise.
11924         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11925         (normal_mod_DEPENDENCIES): Likewise.
11927         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11928         (normal_mod_DEPENDENCIES): Likewise.
11930         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11931         (normal_mod_DEPENDENCIES): Likewise.
11933         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
11934         for waiting after a message is printed.
11935         * normal/main.c (read_config_file): Likewise.
11936         (grub_normal_init): Register grub_env_write_color_normal() and
11937         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
11938         `color_highlight' variables as global.
11940         * normal/menu.c (grub_wait_after_message): New function.
11941         (grub_color_menu_normal): New variable.  Replaces ...
11942         (GRUB_COLOR_MENU_NORMAL): ... this macro.
11943         (grub_color_menu_highlight): New variable.  Replaces ...
11944         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
11945         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
11946         `GRUB_TERM_COLOR_STANDARD'.
11947         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
11948         `normal_code' and `highlight_code' to `old_color_normal' and
11949         `old_color_highlight', respectively.
11950         (grub_menu_init_page): Update colors when drawing the menu, based on
11951         `menu_color_normal' and `menu_color_highlight' variables.
11952         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
11953         a message is printed.
11955 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11957         * kern/env.c (grub_env_context_open): Propagate hooks for global
11958         variables to new context.
11960         * kern/main.c (grub_set_root_dev): Export `root' variable.
11962 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11964         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
11965         discs unconditionally, since udev and others have options to provide
11966         them.
11968 2008-01-05  Robert Millan  <rmh@aybabtu.com>
11970         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
11972 2008-01-04  Christian Franke  <franke@computer.org>
11974         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
11975         of eisa_mmap.
11977 2008-01-03  Pavel Roskin  <proski@gnu.org>
11979         * kern/i386/linuxbios/init.c: Put "void" to all function
11980         declarations with no arguments.
11981         * kern/powerpc/ieee1275/init.c: Likewise.
11982         * term/i386/pc/at_keyboard.c: Likewise.
11983         * term/i386/pc/vga_text.c: Likewise.
11984         * util/grub-mkdevicemap.c: Likewise.
11986 2008-01-02  Robert Millan  <rmh@aybabtu.com>
11988         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
11989         message when loaded image is out of bounds.
11990         (grub_multiboot_load_elf64): Likewise.
11992 2008-01-02  Pavel Roskin  <proski@gnu.org>
11994         * util/grub.d/10_linux.in: Try version without ".old" when
11995         looking for initrd.  It's better to use initrd from the newer
11996         kernel of the same version than no initrd at all.
11998 2008-01-01  Robert Millan  <rmh@aybabtu.com>
12000         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
12002 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
12004         * include/grub/video.h: Added grub_video_unmap_color and
12005         grub_video_get_active_render_target.
12006         (grub_video_adapter): Added unmap_color and get_active_render_target.
12008         * video/video.c: Added grub_video_unmap_color and
12009         grub_video_get_active_render_target.
12010         (grub_video_get_info): Changed method to accept NULL pointer as an
12011         argument to allow detection of active video adapter.
12013         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
12014         grub_video_vbe_unmap_color_int.
12015         Added grub_video_vbe_unmap_color and
12016         grub_video_vbe_get_active_render_target.
12017         (grub_video_vbe_adapter): Added unmap_color and
12018         get_active_render_target.
12020         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
12021         with grub_video_vbe_unmap_color_int.
12023         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
12024         (DEFAULT_NORMAL_COLOR): Likewise.
12025         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
12026         (DEFAULT_FG_COLOR): Removed.
12027         (DEFAULT_BG_COLOR): Likewise.
12028         (DEFAULT_CURSOR_COLOR): Changed value.
12029         (grub_virtual_screen): Added standard_color_setting,
12030         normal_color_setting, highlight_color_setting and term_color.
12031         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
12032         (bitmap_width): Added.
12033         (bitmap_height): Likewise.
12034         (bitmap): Likewise.
12035         (set_term_color): Likewise.
12036         (grub_virtual_screen_setup): Changed to use new terminal coloring
12037         settings.
12038         (grub_gfxterm_init): Added init for bitmap.
12039         (grub_gfxterm_fini): Added destroy for bitmap.
12040         (redraw_screen_rect): Updated to use background bitmap and new
12041         terminal coloring.
12042         (scroll_up): Added optimization for case when there is no bitmap.
12043         (grub_gfxterm_cls): Fixed to use correct background color.
12044         (grub_virtual_screen_setcolorstate): Changed to use new terminal
12045         coloring.
12046         (grub_virtual_screen_setcolor): Likewise.
12047         (grub_virtual_screen_getcolor): Added.
12048         (grub_gfxterm_background_image_cmd): Likewise.
12049         (grub_video_term): Added setcolor and getcolor.
12050         (MOD_INIT): Added registration of background_image command.
12051         (MOD_TERM): Added unregistration for background_image command.
12053 2007-12-30  Pavel Roskin  <proski@gnu.org>
12055         * loader/multiboot_loader.c: Fix multiboot command
12056         unregistration.  Fix all typos in the word "multiboot".
12058 2007-12-29  Pavel Roskin  <proski@gnu.org>
12060         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
12061         support for initrd names used in Fedora.
12063 2007-12-26  Bean  <bean123ch@gmail.com>
12065         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
12066         (cpio_mod_SOURCES): New variable.
12067         (cpio_mod_CFLAGS): Likewise.
12068         (cpio_mod_LDFLAGS): Likewise.
12070         * fs/cpio.c: New file.
12072         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
12074         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
12076         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
12078         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12080 2007-12-25  Robert Millan  <rmh@aybabtu.com>
12082         * include/grub/term.h (struct grub_term): Add `getcolor' function.
12083         (grub_getcolor): New function.
12085         * kern/term.c (grub_getcolor): New function.
12086         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
12087         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
12088         (print_entry): Set normal and highlight colors to
12089         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
12090         respectively, before printing and restore them to old
12091         values afterwards.
12092         (grub_menu_init_page): Likewise.  Fill an additional colored space
12093         that would otherwise be left blank.
12095         * term/efi/console.c (grub_console_getcolor): New function.
12096         (struct grub_console_term.getcolor): New variable.
12097         * term/i386/pc/console.c (grub_console_getcolor): New function.
12098         (struct grub_console_term.getcolor): New variable.
12099         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
12100         (struct grub_console_term.getcolor): New variable.
12102         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
12103         (struct grub_console_term.setcolor): Remove variable.
12104         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
12105         (struct grub_console_term.setcolor): Remove variable.
12106         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
12107         (struct grub_console_term.setcolor): Remove variable.
12108         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
12109         (struct grub_console_term.setcolor): Remove variable.
12111 2007-12-25  Robert Millan  <rmh@aybabtu.com>
12113         * configure.ac: Search for possible unifont.hex locations, and
12114         define UNIFONT_HEX if found.
12116         * Makefile.in (UNIFONT_HEX): Define variable.
12117         (DATA): Rename to ...
12118         (PKGLIB): ... this.  Update all users.
12119         (PKGDATA): New variable.
12120         (pkgdata_IMAGES): Rename to ...
12121         (pkglib_IMAGES): ... this. Update all users.
12122         (pkgdata_MODULES): Rename to ...
12123         (pkglib_MODULES): ... this. Update all users.
12124         (pkgdata_PROGRAMS): Rename to ...
12125         (pkglib_PROGRAMS): ... this. Update all users.
12126         (pkgdata_DATA): Rename to ...
12127         (pkglib_DATA): ... this. Update all users.
12128         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
12129         (unicode.pff, ascii.pff): New rules.
12130         (all-local): Add `$(PKGDATA)' dependency.
12131         (install-local): Process `$(PKGDATA)'.
12133         * util/update-grub_lib.in (font_path): Search for *.pff files in
12134         a few more locations, including `${pkgdata}'.
12136 2007-12-23  Robert Millan  <rmh@aybabtu.com>
12138         Patch from Bean  <bean123ch@gmail.com>:
12139         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
12140         `size'.
12142 2007-12-21  Bean  <bean123ch@gmail.com>
12144         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
12145         (ntfscomp_mod_SOURCES): New variable.
12146         (ntfscomp_mod_CFLAGS): Likewise.
12147         (ntfscomp_mod_LDFLAGS): Likewise.
12149         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
12150         (grub_probe_SOURCES): Likewise.
12151         (grub_emu_SOURCES): Likewise.
12153         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12154         (grub_emu_SOURCES): Likewise.
12156         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12157         (grub_emu_SOURCES): Likewise.
12159         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
12160         (grub_emu_SOURCES): Likewise.
12162         * fs/ntfs.c (grub_ntfscomp_func): New variable.
12163         (read_run_list): Renamed to grub_ntfs_read_run_list.
12164         (decomp_nextvcn): Moved to ntfscomp.c.
12165         (decomp_getch): Likewise.
12166         (decomp_get16): Likewise.
12167         (decomp_block): Likewise.
12168         (read_block): Likewise.
12169         (read_data): Partially moved to ntfscomp.c.
12170         (fixup): Change unsigned to grub_uint16_t.
12171         (read_mft): Change unsigned long to grub_uint32_t.
12172         (read_attr): Likewise.
12173         (read_data): Likewise.
12174         (read_run_data): Likewise.
12175         (read_run_list): Likewise.
12176         (read_mft): Likewise.
12178         * fs/ntfscomp.c: New file.
12180         * include/grub/ntfs.h: New file.
12182 2007-12-16  Robert Millan  <rmh@aybabtu.com>
12184         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
12185         IDE disk check, since Linux is known to support 20 IDE disks.
12186         Reported by Colin Watson.
12188 2007-12-15  Bean  <bean123ch@gmail.com>
12190         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
12191         (lnxboot_img_SOURCES): New variable.
12192         (lnxboot_img_ASFLAGS): Likewise.
12193         (lnxboot_img_LDFLAGS): Likewise.
12195         * boot/i386/pc/lnxboot.S: New file.
12197 2007-11-24  Pavel Roskin  <proski@gnu.org>
12199         * configure.ac: Test if '--build-id=none' is supported by the
12200         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
12201         objcopy to generate incorrect binary files (binutils
12202         2.17.50.0.18-1 as shipped by Fedora 8).
12203         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
12204         linking, so that build ID doesn't break the test.
12206 2007-11-24  Pavel Roskin  <proski@gnu.org>
12208         * include/grub/i386/time.h: use "void" in the argument list
12209         of grub_cpu_idle().
12210         * include/grub/powerpc/time.h: Likewise.
12211         * include/grub/sparc64/time.h: Likewise.
12213 2007-11-18  Christian Franke  <franke@computer.org>
12215         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
12216         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
12217         This fixes the problem that function keys did not work in grub-emu.
12219 2007-11-18  Christian Franke  <franke@computer.org>
12221         * disk/host.c (grub_host_open): Remove attribute unused from
12222         name parameter. Add check for "host". This fixes the problem
12223         that grub-emu does not find partitions.
12225 2007-11-18  Christian Franke  <franke@computer.org>
12227         * util/hostfs.c (is_dir): New function.
12228         (grub_hostfs_dir):  Handle missing dirent.d_type case.
12229         (grub_hostfs_read): Add missing fseek().
12230         (grub_hostfs_label): Clear label pointer.  This fixes a crash
12231         of grub-emu on "ls (host)".
12233 2007-11-18  Christian Franke  <franke@computer.org>
12235         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
12236         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
12237         to 64 bit boundary by default.
12239 2007-11-18  Bean  <bean123ch@gmail.com>
12241         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
12242         (hexdump_mod_SOURCES): New variable.
12243         (hexdump_mod_CFLAGS): Likewise.
12244         (hexdump_mod_LDFLAGS): Likewise.
12246         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12248         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12250         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12252         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
12254         * include/grub/hexdump.h: New file.
12256         * commands/hexdump.c: New file.
12258 2007-11-10  Robert Millan  <rmh@aybabtu.com>
12260         * commands/i386/pc/play.c (beep_off): Switch order of arguments
12261         in grub_outb() calls.
12262         (beep_on): Likewise.
12264 2007-11-10  Christian Franke  <franke@computer.org>
12266         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
12267         (grub_menu_run): Likewise.
12269 2007-11-10  Robert Millan  <rmh@aybabtu.com>
12271         * include/grub/i386/efi/machine.h: New file.
12272         * include/grub/i386/linuxbios/machine.h: Likewise.
12273         * include/grub/i386/pc/machine.h: Likewise.
12274         * include/grub/powerpc/ieee1275/machine.h: Likewise.
12275         * include/grub/sparc64/ieee1275/machine.h: Likewise.
12277         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
12278         (serial_hw_io_addr): New variable.
12279         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
12280         instead of `(unsigned short *) 0x400'.
12282 2007-11-10  Bean  <bean123ch@gmail.com>
12284         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
12286 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
12288         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
12289         (vga_mod_SOURCES): Added.
12290         (vga_mod_CFLAGS): Likewise.
12291         (vga_mod_LDFLAGS): Likewise.
12293         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
12294         grub_outb() calls.
12295         (set_map_mask): Likewise.
12296         (set_read_map): Likewise.
12297         (set_read_address): Likewise.
12298         (vga_font): Removed variable.
12299         (get_vga_glyph): Removed function.
12300         (invalidate_char): Likewise.
12301         (write_char): Changed to use grub_font_get_glyph() for font
12302         information.
12303         (grub_vga_putchar): Likewise.
12304         (grub_vga_getcharwidth): Likewise.
12306 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
12308         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
12309         flags.
12310         (pxeboot_img_LDFLAGS): Likewise.
12311         (diskboot_img_LDFLAGS): Likewise.
12312         (kernel_img_LDFLAGS): Likewise.
12314 2007-11-06  Robert Millan  <rmh@aybabtu.com>
12316         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
12317         in grub_outb() calls.
12318         (serial_hw_init): Likewise.
12320 2007-11-05  Robert Millan  <rmh@aybabtu.com>
12322         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
12323         spaces.  Skip non-regular files.
12325 2007-11-05  Robert Millan  <rmh@aybabtu.com>
12327         * kern/disk.c (grub_disk_firmware_fini)
12328         (grub_disk_firmware_is_tainted): New variables.
12330         * include/grub/disk.h (grub_disk_firmware_fini)
12331         (grub_disk_firmware_is_tainted): Likewise.
12333         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
12334         (grub_disk_biosdisk_fini): ... to here.
12335         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
12336         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
12337         is set.  Register grub_disk_biosdisk_fini() in
12338         `grub_disk_firmware_fini'.
12340         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
12341         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
12342         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
12343         to finish existing firmware disk interface.
12345         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
12346         (ata_mod_SOURCES): New variable.
12347         (ata_mod_CFLAGS): Likewise.
12348         (ata_mod_LDFLAGS): Likewise.
12350 2007-11-05  Robert Millan  <rmh@aybabtu.com>
12352         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
12353         (grub_ata_wait): Reimplement using grub_millisleep().
12355         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
12356         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
12358 2007-11-03  Marco Gerards  <marco@gnu.org>
12360         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
12361         (CRTC_ADDR_PORT): New macro.
12362         (CRTC_DATA_PORT): Likewise.
12363         (CRTC_CURSOR): Likewise.
12364         (CRTC_CURSOR_ADDR_HIGH): Likewise.
12365         (CRTC_CURSOR_ADDR_LOW): Likewise.
12366         (update_cursor): New function.
12367         (grub_console_real_putchar): Call `update_cursor'.
12368         (grub_console_gotoxy): Likewise.
12369         (grub_console_cls): Set the default color when clearing the
12370         screen.
12371         (grub_console_setcursor): Implemented.
12373 2007-11-03  Marco Gerards  <marco@gnu.org>
12375         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
12376         become activate.
12377         (grub_ata_pio_write): Likewise.
12379         (grub_atapi_identify): Wait after issuing an ATA command.
12380         (grub_atapi_packet): Likewise.
12381         (grub_ata_identify): Likewise.
12382         (grub_ata_readwrite): Likewise.
12384 2007-11-03  Marco Gerards  <marco@gnu.org>
12386         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
12387         (grub_ata_pio_write): Likewise.
12388         (grub_ata_readwrite): Use `grub_error', instead of
12389         returning `grub_errno'.
12391 2007-11-03  Marco Gerards  <marco@gnu.org>
12393         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
12394         grub_ata_pio_write once for every single sector, instead of for
12395         multiple sectors.
12397 2007-10-31  Robert Millan  <rmh@aybabtu.com>
12399         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
12401         * conf/i386-linuxbios.rmk: New file.
12403         * kern/i386/pc/hardware.c: Likewise.
12404         * term/i386/pc/at_keyboard.c: Likewise.
12405         * term/i386/pc/vga_text.c: Likewise.
12407         * include/grub/i386/linuxbios/boot.h: Likewise.
12408         * include/grub/i386/linuxbios/console.h: Likewise.
12409         * include/grub/i386/linuxbios/init.h: Likewise.
12410         * include/grub/i386/linuxbios/kernel.h: Likewise.
12411         * include/grub/i386/linuxbios/loader.h: Likewise.
12412         * include/grub/i386/linuxbios/memory.h: Likewise.
12413         * include/grub/i386/linuxbios/serial.h: Likewise.
12414         * include/grub/i386/linuxbios/time.h: Likewise.
12416         * kern/i386/linuxbios/init.c: Likewise.
12417         * kern/i386/linuxbios/startup.S: Likewise.
12418         * kern/i386/linuxbios/table.c: Likewise.
12420 2007-10-31  Marco Gerards  <marco@gnu.org>
12422         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
12423         (ata_mod_SOURCES): New variable.
12424         (ata_mod_CFLAGS): Likewise.
12425         (ata_mod_LDFLAGS): Likewise.
12427         * disk/ata.c: New file.
12429         * include/grub/disk.h (grub_disk_dev_id): Add
12430         `GRUB_DISK_DEV_ATA_ID'.
12432 2007-10-31  Robert Millan  <rmh@aybabtu.com>
12434         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
12435         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
12437         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
12438         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
12440         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
12441         `<grub/types.h>'.
12443         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
12445 2007-10-27  Robert Millan  <rmh@aybabtu.com>
12447         * include/grub/types.h (ULONG_MAX): Define macro.
12449 2007-10-22  Robert Millan  <rmh@aybabtu.com>
12451         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
12452         `"../realmode.S"'.
12453         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
12455 2007-10-22  Robert Millan  <rmh@aybabtu.com>
12457         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
12458         (pkgdata_MODULES): Add `biosdisk.mod'.
12459         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
12460         variables.
12462         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
12463         (grub_biosdisk_init): Replace with ...
12464         (GRUB_MOD_INIT(biosdisk)): ... this.
12465         (grub_biosdisk_fini): Replace with ...
12466         (GRUB_MOD_FINI(biosdisk)): ... this.
12468         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
12469         (grub_machine_init): Remove call to grub_biosdisk_init().
12470         (grub_machine_fini): Remove call to grub_machine_fini().
12472         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
12474 2007-10-22  Robert Millan  <rmh@aybabtu.com>
12476         * include/grub/time.h: New file.
12477         * include/grub/i386/time.h: Likewise.
12478         * include/grub/powerpc/time.h: Likewise.
12479         * include/grub/sparc64/time.h: Likewise.
12481         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
12482         instances to ...
12483         (KERNEL_MACHINE_TIME_HEADER): ... this.
12484         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
12485         instances to ...
12486         (KERNEL_MACHINE_TIME_HEADER): ... this.
12487         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
12488         instances to ...
12489         (KERNEL_MACHINE_TIME_HEADER): ... this.
12491         * kern/i386/efi/init.c: Include `<grub/time.h>'.
12492         (grub_millisleep): New function.
12493         * kern/i386/pc/init.c: Include `<grub/time.h>'.
12494         (grub_millisleep): New function.
12495         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
12496         Remove `grub/machine/time.h' include.
12497         (grub_millisleep): New function.
12498         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
12499         Remove `grub/machine/time.h' include.
12500         (grub_millisleep): New function.
12502         * include/grub/misc.h (grub_div_roundup): New function.
12504         * kern/misc.c: Include `<grub/time.h>'.
12505         (grub_millisleep_generic): New function.
12507         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
12508         Add `time.h'.
12509         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
12510         Add `time.h'.
12511         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
12512         `machine/time.h'.  Add `time.h'.
12513         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12515 2007-10-21  Robert Millan  <rmh@aybabtu.com>
12517         * include/grub/misc.h (grub_max): New function.
12519 2007-10-21  Robert Millan  <rmh@aybabtu.com>
12521         * util/misc.c (grub_util_info): Call fflush() before returning.
12523 2007-10-20  Robert Millan  <rmh@aybabtu.com>
12525         * genmk.rb (Image): Copy `extra_flags' from here ...
12526         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
12528         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
12529         to `argc' and `args' arguments.
12531 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12533         * kern/i386/loader.S: New file.
12535         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
12536         * kern/i386/loader.S (grub_linux_prot_size)... to here.
12537         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
12538         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
12539         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
12540         * kern/i386/loader.S (grub_linux_real_addr)... to here.
12541         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
12542         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
12543         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
12544         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
12545         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
12546         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
12547         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
12548         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
12550         * kern/i386/realmode.S: New file.
12552         * kern/i386/pc/startup.S (protstack): Moved from here ...
12553         * kern/i386/realmode.S (protstack)... to here.
12554         * kern/i386/pc/startup.S (gdt): Moved from here ...
12555         * kern/i386/realmode.S (gdt)... to here.
12556         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
12557         * kern/i386/realmode.S (prot_to_real)... to here.
12559         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
12560         `kern/i386/realmode.S'.
12562 2007-10-17  Robert Millan  <rmh@aybabtu.com>
12564         * include/grub/i386/loader.h: New file.
12566         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
12567         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12568         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12569         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12570         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
12571         * include/grub/i386/loader.h (grub_linux_prot_size)
12572         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12573         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12574         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12575         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
12577         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
12579 2007-10-15  Robert Millan  <rmh@aybabtu.com>
12581         * normal/misc.c (grub_normal_print_device_info): Do not probe for
12582         filesystem when dev->disk is unset.
12583         Do probe for filesystem even when dev->disk->has_partitions is set.
12584         In case a filesystem is found, always report it.
12585         In case it isn't, if dev->disk->has_partitions is set, report that
12586         a partition table was found instead of reporting that no filesystem
12587         could be identified.
12589 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12591         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
12592         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
12594         * include/grub/types.h (grub_host_to_target16): New macro.
12595         (grub_host_to_target32): Likewise.
12596         (grub_host_to_target64): Likewise.
12597         (grub_target_to_host16): Likewise.
12598         (grub_target_to_host32): Likewise.
12599         (grub_target_to_host64): Likewise.
12601         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12602         Renamed from to ...
12603         (GRUB_MOD_ALIGN): ...this.  Update all users.
12605         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
12606         grub_host_to_target32.
12607         Replace grub_be_to_cpu32 with grub_target_to_host32.
12608         (load_modules): Likewise.
12609         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
12610         Replace grub_be_to_cpu32 with grub_target_to_host32.
12611         Replace grub_cpu_to_be16 with grub_host_to_target16.
12612         Replace grub_cpu_to_be32 grub_host_to_target32.
12614 2007-10-12  Robert Millan  <rmh@aybabtu.com>
12616         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
12617         * util/elf/grub-mkimage.c: ... here.
12619         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
12620         `util/powerpc/ieee1275/grub-mkimage.c'.
12622 2007-10-07  Robert Millan  <rmh@aybabtu.com>
12624         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
12625         and make it easier to figure out.
12626         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
12627         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
12628         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
12629         leave us with less than HEAP_MIN_SIZE total heap.
12630         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
12632 2007-10-03  Robert Millan  <rmh@aybabtu.com>
12634         * include/grub/i386/io.h: New file.
12635         * commands/i386/pc/play.c (inb): Removed.
12636         (outb): Removed.
12637         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12638         with grub_outb().
12639         * term/i386/pc/serial.c  (inb): Removed.
12640         (outb): Removed.
12641         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12642         with grub_outb().
12643         * term/i386/pc/vga.c  (inb): Removed.
12644         (outb): Removed.
12645         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
12646         with grub_outb().
12648 2007-10-02  Robert Millan  <rmh@aybabtu.com>
12650         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
12651         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12652         Reported by Marcin Kurek.
12654 2007-09-07  Robert Millan  <rmh@aybabtu.com>
12656         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
12657         SmartFirmware version updates (as released by Sven Luther), and avoid
12658         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
12659         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
12660         known broken.
12662 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12664         From Hitoshi Ozeki:
12665         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
12666         when merging two regions.
12668 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12670         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
12671         * normal/completion.c (grub_normal_do_completion): Likewise.
12672         Reported by Hitoshi Ozeki.
12674 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12676         Do not use devices at boot in chainloading.
12678         * loader/i386/pc/chainloader.c (boot_drive): New variable.
12679         (boot_part_addr): Likewise.
12680         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
12681         with BOOT_DRIVE and BOOT_PART_ADDR.
12682         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
12683         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
12685 2007-08-29  Robert Millan  <rmh@aybabtu.com>
12687         Patch from Simon Peter <dn.tlp@gmx.net>:
12688         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
12689         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
12690         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
12691         util/i386/pc/grub-setup.c_DEPENDENCIES.
12692         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
12693         util/grub-probe.c_DEPENDENCIES.
12694         * conf/powerpc-ieee1275.rmk: Likewise.
12696 2007-08-28  Robert Millan  <rmh@aybabtu.com>
12698         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
12699         to tell grub-mkdevicemap how to name devices.
12700         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
12701         feature).
12703         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
12704         util/i386/get_disk_name.c.
12705         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
12706         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
12707         util/ieee1275/get_disk_name.c.
12709         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
12711         * DISTLIST: Add util/i386/get_disk_name.c and
12712         util/ieee1275/get_disk_name.c.
12714         * util/grub-mkdevicemap.c: Replace device naming logic with
12715         grub_util_get_disk_name() calls.
12717 2007-08-20  Robert Millan  <rmh@aybabtu.com>
12719         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
12720         (so that it works for both plural and singular quantities).
12722 2007-08-05  Robert Millan  <rmh@aybabtu.com>
12724         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
12725         so that [xz] isn't taken into account when determining order.
12727 2007-08-02  Marco Gerards  <marco@gnu.org>
12729         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
12730         `include/multiboot2.h', `include/grub/elfload.h',
12731         `include/multiboot.h', `include/grub/multiboot.h',
12732         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
12733         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
12734         `kern/elf.c', `loader/multiboot_loader.c',
12735         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
12736         `loader/i386/pc/multiboot2.c',
12737         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
12738         `util/i386/pc/grub-mkrescue.in'.  Remove
12739         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
12740         `include/grub/i386/pc/util/biosdisk.h' and
12741         `include/grub/powerpc/ieee1275/multiboot.h'.
12743 2007-08-02  Bean  <bean123ch@gmail.com>
12745         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
12746         (ntfs_mod_SOURCES): New variable.
12747         (ntfs_mod_CFLAGS): Likewise.
12748         (ntfs_mod_LDFLAGS): Likewise.
12750         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
12751         (grub_probe_SOURCES): Likewise.
12752         (grub_emu_SOURCES): Likewise.
12754         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12755         (grub_emu_SOURCES): Likewise.
12757         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12758         (grub_emu_SOURCES): Likewise.
12760         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
12762         * fs/ntfs.c: New file.
12764 2007-08-02  Bean  <bean123ch@gmail.com>
12766         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
12768         * file.h (grub_file): Likewise.
12770         * fshelp.h (grub_fshelp_read_file): Likewise.
12772         * util/i386/pc/grub-setup.c (setup): Likewise.
12773         (save_first_sector): Likewise.
12774         (save_blocklists): Likewise.
12776         * fs/affs.c (grub_affs_read_file): Likewise.
12778         * fs/ext2.c (grub_ext2_read_file): Likewise.
12780         * fs/fat.c (grub_fat_read_data): Likewise.
12782         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
12784         * fs/hfs.c (grub_hfs_read_file): Likewise.
12786         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12788         * fs/jfs.c (grub_jfs_read_file): Likewise.
12790         * fs/minix.c (grub_minix_read_file): Likewise.
12792         * fs/sfs.c (grub_sfs_read_file): Likewise.
12794         * fs/ufs.c (grub_ufs_read_file): Likewise.
12796         * fs/xfs.c (grub_xfs_read_file): Likewise.
12798         * command/blocklist.c (read_blocklist): Likewise.
12799         (print_blocklist): Likewise.
12801 2007-08-02  Marco Gerards  <marco@gnu.org>
12803         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
12804         `util/hostfs.c'.
12806         * disk/host.c: New file.
12808         * util/hostfs.c: Likewise.
12810         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
12811         return `GRUB_ERR_BAD_FS'.
12812         * fs/sfs.c (grub_sfs_mount): Likewise.
12813         * fs/xfs.c (grub_xfs_mount): Likewise.
12815         * include/grub/disk.h (enum grub_disk_dev_id): Add
12816         `GRUB_DISK_DEVICE_HOST_ID'.
12818         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
12820 2007-07-24  Jerone Young  <jerone@gmail.com>
12822         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
12823         modules for compilation.
12824         * conf/powerpc-ieee1275.rmk: Likewise.
12826         * include/multiboot.h: Move multiboot definitions to one file. Rename
12827         many definitions to not get grub specific.
12828         * include/multiboot2.h: Create header with multiboot 2 definitions.
12829         * include/grub/multiboot.h: Header for grub specific function
12830         prototypes and definitions.
12831         * include/grub/multiboot2.h: Likewise.
12832         * include/grub/multiboot_loader.h: Likewise.
12833         * include/grub/i386/pc/multiboot.h: Removed.
12834         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
12836         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
12837         and 2 to allow for one multiboot and module commands.
12838         * loader/multiboot2.c: Add multiboot2 functionality.
12839         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
12840         and definition names.
12841         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
12842         2 functions.
12843         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
12844         ieee1275 specific multiboot2 code.
12846         * kern/i386/pc/startup.S: Change headers and definition names for
12847         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
12849 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12851         * geninitheader.sh: Process file specified in first parameter rather
12852         than hardcoding grub_modules_init.lst.
12853         * geninit.sh: Likewise.  Also, construct header name dynamically rather
12854         than hardcoding grub_modules_init.h.
12856         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
12857         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
12858         grub_probe_init.[ch] and grub_setup_init.[ch].
12860         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
12861         grub_modules_init.h with grub_emu_init.h.
12862         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
12863         grub_probe_init.[ch] files.
12864         * conf/i386-efi.rmk: Likewise.
12865         * conf/i386-pc.rmk: Likewise.
12866         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
12867         grub_setup_init.[ch] files.
12869         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
12870         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
12871         to initialize modules rather than a list of hardcoded functions.
12872         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
12873         grub_init_all() to initialize modules rather than a list of hardcoded
12874         functions.
12876 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12878         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
12879         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
12881 2007-07-22  Robert Millan  <rmh@aybabtu.com>
12883         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12884         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
12885         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
12886         flag when running on SmartFirmware.
12887         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
12888         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
12889         was set.
12891         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12892         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
12893         rather than decreasing it.
12895         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
12896         there's not enough space to do it, fail in the same way as when it
12897         can't be done because there are no partitions.
12899         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
12900         when nvsetenv failed.
12902 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12904         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
12905         because this rule is automatically generated.
12906         (grub-mkrescue): Removed for the same reason as above.
12908 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
12910         Migrate to GNU General Public License Version 3.
12912         * COPYING: Replaced with the plain text version of GPLv3.
12914         * config.guess: Updated from gnulib.
12915         * config.sub: Likewise.
12917         * geninit.sh: Output a GPLv3 copyright notice.
12918         * geninitheader.sh: Likewise.
12919         * genmodsrc.sh: Likewise.
12920         * gensymlist.sh.in: Likewise.
12922         * boot/i386/pc/boot.S: Upgraded to GPLv3.
12923         * boot/i386/pc/diskboot.S: Likewise.
12924         * boot/i386/pc/pxeboot.S: Likewise.
12925         * commands/blocklist.c: Likewise.
12926         * commands/boot.c: Likewise.
12927         * commands/cat.c: Likewise.
12928         * commands/cmp.c: Likewise.
12929         * commands/configfile.c: Likewise.
12930         * commands/echo.c: Likewise.
12931         * commands/help.c: Likewise.
12932         * commands/ls.c: Likewise.
12933         * commands/search.c: Likewise.
12934         * commands/terminal.c: Likewise.
12935         * commands/test.c: Likewise.
12936         * commands/videotest.c: Likewise.
12937         * commands/i386/cpuid.c: Likewise.
12938         * commands/i386/pc/halt.c: Likewise.
12939         * commands/i386/pc/play.c: Likewise.
12940         * commands/i386/pc/reboot.c: Likewise.
12941         * commands/i386/pc/vbeinfo.c: Likewise.
12942         * commands/i386/pc/vbetest.c: Likewise.
12943         * commands/ieee1275/halt.c: Likewise.
12944         * commands/ieee1275/reboot.c: Likewise.
12945         * commands/ieee1275/suspend.c: Likewise.
12946         * disk/loopback.c: Likewise.
12947         * disk/lvm.c: Likewise.
12948         * disk/raid.c: Likewise.
12949         * disk/efi/efidisk.c: Likewise.
12950         * disk/i386/pc/biosdisk.c: Likewise.
12951         * disk/ieee1275/ofdisk.c: Likewise.
12952         * font/manager.c: Likewise.
12953         * fs/affs.c: Likewise.
12954         * fs/ext2.c: Likewise.
12955         * fs/fat.c: Likewise.
12956         * fs/fshelp.c: Likewise.
12957         * fs/hfs.c: Likewise.
12958         * fs/hfsplus.c: Likewise.
12959         * fs/iso9660.c: Likewise.
12960         * fs/jfs.c: Likewise.
12961         * fs/minix.c: Likewise.
12962         * fs/sfs.c: Likewise.
12963         * fs/ufs.c: Likewise.
12964         * fs/xfs.c: Likewise.
12965         * hello/hello.c: Likewise.
12966         * include/grub/acorn_filecore.h: Likewise.
12967         * include/grub/arg.h: Likewise.
12968         * include/grub/bitmap.h: Likewise.
12969         * include/grub/boot.h: Likewise.
12970         * include/grub/cache.h: Likewise.
12971         * include/grub/device.h: Likewise.
12972         * include/grub/disk.h: Likewise.
12973         * include/grub/dl.h: Likewise.
12974         * include/grub/elfload.h: Likewise.
12975         * include/grub/env.h: Likewise.
12976         * include/grub/err.h: Likewise.
12977         * include/grub/file.h: Likewise.
12978         * include/grub/font.h: Likewise.
12979         * include/grub/fs.h: Likewise.
12980         * include/grub/fshelp.h: Likewise.
12981         * include/grub/gzio.h: Likewise.
12982         * include/grub/hfs.h: Likewise.
12983         * include/grub/kernel.h: Likewise.
12984         * include/grub/loader.h: Likewise.
12985         * include/grub/lvm.h: Likewise.
12986         * include/grub/misc.h: Likewise.
12987         * include/grub/mm.h: Likewise.
12988         * include/grub/net.h: Likewise.
12989         * include/grub/normal.h: Likewise.
12990         * include/grub/parser.h: Likewise.
12991         * include/grub/partition.h: Likewise.
12992         * include/grub/pc_partition.h: Likewise.
12993         * include/grub/raid.h: Likewise.
12994         * include/grub/rescue.h: Likewise.
12995         * include/grub/script.h: Likewise.
12996         * include/grub/setjmp.h: Likewise.
12997         * include/grub/symbol.h: Likewise.
12998         * include/grub/term.h: Likewise.
12999         * include/grub/terminfo.h: Likewise.
13000         * include/grub/tparm.h: Likewise.
13001         * include/grub/types.h: Likewise.
13002         * include/grub/video.h: Likewise.
13003         * include/grub/efi/api.h: Likewise.
13004         * include/grub/efi/chainloader.h: Likewise.
13005         * include/grub/efi/console.h: Likewise.
13006         * include/grub/efi/console_control.h: Likewise.
13007         * include/grub/efi/disk.h: Likewise.
13008         * include/grub/efi/efi.h: Likewise.
13009         * include/grub/efi/pe32.h: Likewise.
13010         * include/grub/efi/time.h: Likewise.
13011         * include/grub/i386/linux.h: Likewise.
13012         * include/grub/i386/setjmp.h: Likewise.
13013         * include/grub/i386/types.h: Likewise.
13014         * include/grub/i386/efi/kernel.h: Likewise.
13015         * include/grub/i386/efi/loader.h: Likewise.
13016         * include/grub/i386/efi/time.h: Likewise.
13017         * include/grub/i386/pc/biosdisk.h: Likewise.
13018         * include/grub/i386/pc/boot.h: Likewise.
13019         * include/grub/i386/pc/chainloader.h: Likewise.
13020         * include/grub/i386/pc/console.h: Likewise.
13021         * include/grub/i386/pc/init.h: Likewise.
13022         * include/grub/i386/pc/kernel.h: Likewise.
13023         * include/grub/i386/pc/loader.h: Likewise.
13024         * include/grub/i386/pc/memory.h: Likewise.
13025         * include/grub/i386/pc/multiboot.h: Likewise.
13026         * include/grub/i386/pc/serial.h: Likewise.
13027         * include/grub/i386/pc/time.h: Likewise.
13028         * include/grub/i386/pc/vbe.h: Likewise.
13029         * include/grub/i386/pc/vbeblit.h: Likewise.
13030         * include/grub/i386/pc/vbefill.h: Likewise.
13031         * include/grub/i386/pc/vbeutil.h: Likewise.
13032         * include/grub/i386/pc/vga.h: Likewise.
13033         * include/grub/ieee1275/ieee1275.h: Likewise.
13034         * include/grub/ieee1275/ofdisk.h: Likewise.
13035         * include/grub/powerpc/libgcc.h: Likewise.
13036         * include/grub/powerpc/setjmp.h: Likewise.
13037         * include/grub/powerpc/types.h: Likewise.
13038         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
13039         * include/grub/powerpc/ieee1275/console.h: Likewise.
13040         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
13041         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
13042         * include/grub/powerpc/ieee1275/loader.h: Likewise.
13043         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
13044         * include/grub/powerpc/ieee1275/time.h: Likewise.
13045         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
13046         * include/grub/sparc64/libgcc.h: Likewise.
13047         * include/grub/sparc64/setjmp.h: Likewise.
13048         * include/grub/sparc64/types.h: Likewise.
13049         * include/grub/sparc64/ieee1275/console.h: Likewise.
13050         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13051         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13052         * include/grub/sparc64/ieee1275/time.h: Likewise.
13053         * include/grub/util/biosdisk.h: Likewise.
13054         * include/grub/util/getroot.h: Likewise.
13055         * include/grub/util/lvm.h: Likewise.
13056         * include/grub/util/misc.h: Likewise.
13057         * include/grub/util/raid.h: Likewise.
13058         * include/grub/util/resolve.h: Likewise.
13059         * io/gzio.c: Likewise.
13060         * kern/device.c: Likewise.
13061         * kern/disk.c: Likewise.
13062         * kern/dl.c: Likewise.
13063         * kern/elf.c: Likewise.
13064         * kern/env.c: Likewise.
13065         * kern/err.c: Likewise.
13066         * kern/file.c: Likewise.
13067         * kern/fs.c: Likewise.
13068         * kern/loader.c: Likewise.
13069         * kern/main.c: Likewise.
13070         * kern/misc.c: Likewise.
13071         * kern/mm.c: Likewise.
13072         * kern/parser.c: Likewise.
13073         * kern/partition.c: Likewise.
13074         * kern/rescue.c: Likewise.
13075         * kern/term.c: Likewise.
13076         * kern/efi/efi.c: Likewise.
13077         * kern/efi/init.c: Likewise.
13078         * kern/efi/mm.c: Likewise.
13079         * kern/i386/dl.c: Likewise.
13080         * kern/i386/efi/init.c: Likewise.
13081         * kern/i386/efi/startup.S: Likewise.
13082         * kern/i386/pc/init.c: Likewise.
13083         * kern/i386/pc/lzo1x.S: Likewise.
13084         * kern/i386/pc/startup.S: Likewise.
13085         * kern/ieee1275/ieee1275.c: Likewise.
13086         * kern/powerpc/cache.S: Likewise.
13087         * kern/powerpc/dl.c: Likewise.
13088         * kern/powerpc/ieee1275/cmain.c: Likewise.
13089         * kern/powerpc/ieee1275/crt0.S: Likewise.
13090         * kern/powerpc/ieee1275/init.c: Likewise.
13091         * kern/powerpc/ieee1275/openfw.c: Likewise.
13092         * kern/sparc64/cache.S: Likewise.
13093         * kern/sparc64/dl.c: Likewise.
13094         * kern/sparc64/ieee1275/init.c: Likewise.
13095         * kern/sparc64/ieee1275/openfw.c: Likewise.
13096         * loader/efi/chainloader.c: Likewise.
13097         * loader/efi/chainloader_normal.c: Likewise.
13098         * loader/i386/efi/linux.c: Likewise.
13099         * loader/i386/efi/linux_normal.c: Likewise.
13100         * loader/i386/pc/chainloader.c: Likewise.
13101         * loader/i386/pc/chainloader_normal.c: Likewise.
13102         * loader/i386/pc/linux.c: Likewise.
13103         * loader/i386/pc/linux_normal.c: Likewise.
13104         * loader/i386/pc/multiboot.c: Likewise.
13105         * loader/i386/pc/multiboot_normal.c: Likewise.
13106         * loader/powerpc/ieee1275/linux.c: Likewise.
13107         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13108         * normal/arg.c: Likewise.
13109         * normal/cmdline.c: Likewise.
13110         * normal/command.c: Likewise.
13111         * normal/completion.c: Likewise.
13112         * normal/execute.c: Likewise.
13113         * normal/function.c: Likewise.
13114         * normal/lexer.c: Likewise.
13115         * normal/main.c: Likewise.
13116         * normal/menu.c: Likewise.
13117         * normal/menu_entry.c: Likewise.
13118         * normal/misc.c: Likewise.
13119         * normal/parser.y: Likewise.
13120         * normal/script.c: Likewise.
13121         * normal/i386/setjmp.S: Likewise.
13122         * normal/powerpc/setjmp.S: Likewise.
13123         * normal/sparc64/setjmp.S: Likewise.
13124         * partmap/acorn.c: Likewise.
13125         * partmap/amiga.c: Likewise.
13126         * partmap/apple.c: Likewise.
13127         * partmap/gpt.c: Likewise.
13128         * partmap/pc.c: Likewise.
13129         * partmap/sun.c: Likewise.
13130         * term/gfxterm.c: Likewise.
13131         * term/terminfo.c: Likewise.
13132         * term/efi/console.c: Likewise.
13133         * term/i386/pc/console.c: Likewise.
13134         * term/i386/pc/serial.c: Likewise.
13135         * term/i386/pc/vesafb.c: Likewise.
13136         * term/i386/pc/vga.c: Likewise.
13137         * term/ieee1275/ofconsole.c: Likewise.
13138         * util/biosdisk.c: Likewise.
13139         * util/console.c: Likewise.
13140         * util/genmoddep.c: Likewise.
13141         * util/getroot.c: Likewise.
13142         * util/grub-emu.c: Likewise.
13143         * util/grub-mkdevicemap.c: Likewise.
13144         * util/grub-probe.c: Likewise.
13145         * util/lvm.c: Likewise.
13146         * util/misc.c: Likewise.
13147         * util/raid.c: Likewise.
13148         * util/resolve.c: Likewise.
13149         * util/update-grub.in: Likewise.
13150         * util/update-grub_lib.in: Likewise.
13151         * util/grub.d/00_header.in: Likewise.
13152         * util/grub.d/10_hurd.in: Likewise.
13153         * util/grub.d/10_linux.in: Likewise.
13154         * util/i386/efi/grub-install.in: Likewise.
13155         * util/i386/efi/grub-mkimage.c: Likewise.
13156         * util/i386/pc/grub-install.in: Likewise.
13157         * util/i386/pc/grub-mkimage.c: Likewise.
13158         * util/i386/pc/grub-mkrescue.in: Likewise.
13159         * util/i386/pc/grub-setup.c: Likewise.
13160         * util/i386/pc/misc.c: Likewise.
13161         * util/powerpc/ieee1275/grub-install.in: Likewise.
13162         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
13163         * util/powerpc/ieee1275/misc.c: Likewise.
13164         * video/bitmap.c: Likewise.
13165         * video/video.c: Likewise.
13166         * video/i386/pc/vbe.c: Likewise.
13167         * video/i386/pc/vbeblit.c: Likewise.
13168         * video/i386/pc/vbefill.c: Likewise.
13169         * video/i386/pc/vbeutil.c: Likewise.
13170         * video/readers/tga.c: Likewise.
13172 2007-07-02  Robert Millan  <rmh@aybabtu.com>
13174         * conf/i386-efi.rmk: Replace obsolete reference to
13175         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
13176         with util/getroot.c.
13177         * conf/powerpc-ieee1275.rmk: Likewise.
13178         * conf/sparc64-ieee1275.rmk: Likewise.
13180         * util/grub-emu.c (main): Fix unchecked pointer handling.
13182 2007-07-02  Robert Millan  <rmh@aybabtu.com>
13184         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
13185         invocation to fail, in order to support partition-less media.
13187         * util/i386/pc/grub-install.in: Likewise.
13189         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
13190         which fs or partmap modules are needed (akin to its sister scripts).
13192         Also use grub-probe to get rid of unportable /proc/mounts check.
13194         Print the same informational message that the other scripts do, before
13195         exiting.
13197 2007-06-23  Robert Millan  <rmh@aybabtu.com>
13199         * util/update-grub_lib.in (font_path): New function.  Determine whether
13200         a font file can be found and, if so, echo the GRUB path to it.
13202         * util/update-grub.in: Handle multiple terminals depending on user
13203         input, platform availability and font file presence.  Propagate
13204         variables of our findings to /etc/grub.d/ children.
13206         * util/grub.d/00_header.in: Handle multiple terminals, based on
13207         environment setup by update-grub.
13209 2007-06-23  Robert Millan  <rmh@aybabtu.com>
13211         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
13213 2007-06-21  Robert Millan  <rmh@aybabtu.com>
13215         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
13216         indicate end of data section in kernel image.
13217         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
13218         GRUB_KERNEL_MACHINE_DATA_END.
13220         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
13221         space for it.
13222         * kern/i386/efi/startup.S: Likewise.
13224         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
13225         during image generation.  Implement --prefix option to override this
13226         patch.
13227         * util/i386/efi/grub-mkimage.c: Likewise.
13229         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
13230         code to make path relative to its root into a separate function.
13232         * util/i386/pc/grub-install.in: Use newly provided
13233         make_system_path_relative_to_its_root() to convert ${grubdir}, then
13234         pass the result to grub-install --prefix.
13236 2007-06-13  Robert Millan  <rmh@aybabtu.com>
13238         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
13239         DEFAULT_DEVICE_MAP.
13240         * util/grub-emu.c: Use above definitions from misc.h instead of
13241         defining them.
13242         * util/grub-mkdevicemap.c: Likewise.
13243         * util/i386/pc/grub-setup.c: Likewise.
13244         * util/grub-probe.c: Likewise.
13245         (probe): Abort with grub_util_error() when either
13246         grub_guess_root_device or grub_util_get_grub_dev fails.
13248 2007-06-12  Robert Millan  <rmh@aybabtu.com>
13250         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
13251         "pager" assignment.
13252         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
13253         "pcdata".
13254         * util/grub-probe.c (probe): Likewise for "drive_name".
13256 2007-06-11  Robert Millan  <rmh@aybabtu.com>
13258         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
13259         not just the cdrom one.
13261 2007-06-11  Robert Millan  <rmh@aybabtu.com>
13263         * util/i386/pc/grub-mkrescue.in: Add "set -e".
13264         Add --pkglibdir=DIR option to override pkglibdir.
13265         Mention --image-type=TYPE in help output.
13266         Fix --grub-mkimage (it was a no-op).
13267         Abort gracefully when no parameter is given.
13269 2007-06-11  Robert Millan  <rmh@aybabtu.com>
13271         * util/i386/pc/grub-mkrescue.in: New file.
13272         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
13273         * Makefile.in: Handle bin_SCRIPTS.
13275 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
13277         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
13278         list of video modes.
13280 2007-06-06  Robert Millan  <rmh@aybabtu.com>
13282         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
13283         file doesn't exist, or if it is in a filesystem grub can't read.
13285         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
13286         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
13287         header comment to fit in 80 columns when the variables are resolved.
13289         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
13290         could be identified by update-grub.  Remove redundant check for
13291         unifont.pff existence (since convert_system_path_to_grub_path now
13292         handles that).
13294 2007-06-04  Robert Millan  <rmh@aybabtu.com>
13296         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
13298         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
13300         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
13302 2007-06-04  Robert Millan  <rmh@aybabtu.com>
13304         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
13306         * include/grub/partition.h: Declare grub_apple_partition_map_init and
13307         grub_apple_partition_map_fini.
13309         * util/biosdisk.c
13310         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
13311         to access >2 TiB disks).
13313         Print disk->total_sectors with %llu instead of %lu, since this
13314         variable is always 64-bit (prevents wrong disk size from being displayed
13315         on either >2 TiB disk or big-endian CPU).
13317         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
13318         into a generic case that supports all (sane) partition maps.
13320         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
13321         breaks big-endian.
13323         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
13324         and grub_apple_partition_map_fini() after that.
13326 2007-06-01  Robert Millan  <rmh@aybabtu.com>
13328         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
13330         * util/grub.d/00_header.in: Only enable gfxterm when
13331         convert_system_path_to_grub_path() succeeds.
13333 2007-05-20  Robert Millan  <rmh@aybabtu.com>
13335         * util/update-grub_lib.in: New file.
13336         * DISTLIST: Add update-grub_lib.in.
13337         * conf/common.rmk: Generate update-grub_lib and install it in
13338         $(lib_DATA).
13339         * Makefile.in: Add install routine for $(lib_DATA).
13341         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
13342         function provided by update-grub_lib to support arbitrary paths of
13343         unifont.pff.
13344         * util/update-grub.in: Use convert_system_path_to_grub_path() to
13345         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
13347 2007-05-19  Robert Millan  <rmh@aybabtu.com>
13349         * commands/i386/cpuid.c: New module.
13350         * DISTLIST: Add it.
13351         * conf/i386-efi.rmk: Enable cpuid.mod.
13352         * conf/i386-pc.rmk: Likewise.
13354 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13356         * kern/disk.c (grub_disk_read): Check return value of
13357         grub_realloc().
13359 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13361         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
13362         arrays.
13363         * disk/raid.c (grub_raid_open): Likewise.
13365 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
13367         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
13368         stack instead of on the heap.
13370         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
13371         before doing a read on it.
13373         * configure.ac: Only use -fno-stack-protector for the target
13374         environment.
13376 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
13378         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
13379         __attribute_ ((unused)) to mode_type argument.
13381         * util/getroot.c (grub_guess_root_device): Fix #endif.
13383         * kern/misc.c (memcmp): Fix prototype.
13385         * include/grub/partition.h [GRUB_UTIL]
13386         (grub_gpt_partition_map_init): Add prototype.
13387         (grub_gpt_partition_map_fini): Likewise.
13389         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
13390         at the right place.
13392         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
13393         (grub_fat_read_data): Likewise.
13394         (grub_fat_find_dir): Likewise.
13396         * font/manager.c (find_glyph): Make table a const.
13397         (grub_font_get_glyph): Remove bitmap from if statement.
13399 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
13401         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
13402         code, first search for device in /dev/mapper, then in /dev.
13403         (grub_util_get_grub_dev): New function.
13404         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
13405         prototype.
13406         * util/grub-probe.c (probe): Remove check for RAID, call
13407         grub_util_get_grub_dev() instead of
13408         grub_util_biosdisk_get_grub_dev().
13409         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
13410         grub_util_biosdisk_get_grub_dev().
13411         * util/i386/pc/grub-setup.c (main): Likewise.
13413 2007-05-16  Robert Millan  <rmh@aybabtu.com>
13415         * DISTLIST: Update for the latest changes.
13416         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
13417         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
13418         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
13419         grub/util/biosdisk.h.
13420         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
13421         grub/util/biosdisk.h.
13423 2007-05-16  Robert Millan  <rmh@aybabtu.com>
13425         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
13427 2007-05-16  Robert Millan  <rmh@aybabtu.com>
13429         * util/i386/efi/grub-install.in: New.
13430         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
13431         newly added grub-install.
13432         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
13433         include.
13434         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
13435         grub/util/biosdisk.h.
13436         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
13437         grub/util/biosdisk.h.
13439 2007-05-16  Robert Millan  <rmh@aybabtu.com>
13441         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
13442         * include/grub/util/biosdisk.h: ... here.
13443         * util/i386/pc/biosdisk.c: Moved to ...
13444         * util/biosdisk.c: ... here.
13445         * util/i386/pc/getroot.c: Moved to ...
13446         * util/getroot.c: ... here.
13447         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
13448         * util/grub-mkdevicemap.c: ... here.
13449         * util/i386/pc/grub-probe.c: Moved to ...
13450         * util/grub-probe.c: ... here.
13452 2007-05-15  Robert Millan  <rmh@aybabtu.com>
13454         * util/update-grub.in: Remove duplicated line in grub.cfg header
13455         message.
13457 2007-05-13  Robert Millan  <rmh@aybabtu.com>
13459         * util/update-grub.in: Fix a few assumptions about the devices holding
13460         /, /boot and /boot/grub being the same.
13461         * util/grub.d/00_header.in: Likewise.
13462         * util/grub.d/10_hurd.in: Likewise.
13463         * util/grub.d/10_linux.in: Likewise.
13465         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
13466         patterns.  Use that to define the `.old' suffix as older than `'.
13468         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
13470         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
13471         the grub.cfg header message.
13473 2007-05-11  Robert Millan  <rmh@aybabtu.com>
13475         * util/update-grub.in: Create device.map if it doesn't already exist,
13476         before attempting to run grub-probe.
13477         Check for grub-probe and grub-mkdevicemap with the same code
13478         grub-install is using.
13479         Remove test mode.
13481 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13483         * Makefile.in: Add the datarootdir autoconf variable.
13485 2007-05-09  Robert Millan  <rmh@aybabtu.com>
13487         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
13488         fail gracefully if dev->disk->partition == NULL.
13490 2007-05-07  Robert Millan  <rmh@aybabtu.com>
13492         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
13493         determine partition map module.
13494         * util/i386/pc/grub-install.in: Use this feature to decide which
13495         partition module to load, instead of hardcoding pc and gpt.
13497 2007-05-07  Robert Millan  <rmh@aybabtu.com>
13499         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
13500         source directory differs from build directory.
13502 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13504         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
13505         initialisation.
13507 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13509         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
13511 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13513         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
13514         command-line arguments via ${GRUB_CMDLINE_LINUX}.
13516 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13518         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
13519         (grub_probe_SOURCES): Likewise.
13520         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
13521         GPT and initialize dos_part and bsd_part accordingly.
13522         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
13523         install_bsd_part.
13524         (main): Activate gpt module for use during partition identification,
13525         and deactivate it afterwards.
13526         * util/i386/pc/grub-install.in: Add gpt module to core.img.
13527         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
13528         partition identification, and deactivate it afterwards.
13530 2007-05-05  Robert Millan  <rmh@aybabtu.com>
13532         * term/i386/pc/console.c (grub_console_fini): Call
13533         grub_term_set_current() before grub_term_unregister().
13535 2007-05-04  Robert Millan  <rmh@aybabtu.com>
13537         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
13538         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
13539         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
13540         and update-grub_DATA.
13541         * conf/common.rmk: Build and install update-grub components.
13542         * conf/common.mk: Regenerate.
13543         * util/update-grub.in: New.  Core of update-grub.
13544         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
13545         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
13546         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
13547         * util/grub.d/README: New.  Document grub.d directory layout.
13549 2007-05-01  Robert Millan  <rmh@aybabtu.com>
13551         * util/grub-emu.c: Move initialization functions
13552         grub_util_biosdisk_init() and grub_init_all() before
13553         grub_util_biosdisk_get_grub_dev(), which relies on them.
13555 2007-04-19  Robert Millan  <rmh@aybabtu.com>
13557         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
13558         it is used later.
13560 2007-04-18  Jerone Young  <jerone@gmail.com>
13562         * kernel/elf.c: Add missing parenthesis for conditional statement
13563         stanza.
13565 2007-04-10  Jerone Young  <jerone@gmail.com>
13567         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
13568         continue on and look for device node with real device name.
13570 2007-04-10  Jerone Young  <jerone@gmail.com>
13572         * configure.ac: Add argument for autoconf to use transformation
13573         ability.
13574         * Makefile.in: Add autoconf package transformation code.
13575         * util/i386/pc/grub-install.in: Likewise.
13576         * util/powerpc/ieee1275/grub-install.in: Likewise.
13578 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
13580         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
13581         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
13582         (EXT2_REVISION): Likewise.
13583         (EXT2_INODE_SIZE): Likewise.
13584         (struct grub_ext2_block_group): Added a missing member
13585         "used_dirs".
13586         (grub_ext2_read_inode): Divide by the inode size in a superblock
13587         instead of 128 to obtain INODES_PER_BLOCK.
13588         Use the macro EXT2_INODE_SIZE instead of directly using
13589         SBLOCK->INODE_SIZE.
13591 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
13593         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
13594         superblock instead of the structure size to compute an
13595         offset. This fixes the problem that GRUB could not read a
13596         filesystem when inode size is different from 128-byte.
13598 2007-03-05  Marco Gerards  <marco@gnu.org>
13600         * normal/main.c (read_config_file): When "menu" is not set, create
13601         an initial context.
13603 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13605         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
13606         (HEAP_LIMIT): New macro.
13607         (grub_claim_heap): Claim memory up to `heaplimit'.
13609 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
13611         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
13612         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
13613         (_start): Likewise.
13614         (grub_arch_modules_addr): Return address after `_end'.
13615         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
13616         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
13617         (add_segments): Calculate `_end' from phdr size and location.
13618         (ALIGN_UP): Moved to ...
13619         * include/grub/misc.h: here.
13620         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13621         New macro.
13622         (GRUB_IEEE1275_MODULE_BASE): Removed.
13624 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13626         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
13627         loop boundary.
13629 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13631         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
13632         All users updated.
13633         (grub_elf64_load_hook_t): Likewise.
13634         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
13635         debug output.
13637 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
13639         * kern/mm.c: Update copyright.
13640         (grub_mm_debug): Correct syntax error.
13641         (grub_mm_dump_free): New function.
13642         (grub_debug_free): Call `grub_free'.
13643         * include/grub/mm.h: Update copyright.
13644         (grub_mm_dump_free): Add declaration.
13646 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13648         * include/grub/ieee1275/ieee1275.h: Update copyright.
13649         * kern/powerpc/ieee1275/init.c: Likewise.
13650         * kern/powerpc/ieee1275/openfw.c: Likewise.
13652         * loader/powerpc/ieee1275/linux.c: Likewise.
13653         * include/grub/elfload.h: Likewise.
13654         * kern/elf.c: Likewise.
13655         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
13656         callers.
13657         (grub_elf64_load): Likewise.
13658         (grub_elf32_load_segment): Move to a nested function.
13659         (grub_elf64_load_segment): Likewise.
13661 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13663         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
13664         prototype.
13665         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
13666         (grub_heap_len): Likewise.
13667         (HEAP_SIZE): New macro.
13668         (grub_claim_heap): New function.
13669         (grub_machine_init): Don't claim heap directly.  Call
13670         `grub_claim_heap'.
13671         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
13672         (grub_available_iterate): New function.
13674 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
13676         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
13677         * configure.ac: Use it for testing the HOST and TARGET compilers.
13679 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
13681         * Makefile.in (enable_grub_emu): New variable.
13682         * configure.ac (--enable-grub-emu): New option.
13683         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
13684         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
13685         * conf/i386-pc.rmk: Likewise.
13686         * conf/powerpc-ieee1275.rmk: Likewise.
13687         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
13689 2006-12-12  Marco Gerards  <marco@gnu.org>
13691         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
13693         * kern/env.c (grub_env_unset): Don't free the member `value' when
13694         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
13695         pointer.
13697         * normal/main.c (current_menu): Removed.
13698         (free_menu): Unset the `menu' environment variable.
13699         (grub_normal_menu_addentry): Make use of the environment variable
13700         `menu', instead of using the global `current_menu'.  Allocate
13701         memory for the sourcecode of this entry.
13702         (read_config_file): New argument `nested', changed all callers.
13703         Only in the case of a new context, initialize a new menu.  Set the
13704         `menu' environment variable.
13705         (grub_normal_execute): Don't set and unset the environment
13706         variable `menu' here anymore.  Only free the menu when leaving the
13707         context.
13709         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
13710         leak.
13712 2006-12-11  Marco Gerards  <marco@gnu.org>
13714         * normal/menu_entry.c (run): Fix off by one bug so the last line
13715         is executed.  Move the loader check to outside the loop.
13717 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
13719         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
13721 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
13723         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
13724         the number of sectors.  Reported by Andrey Shuvikov
13725         <mr_hyro@yahoo.com>.
13727 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
13729         * kern/disk.c (grub_disk_read): When there is a read error, always
13730         try to read only the necessary data.
13732         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
13733         disk/raid.c.
13734         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
13735         prototype.
13736         [GRUB_UTIL] (grub_raid_fini): Likewise.
13737         [GRUB_UTIL] (grub_lvm_init): Likewise.
13738         [GRUB_UTIL] (grub_lvm_fini): Likewise.
13739         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
13740         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
13741         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
13742         and grub_raid_fini().
13744 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
13746         * include/grub/types.h (__unused): Rename to UNUSED.
13747         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
13748         (grub_elf64_size): Likewise.
13750 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13752         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
13753         grub_error_push and grub_error_pop in the error-handling path.
13754         (grub_elf32_load_segment): Only call grub_file_read with non-zero
13755         length.
13757 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13759         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
13760         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13761         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13762         (kernel_elf_SOURCES): Likewise.
13763         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
13764         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
13765         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13766         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13767         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
13768         (elf_mod_SOURCES): New variable.
13769         (elf_mod_CFLAGS): Likewise.
13770         (elf_mod_LDFLAGS): Likewise.
13771         * include/grub/types.h (__unused): New macro.
13772         * include/grub/elfload.h: New file.
13773         * kern/elf.c: Likewise.
13774         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
13775         (ELF32_LOADMASK): New macro.
13776         (ELF64_LOADMASK): Likewise.
13777         (vmlinux): Removed.
13778         (grub_linux_load32): New function.
13779         (grub_linux_load64): Likewise.
13780         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
13781         Use grub_elf_t instead of grub_file_t.
13783 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13785         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
13786         `catch_result' to struct set_color_args.
13788 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13790         * normal/menu.c: Include grub/script.h.
13791         * normal/menu_entry.c: Likewise.
13792         * include/grub/normal.h: Do not include grub/script.h.
13794 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13796         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
13798 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13800         * kern/disk.c (grub_disk_open): Print debug messages when opening a
13801         disk.
13802         (grub_disk_close): Print debug messages when closing a disk.
13803         (grub_disk_read): Print debug messages when disk read fails.
13804         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
13805         filesystem type.
13806         * kern/partition.c: Include misc.h.
13807         (grub_partition_iterate): Print debug messages when detecting
13808         partition type.
13810 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
13812         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
13813         is negative.
13814         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
13816 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
13818         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13819         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
13821 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
13823         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
13824         instead of sizeof(lv). Patch by Michael Guntsche.
13826 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
13828         * disk/lvm.c: Rename VGS to VG_LIST.
13829         (grub_lvm_iterate): Change VGS->LV to VG-LV.
13830         (grub_lvm_open): Likewise.
13831         Thanks to Michael Guntsche for finding this bug.
13833 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13835         * configure.ac (AC_INIT): Bumped to 1.95.
13837 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13839         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
13840         with "/dev/.static/dev/md".
13842 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13844         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
13845         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
13846         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
13847         DRIVE_NAME are always freed.
13849         * util/i386/pc/biosdisk.c (make_device_name): Add one into
13850         DOS_PART, as a DOS partition is counted from one instead of zero
13851         now. Reported by Robert Millan.
13853 2006-10-14  Robert Millan  <rmh@aybabtu.com>
13855         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
13856         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
13857         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
13858         string returned by grub_guess_root_device.
13859         * util/i386/pc/grub-setup.c: Likewise.
13860         * util/i386/pc/grub-probefs.c: Likewise.
13862         * util/i386/pc/grub-probefs.c: Rename to ...
13863         * util/i386/pc/grub-probe.c: ... this.
13864         * DISTLIST: Remove grub-probefs, add grub-probe.
13865         * conf/i386-efi.rmk: Likewise.
13866         * conf/i386-pc.rmk: Likewise.
13867         * util/i386/pc/grub-install.in: Likewise.
13869         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
13870         choose which information we want to print.
13872 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
13874         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
13875         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
13876         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
13877         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
13878         video/readers/tga.c and video/i386/pc/vbeutil.c.
13880 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
13882         Added support for RAID and LVM.
13884         * disk/lvm.c: New file.
13885         * disk/raid.c: Likewise.
13886         * include/grub/lvm.h: Likewise.
13887         * include/grub/raid.h: Likewise.
13888         * include/grub/util/lvm.h: Likewise.
13889         * include/grub/util/raid.h: Likewise.
13890         * util/lvm.c: Likewise.
13891         * util/raid.c: Likewise.
13893         * include/grub/disk.h (grub_disk_dev_id): Add
13894         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
13895         (grub_disk_get_size): New prototype.
13896         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
13897         returns a partition.
13898         (grub_disk_get_size): New function.
13900         * kern/i386/pc/init.c (make_install_device): Copy the prefix
13901         verbatim if grub_install_dos_part is -2.
13903         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
13904         and LVM devices.
13906         * util/i386/pc/grub-setup.c (setup): New argument
13907         MUST_EMBED. Force embedding of GRUB when the argument is
13908         true. Close FILE before returning.
13909         (main): Add support for RAID and LVM.
13911         * conf/common.rmk: Add RAID and LVM modules.
13912         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
13913         util/lvm.c.
13914         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
13916         * kern/misc.c (grub_strstr): New function.
13917         * include/grub/misc.h (grub_strstr): New prototype.
13919 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
13921         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
13923 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
13925         * kern/misc.c (grub_strtoull): Guess the base only if not
13926         specified.
13928 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13930         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
13931         PowerMac support.
13933 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13935         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
13937         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
13938         Remove `flags' argument.  All callers changed.
13939         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
13940         (IEEE1275_IHANDLE_INVALID): New variable.
13941         (IEEE1275_CELL_INVALID): New variable.
13942         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
13943         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
13944         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
13945         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
13946         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
13947         codes from Open Firmware.  All callers updated.
13948         (grub_ieee1275_next_property): Directly return Open Firmware return
13949         code.
13950         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
13951         Standardize error checking from `grub_ieee1275_get_property'.
13952         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
13953         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
13955 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
13957         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
13958         `instance_to_package_args' to `instance_to_path_args'.
13960         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
13961         `grub_ieee1275_chosen'.
13963         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
13964         `grub_ieee1275_interpret'.
13966 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13968         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
13970 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
13972         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
13973         (__cmpdi): Likewise.
13975         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
13976         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
13977         `grub_ssize_t'.
13979         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
13981         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
13982         to type `grub_ssize_t'.
13983         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
13985 2006-09-22  Marco Gerards  <marco@gnu.org>
13987         * normal/script.c (grub_script_create_cmdmenu): Skip leading
13988         newlines.
13990 2006-09-22  Marco Gerards  <marco@gnu.org>
13992         * commands/echo.c: New file.
13994         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
13996         * conf/common.rmk (echo_mod_SOURCES): New variable.
13997         (echo_mod_CFLAGS): Likewise.
13998         (echo_mod_LDFLAGS): Likewise.
14000 2006-09-22  Marco Gerards  <marco@gnu.org>
14002         * normal/main.c (get_line): Malloc memory instead of using
14003         preallocated memory.  Removed the arguments `cmdline' and
14004         `max_len'.  Updated all callers.
14006 2006-09-22  Marco Gerards  <marco@gnu.org>
14008         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
14009         (normal_mod_DEPENDENCIES): Likewise.
14011         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
14012         (normal_mod_DEPENDENCIES): Likewise.
14014         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
14016 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
14018         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
14019         programs.
14020         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
14021         (normal_mod_DEPENDENCIES): Likewise.
14022         * conf/i386-pc.mk: Regenerate.
14023         * conf/i386-efi.mk: Likewise
14024         * conf/common.mk: Likewise.
14025         * conf/powerpc-ieee1275.mk: Likewise.
14026         * conf/sparc64-ieee1275.mk: Likewise.
14028 2006-09-22  Robert Millan  <rmh@aybabtu.com>
14030         Sync with i386 version.
14031         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
14032         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
14034 2006-09-21  Robert Millan  <rmh@aybabtu.com>
14036         Import from GRUB Legacy (lib/device.c):
14037         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
14038         (init_device_map) [__linux__]: Add support for I2O devices.
14040 2006-09-14  Marco Gerards  <marco@gnu.org>
14042         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
14043         `-melf_i386'.
14045 2006-09-14  Robert Millan  <rmh@aybabtu.com>
14047         * util/i386/pc/grub-install.in: Skip menu.lst when removing
14048         /boot/grub/*.lst.
14050         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
14052         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
14053         before adding it to device.map.
14055 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
14057         * genmk.rb: Let GCC generate dependencies the first time it
14058         compiles a file; using the -MD option.
14059         * conf/common.mk: Regenerate.
14060         * conf/i386-pc.mk: Likewise.
14061         * conf/i386-efi.mk: Likewise.
14062         * conf/powerpc-ieee1275.mk: Likewise.
14063         * conf/sparc64-ieee1275.mk: Likewise.
14065 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
14067         Move the prototypes of grub_setjmp and grub_longjmp to
14068         cpu/setjmp.h, so that each architecture may specify different
14069         attributes.
14071         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
14072         (grub_longjmp): Likewise.
14073         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
14074         (grub_longjmp): Likewise.
14075         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
14076         (grub_longjmp): Likewise.
14078         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
14079         [!GRUB_UTIL] (grub_longjmp): Removed.
14081 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
14083         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
14084         "color!" method does not return any value.
14086 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
14088         * include/grub/bitmap.h: New file.
14090         * include/grub/i386/pc/vbeutil.h: Likewise.
14092         * video/bitmap.c: Likewise.
14094         * video/readers/tga.c: Likewise.
14096         * video/i386/pc/vbeutil.c: Likewise.
14098         * commands/videotest.c: Code cleanup and updated to reflect to new
14099         video API.
14101         * term/gfxterm.c: Likewise.
14103         * video/video.c: Likewise.
14105         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
14106         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
14107         (bitmap_mod_SOURCES): New entry.
14108         (bitmap_mod_CFLAGS): Likewise.
14109         (bitmap_mod_LDFLAGS): Likewise.
14110         (tga_mod_SOURCES): Likewise.
14111         (tga_mod_CFLAGS): Likewise.
14112         (tga_mod_LDFLAGS): Likewise.
14114         * include/grub/video.h (grub_video_blit_operators): New enum type.
14115         (grub_video_render_target): Changed as forward declaration and moved
14116         actual definition to be video driver specific.
14117         (grub_video_adapter.blit_bitmap): Added blitting operator.
14118         (grub_video_adapter.blit_render_target): Likewise.
14119         (grub_video_blit_bitmap): Likewise.
14120         (grub_video_blit_render_target): Likewise.
14122         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
14123         driver specific render target definition.
14124         (grub_video_vbe_map_rgba): Added driver internal helper.
14125         (grub_video_vbe_unmap_color): Updated to use
14126         grub_video_i386_vbeblit_info.
14127         (grub_video_vbe_get_video_ptr): Likewise.
14129         * include/grub/i386/pc/vbeblit.h
14130         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
14131         grub_video_i386_vbeblit_info.
14132         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
14133         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
14134         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
14135         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
14136         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
14137         (grub_video_i386_vbeblit_index_index): Likewise.
14138         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
14139         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
14140         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
14141         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
14142         operator.
14143         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
14144         operator.
14146         * video/i386/pc/vbeblit.c: Updated to reflect changes on
14147         include/grub/i386/pc/vbeblit.h.
14149         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
14150         Updated to use grub_video_i386_vbeblit_info.
14151         (grub_video_i386_vbefill_R8G8B8): Likewise.
14152         (grub_video_i386_vbefill_index): Likewise.
14153         (grub_video_i386_vbefill): Added generic filler.
14155         * video/i386/pc/vbefill.c: Updated to reflect changes on
14156         include/grub/i386/pc/vbefill.h.
14158         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
14159         grub_video_i386_vbeblit_info.
14160         (grub_video_vbe_unmap_color): Likewise.
14161         (grub_video_vbe_blit_glyph): Likewise.
14162         (grub_video_vbe_scroll): Likewise.
14163         (grub_video_vbe_draw_pixel): Removed function.
14164         (grub_video_vbe_get_pixel): Likewise.
14165         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
14166         updated code to use it.
14167         (common_blitter): Added common blitter for render target and bitmap.
14168         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
14169         (grub_video_vbe_blit_render_target): Likewise.
14171 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
14173         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
14174         is in text mode if there is no console control protocol instance
14175         available.
14177 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
14179         * include/grub/video.h: Code cleanup.
14181         * include/grub/i386/pc/vbe.h: Likewise.
14183         * video/i386/pc/vbe.c: Likewise.
14185         * video/i386/pc/vbeblit.c: Likewise.
14187         * video/i386/pc/vbefill.c: Likewise.
14189         * video/video.c: Likewise.  Also added more comments.
14191 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
14193         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
14194         (struct grub_biosdisk_dap): Likewise.
14196         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
14197         linkage settings for all functions.
14199 2006-07-12  Marco Gerards  <marco@gnu.org>
14201         * configure.ac (--enable-mm-debug): Fix typo.
14203         * genkernsyms.sh.in: Use proper quoting for `CC'.
14205 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
14207         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
14208         (normal_mod_ASFLAGS): Remove "-m32".
14210 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
14212         * util/misc.c: Include config.h.
14213         [!HAVE_MEMALIGN]: Do not include malloc.h.
14214         (grub_memalign): Use posix_memalign, if present. Then, use
14215         memalign, if present. Otherwise, emit an error.
14217         * util/grub-emu.c: Do not include malloc.h.
14219         * include/grub/util/misc.h: Include unistd.h. This is required for
14220         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
14221         D. Eades III <hde@foobar-qux.org>.
14223         * configure.ac (AC_GNU_SOURCE): Added.
14224         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
14225         type.
14227 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
14229         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
14230         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
14232 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
14234         * include/grub/types.h (grub_host_addr_t): Rename to
14235         grub_target_addr_t.
14236         (grub_host_off_t): Rename to grub_target_off_t.
14237         (grub_host_size_t): Rename to grub_target_size_t.
14238         (grub_host_ssize_t): Rename to grub_target_ssize_t.
14239         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
14241         * include/grub/kernel.h (struct grub_module_header): Change type
14242         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
14243         (grub_module_info): Likewise.
14245 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
14247         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
14248         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
14249         Velazquez <jesus.velazquez@gmail.com>.
14251 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
14253         Count partitions from 1 instead of 0 in the string representation
14254         of partitions. Still use 0-based internally.
14256         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
14257         (sun_partition_map_iterate): Use grub_partition_t instead of
14258         struct grub_partition *. Cast DESC->START_CYLINDER to
14259         grub_uint64_t after converting the endian.
14260         (sun_partition_map_probe): Subtract 1 for PARTNUM.
14261         (sun_partition_map_get_name): Add 1 to P->INDEX.
14263         * partmap/pc.c (grub_partition_parse): Subtract 1 for
14264         PCDATA->DOS_PART.
14265         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
14267         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
14268         zero instead of one.
14269         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
14270         (gpt_partition_map_get_name): Add 1 into P->INDEX.
14272         * partmap/apple.c (apple_partition_map_iterate): Change the type
14273         of POS to unsigned.
14274         (apple_partition_map_probe): Subtract 1 for PARTNUM.
14275         (apple_partition_map_get_name): Add 1 into P->INDEX.
14277         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
14278         of POS to unsigned.
14279         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
14280         calculate the offset of a partition.
14281         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
14282         (amiga_partition_map_get_name): Add 1 into P->INDEX.
14284         * partmap/acorn.c (acorn_partition_map_find): Change the type of
14285         SECTOR to grub_disk_addr_t.
14286         (acorn_partition_map_iterate): Likewise.
14287         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
14288         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
14289         top.
14290         (acorn_partition_map_get_name): Add 1 into P->INDEX.
14292         * kern/i386/pc/init.c (make_install_device): Add 1 into
14293         GRUB_INSTALL_DOS_PART.
14295         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
14296         conditional.
14298 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
14300         Clean up the code to support 64-bit addressing in disks and
14301         files. This change is not enough for filesystems yet.
14303         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
14304         type of "start" to grub_uint64_t.
14305         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
14306         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
14307         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
14308         convert addresses.
14310         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
14311         to grub_disk_addr_t.
14313         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
14314         string.
14316         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14318         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
14319         to char *.
14321         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
14323         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
14325         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
14327         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
14328         to grub_off_t, to detect an error from grub_file_seek.
14329         (grub_multiboot_load_elf32): Likewise.
14331         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
14332         maximum unsigned long value when an overflow is detected.
14333         (grub_strtoull): New function.
14334         (grub_divmod64): Likewise.
14335         (grub_lltoa): use grub_divmod64.
14337         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
14338         grub_disk_addr_t.
14339         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
14340         the pointer to next character. Use grub_strtoull instead of
14341         grub_strtoul.
14342         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
14343         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
14344         respectively.
14346         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
14347         return value is signed.
14348         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
14349         test if OFFSET is less than zero, as OFFSET is unsigned now.
14351         * kern/disk.c (struct grub_disk_cache): Change the type of
14352         "sector" to grub_disk_addr_t.
14353         (grub_disk_cache_get_index): Change the type of SECTOR to
14354         grub_disk_addr_t. Calculate the hash with SECTOR casted to
14355         unsigned after shifting.
14356         (grub_disk_cache_invalidate): Change the type of SECTOR to
14357         grub_disk_addr_t.
14358         (grub_disk_cache_unlock): Likewise.
14359         (grub_disk_cache_store): Likewise.
14360         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
14361         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
14362         grub_disk_addr_t and grub_uint64_t, respectively.
14363         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
14364         body, as the value of OFFSET is tweaked by
14365         grub_disk_check_range. Change the types of START_SECTOR, LEN and
14366         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
14367         respectively.
14368         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
14369         body, as the value of OFFSET is tweaked by
14370         grub_disk_check_range. Change the types of LEN and N to
14371         grub_size_t.
14373         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
14374         and "saved_offset" to grub_off_t.
14375         (test_header): Cast BUF to char *.
14376         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
14377         to char *.
14378         (grub_gzio_read): Change the types of OFFSET and SIZE to
14379         grub_off_t and grub_size_t, respectively.
14381         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
14382         Removed.
14383         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
14384         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
14385         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
14386         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
14387         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
14389         * include/grub/types.h (grub_off_t): Unconditionally set to
14390         grub_uint64_t.
14391         (grub_disk_addr_t): Changed to grub_uint64_t.
14393         * include/grub/partition.h (struct grub_partition): Change the
14394         types of "start", "len" and "offset" to grub_disk_addr_t,
14395         grub_uint64_t and grub_disk_addr_t, respectively.
14396         (grub_partition_get_start): Return grub_disk_addr_t.
14397         (grub_partition_get_len): Return grub_uint64_t.
14399         * include/grub/misc.h (grub_strtoull): New prototype.
14400         (grub_divmod64): Likewise.
14402         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
14403         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
14404         grub_off_t, respectively.
14405         All callers and references changed.
14407         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
14408         grub_size_t in "read".
14409         All callers and references changed.
14411         * include/grub/file.h (struct grub_file): Change the types of
14412         "offset" and "size" to grub_off_t and grub_off_t,
14413         respectively. Change the type of SECTOR to grub_disk_addr_t in
14414         "read_hook".
14415         (grub_file_read): Change the type of LEN to grub_size_t.
14416         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
14417         grub_off_t.
14418         (grub_file_size): Return grub_off_t.
14419         (grub_file_tell): Likewise.
14420         All callers and references changed.
14422         * include/grub/disk.h (struct grub_disk_dev): Change the types of
14423         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
14424         "write".
14425         (struct grub_disk): Change the type of "total_sectors" to
14426         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
14427         "read_hook".
14428         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
14429         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
14430         (grub_disk_write): Likewise.
14431         All callers and references changed.
14433         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
14434         char * for grub_strncmp to silence gcc.
14435         (grub_iso9660_mount): Likewise.
14436         (grub_iso9660_mount): Likewise.
14437         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
14438         return statement.
14439         (grub_iso9660_iterate_dir): Likewise.
14440         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
14442         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
14443         LEN to grub_disk_addr_t and grub_size_t, respectively.
14445         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
14447         * fs/jfs.c (grub_jfs_read_file): Likewise.
14449         * fs/minix.c (grub_jfs_read_file): Likewise.
14451         * fs/sfs.c (grub_jfs_read_file): Likewise.
14453         * fs/ufs.c (grub_jfs_read_file): Likewise.
14455         * fs/xfs.c (grub_jfs_read_file): Likewise.
14457         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
14458         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
14459         respectively.
14461         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
14462         BLKNR to -1 instead of returning GRUB_ERRNO.
14463         (grub_ext2_read_file): Change the types of SECTOR and
14464         LEN to grub_disk_addr_t and grub_size_t, respectively.
14466         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
14467         LEN to grub_disk_addr_t and grub_size_t, respectively.
14469         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
14470         grub_file_read.
14472         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
14473         string. Do not cast SECTOR explicitly.
14475         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
14476         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
14477         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
14478         grub_disk_addr_t and grub_size_t, respectively. If the sector is
14479         over 2TB and LBA mode is not supported, raise an error.
14480         (get_safe_sectors): New function.
14481         (grub_biosdisk_read): Use get_safe_sectors.
14482         (grub_biosdisk_write): Likewise.
14484         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
14485         (grub_efidisk_write): Likewise.
14487         * disk/loopback.c (delete_loopback): Cosmetic changes.
14488         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
14489         correctly.
14490         (grub_loopback_open): Likewise.
14491         (grub_loopback_read): Likewise. Also, change the type of POS to
14492         grub_off_t, and fix the usage of grub_memset.
14494         * commands/i386/pc/play.c: Include grub/machine/time.h.
14496         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
14497         print FILE->SIZE.
14499         * commands/configfile.c: Include grub/env.h.
14501         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
14502         GRUB_ERRNO directly instead. Change the type of POS to
14503         grub_off_t. Follow the coding standard.
14505         * commands/blocklist.c: Include grub/partition.h.
14506         (grub_cmd_blocklist): Return an error if the underlying device is
14507         not a disk. Take the starting sector of a partition into account,
14508         if a partition is used.
14510         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
14511         a length field.
14512         (lba_mode): Support 64-bit addresses.
14513         (chs_mode): Likewise.
14514         (copy_buffer): Adapted to the new offsets of a length field and a
14515         segment field.
14516         (blocklist_default_start): Allocate 64-bit space.
14518         * boot/i386/pc/boot.S (force_lba): Removed.
14519         (boot_drive): Moved to under KERNEL_SECTOR.
14520         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
14521         space.
14522         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
14523         is useless.
14524         (lba_mode): Refactored to support a 64-bit address. More size
14525         optimization.
14526         (setup_sectors): Likewise.
14528 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
14530         * DISTLIST: Added include/grub/i386/linux.h. Removed
14531         include/grub/i386/pc/linux.h
14533         * configure.ac (AC_INIT): Bumped to 1.94.
14535         * config.guess: Updated from gnulib.
14536         * config.sub: Likewise.
14537         * install-sh: Likewise.
14538         * mkinstalldirs: Likewise.
14540 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14542         * conf/common.rmk (grub_modules_init.lst): Depended on
14543         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
14544         MODSRCFILES.
14546         * genmk.rb (PModule::rule): Reverted the previous change.
14548 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
14550         * conf/common.rmk (grub_modules_init.lst): Depends on
14551         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
14552         that the target does not exist before producing.
14553         (grub_modules_init.h): Remove the target before generating.
14554         (grub_emu_init.c): Likewise.
14556         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
14558 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
14560         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
14561         for the target-specific tests. Make sure that we also have the
14562         up-to-date target variables for those tests.
14564 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14566         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
14567         (PModule::rule): Likewise.
14569 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
14571         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
14572         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
14573         target-specific flags should be prefixed.
14574         (PModule::rule): Likewise.
14576 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
14578         * configure.ac (CMP): Check if cmp is available explicitly.
14580 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
14582         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
14583         (target_cpu): New variable.
14584         (pkglibdir): Use target_cpu instead of host_cpu.
14586         * util/i386/pc/grub-install.in (host_cpu): Removed.
14587         (target_cpu): New variable.
14588         (pkglibdir): Use target_cpu instead of host_cpu.
14590         * util/genmoddep.c: Removed.
14592         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
14593         instead of GRUB_HOST_SIZEOF_VOID_P.
14594         * kern/dl.c: Likewise.
14596         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
14597         ...
14598         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14599         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14600         (GRUB_TARGET_SIZEOF_LONG): ... this.
14601         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14602         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14603         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14604         to ...
14605         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14606         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14607         (GRUB_TARGET_SIZEOF_LONG): ... this.
14608         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14609         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14610         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14611         to ...
14612         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14613         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14614         (GRUB_TARGET_SIZEOF_LONG): ... this.
14615         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14616         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14618         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
14619         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
14620         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
14621         instead of GRUB_HOST_SIZEOF_LONG.
14622         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
14623         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
14624         GRUB_CPU_WORDS_BIGENDIAN.
14625         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
14626         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
14627         grub_host_ssize_t.
14629         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
14630         (genmoddep_SOURCES): Likewise.
14631         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
14632         (genmoddep_SOURCES): Likewise.
14633         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
14634         (genmoddep_SOURCES): Likewise.
14635         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
14636         Likewise.
14637         (genmoddep_SOURCES): Likewise.
14639         * genmoddep.awk: New file.
14641         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
14642         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
14643         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
14644         (PModule::rule): Likewise.
14645         (Program::rule): Likewise.
14646         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
14647         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
14648         respectively.
14650         * configure.ac: Rewritten intensively to use host and target
14651         instead of build and host, respectively.
14653         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
14654         (host_cpu): Removed.
14655         (target_cpu): New variable.
14656         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
14657         (BUILD_CC): Removed.
14658         (BUILD_CFLAGS): Likewise.
14659         (BUILD_CPPFLAGS): Likewise.
14660         (TARGET_CC): New variable.
14661         (TARGET_CFLAGS): Likewise.
14662         (TARGET_CPPFLAGS): Likewise.
14663         (TARGET_LDFLAGS): Likewise.
14664         (AWK): Likewise.
14665         (include): Use target_cpu instead of host_cpu.
14666         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
14668         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
14670 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
14672         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
14673         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
14674         field 'false' to 'exec_on_false'.
14675         (grub_script_create_cmdif): Renamed argument names to reflect above
14676         changes.
14678         * normal/execute.c (grub_script_execute_cmdif): Likewise.
14680         * normal/script.c (grub_script_create_cmdif): Likewise.
14682 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
14684         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
14685         top.
14686         (grub_hfsplus_btree_recptr): Likewise.
14687         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
14688         FILEBLOCK both to pass a block number and store next block
14689         number.
14690         (grub_hfsplus_read_block): Rewritten heavily to support an extent
14691         overflow file correctly. Specify errors appropriately, because
14692         fshelp expects that GRUB_ERRNO is set when fails. Reuse
14693         grub_hfsplus_btree_recptr to get the pointer to a found key.
14694         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
14695         is found.
14697         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
14698         linux.mod.
14699         (_linux_mod_SOURCES): New variable.
14700         (_linux_mod_CFLAGS): Likewise.
14701         (_linux_mod_LDFLAGS): Likewise.
14702         (linux_mod_SOURCES): Likewise.
14703         (linux_mod_CFLAGS): Likewise.
14704         (linux_mod_LDFLAGS): Likewise.
14706         * DISTLIST: Added loader/i386/efi/linux.c,
14707         loader/i386/efi/linux_normal.c and
14708         include/grub/i386/efi/loader.h.
14710         * loader/i386/efi/linux.c: New file.
14711         * loader/i386/efi/linux_normal.c: Likewise.
14712         * include/grub/i386/efi/loader.h: Likewise.
14714 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
14716         * commands/blocklist.c: New file.
14718         * DISTLIST: Added commands/blocklist.c.
14720         * term/efi/console.c (grub_console_highlight_color): Use a lighter
14721         color for the background, and a darker color for the foreground.
14722         (grub_console_checkkey): Return READ_KEY.
14723         (grub_console_cls): Set the background to
14724         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
14726         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
14728         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
14729         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
14731         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
14732         prototype.
14734         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
14735         BG. The spec is wrong again.
14737         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
14738         prototype.
14739         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
14741         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14742         commands/blocklist.c.
14743         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14745         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
14746         (blocklist_mod_SOURCES): New variable.
14747         (blocklist_mod_CFLAGS): Likewise.
14748         (blocklist_mod_LDFLAGS): Likewise.
14750 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
14752         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
14753         duplication.
14754         (lba_mode): Use %eax more intensively to reduce the code size.
14756 2006-05-20  Marco Gerards  <marco@gnu.org>
14758         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
14760         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
14761         for `menuentry'.
14762         (script): Accept leading newlines.
14763         (newlines): New rule to describe 0 or more newlines.
14764         (commands): Accept `command' with trailing newline.  Fixed the
14765         order in which arguments were passed to `grub_script_add_cmd'.
14766         Accept commands separated by newlines.
14767         (function): Changed to accept newlines.
14768         (menuentry) Rewritten.
14770         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
14771         front of the list, instead of to the end.
14773 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
14775         * util/i386/pc/grub-install.in (bindir): New variable.
14776         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
14777         Shaver <lbgwjl@gmail.com>.
14779 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
14781         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
14782         grub/machine/linux.h
14783         * loader/i386/pc/linux.c: Likewise.
14785         * include/grub/i386/pc/linux.h: Moved to ...
14786         * include/grub/i386/linux.h: ... here.
14788         * include/grub/i386/linux.h (struct linux_kernel_params): New
14789         struct.
14791 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
14793         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
14794         checking.
14795         (grub_video_vbe_blit_glyph): Likewise.
14796         (grub_video_vbe_blit_bitmap): Likewise.
14797         (grub_video_vbe_blit_render_target): Likewise.
14799 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
14801         * configure.ac (--with-platform): Properly quote the square
14802         brackets.
14804 2006-05-08  Marco Gerards  <marco@gnu.org>
14806         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
14807         this...
14808         (kernel_elf_HEADERS): ...to this.  Updated all users.
14809         (grubof_symlist.c): Renamed from this...
14810         (kernel_elf_symlist.c): ...to this.  Updated all users.
14811         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14812         (grubof_SOURCES): Renamed from this...
14813         (kernel_elf_SOURCES): ...to this.
14814         (grubof_HEADERS): Renamed from this...
14815         (kernel_elf_HEADERS): ...to this.
14816         (grubof_CFLAGS): Renamed from this...
14817         (kernel_elf_CFLAGS): ...to this.
14818         (grubof_ASFLAGS): Renamed from this...
14819         (kernel_elf_ASFLAGS): ...to this.
14820         (grubof_LDFLAGS): Renamed from this...
14821         (kernel_elf_LDFLAGS): ...to this.
14823         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
14824         this...
14825         (kernel_elf_HEADERS): ...to this.  Updated all users.
14826         (grubof_symlist.c): Renamed from this...
14827         (kernel_elf_symlist.c): ...to this.  Updated all users.
14828         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14829         (grubof_SOURCES): Renamed from this...
14830         (kernel_elf_SOURCES): ...to this.
14831         (grubof_HEADERS): Renamed from this...
14832         (kernel_elf_HEADERS): ...to this.
14833         (grubof_CFLAGS): Renamed from this...
14834         (kernel_elf_CFLAGS): ...to this.
14835         (grubof_ASFLAGS): Renamed from this...
14836         (kernel_elf_ASFLAGS): ...to this.
14837         (grubof_LDFLAGS): Renamed from this...
14838         (kernel_elf_LDFLAGS): ...to this.
14840         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
14841         `kernel.elf' instead of `grubof'.
14843 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
14845         Add --with-platform to configure. Use pkglibdir instead of
14846         pkgdatadir. This is reported by Roger Leigh.
14848         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
14849         (host_vendor): Likewise.
14850         (host_os): Likewise.
14851         (pkgdatadir): Likewise.
14852         (platform): New variable.
14853         (pkglibdir): Likewise.
14854         Use PKGLIBDIR instead of PKGDATADIR.
14856         * util/i386/pc/grub-install.in (datadir): Removed.
14857         (host_vendor): Likewise.
14858         (host_os): Likewise.
14859         (pkgdatadir): Likewise.
14860         (platform): New variable.
14861         (pkglibdir): Likewise.
14862         Use PKGLIBDIR instead of PKGDATADIR.
14864         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
14865         instead of GRUB_DATADIR.
14866         (main): Likewise.
14867         * util/i386/pc/grub-mkimage.c (usage): Likewise.
14868         (main): Likewise.
14869         * util/i386/efi/grub-mkimage.c (usage): Likewise.
14870         (main): Likewise.
14872         * configure.ac (--with-platform): New option.
14873         Use PLATFORM instead of HOST_VENDOR to specify a platform.
14875         * Makefile.in: Include a makefile based on PLATFORM instead of
14876         HOST_VENDOR.
14877         (pkgdatadir): Not appended by the machine type.
14878         (pkglibdir): Appended by the machine type.
14879         (host_vendor): Removed.
14880         (platform): New variable.
14881         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
14882         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
14883         (uninstall): Likewise.
14885 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
14887         Use the environment context in the menu. Remove the commands
14888         "default" and "timeout", and use variables instead.
14890         * normal/menu.c: Include grub/env.h.
14891         (print_entry): Cast TITLE to silence gcc.
14892         (get_timeout): New function.
14893         (set_timeout): Likewise.
14894         (get_entry_number): Likewise.
14895         (run_menu): Use a default entry, a fallback entry and a timeout
14896         in the environment variables "default", "fallback" and
14897         "timeout". Also, tweak the default entry if it is not within the
14898         current menu entries.
14899         (grub_menu_run): Use a fallback entry in the environment variable
14900         "fallback".
14902         * normal/main.c (read_config_file): Do not initialize
14903         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
14904         NEWMENU->TIMEOUT.
14905         (grub_normal_execute): Use a data slot to store the menu.
14907         * include/grub/normal.h (struct grub_menu): Removed default_entry,
14908         fallback_entry and timeout.
14909         (struct grub_menu_list): Removed.
14910         (grub_menu_list_t): Likewise.
14911         (struct grub_context): Likewise.
14912         (grub_context_t): Likewise.
14913         (grub_context_get): Likewise.
14914         (grub_context_get_current_menu): Likewise.
14915         (grub_context_push_menu): Likewise.
14916         (grub_context_pop_menu): Likewise.
14917         (grub_default_init): Likewise.
14918         (grub_default_fini): Likewise.
14919         (grub_timeout_init): Likewise.
14920         (grub_timeout_fini): Likewise.
14922         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
14923         and timeout.mod.
14924         (normal_mod_SOURCES): Removed normal/context.c.
14926         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
14927         commands/default.c, commands/timeout.c and normal/context.c.
14928         (normal_mod_SOURCES): Removed normal/context.c.
14930         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
14931         commands/timeout.c and normal/context.c.
14932         (normal_mod_SOURCES): Removed normal/context.c.
14934         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
14935         commands/default.c, commands/timeout.c and normal/context.c.
14936         (normal_mod_SOURCES): Removed normal/context.c.
14938         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
14939         timeout.mod.
14940         (default_mod_SOURCES): Removed.
14941         (default_mod_CFLAGS): Likewise.
14942         (default_mod_LDFLAGS): Likewise.
14943         (timeout_mod_SOURCES): Removed.
14944         (timeout_mod_CFLAGS): Likewise.
14945         (timeout_mod_LDFLAGS): Likewise.
14947         * DISTLIST: Removed commands/default.c, commands/timeout.c and
14948         normal/context.c.
14950         * commands/default.c: Removed.
14951         * commands/timeout.c: Likewise.
14952         * normal/context.c: Likewise.
14954 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
14956         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
14958 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
14960         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
14961         "next" to "prev" for readability.
14962         (struct grub_env_sorted_var): New struct.
14963         (grub_env_context): Renamed to ...
14964         (initial_context): ... this.
14965         (grub_env_var_context): Renamed to ...
14966         (current_context): ... this.
14967         (grub_env_find): Look only at CURRENT_CONTEXT.
14968         (grub_env_context_open): Rewritten to copy exported variables from
14969         previous context.
14970         (grub_env_context_close): Rewritten according to the new
14971         scheme. Also, add an assertion to prevent the initial context from
14972         removed.
14973         (grub_env_insert): Removed the code for the sorted list.
14974         (grub_env_remove): Likewise.
14975         (grub_env_export): Simply mark the variable with
14976         GRUB_ENV_VAR_GLOBAL.
14977         (grub_env_set): A cosmetic change for naming consistency.
14978         (grub_env_get): Likewise.
14979         (grub_env_unset): Likewise.
14980         (grub_env_iterate): Rewritten to sort variables within this
14981         function.
14982         (grub_register_variable_hook): Fixed for naming consistency. Call
14983         grub_env_find again, only if NAME is not found at the first time.
14984         (mangle_data_slot_name): New function.
14985         (grub_env_set_data_slot): Likewise.
14986         (grub_env_get_data_slot): Likewise.
14987         (grub_env_unset_data_slot): Likewise.
14989         * include/grub/env.h (grub_env_var_type): New enum.
14990         (GRUB_ENV_VAR_LOCAL): New constant.
14991         (GRUB_ENV_VAR_GLOBAL): Likewise.
14992         (GRUB_ENV_VAR_DATA): Likewise.
14993         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
14994         "type".
14995         (grub_env_set): Replace VAR with NAME for consistency.
14996         (grub_register_variable_hook): Likewise.
14997         (grub_env_export): Specify the name of the argument.
14998         (grub_env_set_data_slot): New prototype.
14999         (grub_env_get_data_slot): Likewise.
15000         (grub_env_unset_data_slot): Likewise.
15002 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
15004         Extend the loader so that GRUB can accept a loader which comes
15005         back to GRUB when a loaded image exits. Also, this change adds
15006         support for a chainloader on EFI.
15008         * term/efi/console.c: Include grub/misc.h.
15009         (grub_console_checkkey): Display a scan code on the top for
15010         debugging. This will be removed once the EFI port gets stable.
15011         Correct the scan code mapping.
15013         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
15014         allocate memory from larger regions, in order to reduce the number
15015         of allocated regions. Otherwise, the MacOSX loader panics.
15016         (filter_memory_map): Avoid less than 1MB for compatibility with
15017         other loaders.
15018         (add_memory_regions): Allocate from the tail of a region, if
15019         possible, to avoid allocating a region near to 1MB, for the MacOSX
15020         loader.
15022         * kern/efi/init.c (grub_efi_set_prefix): Specify
15023         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
15025         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
15026         argument IMAGE_HANDLE and specify it to get a loaded image.
15027         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
15028         grub_efi_get_loaded_image.
15029         (grub_efi_get_filename): Divide the length by the size of
15030         grub_efi_char16_t.
15031         (grub_efi_get_device_path): New function.
15032         (grub_efi_print_device_path): Print End Device Path nodes. Divide
15033         the length by the size of grub_efi_char16_t for a file path device
15034         path node.
15036         * kern/loader.c (grub_loader_noreturn): New variable.
15037         (grub_loader_set): Accept a new argument NORETURN. Set
15038         GRUB_LOADER_NORETURN to NORETURN.
15039         All callers changed.
15040         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
15041         grub_machine_fini.
15043         * include/grub/efi/efi.h (grub_efi_get_device_path): New
15044         prototype.
15045         (grub_efi_get_loaded_image): Take an argument to specify an image
15046         handle.
15048         * include/grub/loader.h (grub_loader_set): Added one more argument
15049         NORETURN.
15051         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
15052         instead of grub_efi_open_protocol.
15053         (grub_efidisk_get_device_name): Likewise.
15054         (grub_efidisk_close): Print a newline.
15055         (grub_efidisk_get_device_handle): Fixed to use
15056         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
15057         GRUB_EFI_DEVICE_PATH_TYPE.
15059         * disk/efi/efidisk.c (device_path_guid): Moved to ...
15060         * kern/efi/efi.c (device_path_guid): ... here.
15062         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
15063         chain.mod.
15064         (kernel_mod_HEADERS): Added efi/disk.h.
15065         (_chain_mod_SOURCES): New variable.
15066         (_chain_mod_CFLAGS): Likewise.
15067         (_chain_mod_LDFLAGS): Likewise.
15068         (chain_mod_SOURCES): Likewise.
15069         (chain_mod_CFLAGS): Likewise.
15070         (chain_mod_LDFLAGS): Likewise.
15072         * DISTLIST: Added include/grub/efi/chainloader.h,
15073         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
15075         * include/grub/efi/chainloader.h: New file.
15076         * loader/efi/chainloader.c: Likewise.
15077         * loader/efi/chainloader_normal.c: Likewise.
15079 2006-04-30  Marco Gerards  <marco@gnu.org>
15081         * commands/configfile.c (grub_cmd_source): New function.
15082         (GRUB_MOD_INIT): Register the commands `source' and `.'.
15083         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
15085 2006-04-30  Marco Gerards  <marco@gnu.org>
15087         * normal/execute.c (grub_script_execute_cmd): Change the return
15088         type to `grub_err_t'.  Correctly return the error.
15089         (grub_script_execute_cmdline): In case a command line is not a
15090         command or a function, try to interpret it as an assignment.
15092 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
15094         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
15095         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
15096         skip a node whose name is obviously invalid as UTF-16,
15097         i.e. contains a NUL character. Stop the iteration when the last
15098         directory entry is found. Instead of using the return value of
15099         grub_hfsplus_btree_iterate_node, store the value in RET and use
15100         it, because the iterator can be stopped by the last directory
15101         entry.
15103 2006-04-30  Marco Gerards  <marco@gnu.org>
15105         * include/grub/env.h (grub_env_export): New prototype.  Reported
15106         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
15108 2006-04-30  Marco Gerards  <marco@gnu.org>
15110         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
15111         size of the extents in a catalog file record.
15113 2006-04-29  Marco Gerards  <marco@gnu.org>
15115         * commands/configfile.c (grub_cmd_configfile): Execute the
15116         configfile within its own context.
15118         * include/grub/env.h (grub_env_context_open): New prototype.
15119         (grub_env_context_close): Likewise.
15121         * kern/env.c (grub_env): Removed.
15122         (grub_env_sorted): Likewise.
15123         (grub_env_context): New variable.
15124         (grub_env_var_context): Likewise.
15125         (grub_env_find): Search both the active context and the global
15126         context.
15127         (grub_env_context_open): New function.
15128         (grub_env_context_close): Likewise.
15129         (grub_env_insert): Likewise.
15130         (grub_env_remove): Likewise.
15131         (grub_env_export): Likewise.
15132         (grub_env_set): Changed to use helper functions to avoid code
15133         duplication.
15134         (grub_env_iterate): Rewritten so both the current context and the
15135         global context are being used.
15137         * normal/command.c (export_command): New function.
15138         (grub_command_init): Register the `export' function.
15140 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
15142         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
15143         explicitly to suppress gcc's warnings.
15144         * fs/fat.c (grub_fat_find_dir): Likewise.
15145         (grub_fat_label): Likewise.
15146         * fs/xfs.c (grub_xfs_read_inode): Likewise.
15147         (grub_xfs_mount): Likewise.
15148         (grub_xfs_label): Likewise.
15149         * fs/affs.c (grub_affs_mount): Likewise.
15150         (grub_affs_label): Likewise.
15151         (grub_affs_iterate_dir): Likewise.
15152         * fs/sfs.c (grub_sfs_mount): Likewise.
15153         (grub_sfs_iterate_dir): Likewise.
15154         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
15155         * fs/hfs.c (grub_hfs_mount): Likewise.
15156         (grub_hfs_cmp_catkeys): Likewise.
15157         (grub_hfs_find_dir): Likewise.
15158         (grub_hfs_dir): Likewise.
15159         (grub_hfs_label): Likewise.
15160         * fs/jfs.c (grub_jfs_mount): Likewise.
15161         (grub_jfs_opendir): Likewise.
15162         (grub_jfs_getent): Likewise.
15163         (grub_jfs_lookup_symlink): Likewise.
15164         (grub_jfs_label): Likewise.
15165         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
15166         (grub_hfsplus_iterate_dir): Likewise.
15167         (grub_hfsplus_btree_iterate_node): Made static.
15169         * util/grub-emu.c (prefix): New variable.
15170         (grub_machine_set_prefix): New function.
15171         (main): Do not set the environment variable "prefix" here. Only
15172         set PREFIX, which is used later by grub_machine_set_prefix.
15174         * include/grub/video.h: Do not include grub/symbol.h.
15175         (grub_video_register): Not exported. This symbol is not defined in
15176         the kernel.
15177         (grub_video_unregister): Likewise.
15178         (grub_video_iterate): Likewise.
15179         (grub_video_setup): Likewise.
15180         (grub_video_restore): Likewise.
15181         (grub_video_get_info): Likewise.
15182         (grub_video_get_blit_format): Likewise.
15183         (grub_video_set_palette): Likewise.
15184         (grub_video_get_palette): Likewise.
15185         (grub_video_set_viewport): Likewise.
15186         (grub_video_get_viewport): Likewise.
15187         (grub_video_map_color): Likewise.
15188         (grub_video_map_rgb): Likewise.
15189         (grub_video_map_rgba): Likewise.
15190         (grub_video_fill_rect): Likewise.
15191         (grub_video_blit_glyph): Likewise.
15192         (grub_video_blit_bitmap): Likewise.
15193         (grub_video_blit_render_target): Likewise.
15194         (grub_video_scroll): Likewise.
15195         (grub_video_swap_buffers): Likewise.
15196         (grub_video_create_render_target): Likewise.
15197         (grub_video_delete_render_target): Likewise.
15198         (grub_video_set_active_render_target): Likewise.
15200         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
15201         Undefined.
15202         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
15204         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
15205         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15206         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15207         instead of $(srcdir)/genkernsyms.sh.
15209         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
15210         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15211         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15212         instead of $(srcdir)/genkernsyms.sh.
15214         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
15215         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15216         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15217         instead of $(srcdir)/genkernsyms.sh.
15219         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
15220         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
15221         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
15222         instead of $(srcdir)/genkernsyms.sh.
15224         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
15225         genkernsyms.sh.
15227         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
15228         genkernsyms.sh.
15229         (gensymlist.sh): New target.
15230         (genkernsyms.sh): Likewise.
15232         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
15233         genkernsyms.sh.in and gensymlist.sh.in.
15235         * genkernsyms.sh: Removed.
15236         * gensymlist.sh: Likewise.
15238         * genkernsyms.sh.in: New file.
15239         * gensymlist.sh.in: Likewise.
15241 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
15243         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
15244         clobber "prefix", since we may have already set it manually.
15246 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
15248         * kern/misc.c (abort): New alias for grub_abort.
15250 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
15252         A new machine-specific function "grub_machine_set_prefix" is
15253         defined. This is called after loading modules, so that a prefix
15254         initialization can use modules. Also, this change adds an
15255         intensive debugging feature for the memory manager via the
15256         configure option "--enable-mm-debug".
15258         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
15259         PART.LEN.
15261         * kern/sparc64/ieee1275/init.c (abort): Removed.
15262         (grub_stop): Likewise.
15263         (grub_exit): New function.
15264         (grub_set_prefix): Renamed to ...
15265         (grub_machine_set_prefix): ... this.
15266         (grub_machine_init): Do not call grub_set_prefix.
15268         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
15269         (grub_machine_set_prefix): ... this.
15270         (grub_machine_init): Do not call grub_set_prefix.
15272         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
15273         (grub_machine_init): Do not set the prefix here.
15275         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
15277         * kern/efi/init.c: Include grub/mm.h.
15278         (grub_efi_set_prefix): New function.
15280         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
15281         (grub_efi_get_filename): New function.
15282         (grub_print_device_path): Renamed to ...
15283         (grub_efi_print_device_path): ... this.
15285         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
15286         [MM_DEBUG] (grub_realloc): Likewise.
15287         [MM_DEBUG] (grub_free): Likewise.
15288         [MM_DEBUG] (grub_memalign): Likewise.
15289         [MM_DEBUG] (grub_mm_debug): New variable.
15290         [MM_DEBUG] (grub_debug_malloc): New function.
15291         [MM_DEBUG] (grub_debug_free): New function.
15292         [MM_DEBUG] (grub_debug_realloc): New function.
15293         [MM_DEBUG] (grub_debug_memalign): New function.
15295         * kern/misc.c (grub_abort): Print a newline to distinguish
15296         the message.
15298         * kern/main.c (grub_main): Call grub_machine_set_prefix and
15299         grub_set_root_dev after loading modules. This is necessary when
15300         setting a prefix depends on modules.
15302         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
15303         (grub_efi_print_device_path): ... this.
15304         (grub_efi_get_filename): New prototype.
15305         (grub_efi_set_prefix): Likewise.
15307         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
15308         and grub/disk.h.
15309         (grub_efidisk_get_device_handle): New prototype.
15310         (grub_efidisk_get_device_name): Likewise.
15312         * include/grub/mm.h: Include config.h.
15313         (MM_DEBUG): Removed.
15314         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
15315         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
15316         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
15317         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
15318         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
15319         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
15320         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
15321         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
15322         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
15324         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
15326         * disk/efi/efidisk.c: Include grub/partition.h.
15327         (iterate_child_devices): New function.
15328         (add_device): First, compare only last device path nodes, so that
15329         devices are sorted by the types.
15330         (grub_efidisk_get_device_handle): New function.
15331         (grub_efidisk_get_device_name): Likewise.
15333         * configure.ac (--enable-mm-debug): New option to enable the
15334         memory manager debugging feature. This makes the binary much
15335         bigger, so is disabled by default.
15337 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
15339         Use grub_abort instead of grub_stop, and grub_exit must be
15340         define in each architecture now. Also, this change adds support
15341         for EFI disks.
15343         * util/i386/pc/grub-probefs.c: Include grub/term.h.
15344         (grub_getkey): New function.
15345         (grub_term_get_current): Likewise.
15347         * util/i386/pc/grub-setup.c: Include grub/term.h.
15348         (grub_getkey): New function.
15349         (grub_term_get_current): Likewise.
15351         * util/misc.c (grub_stop): Renamed to ...
15352         (grub_exit): ... this.
15354         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
15355         (grub_exit): ... this.
15356         (grub_machine_init): Use grub_abort instead of abort.
15357         (grub_stop): Removed.
15359         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
15360         abort.
15362         * kern/i386/pc/startup.S (grub_exit): New function.
15363         (cold_reboot): New label.
15365         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
15366         (grub_efi_init): Call grub_efidisk_init.
15367         (grub_efi_fini): Call grub_efidisk_fini.
15369         * kern/efi/efi.c: Include grub/mm.h.
15370         (grub_efi_console_control_guid): Renamed to ...
15371         (console_control_guid): ... this.
15372         (grub_efi_loaded_image_guid): Renamed to ...
15373         (loaded_image_guid): ... this.
15374         (grub_efi_locate_handle): New function.
15375         (grub_efi_open_protocol): Likewise.
15376         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
15377         GRUB_EFI_CONSOLE_CONTROL_GUID.
15378         (grub_efi_exit): Removed.
15379         (grub_stop): Likewise.
15380         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
15381         (grub_exit): New function.
15382         (grub_print_device_path): Likewise.
15384         * kern/rescue.c (grub_rescue_cmd_exit): New function.
15385         (grub_enter_rescue_mode): Register "exit".
15387         * kern/misc.c (grub_real_dprintf): A cosmetic change.
15388         (grub_abort): New function.
15390         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
15392         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
15394         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
15396         * include/grub/efi/efi.h (grub_efi_exit): Removed.
15397         (grub_print_device_path): New prototype.
15398         (grub_efi_locate_handle): Likewise.
15399         (grub_efi_open_protocol): Likewise.
15401         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
15402         * disk/efi/efidisk.c: Likewise.
15404         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
15406         * include/grub/efi/console_control.h
15407         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
15409         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
15410         last 8 bytes as an array.
15411         (GRUB_EFI_DISK_IO_GUID): New macro.
15412         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
15413         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
15414         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
15415         grub_uint8_t.
15416         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
15417         (struct grub_efi_device_path): Rename the member "sub_type" to
15418         "subtype".
15419         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
15420         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
15421         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
15422         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
15423         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
15424         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
15425         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
15426         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
15427         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
15428         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
15429         (struct grub_efi_pci_device_path): New structure.
15430         (grub_efi_pci_device_path_t): New type.
15431         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
15432         (struct grub_efi_pccard_device_path): New structure.
15433         (grub_efi_pccard_device_path_t): New type.
15434         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
15435         (struct grub_efi_memory_mapped_device_path): New structure.
15436         (grub_efi_memory_mapped_device_path_t): New type.
15437         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
15438         (struct grub_efi_vendor_device_path): New structure.
15439         (grub_efi_vendor_device_path_t): New type.
15440         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
15441         (struct grub_efi_controller_device_path): New structure.
15442         (grub_efi_controller_device_path_t): New type.
15443         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
15444         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
15445         (struct grub_efi_acpi_device_path): New structure.
15446         (grub_efi_acpi_device_path_t): New type.
15447         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
15448         (struct grub_efi_expanded_acpi_device_path): New structure.
15449         (grub_efi_expanded_acpi_device_path_t): New type.
15450         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
15451         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
15452         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
15453         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
15454         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
15455         (struct grub_efi_atapi_device_path): New structure.
15456         (grub_efi_atapi_device_path_t): New type.
15457         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
15458         (struct grub_efi_fibre_channel_device_path): New structure.
15459         (grub_efi_fibre_channel_device_path_t): New type.
15460         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
15461         (struct grub_efi_1394_device_path): New structure.
15462         (grub_efi_1394_device_path_t): New type.
15463         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
15464         (struct grub_efi_usb_device_path): New structure.
15465         (grub_efi_usb_device_path_t): New type.
15466         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
15467         (struct grub_efi_usb_class_device_path): New structure.
15468         (grub_efi_usb_class_device_path_t): New type.
15469         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
15470         (struct grub_efi_i2o_device_path): New structure.
15471         (grub_efi_i2o_device_path_t): New type.
15472         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
15473         (struct grub_efi_mac_address_device_path): New structure.
15474         (grub_efi_mac_address_device_path_t): New type.
15475         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
15476         (struct grub_efi_ipv4_device_path): New structure.
15477         (grub_efi_ipv4_device_path_t): New type.
15478         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
15479         (struct grub_efi_ipv6_device_path): New structure.
15480         (grub_efi_ipv6_device_path_t): New type.
15481         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
15482         (struct grub_efi_infiniband_device_path): New structure.
15483         (grub_efi_infiniband_device_path_t): New type.
15484         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
15485         (struct grub_efi_uart_device_path): New structure.
15486         (grub_efi_uart_device_path_t): New type.
15487         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
15488         (struct grub_efi_vendor_messaging_device_path): New structure.
15489         (grub_efi_vendor_messaging_device_path_t): New type.
15490         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
15491         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
15492         (struct grub_efi_hard_drive_device_path): New structure.
15493         (grub_efi_hard_drive_device_path_t): New type.
15494         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
15495         (struct grub_efi_cdrom_device_path): New structure.
15496         (grub_efi_cdrom_device_path_t): New type.
15497         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
15498         (struct grub_efi_vendor_media_device_path): New structure.
15499         (grub_efi_vendor_media_device_path_t): New type.
15500         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
15501         (struct grub_efi_file_path_device_path): New structure.
15502         (grub_efi_file_path_device_path_t): New type.
15503         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
15504         (struct grub_efi_protocol_device_path): New structure.
15505         (grub_efi_protocol_device_path_t): New type.
15506         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
15507         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
15508         (struct grub_efi_bios_device_path): New structure.
15509         (grub_efi_bios_device_path_t): New type.
15510         (struct grub_efi_disk_io): New structure.
15511         (grub_efi_disk_io_t): New type.
15512         (struct grub_efi_block_io_media): New structure.
15513         (grub_efi_block_io_media_t): New type.
15514         (struct grub_efi_block_io): New structure.
15515         (grub_efi_block_io_t): New type.
15517         * include/grub/misc.h (grub_stop): Removed.
15518         (grub_exit): New prototype.
15519         (grub_abort): Likewise.
15521         * include/grub/disk.h (enum grub_disk_dev_id): Added
15522         GRUB_DISK_DEVICE_EFIDISK_ID.
15524         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
15525         disk/efi/efidisk.c.
15526         (kernel_syms.lst): Remove the target if an error occurs.
15528 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
15530         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
15531         as it was simply too buggy.
15533 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
15535         * kern/misc.c (grub_lltoa): New function.
15536         (grub_vsprintf): Added support for the long long suffix,
15537         i.e. "ll".
15539 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
15541         * Makefile.in (LDFLAGS): Add variable.
15542         (LD): Remove variable.
15543         * configure.ac: Add -m32 to LDFLAGS.
15544         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
15545         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
15546         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
15547         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
15548         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
15549         variables.
15550         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
15551         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
15552         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
15554 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
15556         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
15557         length for unknown glyph.
15559 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15561         Add support for pre-loaded modules into the EFI port.
15563         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
15564         completely. Accept one more argument DIR. The caller has changed.
15566         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
15568         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
15569         (grub_efi_loaded_image_guid): New variable.
15570         (grub_efi_get_loaded_image): New function.
15571         (grub_arch_modules_addr): Likewise.
15573         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
15574         prototype.
15576         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
15577         (struct grub_efi_loaded_image): New structure.
15578         (grub_efi_loaded_image_t): New type.
15580 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
15582         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
15583         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
15584         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
15586 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
15588         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
15590 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
15592         * DISTLIST: Added include/grub/efi/console.h,
15593         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
15594         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15596         * include/grub/efi/console.h: New file.
15597         * include/grub/efi/time.h: Likewise.
15598         * include/grub/i386/efi/kernel.h: Likewise.
15599         * kern/efi/init.c: Likewise.
15600         * kern/efi/mm.c: Likewise.
15601         * term/efi/console.c: Likewise.
15603         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
15604         (grub_stop): Removed.
15605         (grub_get_rtc): Likewise.
15606         (grub_machine_init): Simply call grub_efi_init.
15607         (grub_machine_fini): Call grub_efi_fini.
15609         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
15610         (grub_efi_output_string): Removed.
15611         (grub_efi_stall): New function.
15612         (grub_stop): Likewise.
15613         (grub_get_rtc): Likewise.
15615         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
15616         (grub_efi_stall): New prototype.
15617         (grub_efi_allocate_pages): Likewise.
15618         (grub_efi_free_pages): Likewise.
15619         (grub_efi_get_memory_map): Likewise.
15620         (grub_efi_mm_init): Likewise.
15621         (grub_efi_mm_fini): Likewise.
15622         (grub_efi_init): Likewise.
15623         (grub_efi_fini): Likewise.
15625         * include/grub/i386/efi/time.h: Do not include
15626         grub/symbol.h. Include grub/efi/time.h.
15627         (GRUB_TICKS_PER_SECOND): Removed.
15628         (grub_get_rtc): Likewise.
15630         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
15631         Added padding. The EFI spec is buggy.
15632         (GRUB_EFI_BLACK): New macro.
15633         (GRUB_EFI_BLUE): Likewise.
15634         (GRUB_EFI_GREEN): Likewise.
15635         (GRUB_EFI_CYAN): Likewise.
15636         (GRUB_EFI_RED): Likewise.
15637         (GRUB_EFI_MAGENTA): Likewise.
15638         (GRUB_EFI_BROWN): Likewise.
15639         (GRUB_EFI_LIGHTGRAY): Likewise.
15640         (GRUB_EFI_BRIGHT): Likewise.
15641         (GRUB_EFI_DARKGRAY): Likewise.
15642         (GRUB_EFI_LIGHTBLUE): Likewise.
15643         (GRUB_EFI_LIGHTGREEN): Likewise.
15644         (GRUB_EFI_LIGHTCYAN): Likewise.
15645         (GRUB_EFI_LIGHTRED): Likewise.
15646         (GRUB_EFI_LIGHTMAGENTA): Likewise.
15647         (GRUB_EFI_YELLOW): Likewise.
15648         (GRUB_EFI_WHITE): Likewise.
15649         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
15650         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
15651         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
15652         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
15653         (GRUB_EFI_BACKGROUND_RED): Likewise.
15654         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
15655         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
15656         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
15657         (GRUB_EFI_TEXT_ATTR): Likewise.
15659         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
15660         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15661         (kernel_mod_HEADERS): Added efi/time.h.
15663 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
15665         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
15666         include/grub/efi/api.h, include/grub/efi/console_control.h,
15667         include/grub/efi/efi.h, include/grub/efi/pe32.h,
15668         include/grub/i386/efi/time.h, kern/efi/efi.c,
15669         kern/i386/efi/init.c, kern/i386/efi/startup.S,
15670         and util/i386/efi/grub-mkimage.c.
15672         * Makefile.in (RMKFILES): Added i386-efi.rmk.
15674         * genmk.rb (PModule#rule): Do not export symbols if
15675         #{prefix}_EXPORTS is set to "no".
15677         * conf/i386-efi.mk: New file.
15678         * conf/i386-efi.rmk: Likewise.
15679         * include/grub/efi/api.h: Likewise.
15680         * include/grub/efi/console_control.h: Likewise.
15681         * include/grub/efi/efi.h: Likewise.
15682         * include/grub/efi/pe32.h: Likewise.
15683         * include/grub/i386/efi/time.h: Likewise.
15684         * kern/efi/efi.c: Likewise.
15685         * kern/i386/efi/init.c: Likewise.
15686         * kern/i386/efi/startup.S: Likewise.
15687         * util/i386/efi/grub-mkimage.c: Likewise.
15689 2006-04-17  Marco Gerards  <marco@gnu.org>
15691         * include/grub/script.h: Include <grub/parser.h> and
15692         "grub_script.tab.h".
15693         (struct grub_lexer_param): New struct.
15694         (struct grub_parser_param): Likewise.
15695         (grub_script_create_arglist): Pass the state in an argument.
15696         (grub_script_add_arglist): Likewise.
15697         (grub_script_create_cmdline): Likewise.
15698         (grub_script_create_cmdblock): Likewise.
15699         (grub_script_create_cmdif): Likewise.
15700         (grub_script_create_cmdmenu): Likewise.
15701         (grub_script_add_cmd): Likewise.
15702         (grub_script_arg_add): Likewise.
15703         (grub_script_lexer_ref): Likewise.
15704         (grub_script_lexer_deref): Likewise.
15705         (grub_script_lexer_record_start): Likewise.
15706         (grub_script_lexer_record_stop): Likewise.
15707         (grub_script_mem_record): Likewise.
15708         (grub_script_mem_record_stop): Likewise.
15709         (grub_script_malloc): Likewise.
15710         (grub_script_yylex): Likewise.
15711         (grub_script_yyparse): Likewise.
15712         (grub_script_yyerror): Likewise.
15713         (grub_script_yylex): Likewise.
15714         (grub_script_lexer_init): Return the state.
15716         * normal/lexer.c (grub_script_lexer_state): Removed variable.
15717         (grub_script_lexer_done): Likewise.
15718         (grub_script_lexer_getline): Likewise.
15719         (grub_script_lexer_refs): Likewise.
15720         (script): Likewise.
15721         (newscript): Likewise.
15722         (record): Likewise.
15723         (recording): Likewise.
15724         (recordpos): Likewise.
15725         (recordlen): Likewise.
15726         (grub_script_lexer_init): Return the state instead of setting
15727         global variables.
15728         (grub_script_lexer_ref): Use the newly added argument for state
15729         instead of globals.
15730         (grub_script_lexer_deref): Likewise.
15731         (grub_script_lexer_record_start): Likewise.
15732         (grub_script_lexer_record_stop): Likewise.
15733         (recordchar): Likewise.
15734         (nextchar): Likewise.
15735         (grub_script_yylex2): Likewise.
15736         (grub_script_yylex): Likewise.
15737         (grub_script_yyerror): Likewise.
15739         * normal/parser.y (func_mem): Removed variable.
15740         (menu_entry): Likewise.
15741         (err): Likewise.
15742         (%lex-param): New parser option.
15743         (%parse-param): Likewise.
15744         (script): Always return the AST.
15745         (argument): Pass the state around.
15746         (arguments): Likewise.
15747         (grubcmd): Likewise.
15748         (commands): Likewise.
15749         (function): Likewise.
15750         (menuentry): Likewise.
15751         (if_statement): Likewise.
15752         (if): Likewise.
15754         * normal/script.c (grub_script_memused): Removed variable.
15755         (grub_script_parsed): Likewise.
15756         (grub_script_malloc): Added a state argument.  Use that instead of
15757         global variables.
15758         (grub_script_mem_record): Likewise.
15759         (grub_script_mem_record_stop): Likewise.
15760         (grub_script_arg_add): Likewise.
15761         (grub_script_add_arglist): Likewise.
15762         (grub_script_create_cmdline): Likewise.
15763         (grub_script_create_cmdif): Likewise.
15764         (grub_script_create_cmdmenu): Likewise.
15765         (grub_script_add_cmd): Likewise.
15766         (grub_script_parse): Setup the state before calling the parser.
15768 2006-04-16  Marco Gerards  <marco@gnu.org>
15770         * normal/command.c (grub_command_init): Remove the title command.
15772         * normal/lexer.c (grub_script_yylex): Renamed from this...
15773         (grub_script_yylex2): ... to this.
15774         (grub_script_yylex): New function.  Temporary
15775         introduced to filter some tokens.
15776         (grub_script_yyerror): Print a newline.
15778         * normal/main.c (read_config_file): Output information about the
15779         lines that contain errors.  Wait for a key after all lines have
15780         been processed.  Don't return an empty menu.
15782         * normal/parser.y (func_mem): Don't initialize.
15783         (menu_entry): Likewise.
15784         (err): New variable.
15785         (script): Don't return anything when an error was encountered.
15786         (ws, returns): Removed rules.
15787         (argument): Disabled concatenated variable support.
15788         (arguments): Remove explicit separators.
15789         (grubcmd): Likewise.
15790         (function): Likewise.
15791         (menuentry): Likewise.
15792         (if): Likewise.
15793         (commands): Likewise.  Add error handling.
15795         * normal/script.c (grub_script_create_cmdline): If
15796         `grub_script_parsed' is 0, assume the parser encountered an error.
15798 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
15800         * configure.ac: Add support for EFI. Fix the typo
15801         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
15803 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15805         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
15806         foreign multibyte characters should be shown correctly.
15808 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
15810         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
15811         calculation.
15812         (read_config_file): Made it to close file before returning.
15814 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
15816         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
15817         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
15818         video/i386/pc/vbefill.c.
15820         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
15821         video/i386/pc/vbefill.c.
15823         * include/grub/video.h (grub_video_blit_format): New enum.
15824         (grub_video_mode_info): Added new member blit_format.
15825         (grub_video_get_blit_format): New function prototype.
15827         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
15828         function prototype.
15829         (grub_video_vbe_map_rgb): Likewise.
15830         (grub_video_vbe_unmap_color): Likewise.
15832         * include/grub/i386/pc/vbeblit.h: New file.
15834         * include/grub/i386/pc/vbefill.h: New file.
15836         * video/video.c (grub_video_get_blit_format): New function.
15837         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
15838         (grub_video_vbe_map_rgb): Likewise.
15839         (grub_video_vbe_unmap_color): Likewise.
15841         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
15842         optimized fills.
15843         (grub_video_vbe_blit_render_target): Changed to use more optimized
15844         blits.
15845         (grub_video_vbe_setup): Added detection for optimized settings.
15846         (grub_video_vbe_create_render_target): Likewise.
15848         * video/i386/pc/vbeblit.c: New file.
15850         * video/i386/pc/vbefill.c: New file.
15852 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
15854         * font/manager.c (grub_font_get_glyph): Removed font fixup from
15855         here...
15857         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
15858         parsing to support both hex and dec ranges.  If filename was missing
15859         show usage information.
15861 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
15863         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
15864         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
15866         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
15867         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
15868         (video_mod_SOURCES): Added.
15869         (video_mod_CFLAGS): Likewise.
15870         (video_mod_LDFLAGS): Likewise.
15871         (gfxterm_mod_SOURCES): Likewise.
15872         (gfxterm_mod_CFLAGS): Likewise.
15873         (gfxterm_mod_LDFLAGS): Likewise.
15874         (videotest_mod_SOURCES): Likewise.
15875         (videotest_mod_CFLAGS): Likewise.
15876         (videotest_mod_LDFLAGS): Likewise.
15877         (vesafb_mod_SOURCES): Removed.
15878         (vesafb_mod_CFLAGS): Likewise.
15879         (vesafb_mod_LDFLAGS): Likewise.
15880         (vga_mod_SOURCES): Likewise.
15881         (vga_mod_CFLAGS): Likewise.
15882         (vga_mod_LDFLAGS): Likewise.
15884         * commands/videotest.c: New file.
15886         * font/manager.c (fill_with_default_glyph): Modified to use
15887         grub_font_glyph.
15888         (grub_font_get_glyph): Likewise.
15889         (fontmanager): Renamed from this...
15890         (font_manager): ... to this.
15892         * include/grub/font.h (grub_font_glyph): Added new structure.
15893         (grub_font_get_glyph): Modified to use grub_font_glyph.
15895         * include/grub/misc.h (grub_abs): Added as inline function.
15897         * include/grub/video.h: New file.
15899         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
15900         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
15901         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
15902         (grub_vbe_get_controller_info): Renamed from this...
15903         (grub_vbe_bios_get_controller_info): ... to this.
15904         (grub_vbe_get_mode_info): Renamed from this...
15905         (grub_vbe_bios_get_mode_info): ... to this.
15906         (grub_vbe_set_mode): Renamed from this...
15907         (grub_vbe_bios_set_mode): ... to this.
15908         (grub_vbe_get_mode): Renamed from this...
15909         (grub_vbe_bios_get_mode): ... to this.
15910         (grub_vbe_set_memory_window): Renamed from this...
15911         (grub_vbe_bios_set_memory_window): ... to this.
15912         (grub_vbe_get_memory_window): Renamed from this...
15913         (grub_vbe_bios_get_memory_window): ... to this.
15914         (grub_vbe_set_scanline_length): Renamed from this...
15915         (grub_vbe_set_scanline_length): ... to this.
15916         (grub_vbe_get_scanline_length): Renamed from this...
15917         (grub_vbe_bios_get_scanline_length): ... to this.
15918         (grub_vbe_set_display_start): Renamed from this...
15919         (grub_vbe_bios_set_display_start): ... to this.
15920         (grub_vbe_get_display_start): Renamed from this...
15921         (grub_vbe_bios_get_display_start): ... to this.
15922         (grub_vbe_set_palette_data): Renamed from this...
15923         (grub_vbe_bios_set_palette_data): ... to this.
15924         (grub_vbe_set_pixel_rgb): Removed.
15925         (grub_vbe_set_pixel_index): Likewise.
15927         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
15928         from this...
15929         (grub_vbe_bios_get_controller_info): ... to this.
15930         (grub_vbe_get_mode_info): Renamed from this...
15931         (grub_vbe_bios_get_mode_info): ... to this.
15932         (grub_vbe_set_mode): Renamed from this...
15933         (grub_vbe_bios_set_mode): ... to this.
15934         (grub_vbe_get_mode): Renamed from this...
15935         (grub_vbe_bios_get_mode): ... to this.
15936         (grub_vbe_set_memory_window): Renamed from this...
15937         (grub_vbe_bios_set_memory_window): ... to this.
15938         (grub_vbe_get_memory_window): Renamed from this...
15939         (grub_vbe_bios_get_memory_window): ... to this.
15940         (grub_vbe_set_scanline_length): Renamed from this...
15941         (grub_vbe_set_scanline_length): ... to this.
15942         (grub_vbe_get_scanline_length): Renamed from this...
15943         (grub_vbe_bios_get_scanline_length): ... to this.
15944         (grub_vbe_set_display_start): Renamed from this...
15945         (grub_vbe_bios_set_display_start): ... to this.
15946         (grub_vbe_get_display_start): Renamed from this...
15947         (grub_vbe_bios_get_display_start): ... to this.
15948         (grub_vbe_set_palette_data): Renamed from this...
15949         (grub_vbe_bios_set_palette_data): ... to this.
15950         (grub_vbe_bios_get_controller_info): Fixed problem with registers
15951         getting corrupted after calling it.  Added more pushes and pops.
15952         (grub_vbe_bios_set_mode): Likewise.
15953         (grub_vbe_bios_get_mode): Likewise.
15954         (grub_vbe_bios_get_memory_window): Likewise.
15955         (grub_vbe_bios_set_scanline_length): Likewise.
15956         (grub_vbe_bios_get_scanline_length): Likewise.
15957         (grub_vbe_bios_get_display_start): Likewise.
15958         (grub_vbe_bios_set_palette_data): Likewise.
15960         * normal/cmdline.c (cl_set_pos): Refresh the screen.
15961         (cl_insert): Likewise.
15962         (cl_delete): Likewise.
15964         * term/gfxterm.c: New file.
15966         * term/i386/pc/vesafb.c: Removed file.
15968         * video/video.c: New file.
15970         * video/i386/pc/vbe.c (real2pm): Added new function.
15971         (grub_video_vbe_draw_pixel): Likewise.
15972         (grub_video_vbe_get_video_ptr): Likewise.
15973         (grub_video_vbe_get_pixel): Likewise
15974         (grub_video_vbe_init): Likewise.
15975         (grub_video_vbe_fini): Likewise.
15976         (grub_video_vbe_setup): Likewise.
15977         (grub_video_vbe_get_info): Likewise.
15978         (grub_video_vbe_set_palette): Likewise.
15979         (grub_video_vbe_get_palette): Likewise.
15980         (grub_video_vbe_set_viewport): Likewise.
15981         (grub_video_vbe_get_viewport): Likewise.
15982         (grub_video_vbe_map_color): Likewise.
15983         (grub_video_vbe_map_rgb): Likewise.
15984         (grub_video_vbe_map_rgba): Likewise.
15985         (grub_video_vbe_unmap_color): Likewise.
15986         (grub_video_vbe_fill_rect): Likewise.
15987         (grub_video_vbe_blit_glyph): Likewise.
15988         (grub_video_vbe_blit_bitmap): Likewise.
15989         (grub_video_vbe_blit_render_target): Likewise.
15990         (grub_video_vbe_scroll): Likewise.
15991         (grub_video_vbe_swap_buffers): Likewise.
15992         (grub_video_vbe_create_render_target): Likewise.
15993         (grub_video_vbe_delete_render_target): Likewise.
15994         (grub_video_vbe_set_active_render_target): Likewise.
15995         (grub_vbe_set_pixel_rgb): Remove function.
15996         (grub_vbe_set_pixel_index): Likewise.
15997         (index_color_mode): Remove static variable.
15998         (active_mode): Likewise.
15999         (framebuffer): Likewise.
16000         (bytes_per_scan_line): Likewise.
16001         (grub_video_vbe_adapter): Added new static variable.
16002         (framebuffer): Likewise.
16003         (render_target): Likewise.
16004         (initial_mode): Likewise.
16005         (mode_in_use): Likewise.
16006         (mode_list): Likewise.
16008 2006-03-10  Marco Gerards  <marco@gnu.org>
16010         * configure.ac (AC_INIT): Bumped to 1.93.
16012         * DISTLIST: Added `include/grub/hfs.h'.
16014 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
16016         * boot/i386/pc/boot.S (general_error): Before looping, try INT
16017         18H, which might help the BIOS falling back to next boot media.
16019 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
16021         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
16022         Poe Chen <poe.poechen@gmail.com>.
16024 2006-01-17  Marco Gerards  <marco@gnu.org>
16026         * include/grub/normal.h: Include <grub/script.h>.
16027         (grub_command_list): Removed struct.
16028         (grub_command_list_t): Removed type.
16029         (grub_menu_entry): Remove members `num' and `command_list'.  Add
16030         members `commands' and `sourcecode'.
16031         * include/grub/script.h: Add inclusion guards.
16032         (grub_script_cmd_menuentry): New struct.
16033         (grub_script_execute_menuentry): New prototype.
16034         (grub_script_lexer_record_start): Likewise.
16035         (grub_script_lexer_record_stop): Likewise.
16036         * normal/execute.c (grub_script_execute_menuentry): New function.
16037         * normal/lexer.c (record, recording, recordpos, recordlen): New
16038         variables.
16039         (grub_script_lexer_record_start): New function.
16040         (grub_script_lexer_record_stop): Likewise.
16041         (recordchar): Likewise.
16042         (nextchar): Likewise.
16043         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
16044         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
16045         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
16046         (current_menu): New variable.
16047         (free_menu): Mainly rewritten.
16048         (grub_normal_menu_addentry): New function.
16049         (read_config_file): Rewritten.
16050         * normal/menu.c (run_menu_entry): Mainly rewritten.
16051         * normal/menu_entry.c (make_screen): Rewritten the code to insert
16052         the menu entry.
16053         (run): Mainly rewritten.
16054         * normal/parser.y (menu_entry): New variable.
16055         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
16056         (menuentry): New rule.
16057         (command): Add `menuentry'.
16058         (if_statement): Allow additional returns before `fi'.
16059         * normal/script.c (grub_script_create_cmdmenu): New function.
16061 2006-01-03  Marco Gerards  <marco@gnu.org>
16063         * INSTALL: GNU Bison is required.
16064         * configure.ac: Rewritten the test to detect Bison.
16065         * Makefile.in (YACC): New variable.  Reported by Xun Sun
16066         <xun.sun.cn@gmail.com>.
16068 2006-01-03  Marco Gerards  <marco@gnu.org>
16070         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
16071         the HFS+ filesystem to filesystem blocks.
16072         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
16073         GCC warning is silenced.
16075 2006-01-03  Marco Gerards  <marco@gnu.org>
16077         * partmap/apple.c (apple_partition_map_iterate): Convert the data
16078         read from disk from big endian to host byte order.
16080 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16082         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
16083         documentation.
16084         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
16085         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
16086         embedded HFS+ filesystem.
16087         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
16088         (grub_hfs_sblock): Move from here...
16089         * include/grub/hfs.h: To here...  New file.
16090         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
16091         documentation.
16092         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
16093         New macros.
16094         (grub_hfsplus_volheader): Change type of member `magic' to
16095         `grub_uint16_t'.
16096         (grub_hfsplus_data): Add new member `embedded_offset'.
16097         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
16098         returned block.
16099         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
16100         Calculate the offset.
16102 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
16104         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
16105         Removed.
16106         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
16108 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
16110         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
16111         ENV->NAME is NULL after allocating ENV->VALUE.
16113 2005-12-25  Marco Gerards  <marco@gnu.org>
16115         * kern/env.c (grub_env_set): Rewritten the error handling code.
16117 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
16119         * geninit.sh: Made more robust, and more portable.
16121 2005-12-25  Marco Gerards  <marco@gnu.org>
16123         Add support for Apple HFS+ filesystems.
16125         * fs/hfsplus.c: New file.
16127         * DISTLIST: Added `fs/hfsplus.c'.
16129         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
16130         (hfsplus_mod_SOURCES): New variable.
16131         (hfsplus_mod_CFLAGS): Likewise.
16132         (hfsplus_mod_LDFLAGS): Likewise.
16133         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
16134         (grub_setup_SOURCES): Likewise.
16135         (grub_mkdevicemap_SOURCES): Likewise.
16136         (grub_emu_SOURCES): Likewise.
16137         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16139         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
16141         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
16143 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
16145         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
16146         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
16147         include/grub/parser.h, include/grub/script.h, kern/parser.c,
16148         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
16149         normal/lexer.c, normal/parser.y, normal/script.c, and
16150         partmap/gpt.c.
16151         Removed kern/sparc64/cache.c.
16153         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
16154         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
16155         grub_emu_init.c.
16157         * configure.ac (AC_INIT): Bumped to 1.92.
16159 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
16161         * kern/err.c (grub_error_push): Added new function to support error
16162         stacks.
16163         (grub_error_pop): Likewise.
16164         (grub_error_stack_items): New local variable to support error stacks.
16165         (grub_error_stack_pos): Likewise.
16166         (grub_error_stack_assert): Likewise.
16167         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
16168         stack depth.
16169         (grub_print_error): Added support to print errors from error stack.
16171         * include/grub/err.h (grub_error_push): Added function prototype.
16172         (grub_error_pop): Likewise.
16174 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
16176         * configure.ac: Accept `powerpc64' as host_cpu.
16177         (amd64): Rename to `biarch32'.
16179         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
16180         non-cacheline-aligned addresses.
16182         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
16183         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
16184         if `size' is non-zero.
16186 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
16188         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
16189         and `cd' to make sure the filename is not prefixed with a
16190         directory name.
16191         (pkgdata_MODULES): Add `gpt.mod'.
16192         (gpt_mod_SOURCES): New variable.
16193         (gpt_mod_CFLAGS): Likewise.
16194         (gpt_mod_LDFLAGS): Likewise.
16196         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
16198         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
16199         New macro.
16201         * partmap/gpt.c: New file.
16203         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
16204         GPT partition map is detected.
16206 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
16208         * commands/i386/pc/play.c: New file.
16209         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
16210         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
16211         macros.
16213 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
16215         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
16216         ((unused))' to silence gcc warning.
16218 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
16220         * configure.ac: Correct `AC_PROG_YACC' test.
16222 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
16224         * util/powerpc/ieee1275/grub-install.in: Run the mount point
16225         check before installing files.
16227 2005-11-22  Mike Small  <smallm@panix.com>
16229         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
16230         number regex so multidigit numbers are recognized correctly.
16232 2005-11-22  Mike Small  <smallm@panix.com>
16234         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
16235         debugging message before attempting to claim memory.
16236         (grub_rescue_cmd_initrd): Add a claim debugging message and try
16237         multiple addresses in case of failure.
16239 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
16241         * term/tparm.c (get_space): Remove empty `if' statement.
16243         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
16245         * kern/parser.c (check_varstate): Rename `state' to 's'.
16247 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
16249         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
16250         variable definitions to the beginning of each function.  Sort stack
16251         variables by size.
16252         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
16253         `buf' argument to `char *'.
16255 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
16257         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
16258         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
16259         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
16260         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16261         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16262         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16263         configfile.mod, search.mod, gzio.mod and test.mod.
16264         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16265         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16266         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16267         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16268         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16269         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16270         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16271         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16272         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16273         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16274         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16275         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16276         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16277         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16278         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16279         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16280         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16281         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16282         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16283         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16284         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16285         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16286         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
16288         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
16289         `grep --include'.
16290         (pkgdata_MODULES): Add test.mod.
16292 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16294         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
16295         appending to variables with "+=".
16296         (PModule): Use full pathname to generate *.lst filenames.
16298         * Makefile.in: Fixed list rules moved from genmk.rb.
16299         (.DELETE_ON_ERROR): New special target.
16300         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
16302         * conf/i386-pc.rmk: Include conf/common.mk.
16303         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
16304         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
16305         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
16306         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
16307         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
16308         configfile.mod, search.mod, gzio.mod and test.mod.
16309         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
16310         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
16311         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
16312         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
16313         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
16314         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
16315         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
16316         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
16317         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
16318         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
16319         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16320         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16321         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
16322         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
16323         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
16324         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
16325         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16326         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
16327         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
16328         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
16329         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
16330         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
16331         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
16332         here...
16333         * conf/common.rmk: ... to here.  New file.
16335         * conf/common.mk: New file.
16337 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
16339         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
16340         (grub_script.tab.c): ... here.
16342         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
16343         (grub_script.tab.c): ... here.
16345         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
16346         (grub_script.tab.c): ... here.
16348         * normal/command.c (grub_command_find): Fixed a memory leak of
16349         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
16351 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16353         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
16354         "@" which marks the start of a comment on ARM.
16355         (VARIABLE): Likewise.
16357 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16359         Add support for Linux/ADFS partition tables.
16361         * partmap/acorn.c: New file.
16363         * include/grub/acorn_filecore.h: Likewise.
16365         * DISTLIST: Added `partmap/acorn.c' and
16366         `include/grub/acorn_filecore.h'.
16368         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16369         `partmap/acorn.c'.
16370         (pkgdata_MODULES): Add `acorn.mod'.
16371         (acorn_mod_SOURCES): New variable.
16372         (acorn_mod_CFLAGS): Likewise.
16374         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
16375         `partmap/acorn.c'.
16376         (pkgdata_MODULES): Add `acorn.mod'.
16377         (acorn_mod_SOURCES): New variable.
16378         (acorn_mod_CFLAGS): Likewise.
16380         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
16381         (pkgdata_MODULES): Add `acorn.mod'.
16382         (acorn_mod_SOURCES): New variable.
16383         (acorn_mod_CFLAGS): Likewise.
16384         (acorn_mod_LDFLAGS): Likewise.
16386         * include/types.h (grub_disk_addr_t): New typedef.
16388 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
16390         * geninit.sh: New file.
16392         * geninitheader.sh: Likewise.
16394         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
16395         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
16396         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
16397         * commands/configfile.c (grub_configfile_init)
16398         (grub_configfile_fini): Likewise.
16399         * commands/default.c (grub_default_init, grub_default_fini):
16400         Likewise.
16401         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
16402         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
16403         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
16404         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
16405         Likewise.
16406         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
16407         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
16408         Likewise.
16409         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
16410         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
16411         Likewise.
16412         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
16413         Likewise.
16414         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
16415         Likewise.
16416         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
16417         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
16418         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
16419         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
16420         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
16421         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
16422         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
16423         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
16424         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
16425         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
16426         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
16427         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
16428         * partmap/amiga.c (grub_amiga_partition_map_init)
16429         (grub_amiga_partition_map_fini): Likewise.
16430         * partmap/apple.c (grub_apple_partition_map_init)
16431         (grub_apple_partition_map_fini): Likewise.
16432         * partmap/pc.c (grub_pc_partition_map_init)
16433         (grub_pc_partition_map_fini): Likewise.
16434         * partmap/sun.c (grub_sun_partition_map_init,
16435         grub_sun_partition_map_fini): Likewise.
16436         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
16437         Likewise.
16439         * util/grub-emu.c: Include <grub_modules_init.h>.
16440         (main): Don't initialize and de-initialize any modules directly,
16441         use `grub_init_all' and `grub_fini_all' instead.
16443         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
16444         `grub_vesafb_mod_init'.
16445         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
16446         all users.
16447         * term/i386/pc/vga.c (grub_vga_init): Renamed to
16448         `grub_vga_mod_init'.  Updated all users.
16449         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
16451         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
16452         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
16453         rules.
16455         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
16456         Generate a function to initialize the module in utilities.
16457         Updated all callers.
16458         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
16459         initialize the module in utilities.  Updated all callers.
16461 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
16463         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
16464         escape sequence and a literal ^L to clear the screen.
16466         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
16467         when returning from Open Firmware.
16469 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
16471         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
16472         (grub_ofconsole_height): Likewise.
16473         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
16474         manually insert a '\n'.
16475         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
16476         `grub_ofconsole_height'.  Return early if these are already set.
16478 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
16480         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
16481         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
16482         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
16483         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
16484         and `normal/script.c'.
16485         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16486         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16487         (test_mod_SOURCES): New variable.
16488         (test_mod_CFLAGS): Likewise.
16489         (test_mod_LDFLAGS): Likewise.
16490         (pkgdata_MODULES): Add `test.mod'.
16491         (grub_script.tab.c): New rule.
16492         (grub_script.tab.h): Likewise.
16494 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
16496         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16497         `commands/test.c', `normal/execute.c', `normal/lexer.c',
16498         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16499         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16500         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16501         (test_mod_SOURCES): New variable.
16502         (test_mod_CFLAGS): Likewise.
16503         (pkgdata_MODULES): Add `test.mod'.
16504         (grub_script.tab.c): New rule.
16505         (grub_script.tab.h): Likewise.
16507 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
16509         Add initial scripting support.
16511         * commands/test.c: New file.
16512         * include/grub/script.h: Likewise.
16513         * normal/execute.c: Likewise.
16514         * normal/function.c: Likewise.
16515         * normal/lexer.c: Likewise.
16516         * normal/parser.y: Likewise.
16517         * normal/script.c: Likewise.
16519         * configure.ac: Add `AC_PROG_YACC' test.
16521         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
16522         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
16523         `normal/function.c' and `normal/script.c'.
16524         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16525         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16526         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
16527         variables.
16528         (pkgdata_MODULES): Add `test.mod'.
16529         (grub_script.tab.c): New rule.
16530         (grub_script.tab.h): Likewise.
16532         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
16534         * include/grub/normal.h (grub_test_init): New prototype.
16535         (grub_test_fini): Likewise.
16537         * normal/command.c: Include <grub/script.h>.
16538         (grub_command_execute): Rewritten.
16540         * util/grub-emu.c (main): Call `grub_test_init' and
16541         `grub_test_fini'.
16543 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16545         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
16546         to 0.
16547         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
16548         there are no pending characters.
16550 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16552         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
16553         `grub_strndup' to drop device arguments. Replace unnecessary
16554         `grub_strndup' with `grub_strdup'.
16556 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
16558         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
16559         `debug' environment variable has been set.
16561 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16563         * Makefile.in (install-local): Use $(DATA).
16564         (uninstall): Likewise.
16565         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
16566         (sbin_UTILITIES): ... to here.
16567         (sbin_SCRIPTS): New variable.
16568         (grub_install_SOURCES): New variable.
16569         * util/powerpc/ieee1275/grub-install.in: New file.
16570         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
16571         variable.
16572         (add_segments): Call `grub_util_get_path'.
16574 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
16576         From Timothy Baldwin:
16577         * commands/ls.c (grub_ls_list_files): Close FILE with
16578         grub_file_close.
16579         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
16581 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
16583         * include/grub/parser.h: New file.
16585         * kern/parser.c: Likewise.
16587         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
16588         (grub_setup_SOURCES): Likewise.
16589         (grub_probefs_SOURCES): Likewise.
16590         (grub_emu_SOURCES): Likewise.
16591         (kernel_img_HEADERS): Add `parser.h'.
16593         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16594         (grub_emu_SOURCES): Add `kern/parser.c'.
16595         (grubof_SOURCES): Likewise.
16597         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16598         (grubof_SOURCES): Add `kern/parser.c'.
16600         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
16602         * kern/misc.c (grub_split_cmdline): Removed function.
16604         * kern/rescue.c: Include <grub/parser.h>.
16605         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
16606         of `grub_split_cmdline'.
16608         * normal/command.c: Include <grub/parser.h>.
16609         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
16610         of `grub_split_cmdline'.
16612         * normal/completion.c: Include <grub/parser.h>.
16613         (cmdline_state): New variable.
16614         (iterate_dir): End the filename with a quote depending on the
16615         command line state.
16616         (get_state): new function.
16617         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
16618         split the arguments and determine the current argument.  When the
16619         argument string is not quoted, escape all spaces.
16621 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16623         * normal/sparc64/setjmp.S: New file.
16625 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16627         * include/grub/sparc64/libgcc.h: New file.
16628         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
16629         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
16630         normal/sparc64/setjmp.c.
16632 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
16634         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
16635         * kern/sparc64/cache.S: New file.
16636         * kern/sparc64/cache.c: Removed.
16637         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
16638         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
16639         -mtune=ultrasparc.
16640         (COMMON_LDFLAGS): Add -melf64_sparc.
16641         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
16642         (grubof_SOURCES): Use cache.S instead of cache.c.
16643         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
16644         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
16645         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
16646         commented though.
16647         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
16648         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
16649         (linux_mod_CFLAGS): Commented out.
16650         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
16651         out because module isn't built.
16652         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
16653         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
16654         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
16655         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
16656         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
16657         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16658         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16659         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
16660         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
16661         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
16662         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16663         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16664         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
16665         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
16667 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
16669         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
16670         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
16671         longer, because HFS should not be used on PC.
16673 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16675         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
16676         consistently within the loop.
16678 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
16680         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
16681         directory can not be read.
16683 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16685         * configure.ac (AC_INIT): Increase the version number to 1.91.
16687         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
16688         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
16689         term/i386/pc/serial.c.
16691 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16693         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
16694         file size must be permitted.
16696         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
16697         between %ah and %al.
16699 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
16701         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
16702         grub_uint64_t.
16703         Call the hook with a NUL-terminated filename.
16704         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
16705         grub_cpu_to_be32.
16707         * kern/term.c (cursor_state): New variable.
16708         (grub_term_set_current): Reset the cursor state on a new
16709         terminal.
16710         (grub_setcursor): Rewritten to use CURSOR_STATE.
16711         (grub_getcursor): New function.
16713         * include/grub/term.h (grub_getcursor): New prototype.
16715         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
16716         integers on ARM. Reported by Timothy Baldwin
16717         <T.E.Baldwin99@members.leeds.ac.uk>.
16719 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
16721         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
16722         allocated.
16723         (grub_sfs_dir): Likewise.
16725 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
16727         Add support for the SFS filesystem.
16729         * fs/sfs.c: New file.
16731         * DISTLIST: Added `fs/sfs.c'.
16733         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
16734         (grub_probefs_SOURCES): Likewise.
16735         (grub_emu_SOURCES): Likewise.
16736         (pkgdata_MODULES): Add `sfs.mod'.
16737         (sfs_mod_SOURCES): New variable.
16738         (sfs_mod_CFLAGS): Likewise.
16739         (sfs_mod_LDFLAGS): Likewise.
16741         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
16742         (pkgdata_MODULES): Add `sfs.mod'.
16743         (sfs_mod_SOURCES): New variable.
16744         (sfs_mod_CFLAGS): Likewise.
16746         * util/grub-emu.c (main): Call `grub_sfs_init' and
16747         `grub_sfs_fini'.
16749         * include/grub/fs.h (grub_sfs_init): New prototype.
16750         (grub_sfs_fini): Likewise.
16752 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
16754         Add support for the AFFS filesystem.
16756         * fs/affs.c: New file.
16758         * DISTLIST: Added `fs/affs.c'.
16760         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
16761         (grub_probefs_SOURCES): Likewise.
16762         (grub_emu_SOURCES): Likewise.
16763         (pkgdata_MODULES): Add `affs.mod'.
16764         (affs_mod_SOURCES): New variable.
16765         (affs_mod_CFLAGS): Likewise.
16766         (affs_mod_LDFLAGS): Likewise.
16768         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
16769         (pkgdata_MODULES): Add `affs.mod'.
16770         (affs_mod_SOURCES): New variable.
16771         (affs_mod_CFLAGS): Likewise.
16773         * util/grub-emu.c (main): Call `grub_affs_init' and
16774         `grub_affs_fini'.
16776         * include/grub/fs.h (grub_affs_init): New prototype.
16777         (grub_affs_fini): Likewise.
16779 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16781         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
16783 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
16785         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
16786         `-m32' to CFLAGS.
16788         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
16789         linking.
16791         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
16792         (COMMON_LDFLAGS): New variable.
16793         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
16794         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
16795         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
16796         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
16797         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
16798         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
16799         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
16800         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
16801         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
16802         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
16803         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16804         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16805         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
16806         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
16807         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
16808         variables.
16809         (normal_mod_ASFLAGS): Add `-m32'.
16811         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
16812         (grub_host_size_t, grub_host_ssize_t): New types.
16813         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
16814         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
16815         `GRUB_HOST_SIZEOF_VOID_P'.
16817         * include/grub/kernel.h (struct grub_module_header): Type of
16818         member offset changed to `grub_host_off_t'.  Type of member size
16819         changed to `grub_host_size_t'.
16820         (struct grub_module_info): Type of member offset changed to
16821         `grub_host_off_t'.  Type of member size changed to
16822         `grub_host_size_t'.
16824 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
16826         Make GRUB's kernel compliant to Multiboot Specification.
16828         * kern/i386/pc/startup.S (multiboot_header): New label.
16829         (multiboot_entry): Likewise.
16830         (multiboot_trampoline): Likewise.
16832         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16833         Increased to 0x4A0.
16835         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
16836         put parentheses after a question mark.
16837         [!GRUB_UTIL] (my_mod): New variable.
16839         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
16841 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
16843         Adds support for the XFS filesystem.  Btrees are not supported
16844         yet.
16846         * fs/xfs.c: New file.
16848         * DISTLIST: Added `fs/xfs.c'.
16850         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
16851         (grub_probefs_SOURCES): Likewise.
16852         (grub_emu_SOURCES): Likewise.
16853         (pkgdata_MODULES): Add `xfs.mod'.
16854         (xfs_mod_SOURCES): New variable.
16855         (xfs_mod_CFLAGS): Likewise.
16857         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
16858         (pkgdata_MODULES): Add `xfs.mod'.
16859         (xfs_mod_SOURCES): New variable.
16860         (xfs_mod_CFLAGS): Likewise.
16862         * util/grub-emu.c (main): Call `grub_xfs_init' and
16863         `grub_xfs_fini'.
16865         * include/grub/fs.h (grub_xfs_init): New prototype.
16866         (grub_xfs_fini): Likewise.
16869 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
16871         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
16872         color modes, allow greater than 16 colors to be configured as
16873         a default palette.
16875 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
16877         * normal/completion.c (complete_arguments): Add the qualifier
16878         const into OPTIONS.
16880         From Omniflux <omniflux+lists@omniflux.com>:
16881         * include/grub/terminfo.h: New file.
16882         * include/grub/tparm.h: Likewise.
16883         * include/grub/i386/pc/serial.h: Likewise.
16884         * term/terminfo.c: Likewise.
16885         * term/tparm.c: Likewise.
16886         * term/i386/pc/serial.c: Likewise.
16887         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
16888         serial.mod.
16889         (terminfo_mod_SOURCES): New variable.
16890         (terminfo_mod_CFLAGS): Likewise.
16891         (serial_mod_SOURCES): Likewise.
16892         (serial_mod_CFLAGS): Likewise.
16894 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
16896         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
16897         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
16898         and kern/powerpc/ieee1275/cmain.c, respectively.
16900         * boot/powerpc/ieee1275/crt0.S: Moved to ...
16901         * kern/powerpc/ieee1275/crt0.S: ... here.
16903         * boot/powerpc/ieee1275/cmain.c: Moved to ...
16904         * kern/powerpc/ieee1275/cmain.c: ... here.
16906         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
16907         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
16908         instead of boot/powerpc/ieee1275/crt0.S and
16909         boot/powerpc/ieee1275/cmain.c, respectively.
16911         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
16912         sectors. It was not used anyway.
16914 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16916         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
16917         `unused parameter' warning.
16919 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
16921         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
16922         function.
16923         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
16924         getcharwidth.
16926 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
16928         * include/grub/normal.h (enum grub_completion_type): Added
16929         `GRUB_COMPLETION_TYPE_ARGUMENT'.
16931         * normal/cmdline.c (print_completion): Handle
16932         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
16933         * normal/menu_entry.c (store_completion): Likewise.
16935         * normal/completion.c (complete_arguments): New function.
16936         (grub_normal_do_completion): Call `complete_arguments' when the
16937         current words start with a dash.
16939 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
16941         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
16942         `gzio.mod' instead of `io.mod').
16944 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
16946         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
16947         (DISTDIRS): Added io and video.
16948         Rewrite the search routine to make an output consistently.
16950         * DISTLIST: Added conf/sparc64-ieee1275.mk,
16951         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
16952         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
16953         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
16954         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
16955         util/powerpc/ieee1275/misc.c.
16957         * include/grub/gzio.h: New file.
16958         * io/gzio.c: Likewise.
16960         * kern/file.c (grub_file_close): Call grub_device_close only if
16961         FILE->DEVICE is not NULL.
16963         * include/grub/mm.h [!NULL] (NULL): New macro.
16965         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
16967         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
16968         (pkgdata_MODULES): Added gzio.mod.
16969         (gzio_mod_SOURCES): New variable.
16970         (gzio_mod_CFLAGS): Likewise.
16972         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
16973         (pkgdata_MODULES): Added gzio.mod.
16974         (gzio_mod_SOURCES): New variable.
16975         (gzio_mod_CFLAGS): Likewise.
16977         * commands/cat.c: Include grub/gzio.h.
16978         (grub_cmd_cat): Use grub_gzfile_open instead of
16979         grub_file_open.
16981         * commands/cmp.c: Include grub/gzio.h.
16982         (grub_cmd_cmp): Use grub_gzfile_open instead of
16983         grub_file_open.
16985         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
16986         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
16987         grub_file_open.
16988         (grub_rescue_cmd_module): Likewise.
16990 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16992         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
16993         kern/sparc64/ieee1275/init.c because it contains _start.
16994         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
16996 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16998         * configure.ac: Add support for sparc64 host with ieee1275
16999         firmware.
17000         * configure: Generated from configure.ac.
17001         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
17002         instead of int.
17003         (grub_ofdisk_read): Likewise.
17004         (grub_ofdisk_open): Use %p to print pointer values, and cast the
17005         pointers as (void *) to remove a warning.
17006         (grub_ofdisk_close): Likewise.
17007         (grub_ofdisk_read): Likewise.
17008         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
17009         returns, so make it return void to remove a warning.
17010         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
17011         Corresponding prototype change.
17012         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
17013         values, and cast the pointers as (void *) to remove a warning.
17014         (grub_mm_dump): Likewise.
17015         * conf/sparc64-ieee1275.mk: New file.
17016         * conf/sparc64-ieee1275.rmk: Likewise.
17017         * include/grub/sparc64/setjmp.h: Likewise.
17018         * include/grub/sparc64/types.h: Likewise.
17019         * include/grub/sparc64/ieee1275/console.h: Likewise.
17020         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
17021         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
17022         * include/grub/sparc64/ieee1275/time.h: Likewise.
17023         * kern/sparc64/cache.c: Likewise.
17024         * kern/sparc64/dl.c: Likewise.
17025         * kern/sparc64/ieee1275/init.c: Likewise.
17026         * kern/sparc64/ieee1275/openfw.c: Likewise.
17028 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
17030         * util/console.c (grub_ncurses_putchar): If C is greater than
17031         0x7f, set C to a question mark.
17032         (grub_ncurses_getcharwidth): New function.
17033         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
17034         getcharwidth.
17036         * normal/menu.c (print_entry): Made aware of Unicode. First,
17037         convert TITLE to UCS-4, and predict the cursor position by
17038         grub_getcharwidth.
17040         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
17041         const to SRC.
17042         * kern/misc.c (grub_utf16_to_utf8): Likewise.
17044 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
17046         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
17047         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17048         grub_strcat.
17050         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
17051         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
17052         grub_strcpy and grub_strlen. Take it into account that a space
17053         character is inserted as a delimiter.
17055 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
17057         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
17058         invalid magic in the error.
17060         * commands/search.c: New file.
17062         * util/grub-emu.c (main): Call grub_search_init and
17063         grub_search_fini.
17065         * kern/rescue.c (grub_rescue_print_disks): Removed.
17066         (grub_rescue_print_devices): New function.
17067         (grub_rescue_cmd_ls): Use grub_device_iterate with
17068         grub_rescue_print_devices instead of grub_disk_dev_iterate with
17069         grub_rescue_print_disks.
17071         * kern/partition.c (grub_partition_iterate): Return the result of
17072         PARTMAP->ITERATE instead of GRUB_ERRNO.
17074         * kern/device.c: Include grub/partition.h.
17075         (grub_device_iterate): New function.
17077         * include/grub/partition.h (grub_partition_iterate): Return int
17078         instead of grub_err_t.
17080         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
17081         prototype.
17082         [GRUB_UTIL] (grub_search_fini): Likewise.
17084         * include/grub/device.h (grub_device_iterate): New prototype.
17086         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17087         commands/search.c.
17088         (pkgdata_MODULES): Added search.mod.
17089         (search_mod_SOURCES): New variable.
17090         (search_mod_CFLAGS): Likewise.
17092         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
17093         (pkgdata_MODULES): Added search.mod.
17094         (search_mod_SOURCES): New variable.
17095         (search_mod_CFLAGS): Likewise.
17097         * commands/ls.c (grub_ls_list_disks): Renamed to ...
17098         (grub_ls_list_devices): ... this, and use grub_device_iterate.
17099         All callers changed.
17101         * DISTLIST: Added commands/search.c.
17103 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
17105         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
17106         conversion.
17107         (grub_getcharwidth): New function.
17109         * kern/misc.c (grub_utf8_to_ucs4): New function.
17111         * include/grub/term.h (struct grub_term): Added a new member
17112         "getcharwidth".
17113         (grub_getcharwidth): New prototype.
17115         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
17117         * term/i386/pc/console.c (map_char): New function. Segregated from
17118         grub_console_putchar.
17119         (grub_console_putchar): Use map_char.
17120         (grub_console_getcharwidth): New function.
17121         (grub_console_term): Specified grub_console_getcharwidth as
17122         getcharwidth.
17124         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
17125         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
17127         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
17128         GRUB_ERRNO.
17129         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
17130         on grub_strtoul completely.
17131         (write_char): Declare local variables in the beginning of the
17132         function.
17133         (grub_vesafb_getcharwidth): New function.
17134         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
17135         getcharwidth.
17137 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
17139         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
17140         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
17141         commands/i386/pc/vbetest.c.
17143         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
17144         call grub_vbe_get_controller_info again, because the returned
17145         information is volatile.
17146         (grub_vbe_set_video_mode): Mostly rewritten.
17147         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
17148         grub_vbe_status_t correctly.
17149         (grub_vbe_get_video_mode_info): Likewise.
17150         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
17151         several if statements.
17153         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
17154         * commands/i386/pc/vbeinfo.c: ... this.
17156         * commands/i386/pc/vbe_test.c: Renamed to ...
17157         * commands/i386/pc/vbetest.c: ... this.
17159         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
17160         ...
17161         (grub_cmd_vbeinfo): ... this. Save video modes before
17162         iterating. Skip a video mode, if it is not available, not enough
17163         information is given or it is monochrome. Show the memory
17164         model. Leave the interpretation of MODEVAR to grub_strtoul
17165         completely.
17166         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
17167         (GRUB_MOD_FINI): Likewise.
17169         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
17170         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
17171         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
17172         duplicated grub_env_get. Leave the interpretation of MODEVAR to
17173         grub_strtoul completely.
17174         (real2pm): Removed.
17175         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
17176         (GRUB_MOD_FINI): Likewise.
17178         * normal/misc.c: Include grub/mm.h.
17180         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
17181         vbe_list_modes with vbetest.mod and vbeinfo.mod.
17182         (vbe_list_modes_mod_SOURCES): Removed.
17183         (vbe_list_modes_mod_CFLAGS): Likewise.
17184         (vbe_test_mod_SOURCES): Likewise.
17185         (vbe_test_mod_CFLAGS): Likewise.
17186         (vbeinfo_mod_SOURCES): New variable.
17187         (vbeinfo_mod_CFLAGS): Likewise.
17188         (vbetest_mod_SOURCES): Likewise.
17189         (vbetest_mod_CFLAGS): Likewise.
17191 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
17193         * normal/misc.c: New file.
17195         * DISTLIST: Added normal/misc.c.
17197         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
17198         DISK to HOOK. Call HOOK with DISK.
17199         * partmap/apple.c (apple_partition_map_iterate): Likewise.
17200         * partmap/pc.c (pc_partition_map_iterate): Likewise.
17201         * partmap/sun.c (sun_partition_map_iterate): Likewise.
17203         * normal/menu_entry.c (struct screen): Added a new member
17204         "completion_shown".
17205         (completion_buffer): New global variable.
17206         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
17207         (store_completion): New function.
17208         (complete): Likewise.
17209         (clear_completions): Likewise.
17210         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
17211         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
17212         a tab, call complete.
17214         * normal/completion.c (disk_dev): Removed.
17215         (print_simple_completion): Likewise.
17216         (print_partition_completion): Likewise.
17217         (print_func): New global variable.
17218         (add_completion): Do not take the arguments WHAT or PRINT any
17219         longer. Added a new argument TYPE. Instead of printing directly,
17220         call PRINT_FUNC if not NULL.
17221         All callers changed.
17222         (complete_device): Use a local variable DEV instead of
17223         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
17224         (grub_normal_do_completion): Take a new argument HOOK. Do not
17225         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
17226         empty string, return NULL instead.
17227         All callers changed.
17229         * normal/cmdline.c (print_completion): New function.
17231         * kern/partition.c (grub_partition_iterate): Add an argument DISK
17232         to HOOK.
17233         All callers changed.
17235         * kern/disk.c (grub_print_partinfo): Removed.
17237         * include/grub/partition.h (struct grub_partition_map): Add a new
17238         argument DISK into HOOK of ITERATE.
17239         (grub_partition_iterate): Add a new argument DISK to HOOK.
17241         * include/grub/normal.h (enum grub_completion_type): New enum.
17242         (grub_completion_type_t): New type.
17243         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
17244         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
17245         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
17246         (GRUB_COMPLETION_TYPE_FILE): Likewise.
17247         (grub_normal_do_completion): Added a new argument HOOK.
17248         (grub_normal_print_device_info): New prototype.
17250         * include/grub/disk.h (grub_print_partinfo): Removed.
17252         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
17253         (normal_mod_SOURCES): Likewise.
17254         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17255         (normal_mod_SOURCES): Likewise.
17257         * commands/ls.c (grub_ls_list_disks): Use
17258         grub_normal_print_device_info instead of grub_print_partinfo. Free
17259         PNAME.
17260         (grub_ls_list_files): Use grub_normal_print_device_info instead of
17261         duplicating the code.
17263 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
17265         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
17266         follow GCS more precisely.
17267         * commands/i386/pc/vbe_test.c: Likewise.
17268         * include/grub/i386/pc/vbe.h: Likewise.
17269         * term/i386/pc/vesafb.c: Likewise.
17270         * video/i386/pc/vbe.c: Likewise.
17272 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
17274         * DISTLIST: Added term/i386/pc/vesafb.c
17275         DISTLIST: Added video/i386/pc/vbe.c
17276         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
17277         DISTLIST: Added commands/i386/pc/vbe_test.c.
17278         * commands/i386/pc/vbe_list_modes.c: New file.
17279         * commands/i386/pc/vbe_test.c: Likewise.
17280         * term/i386/pc/vesafb.c: Likewise.
17281         * video/i386/pc/vbe.c: Likewise.
17282         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
17283         (grub_vbe_probe) Added prototype.
17284         (grub_vbe_set_video_mode) Likewise.
17285         (grub_vbe_get_video_mode) Likewise.
17286         (grub_vbe_get_video_mode_info) Likewise.
17287         (grub_vbe_set_pixel_rgb) Likewise.
17288         (grub_vbe_set_pixel_index) Likewise.
17289         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
17290         (pkgdata_MODULES): Added vesafb.mod.
17291         (pkgdata_MODULES): Added vbe_list_modes.mod.
17292         (pkgdata_MODULES): Added vbe_test.mod.
17293         (vbe_mod_SOURCES): Added.
17294         (vbe_mod_CFLAGS): Likewise.
17295         (vesafb_mod_SOURCES): Likewise.
17296         (vesafb_mod_CFLAGS): Likewise.
17297         (vbe_list_modes_mod_SOURCES): Likewise.
17298         (vbe_list_modes_mod_CFLAGS): Likewise.
17299         (vbe_test_mod_SOURCES): Likewise.
17300         (vbe_test_mod_CFLAGS): Likewise.
17302 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
17304         * normal/command.c (grub_command_execute): If INTERACTIVE is
17305         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
17306         CMDLINE. Disable the pager if INTERACTIVE is true.
17307         All callers are changed.
17309         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
17310         before reading a config file.
17311         * normal/main.c (read_config_file): Even if a command is not
17312         found, register it if it is within an entry.
17314         * util/grub-emu.c: Include sys/types.h and unistd.h.
17315         (options): Added --hold.
17316         (struct arguments): Added a new member "hold".
17317         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
17318         missing.
17319         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
17320         cleared by a debugger, if it is not zero.
17322         * include/grub/normal.h (grub_command_execute): Add an argument
17323         INTERACTIVE.
17325 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
17327         * DISTLIST: Added include/grub/i386/pc/vbe.h.
17329 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
17331         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
17332         program with another one, because the old one didn't detect a bug
17333         in gcc-3.4. Always use regparm 2, because the new test is still
17334         not enough for gcc-4.0. Someone must investigate a simple test
17335         case which detects a bug in gcc-4.0.
17337 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
17339         * DISTLIST: Added normal/completion.c.
17341         * normal/completion.c: New file.
17343         * term/i386/pc/console.c (grub_console_getwh): New function.
17344         (grub_console_term): Assign grub_console_getwh to getwh.
17346         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
17347         function is defined in normal/completion.c as
17348         grub_normal_do_completion.
17349         (grub_cmdline_get): Use grub_normal_do_completion instead of
17350         grub_tab_complete.
17352         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
17353         returns non-zero, otherwise return 0.
17354         (grub_partition_iterate): First, probe the partition map. Then,
17355         call ITERATE only for this partition map.
17357         * kern/misc.c (grub_strncmp): Rewritten.
17359         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
17360         returns non-zero. Otherwise return 0.
17362         * include/grub/partition.h (grub_partition_map_iterate): Return
17363         int instead of void.
17365         * include/grub/normal.h (grub_normal_do_completion): New prototype.
17367         * include/grub/misc.h (grub_strncmp): Change the type of N to
17368         grub_size_t.
17370         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
17371         of void.
17373         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
17374         unsigned explicitly before comparing it with I.
17376         * kern/main.c (grub_env_write_root): Add the attribute unused into
17377         VAR.
17379         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17380         normal/completion.c.
17381         (normal_mod_SOURCES): Likewise.
17382         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
17383         (normal_mod_SOURCES): Likewise.
17385         * normal/command.c (grub_iterate_commands): If ITERATE returns
17386         non-zero, return one immediately.
17388 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
17390         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
17391         * kern/i386/pc/startup.S: Updated Global Descriptor table's
17392         descriptions.
17393         (grub_vbe_get_controller_info): New function.
17394         (grub_vbe_get_mode_info): Likewise.
17395         (grub_vbe_set_mode): Likewise.
17396         (grub_vbe_get_mode): Likewise.
17397         (grub_vbe_set_memory_window): Likewise.
17398         (grub_vbe_get_memory_window): Likewise.
17399         (grub_vbe_set_scanline_length): Likewise.
17400         (grub_vbe_get_scanline_length): Likewise.
17401         (grub_vbe_set_display_start): Likewise.
17402         (grub_vbe_get_display_start): Likewise.
17403         (grub_vbe_set_palette_data): Likewise.
17404         * include/grub/i386/pc/vbe.h: New file.
17406 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
17408         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17409         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
17410         * DISTLIST: Likewise.
17411         * kern/ieee1275/of.c: Moved to ...
17412         * kern/ieee1275/ieee1275.c: ... here.
17414 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
17416         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
17417         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
17418         Pass 0 as `end' parameter to grub_strtoul().
17420 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
17422         * include/grub/powerpc/ieee1275/console.h: Do not include
17423         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
17424         ifdef.
17425         (grub_console_cur_color): Remove i386-specific prototype.
17426         (grub_console_real_putchar): Likewise.
17427         (grub_console_checkkey): Likewise.
17428         (grub_console_getkey): Likewise.
17429         (grub_console_getxy): Likewise.
17430         (grub_console_gotoxy): Likewise.
17431         (grub_console_cls): Likewise.
17432         (grub_console_setcursor): Likewise.
17433         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
17434         Include <grub/machine/console.h>.
17435         * term/ieee1275/ofconsole.c: Likewise.
17437 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
17439         * Makefile.in (LIBLZO): New variable.
17441         * configure.ac: Check for LZO version 2.
17443         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
17444         lzo/lzo1x.h instead of lzo1x.h.
17446         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
17447         of -llzo.
17449         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
17450         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
17452         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
17453         copying the data from PARTITION to P.
17455 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
17457         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
17458         negative, unload the module.
17460         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
17461         map is "pc_partition_map" but not "pc".
17462         (usage): Fix the description. The options are --boot-image and
17463         --core-image but not --boot-file or --core-file.
17464         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
17465         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
17466         DEFAULT_DIRECTORY.
17468         * util/i386/pc/grub-install.in: Do not specify --boot-file or
17469         --core-file. Specify INSTALL_DEVICE as an argument.
17471         * util/console.c: Include config.h.
17472         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
17473         [HAVE_NCURSES_H]: Include ncurses.h.
17474         [HAVE_CURSES_H]: Include curses.h.
17475         [!A_NORMAL] (A_NORMAL): Defined as zero.
17476         [!A_STANDOUT] (A_STANDOUT): Likewise.
17478         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
17479         -lncurses.
17480         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
17482         * configure.ac: Check for curses libraries and headers.
17484         * Makefile.in (LIBCURSES): New variable.
17486         * genmk.rb (Script::rule): Set the executable bits.
17488         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
17489         name of the PC partition map is "pc_partition_map" but not "pc".
17491 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
17493         * util/i386/pc/grub-install.in (grub_probefs): New variable.
17494         (modules): Likewise.
17495         (usage): Added descriptions for --modules and --grub-probefs.
17496         Handle --modules and --grub-probefs. Save the arguments in MODULES
17497         and GRUB_PROBEFS, respectively.
17498         Auto-detect a filesystem module against GRUBDIR. If the result is
17499         empty and modules are not specified explicitly, abort the
17500         installation. Add the result to MODULES.
17502         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
17503         disk/powerpc/ieee1275/ofdisk.c,
17504         include/grub/powerpc/ieee1275/init.h and
17505         term/powerpc/ieee1275/ofconsole.c.
17506         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
17507         term/ieee1275/ofconsole.c.
17509         * include/grub/powerpc/ieee1275/console.h: Resurrected.
17511         * COPYING: Upgraded to the latest version. Only the address of the
17512         FSF office has changed.
17514 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
17516         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17517         kern/ieee1275.c with kern/ieee1275/of.c.
17519         * kern/ieee1275.c: Moved to ...
17520         * kern/ieee1275/of.c: ... here.
17522 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
17524         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
17525         readability.
17527         * config.guess: Updated to the latest version from gnulib.
17528         * config.sub: Likewise.
17529         * install.sh: Likewise.
17530         * mkinstalldirs: Likewise.
17532         * include/grub/console.h: Removed. This file is arch-specific. Do
17533         not put this in include/grub.
17535         * include/grub/i386/pc/console.h: Resurrected.
17537         * util/console.c: Include grub/machine/console.h instead of
17538         grub/console.h.
17539         * util/grub-emu.c: Likewise.
17541 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
17543         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
17544         hardcoded value.
17546         From Vincent Pelletier  <subdino2004@yahoo.fr>
17547         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
17548         Redefined to use grub_getwh.
17549         (grub_term): New member named getwh.
17550         (grub_getwh): New prototype.
17551         * kern/term.c (grub_getwh): New function.
17552         * term/i386/pc/console.c (grub_console_getwh): New function.
17553         (grub_console_term): New member `getwh'.
17554         * term/i386/pc/vga.c (grub_vga_getwh): New function.
17555         (grub_vga_term): New member `getwh'.
17556         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
17557         grub_ssize_t.
17558         (grub_ofconsole_getw): New function.
17559         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
17560         (grub_ofconsole_term): New field named getwh and new initial
17561         value.
17563 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
17565         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
17566         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
17567         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
17568         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
17569         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
17570         of <grub/machine/ieee1275.h>.
17571         * commands/ieee1275/reboot.c: Likewise.
17572         * boot/powerpc/ieee1275/ieee1275.c: Move ...
17573         * kern/ieee1275.c: ... to here.  All users updated.  Change all
17574         parameter structs to use new type `grub_ieee1275_cell_t'.
17575         * term/powerpc/ieee1275/ofconsole.c: Move ...
17576         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
17577         * disk/powerpc/ieee1275/ofdisk.c: Move ...
17578         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
17579         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
17580         to return int.
17581         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
17582         Remove unused prototypes.  All users updated.
17583         * include/grub/powerpc/ieee1275/console.h: Removed.
17584         * include/grub/powerpc/ieee1275/ieee1275.h: Define
17585         `grub_ieee1275_cell_t'.
17586         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
17587         Cast comparisons with -1 to the correct type.
17588         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
17589         type to match `grub_ieee1275_entry_fn'.
17591 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
17593         * DISTLIST: Added util/i386/pc/grub-probefs.c.
17595         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
17596         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
17597         partmap/sun.c.
17598         (grub_probefs_SOURCES): New variable.
17600         * util/i386/pc/grub-probefs.c: New file.
17602         * util/i386/pc/grub-setup.c (main): Call
17603         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
17604         grub_hfs_init and grub_jfs_init to initialize the system. Call
17605         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
17606         grub_pc_partition_map_fini to finish the system.
17608 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
17610         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
17611         function.
17612         (grub_multiboot_load_elf32): Likewise.
17613         (grub_multiboot_is_elf64): Likewise.
17614         (grub_multiboot_load_elf64): Likewise.
17615         (grub_multiboot_load_elf): Likewise.
17616         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
17617         an ELF32 or ELF64 file.
17618         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
17620         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
17621         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
17622         NULL before calling FS->LABEL.
17623         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
17624         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
17625         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
17626         before calling FS->LABEL.
17628 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
17630         * util/i386/pc/grub-install.in (datadir): New variable.
17631         (libdir): Removed.
17632         (pkgdatadir): New variable.
17633         (pkglibdir): Removed.
17635 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
17637         * DISTLIST: Added util/i386/pc/grub-install.in.
17639         * util/i386/pc/grub-install.in: New file.
17641         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
17642         (grub_install_SOURCES): Likewise.
17644         * genmk.rb: Added support for scripts.
17645         (Script): New class.
17646         (scripts): New variable.
17648         * Makefile.in (install-local): Install sbin_SCRIPTS by
17649         INSTALL_SCRIPT.
17650         (uninstall): Remove sbin_SCRIPTS.
17652         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
17653         device, try to get a GRUB device by
17654         grub_util_biosdisk_get_grub_dev.
17655         Free DEST_DEV.
17657         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
17658         description for --device-map.
17660 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17662         Change the semantics of variable hooks. They now return strings
17663         instead of error values.
17665         * util/i386/pc/grub-setup.c: Include grub/env.h.
17666         (setup): Use grub_device_set_root instead of grub_env_set.
17668         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
17669         grub_env_get instead of grub_device_set_root and
17670         grub_device_get_root, respectively.
17672         * kern/main.c (grub_env_write_root): New function.
17673         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
17674         grub_env_set instead of grub_device_set_root.
17676         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
17677         many variables.
17678         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
17679         rather than calling ENV->WRITE_HOOK afterwards.
17680         (grub_env_get): Return the result of ENV->READ_HOOK rather than
17681         passing a pointer of a pointer.
17682         (grub_register_variable_hook): Change the types of "read_hook" and
17683         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
17684         respectively.
17685         Allocate the default empty string on the heap, because this string
17686         may be freed later.
17688         * kern/device.c: Include grub/env.h.
17689         (grub_device_set_root): Removed.
17690         (grub_device_get_root): Likewise.
17691         (grub_device_open): Use grub_env_get instead of
17692         grub_device_get_root.
17694         * include/grub/env.h (grub_env_read_hook_t): New type.
17695         (grub_env_write_hook_t): Likewise.
17696         (grub_env_var): Change the types of "read_hook" and "write_hook"
17697         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
17698         (grub_register_variable_hook): Likewise.
17700         * include/grub/device.h (grub_device_set_root): Removed.
17701         (grub_device_set_root): Likewise.
17703         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
17704         make sure that DIRNAME terminates with '/', so that
17705         grub_fat_find_dir will fail if PATH is not a directory.
17707         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
17708         from DIRNAME.
17709         Use the qualifier auto for print_files and print_files_long.
17710         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
17711         as a regular file.
17712         Put a newline only if there is no error.
17713         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
17714         used.
17716 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
17718         * kern/partition.c (grub_partition_probe): Initialize PART to
17719         NULL. Otherwise, when no partition map is registered, this returns
17720         a garbage.
17722 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
17724         * partmap/apple.c (apple_partition_map_iterate): Check if POS
17725         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
17726         valid.
17728 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
17730         * commands/ls.c (grub_ls_list_disks): Print the filesystem
17731         information on each device, if it does not have partitions. Print
17732         "Device" instead of "Disk", because this function is not specific
17733         to disk devices.
17735         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
17736         static to ensure that it is put on the memory rather than a
17737         register.
17739 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17741         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
17742         (grub_cat_init): Likewise.
17743         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
17744         (options): Likewise.
17745         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
17746         (grub_configfile_init): Likewise.
17747         * font/manager.c (GRUB_MOD_INIT): Likewise.
17748         * commands/help.c (GRUB_MOD_INIT): Likewise.
17749         (grub_help_init): Likewise.
17750         * normal/command.c (grub_command_init): Likewise.
17751         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
17752         * disk/loopback.c (grub_loop_init): Likewise.
17753         (GRUB_MOD_INIT): Likewise.
17754         * commands/ls.c (grub_ls_init): Likewise.
17755         (GRUB_MOD_INIT): Likewise.
17756         (options): Likewise.
17757         * commands/boot.c (grub_boot_init): Likewise.
17758         (GRUB_MOD_INIT): Likewise.
17759         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
17760         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
17761         (GRUB_MOD_INIT): Likewise.
17762         * commands/cmp.c (grub_cmp_init): Likewise.
17763         (GRUB_MOD_INIT): Likewise.
17765         * normal/arg.c: Use <> instead of "" to include header files.
17766         (SHORT_ARG_HELP): New macro.
17767         (SHORT_ARG_USAGE): Likewise.
17768         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
17769         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
17770         descriptions.
17771         (find_short): Check if C is 'h' or 'u' explicitly.
17772         (grub_arg_show_help): Use space characters instead of tabs. Treat
17773         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
17774         are shown with --help and --usage only if they are not used for
17775         the command itself.
17776         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
17777         'h' and 'u'.
17779         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
17780         const into "longarg". Change the type of "shortarg" to int.
17782 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17784         * boot/i386/pc/boot.S (boot_drive_check): New label.
17786         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
17787         macro.
17789         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
17790         which do not pass a boot drive correctly. Copied from GRUB Legacy.
17792 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17794         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
17795         When turning off Gate A20, skip the check and return immediately,
17796         because this is not fatal usually.
17798 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
17800         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
17801         be 0x7C00 instead of 0x8000.
17803         * boot/i386/pc/pxeboot.S: Rewritten.
17805         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
17806         EXT_C.
17807         (gate_a20_check_state): Read a byte from 0x108000. Invert the
17808         result.
17810 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
17812         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
17813         robustness. This routine now supports a BIOS call and System
17814         Control Port A to modify the gate A20.
17816         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17817         Increased to 0x440.
17819 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
17821         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
17822         device path and resulting ihandle.
17823         (grub_ofdisk_close): dprintf the ihandle being closed.
17824         (grub_ofdisk_read): dprintf function parameters.
17825         * kern/mm.c (grub_mm_init_region): Likewise.
17826         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
17827         (grub_linux_boot): dprintf the Linux entry point, initrd address and
17828         size, and boot arguments.
17829         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
17830         before loading into memory.
17831         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
17832         before loading into memory.
17834 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
17836         * kern/mm.c: Added much documentation.
17837         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
17838         8, set to 5 instead of 8.
17840 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17842         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
17844         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
17845         (grub_mkdevicemap_SOURCES): New variable.
17847         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
17848         lib/device.c of GRUB Legacy.
17850 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
17852         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
17853         instead of PATH is NULL.
17855 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
17857         * commands/cmp.c (BUFFER_SIZE): New macro.
17858         (grub_cmd_cmp): Close the right file at the right time.  Compare
17859         only data just read.  Don't report files of different  size as
17860         identical.  Dynamically allocate buffers.  Move variable
17861         declarations at the beginning of function.
17863 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
17865         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
17866         reverse.
17868 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
17870         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
17871         when backspace is pressed at beginning of line.
17873 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
17875         * DISTLIST: Added genfslist.sh.
17877         * normal/main.c (fs_module_list): New variable.
17878         (autoload_fs_module): New function.
17879         (read_fs_list): Likewise.
17880         (grub_normal_execute): Call read_fs_list.
17882         * kern/fs.c (grub_fs_autoload_hook): New variable.
17883         (grub_fs_probe): Added support for auto-loading.
17885         * include/grub/normal.h (struct grub_fs_module_list): New struct.
17886         (grub_fs_module_list_t): New type.
17888         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
17889         (grub_fs_autoload_hook): New prototype.
17891         * genfslist.sh: New file.
17893         * genmk.rb: Added a rule to generate a filesystem list.
17895 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
17897         * configure.ac: Fix the test for cross-compiling.
17899         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
17900         define GRUB_UTIL anymore.
17902         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
17903         so this function works on other systems than just big endian.
17904         (load_modules): Likewise.
17905         (add_segments): Likewise.
17907 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
17909         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
17910         contains `l' modifier, get a long from va_arg().
17912 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
17914         * kern/mm.c (grub_free): If the next free block which is being
17915         merged is the first free block, set the first block to the block
17916         being freed.
17917         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
17919 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17921         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
17922         `grub_ieee1275_chosen'.
17924 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
17926         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
17927         (grub_ieee1275_chosen): New variable.
17928         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
17929         `chosen'.
17930         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
17931         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17932         Rename first argument to `phandle' for consistency.
17933         (grub_ieee1275_get_property_length): Likewise.
17934         (grub_ieee1275_next_property): Likewise.  Change type of first argument
17935         to grub_ieee1275_phandle_t.
17936         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
17937         Move export next to declaration.
17938         (grub_ieee1275_chosen): New variable.
17939         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
17940         Correct cosmetic typo.
17941         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
17942         `grub_ieee1275_chosen'.
17943         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
17944         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
17945         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
17946         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
17947         `grub_ieee1275_chosen'.
17949 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
17951         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
17952         /chosen/bootargs.
17953         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
17954         /chosen/bootargs as "variable=value" pairs.
17956 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
17958         * include/grub/misc.h (grub_dprintf): New macro.
17959         (grub_real_dprintf): New prototype.
17960         (grub_strword): Likewise.
17961         (grub_iswordseparator): Likewise.
17962         * kern/misc.c (grub_real_dprintf): New function.
17963         (grub_strword): Likewise.
17964         (grub_iswordseparator): Likewise.
17966 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
17968         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
17969         (roundup): Remove macro.
17970         (grub_ieee1275_flags): Make static.
17971         (grub_ieee1275_realmode): Remove.
17972         (grub_ieee1275_test_flag): New function.
17973         (grub_ieee1275_set_flag): Likewise.
17974         (find_options): Rename to `grub_ieee1275_find_options'; update
17975         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
17976         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
17977         (cmain): New prototype.
17978         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
17979         `grub_ieee1275_flags' directly.
17980         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
17981         machine/biosdisk.h.
17982         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
17983         Don't include grub/machine/init.h.
17984         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
17985         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17986         Remove prototype.
17987         (grub_ieee1275_realmode): Likewise.
17988         (grub_ieee1275_flag): New enum.
17989         (grub_ieee1275_test_flag): New prototype.
17990         (grub_ieee1275_set_flag): New prototype.
17991         * include/grub/powerpc/ieee1275/init.h: Remove file.
17992         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
17993         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
17994         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
17995         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
17996         comment.
17997         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
17998         `grub_ieee1275_test_flag'.
17999         (grub_ieee1275_encode_devname): Likewise.
18001 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
18003         * include/grub/powerpc/ieee1275/ieee1275.h
18004         (grub_ieee1275_encode_devname): New prototype.
18005         (grub_ieee1275_get_filename): Likewise.
18006         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
18007         function.
18008         (grub_set_prefix): Likewise.
18009         (grub_machine_init): Call grub_set_prefix.
18010         * kern/powerpc/ieee1275/openfw.c: Fix typos.
18011         (grub_parse_type): New enum.
18012         (grub_ieee1275_get_devargs): New function.
18013         (grub_ieee1275_get_devname): Likewise.
18014         (grub_ieee1275_parse_args): Likewise.
18015         (grub_ieee1275_get_filename): Likewise.
18016         (grub_ieee1275_encode_devname): Likewise.
18018 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
18020         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
18021         `grub_loader_unset'.
18023 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
18025         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
18026         instead of grub_ieee1275_interpret.
18027         (grub_halt_init): New function.
18028         (grub_halt_fini): Likewise.
18029         (GRUB_MOD_INIT): Correct message grammar.
18030         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
18031         instead of grub_ieee1275_interpret.
18032         (grub_reboot_init): New function.
18033         (grub_reboot_fini): Likewise.
18034         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
18035         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
18036         util/i386/pc/misc.c with commands/ieee1275/halt.c,
18037         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
18038         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
18039         function.
18040         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
18041         Add prototype.
18042         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
18043         prototype.
18044         (grub_halt): Likewise.
18045         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
18046         (cmain): Remove __attribute__((unused)).
18047         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
18048         (grub_heap_len): Likewise.
18049         (grub_machine_fini): New function.
18050         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
18051         (grub_halt): Likewise.
18052         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
18053         function.
18054         * util/powerpc/ieee1275/misc.c: New file.
18056 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
18058         * DISTLIST: New file.
18059         * gendistlist.sh: Likewise.
18061         * Makefile.in (COMMON_DISTFILES): Removed.
18062         (BOOT_DISTFILES): Likewise.
18063         (CONF_DISTFILES): Likewise.
18064         (DISK_DISTFILES): Likewise.
18065         (FS_DISTFILES): Likewise.
18066         (INCLUDE_DISTFILES): Likewise.
18067         (KERN_DISTFILES): Likewise.
18068         (LOADER_DISTFILES): Likewise.
18069         (TERM_DISTFILES): Likewise.
18070         (UTIL_DISTFILES): Likewise.
18071         (DISTFILES): Likewise.
18072         (uninstall): Uninstall files in $(pkgdata_DATA).
18073         (DISTLIST): New target.
18074         (distdir): Use the contents of the file DISTLIST to get a list of
18075         distributed files.
18077 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
18079         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
18080         descriptor. This is ported from GRUB Legacy.
18082         * gencmdlist.sh: Added an extra semicolon to make it work with
18083         old sed versions. Reported by Robert Bihlmeyer
18084         <robbe@orcus.priv.at>.
18086 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
18088         Automatic loading of commands is supported.
18090         * normal/main.c (read_command_list): New function.
18091         (grub_normal_execute): Call read_command_list.
18093         * normal/command.c (grub_register_command): Return zero or CMD.
18094         Allocate CMD->NAME from the heap.
18095         Initialize CMD->MODULE_NAME to zero.
18096         Find the same name as well. If the same command is found and it is
18097         a dummy command, overwrite members. If it is not a dummy command,
18098         return zero.
18099         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
18100         (grub_command_find): If a dummy command is found, load a module
18101         and retry to find a command only once.
18103         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
18104         make sure that each command is loaded.
18106         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
18107         macro.
18108         (struct grub_command): Remove const from the member `name'.
18109         Add a new member `module_name'.
18110         (grub_register_command): Return grub_command_t.
18112         * commands/help.c (grub_cmd_help): Call grub_command_find to make
18113         sure that each command is loaded.
18115         * genmk.rb (PModule::rule): Specify a module name without the
18116         suffix ".mod" to gencmdlist.sh.
18118 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
18120         * gencmdlist.sh: New file.
18122         * genmk.rb (PModule::rule): Generate a rule for a command list.
18123         Clean command.lst.
18124         Generate command.lst from $(COMMANDFILES).
18126         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
18127         (DATA): Added $(pkgdata_DATA).
18128         (install-local): Install files in $(pkgdata_DATA).
18130 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
18132         * term/i386/pc/vga.c (debug_command): Removed.
18133         (GRUB_MOD_INIT): Do not register the command "debug".
18135         From Hollis Blanchard:
18136         * commands/configfile.c: New file.
18137         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18138         commands/configfile.c.
18139         (pkgdata_MODULES): Added configfile.mod.
18140         (configfile_mod_SOURCES): New variable.
18141         (configfile_mod_CFLAGS): Likewise.
18142         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
18143         commands/configfile.c.
18144         (pkgdata_MODULES): Added configfile.mod.
18145         (configfile_mod_SOURCES): New variable.
18146         (configfile_mod_CFLAGS): Likewise.
18147         * util/grub-emu.c (main): Call grub_configfile_init and
18148         grub_configfile_fini.
18149         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
18150         prototype.
18151         [GRUB_UTIL] (grub_configfile_fini): Likewise.
18153 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
18155         * normal/arg.c (grub_arg_show_help): Do not show the bug report
18156         address.
18158         * commands/help.c (grub_cmd_help): Do not print newlines after
18159         the last command in print_command_help.
18161 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
18163         * commands/default.h: New file.
18164         * commands/timeout.h: Likewise.
18165         * normal/context.c: Likewise.
18167         * util/misc.c: Do not include sys/times.h.
18168         Include sys/time.h and grub/machine/time.h.
18169         (grub_get_rtc): Rewritten with gettimeofday.
18171         * util/grub-emu.c (main): Call grub_default_init and
18172         grub_timeout_init before grub_normal_init, and call
18173         grub_timeout_fini and grub_default_fini after grub_main.
18175         * util/console.c (grub_ncurses_checkkey): Return the read
18176         character or -1.
18178         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
18179         timeouts.
18181         * normal/main.c (read_config_file): Push MENU. If this fails,
18182         print an error and wait for a user input.
18183         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
18184         If a menu is empty or an error occurs, pop MENU.
18185         (grub_normal_execute): Pop and free MENU after grub_menu_run
18186         returns.
18188         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
18190         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
18191         include time.h.
18192         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18193         without GRUB_UTIL.
18194         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
18195         time.h.
18196         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
18197         without GRUB_UTIL.
18199         * include/grub/normal.h (struct grub_menu_list): New struct.
18200         (grub_menu_list_t): New type.
18201         (struct grub_context): New struct.
18202         (grub_context_t): New type.
18203         (grub_register_command): Got rid of EXPORT_FUNC.
18204         (grub_unregister_command): Likewise.
18205         (grub_context_get): New prototype.
18206         (grub_context_get_current_menu): Likewise.
18207         (grub_context_push_menu): Likewise.
18208         (grub_context_pop_menu): Likewise.
18209         [GRUB_UTIL] (grub_default_init): Likewise.
18210         [GRUB_UTIL] (grub_default_fini): Likewise.
18211         [GRUB_UTIL] (grub_timeout_init): Likewise.
18212         [GRUB_UTIL] (grub_timeout_fini): Likewise.
18214         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
18215         commands/timeout.c and normal/context.c.
18216         (pkgdata_MODULES): Added default.mod and timeout.mod.
18217         (normal_mod_SOURCES): Added normal/context.c.
18218         (default_mod_SOURCES): New variable.
18219         (default_mod_CFLAGS): Likewise.
18220         (timeout_mod_SOURCES): Likewise.
18221         (timeout_mod_CFLAGS): Likewise.
18222         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
18223         conf/i386-pc.rmk.
18224         (pkgdata_MODULES): Added default.mod and timeout.mod.
18225         (normal_mod_SOURCES): Added normal/context.c.
18226         (default_mod_SOURCES): New variable.
18227         (default_mod_CFLAGS): Likewise.
18228         (timeout_mod_SOURCES): Likewise.
18229         (timeout_mod_CFLAGS): Likewise.
18231         * Makefile.in (all-local): Added $(MKFILES).
18233 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
18235         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
18236         (grub_emu_SOURCES): Likewise.
18237         (pkgdata_MODULES): Add `sun.mod'.
18238         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18239         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18240         `partmap/sun.c'.
18241         (pkgdata_MODULES): Add `sun.mod'.
18242         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
18243         * include/grub/partition.h (grub_sun_partition_map_init): New
18244         prototype.
18245         (grub_sun_partition_map_fini): Likewise.
18246         * partmap/sun.c: New file.
18247         * util/grub-emu.c (main): Initialize and de-initialize the sun
18248         partitionmap support.
18250 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
18252         This implements an Emacs-like menu entry editor.
18254         * normal/menu_entry.c: New file.
18256         * util/console.c (grub_ncurses_putchar): Translate some Unicode
18257         characters to ASCII.
18258         (saved_char): New variable.
18259         (grub_ncurses_checkkey): Rewritten completely.
18260         (grub_ncurses_getkey): Likewise.
18261         (grub_ncurses_init): Call raw instead of cbreak.
18263         * normal/menu.c (print_entry): Do not put a space.
18264         (init_page): Renamed to ...
18265         (grub_menu_init_page): ... this. All callers changed.
18266         (edit_menu_entry): Removed.
18267         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
18269         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
18271         * kern/misc.c (grub_vprintf): Call grub_refresh.
18273         * normal/menu.c (DISP_LEFT): Renamed to ...
18274         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
18275         * normal/menu.c (DISP_UP): Renamed to ...
18276         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
18277         * normal/menu.c (DISP_RIGHT): Renamed to ...
18278         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
18279         * normal/menu.c (DISP_DOWN): Renamed to ...
18280         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
18281         * normal/menu.c (DISP_HLINE): Renamed to ...
18282         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
18283         * normal/menu.c (DISP_VLINE): Renamed to ...
18284         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
18285         * normal/menu.c (DISP_UL): Renamed to ...
18286         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
18287         * normal/menu.c (DISP_UR): Renamed to ...
18288         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
18289         * normal/menu.c (DISP_LL): Renamed to ...
18290         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
18291         * normal/menu.c (DISP_LR): Renamed to ...
18292         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
18293         * normal/menu.c (TERM_WIDTH): Renamed to ...
18294         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
18295         * normal/menu.c (TERM_HEIGHT): Renamed to ...
18296         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
18297         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
18298         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
18299         * normal/menu.c (TERM_MARGIN): Renamed to ...
18300         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
18301         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
18302         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
18303         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
18304         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
18305         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
18306         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
18307         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
18308         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
18309         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
18310         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
18311         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
18312         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
18313         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
18314         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
18315         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
18316         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
18317         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
18318         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
18319         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
18320         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
18321         All callers changed.
18323         * include/grub/normal.h: New prototype.
18325         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18326         normal/menu_entry.c.
18327         (normal_mod_SOURCES): Likewise.
18328         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
18329         (normal_mod_SOURCES): Likewise.
18331 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
18333         * include/grub/normal.h (grub_halt_init): New prototype.
18334         (grub_halt_fini): Likewise.
18335         (grub_reboot_init): Likewise.
18336         (grub_reboot_fini): Likewise.
18338         * util/grub-emu.c: Include signal.h.
18339         (main_env): New global variable.
18340         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
18341         catch C-c.
18342         (grub_machine_fini): New function.
18343         (main): Call grub_halt_init and grub_reboot_init before
18344         grub_main, and grub_reboot_fini and grub_halt_fini after it.
18345         Call setjmp with MAIN_ENV to go back afterwards.
18346         Call grub_machine_fini right before return.
18348         * include/grub/util/misc.h: Include setjmp.h.
18349         (main_env): New prototype.
18351         * include/grub/kernel.h (grub_machine_fini): New prototype.
18352         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
18353         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
18355         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
18356         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
18357         * term/i386/pc/console.c (grub_console_fini): Likewise.
18359         * util/i386/pc/misc.c: New file.
18361         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
18362         util/i386/pc/misc.c, commands/i386/pc/halt.c and
18363         commands/i386/pc/reboot.c.
18365 2005-02-14  Guillem Jover  <guillem@hadrons.org>
18367         * include/grub/dl.h (grub_dl_check_header): New prototype.
18368         (grub_arch_dl_check_header): Change return type to grub_err_t,
18369         remove size parameter and export function.  Update all callers.
18370         * kern/dl.c (grub_dl_check_header): New function.
18371         (grub_dl_load_core): Use `grub_dl_check_header' instead of
18372         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
18373         are inside the core.
18374         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
18375         independent ELF header checks.
18376         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18377         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
18378         `grub_dl_check_header' instead of explicit checks.  Check for the
18379         ELF type.
18380         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
18381         `grub_dl_check_header' instead of explicit checks.  Remove arch
18382         specific ELF header checks.
18384         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
18385         argument SIZE.
18387 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
18389         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
18390         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
18392 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
18394         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
18395         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
18396         (part_map_iterate): Clear `grub_errno' and return 0 if
18397         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
18398         * partmap/amiga.c (amiga_partition_map_iterate): Return
18399         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
18400         * partmap/apple.c (apple_partition_map_iterate): Likewise.
18402 2005-02-01  Guillem Jover  <guillem@hadrons.org>
18404         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
18405         help info.
18407 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
18409         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
18410         Removed prototype.
18411         (grub_rescue_cmd_linux): New prototype.
18412         (grub_rescue_cmd_initrd): Likewise.
18413         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
18414         `bi_rec'.
18415         (grub_linux_release_mem): Release the memory for the initrd.
18416         (grub_load_linux): Renamed from this...
18417         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
18418         Changed `entry' not to be static.  Loop over memory regions to
18419         find another one when the default fails.
18420         (grub_rescue_cmd_initrd): New function.
18421         (grub_linux_init): Remove function.
18422         (grub_linux_fini): Likewise.
18423         (GRUB_MOD_INIT): Register `initrd'.
18424         (GRUB_MOD_FINI): Unregister `initrd'.
18425         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
18426         Function removed.
18427         (grub_linux_normal_fini): Likewise.
18428         (GRUB_MOD_INIT): Register `initrd'.
18429         (GRUB_MOD_FINI): Unregister `initrd'.
18431 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
18433         * commands/help.c: New file.
18434         * normal/arg.c (show_help): Renamed to...
18435         (grub_arg_show_help): ... this.
18436         * commands/i386/pc/halt.c: New file.
18437         * commands/i386/pc/reboot.c: Likewise.
18438         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
18439         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
18440         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
18441         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
18442         variables.
18443         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18444         `commands/help.c'.
18445         (pkgdata_MODULES): Add `help.mod'.
18446         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
18447         * grub/i386/pc/init.h (grub_reboot): New prototype.
18448         (grub_halt): Likewise.
18449         * include/grub/normal.h (grub_arg_show_help): New prototype.
18450         (grub_help_init): Likewise.
18451         (grub_help_fini): Likewise.
18452         * util/grub-emu.c (main): Initialize and deinitialize the help
18453         command.
18455         * normal/cmdline.c (grub_cmdline_get): Doc fix.
18457         * normal/command.c (grub_command_init): Fixed the description of
18458         the `set' and `unset' commands.
18460 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
18462         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
18463         function.
18464         * commands/ieee1275/halt.c: New file.
18465         * commands/ieee1275/reboot.c: Likewise.
18466         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
18467         `__attribute__ ((unused))'.  Some GCS related fixed.
18468         (grub_suspend_init) [GRUB_UTIL]: Function removed.
18469         (grub_suspend_fini): Likewise.
18470         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
18471         and `halt.mod'.
18472         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
18473         (halt_mod_CFLAGS): New variables.
18474         * include/grub/powerpc/ieee1275/ieee1275.h
18475         (grub_ieee1275_interpret): New prototype.
18477 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
18479         * include/grub/misc.h (memmove): New prototype.
18480         (memcpy): Likewise.
18482 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
18484         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
18485         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
18487 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
18489         * kern/misc.c (grub_strndup): Function rewritten.
18491 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
18493         * normal/menu.c (TERM_WIDTH): Macro redefined.
18494         (TERM_TOP_BORDER_Y): Likewise.
18495         (draw_border): Replaced while-loop by a for-loop.  Make the number
18496         of lines consistent with the number of lines displayed in
18497         print_entries.  Added a margin below the rectangle.
18498         (print_entry): Make the entry fit in the rectangle.
18499         (print_entries): Display the scroll arrows next to the right
18500         border.
18502 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
18504         * fs/minix.c (grub_minix_find_file): Reserve more space for
18505         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
18506         `grub_strncpy' to copy `path' into it.
18508 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
18510         Add the loopback device, a device via which files can be accessed
18511         as devices.
18513         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
18514         (pkgdata_MODULES): Add loopback.mod.
18515         (loopback_mod_SOURCES): New variable.
18516         (loopback_mod_CFLAGS): Likewise.
18517         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18518         `disk/loopback.c'.
18519         (pkgdata_MODULES): Add loopback.mod.
18520         (loopback_mod_SOURCES): New variable.
18521         (loopback_mod_CFLAGS): Likewise.
18522         * disk/loopback.c: new file.
18523         * include/grub/normal.h (grub_loop_init): New prototype.
18524         (grub_loop_fini): New prototype.
18525         * util/grub-emu.c (main): Initialize and de-initialize loopback
18526         support.
18527         * include/grub/disk.h (grub_disk_dev_id): Add
18528         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
18530 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
18532         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
18533         function.
18534         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
18535         (suspend_mod_SOURCES): New variable.
18536         (suspend_mod_CFLAGS): Likewise.
18537         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
18538         New prototype.
18539         * commands/ieee1275/suspend.c: New file.
18541 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
18543         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
18544         ((unused))' to `__attribute__ ((used))'.
18545         (GRUB_MOD_FINI): Likewise.
18546         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
18547         * genmk.rb (PModule): Assign space to common symbols when linking
18548         modules.
18550 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
18552         * include/grub/mm.h (grub_mm_init_region): Change the type of the
18553         `unsigned' arguments to `grub_size_t'.
18554         (grub_malloc): Likewise.
18555         (grub_realloc): Likewise.
18556         (grub_memalign): Likewise.
18557         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
18558         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18559         * util/misc.c (grub_malloc): Likewise.
18560         (grub_realloc): Likewise.
18561         * kern/mm.c (get_header_from_pointer): Change the casts to
18562         `unsigned' into a cast to `grub_size_t'.
18564         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
18565         point to `currnode' when `currnode' is changed.
18567         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
18568         Schottelius <nico-linux@schottelius.org>.
18570 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
18572         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
18573         (note_path): Remove variable.
18574         (GRUB_IEEE1275_NOTE_NAME): New macro.
18575         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
18576         (grub_ieee1275_note_hdr): New structure.
18577         (grub_ieee1275_note_desc): Likewise.
18578         (grub_ieee1275_note): Likewise.
18579         (load_note): Remove `dir' argument.  All callers updated.  Remove
18580         `note_img' and `path'.  Do not load a file from `note_path'.
18581         Initialize a struct grub_ieee1275_note and write that to `out'.
18582         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
18584 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
18586         * util/misc.c (grub_util_read_image): Revert last change.  It
18587         called `grub_util_read_at', which seeks from the beginning of the
18588         file.
18590 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
18592         * TODO: Add note about endianness in grub-mkimage.
18593         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
18594         section.
18595         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
18596         (grub_mkimage_SOURCES): New target.
18597         * include/grub/kernel.h (grub_start_addr): Remove variable.
18598         (grub_end_addr): Likewise.
18599         (grub_total_module_size): Likewise.
18600         (grub_kernel_image_size): Likewise.
18601         (GRUB_MODULE_MAGIC): New constant.
18602         (grub_module_info): New structure.
18603         (grub_arch_modules_addr): New prototype.
18604         (grub_get_end_addr): Remove prototype.
18605         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
18606         * include/grub/powerpc/ieee1275/kernel.h: New file.
18607         * include/grub/util/misc.h (grub_util_get_fp_size): New
18608         prototype.
18609         (grub_util_read_at): Likewise.
18610         (grub_util_write_image_at): Likewise.
18611         * kern/main.c (grub_get_end_addr): Remove function.
18612         (grub_load_modules): Call grub_arch_modules_addr instead of using
18613         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
18614         the grub_module_info fields instead of calling grub_get_end_addr
18615         as loop conditions.  Move grub_add_unused_region code here.
18616         (grub_add_unused_region): Remove function.
18617         * kern/i386/pc/init.c: Include grub/cache.h.
18618         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
18619         one call to add_mem_region.
18620         (grub_arch_modules_addr): New function.
18621         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
18622         (grub_total_module_size): Likewise.
18623         Include grub/machine/kernel.h.
18624         (grub_arch_modules_addr): New function.
18625         * util/grub-emu.c (grub_end_addr): Remove variable.
18626         (grub_total_module_size): Likewise.
18627         (grub_arch_modules_addr): New function.
18628         * util/misc.c: Include unistd.h.
18629         (grub_util_get_fp_size): New function.
18630         (grub_util_read_at): Likewise.
18631         (grub_util_write_image_at): Likewise.
18632         (grub_util_read_image): Call grub_util_read_at.
18633         (grub_util_write_image): Call grub_util_write_image_at.
18634         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
18635         additional memory in kernel_img for a struct grub_module_info.
18636         Fill in that grub_module_info.
18637         * util/powerpc/ieee1275/grub-mkimage.c: New file.
18639 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18641         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
18642         New function.
18643         * include/grub/powerpc/ieee1275/ieee1275.h
18644         (grub_ieee1275_milliseconds): New prototype.
18645         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
18646         Change to 1000.
18647         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
18648         grub_ieee1275_milliseconds.
18650 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
18652         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
18653         variable.
18654         (find_options): New function.
18655         (cmain): Call find_options.
18656         * include/grub/powerpc/ieee1275/ieee1275.h
18657         (grub_ieee1275_realmode): New extern variable.
18658         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
18659         grub_map if grub_ieee1275_realmode is false.
18661 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
18663         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
18664         lines are inserted and make it work like readline.  Reported by
18665         Vincent Pelletier <subdino2004@yahoo.fr>.
18667 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
18669         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
18671         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
18672         `kern/powerpc/cache.S'.
18674 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
18676         * genmk.rb: Handle the `Program' class in the main loop.  Written
18677         by Johan Rydberg <jrydberg@gnu.org>.
18678         (Program): New class.
18679         (programs): New variable.
18680         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
18681         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
18682         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
18683         (help_arch): Function removed.
18684         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
18685         `powerpc/libgcc.h' and `loader.h'.
18686         (pkgdata_PROGRAMS): New variable.
18687         (sbin_UTILITIES): Variable removed.
18688         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
18689         (grubof_SOURCES): Variable re-defined so it only includes the
18690         core functionality.
18691         (grubof_CFLAGS): Remove `-DGRUBOF'.
18692         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
18693         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
18694         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
18695         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
18696         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
18697         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
18698         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
18699         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
18700         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
18701         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
18702         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
18703         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
18704         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
18705         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
18706         (pc_mod_CFLAGS): New variables.
18707         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
18708         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
18709         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
18710         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
18711         Moved from here...
18712         * include/grub/i386/pc/init.h (grub_os_area_addr)
18713         (rub_os_area_size): ... to here.
18714         * include/grub/powerpc/ieee1275/ieee1275.h
18715         (grub_ieee1275_entry_fn): Export symbol.
18716         * include/grub/powerpc/ieee1275/init.h: New file.
18717         * include/grub/powerpc/libgcc.h: Likewise.
18718         * include/grub/cache.h: Likewise.
18719         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
18720         <hollis@penguinppc.org>.
18721         * kern/dl.c: Include <grub/cache.h>.
18722         (grub_dl_flush_cache): New function.
18723         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
18724         for this module.
18725         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
18726         (grub_console_init): Removed prototypes.
18727         (grub_machine_init): Don't initialize the modules anymore.
18728         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
18729         static.
18730         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
18731         Macro undef removed.
18732         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
18733         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
18734         relocation `R_PPC_REL32'.  Return an error when the relocation is
18735         unknown.
18736         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
18737         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
18738         * util/misc.c (grub_arch_sync_caches): Likewise.
18740 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
18742         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
18743         `symlist.c', add `grubof_symlist.c'.
18744         (symlist.c): Variable removed.
18745         (grubof_HEADERS): Variable added.
18746         (grubof_symlist.c): New target.
18747         (kernel_syms.lst): Use `grubof_HEADERS' instead of
18748         `kernel_img_HEADERS'.
18749         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
18750         * kern/powerpc/dl.c: New file.
18751         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
18752         Function removed.
18753         (grub_arch_dl_relocate_symbols): Likewise.
18754         (grub_register_exported_symbols): Likewise.
18756 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
18758         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
18759         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
18760         to fail instead.  Reported by Vincent Pelletier
18761         <subdino2004@yahoo.fr>.
18763         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
18764         it is not allocated.  Reported by Vincent Pelletier
18765         <subdino2004@yahoo.fr>.
18767         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
18768         output so the output looks better.
18770 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
18772         Modulize the partition map support and add support for the amiga
18773         partition map.
18775         * commands/ls.c: Include <grub/partition.h> instead of
18776         <grub/machine/partition.h>.
18777         * kern/disk.c: Likewise.
18778         * kern/rescue.c: Likewise.
18779         * loader/i386/pc/chainloader.c: Likewise.
18780         * normal/cmdline.c: Likewise.
18781         * kern/powerpc/ieee1275/init.c: Likewise.
18782         (grub_machine_init): Call `grub_pc_partition_map_init',
18783         `grub_amiga_partition_map_init' and
18784         `grub_apple_partition_map_init'.
18785         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
18786         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
18787         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
18788         `partition.h' and `pc_partition.h'.
18789         (grub_setup_SOURCES): Remove
18790         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
18791         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18792         (grub_emu_SOURCES): Likewise.
18793         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
18794         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
18795         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
18796         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18797         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
18798         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18799         (grubof_SOURCES): Likewise.
18800         * disk/i386/pc/partition.c: File removed.
18801         * disk/powerpc/ieee1275/partition.c: Likewise.
18802         * include/grub/powerpc/ieee1275/partition.h: Likewise.
18803         * include/grub/i386/pc/partition.h: Likewise.
18804         * kern/partition.c: New file.
18805         * partmap/amiga.c: Likewise.
18806         * partmap/apple.c: Likewise.
18807         * partmap/pc.c: Likewise.
18808         * include/grub/partition.h: Likewise..
18809         * include/grub/pc_partition.h: Likewise.
18810         * util/grub-emu.c: Include <grub/partition.h> instead of
18811         <grub/machine/partition.h>.
18812         (main): Call `grub_pc_partition_map_init',
18813         `grub_amiga_partition_map_init' and
18814         `grub_apple_partition_map_init' and deinitialize afterwards.
18815         * util/i386/pc/biosdisk.c: Include `#include
18816         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18817         `<grub/machine/partition.h>'.
18818         * util/i386/pc/grub-setup.c: Likewise.
18819         * util/i386/pc/biosdisk.c: Likewise.
18820         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
18821         partition information in case of a PC partition.
18822         * util/i386/pc/grub-setup.c: Include `#include
18823         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18824         `<grub/machine/partition.h>'.
18825         (setup): Only access the PC specific partition information in case
18826         of a PC partition.
18828 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
18830         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
18831         (grub_longjmp): Likewise.
18832         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
18833         20.
18834         * normal/powerpc/setjmp.S: New file.
18835         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18836         `normal/powerpc/setjmp.S'.
18837         (grubof_CFLAGS): Add `-DGRUBOF'.
18838         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
18839         [GRUB_UTIL && !GRUBOF].
18841 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
18843         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
18844         property named `name'.  Correctly handle the error returned by
18845         `grub_ieee1275_finddevice' if a device can not be opened.
18847 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
18849         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
18850         `actual' for negativity.
18851         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18852         kern/fshelp.c.
18854 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18856         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
18857         (PAGE_OFFSET): New macro.
18858         (CRTC_ADDR_PORT): Likewise.
18859         (CRTC_DATA_PORT): Likewise.
18860         (START_ADDR_HIGH_REGISTER): Likewise.
18861         (START_ADDR_LOW_REGISTER): Likewise.
18862         (GRAPHICS_ADDR_PORT): Likewise.
18863         (GRAPHICS_DATA_PORT): Likewise.
18864         (READ_MAP_REGISTER): Likewise.
18865         (INPUT_STATUS1_REGISTER): Likewise.
18866         (INPUT_STATUS1_VERTR_BIT): Likewise.
18867         (page): New variable.
18868         (wait_vretrace): New function.
18869         (set_read_map): Likewise.
18870         (set_start_address): Likewise.
18871         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
18872         the right page.
18873         (check_vga_mem): Take the page into account.
18874         (write_char): Likewise.
18875         (write_cursor): Likewise.
18876         (scroll_up): Likewise.  Copy the page to the page that is not
18877         shown and switch between both pages.
18878         (grub_vga_putchar): Fix off by one error.
18879         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
18880         account.
18882 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
18884         Add support for iso9660 (including rockridge).
18886         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18887         (iso9660_mod_SOURCES): New variable.
18888         (iso9660_mod_CFLAGS): Likewise.
18889         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18890         * include/grub/fs.h (grub_iso9660_init): New prototype.
18891         * util/grub-emu.c (main): Call `grub_iso9660_init'.
18892         * fs/iso9660.c: New file.
18894         * include/grub/misc.h (grub_strncat): New prototype.
18895         * kern/misc.c (grub_strncat): New function.
18897         * fs/hfs.c (grub_hfs_mount): Translate the error
18898         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
18899         * fs/jfs.c (grub_jfs_mount): Likewise.
18900         * fs/ufs.c (grub_ufs_mount): Likewise.
18902 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
18904         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
18905         which initialized BAT registers.
18906         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
18907         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18908         Move from here...
18909         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
18910         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18911         ... to here.
18912         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
18913         (grub_mapclaim): Likewise.
18914         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
18915         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
18916         hand.
18918 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
18920         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
18921         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
18922         -ffreestanding and -msoft-float.
18924 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
18926         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
18927         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
18928         set in grub_ieee1275_flags.
18930 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
18932         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
18933         prototype.
18934         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
18935         grub_console_init first.
18936         Change the memory range used for grub_ieee1275_claim and
18937         grub_mm_init_region.
18938         Print an error message if the claim fails.
18939         Include <grub/misc.h>.
18941 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
18943         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
18944         Call grub_children_iterate for device nodes of type `scsi',
18945         `ide', or `ata'.
18946         (grub_ofdisk_open): Remove manual device alias resolution.
18947         Fix memory leak when device cannot be opened.
18948         * include/grub/powerpc/ieee1275/ieee1275.h
18949         (grub_children_iterate): New prototype.
18950         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
18951         New function.
18952         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18953         Return -1 if args.size was -1.
18955 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18957         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
18958         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
18959         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
18960         Open Firmware's memory for it; claim memory from _start to _end.
18961         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
18962         (_end): New extern.
18963         (_start): Zero BSS from __bss_start to _end.
18964         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18965         New extern.
18966         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
18968 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
18970         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
18971         -1 if args.base was -1.
18973 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
18975         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
18976         escape sequence instead of a literal ^L. Also call
18977         grub_ofconsole_gotoxy.
18979 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
18981         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
18982         void *  arguments to grub_addr_t.  All callers updated.  Also make
18983         the `result' argument optional.
18984         (grub_ieee1275_release): change void * arguments to grub_addr_t.
18985         All callers updated.
18987 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
18989         * commands/ls.c (grub_ls_list_files): Use the string following the
18990         initial ')', if present, as the filesystem path.
18991         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
18993         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
18995 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
18997         Make the source code of the menu interface more readable.
18999         * normal/menu.c: Include grub/mm.h.
19000         (TERM_WIDTH): New macro.
19001         (TERM_HEIGHT): Likewise.
19002         (TERM_INFO_HEIGHT): Likewise.
19003         (TERM_MARGIN): Likewise.
19004         (TERM_SCROLL_WIDTH): Likewise.
19005         (TERM_TOP_BORDER_Y): Likewise.
19006         (TERM_LEFT_BORDER_X): Likewise.
19007         (TERM_BORDER_WIDTH): Likewise.
19008         (TERM_MESSAGE_HEIGHT): Likewise.
19009         (TERM_BORDER_HEIGHT): Likewise.
19010         (TERM_NUM_ENTRIES): Likewise.
19011         (TERM_FIRST_ENTRY_Y): Likewise.
19012         (TERM_ENTRY_WIDTH): Likewise.
19013         (TERM_CURSOR_X): Likewise.
19014         (draw_border): Use macros instead of magic numbers.
19015         (print_entry): Likewise.
19016         (print_entries): Likewise.
19017         (run_menu): Likewise. Also, handle the key 'e'.
19018         (run_menu_entry): Ignore empty command lines.
19019         (print_message): Added a new argument EDIT. If EDIT is true,
19020         print a different message.
19021         (init_page): Likewise.
19022         (edit_menu_entry): New function. Not implemented yet.
19024 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
19026         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
19027         can be loaded from normal mode.
19029         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
19030         `multiboot.mod'.
19031         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
19032         (multiboot_mod_CFLAGS): New variables.
19033         * loader/i386/pc/linux_normal.c: New file.
19034         * loader/i386/pc/multiboot_normal.c: Likewise.
19036         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
19037         attribute `unused'.
19039         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
19040         `fdiro' to read the mode information from instead of `diro'.
19042         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
19043         looking up a symlink.
19045         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
19046         macro.
19047         * normal/command.c (grub_command_execute): Don't parse the
19048         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
19049         flags of the command.
19051         * normal/menu.c (grub_menu_run): Fix typo.
19053 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
19055         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
19057         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
19058         `y + 1' instead of `y - 1'.
19060         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
19062 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
19064         From Hollis Blanchard <hollis@penguinppc.org>:
19065         * kern/misc.c (memmove): New alias for grub_memmove.
19066         (memcmp): New alias for grub_memcmp.
19067         (memset): New alias for grub_memset.
19068         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
19069         Change "int handle" to "grub_ieee1275_phandle_t handle".
19070         * include/grub/powerpc/ieee1275/ieee1275.h
19071         (grub_ieee1275_get_property): Likewise.
19073 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
19075         Added normal mode command `chainloader' as module chain.mod, which
19076         depends on normal.mod and _chain.mod.
19078         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
19079         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
19080         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
19081         Deleted prototype.
19082         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
19083         but arguments parsing moved to ...
19084         (grub_chainloader_cmd): ... here.  New function.
19085         * include/grub/i386/pc/chainloader.h: New file.
19086         * loader/i386/pc/chainloader_normal.c: Likewise.
19088 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
19090         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
19091         (grub_mkimage_LDFLAGS): Likewise.
19092         (grub_emu_SOURCES): Likewise.
19093         (kernel_img_HEADERS): Added fshelp.h.
19094         * fs/ext2.c: Include <grub/fshelp.h>.
19095         (FILETYPE_REG): New macro.
19096         (FILETYPE_INO_REG): Likewise.
19097         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
19098         Changed all users.
19099         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
19100         all users.
19101         (grub_fshelp_node): New struct.
19102         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
19103         to a pointer.
19104         (grub_ext2_get_file_block): Removed function.
19105         (grub_ext2_read_block): New function.
19106         (grub_ext2_read_file): Replaced parameter `data' by `node'.
19107         This function was written.
19108         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
19109         (grub_ext2_find_file): Removed function.
19110         (grub_ext2_read_symlink): New function.
19111         (grub_ext2_iterate_dir): Likewise.
19112         (grub_ext2_open): Rewritten.
19113         (grub_ext2_dir): Rewritten.
19114         * include/grub/fshelp.h: New file.
19115         * fs/fshelp.c: Likewise.
19117 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
19119         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
19120         (print_message): Add a missing newline.
19121         (run_menu): Added timeout support.
19122         (run_menu_entry): New local function.
19123         (grub_menu_run): Added support for booting.
19125         * kern/loader.c (grub_loader_is_loaded): New function.
19127         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
19128         (grub_get_rtc): Exported.
19130         * include/grub/i386/pc/time.h: Include grub/symbol.h.
19131         (grub_get_rtc): Exported.
19133         * include/grub/normal.h (struct grub_command_list): Remove
19134         constant from the member `command'.
19136         * include/grub/loader.h (grub_loader_is_loaded): Declared.
19138         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
19140         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
19142 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
19144         Add support for the JFS filesystem.
19146         * fs/jfs.c: New file.
19147         * include/grub/fs.h (grub_jfs_init): New prototype.
19148         (grub_jfs_fini): New prototype.
19149         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
19150         (grub_emu_SOURCES): Likewise.
19151         (pkgdata_MODULES): Add jfs.mod.
19152         (jfs_mod_SOURCES): New variable.
19153         (jfs_mod_CFLAGS): Likewise.
19154         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
19155         (grubof_SOURCES): Likewise.
19156         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
19158         * fs/fat.c (grub_fat_find_dir): Convert the filename little
19159         endian to the host endian.
19160         (grub_fat_utf16_to_utf8): Move function from there...
19161         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
19162         the endianness of the source string anymore.
19163         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
19165 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
19167         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
19168         (grub_boot_fini) [GRUB_UTIL]: Likewise.
19169         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
19170         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
19172         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
19173         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
19174         for `node_found' and `it_dir'.
19175         (grub_hfs_dir): Add prototype for `dir_hook'.
19177         * fs/minix.c (grub_minix_get_file_block): Add prototype for
19178         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
19179         and `indir32' to silence a gcc warning.
19181         * include/grub/fs.h (grub_hfs_init): New prototype.
19182         (grub_hfs_fini): Likewise.
19185 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
19187         Each disk device has its own id now. This is useful to make use
19188         of multiple disk devices.
19190         * include/grub/disk.h (grub_disk_dev_id): New enum.
19191         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
19192         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
19194         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
19195         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19197         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
19198         GRUB_DISK_DEVICE_OFDISK_ID as an id.
19200         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
19201         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
19203         * include/grub/disk.h (struct grub_disk_dev): Added a new member
19204         "id" which is used by the cache manager.
19206         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
19207         of just "GRUB".
19209 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
19211         * fs/hfs.c: New file.
19212         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
19213         (grub_emu_SOURCES): Likewise.
19214         (pkgdata_MODULES): Add hfs.mod.
19215         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
19216         (grubof_SOURCES): Likewise.
19217         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
19219         * include/grub/misc.h (grub_strncasecmp): Add prototype.
19220         * kern/misc.c (grub_strncasecmp): Add function.
19222 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
19224         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
19225         with parentheses.
19227         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
19228         (grub_ext2_dir): In case the directory entry type is unknown, read
19229         it from the inode.
19231 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
19233         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
19234         grub_load_linux instead of grub_rescue_cmd_linux as second
19235         argument of grub_rescue_register_command.
19237         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
19239 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
19241         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
19242         function.
19243         * commands/boot.c: Remove the check for `GRUB_UTIL'.
19244         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
19245         `loader/powerpc/ieee1275/linux.c',
19246         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
19247         * include/grub/powerpc/ieee1275/ieee1275.h
19248         (grub_ieee1275_release): New prototype.
19249         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
19250         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
19251         normal, boot, linux and linux_normal.
19252         * loader/powerpc/ieee1275/linux.c: New file.
19253         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
19255 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
19257         * normal/arg.c (grub_arg_parse): Correct error handling after
19258         reallocating the argumentlist (check if `argl' is not null instead
19259         of checking if `args' is not null).
19260         * kern/mm.c (grub_realloc): Return the same pointer when using the
19261         same region, instead of returning the header address.
19263 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
19265         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
19266         one block instead of two when looking for the initial partition.
19267         (grub_partition_probe): Initialize the local variable `p' with 0.
19268         Use base 10 for the grub_strtoul call.
19269         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
19270         need for one local variable.
19271         (grub_strtoul): Don't add the new value to `num', instead of that
19272         just assign it.
19274 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
19276         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
19277         (pxeboot_img_SOURCES): New variable.
19278         (pxeboot_img_ASFLAGS): Likewise.
19279         (pxeboot_img_LDFLAGS): Likewise.
19280         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
19281         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
19282         <lode_leroy@hotmail.com>.
19284 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
19286         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
19287         there was no input.
19289 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
19291         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
19292         the history buffer logic.
19294 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
19296         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
19297         (FILETYPE_INO_SYMLINK): New macros.
19298         (grub_ext2_find_file): Check if the node is a directory using the
19299         inode stat information instead of using the filetype in the
19300         dirent.  Exclude the first character of an absolute symlink.
19301         (grub_ext2_dir): Mask out the filetype part of the mode member of
19302         the inode.
19304 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
19306         Add support for UFS version 1 and 2.  Add support for the minix
19307         filesystem version 1 and 2, both the variants with 14 and 30 long
19308         filenames.
19310         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
19311         fs/minix.c.
19312         (grub_emu_SOURCES): Likewise.
19313         (pkgdata_MODULES): Add ufs.mod and minix.mod.
19314         (ufs_mod_SOURCES): New variable.
19315         (ufs_mod_CFLAGS): Likewise.
19316         (minix_mod_SOURCES): Likewise.
19317         (minix_mod_CFLAGS): Likewise.
19318         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
19319         fs/minix.c.
19320         (grubof_SOURCES): Likewise.
19321         * fs/ufs.c: New file.
19322         * fs/minix.c: New file.
19323         * include/grub/fs.h (grub_ufs_init): New prototype.
19324         (grub_ufs_fini): Likewise.
19325         (grub_minix_init): Likewise.
19326         (grub_minix_fini): Likewise.
19327         * util/grub-emu.c (main): Initialize and deinitialize UFS and
19328         minix fs.
19330 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
19332         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
19333         commands/ls.c, commands/terminal.c, commands/boot.c,
19334         commands/cmp.c and commands/cat.c.
19335         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
19337         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
19338         "env.h"
19340 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
19342         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
19343         and grub_, respectively. Because the conversion is trivial and
19344         mechanical, I omit the details here. Please refer to the CVS
19345         if you need more information.
19347 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
19349         * include/pupa: Renamed to ...
19350         * include/grub: ... this.
19351         * util/i386/pc/pupa-mkimage.c: Renamed to ...
19352         * util/i386/pc/grub-mkimage.c: ... this.
19353         * util/i386/pc/pupa-setup.c: Renamed to ...
19354         * util/i386/pc/grub-setup.c: ... this.
19355         * util/pupa-emu.c: Renamed to ...
19356         * util/grub-emu.c: ... this.
19358 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
19360         Add support for the newworld apple macintosh (PPC).  This has been
19361         tested on the powerbook 2000 only.  It only adds support for
19362         generic ieee1275 functions, console and disk support.  This should
19363         be easy to port to other architectures with support for Open
19364         Firmware.
19366         * configure.ac: Accept the powerpc as host_cpu.  In the case of
19367         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
19368         specific tests are only executed while building for the i386.
19369         Inverse test for crosscompile.
19370         * genmk.rb (Utility): Allow assembler files.
19371         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
19372         * conf/powerpc-ieee1275.rmk: New file.
19373         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
19374         * disk/powerpc/ieee1275/partition.c: Likewise.
19375         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
19376         * include/pupa/powerpc/ieee1275/console.h: Likewise.
19377         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
19378         * include/pupa/powerpc/ieee1275/time.h: Likewise.
19379         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
19380         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
19381         * include/pupa/powerpc/ieee1275/loader.h
19382         * include/pupa/powerpc/setjmp.h: Likewise.
19383         * include/pupa/powerpc/types.h: Likewise.
19384         * kern/powerpc/ieee1275/init.c: Likewise.
19385         * kern/powerpc/ieee1275/openfw.c: Likewise.
19386         * term/powerpc/ieee1275/ofconsole.c: Likewise.
19388         These files were written by Johan Rydberg
19389         (jrydberg@night.trouble.net) and I only modified them slightly.
19391         * boot/powerpc/ieee1275/cmain.c: New file.
19392         * boot/powerpc/ieee1275/crt0.S: Likewise.
19393         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
19394         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
19396 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
19398         * Makefile.in: Update copyright.
19399         * genmodsrc.sh: Likewise.
19400         * gensymlist.sh: Likewise.
19401         * term/i386/pc/vga.c: Indent correctly.
19403         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
19404         bugreporting address.
19405         * util/i386/pc/pupa-setup.c (usage): Likewise,
19406         (main): Call pupa_ext2_init and pupa_ext2_fini.
19408         * fs/fat.c (log2): Renamed to ...
19409         (fat_log2): ... this.
19410         All callers changed.
19411         * kern/misc.c (memcpy): Alias to pupa_memmove.
19412         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
19413         lvalue cast.
19414         * util/console.c (pupa_ncurses_fini): Return 0.
19416         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
19417         Move fail label here.
19418         [__GNU__]: Don't warn when using stat.
19419         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
19420         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
19421         long int. Use strtol instead of strtoul.
19423 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
19425         * commands/boot.c: New file.
19426         * commands/cat.c: Likewise.
19427         * commands/cmp.c: Likewise.
19428         * commands/ls.c: Likewise.
19429         * commands/terminal.c: Likewise.
19430         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
19431         (pupa_register_command): Changed interface to match the new
19432         argument parser.
19433         (pupa_command_execute): Changed (almost rewritten) so it uses
19434         pupa_split_command.  Added support for setting variables using the
19435         syntax `foo=bar'.
19436         (rescue_command): Changed to work with the new argument parser.
19437         (terminal_command): Moved from here to commands/terminal.c.
19438         (set_command): New function.
19439         (unset_command): New function.
19440         (insmod_command): New function.
19441         (rmmod_command): New function.
19442         (lsmod_command): New function.
19443         (pupa_command_init): Don't initialize the command terminal
19444         anymore.  Initialize the commands set, unset, insmod, rmmod and
19445         lsmod.
19446         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
19447         (kernel_img_HEADERS): Add arg.h and env.h.
19448         (pupa_mkimage_LDFLAGS): Add kern/env.c.
19449         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
19450         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
19451         normal/arg.c.
19452         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
19453         terminal.mod.
19454         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
19455         (boot_mod_SOURCES): New variable.
19456         (terminal_mod_SOURCES): Likewise.
19457         (ls_mod_SOURCES): Likewise.
19458         (cmp_mod_SOURCES): Likewise.
19459         (cat_mod_SOURCES): Likewise.
19461         * normal/arg.c: New file.
19462         * kern/env.c: Likewise.
19463         * include/pupa/arg.h: Likewise.
19464         * include/pupa/env.h: Likewise.
19465         * font/manager.c (font_command): Changed to match argument parsing
19466         interface changes.
19467         (PUPA_MOD_INIT): Likewise.
19468         * hello/hello.c (pupa_cmd_hello): Likewise.
19469         (PUPA_MOD_INIT): Likewise.
19470         * include/pupa/disk.h: Include <pupa/device.h>.
19471         (pupa_print_partinfo): New prototype.
19472         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
19473         (pupa_dl_get_prefix): Likewise.
19474         * include/pupa/misc.h: Include <pupa/err.h>.
19475         (pupa_isgraph): New prototype.
19476         (pupa_isdigit): Likewise.
19477         (pupa_split_cmdline): Likewise.
19478         * include/pupa/normal.h: Include <pupa/arg.h>.
19479         (pupa_command): Changed the prototype of the member `func' to
19480         match the argument parsing interface.  Added member `options'.
19481         (pupa_register_command): Updated to match function.
19482         (pupa_arg_parse): New prototype.
19483         (pupa_hello_init) [PUPA_UTIL]: New prototype.
19484         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
19485         (pupa_ls_init) [PUPA_UTIL]: Likewise.
19486         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
19487         (pupa_cat_init) [PUPA_UTIL]: Likewise.
19488         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
19489         (pupa_boot_init) [PUPA_UTIL]: Likewise.
19490         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
19491         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
19492         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
19493         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
19494         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
19495         * kern/disk.c: Include <pupa/file.h>.
19496         (pupa_print_partinfo): New function.
19497         * kern/dl.c: Include <pupa/env.h>.
19498         (pupa_dl_dir): Variable removed.
19499         (pupa_dl_load): Use the environment variable `prefix' instead of
19500         the variable pupa_dl_dir.
19501         (pupa_dl_set_prefix): Function removed.
19502         (pupa_dl_get_prefix): Likewise.
19503         * kern/i386/pc/init.c: Include <pupa/env.h>.
19504         (pupa_machine_init): Use the environment variable `prefix' instead of
19505         using pupa_dl_set_prefix to set the prefix.
19506         * kern/main.c: Include <pupa/env.h>.
19507         (pupa_set_root_dev): Use the environment variable `prefix' instead of
19508         using pupa_dl_get_prefix to get the prefix.
19509         * kern/misc.c: Include <pupa/env.h>.
19510         (pupa_isdigit): New function.
19511         (pupa_isgraph): Likewise.
19512         (pupa_ftoa): Likewise.
19513         (pupa_vsprintf): Added support for printing values of the type
19514         `double'.  Make it possible to format variable output when using
19515         formatting like `%1.2%f'.
19516         (pupa_split_cmdline): New function.
19517         * kern/rescue.c: Include <pupa/env.h>.
19518         (next_word): Removed function.
19519         (pupa_rescue_cmd_prefix): Likewise.
19520         (pupa_rescue_cmd_set): New function.
19521         (pupa_rescue_cmd_unset): New function.
19522         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
19523         split the command line instead of splitting it here.  Added
19524         support for setting variables using the syntax `foo=bar'.  Don't
19525         initialize the prefix command anymore.  Initialized the set and
19526         unset commands.
19527         * normal/cmdline.c: Include <pupa/env.h>.
19528         (pupa_tab_complete): Added prototypes for print_simple_completion,
19529         print_partition_completion, add_completion, iterate_commands,
19530         iterate_dev, iterate_part and iterate_dir. Moved code to print
19531         partition information from here to kern/disk.c.
19532         (pupa_cmdline_run): Don't check if the function exists anymore.
19533         * normal/main.c: Include <pupa/env.h>.
19534         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
19535         instead of using pupa_dl_get_prefix to get the prefix.
19536         * term/i386/pc/vga.c: Include <pupa/arg.h>.
19537         (check_vga_mem): Cast pointers to `void *' to silence a gcc
19538         warning.
19539         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
19540         (pupa_vga_setcolor): Declare unused variables with `__attribute__
19541         ((unused))' to silence a gcc warning.
19542         (pupa_vga_setcolor): Likewise.
19543         (debug_command): Changed to match argument parsing
19544         interface changes.
19545         * util/pupa-emu.c: Include <pupa/env.h>.
19546         (options): Added 0's for unused fields to silence a gcc warning.
19547         (argp): Likewise.
19548         (main): Use the environment variable `prefix' instead of using
19549         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
19550         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
19551         and terminal.
19553         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
19554         * util/misc.c: Include <malloc.h>.
19555         (pupa_malloc): Rewritten so errors are correctly reported.
19556         (pupa_realloc): Likewise.
19557         (pupa_memalign): Likewise.
19558         (pupa_mm_init_region): Declare unused variables with
19559         `__attribute__ ((unused))' to silence a gcc warning.
19560         * normal/i386/setjmp.S: Remove tab at the end of the file to
19561         silence a gcc warning.
19562         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
19563         variables with `__attribute__ ((unused))' to silence a gcc
19564         warning.
19565         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
19566         local variable i unsigned to silence a gcc warning.
19568         * kern/term.c: Include <pupa/misc.h>.
19569         (pupa_more_lines): New variable.
19570         (pupa_more): Likewise.
19571         (pupa_putcode): When the pager is active pause at the end of every
19572         screen.
19573         (pupa_set_more): New function.
19574         * include/pupa/term.h (pupa_set_more): New prototype.
19577 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
19579         Now this project is GRUB 2 rather than PUPA. The location of
19580         the CVS repository was moved to GRUB's.
19582         * configure.ac: Use bug-grub as the reporting address.
19583         Use GRUB instead of PUPA.
19584         Change the version number to 1.90.
19586 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
19588         * genkernsyms.sh: Updated copyright information.
19589         * genmk.rb: Likewise.
19590         * genmodsrc.sh: Likewise.
19591         * gensymlist.sh: Likewise.
19592         * boot/i386/pc/boot.S: Likewise.
19593         * boot/i386/pc/diskboot.S: Likewise.
19594         * disk/i386/pc/biosdisk.c: Likewise.
19595         * disk/i386/pc/partition.c: Likewise.
19596         * font/manager.c: Likewise.
19597         * fs/ext2.c: Likewise.
19598         * fs/fat.c: Likewise.
19599         * include/pupa/boot.h: Likewise.
19600         * include/pupa/device.h: Likewise.
19601         * include/pupa/disk.h: Likewise.
19602         * include/pupa/dl.h: Likewise.
19603         * include/pupa/elf.h: Likewise.
19604         * include/pupa/err.h: Likewise.
19605         * include/pupa/file.h: Likewise.
19606         * include/pupa/font.h: Likewise.
19607         * include/pupa/fs.h: Likewise.
19608         * include/pupa/kernel.h: Likewise.
19609         * include/pupa/loader.h: Likewise.
19610         * include/pupa/misc.h: Likewise.
19611         * include/pupa/mm.h: Likewise.
19612         * include/pupa/net.h: Likewise.
19613         * include/pupa/normal.h: Likewise.
19614         * include/pupa/rescue.h: Likewise.
19615         * include/pupa/setjmp.h: Likewise.
19616         * include/pupa/symbol.h: Likewise.
19617         * include/pupa/term.h: Likewise.
19618         * include/pupa/types.h: Likewise.
19619         * include/pupa/i386/setjmp.h: Likewise.
19620         * include/pupa/i386/types.h: Likewise.
19621         * include/pupa/i386/pc/biosdisk.h: Likewise.
19622         * include/pupa/i386/pc/boot.h: Likewise.
19623         * include/pupa/i386/pc/console.h: Likewise.
19624         * include/pupa/i386/pc/init.h: Likewise.
19625         * include/pupa/i386/pc/kernel.h: Likewise.
19626         * include/pupa/i386/pc/linux.h: Likewise.
19627         * include/pupa/i386/pc/loader.h: Likewise.
19628         * include/pupa/i386/pc/memory.h: Likewise.
19629         * include/pupa/i386/pc/multiboot.h: Likewise.
19630         * include/pupa/i386/pc/partition.h: Likewise.
19631         * include/pupa/i386/pc/time.h: Likewise.
19632         * include/pupa/i386/pc/vga.h: Likewise.
19633         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
19634         * include/pupa/util/getroot.h: Likewise.
19635         * include/pupa/util/misc.h: Likewise.
19636         * include/pupa/util/resolve.h: Likewise.
19637         * kern/device.c: Likewise.
19638         * kern/disk.c: Likewise.
19639         * kern/dl.c: Likewise.
19640         * kern/err.c: Likewise.
19641         * kern/file.c: Likewise.
19642         * kern/fs.c: Likewise.
19643         * kern/loader.c: Likewise.
19644         * kern/main.c: Likewise.
19645         * kern/misc.c: Likewise.
19646         * kern/mm.c: Likewise.
19647         * kern/rescue.c: Likewise.
19648         * kern/term.c: Likewise.
19649         * kern/i386/dl.c: Likewise.
19650         * kern/i386/pc/init.c: Likewise.
19651         * kern/i386/pc/lzo1x.S: Likewise.
19652         * kern/i386/pc/startup.S: Likewise.
19653         * loader/i386/pc/chainloader.c: Likewise.
19654         * loader/i386/pc/linux.c: Likewise.
19655         * loader/i386/pc/multiboot.c: Likewise.
19656         * normal/cmdline.c: Likewise.
19657         * normal/command.c: Likewise.
19658         * normal/main.c: Likewise.
19659         * normal/menu.c: Likewise.
19660         * normal/i386/setjmp.S: Likewise.
19661         * term/i386/pc/console.c: Likewise.
19662         * term/i386/pc/vga.c: Likewise.
19663         * util/console.c: Likewise.
19664         * util/genmoddep.c: Likewise.
19665         * util/misc.c: Likewise.
19666         * util/pupa-emu.c: Likewise.
19667         * util/resolve.c: Likewise.
19668         * util/unifont2pff.rb: Likewise.
19669         * util/i386/pc/biosdisk.c: Likewise.
19670         * util/i386/pc/getroot.c: Likewise.
19671         * util/i386/pc/pupa-mkimage.c: Likewise.
19672         * util/i386/pc/pupa-setup.c: Likewise.
19674 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
19676         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
19677         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
19678         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
19679         reading and reset it after reading.
19680         (pupa_ext2_close): Return PUPA_ERR_NONE.
19682         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
19683         Correct value.
19684         (struct linux_kernel_header): Add kernel_version and
19685         initrd_addr_max.
19686         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
19687         pupa_file_read succeeds.
19688         (pupa_rescue_cmd_initrd): Implement.
19690 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
19692         * fs/ext2.c (pupa_ext2_label): New function.
19693         (pupa_ext2_fs): Added label.
19694         * fs/fat.c (pupa_fat_label): New function.
19695         (pupa_fat_fs): Added label.
19696         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
19698         * kern/misc.c (pupa_strndup): New function.
19699         * include/pupa/misc.h (pupa_strndup): New prototype.
19701         * include/pupa/normal.h: Include <pupa/err.h>.
19702         (pupa_set_history): New prototype.
19703         (pupa_iterate_commands): New prototype.
19704         * normal/cmdline.c: Include <pupa/machine/partition.h>,
19705         <pupa/disk.h>, <pupa/file.h>.
19706         (hist_size): New variable.
19707         (hist_lines): Likewise.
19708         (hist_end): Likewise.
19709         (hist_used): Likewise.
19710         (pupa_set_history): New function.
19711         (pupa_history_get): Likewise.
19712         (pupa_history_add): Likewise.
19713         (pupa_history_replace): Likewise.
19714         (pupa_tab_complete): Likewise.
19715         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
19716         completion shows partitionnames while completing partitions, this
19717         feature was suggested by Jeff Bailey.
19718         * normal/command.c (pupa_iterate_commands): New function.
19719         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
19720         (pupa_normal_init): Initialize history buffer.
19721         (PUPA_MOD_INIT): Likewise.
19722         (pupa_normal_fini): Free the history buffer.
19723         (PUPA_MOD_FINI): Likewise.
19725         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
19726         key.
19728         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
19729         * configure.ac [i386]: Check for regparam bug.
19730         (NESTED_FUNC_ATTR) [! i386]: Defined.
19732 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
19734         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
19735         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
19736         (pupa_emu_SOURCES): New variable.
19737         (pupa_emu_LDFLAGS): Likewise.
19738         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
19739         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
19740         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
19741         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19742         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
19743         (pupa_jmp_buf): New typedef.
19744         (pupa_setjmp) [PUPA_UTIL]: New macro.
19745         (pupa_longjmp) [PUPA_UTIL]: Likewise.
19746         * include/pupa/term.h (struct pupa_term): New member `refresh'.
19747         (pupa_refresh): New prototype.
19748         * include/pupa/util/getroot.h: New file.
19749         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
19750         it.
19751         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
19752         (pupa_rescue_cmd_cat): Likewise.
19753         (pupa_rescue_cmd_ls): Likewise.
19754         (pupa_rescue_cmd_testload): Likewise.
19755         (pupa_rescue_cmd_lsmod): Likewise.
19756         * normal/cmdline.c (pupa_cmdline_get): Likewise.
19757         * normal/menu.c (run_menu): Likewise.
19758         * kern/term.c (pupa_cls): Likewise.
19759         (pupa_refresh): New function.
19760         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
19761         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19762         * util/console.c: New file.
19764         * util/i386/pc/getroot.c: New file.
19765         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
19766         (pupa_putchar): New function.
19767         (pupa_refresh): Likewise.
19768         (xgetcwd): Function moved to ...
19769         (strip_extra_slashes): Likewise.
19770         (get_prefix): Likewise.
19771         * util/i386/pc/getroot.c: ... here.
19772         (find_root_device): Function moved and renamed to...
19773         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
19774         Changed all callers.
19775         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
19776         and renamed to...
19777         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
19778         Changed all callers.
19779         * util/misc.c (pupa_memalign): New function.
19780         (pupa_mm_init_region): Likewise.
19781         (pupa_register_exported_symbols): Likewise.
19782         (pupa_putchar): Function removed.
19783         * util/pupa-emu.c: New file.
19785 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
19787         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
19788         (_multiboot_mod_SOURCES): New variable.
19789         (_multiboot_mod_CFLAGS): Likewise.
19790         * loader/i386/pc/multiboot.c: New file.
19791         * include/pupa/i386/pc/multiboot.h: Likewise.
19792         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
19793         (pupa_multiboot_real_boot): New function.
19794         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
19795         (pupa_multiboot_real_boot): New prototype.
19796         (pupa_rescue_cmd_multiboot): Likewise
19797         (pupa_rescue_cmd_module): Likewise.
19799         * kern/loader.c (pupa_loader_set): Continue when
19800         pupa_loader_unload_func() fails.
19801         (pupa_loader_unset): New function.
19802         * include/pupa/loader.h (pupa_loader_unset): New prototype.
19804         * kern/misc.c (pupa_stpcpy): New function.
19805         * include/pupa/misc.h (pupa_stpcpy): New prototype.
19807 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
19809         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
19810         for available extensions.
19812         * include/pupa/i386/pc/time.h: New file.
19813         * kern/disk.c: Include <pupa/machine/time.h>.
19814         (PUPA_CACHE_TIMEOUT): New macro.
19815         (pupa_last_time): New variable.
19816         (pupa_disk_open): Flush the cache when there was a timeout.
19817         (pupa_disk_close): Reset the timer.
19818         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
19819         pupa_currticks.
19820         * util/misc.c: Include <sys/times.h>
19821         (pupa_get_rtc): New function.
19823 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
19825         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
19826         as blocks.
19827         (pupa_ext2_get_file_block): Use blocks member.
19829         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
19830         first block. Return -1 instead of pupa_errno on error.
19832 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
19834         * README: In the pupa-mkimage example use _chain instead of chain
19835         and ext2 instead of fat.
19836         * TODO: Replace ext2fs with jfs as an example.  Add an item for
19837         adding journal playback for ext2fs.
19838         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
19839         (pkgdata_MODULES): Added ext2.mod.
19840         (ext2_mod_SOURCES): New variable.
19841         (ext2_mod_CFLAGS): Likewise.
19842         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
19843         * include/pupa/misc.h (pupa_strncpy): New prototype.
19844         (pupa_strcat): Likewise.
19845         (pupa_strncmp): Likewise.
19846         * kern/misc.c (pupa_strcat): Enable function.
19847         (pupa_strncpy): New function.
19848         (pupa_strncmp): Likewise.
19849         * fs/ext2.c: New file.
19851         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
19852         when the read failed before retrying.
19853         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
19854         (_FILE_OFFSET_BITS): Likewise.
19855         * configure.ac: Added AC_SYS_LARGEFILE.
19857 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19859         * genmk.rb (PModule#rule): Make sure to get only symbol names
19860         from the output of nm.
19861         Reported by Robert Millan <zeratul2@wanadoo.es>.
19863 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
19865         I forgot to check in these changes for a long time. This adds
19866         incomplete support for VGA console, and this is still very
19867         buggy. Also, a lot of consideration is required for I18N,
19868         UNICODE, and VGA font issues. Therefore, assume that this is
19869         such that "better than nothing".
19871         * font/manager.c: New file.
19872         * include/pupa/font.h: Likewise.
19873         * include/pupa/i386/pc/vga.h: Likewise.
19874         * term/i386/pc/vga.c: Likewise.
19875         * util/unifont2pff.rb: Likewise.
19877         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
19878         (pkgdata_MODULES): Added vga.mod and font.mod.
19879         (vga_mod_SOURCES): New variables.
19880         (vga_mod_CFLAGS): Likewise.
19881         (font_mod_SOURCES): Likewise.
19882         (font_mod_CFLAGS): Likewise.
19884         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
19886         * include/pupa/term.h: Include pupa/err.h.
19887         (struct pupa_term): Added init and fini.
19888         Changed the argument of putchar to pupa_uint32_t.
19890         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
19891         (pupa_console_real_putchar): New prototype.
19892         (pupa_console_putchar): Removed.
19893         (pupa_console_checkkey): Exported.
19894         (pupa_console_getkey): Likewise.
19896         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
19897         characters.
19899         * kern/term.c (pupa_term_set_current): Rewritten.
19900         (pupa_putchar): Likewise.
19901         (pupa_putcode): New function.
19903         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
19904         (pupa_console_real_putchar): ... this.
19905         (pupa_vga_set_mode): New function.
19906         (pupa_vga_get_font): Likewise.
19908         * normal/command.c: Include pupa/term.h.
19909         (terminal_command): New function.
19910         (pupa_command_init): Register the command "terminal".
19912         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
19913         (DISP_UP): Likewise.
19914         (DISP_RIGHT): Likewise.
19915         (DISP_DOWN): Likewise.
19916         (DISP_HLINE): Likewise.
19917         (DISP_VLINE): Likewise.
19918         (DISP_UL): Likewise.
19919         (DISP_UR): Likewise.
19920         (DISP_LL): Likewise.
19921         (DISP_LR): Likewise.
19923         * term/i386/pc/console.c (pupa_console_putchar): New function.
19925 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
19927         * util/resolve.c (pupa_util_resolve_dependencies): BUG
19928         FIX. Reverse the path_list.
19930         * include/pupa/normal.h: Export pupa_register_command and
19931         pupa_unregister_command.
19933         * hello/hello.c (pupa_cmd_hello): New module.
19934         * conf/i386-pc.rmk: Added hello.mod.
19936 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
19938         * kern/i386/pc/lzo1x.S: New file.
19940         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
19941         (compress_kernel): New variable.
19942         (generate_image): Heavily modified to support compressing a
19943         large part of the core image.
19945         * util/misc.c (pupa_util_read_image): Fix a file descriptor
19946         leak.
19947         (pupa_util_load_image): New function.
19949         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
19950         (pupa_compressed_size): New variable.
19951         (codestart): Enable Gate A20 here.
19952         Decompress the compressed part of the core image.
19953         Rearrange the code to put functions and variables which are
19954         required for initialization in the non-compressed part.
19955         Include lzo1x.S.
19957         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
19958         here.
19960         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
19962         * include/pupa/i386/pc/kernel.h
19963         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
19964         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
19965         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19966         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19967         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
19969         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
19971         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
19972         (Utility#rule): Likewise.
19974         * configure.ac: Check if LZO is available.
19976 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
19978         * include/pupa/normal.h: New file.
19979         * include/pupa/setjmp.h: Likewise.
19980         * include/pupa/i386/setjmp.h: Likewise.
19981         * normal/cmdline.c: Likewise.
19982         * normal/command.c: Likewise.
19983         * normal/main.c: Likewise.
19984         * normal/menu.c: Likewise.
19985         * normal/i386/setjmp.S: Likewise.
19987         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
19988         (pupa_rescue_cmd_initrd): Likewise.
19990         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
19991         Likewise.
19993         * kern/i386/pc/startup.S (translation_table): New variable.
19994         (translate_keycode): New function.
19995         (pupa_console_getkey): Call translate_keycode.
19997         * kern/rescue.c (attempt_normal_mode): New function.
19998         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
19999         it failed, print a message.
20001         * kern/mm.c (pupa_real_malloc): Print more information when a
20002         free magic is broken.
20003         (pupa_free): If the first free header is not free actually, set
20004         it to P.
20006         * kern/main.c (pupa_load_normal_mode): Just load the module
20007         "normal".
20008         (pupa_main): Don't print the message
20009         "Entering into rescue mode..." here.
20011         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
20012         Declared.
20013         (pupa_rescue_cmd_initrd): Likewise.
20014         (pupa_rescue_cmd_initrd): Likewise.
20016         * include/pupa/symbol.h (FUNCTION): Specify the type.
20017         (VARIABLE): Likewise.
20019         * include/pupa/err.h (pupa_err_t): Added
20020         PUPA_ERR_UNKNOWN_COMMAND.
20022         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
20023         (pupa_dl_get_prefix): Likewise.
20025         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
20026         Added _chain.mod and _linux.mod instead of chain.mod and
20027         linux.mod.
20028         (chain_mod_SOURCES): Renamed to ...
20029         (_chain_mod_SOURCES): ... this.
20030         (chain_mod_CFLAGS): Renamed to ...
20031         (_chain_mod_CFLAGS): ... this.
20032         (linux_mod_SOURCES): Renamed to ...
20033         (_linux_mod_SOURCES): ... this.
20034         (linux_mod_CFLAGS): Renamed to ...
20035         (_linux_mod_CFLAGS): ... this.
20036         (normal_mod_SOURCES): New variable.
20037         (normal_mod_CFLAGS): Likewise.
20038         (normal_mod_ASFLAGS): Likewise.
20040 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
20042         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
20043         possible.
20045         * kern/dl.c (pupa_dl_ref): Refer depending modules
20046         recursively.
20047         (pupa_dl_unref): Unrefer depending modules recursively.
20048         Don't call pupa_dl_unload implicitly, because PUPA can crash if
20049         a module is unloaded before one depending on that module is
20050         unloaded.
20051         (pupa_dl_unload): Unload depending modules explicitly,
20052         if possible.
20054 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
20056         * include/pupa/i386/pc/linux.h: New file.
20057         * loader/i386/pc/linux.c: Likewise.
20059         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
20060         Removed.
20061         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
20062         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
20063         of PUPA_CHAINLOADER_BOOT_SECTOR.
20065         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
20066         (pupa_linux_prot_size): New variable.
20067         (pupa_linux_tmp_addr): Likewise.
20068         (pupa_linux_real_addr): Likewise.
20069         (pupa_linux_boot_zimage): New function.
20070         (pupa_linux_boot_bzimage): Likewise.
20072         * kern/i386/pc/init.c (struct mem_region): New structure.
20073         (MAX_REGIONS): New macro.
20074         (mem_regions): New variable.
20075         (num_regions): Likewise.
20076         (pupa_os_area_addr): Likewise.
20077         (pupa_os_area_size): Likewise.
20078         (pupa_lower_mem): Likewise.
20079         (pupa_upper_mem): Likewise.
20080         (add_mem_region): New function.
20081         (compact_mem_regions): Likewise.
20082         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
20083         the size of the conventional memory and that of so-called upper
20084         memory (before the first memory hole).
20085         Instead of adding each found region to free memory, use
20086         add_mem_region and add them after removing overlaps.
20087         Also, add only 1/4 of the upper memory to free memory. The rest
20088         is used for loading OS images. Maybe this is ad hoc, but this
20089         makes it much easier to relocate OS images when booting.
20091         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
20092         (pupa_enter_rescue_mode): Don't register initrd and module.
20094         * kern/mm.c: Include pupa/dl.h.
20096         * kern/main.c: Include pupa/file.h and pupa/device.h.
20098         * kern/loader.c (pupa_loader_load_module_func): Removed.
20099         (pupa_loader_load_module): Likewise.
20101         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
20102         ``.o''.
20104         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
20105         (pupa_linux_tmp_addr): Likewise.
20106         (pupa_linux_real_addr): Likewise.
20107         (pupa_linux_boot_zimage): Likewise.
20108         (pupa_linux_boot_bzimage): Likewise.
20110         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
20111         (pupa_upper_mem): Likewise.
20112         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
20113         module is too dangerous.
20115         * include/pupa/loader.h (pupa_os_area_addr): Declared.
20116         (pupa_os_area_size): Likewise.
20117         (pupa_loader_set): Remove the first argument. Loader doesn't
20118         manage modules or initrd any longer.
20119         (pupa_loader_load_module): Removed.
20121         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
20122         (linux_mod_SOURCES): New variable.
20123         (linux_mod_CFLAGS): Likewise.
20125 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
20127         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
20128         the length of a blocklist correctly.
20130         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
20131         Use ioctl only if the OS file is a block device.
20132         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
20133         not very useful for normal files.
20135         * kern/main.c (pupa_set_root_dev): New function.
20136         (pupa_load_normal_mode): Likewise.
20137         (pupa_main): Call those above.
20139         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
20140         pupa_uint16_t.
20142         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
20144 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
20146         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
20147         (setup): Configure the installed partition information and the
20148         dl prefix.
20150         * loader/i386/pc/chainloader.c (my_mod): New variable.
20151         (pupa_chainloader_unload): New function.
20152         (pupa_rescue_cmd_chainloader): Refer itself.
20153         (PUPA_MOD_INIT): Save its own module in MY_MOD.
20155         * kern/i386/pc/startup.S (install_partition): Removed.
20156         (version_string): Likewise.
20157         (config_file): Likewise.
20158         (pupa_install_dos_part): New variable.
20159         (pupa_install_bsd_part): Likewise.
20160         (pupa_prefix): Likewise.
20161         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
20163         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
20164         and pupa/misc.h.
20165         (make_install_device): New function.
20166         (pupa_machine_init): Set the dl prefix.
20168         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
20169         (buf): Renamed to ...
20170         (linebuf): ... this.
20171         (pupa_rescue_cmd_prefix): New function.
20172         (pupa_rescue_cmd_insmod): Likewise.
20173         (pupa_rescue_cmd_rmmod): Likewise.
20174         (pupa_rescue_cmd_lsmod): Likewise.
20175         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
20176         rmmod and lsmod.
20178         * kern/mm.c (pupa_memalign): If failed even after invalidating
20179         disk caches, unload unneeded modules and retry.
20181         * kern/misc.c (pupa_memmove): New function.
20182         (pupa_memcpy): Removed.
20183         (pupa_strcpy): New function.
20184         (pupa_itoa): Made static.
20186         * kern/dl.c (pupa_dl_iterate): New function.
20187         (pupa_dl_ref): Likewise.
20188         (pupa_dl_unref): Likewise.
20189         (pupa_dl_unload): Return if succeeded or not.
20190         (pupa_dl_unload_unneeded): New function.
20191         (pupa_dl_unload_all): Likewise.
20192         (pupa_dl_init): Renamed to ...
20193         (pupa_dl_set_prefix): ... this.
20194         (pupa_dl_get_prefix): New function.
20196         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
20197         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
20198         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
20199         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
20200         (pupa_install_dos_part): Declared.
20201         (pupa_install_bsd_part): Likewise.
20202         (pupa_prefix): Likewise.
20203         (pupa_boot_drive): Likewise.
20205         * include/pupa/types.h: Fix a typo.
20207         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
20208         pupa_memmove.
20209         (pupa_memmove): Declared.
20210         (pupa_strcpy): Likewise.
20212         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
20213         pupa_mod_init takes one argument, its own module.
20214         (pupa_dl_unload_unneeded): Declared.
20215         (pupa_dl_unload_all): Likewise.
20216         (pupa_dl_ref): Likewise.
20217         (pupa_dl_unref): Likewise.
20218         (pupa_dl_iterate): Likewise.
20219         (pupa_dl_init): Renamed to ...
20220         (pupa_dl_set_prefix): ... this.
20221         (pupa_dl_get_prefix): Declared.
20223         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
20224         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
20225         unloaded.
20226         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
20227         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
20229         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
20230         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
20232 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
20234         * util/i386/pc/pupa-setup.c (setup): Define the internal
20235         function find_first_partition_start at the top level, because GCC
20236         3.0.x cannot compile internal functions in deeper scopes
20237         correctly.
20238         (find_root_device): Use lstat instead of stat.
20239         Don't follow symbolic links.
20240         Fix the path-constructing code.
20242         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
20243         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
20244         by a BLKGETSIZE ioctl first, because block devices don't fill
20245         the member st_mode of the structure stat on Linux.
20246         [__linux__] (linux_find_partition): Use a temporary buffer
20247         REAL_DEV for the working space. Copy it to DEV before returning.
20248         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
20249         buffer cache consistent.
20250         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
20251         strncmp. The previous value was merely wrong.
20252         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
20254         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
20255         FAT size is 12. The previous value was merely wrong.
20257         * kern/main.c (pupa_main): Don't split the starting message from
20258         newlines.
20260         * kern/term.c (pupa_putchar): Put CR after LF instead of before
20261         LF, because BIOS goes crazy about character attributes in this
20262         case.
20264 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
20266         * include/i386/pc/util/biosdisk.h: New file.
20267         * util/i386/pc/biosdisk.c: Likewise.
20268         * util/i386/pc/pupa-setup.c: Likewise.
20270         * Makefile.in (INCLUDE_DISTFILES): Added
20271         include/pupa/i386/pc/util/biosdisk.h.
20272         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
20273         directory util/i386/pc.
20274         (install-local): Added a rule for sbin_UTILITIES.
20275         (uninstall): Likewise.
20277         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
20279         * util/misc.c (xrealloc): New function.
20280         (pupa_malloc): Likewise.
20281         (pupa_free): Likewise.
20282         (pupa_realloc): Likewise.
20283         (pupa_stop): Likewise.
20284         (pupa_putchar): Likewise.
20286         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
20288         * include/pupa/util/misc.h (xrealloc): Declared.
20290         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
20291         macro.
20292         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
20293         (PUPA_BOOT_MACHINE_BPB_END): ... this.
20295         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
20296         [PUPA_UTIL] (pupa_fat_fini): Likewise.
20298         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
20299         way should be implemented.
20300         [PUPA_UTIL] (pupa_fat_fini): Likewise.
20302         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
20303         the size of NAME for safety.
20304         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
20305         0x88.
20307         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
20308         (pupa_setup_SOURCES): Likewise.
20310         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
20312 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
20314         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
20315         bunch of pushl's from pusha, because this destroys the return
20316         value.
20318 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
20320         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
20321         This means that any missing prototypes could be fatal. Also, you
20322         must take care when writing assembly code. See the comments at
20323         the beginning of startup.S, for more details.
20325         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
20326         compilation mechanism.
20327         (pupa_chainloader_real_boot): Likewise.
20328         (pupa_biosdisk_rw_int13_extensions): Likewise.
20329         (pupa_biosdisk_rw_standard): Likewise.
20330         (pupa_biosdisk_check_int13_extensions): Likewise.
20331         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
20332         (pupa_biosdisk_get_diskinfo_standard): Likewise.
20333         (pupa_get_memsize): Likewise.
20334         (pupa_get_mmap_entry): Likewise.
20335         (pupa_console_putchar): Likewise.
20336         (pupa_console_setcursor): Likewise.
20337         (pupa_getrtsecs): Use pushl instead of push.
20339         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
20340         memory instead of the stack for a mmap entry, because some
20341         BIOSes may ignore the maximum size and overflow.
20343         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
20345         * genmk.rb (PModule#rule): Compile automatically generated
20346         sources with module-specific CFLAGS as well as other sources.
20348 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
20350         * configure.ac: Check ld.
20351         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
20352         respectively, before checking endianness and sizes.
20354         * Makefile.in (LD): New variable.
20356 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
20358         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
20360 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
20362         * Changelog: New file.