1 2009-09-23 Felix Zielcke <fzielcke@z-51.de>
3 * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
6 2009-09-21 Colin Watson <cjwatson@ubuntu.com>
8 Build info documentation. Some code borrowed from Automake.
10 * configure.ac: Check for makeinfo.
11 * Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
12 (MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
14 (MOSTLYCLEANFILES): Add vti.tmp.
15 (docs/version.texi, docs/stamp-vti): Update automatically.
16 (docs/grub.info): Build info documentation. Use --force and ignore
18 (all-local): Add $(INFOS).
19 (install-local): Install info files.
20 (uninstall): Uninstall info files.
21 * docs/version.texi: Remove from revision control. This file is
22 automatically generated on build now.
23 * gendistlist.sh: Add `*.info'.
25 2009-09-21 Felix Zielcke <fzielcke@z-51.de>
27 * kern/term.c: Fix indentation.
29 2009-09-21 Felix Zielcke <fzielcke@z-51.de>
31 * util/hostdisk.c: Fix a comment.
33 2009-09-20 Robert Millan <rmh.grub@aybabtu.com>
35 Fix regression introduced in r2539.
37 * term/usb_keyboard.c (USB_HID_DEVICE_TO_HOST): Change from 0x61
40 2009-09-19 Colin Watson <cjwatson@ubuntu.com>
42 * util/grub.d/30_os-prober.in: Don't throw away stderr from
43 os-prober. Under normal operation, it does not print anything to
44 stderr; if it does, we need to debug it, and throwing away stderr
45 makes that excessively difficult.
47 2009-09-16 Vladimir Serbinenko <phcoder@gmail.com>
49 * mmap/mmap.c (grub_cmd_badram): Fix off-by-one error.
51 2009-09-16 Robert Millan <rmh.grub@aybabtu.com>
53 * aclocal.m4 (AC_LANG_PROGRAM): New macro. Overrides stock
54 AC_LANG_PROGRAM from autoconf.
55 (grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing
56 prototypes (fixes warning).
58 * configure.ac: Add `-Werror' to TARGET_CFLAGS unless
59 `--disable-werror' was used.
61 2009-09-16 Robert Millan <rmh.grub@aybabtu.com>
63 * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
64 uninitialized `lastaddr'.
66 2009-09-15 Vladimir Serbinenko <phcoder@gmail.com>
68 * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
70 2009-09-14 Colin Watson <cjwatson@ubuntu.com>
72 * commands/test.c (get_fileinfo): Return immediately if
75 2009-09-14 José MartÃnez <xosemp@gmail.com>
77 * commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.
79 2009-09-14 Colin Watson <cjwatson@ubuntu.com>
81 * util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
84 2009-09-13 Robert Millan <rmh.grub@aybabtu.com>
86 * configure.ac: Remove --enable-grub-pe2elf. Only build
87 grub-pe2elf when needed by the build system itself.
88 * conf/common.rmk: Remove $(enable_grub_pe2elf) check.
90 2009-09-12 Robert Millan <rmh.grub@aybabtu.com>
92 * configure.ac: Bump version to 1.97~beta3.
93 * docs/version.texi: Likewise.
95 2009-09-12 Robert Millan <rmh.grub@aybabtu.com>
97 * video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
98 mode special handling (grub_vbe_bios_set_dac_palette_width() call)
100 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
101 (grub_linux_setup_video): ... to here (with some adjustments).
103 2009-09-12 Robert Millan <rmh.grub@aybabtu.com>
105 Fix memory corruption issue (spotted by Colin Watson).
107 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
108 causing returned size to be stored in an incorrect memory location.
109 Fix use of uninitialized value when storing the returned size.
111 2009-09-12 Yves Blusseau <blusseau@zetam.org>
113 Change clean rules to properly remove files
115 * genmk.rb: add new clean rules
116 * Makefile.in (clean): add the new targets
117 (mostlyclean): likewise
119 2009-09-11 Colin Watson <cjwatson@ubuntu.com>
121 * include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
123 * fs/ntfs.c (init_file): Understand 64-bit sizes for
126 2009-09-11 Colin Watson <cjwatson@ubuntu.com>
128 * configure.ac: Don't look for help2man when cross-compiling. Fixes
131 2009-09-10 Felix Zielcke <fzielcke@z-51.de>
133 * util/grub-mkconfig.in: Make the created config mode 400 and
134 print a warning if it fails.
136 2009-09-10 Robert Millan <rmh.grub@aybabtu.com>
138 * util/grub.d/40_custom.in: Ask user to type custom entries below
139 comment, rather than below 'exec tail' line.
141 2009-09-10 Colin Watson <cjwatson@ubuntu.com>
143 * util/grub.d/40_custom.in: Make sure that the explanatory text is
146 2009-09-10 Colin Watson <cjwatson@ubuntu.com>
148 * util/grub.d/40_custom.in: Make it a little clearer how to use this
151 2009-09-10 Felix Zielcke <fzielcke@z-51.de>
153 * docs/grub.cfg: Add an example menu entry for memtest86+.
155 2009-09-09 Felix Zielcke <fzielcke@z-51.de>
157 * config.guess: Update to latest version from config git.
158 * config.sub: Likewise.
160 2009-09-08 Colin Watson <cjwatson@ubuntu.com>
162 * script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
163 unknown-command case. Fixes bug #27320.
165 2009-09-08 Felix Zielcke <fzielcke@z-51.de>
167 * kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
168 `help' if the command exists.
170 2009-09-06 Robert Millan <rmh.grub@aybabtu.com>
172 * INSTALL: Require GCC 4.1.3 or later.
174 2009-09-06 Yves Blusseau <blusseau@zetam.org>
176 * Makefile.in (RMKFILES): add i386-qemu.rmk
177 (MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
180 2009-09-05 Robert Millan <rmh.grub@aybabtu.com>
182 * util/grub-probe.c (probe): Comment out buggy codepath, which
183 was unexpectedly enabled by Colin Watson's 2009-09-02 fix. This
184 should be re-enabled after 1.97.
186 2009-09-05 Felix Zielcke <fzielcke@z-51.de>
188 * gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
191 2009-09-04 Vladimir Serbinenko <phcoder@gmail.com>
193 * loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
194 unnecessary calls to grub_error.
196 2009-09-04 Colin Watson <cjwatson@ubuntu.com>
198 * NEWS: Mention `keystatus' and Unicode fonts.
200 2009-09-04 Robert Millan <rmh.grub@aybabtu.com>
202 * configure.ac: Bump version to 1.97~beta2.
203 * docs/version.texi: Likewise.
205 2009-09-03 Colin Watson <cjwatson@ubuntu.com>
207 * configure.ac: By default, GCC 4.4 generates .eh_frame sections
208 containing unwind information in some cases where it previously did
209 not. Use -fno-dwarf2-cfi-asm if available to restore the old
210 behaviour. See http://patchwork.kernel.org/patch/8555/ for related
213 2009-09-02 Yves BLUSSEAU <blusseau@zetam.org>
215 Embedding loadenv module into grub-emu
217 * conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
219 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
220 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
221 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
222 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
223 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
224 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise
226 2009-09-03 Magnus Granberg <zorry@ume.nu>
228 * aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
229 include -fPIE in the default specs.
230 * configure.ac: Check if pie_possible is yes and add -fno-PIE
233 2009-09-03 Felix Zielcke <fzielcke@z-51.de>
235 * INSTALL: Note that GNU Bison 2.3 or later is required.
237 2009-09-03 Colin Watson <cjwatson@ubuntu.com>
239 * kern/i386/pc/startup.S: Fix typo.
241 2009-09-02 Vladimir Serbinenko <phcoder@gmail.com>
243 * efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
246 2009-09-02 Colin Watson <cjwatson@ubuntu.com>
248 * docs/grub.texi (Naming convention): Describe one-based partition
250 (Device syntax): Likewise.
251 (File name syntax): Likewise.
252 (Block list syntax): Likewise.
253 (Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
255 (File name syntax): Likewise.
256 (Command-line and menu entry commands): Document acpi, blocklist,
257 crc, export, insmod, keystatus, ls, set, and unset commands.
259 2009-09-02 Colin Watson <cjwatson@ubuntu.com>
261 * commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
262 to avoid implying that only one of --shift, --ctrl, or --alt may be
265 2009-09-02 Colin Watson <cjwatson@ubuntu.com>
267 * util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
268 rather than comparing against S_IFREG, which will almost never work.
270 2009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
272 * commands/loadenv.c (check_blocklists): Fix off-by-one error.
273 (write_blocklists): Likewise.
275 2009-09-01 Colin Watson <cjwatson@ubuntu.com>
277 * script/lua/grub_lua.h (fputs): Supply a format string as the first
278 argument to grub_printf.
280 2009-09-01 Felix Zielcke <fzielcke@z-51.de>
282 * genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
285 2009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
287 * kern/file.c (grub_file_read): Spelling fix
289 2009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
291 * loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
292 loading of headers in some cases.
294 2009-08-30 Robert Millan <rmh.grub@aybabtu.com>
296 * configure.ac: Bump version to 1.97~beta1.
297 * docs/version.texi: Likewise.
299 2009-08-29 Vladimir Serbinenko <phcoder@gmail.com>
301 * include/grub/i386/xnu.h: Add license header.
302 include grub/err.h explicitly.
304 2009-08-29 Robert Millan <rmh.grub@aybabtu.com>
306 * util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
307 to `ufs' in the vfs.root.mountfrom kernel parameter.
309 2009-08-29 Robert Millan <rmh.grub@aybabtu.com>
311 * term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
313 [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
314 value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
316 [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
319 2009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
321 * kern/file.c (grub_file_read): Check offset.
322 * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
323 * fs/jfs.c (grub_jfs_read_file): Likewise.
324 * fs/ntfs.c (grub_ntfs_read): Likewise.
325 * fs/reiserfs.c (grub_reiserfs_read): Likewise.
326 * fs/minix.c (grub_minix_read_file): Correct offset check.
327 * fs/ufs.c (grub_ufs_read_file): Likewise.
329 2009-08-28 Colin Watson <cjwatson@ubuntu.com>
331 * term/i386/pc/console.c (bios_data_area): Cast
332 GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.
334 2009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
336 1-bit optimised blitters.
338 * include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
340 (grub_video_fbblit_replace_24bit_1bit): Likewise.
341 (grub_video_fbblit_replace_16bit_1bit): Likewise.
342 (grub_video_fbblit_replace_8bit_1bit): Likewise.
343 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
344 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
345 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
346 * video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
348 (grub_video_fbblit_replace_24bit_1bit): Likewise.
349 (grub_video_fbblit_replace_16bit_1bit): Likewise.
350 (grub_video_fbblit_replace_8bit_1bit): Likewise.
351 (grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
352 (grub_video_fbblit_blend_XXX888_1bit): Likewise.
353 (grub_video_fbblit_blend_XXX565_1bit): Likewise.
354 * video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
356 * video/video.c (grub_video_get_blit_format): Return
357 GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.
359 2009-08-28 Colin Watson <cjwatson@ubuntu.com>
361 * normal/cmdline.c (grub_cmdline_get): Supply a format string as
362 the first argument to grub_printf.
364 2009-08-28 Colin Watson <cjwatson@ubuntu.com>
365 2009-08-28 Robert Millan <rmh.grub@aybabtu.com>
367 Add `getkeystatus' terminal method. Add a new `keystatus' command
370 * include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
371 GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
372 modifier key bitmasks.
373 (struct grub_term_input): Add `getkeystatus' member.
374 (grub_getkeystatus): Add prototype.
375 * kern/term.c (grub_getkeystatus): New function.
377 * include/grub/i386/pc/memory.h
378 (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
379 (struct grub_machine_bios_data_area): Define necessary parts of BIOS
381 * term/i386/pc/console.c (grub_console_getkeystatus): New function.
382 (grub_console_term_input): Set `getkeystatus' member.
383 * term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
385 (grub_usb_keyboard_getreport): Likewise.
386 (grub_usb_keyboard_checkkey): Likewise.
387 (grub_usb_keyboard_getkeystatus): New function.
388 (grub_usb_keyboard_term): Set `getkeystatus' member.
390 * commands/keystatus.c: New file.
391 * conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
392 (keystatus_mod_SOURCES): New variable.
393 (keystatus_mod_CFLAGS): Likewise.
394 (keystatus_mod_LDFLAGS): Likewise.
395 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
396 commands/keystatus.c.
397 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
398 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
399 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
400 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
401 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
402 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
404 2009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
406 Split befs.mod and afs.mod into *_be.mod and *.mod
408 * conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
409 (grub_fstest_SOURCES): Likewise.
410 (pkglib_MODULES): Add afs_be.mod and befs_be.mod.
411 (afs_be_mod_SOURCES): New variable.
412 (afs_be_mod_CFLAGS): Likewise.
413 (afs_be_mod_LDFLAGS): Likewise.
414 (befs_be_mod_SOURCES): Likewise.
415 (befs_be_mod_CFLAGS): Likewise.
416 (befs_be_mod_LDFLAGS): Likewise.
417 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
418 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
419 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
420 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
421 (grub_emu_SOURCES): Likewise.
422 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
423 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
424 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
425 * fs/afs_be.c: New file.
426 * fs/befs_be.c: New file.
427 * fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
428 (GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
429 (U16): Replaced with ...
430 (grub_afs_to_cpu16): ...this. All users updated.
431 (U32): Replaced with ...
432 (grub_afs_to_cpu32): ...this. All users updated.
433 (U64): Replaced with ...
434 (grub_afs_to_cpu64): ...this. All users updated.
435 (GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
436 (GRUB_AFS_BO_BIG_ENDIAN): Likewise.
437 (grub_afs_validate_sblock): Check only one endianness.
438 (GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
439 (GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
440 (GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
441 (GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
442 (GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
443 (GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
444 (GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
445 (GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
447 2009-08-26 Bean <bean123ch@gmail.com>
449 * fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
451 (GRUB_XFS_FSB_TO_BLOCK): Likewise.
452 (grub_xfs_inode_block): Change return type to grub_uint64_t.
453 (grub_xfs_read_inode): Change type of block to grub_uint64_t.
455 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
457 NetBSD memory map support.
459 * include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
460 (grub_netbsd_btinfo_mmap_header): New structure.
461 (grub_netbsd_btinfo_mmap_entry): Likewise.
462 * loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
464 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
466 Enable bsd.mod on coreboot.
468 * conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
469 (bsd_mod_SOURCES): New variable.
470 (bsd_mod_CFLAGS): Likewise.
471 (bsd_mod_LDFLAGS): Likewise.
472 (bsd_mod_ASFLAGS): Likewise.
473 * loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
474 (grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
476 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
478 Cleanup NetBSD root support.
480 * loader/i386/bsd.c (grub_netbsd_boot): Remove call to
484 2009-08-25 Felix Zielcke <fzielcke@z-51.de>
486 * util/grub.d/00_header.in: Move check for the video backend of
487 gfxterm from here ...
488 * util/grub-mkconfig.in: ... to here. Enable gfxterm if there's
489 a suitable video backend.
491 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
493 Fix breakage in grub-setup.
495 * util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
496 "msdos_partition_map".
498 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
500 Fix breakage in normal/auth.c.
502 * normal/auth.c (grub_iswordseparator): New function.
504 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
506 Authentication support.
508 * commands/password.c: New file.
509 * conf/common.rmk (pkglib_MODULES): Add password.mod.
510 (password_mod_SOURCES): New variable.
511 (password_mod_CFLAGS): Likewise.
512 (password_mod_LDFLAGS): Likewise.
513 (normal_mod_SOURCES): Add normal/auth.c.
514 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
516 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
517 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
518 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
519 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
520 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
521 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
522 * include/grub/auth.h: New file.
523 * include/grub/err.h (grub_err_t): New enum value
524 GRUB_ERR_ACCESS_DENIED.
525 * include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
527 * include/grub/normal.h (grub_cmdline_get): New argument 'history'.
528 * normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
530 * normal/auth.c: New file.
531 * normal/main.c (grub_normal_add_menu_entry): Handle --users option.
532 (grub_cmdline_run): Don't allow to go to command line without
534 * normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
535 * normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
536 menuentry without superuser rights.
537 * normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
538 user isn't a superuser.
540 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
542 Save space by inlining misc.c functions.
544 * kern/misc.c (grub_iswordseparator): Made static.
545 * kern/misc.c (grub_strcat): Moved from here ...
546 * include/grub/misc.h (grub_strcat): ... here. Inlined.
547 * kern/misc.c (grub_strncat): Moved from here ...
548 * include/grub/misc.h (grub_strncat): ... here. Inlined.
549 * kern/misc.c (grub_strcasecmp): Moved from here ...
550 * include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
551 * kern/misc.c (grub_strncasecmp): Moved from here ...
552 * include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
553 * kern/misc.c (grub_isalpha): Moved from here ...
554 * include/grub/misc.h (grub_isalpha): ... here. Inlined.
555 * kern/misc.c (grub_isdigit): Moved from here ...
556 * include/grub/misc.h (grub_isdigit): ... here. Inlined.
557 * kern/misc.c (grub_isgraph): Moved from here ...
558 * include/grub/misc.h (grub_isgraph): ... here. Inlined.
559 * kern/misc.c (grub_tolower): Moved from here ...
560 * include/grub/misc.h (grub_tolower): ... here. Inlined.
562 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
564 * script/sh/function.c (grub_script_function_find): Cut error message
565 not to flood terminal.
566 * script/sh/lexer.c (grub_script_yylex): Remove command line length
568 * script/sh/script.c (grub_script_arg_add): Duplicate string.
570 2009-08-24 Colin Watson <cjwatson@ubuntu.com>
572 * term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
573 `report' grub_uint8_t *.
574 (grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
575 Use a 50-millisecond timeout rather than just repeating
576 grub_usb_keyboard_getreport 50 times.
577 (grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.
579 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
581 Rename *_partition_map to part_*
583 * partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
584 * partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
585 * partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
586 * partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
588 * partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
590 * partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
591 * util/grub-probe.c (probe_partmap): Don't transform partition name
594 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
596 Fix OpenBSD and NetBSD support.
598 * include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
599 memory address conflict.
600 (OPENBSD_MMAP_ACPI): New definition.
601 (OPENBSD_MMAP_NVS): Likewise.
602 * loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
603 and OPENBSD_MMAP_NVS.
604 Add memory map terminator
605 Explicit cast when calling grub_unix_real_boot.
606 (grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.
608 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
610 Let user specify NetBSD root device.
612 * loader/i386/bsd.c (netbsd_root): New variable.
613 (netbsd_opts): New option 'root'.
614 (NETBSD_ROOT_ARG): New macro.
615 (grub_netbsd_boot): Use 'netbsd_root'.
616 (grub_bsd_unload): Free 'netbsd_root'.
617 (grub_cmd_netbsd): Fill 'netbsd_root'.
619 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
621 Support for 64-bit NetBSD.
623 * loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
624 point when booting non-FreeBSD.
626 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
628 Support --no-smp and --no-acpi for NetBSD.
630 * include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
631 (NETBSD_AB_NOACPI): Likewise.
632 * loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
633 (netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
635 2009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
637 * fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
639 (grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
640 errors. Call grub_error when needed.
642 2009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
644 * commands/search.c (search_fs): Try searching without autoload first.
645 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
646 filesystem module explicitly for faster booting.
648 2009-08-23 Colin Watson <cjwatson@ubuntu.com>
650 * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
652 2009-08-23 Colin Watson <cjwatson@ubuntu.com>
654 * util/grub.d/30_os-prober.in: Disable os-prober if
655 `GRUB_DISABLE_OS_PROBER' was set to true.
657 2009-08-23 Robert Millan <rmh.grub@aybabtu.com>
659 * partmap/pc.c: Rename to ...
660 * partmap/msdos.c: ... this. Update all users.
661 (grub_pc_partition_map): Rename to ...
662 (grub_msdos_partition_map): ... this. Update all users.
664 * parttool/pcpart.c: Rename to ...
665 * parttool/msdospart.c: ... this. Update all users.
667 * include/grub/pc_partition.h: Rename to ...
668 * include/grub/msdos_partition.h: ... this. Update all users.
669 (grub_pc_partition_bsd_entry): Rename to ...
670 (grub_msdos_partition_bsd_entry): ... this. Update all users.
671 (grub_pc_partition_disk_label): Rename to ...
672 (grub_msdos_partition_disk_label): ... this. Update all users.
673 (grub_pc_partition_entry): Rename to ...
674 (grub_msdos_partition_entry): ... this. Update all users.
675 (grub_pc_partition_mbr): Rename to ...
676 (grub_msdos_partition_mbr): ... this. Update all users.
677 (grub_pc_partition): Rename to ...
678 (grub_msdos_partition): ... this. Update all users.
679 (grub_pc_partition_is_empty): Rename to ...
680 (grub_msdos_partition_is_empty): ... this. Update all users.
681 (grub_pc_partition_is_extended): Rename to ...
682 (grub_msdos_partition_is_extended): ... this. Update all users.
683 (grub_pc_partition_is_bsd): Rename to ...
684 (grub_msdos_partition_is_bsd): ... this. Update all users.
686 * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
687 (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
688 (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
689 (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
690 (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
691 (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
692 (gpt_mod_LDFLAGS): Rename to ...
693 (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
694 (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
695 (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
696 (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
697 (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
698 (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
699 (part_gpt_mod_LDFLAGS): ... this.
700 (pkglib_MODULES): Prefix partition modules with `part_'. Rename
701 `pcpart.mod' to `msdospart.mod'.
702 (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
704 (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
705 (msdospart_mod_LDFLAGS): ... this.
707 2009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
709 * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
710 (openbsd_opts): Likewise.
711 (netbsd_opts): Likewise.
712 (freebsd_flags): Added 0 terminator.
713 (openbsd_flags): Likewise.
714 (netbsd_flags): Likewise.
715 (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
716 (grub_cmd_freebsd): Transformed into extended command.
717 (grub_cmd_openbsd): Likewise.
718 (grub_cmd_netbsd): Likewise.
719 (cmd_freebsd): Changed type to grub_extcmd_t.
720 (cmd_openbsd): Likewise.
721 (cmd_netbsd): Likewise.
722 (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
723 grub_cmd_openbsd as extended commands.
724 (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
725 cmd_netbsd and cmd_openbsd
727 2009-08-22 Vladimir Serbinenko <phcoder@gmail.com>
729 * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
731 2009-08-21 Pavel Roskin <proski@gnu.org>
733 * Makefile.in (install-local): When checking if a file is in the
734 build directory, use "test -e" to detect symlinks.
736 * Makefile.in (install-local): Remove all files in
737 $(DESTDIR)$(pkglibdir) before installing new files there.
739 2009-08-18 Felix Zielcke <fzielcke@z-51.de>
741 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
744 2009-08-18 Felix Zielcke <fzielcke@z-51.de>
746 * util/grub-mkconfig.in: Don't use gfxterm by default if not
747 explicitly specified by the user.
749 2009-08-18 Pavel Roskin <proski@gnu.org>
751 * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
752 grub_uint8_t pointer for data.
753 * include/grub/fbutil.h (struct grub_video_fbblit_info):
755 * video/fb/fbutil.c: Remove unnecessary casts.
757 2009-08-17 Michal Suchanek <hramrach@centrum.cz>
761 * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
762 (grub_vbe_set_video_mode): Save active mode info
763 only after setting the mode.
764 (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
767 2009-08-17 Michal Suchanek <hramrach@centrum.cz>
769 Rename variables for clarity.
771 * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
772 (active_vbe_mode_info): ... this. All users updated.
773 (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
775 (initial_mode): Rename to ...
776 (initial_vbe_mode): ... this. All users updated.
777 (mode_in_use): Rename to ..
778 (vbe_mode_in_use): ... this. All users updated.
779 (mode_list): Rename to ..
780 (vbe_mode_list): ... this. All users updated.
781 (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
782 'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
783 (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
784 'mode_list_size' to 'vbe_mode_list_size'.
785 (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
786 'best_mode_info' to 'best_vbe_mode_info' and
787 'best_mode' to 'best_vbe_mode'
789 2009-08-17 Michal Suchanek <hramrach@centrum.cz>
791 Remove duplicate grub_video_fb_get_video_ptr.
793 * include/grub/fbutil.h (get_data_ptr): Rename to ...
794 (grub_video_fb_get_video_ptr): ... this.
795 * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
796 * video/fb/fbutil.c: Add comment about addressing.
797 (get_data_ptr): Rename to ...
798 (grub_video_fb_get_video_ptr): ... this. All users updated.
799 * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
801 2009-08-17 Robert Millan <rmh.grub@aybabtu.com>
803 * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
804 grub_dprintf() that was just added.
806 2009-08-17 Robert Millan <rmh.grub@aybabtu.com>
808 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
809 (DEFAULT_VIDEO_MODE): Remove macros.
810 (grub_linux_boot): Remove assumption that Linux has FB support,
811 and use "text" as default video mode.
813 2009-08-15 Vladimir Serbinenko <phcoder@gmail.com>
815 * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
817 * fs/fat.c (grub_fat_read_data): Likewise.
819 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
821 * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
823 (grub_module): Likewise.
825 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
827 * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
828 mbi->cmdline but free playground.
830 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
832 Handle group offset on UFS1.
834 * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
835 (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
837 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
839 Split ufs.mod into ufs1.mod and ufs2.mod.
841 * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
842 (grub_fstest_SOURCES): Likewise.
843 (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
844 (ufs_mod_SOURCES): Remove.
845 (ufs_mod_CFLAGS): Likewise.
846 (ufs_mod_LDFLAGS): Likewise.
847 (ufs1_mod_SOURCES): New variable.
848 (ufs1_mod_CFLAGS): Likewise.
849 (ufs1_mod_LDFLAGS): Likewise.
850 (ufs2_mod_SOURCES): New variable.
851 (ufs2_mod_CFLAGS): Likewise.
852 (ufs2_mod_LDFLAGS): Likewise.
853 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
854 * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
856 (grub_emu_SOURCES): Likewise.
857 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
858 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
859 (grub_setup_SOURCES): Likewise.
860 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
861 * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
862 (grub_setup_SOURCES): Likewise.
863 * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
865 * fs/ufs2.c: New file.
866 * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
868 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
872 * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
873 subsystem at the end.
874 * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
875 (video_fb_mod_SOURCES): New variable.
876 (video_fb_mod_CFLAGS): Likewise.
877 (video_fb_mod_LDFLAGS): Likewise.
878 * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
879 video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
880 * video/i386/pc/vbeblit.c: Moved from here ...
881 * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
882 * video/i386/pc/vbefill.c: Moved from here ...
883 * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
884 * video/i386/pc/vbeutil.c: Moved from here ...
885 * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
886 * include/grub/i386/pc/vbeblit.h: Moved from here ...
887 * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
888 * include/grub/i386/pc/vbefill.h: Moved from here ...
889 * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
890 * include/grub/i386/pc/vbeutil.h: Moved from here ...
891 * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
892 * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
893 * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
894 * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
895 (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
896 (grub_video_adapter): Added 'get_info_and_fini'.
897 (grub_video_get_info_and_fini): New prototype.
898 (grub_video_set_mode): make modestring const char *.
899 * loader/i386/linux.c (grub_linux_setup_video): Use
900 grub_video_get_info_and_fini.
901 (grub_linux_boot): Move modesetting just before booting.
902 * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
903 grub_video_get_info_and_fini.
904 * video/i386/pc/vbe.c: Moved framebuffer part ...
905 * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
906 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
907 grub_video_fbstd_colors and grub_video_fb_set_palette.
908 (grub_video_vbe_init): Clear 'framebuffer' variable and use
910 (grub_video_vbe_fini): Use grub_video_fb_fini.
911 (grub_video_vbe_setup): Use framebuffer.render_target instead of
912 render_target and use grub_video_fb_set_active_render_target and
913 grub_video_fb_set_palette.
914 (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
915 (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
916 (grub_video_vbe_adapter): Use framebuffer.
917 * video/video.c (grub_video_get_info_and_fini): New function.
918 (grub_video_set_mode): Make modestring const char *.
919 (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
920 values are already initialised.
922 2009-08-14 Pavel Roskin <proski@gnu.org>
924 * boot/i386/pc/cdboot.S: Use LOCAL for local labels. Eliminate
926 * boot/i386/pc/diskboot.S: Likewise.
927 * boot/i386/pc/lnxboot.S: Likewise. Hardcode the number of code
928 sectors allow compilation on MacOSX.
929 * conf/i386-pc.rmk: Enable unconditional compilation of
932 2009-08-13 Colin Watson <cjwatson@ubuntu.com>
934 * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
935 * util/grub.d/00_header.in: Enter interruptible sleep if
936 GRUB_HIDDEN_TIMEOUT is set.
938 2009-08-13 Yves Blusseau <blusseau@zetam.org>
940 * include/grub/symbol.h: Add the LOCAL macro.
941 * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
944 2009-08-13 Pavel Roskin <proski@gnu.org>
946 * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
947 any modern compilers we support.
949 * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
950 Use local labels starting with "L_" so that Apple assembler
951 knows they are local.
953 2009-08-10 Robert Millan <rmh.grub@aybabtu.com>
955 * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
956 (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
957 (bsd_kernel_types): ... this enum.
959 * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
960 (grub_cmd_freebsd_module_elf): Abort with "You need to load the
961 kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
963 (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
964 (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
965 (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
968 2009-08-08 Robert Millan <rmh.grub@aybabtu.com>
970 * util/grub-dumpdevtree: Moved from here ...
971 * util/i386/efi/grub-dumpdevtree: ... to here.
972 (hexify): New function. Converts a string to its hex version.
973 Generate hex versions of "efi" and "device-properties" by calling
974 hexify() on the ASCII strings rather than by hardcoding numbers.
976 2009-08-08 Robert Millan <rmh.grub@aybabtu.com>
978 * fs/jfs.c: Update copyright year.
980 2009-08-08 Felix Zielcke <fzielcke@z-51.de>
982 * util/grub.d/00_header.in: Fix a comment.
983 * util/grub.d/10_linux.in: Likewise.
984 * util/grub.d/10_windows.in: Likewise.
985 * util/grub.d/10_hurd.in: Likewise.
987 2009-08-08 Felix Zielcke <fzielcke@z-51.de>
989 * util/grub-mkconfig.in: Allow the user to specify the used font
992 2009-08-08 Pavel Roskin <proski@gnu.org>
994 * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
995 available, xfs.mod needs it now.
997 * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
998 the "g" modifier in sed when the intention is to strip something
999 once. This fixes comparison of kernels with multiple dashes.
1001 * util/grub-mkconfig.in: Define datarootdir, datadir may depend
1002 on it. Add missing space before closing bracket. Fix
1003 misleading formatting.
1005 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1007 * docs/grub.texi: Major overhaul. Remove all sections that are
1008 specific to GRUB Legacy, or mostly composed of Legacy-specific
1011 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1013 * docs/version.texi: New file. Provides version information for
1016 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1018 * docs/grub.texi: Update CVS information to SVN.
1019 Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
1021 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
1023 * util/grub-mkconfig.in: Remove a wrong `fi'.
1025 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
1027 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
1028 (grub_jfs_uuid): New function.
1029 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
1031 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
1033 * util/grub-mkconfig_lib.in (font_path): Move the functionality
1035 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
1036 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
1038 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1040 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
1041 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
1044 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
1045 not just "vmlinu[zx]".
1047 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
1050 * util/grub.d/10_linux.in (find_latest): Moved from here ...
1051 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
1054 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
1056 * util/grub.d/10_freebsd.in: Use an absolute device path for
1057 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
1059 2009-08-06 Felix Zielcke <fzielcke@z-51.de>
1061 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
1062 handling of multiple abstraction modules.
1064 2009-08-04 Robert Millan <rmh.grub@aybabtu.com>
1066 Fix a bug resulting in black screen when loading Linux using a
1069 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
1072 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
1073 (grub_vbe_bios_getset_dac_palette_width): New function.
1074 (grub_vbe_bios_get_dac_palette_width)
1075 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
1076 grub_vbe_bios_getset_dac_palette_width()).
1078 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
1079 check for return status.
1080 (grub_vbe_get_video_mode_info): When getting information for a packed
1081 mode (<= 8 bpp), obtain DAC palette width using
1082 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
1083 {red,green,blue}_mark_size.
1085 2009-08-04 Felix Zielcke <fzielcke@z-51.de>
1087 * commands/search.c (options): Fix help output to match actual code.
1089 2009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
1091 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
1094 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
1096 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
1099 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
1101 Support Apple partition map with sector size different from 512 bytes.
1103 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
1104 (apple_partition_map_iterate): Respect 'aheader.blocksize'
1105 and 'apart.partmap_size'.
1107 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
1108 2009-08-01 Robert Millan <rmh.grub@aybabtu.com>
1112 * commands/i386/cpuid.c (options): New variable.
1113 (grub_cmd_cpuid): Return real error.
1114 (GRUB_MOD_INIT(cpuid)): Declare options.
1116 2009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
1118 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
1121 2009-07-31 Bean <bean123ch@gmail.com>
1123 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
1125 (grub_fshelp_node): Move inode field to the end.
1126 (grub_xfs_data): Remove inode field.
1127 (grub_xfs_inode_block): Calculate inode size using sblock.
1128 (grub_xfs_inode_offset): Likewise.
1129 (grub_xfs_read_inode): Calculate inode size using sblock.
1130 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
1131 (grub_xfs_iterate_dir): Calculate inode size using sblock.
1132 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
1133 to match inode size.
1134 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
1135 not accessible when data is null.
1136 (grub_xfs_open): Likewise.
1138 2009-07-31 Bean <bean123ch@gmail.com>
1140 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
1141 Don't change pv->disk if it's already set.
1143 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
1144 (grub_raid_register): ... here.
1145 (grub_raid_rescan): Removed.
1147 * include/grub/raid.h (grub_raid_rescan): Removed.
1149 * util/grub-fstest.c: Remove include file <grub/raid.h>.
1150 (fstest): Replace grub_raid_rescan with module fini function followed
1153 * util/grub-probe.c: Add include file <grub/raid.h>.
1154 (probe_raid_level): New function.
1155 (probe): Detect abstraction by walking the disk device, support two
1156 level of abstraction (LVM on RAID) when detecting partition map.
1158 2009-07-31 Pavel Roskin <proski@gnu.org>
1160 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
1161 to grub_zalloc(), it was erroneous.
1162 Reported by Bean <bean123ch@gmail.com>
1164 2009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
1166 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
1167 embedding zone, not only the first one.
1169 2009-07-29 Joe Auricchio <jauricchio@gmail.com>
1171 * term/gfxterm.c (clear_char): New function.
1172 (grub_virtual_screen_setup): Use clear_char.
1173 (scroll_up): Likewise.
1174 (grub_virtual_screen_cls): Likewise.
1176 2009-07-29 Felix Zielcke <fzielcke@z-51.de>
1178 * util/deviceiter.c (get_acceleraid_disk_name): New static
1180 (grub_util_iterate_devices): Handle Accelraid devices.
1181 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
1183 2009-07-28 Robert Millan <rmh.grub@aybabtu.com>
1185 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
1186 separator for the suggested gfxpayload string (';' collides with the
1187 parser and needs escaping).
1189 2009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
1191 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
1192 Clear direction flag before jumping to OS.
1193 (grub_multiboot2_real_boot): Likewise.
1195 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
1197 * util/i386/pc/grub-install: Fix parsing of --disk-module
1200 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
1202 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
1205 2009-07-26 Felix Zielcke <fzielcke@z-51.de>
1207 * util/grub-mkconfig.in (package_version): New variable.
1208 Use it do display the version.
1210 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
1212 * kern/file.c (grub_file_open): Revert to previous check with
1215 2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
1217 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
1218 from help line. It's out of sync with code.
1220 2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
1222 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
1223 entries on failed boot.
1225 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
1227 * kern/file.c (grub_file_open): Fix an error check.
1229 2009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
1231 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
1232 partition map couldn't be identified.
1234 2009-07-23 Pavel Roskin <proski@gnu.org>
1236 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
1237 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
1238 case of little endian words becomes just an optimization.
1239 Respect const modifier.
1240 (md5_final): Use code that doesn't depend on endianness.
1242 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
1243 to avoid loss of upper bits if align is unsigned and shorter
1246 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
1248 UUID support for UFS
1250 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
1251 (grub_ufs_uuid): New function.
1252 (grub_ufs_fs): add .uuid
1254 2009-07-21 Pavel Roskin <proski@gnu.org>
1256 * kern/dl.c (grub_dl_check_header): Make static.
1258 2009-07-21 Felix Zielcke <fzielcke@z-51.de>
1260 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
1261 add drivemap for Vista. It breaks Windows 7.
1263 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
1265 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
1268 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
1272 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
1273 (grub_fstest_SOURCES): Likewise.
1274 (pkglib_MODULES): Add befs.mod.
1275 (befs_mod_SOURCES): New variable.
1276 (befs_mod_CFLAGS): Likewise.
1277 (befs_mod_LDFLAGS): Likewise.
1278 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1279 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1280 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1281 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1282 (grub_setup_SOURCES): Likewise.
1283 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1284 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1285 (grub_setup_SOURCES): Likewise.
1286 * fs/befs.c: New file.
1287 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
1288 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
1289 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
1290 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
1291 (B_KEY_INDEX_ALIGN): New declaration.
1292 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
1293 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
1294 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
1295 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
1296 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
1297 (grub_afs_mount) [MODE_BFS]: Likewise.
1298 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
1299 (grub_afs_fs): Use GRUB_AFS_FSNAME
1300 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
1301 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
1302 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
1303 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
1305 2009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
1307 * util/getroot.c (find_root_device): Add support for MacOSX.
1308 * util/hostdisk.c: Likewise.
1310 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
1312 * font/font.c (find_glyph): Check whether a font is present to avoid
1315 2009-07-20 Joe Auricchio <jauricchio@gmail.com>
1317 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
1319 2009-07-20 Pavel Roskin <proski@gnu.org>
1321 * configure.ac: Trim excessively wordy excuses.
1323 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
1325 Add symlink, mtime and label support to AtheFS.
1327 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
1328 (grub_afs_iterate_dir): Handle symlinks.
1329 (grub_afs_open): Use grub_afs_read_symlink.
1330 (grub_afs_dir): Likewise.
1332 (grub_afs_label): New function.
1333 (grub_afs_fs): Add grub_afs_label.
1334 (grub_afs_read_symlink): New function.
1336 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
1340 * fs/afs.c: Fix comments style.
1341 (grub_afs_blockrun): Declare as packed.
1342 (grub_afs_datastream): Likewise.
1343 (grub_afs_bnode): Likewise.
1344 (grub_afs_btree): Likewise.
1345 (grub_afs_sblock): Likewise.
1346 Declare `name' as char.
1347 (grub_afs_inode): Declare as packed.
1348 Change void *vnode to grub_uint32_t unused.
1349 (grub_afs_iterate_dir): Check that key_size is positive.
1350 (grub_afs_mount): Don't read superblock twice.
1351 (grub_afs_dir): Don't free node in case of error,
1352 grub_fshelp_find_file already handles this.
1353 (grub_afs_open): Likewise.
1355 2009-07-19 Pavel Roskin <proski@gnu.org>
1357 * Makefile.in: Remove LIBLZO and enable_lzo.
1358 * conf/i386-pc.rmk: Remove lzo support.
1359 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
1360 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
1362 * kern/i386/pc/lzo1x.S: Remove.
1363 * kern/i386/pc/startup.S: Remove lzo support.
1364 * util/i386/pc/grub-mkimage.c: Likewise.
1366 2009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
1368 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
1369 * fs/xfs.c (grub_xfs_dir): Likewise.
1370 * fs/afs.c (grub_afs_dir): Likewise.
1371 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
1372 (grub_iso9660_open): Likewise.
1373 * fs/jfs.c (grub_jfs_open): Likewise.
1374 * fs/ext2.c (grub_ext2_dir): Likewise.
1375 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
1376 * script/sh/lexer.c (grub_script_yylex): Likewise.
1378 2009-07-16 Pavel Roskin <proski@gnu.org>
1380 * configure.ac: Never add "-c" to CFLAGS.
1382 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
1384 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
1385 grub_cv_cc_efiemu should be used.
1387 * configure.ac: Typo fixes.
1389 * kern/mm.c (grub_zalloc): New function.
1390 (grub_debug_zalloc): Likewise.
1391 * include/grub/mm.h: Declare grub_zalloc() and
1392 grub_debug_zalloc().
1393 * util/misc.c (grub_zalloc): New function.
1394 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
1395 instead of grub_malloc(), remove unneeded initializations.
1396 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
1397 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
1398 * commands/parttool.c (grub_cmd_parttool): Likewise.
1399 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
1400 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
1401 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
1402 * disk/usbms.c (grub_usbms_finddevs): Likewise.
1403 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
1404 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
1405 (grub_cmd_efiemu_pnvram): Likewise.
1406 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
1407 * fs/iso9660.c (grub_iso9660_mount): Likewise.
1408 (grub_iso9660_iterate_dir): Likewise.
1409 * fs/jfs.c (grub_jfs_opendir): Likewise.
1410 * fs/ntfs.c (list_file): Likewise.
1411 (grub_ntfs_mount): Likewise.
1412 * kern/disk.c (grub_disk_open): Likewise.
1413 * kern/dl.c (grub_dl_load_core): Likewise.
1414 * kern/elf.c (grub_elf_file): Likewise.
1415 * kern/env.c (grub_env_context_open): Likewise.
1416 (grub_env_set): Likewise.
1417 (grub_env_set_data_slot): Likewise.
1418 * kern/file.c (grub_file_open): Likewise.
1419 * kern/fs.c (grub_fs_blocklist_open): Likewise.
1420 * loader/i386/multiboot.c (grub_module): Likewise.
1421 * loader/xnu.c (grub_xnu_create_key): Likewise.
1422 (grub_xnu_create_value): Likewise.
1423 * normal/main.c (grub_normal_add_menu_entry): Likewise.
1424 (read_config_file): Likewise.
1425 * normal/menu_entry.c (make_screen): Likewise.
1426 * partmap/sun.c (sun_partition_map_iterate): Likewise.
1427 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
1428 * script/sh/script.c (grub_script_parse): Likewise.
1429 * video/bitmap.c (grub_video_bitmap_create): Likewise.
1430 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
1431 * video/readers/png.c (grub_png_output_byte): Likewise.
1432 (grub_video_reader_png): Likewise.
1434 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
1436 Enable all targets that can be built by default
1438 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
1439 grub-mkfont and grub-fstest if they can be built
1441 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
1443 Fix hang and segmentation fault in grub-emu-usb
1445 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
1446 * util/usb.c (grub_libusb_devices): likewise
1447 (grub_libusb_init): rename to ...
1448 (GRUB_MOD_INIT (libusb)):...this
1449 (grub_libusb_fini): rename to ..
1450 (GRUB_MOD_FINI (libusb)):...this
1451 * disk/usbms.c (grub_usbms_transfer): fix retry logic
1452 * include/grub/disk.h (grub_raid_init): removed, it's useless
1453 (grub_raid_fini): likewise
1454 (grub_lvm_init): likewise
1455 (grub_lvm_fini): likewise
1456 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
1459 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
1463 * Makefile.in (LIBUSB): new macro
1464 * genmk.rb (Utility/print_tail): new method
1465 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
1466 (top level): call util.print_tail at the end.
1468 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
1470 Make FreeBSD accept zpool.cache
1472 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
1473 type is /boot/zfs/zpool.cache
1475 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
1479 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
1480 correct wrong typedef
1481 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
1483 2009-07-15 Pavel Roskin <proski@gnu.org>
1485 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
1486 * kern/disk.c (struct grub_disk_cache): Likewise.
1488 * commands/probe.c (options): Typo fix.
1490 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
1491 Increase to 0x5a to accommodate FAT32. Adjust other offsets
1493 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
1495 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
1496 the end of "Error" to make the message more readable.
1498 * boot/i386/pc/boot.S (kernel_segment): Remove.
1499 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
1502 * boot/i386/pc/boot.S (boot_version): Remove.
1503 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
1506 * include/grub/i386/pc/boot.h: Sort all offsets.
1507 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
1508 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
1509 * boot/i386/pc/boot.S: Assert location of every offset listed in
1510 include/grub/i386/pc/boot.h.
1512 2009-07-13 Pavel Roskin <proski@gnu.org>
1514 * include/grub/i386/coreboot/machine.h: Rename
1515 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
1516 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
1517 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
1519 * kern/dl.c: Force native word size to suppress warnings when
1522 * kern/device.c (grub_device_iterate): Change struct part_ent to
1523 hold the name, not a pointer to it. Use one grub_malloc() per
1524 partition, not two. Free partition_name if grub_malloc() fails.
1525 Set ents to NULL only before grub_partition_iterate() is called.
1527 2009-07-11 Bean <bean123ch@gmail.com>
1529 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
1532 2009-07-10 Bean <bean123ch@gmail.com>
1533 2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
1535 * kern/ieee1275/openfw.c (grub_children_iterate)
1536 (grub_devalias_iterate): Fix size evaluation for property or path
1537 strings, which was broken since r2132.
1539 2009-07-07 Pavel Roskin <proski@gnu.org>
1541 * commands/search.c (search_file): Merge into ...
1542 (search_fs): ... this. Accept search type as argument.
1543 (grub_cmd_search): Pass search type to search_fs().
1545 * include/grub/util/console.h: New file.
1546 * util/console.c: Use it instead of grub/machine/console.h.
1547 * util/grub-emu.c: Likewise.
1549 * lib/arg.c (find_long_option): Remove.
1550 (find_long): Add `len' argument, make `s' const char *.
1551 (grub_arg_parse): Parse long options in place, not in a
1554 2009-07-06 Pavel Roskin <proski@gnu.org>
1556 * commands/search.c (search_fs): Fix potential NULL pointer
1559 * commands/search.c (search_fs): Replace QUID macro with quid_fn
1562 2009-07-06 Daniel Mierswa <impulze@impulze.org>
1564 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
1567 2009-07-05 Pavel Roskin <proski@gnu.org>
1569 * include/grub/i386/linux.h (struct linux_kernel_params):
1570 Restore padding3, it's still needed.
1572 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
1574 * util/osdetect.lua: Likewise.
1576 2009-07-05 Bean <bean123ch@gmail.com>
1578 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
1580 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
1581 (grub_lua_getenv): Likewise.
1582 (grub_lua_setenv): Likewise.
1583 (save_errno): New function.
1584 (push_result): Likewise.
1585 (grub_lua_enum_device): Likewise.
1586 (grub_lua_enum_file): Likewise.
1587 (grub_lua_file_open): Likewise.
1588 (grub_lua_file_close): Likewise.
1589 (grub_lua_file_seek): Likewise.
1590 (grub_lua_file_read): Likewise.
1591 (grub_lua_file_getline): Likewise.
1592 (grub_lua_file_getsize): Likewise.
1593 (grub_lua_file_getpos): Likewise.
1594 (grub_lua_file_eof): Likewise.
1595 (grub_lua_file_exist): Likewise.
1596 (grub_lua_add_menu): Likewise.
1598 * script/lua/grub_lua.h (isupper): New inline function.
1599 (islower): Likewise.
1600 (ispunct): Likewise.
1601 (isxdigit): Likewise.
1602 (strcspn): Change to normal function.
1603 (strpbkr): New function declaration.
1606 * script/lua/grub_main.c (scan_str): New function.
1607 (strcspn): Likewise.
1608 (strpbrk): Likewise.
1611 * script/lua/linit.c (lualibs): Enable the string library.
1613 * util/osdetect.lua: New file.
1615 2009-07-04 Robert Millan <rmh.grub@aybabtu.com>
1617 * include/grub/i386/linux.h (struct linux_kernel_params): Add
1618 `capabilities' member.
1620 2009-07-02 Pavel Roskin <proski@gnu.org>
1622 * genparttoollist.sh: Add missing newline at the end.
1624 2009-07-01 Pavel Roskin <proski@gnu.org>
1626 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
1628 * util/hostdisk.c (open_device): Remove `const' from
1629 `sysctl_size', as sysctlbyname() can change it (in this case it
1630 doesn't actually happen).
1632 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
1633 using signed long int constants.
1635 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
1636 constant to avoid a warning on FreeBSD.
1638 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
1641 * Makefile.in: Install include/grub/machine symlink.
1643 * Makefile.in: When installing symlinks, use "cp -fR", which
1644 works on FreeBSD and MacOSX.
1645 From Yves Blusseau <cl7m42e02@sneakemail.com>
1647 * kern/dl.c (grub_dl_resolve_symbol): Make static.
1648 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
1650 * util/misc.c: Move grub_reboot() and grub_halt() ...
1651 * util/grub-emu.c: ... here. Make main_env static.
1652 * include/grub/util/misc.h: Remove main_env.
1654 * kern/mm.c: Use correct format to print size_t.
1656 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
1657 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
1658 * kern/powerpc/dl.c: Likewise.
1659 * kern/sparc64/dl.c: Likewise.
1660 * kern/x86_64/dl.c: Likewise.
1662 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
1664 Fix grub-emu build on sparc64-ieee1275.
1666 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
1667 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
1669 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
1671 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
1672 (grub_reboot, grub_halt): New functions.
1674 * util/i386/pc/misc.c: Delete. Update all users.
1675 * util/sparc64/ieee1275/misc.c: Likewise.
1676 * util/powerpc/ieee1275/misc.c: Likewise.
1678 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
1680 * conf/i386.rmk (setjmp_mod_SOURCES)
1681 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
1682 * conf/common.rmk (setjmp_mod_SOURCES)
1683 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
1684 to use $(target_cpu).
1685 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
1686 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
1687 * conf/powerpc-ieee1275.rmk: Likewise.
1688 * conf/sparc64-ieee1275.rmk: Likewise.
1690 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
1691 $(target_cpu) for kern/$(target_cpu)/dl.c.
1692 * conf/i386-efi.rmk: Likewise.
1693 * conf/i386-ieee1275.rmk: Likewise.
1694 * conf/x86_64-efi.rmk: Likewise.
1695 * conf/i386-coreboot.rmk: Likewise.
1696 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
1697 $(target_cpu) for kern/$(target_cpu)/dl.c and for
1698 kern/$(target_cpu)/cache.S.
1699 * conf/sparc64-ieee1275.rmk: Likewise.
1701 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
1703 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
1704 type to `grub_uint8_t', and adjust `padding9' accordingly.
1706 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
1708 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
1710 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
1711 assembly in final jump, using register constraints.
1713 (grub_linux_boot): For text mode, initialize `have_vga' using
1714 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
1716 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
1717 right before the final jump.
1719 Set `video_mode' to 0x3.
1721 Document initialization of `video_page', `video_mode' and
1724 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
1726 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
1727 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
1728 and set GRUB_LINUX_FLAG_QUIET appropriately.
1730 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
1732 Fix build on Debian / sparc.
1734 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
1736 2009-06-28 Pavel Roskin <proski@gnu.org>
1738 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
1741 * util/grub.d/10_linux.in: Match SUSE style initrd names.
1743 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
1745 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
1748 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
1752 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
1753 file can't be opened. grub_file_open() is already supposed to set
1754 grub_errno / grub_errmsg appropriately.
1755 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1757 2009-06-27 Pavel Roskin <proski@gnu.org>
1758 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
1760 * include/grub/dl.h: Include grub/elf.h.
1761 (struct grub_dl): Add symtab field.
1762 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
1763 GRUB_MODULES_MACHINE_READONLY.
1764 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
1765 of the header for read-only modules.
1766 (grub_dl_unload): Free mod->symtab for read-only modules.
1767 * kern/i386/dl.c: Use mod->symtab.
1768 * kern/powerpc/dl.c: Likewise.
1769 * kern/sparc64/dl.c: Likewise.
1770 * kern/x86_64/dl.c: Likewise.
1772 * conf/i386-qemu.rmk: New file.
1773 * kern/i386/qemu/startup.S: Likewise.
1774 * kern/i386/qemu/mmap.c: Likewise.
1775 * boot/i386/qemu/boot.S: Likewise.
1776 * include/grub/i386/qemu/time.h: Likewise.
1777 * include/grub/i386/qemu/serial.h: Likewise.
1778 * include/grub/i386/qemu/kernel.h: Likewise.
1779 * include/grub/i386/qemu/console.h: Likewise.
1780 * include/grub/i386/qemu/boot.h: Likewise.
1781 * include/grub/i386/qemu/init.h: Likewise.
1782 * include/grub/i386/qemu/machine.h: Likewise.
1783 * include/grub/i386/qemu/loader.h: Likewise.
1784 * include/grub/i386/qemu/memory.h: Likewise.
1786 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
1787 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
1788 [qemu] (pkglib_IMAGES): Add `boot.img'.
1789 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
1790 [qemu] (boot_img_FORMAT): New variables.
1791 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
1792 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
1793 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
1794 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
1795 [qemu] (kernel_img_FORMAT): New variables.
1797 * configure.ac: Recognise `i386-qemu'.
1799 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
1800 (for no compression).
1801 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
1802 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
1803 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
1804 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
1807 2009-06-27 Pavel Roskin <proski@gnu.org>
1809 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
1811 * efiemu/prepare32.c: Likewise.
1812 * efiemu/prepare64.c: Likewise.
1814 2009-06-26 Pavel Roskin <proski@gnu.org>
1816 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
1817 * include/grub/elf.h: Define symbols without "32" or "64" based
1818 on GRUB_TARGET_WORDSIZE.
1819 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
1820 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
1822 * efiemu/loadcore64.c: Likewise.
1823 * loader/i386/bsd32.c: Likewise.
1824 * loader/i386/bsd64.c: Likewise.
1825 * kern/dl.c: Remove own ELF definitions.
1826 * util/i386/efi/grub-mkimage.c: Likewise.
1828 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
1830 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
1831 segment 0x0 unconditionally, because the reference generated by
1832 GAS is an absolute address.
1834 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1836 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
1837 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
1839 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1841 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
1842 indexes. Check for -f explicitly.
1843 (search_file): Improve error message.
1844 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
1846 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1848 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
1849 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
1851 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1853 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
1854 * conf/i386-ieee1275.rmk: Likewise.
1855 * conf/i386-coreboot.rmk: Likewise.
1857 * kern/i386/pc/startup.S (grub_stop): Remove function.
1858 * kern/i386/ieee1275/startup.S: Likewise.
1859 * kern/i386/coreboot/startup.S: Likewise.
1860 * kern/i386/misc.S (grub_stop): New function.
1862 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1864 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
1865 * kern/i386/realmode.S (real_to_prot): ... to here.
1867 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1869 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
1871 (kernel_elf_SOURCES): Rename to ...
1872 (kernel_img_SOURCES): ... this.
1873 (kernel_elf_HEADERS): Rename to ...
1874 (kernel_img_HEADERS): ... this. Update all users.
1875 (kernel_elf_ASFLAGS): Rename to ...
1876 (kernel_img_ASFLAGS): ... this.
1877 (kernel_elf_CFLAGS): Rename to ...
1878 (kernel_img_CFLAGS): ... this.
1879 (kernel_elf_LDFLAGS): Rename to ...
1880 (kernel_img_LDFLAGS): ... this.
1881 * conf/i386-coreboot.rmk: Likewise.
1882 * conf/powerpc-ieee1275.rmk: Likewise.
1884 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
1887 2009-06-21 Pavel Roskin <proski@gnu.org>
1889 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
1890 to match nested functions.
1891 * loader/sparc64/ieee1275/linux.c: Likewise.
1893 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
1895 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
1897 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
1900 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
1902 Fix asm file handling on ELF, and remove workarounds.
1904 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
1905 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
1906 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
1907 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
1909 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
1911 Load BSD ELF modules
1913 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
1914 and loader/i386/bsd64.c
1915 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
1916 (FREEBSD_MODTYPE_ELF_MODULE): New definition
1917 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
1918 (grub_freebsd_load_elfmodule32): New declaration
1919 (grub_freebsd_load_elfmoduleobj64): Likewise
1920 (grub_freebsd_load_elf_meta32): Likewise
1921 (grub_freebsd_load_elf_meta64): Likewise
1922 (grub_freebsd_add_meta): Likewise
1923 (grub_freebsd_add_meta_module): Likewise
1924 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
1925 (grub_freebsd_add_meta_module): Likewise and move module-specific
1926 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
1927 (grub_cmd_freebsd): Add elf-kernel specific parts
1928 based on grub_freebsd_add_meta_module
1929 (grub_cmd_freebsd_module): Add type parsing moved from
1930 grub_freebsd_add_meta_module
1931 (grub_cmd_freebsd_module_elf): New function
1932 (cmd_freebsd_module_elf): New variable
1933 (GRUB_MOD_INIT): Register freebsd_module_elf
1934 * loader/i386/bsd32.c: New file
1935 * loader/i386/bsd64.c: Likewise
1936 * loader/i386/bsdXX.c: Likewise
1937 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
1938 (grub_elf64_load): Likewise
1939 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
1941 (grub_elf64_load_hook_t): Likewise
1943 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
1945 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
1947 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
1948 don't write a menu entry for recovery mode.
1950 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
1952 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
1953 after it's no longer needed.
1955 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
1957 * include/grub/i386/loader.h (grub_linux_prot_size)
1958 (grub_linux_tmp_addr, grub_linux_real_addr)
1959 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
1960 GRUB_MACHINE_PCBIOS.
1961 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
1962 common grub_util_info() call to ...
1963 (generate_image): ... here.
1964 Fix use of uninitialized memory, comparison of signed with
1965 unsigned integers and memory leak.
1966 Remove bogus module address message.
1968 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
1970 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
1972 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
1974 2009-06-19 Pavel Roskin <proski@gnu.org>
1976 * configure.ac: Remove stray AC_MSG_CHECKING.
1978 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
1980 * disk/scsi.c (grub_scsi_open): use continue instead of big if
1982 2009-06-18 Pavel Roskin <proski@gnu.org>
1984 * conf/common.rmk: Add fs_file.mod.
1985 * disk/fs_file.c: New file.
1986 * include/grub/disk.h (enum grub_disk_dev_id): Add
1987 GRUB_DISK_DEVICE_FILE_ID.
1989 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
1991 Fix build with Apple's toolchain. Part 2
1993 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
1996 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
1998 Fix build with Apple's toolchain. Part 1
2000 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
2002 * configure.ac: remove a leftover AC_MSG_RESULT
2003 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
2006 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
2010 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
2011 (decomp_block): initialize ch
2012 use grub_memcpy instead of memcpy
2014 2009-06-17 Pavel Roskin <proski@gnu.org>
2016 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
2017 version, use declarations needed to use vga_text as the startup
2020 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
2021 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
2023 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
2024 and grub_at_keyboard_fini(), it's done on module load and
2027 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
2029 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
2030 file can't be found.
2031 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2033 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
2035 Fix newline handling
2037 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
2038 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
2039 (grub_script_yylex): don't segfault on unterminated script
2040 newline terminates command and variable
2042 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
2044 avoid double grub_adjust_range call. Bug reported by David Simner
2046 * kern/disk.c (grub_disk_write): change to raw disk access before
2049 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
2051 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
2052 spaces, for the benefit of help2man.
2053 * util/i386/efi/grub-mkimage.c (usage): Likewise.
2055 2009-06-16 Pavel Roskin <proski@gnu.org>
2057 * kern/i386/halt.c: Include grub/machine/init.h.
2058 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
2060 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
2062 * util/grub.d/30_os-prober.in: Use ${root} in the generated
2065 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
2067 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
2070 2009-06-16 Pavel Roskin <proski@gnu.org>
2072 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
2073 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
2074 save %dx, we only need %dl and we never change it.
2075 * boot/i386/pc/cdboot.S: Don't set the root drive.
2076 * boot/i386/pc/pxeboot.S: Likewise.
2077 * include/grub/i386/pc/boot.h: Remove
2078 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
2079 GRUB_BOOT_MACHINE_DRIVE_CHECK.
2080 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
2081 * kern/i386/pc/init.c (make_install_device): Remove references
2083 * kern/i386/pc/startup.S: Likewise.
2084 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
2086 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
2090 * commands/xnu_uuid.c: new file
2091 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
2092 (xnu_uuid_mod_SOURCES): new variable
2093 (xnu_uuid_mod_CFLAGS): likewise
2094 (xnu_uuid_mod_LDFLAGS): likewise
2095 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2096 * conf/i386-ieee1275.rmk: likewise
2097 * conf/i386-pc.rmk: likewise
2098 * conf/powerpc-ieee1275.rmk: likewise
2099 * conf/sparc64-ieee1275.rmk: likewise
2100 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
2102 2009-06-16 Pavel Roskin <proski@gnu.org>
2104 * configure.ac: Avoid '==' in test command, it's not portable.
2106 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
2110 * commands/probe.c: new file
2111 * conf/common.rmk (pkglib_MODULES): add probe.mod
2112 (probe_mod_SOURCES): new variable
2113 (probe_mod_CFLAGS): likewise
2114 (probe_mod_LDFLAGS): likewise
2115 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
2116 * conf/i386-ieee1275.rmk: likewise
2117 * conf/i386-pc.rmk: likewise
2118 * conf/powerpc-ieee1275.rmk: likewise
2119 * conf/sparc64-ieee1275.rmk: likewise
2121 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
2123 Fix handling of string like \"hello\" and "a
2126 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
2127 (grub_script_yylex): fix parsing of quoting, escaping and newline
2129 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
2131 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
2134 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
2136 * util/grub-mkconfig.in: Fix parsing of --output option.
2138 2009-06-12 Pavel Roskin <proski@gnu.org>
2140 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
2141 genmk.rb don't need to be generated or installed.
2143 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
2145 * commands/i386/pc/drivemap_int13h.S: add more comments
2147 2009-06-11 Pavel Roskin <proski@gnu.org>
2149 * Makefile.in (uninstall): Uninstall manuals.
2151 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
2152 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
2153 and update-grub_lib in two places.
2154 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
2156 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
2159 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
2160 `entry_lo' to fix variable shadowing.
2162 2009-06-11 Christian Franke <franke@computer.org>
2164 * kern/misc.c (__enable_execute_stack): Add missing return type
2165 to prevent gcc warning.
2167 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
2169 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
2171 2009-06-11 Pavel Roskin <proski@gnu.org>
2173 * Makefile.in: Don't rely on any scripts being executable.
2174 Always use $(SHELL) to run shell scripts.
2176 * configure.ac: Always define ___main if using -nostdlib. This
2177 fixes tests on Cygwin.
2179 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
2183 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
2184 is in bytes and not in blocks
2186 2009-06-11 Pavel Roskin <proski@gnu.org>
2188 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
2191 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
2193 * util/grub.d/30_os-prober.in: Fix a comment. Source
2194 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
2195 to set the root device. Place drivemap command in the generated
2198 2009-06-11 Pavel Roskin <proski@gnu.org>
2200 * configure.ac: Remove host_m32. Issues with 64-bit utilities
2201 have long been resolved.
2203 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
2205 * util/grub.d/10_linux.in: Capitalise "Linux".
2207 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
2209 2009-06-11 Pavel Roskin <proski@gnu.org>
2211 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
2212 fix a gcc warning and ensure that the function won't ever exit.
2214 * kern/i386/ieee1275/init.c: Add missing prototype for
2217 * loader/ieee1275/multiboot2.c [__i386__]: Include
2218 grub/cpu/multiboot.h.
2220 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
2221 casts to short - they are not portable and cause warnings. Fix
2222 use of uninitialized values in input_buf. Use ARRAY_SIZE.
2224 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
2228 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
2230 (grub_get_root_biosnumber_saved): new variable
2231 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
2232 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
2233 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
2234 %dx after the call if necessary
2235 * conf/common.rmk (pkglib_MODULES): remove boot.mod
2236 (boot_mod_SOURCES): remove
2237 (boot_mod_CFLAGS): remove
2238 (boot_mod_LDFLAGS): remove
2239 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
2240 (boot_mod_SOURCES): new variable
2241 (boot_mod_CFLAGS): likewise
2242 (boot_mod_LDFLAGS): likewise
2243 * conf/i386-efi.rmk: likewise
2244 * conf/i386-ieee1275.rmk: likewise
2245 * conf/i386-pc.rmk: likewise
2246 * conf/powerpc-ieee1275.rmk: likewise
2247 * conf/sparc64-ieee1275.rmk: likewise
2248 * conf/x86_64-efi.rmk: likewise
2249 * include/grub/i386/pc/biosnum.h: new file
2250 * lib/i386/pc/biosnum.c: likewise
2251 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
2252 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
2253 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2255 2009-06-10 Pavel Roskin <proski@gnu.org>
2257 * io/gzio.c (test_header): Don't reuse one buffer for all data.
2258 Use separate variables. Read only the file size at the end, but
2259 not the checksum that we don't use.
2261 * kern/file.c (grub_file_read): Use void pointer for the buffer.
2264 * kern/ieee1275/openfw.c: Remove libc includes.
2265 * kern/ieee1275/cmain.c: Likewise.
2266 * include/grub/ieee1275/ieee1275.h: Likewise.
2268 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
2271 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
2273 * Makefile.in: Remove all trailing whitespace.
2274 * conf/i386-pc.rmk: Likewise.
2275 * conf/powerpc-ieee1275.rmk: Likewise.
2276 * conf/sparc64-ieee1275.rmk: Likewise.
2277 * docs/grub.texi: Likewise.
2278 * docs/texinfo.tex: Likewise.
2279 * disk/fs_uuid.c: Likewise.
2280 * disk/lvm.c: Likewise.
2281 * disk/scsi.c: Likewise.
2282 * disk/ata.c: Likewise.
2283 * disk/ieee1275/ofdisk.c: Likewise.
2284 * disk/i386/pc/biosdisk.c: Likewise.
2285 * disk/host.c: Likewise.
2286 * disk/raid.c: Likewise.
2287 * disk/efi/efidisk.c: Likewise.
2288 * disk/usbms.c: Likewise.
2289 * disk/memdisk.c: Likewise.
2290 * disk/loopback.c: Likewise.
2291 * kern/powerpc/dl.c: Likewise.
2292 * kern/device.c: Likewise.
2293 * kern/dl.c: Likewise.
2294 * kern/sparc64/dl.c: Likewise.
2295 * kern/ieee1275/ieee1275.c: Likewise.
2296 * kern/term.c: Likewise.
2297 * kern/fs.c: Likewise.
2298 * kern/i386/dl.c: Likewise.
2299 * kern/i386/pc/startup.S: Likewise.
2300 * kern/i386/pc/init.c: Likewise.
2301 * kern/i386/pc/mmap.c: Likewise.
2302 * kern/i386/pc/lzo1x.S: Likewise.
2303 * kern/i386/ieee1275/init.c: Likewise.
2304 * kern/i386/realmode.S: Likewise.
2305 * kern/i386/tsc.c: Likewise.
2306 * kern/partition.c: Likewise.
2307 * kern/corecmd.c: Likewise.
2308 * kern/file.c: Likewise.
2309 * kern/efi/efi.c: Likewise.
2310 * kern/efi/init.c: Likewise.
2311 * kern/efi/mm.c: Likewise.
2312 * kern/main.c: Likewise.
2313 * kern/err.c: Likewise.
2314 * kern/env.c: Likewise.
2315 * kern/disk.c: Likewise.
2316 * kern/generic/millisleep.c: Likewise.
2317 * kern/generic/rtc_get_time_ms.c: Likewise.
2318 * kern/misc.c: Likewise.
2319 * kern/parser.c: Likewise.
2320 * genmk.rb: Likewise.
2321 * configure.ac: Likewise.
2322 * boot/i386/pc/diskboot.S: Likewise.
2323 * boot/i386/pc/pxeboot.S: Likewise.
2324 * boot/i386/pc/boot.S: Likewise.
2325 * boot/i386/pc/lnxboot.S: Likewise.
2326 * boot/i386/pc/cdboot.S: Likewise.
2327 * parttool/pcpart.c: Likewise.
2328 * video/readers/tga.c: Likewise.
2329 * video/video.c: Likewise.
2330 * video/bitmap.c: Likewise.
2331 * lib/envblk.c: Likewise.
2332 * lib/i386/setjmp.S: Likewise.
2333 * fs/xfs.c: Likewise.
2334 * fs/afs.c: Likewise.
2335 * fs/fat.c: Likewise.
2336 * fs/ntfs.c: Likewise.
2337 * fs/udf.c: Likewise.
2338 * fs/affs.c: Likewise.
2339 * fs/iso9660.c: Likewise.
2340 * fs/hfs.c: Likewise.
2341 * fs/fshelp.c: Likewise.
2342 * fs/ext2.c: Likewise.
2343 * fs/jfs.c: Likewise.
2344 * fs/reiserfs.c: Likewise.
2345 * fs/hfsplus.c: Likewise.
2346 * fs/minix.c: Likewise.
2347 * fs/cpio.c: Likewise.
2348 * fs/sfs.c: Likewise.
2349 * fs/ufs.c: Likewise.
2350 * efiemu/prepare.c: Likewise.
2351 * efiemu/loadcore_common.c: Likewise.
2352 * efiemu/runtime/efiemu.sh: Likewise.
2353 * efiemu/runtime/efiemu.S: Likewise.
2354 * efiemu/runtime/efiemu.c: Likewise.
2355 * efiemu/pnvram.c: Likewise.
2356 * efiemu/main.c: Likewise.
2357 * efiemu/i386/pc/cfgtables.c: Likewise.
2358 * efiemu/i386/loadcore64.c: Likewise.
2359 * efiemu/i386/loadcore32.c: Likewise.
2360 * efiemu/loadcore.c: Likewise.
2361 * efiemu/symbols.c: Likewise.
2362 * efiemu/mm.c: Likewise.
2363 * include/grub/autoefi.h: Likewise.
2364 * include/grub/datetime.h: Likewise.
2365 * include/grub/term.h: Likewise.
2366 * include/grub/hfs.h: Likewise.
2367 * include/grub/lvm.h: Likewise.
2368 * include/grub/i386/tsc.h: Likewise.
2369 * include/grub/i386/linux.h: Likewise.
2370 * include/grub/i386/xnu.h: Likewise.
2371 * include/grub/i386/efiemu.h: Likewise.
2372 * include/grub/i386/pc/biosdisk.h: Likewise.
2373 * include/grub/i386/pc/memory.h: Likewise.
2374 * include/grub/i386/pc/vbe.h: Likewise.
2375 * include/grub/parttool.h: Likewise.
2376 * include/grub/video.h: Likewise.
2377 * include/grub/memory.h: Likewise.
2378 * include/grub/fs.h: Likewise.
2379 * include/grub/partition.h: Likewise.
2380 * include/grub/xnu.h: Likewise.
2381 * include/grub/efi/api.h: Likewise.
2382 * include/grub/efi/pe32.h: Likewise.
2383 * include/grub/efi/memory.h: Likewise.
2384 * include/grub/multiboot.h: Likewise.
2385 * include/grub/usbdesc.h: Likewise.
2386 * include/grub/multiboot2.h: Likewise.
2387 * include/grub/acpi.h: Likewise.
2388 * include/grub/efiemu/efiemu.h: Likewise.
2389 * include/grub/disk.h: Likewise.
2390 * include/grub/ieee1275/ieee1275.h: Likewise.
2391 * include/grub/net.h: Likewise.
2392 * include/grub/machoload.h: Likewise.
2393 * include/grub/macho.h: Likewise.
2394 * include/multiboot.h: Likewise.
2395 * genmoddep.awk: Likewise.
2396 * normal/main.c: Likewise.
2397 * normal/menu_entry.c: Likewise.
2398 * normal/menu_viewer.c: Likewise.
2399 * normal/completion.c: Likewise.
2400 * normal/cmdline.c: Likewise.
2401 * normal/misc.c: Likewise.
2402 * normal/datetime.c: Likewise.
2403 * bus/usb/usbtrans.c: Likewise.
2404 * bus/usb/ohci.c: Likewise.
2405 * bus/usb/uhci.c: Likewise.
2406 * bus/usb/usb.c: Likewise.
2407 * mmap/efi/mmap.c: Likewise.
2408 * mmap/i386/pc/mmap_helper.S: Likewise.
2409 * mmap/i386/pc/mmap.c: Likewise.
2410 * mmap/i386/mmap.c: Likewise.
2411 * mmap/i386/uppermem.c: Likewise.
2412 * mmap/mmap.c: Likewise.
2413 * commands/acpi.c: Likewise.
2414 * commands/echo.c: Likewise.
2415 * commands/blocklist.c: Likewise.
2416 * commands/loadenv.c: Likewise.
2417 * commands/usbtest.c: Likewise.
2418 * commands/boot.c: Likewise.
2419 * commands/parttool.c: Likewise.
2420 * commands/search.c: Likewise.
2421 * commands/cat.c: Likewise.
2422 * commands/i386/pc/play.c: Likewise.
2423 * commands/i386/pc/drivemap.c: Likewise.
2424 * commands/i386/pc/vbeinfo.c: Likewise.
2425 * commands/i386/pc/acpi.c: Likewise.
2426 * commands/i386/pc/vbetest.c: Likewise.
2427 * commands/ls.c: Likewise.
2428 * commands/cmp.c: Likewise.
2429 * commands/test.c: Likewise.
2430 * commands/efi/acpi.c: Likewise.
2431 * commands/gptsync.c: Likewise.
2432 * commands/help.c: Likewise.
2433 * partmap/amiga.c: Likewise.
2434 * partmap/apple.c: Likewise.
2435 * partmap/acorn.c: Likewise.
2436 * partmap/pc.c: Likewise.
2437 * partmap/sun.c: Likewise.
2438 * partmap/gpt.c: Likewise.
2439 * script/sh/lexer.c: Likewise.
2440 * script/sh/function.c: Likewise.
2441 * font/font.c: Likewise.
2442 * font/font_cmd.c: Likewise.
2443 * loader/powerpc/ieee1275/linux.c: Likewise.
2444 * loader/efi/chainloader.c: Likewise.
2445 * loader/multiboot_loader.c: Likewise.
2446 * loader/macho.c: Likewise.
2447 * loader/i386/multiboot.c: Likewise.
2448 * loader/i386/linux.c: Likewise.
2449 * loader/i386/pc/linux.c: Likewise.
2450 * loader/i386/pc/multiboot2.c: Likewise.
2451 * loader/i386/pc/chainloader.c: Likewise.
2452 * loader/i386/pc/xnu.c: Likewise.
2453 * loader/i386/bsd_trampoline.S: Likewise.
2454 * loader/i386/efi/linux.c: Likewise.
2455 * loader/i386/multiboot_elfxx.c: Likewise.
2456 * loader/i386/bsd_helper.S: Likewise.
2457 * loader/i386/bsd.c: Likewise.
2458 * loader/i386/linux_trampoline.S: Likewise.
2459 * loader/i386/xnu_helper.S: Likewise.
2460 * loader/i386/xnu.c: Likewise.
2461 * loader/i386/bsd_pagetable.c: Likewise.
2462 * loader/i386/multiboot_helper.S: Likewise.
2463 * loader/xnu.c: Likewise.
2464 * loader/xnu_resume.c: Likewise.
2465 * io/gzio.c: Likewise.
2466 * term/efi/console.c: Likewise.
2467 * term/terminfo.c: Likewise.
2468 * term/ieee1275/ofconsole.c: Likewise.
2469 * term/i386/pc/serial.c: Likewise.
2470 * term/i386/pc/vesafb.c: Likewise.
2471 * term/i386/pc/vga.c: Likewise.
2472 * term/usb_keyboard.c: Likewise.
2473 * term/gfxterm.c: Likewise.
2474 * aclocal.m4: Likewise.
2475 * util/lvm.c: Likewise.
2476 * util/grub.d/30_os-prober.in: Likewise.
2477 * util/grub.d/10_hurd.in: Likewise.
2478 * util/console.c: Likewise.
2479 * util/grub-macho2img.c: Likewise.
2480 * util/grub-probe.c: Likewise.
2481 * util/hostfs.c: Likewise.
2482 * util/i386/pc/grub-mkimage.c: Likewise.
2483 * util/i386/pc/grub-setup.c: Likewise.
2484 * util/i386/efi/grub-mkimage.c: Likewise.
2485 * util/grub-mkconfig.in: Likewise.
2486 * util/raid.c: Likewise.
2487 * util/resolve.c: Likewise.
2488 * util/grub-mkdevicemap.c: Likewise.
2489 * util/grub-emu.c: Likewise.
2490 * util/getroot.c: Likewise.
2491 * util/hostdisk.c: Likewise.
2492 * util/usb.c: Likewise.
2493 * util/grub-editenv.c: Likewise.
2494 * util/misc.c: Likewise.
2496 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
2498 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
2499 `genparttoollist.sh'.
2500 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
2501 Add `*.sh' to the list find searches for and change `mdate.sh'
2504 2009-06-10 Pavel Roskin <proski@gnu.org>
2506 * include/grub/multiboot2.h: Provide compatibility defines for
2508 * include/multiboot2.h: Include stdint.h only if needed, using
2510 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
2512 * loader/ieee1275/multiboot2.c: Likewise.
2513 * loader/multiboot2.c: Likewise.
2514 * loader/multiboot_loader.c: Likewise.
2516 * configure.ac: Use -nostdlib when probing for the target. It
2517 should not be required to have libc for the target.
2519 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
2520 they fail without libc headers for the target.
2521 * include/grub/powerpc/libgcc.h: Use weak attribute for all
2523 * include/grub/sparc64/libgcc.h: Likewise. Don't use
2524 preprocessor conditionals.
2526 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
2527 build system doesn't need to be aware of the tar.c internals.
2529 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
2531 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
2533 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
2535 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
2536 disk limit to 26 for IDE, Virtio, Xen and SCSI.
2538 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
2540 * util/i386/pc/grub-install.in: Change the error message if UUIDs
2541 aren't available if ata.mod gets used.
2543 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
2545 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
2546 initialising controller.
2547 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2549 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
2551 * util/i386/pc/grub-install.in: Add a parameter --disk-module
2552 to choose between ata and biosdisk module on i386-pc.
2554 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
2556 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
2557 Subclass and Programming Interface fields in terms of the 3 byte
2558 Class Code register.
2559 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2561 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
2562 interface is OHCI. Add grub_dprintf for symmetry with
2564 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
2565 interface is UHCI. Add interf variable for programming
2566 interface. Print interface with class/subclass.
2568 * bus/usb/ohci.c: Set interf with correct field.
2570 * bus/usb/uhci.c: Remove unneeded doubled lines.
2571 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
2572 Remove whitespace inside comment.
2574 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
2576 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
2577 as fallback an equivalent option without depth.
2579 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
2581 Not fail if unable to retrieve C/H/S on LBA disks
2583 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
2584 if unable to retrieve C/H/S on LBA disks
2586 2009-06-08 Pavel Roskin <proski@gnu.org>
2588 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
2591 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
2593 * Makefile.in (uninstall): Remove all $lib_DATA files.
2595 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
2597 Bugfix: install on partitionless device
2599 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
2602 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
2604 * Makefile.in (uninstall): Remove all $include_DATA files.
2606 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
2608 * commands/true.c: New file. Implement the true and false commands.
2609 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
2610 (true_mod_SOURCES): New variable.
2611 (true_mod_CFLAGS): Likewise.
2612 (true_mod_LDFLAGS): Likewise.
2614 2009-06-05 Colin D Bennett <colin@gibibit.com>
2616 Optimized font character lookup using binary search instead of linear
2617 search. Fonts now are required to have the character index ordered by
2620 * font/font.c (load_font_index): Verify that fonts have ordered
2622 (find_glyph): Use binary search instead of linear search to find a
2623 character in a font.
2625 2009-06-05 Michael Scherer <misc@mandriva.org>
2627 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
2628 uses case sensitive btree.
2629 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
2630 only for case insensitive filesystems.
2632 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
2634 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
2635 * conf/common.rmk (search_mod_CFLAGS): likewise
2637 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2639 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
2640 compensate a compiler bug
2642 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2644 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
2647 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2649 Definitions for creating asm symbols with Apple's CC
2651 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
2652 [APPLE_CC] (VARIABLE): likewise
2654 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2656 Disable lnxboot.img when compiled
2659 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
2660 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
2661 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
2662 [! APPLE_CC] (CODE_LENG): skip
2663 [! APPLE_CC] (setup_sects): likewise
2664 [! APPLE_CC]: skip filling
2666 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2668 Address in trampolines based on 32-bit registers when compiled
2671 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
2673 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
2675 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2677 Avoid aliases when compiling with Apple's CC for PCBIOS machine
2679 * kern/misc.c [APPLE_CC] (memcpy): new function
2680 [APPLE_CC] (memmove): likewise
2681 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
2682 (memcpy): define alias conditionally on !APPLE_CC
2685 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
2686 APPLE_CC are defined
2687 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
2688 (grub_assert_fail): make prototype conditional
2690 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2692 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
2694 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
2696 (CLEANFILES): add grub-macho2img
2697 (grub_macho2img_SOURCES): new variable
2698 * kern/i386/pc/startup.S (bss_start): new variable
2700 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
2701 * util/grub-macho2img.c: new file
2703 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2705 Use objconv when compiling with Apple's CC
2707 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
2708 (efiemu64.o): likewise
2709 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
2710 when compiling with Apple's CC
2711 (efiemu64_s.o): likewise
2712 * configure.ac: check for objconv when compiling with Apple's CC
2713 * genmk.rb: use objconv for modules when compiled with Apple's CC
2715 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2717 Define segment as well as section when compiling with
2720 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
2721 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
2722 (efiemu_convert_pointer): likewise
2723 (efiemu_set_virtual_address_map): likewise
2724 (efiemu_convert_pointer): likewise
2725 (efiemu_getcrc32): likewise
2726 (init_crc32_table): likewise
2728 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
2729 (GRUB_MOD_DEP): likewise
2731 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2733 Allow a compilation without -mcmodel=large
2735 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
2736 when compiled without -mcmodel=large
2737 (filter_memory_map): remove memory post 4 GiB when compiled
2738 without -mcmodel=large
2739 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
2740 TARGET_CFLAGS when -mcmodel=large isn't supported
2742 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2744 Remove nested functions in efiemu core
2746 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
2748 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2750 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
2752 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
2754 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
2756 (grub_cpu_is_tsc_supported): likewise
2757 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
2759 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2761 Absolute addressing through constant with Apple's cc
2763 * kern/i386/pc/startup.S: Define necessary constants
2764 and address through it when using ABS with Apple's CC
2765 * boot/i386/pc/diskboot.S: likewise
2766 * boot/i386/pc/boot.S: likewise
2767 * boot/i386/pc/lnxboot.S: likewise
2768 * boot/i386/pc/cdboot.S: likewise
2769 * mmap/i386/pc/mmap_helper.S: likewise
2770 * commands/i386/pc/drivemap_int13h.S: likewise
2772 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2774 Check if compiler is apple cc
2776 * Makefile.in (ASFLAGS): new variable
2777 (TARGET_ASFLAGS): likewise
2778 (TARGET_MODULE_FORMAT): likewise
2779 (TARGET_APPLE_CC): likewise
2781 (TARGET_IMG_CFLAGS): likewise
2782 (TARGET_CPPFLAGS): add includedir
2783 * configure.ac: call grub_apple_cc and grub_apple_target_cc
2784 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
2785 Check for linker script only if compiler isn't Apple's CC
2786 (TARGET_MODULE_FORMAT): set
2787 (TARGET_APPLE_CC): likewise
2788 (TARGET_ASFLAGS): likewise
2790 Check for objcopy only if compiler isn't Apple's CC
2791 Check for BSS symbol only if compiler isn't Apple's CC
2792 * genmk.rb: adapt nm options if we use Apple's utils
2793 * aclocal.m4 (grub_apple_cc): new test
2794 (grub_apple_target_cc): likewise
2796 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2798 Simplify sed expressions and improve awk
2800 * Makefile.in (install-local): simplify sed expression
2801 * gencmdlist.sh: likewise
2802 * genmoddep.awk: avoid adding module as a dependency of itself
2804 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2806 Add missing start symbols
2808 * boot/i386/pc/boot.S: add start
2809 * boot/i386/pc/pxeboot.S: likewise
2811 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2813 Fix wrong assumptions with grub-mkimage on EFI
2815 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
2816 (relocate_addresses): consider both r_addend and value at offset
2817 (make_mods_section): zerofill modinfo and header
2818 (convert_elf): write prefix here
2820 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2822 Use .asciz instead of .string
2824 * i386/pc/diskboot.S: use .asciz instead of .string
2825 * i386/pc/boot.S: likewise
2826 * include/grub/dl.h (GRUB_MOD_DEP): likewise
2827 (GRUB_MOD_NAME): likewise
2829 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2833 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
2834 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
2835 (grub_video_setup): remove
2836 (grub_video_set_mode): new prototype
2837 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
2839 (linux_vesafb_res): compile only on PCBIOS
2840 (grub_linux_boot): support gfxpayload
2841 * loader/i386/pc/xnu.c (video_hook): new function
2842 (grub_xnu_set_video): support gfxpayload
2843 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
2844 (DEFAULT_VIDEO_HEIGHT): likewise
2845 (DEFAULT_VIDEO_FLAGS): likewise
2846 (DEFAULT_VIDEO_MODE): new definition
2847 (video_hook): new function
2848 (grub_gfxterm_init): use grub_video_set_mode
2849 * util/grub.d/30_os-prober.in: remove explicit modesetting before
2851 * video/video.c (grub_video_setup): removed
2852 (grub_video_set_mode): new function based on grub_gfxterm_init and
2855 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2857 Avoid calling biosdisk in drivemap
2859 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
2860 (revparse_biosdisk): likewise
2861 (list_mappings): derive name from id directly
2862 (grub_cmd_drivemap): use tryparse_diskstring
2864 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2868 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
2869 (grub_lexer_param): add tokenonhold
2870 (grub_script_create_cmdline): remove cmdline. All callers updated
2871 (grub_script_function_create): make functionname
2872 grub_script_arg. All callers updated
2873 (grub_script_execute_argument_to_string): new prototype
2874 * kern/parser.c (state_transitions): reorder
2875 (grub_parser_cmdline_state): fix a bug and make more compact
2876 * script/sh/execute.c (grub_script_execute_argument_to_string):
2878 (grub_script_execute_cmdline): use new format
2879 * script/sh/function.c (grub_script_function_create): make functionname
2880 grub_script_arg. All callers updated
2881 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
2882 (grub_script_yylex): remove
2883 (grub_script_yylex2): renamed to ...
2884 (grub_script_yylex): ...renamed
2885 parse the expressions like a${b}c
2886 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
2887 (GRUB_PARSER_TOKEN_VAR): remove
2888 (GRUB_PARSER_TOKEN_NAME): likewise
2889 ("if"): declare as typeless
2891 ("function"): likewise
2896 (argument): likewise
2897 (script): accept empty scripts and make exit on error
2898 (arguments): use GRUB_PARSER_TOKEN_ARG
2899 (function): likewise
2900 (command): move error handling to script
2901 (menuentry): move grub_script_lexer_ref before
2902 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
2903 argument. All callers updated
2905 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
2907 Prevent GRUB from probing floppies during boot.
2909 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
2910 * commands/search.c (options): Add --no-floppy.
2911 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
2912 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
2913 --no-floppy when searching for UUIDs.
2915 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
2917 Simplify the code duplication in commands/search.c.
2919 * commands/search.c (search_label, search_fs_uuid): Merge into ...
2920 (search_fs): ... this. Update all users.
2922 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
2924 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
2926 2009-05-28 Pavel Roskin <proski@gnu.org>
2928 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
2929 Remove the original symlink explicitly.
2931 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
2932 just one slash. That's how grub_fshelp_find_file() does it.
2934 2009-05-26 Pavel Roskin <proski@gnu.org>
2936 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
2939 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
2942 2009-05-25 Christian Franke <franke@computer.org>
2944 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
2946 (grub_atapi_identify): Add wait after drive select.
2947 (grub_ata_identify): Do more strict status register check before
2948 calling grub_atapi_identify (). Suppress error message if status
2949 register is 0x00 after command failure. Add status register
2950 check after PIO read to avoid bogus identify due to stuck DRQ.
2951 Thanks to Pavel Roskin for testing.
2952 (grub_device_initialize): Remove unsafe status register check.
2953 Thanks to 'phcoder' for problem report and patch.
2954 Prevent sign extension in debug message.
2956 2009-05-23 Colin D Bennett <colin@gibibit.com>
2958 Cleaned up `include/grub/normal.h'. Grouped prototypes by
2959 definition file, and functions defined in `normal/menu.c' have had
2960 their prototypes moved to `include/grub/menu.h' for consistency.
2962 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
2964 (grub_menu_get_entry): Likewise.
2965 (grub_menu_get_timeout): Likewise.
2966 (grub_menu_set_timeout): Likewise.
2967 (grub_menu_execute_entry): Likewise.
2968 (grub_menu_execute_with_fallback): Likewise.
2969 (grub_menu_entry_run): Likewise.
2971 * include/grub/normal.h: Re-ordered and grouped function
2972 prototypes by file that the function is defined in.
2973 (grub_menu_execute_callback): Removed; moved to menu.h.
2974 (grub_menu_get_entry): Likewise.
2975 (grub_menu_get_timeout): Likewise.
2976 (grub_menu_set_timeout): Likewise.
2977 (grub_menu_execute_entry): Likewise.
2978 (grub_menu_execute_with_fallback): Likewise.
2979 (grub_menu_entry_run): Likewise.
2980 (grub_menu_addentry): Renamed from this ...
2981 (grub_normal_add_menu_entry): ... to this.
2983 * normal/main.c (grub_menu_addentry): Renamed from this ...
2984 (grub_normal_add_menu_entry): ... to this.
2986 * script/sh/execute.c (grub_script_execute_menuentry): Update
2987 reference to renamed grub_menu_addentry function.
2989 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
2991 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
2993 2009-05-22 Pavel Roskin <proski@gnu.org>
2995 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
2996 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
2997 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
2998 compiling for the i386 targets, but not for the utilities.
3000 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
3002 (grub_root_drive): Likewise.
3003 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
3005 (grub_root_drive): Change size to byte.
3006 (grub_start_addr): Remove.
3007 (grub_end_addr): Likewise.
3008 (grub_apm_bios_info): Likewise.
3010 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
3012 * normal/i386: Remove.
3013 * normal/powerpc: Likewise.
3014 * normal/sparc64: Likewise.
3015 * normal/x86_64: Likewise.
3017 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
3019 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
3020 * loader/i386/linux_trampoline.S: Fix indentation
3021 * loader/i386/xnu_helper.S: Likewise
3023 2009-05-18 Colin D Bennett <colin@gibibit.com>
3025 Display error messages when parsing a Lua statement fails.
3026 Previously, executing a syntactically invalid statement like
3027 ")foo" or "bar;" would silently fail.
3029 * script/lua/grub_main.c (handle_lua_error): New function.
3030 (grub_lua_parse_line): Improved reporting of Lua parser and
3033 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
3035 Remove -Werror which causes build to fail on some systems
3037 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
3038 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
3039 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
3041 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
3043 trampoline for linux on 64-bit platform
3045 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
3046 loader/i386/efi/linux_trampoline.S
3047 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
3049 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
3051 * loader/i386/linux_trampoline.S: moved here
3052 * loader/i386/efi/linux.c (allocate_pages): reserve space for
3054 (jumpvector): removed
3055 (grub_linux_trampoline_start): new declaration
3056 (grub_linux_trampoline_end): likewise
3057 (grub_linux_boot): use trampoline when on 64-bit platform
3058 * loader/i386/linux.c: likewise
3060 2009-05-16 Pavel Roskin <proski@gnu.org>
3062 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
3063 const to avoid a warning.
3064 (grub_lua_setenv): Likewise.
3065 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
3066 lmsg to fix a warning.
3068 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
3070 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
3071 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3072 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
3073 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3074 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3075 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3076 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
3077 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
3079 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
3081 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
3083 2009-05-16 Bean <bean123ch@gmail.com>
3085 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
3086 (lua_mod_SOURCES): New variable.
3087 (lua_mod_CFLAGS): Likewise.
3088 (lua_mod_LDFLAGS): Likewise.
3090 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
3091 (setjmp_mod_SOURCES): New variable.
3092 (setjmp_mod_CFLAGS): Likewise.
3093 (setjmp_LDFLAGS): Likewise.
3095 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
3096 (setjmp_mod_SOURCES): New variable.
3097 (setjmp_mod_CFLAGS): Likewise.
3098 (setjmp_LDFLAGS): Likewise.
3100 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3101 (setjmp_mod_SOURCES): New variable.
3102 (setjmp_mod_CFLAGS): Likewise.
3103 (setjmp_LDFLAGS): Likewise.
3105 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
3106 (setjmp_mod_SOURCES): New variable.
3107 (setjmp_mod_CFLAGS): Likewise.
3108 (setjmp_LDFLAGS): Likewise.
3110 * normal/i386/setjmp.S: Moved from here ...
3111 * lib/i386/setjmp.S: ... Moved here
3112 * normal/x86_64/setjmp.S: Moved from here ...
3113 * lib/x86_64/setjmp.S: ... Moved here
3114 * normal/powerpc/setjmp.S: Moved from here ...
3115 * lib/powerpc/setjmp.S: ... Moved here
3116 * normal/sparc64/setjmp.S: Moved from here ...
3117 * lib/sparc64/setjmp.S: ... Moved here
3119 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
3120 returns_twice in mingw.
3122 * script/lua/grub_lib.c: New file.
3123 * script/lua/grub_lib.h: Likewise.
3124 * script/lua/grub_lua.h: Likewise.
3125 * script/lua/grub_main.c: Likewise.
3126 * script/lua/lapi.c: Likewise.
3127 * script/lua/lapi.h: Likewise.
3128 * script/lua/lauxlib.c: Likewise.
3129 * script/lua/lauxlib.h: Likewise.
3130 * script/lua/lbaselib.c: Likewise.
3131 * script/lua/lcode.c: Likewise.
3132 * script/lua/lcode.h: Likewise.
3133 * script/lua/ldblib.c: Likewise.
3134 * script/lua/ldebug.c: Likewise.
3135 * script/lua/ldebug.h: Likewise.
3136 * script/lua/ldo.c: Likewise.
3137 * script/lua/ldo.h: Likewise.
3138 * script/lua/ldump.c: Likewise.
3139 * script/lua/lfunc.c: Likewise.
3140 * script/lua/lfunc.h: Likewise.
3141 * script/lua/lgc.c: Likewise.
3142 * script/lua/lgc.h: Likewise.
3143 * script/lua/linit.c: Likewise.
3144 * script/lua/liolib.c: Likewise.
3145 * script/lua/llex.c: Likewise.
3146 * script/lua/llex.h: Likewise.
3147 * script/lua/llimits.h: Likewise.
3148 * script/lua/lmathlib.c: Likewise.
3149 * script/lua/lmem.c: Likewise.
3150 * script/lua/lmem.h: Likewise.
3151 * script/lua/loadlib.c: Likewise.
3152 * script/lua/lobject.c: Likewise.
3153 * script/lua/lobject.h: Likewise.
3154 * script/lua/lopcodes.c: Likewise.
3155 * script/lua/lopcodes.h: Likewise.
3156 * script/lua/loslib.c: Likewise.
3157 * script/lua/lparser.c: Likewise.
3158 * script/lua/lparser.h: Likewise.
3159 * script/lua/lstate.c: Likewise.
3160 * script/lua/lstate.h: Likewise.
3161 * script/lua/lstring.c: Likewise.
3162 * script/lua/lstring.h: Likewise.
3163 * script/lua/lstrlib.c: Likewise.
3164 * script/lua/ltable.c: Likewise.
3165 * script/lua/ltable.h: Likewise.
3166 * script/lua/ltablib.c: Likewise.
3167 * script/lua/ltm.c: Likewise.
3168 * script/lua/ltm.h: Likewise.
3169 * script/lua/lua.h: Likewise.
3170 * script/lua/luaconf.h: Likewise.
3171 * script/lua/lualib.h: Likewise.
3172 * script/lua/lundump.c: Likewise.
3173 * script/lua/lundump.h: Likewise.
3174 * script/lua/lvm.c: Likewise.
3175 * script/lua/lvm.h: Likewise.
3176 * script/lua/lzio.c: Likewise.
3177 * script/lua/lzio.h: Likewise.
3179 2009-05-16 Bean <bean123ch@gmail.com>
3181 * include/grub/kernel.h (grub_module_header_types): Add type
3184 * kern/main.c (grub_load_config): New function.
3185 (grub_main): Call grub_load_config to read boot config.
3187 * grub-mkimage (generate_image): New parameter config_path.
3188 (options): New option --config.
3189 (main): Parse --config option, and pass it to generate_image.
3191 2009-05-14 Christian Franke <franke@computer.org>
3193 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
3194 This fixes build on Cygwin.
3196 2009-05-14 Pavel Roskin <proski@gnu.org>
3198 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
3199 jump. This saves two bytes, so the typical case of 2 swapped
3200 drives would fit 32 bytes.
3202 2009-05-13 Pavel Roskin <proski@gnu.org>
3204 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
3205 grub_uint32_t to avoid a warning.
3207 * loader/i386/linux.c (allocate_pages): When assigning
3208 real_mode_mem, cast through grub_size_t to fix a warning. The
3209 code already makes sure that the value would fit a pointer.
3210 (grub_linux_setup_video): Cast render_target->data to
3211 grub_size_t to fix a warning.
3213 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
3215 * commands/i386/pc/drivemap.c: New file - implement drivemap
3217 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
3218 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
3220 2009-05-13 Pavel Roskin <proski@gnu.org>
3222 * util/i386/pc/grub-setup.c (setup): Remove unused variable
3223 embedding_area_exists.
3225 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
3227 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
3228 it easier to understand / work with.
3229 Improve warning messages for cases where there's no embedding area,
3230 or when it is too small (or core.img too large).
3232 2009-05-13 Pavel Roskin <proski@gnu.org>
3234 * loader/i386/pc/multiboot2.c: Add necessary includes for
3235 grub_multiboot2_real_boot().
3237 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
3238 PX record is always little-endian. We only need the lower 2
3241 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
3242 facilitate code reuse.
3243 (grub_cpio_mount): Use "struct head", not a char buffer. This
3244 fixes a warning reported by gcc 4.4.
3246 * kernel/disk.c (grub_disk_read): Use void pointer for the
3248 (grub_disk_write): Use const void pointer for the buffer.
3249 Adjust all callers. Remove unnecessary casts.
3251 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
3253 * util/i386/pc/grub-install.in: Update copyright year.
3255 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
3259 * commands/gptsync.c: new file
3260 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
3261 (gptsync_mod_SOURCES): new variable
3262 (gptsync_mod_CFLAGS): likewise
3263 (gptsync_mod_LDFLAGS): likewise
3264 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
3266 (GRUB_PC_PARTITION_TYPE_HFS): likewise
3267 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
3268 * conf/i386-ieee1275.rmk: likewise
3269 * conf/i386-pc.rmk: likewise
3270 * conf/powerpc-ieee1275.rmk: likewise
3272 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
3276 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
3277 (grub_dl_ref): likewise
3279 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
3281 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
3282 split in two functions (one for msdos and one for gpt).
3284 2009-05-08 Pavel Roskin <proski@gnu.org>
3286 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
3289 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
3290 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
3291 Initialize them with -1. Add sanity check for bad1. Eliminate
3294 2009-05-08 David S. Miller <davem@davemloft.net>
3296 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
3298 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
3300 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
3303 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
3305 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3306 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
3308 2009-05-05 David S. Miller <davem@davemloft.net>
3310 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
3312 2009-05-05 Pavel Roskin <proski@gnu.org>
3314 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
3315 of grub_dl_ref() and grub_dl_unref().
3316 * commands/parttool.c: Remove preprocessor conditionals around
3317 grub_dl_ref() and grub_dl_unref().
3318 * fs/affs.c: Likewise.
3319 * fs/afs.c: Likewise.
3320 * fs/cpio.c: Likewise.
3321 * fs/ext2.c: Likewise.
3322 * fs/fat.c: Likewise.
3323 * fs/hfs.c: Likewise.
3324 * fs/hfsplus.c: Likewise.
3325 * fs/iso9660.c: Likewise.
3326 * fs/jfs.c: Likewise.
3327 * fs/minix.c: Likewise.
3328 * fs/ntfs.c: Likewise.
3329 * fs/reiserfs.c: Likewise.
3330 * fs/sfs.c: Likewise.
3331 * fs/udf.c: Likewise.
3332 * fs/ufs.c: Likewise.
3333 * fs/xfs.c: Likewise.
3334 * include/grub/dl.h: Likewise.
3335 * loader/xnu.c: Likewise.
3337 2009-05-04 Pavel Roskin <proski@gnu.org>
3339 * commands/acpi.c: Remove unused variable my_mod.
3340 * partmap/amiga.c: Likewise.
3341 * partmap/apple.c: Likewise.
3342 * partmap/gpt.c: Likewise.
3343 * partmap/pc.c: Likewise.
3344 * partmap/sun.c: Likewise.
3345 * term/gfxterm.c: Likewise.
3346 * term/i386/pc/vesafb.c: Likewise.
3347 * term/i386/pc/vga.c: Likewise.
3349 2009-05-04 David S. Miller <davem@davemloft.net>
3351 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
3352 pointer args to grub_ieee1275_get_property().
3354 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
3356 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
3357 devices, and do not traverse down under controller nodes.
3359 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
3360 (grub_ofdisk_open): Use it to un-escape "," characters.
3361 * kern/disk.c (find_part_sep): New.
3362 (grub_disk_open): Use it to find the first non-escaped ','
3363 character in the disk name.
3364 * util/ieee1275/devicemap.c (escape_of_path): New.
3365 (grub_util_emit_devicemap_entry): Use it.
3366 * util/sparc64/ieee1275/grub-install.in: Update script to
3367 strip partition specifiers properly by not triggering on
3368 '\' escaped ',' characters.
3370 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
3372 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
3374 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
3376 (linux_vesafb_modes): Add a lot of additional modes to the list (based
3377 on documentation from Wikipedia).
3379 2009-05-04 Pavel Roskin <proski@gnu.org>
3381 * disk/ata.c: Spelling fixes.
3382 * disk/raid.c: Likewise.
3383 * disk/usbms.c: Likewise.
3384 * disk/dmraid_nvidia.c: Likewise.
3385 * kern/ieee1275/openfw.c: Likewise.
3386 * kern/ieee1275/init.c: Likewise.
3387 * kern/ieee1275/cmain.c: Likewise.
3388 * boot/i386/pc/cdboot.S: Likewise.
3389 * video/readers/png.c: Likewise.
3390 * video/i386/pc/vbe.c: Likewise.
3391 * fs/udf.c: Likewise.
3392 * fs/hfs.c: Likewise.
3393 * fs/reiserfs.c: Likewise.
3394 * efiemu/runtime/efiemu.c: Likewise.
3395 * efiemu/main.c: Likewise.
3396 * efiemu/mm.c: Likewise.
3397 * include/grub/elf.h: Likewise.
3398 * include/grub/xnu.h: Likewise.
3399 * include/grub/usbdesc.h: Likewise.
3400 * include/grub/usb.h: Likewise.
3401 * include/grub/script_sh.h: Likewise.
3402 * include/grub/lib/LzmaEnc.h: Likewise.
3403 * include/grub/efiemu/efiemu.h: Likewise.
3404 * include/grub/command.h: Likewise.
3405 * normal/menu.c: Likewise.
3406 * normal/main.c: Likewise.
3407 * normal/datetime.c: Likewise.
3408 * bus/usb/uhci.c: Likewise.
3409 * mmap/i386/uppermem.c: Likewise.
3410 * mmap/mmap.c: Likewise.
3411 * commands/acpi.c: Likewise.
3412 * commands/test.c: Likewise.
3413 * partmap/apple.c: Likewise.
3414 * font/font.c: Likewise.
3415 * loader/sparc64/ieee1275/linux.c: Likewise.
3416 * loader/macho.c: Likewise.
3417 * loader/i386/bsd_trampoline.S: Likewise.
3418 * loader/i386/bsd.c: Likewise.
3419 * loader/xnu.c: Likewise.
3420 * term/i386/pc/vesafb.c: Likewise.
3421 * term/usb_keyboard.c: Likewise.
3422 * util/resolve.c: Likewise.
3423 * util/getroot.c: Likewise.
3425 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
3427 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
3429 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
3431 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
3434 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
3436 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
3437 parameter only available on BIOS.
3439 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
3441 Removed wrong semicolon in declaration
3443 * grub/misc.h (grub_dprintf): remove semicolon
3445 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
3447 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
3448 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
3449 is done by grub_cmd_linux() now).
3450 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
3451 restore video to text mode.
3452 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
3453 indicates lack of "vga=" parameter. "vga=0" is mapped to
3454 `GRUB_LINUX_VID_MODE_NORMAL'.
3456 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
3458 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
3459 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
3460 and `normal/script.c'. Add `kern/rescue_reader.c',
3461 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
3462 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
3463 `grub_script.tab.c'.
3465 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3466 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3467 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3468 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3469 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3471 * Makefile.in: Remove duplicated 2008 in Copyright line.
3473 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
3475 * util/misc.c (grub_util_warn): New function. Emits a warning
3477 * include/grub/util/misc.h (grub_util_warn): New declaration.
3479 * util/i386/pc/grub-install.in: Understand --force and pass it down
3482 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
3484 (setup): Improve error messages and add warnings when requested to
3485 install in odd layouts. Refuse to install using blocklists unless
3488 2009-05-04 martin f. krafft <madduck@madduck.net>
3490 * disk/raid.c (grub_raid_scan_device): Improve debug message.
3492 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
3494 Updated copyright year
3496 * fs/hfsplus.c: updated copyright year
3498 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
3502 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
3503 in the space previously used by unused3
3504 (grub_hfsplus_uuid): new function
3505 (grub_hfsplus_fs): added uuid field
3507 2009-05-03 Pavel Roskin <proski@gnu.org>
3509 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
3510 suppress warnings. It's no longer needed.
3511 * disk/host.c: Likewise.
3512 * disk/ata_pthru.c: Likewise.
3513 * disk/loopback.c: Likewise.
3514 * hook/datehook.c: Likewise.
3515 * parttool/pcpart.c: Likewise.
3516 * fs/i386/pc/pxe.c: Likewise.
3517 * fs/ntfscomp.c: Likewise.
3518 * efiemu/main.c: Likewise.
3519 * mmap/mmap.c: Likewise.
3520 * commands/crc.c: Likewise.
3521 * commands/hexdump.c: Likewise.
3522 * commands/hdparm.c: Likewise.
3523 * commands/acpi.c: Likewise.
3524 * commands/echo.c: Likewise.
3525 * commands/minicmd.c: Likewise.
3526 * commands/blocklist.c: Likewise.
3527 * commands/memrw.c: Likewise.
3528 * commands/loadenv.c: Likewise.
3529 * commands/usbtest.c: Likewise.
3530 * commands/lsmmap.c: Likewise.
3531 * commands/boot.c: Likewise.
3532 * commands/parttool.c: Likewise.
3533 * commands/configfile.c: Likewise.
3534 * commands/search.c: Likewise.
3535 * commands/ieee1275/suspend.c: Likewise.
3536 * commands/cat.c: Likewise.
3537 * commands/i386/pc/pxecmd.c: Likewise.
3538 * commands/i386/pc/play.c: Likewise.
3539 * commands/i386/pc/halt.c: Likewise.
3540 * commands/i386/pc/vbeinfo.c: Likewise.
3541 * commands/i386/pc/vbetest.c: Likewise.
3542 * commands/lspci.c: Likewise.
3543 * commands/date.c: Likewise.
3544 * commands/handler.c: Likewise.
3545 * commands/ls.c: Likewise.
3546 * commands/test.c: Likewise.
3547 * commands/cmp.c: Likewise.
3548 * commands/efi/loadbios.c: Likewise.
3549 * commands/efi/fixvideo.c: Likewise.
3550 * commands/halt.c: Likewise.
3551 * commands/help.c: Likewise.
3552 * commands/reboot.c: Likewise.
3553 * hello/hello.c: Likewise.
3554 * script/sh/main.c: Likewise.
3555 * loader/xnu.c: Likewise.
3556 * term/terminfo.c: Likewise.
3557 * term/i386/pc/serial.c: Likewise.
3558 * term/usb_keyboard.c: Likewise.
3560 2009-05-03 David S. Miller <davem@davemloft.net>
3562 * normal/menu.c: Include grub/parser.h
3564 2009-05-03 Pavel Roskin <proski@gnu.org>
3566 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
3568 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
3569 Suggested by Javier MartÃn <lordhabbit@gmail.com>
3571 * util/i386/pc/grub-mkrescue.in: Allow for the case when
3572 efiemu??.o doesn't exist.
3573 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
3576 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
3578 FreeBSD 64-bit support
3580 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
3581 and loader/i386/bsd_trampoline.S
3582 (bsd_mod_ASFLAGS): new variable
3583 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
3584 (FREEBSD_MODTYPE_KERNEL64): likewise
3585 (grub_bsd64_trampoline_start): likewise
3586 (grub_bsd64_trampoline_end): likewise
3587 (grub_bsd64_trampoline_selfjump): likewise
3588 (grub_bsd64_trampoline_gdt): likewise
3589 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
3590 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
3591 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
3592 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
3593 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3595 * loader/i386/bsd_pagetable.c: new file
3596 * loader/i386/bsd_trampoline.S: likewise
3597 * loader/i386/bsd.c (ALIGN_QWORD): new macro
3598 (ALIGN_VAR): likewise
3599 (entry_hi): new variable
3600 (kern_end_mdofs): likewise
3601 (is_64bit): likewise
3602 (grub_freebsd_add_meta): use ALIGN_VAR
3603 (grub_e820_mmap): new declaration
3604 (grub_freebsd_add_mmap): new function
3605 (grub_freebsd_add_meta_module): support 64 bit kernels
3606 (grub_freebsd_list_modules): use ALIGN_VAR
3607 (gdt_descriptor): new declaration
3608 (grub_freebsd_boot): support 64 bit kernels
3609 (grub_bsd_elf64_hook): new function
3610 (grub_bsd_load_elf): support elf64
3612 2009-05-03 Bean <bean123ch@gmail.com>
3614 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
3615 after we get the result of if statement.
3617 2009-05-03 Bean <bean123ch@gmail.com>
3619 * Makefile.in (enable_efiemu): New variable.
3621 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
3623 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
3625 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
3626 path, add -mno-red-zone option.
3627 (efiemu64_s.o): Likewise.
3628 (efiemu64.o): Use macro $^ for source file.
3630 * configure.ac (--enable-efiemu): New option.
3632 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
3636 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
3637 (pkglib_MODULES): add xnu.mod
3638 (xnu_mod_SOURCES): new variable
3639 (xnu_mod_CFLAGS): likewise
3640 (xnu_mod_LDFLAGS): likewise
3641 (xnu_mod_ASFLAGS): likewise
3642 * conf/i386-pc.rmk: likewise
3643 * conf/x86_64-efi.rmk: likewise
3644 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
3646 * include/grub/i386/macho.h: new file
3647 * include/grub/i386/xnu.h: likewise
3648 * include/grub/macho.h: likewise
3649 * include/grub/machoload.h: likewise
3650 * include/grub/x86_64/macho.h: likewise
3651 * include/grub/x86_64/xnu.h: likewise
3652 * include/grub/xnu.h: likewise
3653 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
3654 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
3655 * loader/i386/efi/xnu.c: new file
3656 * loader/i386/pc/xnu.c: likewise
3657 * loader/i386/xnu.c: likewise
3658 * loader/i386/xnu_helper.S: likewise
3659 * loader/macho.c: likewise
3660 * loader/xnu.c: likewise
3661 * loader/xnu_resume.c: likewise
3662 * util/grub-dumpdevtree: likewise
3663 * include/grub/i386/pit.h: include grub/err.h
3664 (grub_pit_wait): export
3665 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
3667 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3671 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
3672 _linux_efi, linux_efi.
3673 new files in grub-emu
3674 new targets efiemu32.o and efiemu64.o
3675 * loader/linux_normal_efiemu.c: likewise
3676 * loader/i386/efi/linux.c: added preliminary efiemu support
3677 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
3679 * include/grub/autoefi.h: new file
3680 * include/grub/i386/efiemu.h: likewise
3681 * include/grub/i386/pc/efiemu.h: likewise
3682 * include/grub/efi/api.h: add LL suffix when necessary
3683 new definitions relating to tables
3684 * include/grub/efiemu/efiemu.h: new file
3685 * include/grub/efiemu/runtime.h: likewise
3686 * efiemu/prepare.c: likewise
3687 * efiemu/loadcore_common.c: likewise
3688 * efiemu/loadcore64.c: likewise
3689 * efiemu/runtime/efiemu.sh: likewise
3690 * efiemu/runtime/efiemu.S: likewise
3691 * efiemu/runtime/efiemu.c: likewise
3692 * efiemu/runtime/config.h: likewise
3693 * efiemu/prepare32.c: likewise
3694 * efiemu/main.c: likewise
3695 * efiemu/modules/pnvram.c: likewise
3696 * efiemu/modules/i386: likewise
3697 * efiemu/modules/i386/pc: likewise
3698 * efiemu/modules/acpi.c: likewise
3699 * efiemu/i386/pc/cfgtables.c: likewise
3700 * efiemu/i386/loadcore64.c: likewise
3701 * efiemu/i386/loadcore32.c: likewise
3702 * efiemu/prepare64.c: likewise
3703 * efiemu/loadcore.c: likewise
3704 * efiemu/symbols.c: likewise
3705 * efiemu/mm.c: likewise
3706 * efiemu/loadcore32.c: likewise
3708 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3712 * commands/acpi.c: new file
3713 * commands/i386/pc/acpi.c: likewise
3714 * commands/efi/acpi.c: likewise
3715 * include/grub/acpi.h: likewise
3716 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
3717 (acpi_mod_SOURCES): new variable
3718 (acpi_mod_CFLAGS): likewise
3719 (acpi_mod_LDFLAGS): likewise
3720 * conf/i386-efi.rmk: likewise
3721 * conf/x86_64-efi.rmk: likewise
3723 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3725 Missing part from mmap patch
3727 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
3728 (grub_mmap_unregister)
3729 (grub_mmap_free_and_unregister): use grub_mmap_register
3731 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3735 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
3736 * loader/i386/linux.c (find_mmap_size): likewise
3737 (allocate_pages): likewise
3738 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
3739 (grub_fill_multiboot_mmap): likewise
3740 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
3741 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
3742 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
3743 (OPENBSD_MMAP_RESERVED): likewise
3744 * include/grub/i386/pc/memory.h: include grub/memory.h
3745 (grub_lower_mem): removed
3746 (grub_upper_mem): likewise
3747 (GRUB_MACHINE_MEMORY_ACPI): new definition
3748 (GRUB_MACHINE_MEMORY_NVS): likewise
3749 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
3750 (GRUB_MACHINE_MEMORY_HOLE): likewise
3751 (grub_machine_mmap_register): likewise
3752 (grub_machine_mmap_unregister): likewise
3753 (grub_machine_get_upper): likewise
3754 (grub_machine_get_lower): likewise
3755 (grub_machine_get_post64): likewise
3756 * include/grub/i386/efi/memory.h: new file
3757 * include/grub/x86_64/efi/memory.h: likewise
3758 * include/grub/efi/memory.h: likewise
3759 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
3760 (mmap_mod_SOURCES): new variable
3761 (mmap_mod_LDFLAGS): likewise
3762 (mmap_mod_ASFLAGS): likewise
3763 * conf/i386-coreboot.rmk: likewise
3764 * conf/i386-ieee1275.rmk: likewise
3765 * conf/i386-efi.rmk: likewise
3766 * conf/x86_64-efi.rmk: likewise
3767 * include/grub/types.h (UINT_TO_PTR): new macro
3768 (PTR_TO_UINT32): likewise
3769 (PTR_TO_UINT64): likewise
3770 * include/grub/memory.h: new file
3771 * mmap/i386/pc/mmap.c: likewise
3772 * mmap/i386/pc/mmap_helper.S: likewise
3773 * mmap/i386/uppermem.c: likewise
3774 * mmap/mmap.c: likewise
3775 * mmap/efi/mmap.c: likewise
3776 * kern/i386/coreboot/init.c (grub_machine_init): don't use
3778 * kern/i386/pc/init.c (grub_lower_mem): removed variable
3779 (grub_upper_mem): likewise
3780 (grub_machine_init): don't use grub_upper_mem,
3781 make grub_lower_mem local
3782 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
3783 grub_mmap_iterate and grub_mmap_get_upper
3784 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
3786 2009-05-02 Bean <bean123ch@gmail.com>
3788 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
3790 (pkglib_MODULES): Add normal.mod and sh.mod.
3791 (normal_SOURCES): New variable.
3792 (normal_mod_CFLAGS): Likewise.
3793 (normal_mod_LDFLAGS): Likewise.
3794 (sh_mod_SOURCES): Likewise.
3795 (sh_mod_CFLAGS): Likewise.
3796 (sh_mod_LDFLAGS): Likewise.
3798 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
3799 script/sh/lexer.c_DEPENDENCIES.
3800 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
3801 kern/rescue_reader.c and kern/rescue_parser.c.
3802 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
3803 (grub_emu_SOURCES): Change source files.
3804 (pkglib_MODULES): Remove normal.mod.
3805 (normal_SOURCES): Removed.
3806 (normal_mod_CFLAGS): Likewise.
3807 (normal_mod_LDFLAGS): Likewise.
3808 * conf/i386-coreboot.rmk: Likewise.
3809 * conf/i386-efi.rmk: Likewise.
3810 * conf/i386-ieee1276.rmk: Likewise.
3811 * conf/powerpc-ieee1275.rmk: Likewise.
3812 * conf/sparc64-ieee1275.rmk: Likewise.
3813 * conf/x86_64-efi.rmk: Likewise.
3815 * include/grub/command.h (grub_command_execute): New inline function.
3817 * include/grub/menu.h (grub_menu_entry): Removed commands field.
3819 * include/grub/normal.h: Remove <grub/setjmp.h>.
3820 (grub_fs_module_list): Moved to normal/autofs.c.
3821 (grub_exit_env): Removed.
3822 (grub_command_execute): Likewise.
3823 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
3825 (read_command_list): New function declaration.
3826 (read_fs_list): Likewise.
3828 * include/parser.h: Include <grub/reader.h>.
3829 (grub_parser_split_cmdline): Change type of getline parameter.
3830 (grub_parser): New structure.
3831 (grub_parser_class): New variable.
3832 (grub_parser_execute): New function declaration.
3833 (grub_register_rescue_parser): Likewise.
3834 (grub_parser_register): New inline function.
3835 (grub_parser_unregister): Likewise.
3836 (grub_parser_get_current): Likewise.
3837 (grub_parser_set_current): Likewise.
3839 * include/grub/reader.h: New file.
3840 * kern/reader.c: Likewise.
3841 * kern/rescue_parser.c: Likewise.
3842 * kern/rescue_reader.c: Likewise.
3843 * normal/autofs.c: Likewise.
3844 * normal/dyncmd.c: Likewise.
3846 * include/grub/rescue.h: Removed.
3847 * normal/command.h: Likewise.
3849 * include/grub/script.h: Moved to ...
3850 * include/grub/script_sh.h: ... Moved here.
3851 * normal/execute.c: Moved to ...
3852 * script/sh/execute.c: ... Moved here.
3853 * normal/function.c: Moved to ...
3854 * script/sh/function.c: ... Moved here.
3855 * normal/lexer.c: Moved to ...
3856 * script/sh/lexer.c: ... Moved here.
3857 * normal/parser.y: Moved to ...
3858 * script/sh/parser.y: ... Moved here.
3859 * normal/script.c: Moved to ...
3860 * script/sh/script.c: ... Moved here.
3862 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
3864 (grub_exit_env): Removed.
3865 (fs_module_list): Moved to normal/autofs.c.
3866 (grub_file_getline): Don't handle comment here.
3867 (free_menu): Skip removed field entry->commands.
3868 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
3870 (read_config_file): Removed nested parameter, change getline function.
3871 (grub_enter_normal_mode): Removed.
3872 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
3873 (read_command_list): Likewise.
3874 (autoload_fs_module): Moved to normal/autofs.c.
3875 (read_fs_list): Likewise.
3876 (reader_nested): New variable.
3877 (grub_normal_execute): Run parser.sh to switch to sh parser.
3878 (grub_cmd_rescue): Removed.
3879 (cmd_normal): Removed.
3880 (grub_cmd_normal): Unregister itself at the beginning. Don't register
3882 (grub_cmdline_run): New function.
3883 (grub_normal_reader_init): Likewise.
3884 (grub_normal_read_line): Likewise.
3885 (grub_env_write_pager): Likewise.
3886 (cmdline): New variable.
3887 (grub_normal_reader): Likewise.
3888 (GRUB_MOD_INIT): Register normal reader and set as current, register
3889 pager hook, register normal command with grub_register_command_prio,
3890 so that it won't show up in command.lst.
3891 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
3892 grub_fs_autoload_hook.
3894 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
3895 (grub_menu_execute_entry): Replace grub_script_execute with
3896 grub_parser_execute, change parameter to grub_command_execute.
3898 * normal/menu_text.c: Remove <grub/script.h>.
3900 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
3901 and <grub/parser.h>.
3902 (run): Change editor_getline to use new parser interface. Change
3903 parameter to grub_command_execute.
3905 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
3906 <grub/reader.h> and <grub/parser.h>.
3907 (grub_load_normal_mode): Execute normal command.
3908 (grub_main): Call grub_register_core_commands,
3909 grub_register_rescue_parser and grub_register_rescue_reader, use
3910 grub_reader_loop to enter input loop.
3912 * kern/parser.c (grub_parser_split_cmdline): Change type of
3914 (grub_parser_class): New variable.
3915 (grub_parser_execute): New function.
3917 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
3918 * loader/multiboot2.c: Likewise.
3919 * loader/sparc64/ieee1275/linux.c: Likewise.
3921 * util/grub-emu.c (read_command_list): New dummy function.
3923 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
3925 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
3926 count to 16 for CCISS and IDA.
3928 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
3930 * normal/menu_text.c (grub_wait_after_message): Print a newline
3931 after waiting for user input.
3933 * loader/i386/linux.c: Include `<grub/normal.h>'.
3934 (grub_cmd_linux): Improve the error message about `ask' mode, by
3935 waiting for user input so it's not missed (we can do this, since
3936 user requested interaction).
3938 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3940 Added missing lst to grub-mkrescue
3942 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
3943 and ${input_dir}/parttool.lst
3945 2009-04-30 David S. Miller <davem@davemloft.net>
3947 * util/hostdisk.c (device_is_wholedisk): New function.
3948 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
3949 zero only if device_is_wholedisk() returns true.
3951 * util/hostdisk.c (convert_system_partition_to_system_disk):
3952 Handle virtual disk devices named /dev/vdiskX as found on sparc
3955 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
3956 lettered partition specifier is found, convert to numbered.
3958 2009-04-29 David S. Miller <davem@davemloft.net>
3960 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
3961 * include/grub/sparc64/ieee1275/memory.h: Likewise.
3963 * normal/command.c: Add missing newline at end of file.
3965 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
3967 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
3968 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
3969 grub_ofdisk_read): Likewise, and deal similarly with the fact that
3970 ihandles have a 32-bit type but need to be stored in a "void *".
3972 2009-04-28 Pavel Roskin <proski@gnu.org>
3974 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
3975 not disk. Adjust all dependencies.
3976 (grub_fs_uuid_close): Use grub_device_close(), not
3979 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
3980 parent's partition, don't copy it by reference, as it gets freed
3983 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
3985 Preboot hooks support
3987 * commands/boot.c (struct grub_preboot_t): new declaration
3988 (preboots_head): new variable
3989 (preboots_tail): likewise
3990 (grub_loader_register_preboot_hook): new function
3991 (grub_loader_unregister_preboot_hook): likewise
3992 (grub_loader_set): launch preboot hooks
3993 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
3994 (grub_loader_register_preboot_hook): new declaration
3995 (grub_loader_unregister_preboot_hook): likewise
3997 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
4001 * disk/scsi.c (grub_scsi_open): added missing cast when
4002 calling grub_dprintf
4004 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
4006 Bug and warning fixes
4008 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
4010 * commands/test.c (test_parse): fixed bug with file tests and corrected
4011 declaration of find_file
4013 2009-04-26 Pavel Roskin <proski@gnu.org>
4015 * Makefile.in: Don't install empty manual pages if help2man is
4016 missing. Use help2man option for output, not shell redirection.
4018 2009-04-26 David S. Miller <davem@davemloft.net>
4020 * util/grub-mkdevicemap.c (make_device_map): Add missing
4021 NESTED_FUNC_ATTR to process_device().
4023 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
4027 * commands/test.c: rewritten to use bash-like test
4029 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
4031 Parttool autoloading and improvements
4033 * Makefile.in (pkglib_DATA): add parttool.lst
4034 (parttool.lst): new target
4035 * genmk.rb: generate parttool-*
4036 (CLEANFILES): add #{parttool}
4037 (PARTTOOLFILES): new variable
4038 * genparttoollist.sh: new file
4039 * parttool/pcpart.c (grub_pcpart_boot): more feedback
4040 (grub_pcpart_type): likewise
4041 * commands/parttool.c (helpmsg): new variable
4042 (grub_cmd_parttool): output help if not enough arguments are supplied
4044 (GRUB_MOD_INIT(parttool)): use helpmsg
4046 2009-04-24 David S. Miller <davem@davemloft.net>
4048 Avoiding opening same device multiple times in device iterator.
4050 * kern/device.c: (grub_device_iterate): Define struct part_ent,
4051 and use it to build a list of partitions in iterate_disk() and
4052 iterate_partition().
4054 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
4057 * disk/ieee1275/nand.c (grub_nand_iterate): Return
4058 grub_devalias_iterate() result instead of unconditional 0.
4059 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
4060 Also, capture hook return value, either directly or via
4061 grub_children_iterate(), and propagate to caller.
4062 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
4063 grub_children_iterate): Return value is now 'int' instead of
4065 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
4066 like a proper iterator, stopping when hooks return non-zero.
4067 (grub_devalias_iterate): Likewise.
4069 2009-04-23 David S. Miller <davem@davemloft.net>
4071 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
4073 2009-04-22 David S. Miller <davem@davemloft.net>
4075 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
4076 is larger than address_cells, use that value for address_cells too.
4078 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
4079 IEEE1275_MAX_PATH_LEN): Define.
4080 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
4081 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
4082 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
4083 'devtype'. Explicitly NULL terminate devalias expansion.
4085 * util/sparc64/ieee1275/misc.c: New file.
4086 * util/sparc64/ieee1275/grub-setup.c: New file.
4087 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
4088 * util/sparc64/ieee1275/grub-mkimage.c: New file.
4089 * util/sparc64/ieee1275/grub-install.in: New file.
4090 * util/ieee1275/ofpath.c: New file.
4091 * util/ieee1275/devicemap.c: New file.
4092 * util/devicemap.c: New file.
4093 * util/deviceiter.c: New file.
4094 * kern/sparc64/ieee1275/init.c: New file.
4095 * include/grub/util/ofpath.h: New file.
4096 * include/grub/util/deviceiter.h: New file.
4097 * util/grub-mkdevicemap.c: Include deviceiter.h.
4098 Implement using grub_util_emit_devicemap_entry and
4099 grub_util_iterate_devices.
4100 * conf/i386-corebook.rmk: Build util/deviceiter.c and
4101 util/devicemap.c into grub-mkdevicemap
4102 * conf/i386-efi.rmk: Likewise.
4103 * conf/i386-ieee1275.rmk: Likewise.
4104 * conf/i386-pc.rmk: Likewise.
4105 * conf/powerpc-ieee1275.rmk: Likewise.
4106 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
4107 images and installation utilities. Build kernel as image
4108 instead of as elf binary. Use common rules as much as possible.
4110 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
4112 Correct GPT definition
4114 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
4117 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
4119 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
4121 2009-04-19 David S. Miller <davem@davemloft.net>
4123 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
4124 (grub_rescue_cmd_linux): Rename to...
4125 (grub_cmd_linux): and fix prototype.
4126 (grub_rescue_cmd_initrd): Rename to...
4127 (grub_cmd_initrd): and fix prototype.
4128 (cmd_linux, cmd_initrd): New.
4129 (GRUB_MOD_INIT(linux)): Use grub_register_command().
4130 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
4132 2009-04-17 Pavel Roskin <proski@gnu.org>
4134 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
4136 (grub_ohci_transfer): Likewise.
4138 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
4140 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
4141 return without a value. Fix inconsistent indentation.
4143 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
4144 match struct grub_fs.
4146 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
4147 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
4148 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
4149 * commands/lspci.c (grub_lspci_iter): Likewise.
4151 2009-04-16 Bean <bean123ch@gmail.com>
4153 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
4156 2009-04-15 Pavel Roskin <proski@gnu.org>
4158 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
4159 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
4160 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
4163 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
4165 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
4166 that no multiple data or metadata areas are supported and `Unknown
4169 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
4171 Move loader out of the kernel
4173 * kern/loader.c: moved to ...
4174 * commands/boot.c: ... moved here
4175 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
4176 * commands/boot.c (grub_cmd_boot): moved here. All users updated
4177 * include/grub/kernel.h (grub_machine_fini): export
4178 * include/grub/loader.h (grub_loader_is_loaded): update declaration
4179 (grub_loader_set): likewise
4180 (grub_loader_unset): likewise
4181 (grub_loader_boot): likewise
4182 * conf/common.rmk: new module boot.mod
4183 (pkglib_MODULES): add boot.mod
4184 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
4185 (grub_emu_SOURCES): likewise
4186 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
4187 (grub_emu_SOURCES): likewise
4188 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
4189 (grub_emu_SOURCES): likewise
4190 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
4191 (grub_emu_SOURCES): likewise
4192 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
4193 (grub_emu_SOURCES): likewise
4194 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
4195 (grub_emu_SOURCES): likewise
4196 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
4197 (grub_emu_SOURCES): likewise
4199 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
4201 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
4203 * kern/misc.c (grub_itoa): Removed function
4204 (grub_ltoa): likewise
4205 (grub_vsprintf): use grub_lltoa
4207 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
4211 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
4212 * conf/i386-coreboot.rmk: likewise
4213 * conf/i386-ieee1275.rmk: likewise
4214 * conf/powerpc-ieee1275.rmk: likewise
4216 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
4218 * INSTALL: Add that `./autogen.sh' needs to be run before
4221 2009-04-14 Bean <bean123ch@gmail.com>
4223 * Makefile.in (pkglib_DATA): Add handler.lst.
4224 (handler.lst): New rule.
4226 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
4227 * conf/i386-coreboot.rmk: Likewise.
4228 * conf/i386-ieee1275.rmk: Likewise.
4229 * conf/i386-efi.rmk: Likewise.
4230 * conf/x86_64-efi.rmk: Likewise.
4231 * conf/powerpc-ieee1275.rmk: Likewise.
4232 * conf/sparc64-ieee1275.rmk: Likewise.
4234 * genhandlerlist.sh: New file.
4236 * genmk.rb: Add rules to generate handler.lst.
4238 * include/grub/normal.h (grub_file_getline): New function definition.
4239 (read_handler_list): Likewise.
4240 (free_handler_list): Likewise.
4242 * include/grub/term.h (grub_term_register_input): Add name parameter
4243 for auto generation of handler.lst.
4244 (grub_term_register_output): Likewise.
4246 * normal/handler.c: New file.
4248 * normal/main.c (get_line): Renamed to grub_file_getline.
4249 (read_config_file): Use the newly renamed grub_file_getline.
4250 (read_command_list): Likewise.
4251 (read_fs_list): Likewise.
4252 (grub_normal_execute): Call read_handler_list to parse handler.lst.
4253 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
4255 * term/efi/console.c (grub_console_init): Add name parameter for auto
4256 generation of handler.lst.
4257 * term/gfxterm.c: Likewise.
4258 * term/i386/pc/at_keyboard.c: Likewise.
4259 * term/i386/pc/console.c: Likewise.
4260 * term/i386/pc/serial.c: Likewise.
4261 * term/i386/pc/vesafb.c: Likewise.
4262 * term/i386/pc/vga.c: Likewise.
4263 * term/i386/pc/vga_text.c: Likewise.
4264 * term/ieee1275/ofconsole.c: Likewise.
4265 * term/usb_keyboard.c: Likewise.
4267 2009-04-14 Bean <bean123ch@gmail.com>
4269 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
4270 properly with null character.
4272 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
4274 * configure: Remove.
4275 * config.h.in: Likewise.
4276 * stamp-h.in: Likewise.
4277 * DISTLIST: Likewise.
4278 * conf/common.mk: Likewise.
4279 * conf/i386-coreboot.mk: Likewise.
4280 * conf/i386-efi.mk: Likewise.
4281 * conf/i386-ieee1275.mk: Likewise.
4282 * conf/i386.mk: Likewise.
4283 * conf/i386-pc.mk: Likewise.
4284 * conf/powerpc-ieee1275.mk: Likewise.
4285 * conf/sparc64-ieee1275.mk: Likewise.
4286 * conf/x86_64-efi.mk: Likewise.
4288 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
4291 2009-04-14 John Stanley <jpsinthemix@verizon.net>
4292 David S. Miller <davem@davemloft.net>
4294 * util/hostdisk.c (make_device_name): Fix buffer length
4297 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
4299 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
4300 <sys/param.h> and <sys/sysctl.h>.
4301 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
4302 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
4303 opening the device and reset them afterwards.
4305 2009-04-13 Pavel Roskin <proski@gnu.org>
4307 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
4308 Reported by John Stanley <jpsinthemix@verizon.net>
4310 2009-04-13 Robert Millan <rmh@aybabtu.com>
4312 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
4313 that name for menuentries when appropriate.
4315 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
4317 * util/grub.d/10_freebsd.in: Add a missing `fi'.
4319 2009-04-13 Robert Millan <rmh@aybabtu.com>
4321 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
4322 to Linux, simply abort telling the user it's no longer supported.
4324 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
4326 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
4327 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
4328 `freebsd_loadenv' only when devices.hints exist.
4330 2009-04-13 Pavel Roskin <proski@gnu.org>
4332 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
4334 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
4336 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
4338 (grub_drive): Likewise.
4340 2009-04-13 David S. Miller <davem@davemloft.net>
4342 * kern/sparc64/ieee1275/ieee1275.c: New file.
4343 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
4344 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
4345 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
4346 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
4347 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
4348 grub_ieee1275_alloc_physmem): Declare new exported functions.
4350 * include/grub/sparc64/ieee1275/loader.h: New file.
4351 * include/grub/sparc64/ieee1275/memory.h: Likewise.
4352 * include/grub/sparc64/kernel.h: Likewise.
4353 * loader/sparc64/ieee1275/linux.c: Likewise.
4355 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
4356 (grub_fstest_SOURCES): Likewise.
4358 * util/hostdisk.c (make_device_name): Do not make any assumptions
4359 about the length of drive names.
4361 * kern/dl.c (grub_dl_load_file): Close file immediately when
4362 we are done using it.
4364 2009-04-12 David S. Miller <davem@davemloft.net>
4366 * kern/misc.c (grub_ltoa): Fix cast when handling negative
4367 values. Noticed by Pavel Roskin.
4369 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
4372 * genmk.rb: Add more flexible image type specification, also
4373 pass --strip-unneeded to objcopy.
4374 * conf/i386-pc.rmk: Use *_FORMAT.
4375 * conf/i386-pc.mk: Rebuilt.
4377 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
4378 (OFDISK_HASH_SZ): Define.
4379 (ofdisk_hash): New hash table.
4380 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
4381 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
4382 instead of device phandle which is not unique.
4384 * kern/sparc64/ieee1275/init.c: Delete, replace with...
4385 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
4386 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
4387 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
4388 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
4389 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
4390 GRUB_KERNEL_MACHINE_DATA_END): Define.
4391 (grub_kernel_image_size, grub_total_module_size): Declare.
4393 2009-04-12 Pavel Roskin <proski@gnu.org>
4395 * configure.ac: Change the logic when we check for target tools.
4396 Do it when the target is specified and it's different from the
4397 specified value of the host.
4399 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
4401 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
4402 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
4403 GNU/kFreeBSD. Check if a device is a character device. Use
4404 DIOCGMEDIASIZE to get the size.
4405 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
4406 support for GNU/kFreeBSD.
4407 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
4408 is a character device instead of a block device. Add support for
4409 FreeBSD device names.
4411 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
4412 is a character device instead of a block device.
4414 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
4415 is a character device instead of a block device.
4417 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
4419 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
4420 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
4421 FreeBSD. Check if a device is a character device. Use
4422 DIOCGMEDIASIZE to get the size.
4423 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
4424 support for FreeBSD.
4425 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
4426 is a character device instead of a block device. Add support for
4427 FreeBSD device names.
4429 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
4430 a character device instead of a block device.
4431 (grub_util_check_char_device): New function.
4433 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
4434 a character device instead of a block device.
4436 * include/grub/util/getroot.h (grub_util_check_char_device): New
4439 2009-04-11 David S. Miller <davem@davemloft.net>
4441 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
4443 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
4444 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
4445 function, if present.
4446 (__bswapdi2): Likewise.
4448 * include/grub/sparc64/ieee1275/boot.h: New file.
4449 * boot/sparc64/ieee1275/boot.S: Likewise.
4450 * boot/sparc64/ieee1275/diskboot.S: Likewise.
4452 * kern/misc.c (grub_ltoa): New function.
4453 (grub_vsprintf): Use it to format 'long' integers.
4455 2009-04-10 David S. Miller <davem@davemloft.net>
4457 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
4458 slots are of type grub_ieee1275_cell_t.
4459 (grub_nand_read): Likewise.
4460 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
4461 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
4462 macros are used to compare values in arg/ret block of the call.
4463 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
4464 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
4465 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
4466 grub_ieee1275_instance_to_path, grub_ieee1275_write,
4467 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
4468 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
4469 grub_ieee1275_close, grub_ieee1275_set_property,
4470 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
4471 grub_ieee1275_cell_t.
4472 * kern/ieee1275/openfw.c (grub_map): Likewise.
4473 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
4474 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
4476 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
4477 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
4478 (grub_devalias_iterate): Likewise.
4480 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
4484 * fs/ufs.c (INODE_NBLOCKS): new definition
4485 (struct grub_ufs_dirent): added fields for non-BSD dirents
4486 (grub_ufs_get_file_block): fixed double indirect handling
4487 (grub_ufs_lookup_symlink): use more robust way to determine whether
4489 (grub_ufs_find_file): support for non-BSD dirents
4490 (grub_ufs_dir): support for non-BSD dirents
4492 2009-04-10 Bean <bean123ch@gnail.com>
4494 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
4495 attribute, otherwise the size would be wrong for i386 platform.
4497 * include/grub/pci.h (grub_pci_read_word): New inline function.
4498 (grub_pci_read_byte): Likewise.
4499 (grub_pci_write): Likewise.
4500 (grub_pci_write_word): Likewise.
4501 (grub_pci_write_byte): Likewise.
4503 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
4505 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
4506 (find_framebuf): Scan pci to locate the frame buffer address.
4508 * commands/efi/fixvideo.c: New file.
4510 * commands/efi/loadbios.c: Likewise.
4512 * commands/memrw.c: Likewise.
4514 * util/grub-dumpbios.in: Likewise.
4516 * conf/common.rmk (grub-dumpbios): New utility.
4517 (pkglib_MODULES): New module memrw.mod.
4518 (memrw_mod_SOURCE): New macro.
4519 (memrw_mod_CFLAGS): Likewise.
4520 (memrw_mod_LDFLAGS): Likewise.
4522 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
4524 (loadbios_mod_SOURCE): New macro.
4525 (loadbios_mod_CFLAGS): Likewise.
4526 (loadbios_mod_LDFLAGS): Likewise.
4527 (fixvideo_mod_SOURCE): Likewise.
4528 (fixvideo_mod_CFLAGS): Likewise.
4529 (fixvideo_mod_LDFLAGS): Likewise.
4531 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
4533 (loadbios_mod_SOURCE): New macro.
4534 (loadbios_mod_CFLAGS): Likewise.
4535 (loadbios_mod_LDFLAGS): Likewise.
4536 (fixvideo_mod_SOURCE): Likewise.
4537 (fixvideo_mod_CFLAGS): Likewise.
4538 (fixvideo_mod_LDFLAGS): Likewise.
4540 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
4542 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
4544 2009-04-07 David S. Miller <davem@davemloft.net>
4546 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
4547 support for R_SPARC_OLO10 relocations. Fix compile warning for
4548 R_SPARC_WDISP30 case.
4549 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
4551 2009-04-06 Pavel Roskin <proski@gnu.org>
4553 * include/grub/misc.h (ARRAY_SIZE): New macro.
4554 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
4556 * loader/i386/linux.c (allocate_pages): Use free_pages().
4557 (grub_linux_unload): Don't use free_pages().
4558 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
4559 wrong index. Treat all other modes as text modes.
4560 (grub_cmd_linux): Initialize vid_mode unconditionally to
4561 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
4563 * commands/help.c (print_command_help): Use cmd->prio, not
4564 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
4566 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
4570 * parttool/pcpart.c: new file
4571 * commands/parttool.c: likewise
4572 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
4573 (parttool_mod_SOURCES): new variable
4574 (parttool_mod_CFLAGS): likewise
4575 (parttool_mod_LDFLAGS): likewise
4576 (pcpart_mod_SOURCES): likewise
4577 (pcpart_mod_CFLAGS): likewise
4578 (pcpart_mod_LDFLAGS): likewise
4579 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
4580 and parttool/pcpart.c
4581 * conf/i386-efi.rmk: likewise
4582 * conf/i386-ieee1275.rmk: likewise
4583 * conf/i386-pc.rmk: likewise
4584 * conf/powerpc-ieee1275.rmk: likewise
4585 * conf/sparc64-ieee1275.rmk: likewise
4586 * conf/x86_64-ieee1275.rmk: likewise
4588 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
4590 Support for mtime and further expandability of dir command
4592 * include/grub/lib/datetime.h: moved to ...
4593 * include/grub/datetime.h: ... moved here and added
4594 declaration of grub_unixtime2datetime. All users updated
4595 * include/grub/fs.h: new syntax for dir and mtime functions in
4597 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
4598 and GRUB_FSHELP_FLAGS_MASK
4599 * commands/ls.c (grub_ls_list_files): Write mtime in long format
4600 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
4601 (grub_ext2_mtime): new function
4602 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
4603 (grub_hfsplus_mtime): new function
4604 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
4605 (GRUB_UFS_ATTR_FILE): likewise
4606 (GRUB_UFS_ATTR_LNK): likewise
4607 (struct grub_ufs_sblock): new fields mtime
4608 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
4610 (grub_ufs_dir): mtime support
4611 (grub_ufs_mtime): new function
4612 * fs/affs.c (grub_affs_dir): use new dir syntax
4613 * fs/afs.c (grub_afs_dir): likewise
4614 * fs/cpio.c (grub_cpio_dir): likewise
4615 * fs/fat.c (grub_fat_find_dir): likewise
4616 * fs/hfs.c (grub_hfs_dir): likewise
4617 * fs/iso9660.c (grub_iso9660_dir): likewise
4618 * fs/jfs.c (grub_jfs_dir): likewise
4619 * fs/minix.c (grub_minix_dir): likewise
4620 * fs/ntfs.c (grub_ntfs_dir): likewise
4621 * fs/reiserfs.c (grub_reiserfs_dir): likewise
4622 * fs/sfs.c (grub_sfs_dir): likewise
4623 * fs/xfs.c (grub_xfs_dir): likewise
4624 * util/hostfs.c (grub_hostfs_dir): likewise
4625 * lib/datetime.c: moved to ...
4626 * normal/datetime.c: ... moved here
4627 (grub_unixtime2datetime): new function
4628 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
4629 * normal/completion.c (iterate_dir): use new dir syntax
4630 * normal/misc.c (grub_normal_print_device_info): tell the
4631 last modification time of a volume
4632 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
4633 * conf/common.rmk: added lib/datetime.c to ls.mod
4634 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
4635 (normal_mod_SOURCES): likewise
4636 (datetime_mod_SOURCES): Removed lib/datetime.c
4637 * conf/i386-efi.rmk: likewise
4638 * conf/i386-ieee1275.rmk: likewise
4639 * conf/i386-pc.rmk: likewise
4640 * conf/powerpc-ieee1275.rmk: likewise
4641 * conf/sparc64-ieee1275.rmk: likewise
4642 * conf/x86_64-efi.rmk: likewise
4644 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
4646 Trim trailing spaces in FAT label and support mtools-like labels
4648 * fs/fat.c (grub_fat_iterate_dir): New function based
4649 on grub_fat_find_dir
4650 (grub_fat_find_dir): use grub_fat_iterate_dir
4651 (grub_fat_label): likewise
4653 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
4655 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
4657 remove extraneous kernel_elf_HEADERS
4659 2009-04-04 Bean <bean123ch@gnail.com>
4661 * include/grub/util/misc.h: Add dummy function fsync for mingw.
4663 * util/misc.c: Likewise.
4665 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
4667 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
4668 instead of grub_printf.
4670 2009-04-03 Robert Millan <rmh@aybabtu.com>
4672 * loader/i386/linux.c (grub_linux_setup_video): Fill
4673 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
4674 values from `mode info' structure instead of hardcoded
4677 2009-04-01 Pavel Roskin <proski@gnu.org>
4679 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
4681 * genmk.rb: Likewise.
4682 * configure.ac: Likewise.
4684 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
4686 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
4687 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
4689 2009-04-01 David S. Miller <davem@davemloft.net>
4691 * normal/sparc64/setjmp.S: Fix setjmp implementation.
4692 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
4693 (grub_setjmp): Mark with 'returns_twice' attribute.
4694 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
4695 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
4696 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
4698 2009-04-01 Robert Millan <rmh@aybabtu.com>
4700 Reapply fix from 2008-07-28 which was accidentally reverted; also
4701 perform the same fix to a similar check in same function.
4703 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4704 with the same number are found, just use issue a warning with
4705 grub_dprintf(), as this error has been reported to be non-fatal.
4707 2009-03-31 Pavel Roskin <proski@gnu.org>
4709 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
4710 for cross-compilation.
4712 2009-03-30 Robert Millan <rmh@aybabtu.com>
4714 Fix i386-ieee1275 build.
4716 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
4719 2009-03-30 Pavel Roskin <proski@gnu.org>
4721 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
4722 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
4723 zero-terminated, rely only on the strlen value. Fix comparison
4724 of strings differing in length.
4726 2009-03-30 Robert Millan <rmh@aybabtu.com>
4728 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
4729 checking for abi version. Improve error messages on BIOS to notify
4730 user about `linux16' command.
4732 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
4736 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
4737 in case of collision
4738 * disk/scsi.c (grub_scsi_open): free scsi in case of error
4740 2009-03-29 Robert Millan <rmh@aybabtu.com>
4742 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
4743 set `vid_mode' accordingly.
4744 (grub_linux_boot): Process `vid_mode' and set video mode.
4746 2009-03-29 Robert Millan <rmh@aybabtu.com>
4748 * util/grub.d/10_linux.in (linux_entry): New function.
4749 Factorize generation of Linux boot entries.
4751 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
4753 Make the format of Environment Block plain text. The boot loader
4754 part is not tested well yet.
4756 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
4759 (usage): Remove "info" and "clear". Add "unset". Update the
4760 description of "set", as this does not delete variables any
4762 (create_envblk_file): Complete rewrite.
4763 (open_envblk_file): Likewise.
4764 (cmd_info): Removed.
4765 (cmd_list): Likewise.
4766 (cmd_set): Likewise.
4767 (cmd_clear): Likewise.
4768 (list_variables): New function.
4769 (write_envblk): Likewise.
4770 (set_variables): Likewise.
4771 (unset_variables): Likewise.
4772 (main): Complete rewrite.
4774 * commands/loadenv.c (buffer): Removed.
4776 (open_envblk_file): New function.
4777 (read_envblk_file): Complete rewrite.
4778 (grub_cmd_load_env): Likewise.
4779 (grub_cmd_list_env): Likewise.
4780 (struct blocklist): New struct.
4781 (free_blocklists): New function.
4782 (check_blocklists): Likewise.
4783 (write_blocklists): Likewise.
4784 (grub_cmd_save_env): Complete rewrite.
4786 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
4787 a plain text signature.
4788 (GRUB_ENVBLK_MAXLEN): Removed.
4789 (struct grub_envblk): Complete rewrite.
4790 (grub_envblk_find): Removed.
4791 (grub_envblk_insert): Likewise.
4792 (grub_envblk_open): New prototype.
4793 (grub_envblk_set): Likewise.
4794 (grub_envblk_delete): Put const to VALUE.
4795 (grub_envblk_iterate): Put const to NAME and VALUE.
4796 (grub_envblk_close): New prototype.
4797 (grub_envblk_buffer): New inline function.
4798 (grub_envblk_size): Likewise.
4800 * lib/envblk.c: Include grub/mm.h.
4801 (grub_env_find): Removed.
4802 (grub_envblk_open): New function.
4803 (grub_envblk_close): Likewise.
4804 (escaped_value_len): Likewise.
4805 (find_next_line): Likewise.
4806 (grub_envblk_insert): Removed.
4807 (grub_envblk_set): New function.
4808 (grub_envblk_delete): Complete rewrite.
4809 (grub_envblk_iterate): Likewise.
4811 2009-03-28 Robert Millan <rmh@aybabtu.com>
4813 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
4814 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
4815 variables. Use 16-bit loader.
4816 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
4818 * kern/i386/loader.S (grub_linux_boot): Rename to ...
4819 (grub_linux16_boot): ... this. Update all users.
4820 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
4821 (grub_linux_boot): ... this. Update all users.
4823 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
4824 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
4825 commands to `linux16' and `initrd16'.
4826 (GRUB_MOD_FINI(linux)): Rename to ...
4827 (GRUB_MOD_FINI(linux16)): ... this.
4829 2009-03-24 Pavel Roskin <proski@gnu.org>
4831 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
4832 not just for compilation.
4834 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
4836 Move multiboot helper out of kernel
4838 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
4839 `loader/i386/multiboot_helper.S'.
4840 * conf/i386-coreboot.rmk: Likewise
4841 * conf/i386-ieee1275.rmk: Likewise
4843 * kern/i386/loader.S: Move multiboot helpers from here...
4844 * loader/i386/multiboot_helper.S: ...moved here
4845 * include/grub/i386/loader.h: Move declarations of multiboot
4846 helpers from here...
4847 * include/grub/i386/multiboot.h: ...moved here
4848 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
4850 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
4852 * kern/env.c (grub_env_context_open): Added an argument to specify
4853 whether a new context inherits exported variables from current
4854 one. This is useful when making a sandbox to interpret a config
4856 All callers updated.
4858 * include/grub/env.h (grub_env_context_open): Updated the prototype.
4860 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
4862 * kern/env.c (grub_env_context_close): Fix memory leaks.
4864 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
4866 * normal/main.c (grub_normal_execute): Added an argument
4867 BATCH to specify if an interactive interface should be provided
4868 after reading a config file.
4869 All callers updated.
4870 (read_command_list): Prevent being executed twice.
4871 (read_fs_list): Likewise.
4873 * include/grub/normal.h (grub_normal_execute): Updated the
4876 2009-03-22 Pavel Roskin <proski@gno.org>
4878 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
4880 * kern/i386/pc/startup.S: Likewise.
4881 * kern/i386/efi/startup.S: Likewise.
4882 * kern/i386/ieee1275/startup.S: Likewise.
4883 * kern/i386/coreboot/startup.S: Likewise.
4884 * kern/x86_64/efi/startup.S: Likewise.
4886 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
4887 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
4888 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
4890 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
4892 Bugfixes in multiboot for bugs uncovered by solaris kernel.
4894 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
4896 Use vaddr of correct segment for entry_point.
4898 2009-03-21 Bean <bean123ch@gmail.com>
4900 * commands/blocklist.c: Add include file <grub/command.h>, remove
4901 <grub/normal.h> and <grub/arg.h>.
4902 (grub_cmd_blocklist): Use the new command interface.
4903 (GRUB_MOD_INIT): Likewise.
4904 (GRUB_MOD_FINI): Likewise.
4905 * commands/boot.c: Likewise.
4906 * commands/cat.c: Likewise.
4907 * commands/cmp.c: Likewise.
4908 * commands/configfile.c: Likewise.
4909 * commands/crc.c: Likewise.
4910 * commands/echo.c: Likewise.
4911 * commands/halt.c: Likewise.
4912 * commands/handler.c: Likewise.
4913 * commands/hdparm.c: Likewise.
4914 * commands/help.c: Likewise.
4915 * commands/hexdump.c: Likewise.
4916 * commands/loadenv.c: Likewise.
4917 * commands/ls.c: Likewise.
4918 * commands/lsmmap.c: Likewise.
4919 * commands/lspci.c: Likewise.
4920 * commands/loadenv.c: Likewise.
4921 * commands/read.c: Likewise.
4922 * commands/reboot.c: Likewise.
4923 * commands/search.c: Likewise.
4924 * commands/sleep.c: Likewise.
4925 * commands/test.c: Likewise.
4926 * commands/usbtest.c: Likewise.
4927 * commands/videotest.c: Likewise.
4928 * commands/i386/cpuid.c: Likewise.
4929 * commands/i386/pc/halt.c: Likewise.
4930 * commands/i386/pc/play.c: Likewise.
4931 * commands/i386/pc/pxecmd.c: Likewise.
4932 * commands/i386/pc/vbeinfo.c: Likewise.
4933 * commands/i386/pc/vbetest.c: Likewise.
4934 * commands/ieee1275/suspend.c: Likewise.
4935 * disk/loopback.c: Likewise.
4936 * font/font_cmd.c: Likewise.
4937 * hello/hello.c: Likewise.
4938 * loader/efi/appleloader.c: Likewise.
4939 * loader/efi/chainloader.c: Likewise.
4940 * loader/i386/bsd.c: Likewise.
4941 * loader/i386/efi/linux.c: Likewise.
4942 * loader/i386/ieee1275/linux.c: Likewise.
4943 * loader/i386/linux.c: Likewise.
4944 * loader/i386/pc/chainloader.c: Likewise.
4945 * loader/i386/pc/linux.c: Likewise.
4946 * loader/powerpc/ieee1275/linux.c: Likewise.
4947 * loader/multiboot_loader.c: Likewise.
4948 * term/gfxterm.c: Likewise.
4949 * term/i386/pc/serial.c: Likewise.
4950 * term/terminfo.c: Likewise.
4952 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
4953 * term/i386/pc/vga.c: Likewise.
4954 * video/readers/jpeg.c: Likewise.
4955 * video/readers/png.c: Likewise.
4956 * video/readers/tga.c: Likewise.
4958 * util/grub-fstest (cmd_loopback): Removed.
4959 (cmd_blocklist): Likewise.
4961 (grub_register_command): Likewise.
4962 (grub_unregister_command): Likewise.
4963 (execute_command): Use grub_command_find to locate command and execute
4966 * include/grub/efi/chainloader.h: Removed.
4967 * loader/efi/chainloader_normal.c: Likewise.
4968 * loader/i386/bsd_normal.c: Likewise.
4969 * loader/i386/pc/chainloader_normal.c: Likewise.
4970 * loader/i386/pc/multiboot_normal.c: Likewise.
4971 * loader/linux_normal.c: Likewise.
4972 * loader/multiboot_loader_normal.c: Likewise.
4973 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4975 * gencmdlist.sh: Scan new registration command grub_register_extcmd
4976 and grub_register_command_p1.
4978 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
4979 kern/command.c, lib/arg.c and commands/extcmd.c.
4980 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
4981 (minicmd_mod_SOURCES): New variable.
4982 (minicmd_mod_CFLAGS): Likewise.
4983 (minicmd_mod_LDFLAGS): Likewise.
4984 (extcmd_mod_SOURCES): Likewise.
4985 (extcmd_mod_CFLAGS): Likewise.
4986 (extcmd_mod_LDFLAGS): Likewise.
4987 (boot_mod_SOURCES): Removed.
4988 (boot_mod_CFLAGS): Likewise.
4989 (boot_mod_LDFLAGS): Likewise.
4991 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
4993 (kernel_img_HEADERS): Add command.h.
4994 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
4995 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
4997 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
4998 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
4999 remove the corresponding normal mode command.
5000 (normal_mod_SOURCES): Remove normal/arg.c.
5001 * conf/i386-coreboot.rmk: Likewise.
5002 * conf/i386-efi.rmk: Likewise.
5003 * conf/i386-ieee1275.rmk: Likewise.
5004 * conf/powerpc-ieee1275.rmk: Likewise.
5005 * conf/x86_64-efi.rmk: Likewise.
5007 * include/grub/arg.h: Move from here ...
5008 * include/grub/lib/arg.h: ... to here.
5010 * normal/arg.c: Move from here ...
5011 * lib/arg.c: ... to here.
5013 * commands/extcmd.c: New file.
5014 * commands/minicmd.c: Likewise.
5015 * include/grub/command.h: Likewise.
5016 * include/grub/extcmd.h: Likewise.
5017 * kern/command.c: Likewise.
5018 * kern/corecmd.c: Likewise.
5020 * kern/list.c (grub_list_iterate): Return int instead of void.
5021 (grub_list_insert): New function.
5022 (grub_prio_list_insert): Likewise.
5024 * kern/rescue.c (grub_rescue_command): Removed.
5025 (grub_rescue_command_list): Likewise.
5026 (grub_rescue_register_command): Likewise.
5027 (grub_rescue_unregister_command): Likewise.
5028 (grub_rescue_cmd_boot): Move to minicmd.c
5029 (grub_rescue_cmd_help): Likewise.
5030 (grub_rescue_cmd_info): Likewise.
5031 (grub_rescue_cmd_boot): Likewise.
5032 (grub_rescue_cmd_testload): Likewise.
5033 (grub_rescue_cmd_dump): Likewise.
5034 (grub_rescue_cmd_rmmod): Likewise.
5035 (grub_rescue_cmd_lsmod): Likewise.
5036 (grub_rescue_cmd_exit): Likewise.
5037 (grub_rescue_print_devices): Moved to corecmd.c.
5038 (grub_rescue_print_files): Likewise.
5039 (grub_rescue_cmd_ls): Likewise.
5040 (grub_rescue_cmd_insmod): Likewise.
5041 (grub_rescue_cmd_set): Likewise.
5042 (grub_rescue_cmd_unset): Likewise.
5043 (attempt_normal_mode): Use grub_command_find to get normal module.
5044 (grub_enter_rescue_mode): Use grub_register_core_commands to register
5045 commands, remove grub_rescue_register_command calls.
5047 * normal/command.c (grub_register_command): Removed.
5048 (grub_unregister_command): Likewise.
5049 (grub_command_find): Likewise.
5050 (grub_iterate_commands): Likewise.
5051 (rescue_command): Likewise.
5052 (export_command): Moved to corecmd.c.
5053 (set_command): Removed.
5054 (unset_command): Likewise.
5055 (insmod_command): Likewise.
5056 (rmmod_command): Likewise.
5057 (lsmod_command): Likewise.
5058 (grub_command_init): Likewise.
5060 * normal/completion.c (iterate_command): Use cmd->prio to check for
5062 (complete_arguments): Use grub_extcmd_t structure to find options.
5063 (grub_normal_do_completion): Change function grub_iterate_commands to
5064 grub_command_iterate.
5066 * normal/execute.c (grub_script_execute_cmd): No need to parse
5069 * normal/main.c (grub_dyncmd_dispatcher): New function.
5070 (read_command_list): Register unload commands as dyncmd.
5071 (grub_cmd_normal): Use new command interface, register rescue,
5072 unregister normal at entry, register normal, unregister rescue at exit.
5074 * include/grub/list.h (grub_list_test_t): New type.
5075 (grub_list_iterate): Return int instead of void.
5076 (grub_list_insert): New function.
5077 (GRUB_AS_NAMED_LIST_P): New macro.
5078 (GRUB_AS_PRIO_LIST): Likewise.
5079 (GRUB_AS_PRIO_LIST_P): Likewise.
5080 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
5081 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
5082 (grub_prio_list): New structure.
5083 (grub_prio_list_insert): New function.
5084 (grub_prio_list_remove): New inline function.
5086 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
5087 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
5088 (GRUB_COMMAND_FLAG_MENU): Likewise.
5089 (GRUB_COMMAND_FLAG_BOTH): Likewise.
5090 (GRUB_COMMAND_FLAG_TITLE): Likewise.
5091 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
5092 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
5093 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
5094 (grub_command): Likewise.
5095 (grub_register_command): Likewise.
5096 (grub_command_find): Likewise.
5097 (grub_iterate_commands): Likewise.
5098 (grub_command_init): Likewise.
5099 (grub_arg_parse): Likewise.
5100 (grub_arg_show_help): Likewise.
5102 * include/grub/rescue.h (grub_rescue_register_command): Removed.
5103 (grub_rescue_unregister_command): Likewise.
5105 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
5106 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
5107 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
5109 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
5110 grub_rescue_cmd_initrd.
5111 * include/grub/i386/loader.h: Likewise.
5112 * include/grub/x86_64/loader.h: Likewise.
5114 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
5116 2009-03-21 Bean <bean123ch@gmail.com>
5118 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
5119 instead of stat in mingw environment.
5121 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
5123 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
5125 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
5128 2009-03-21 Bean <bean123ch@gmail.com>
5130 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
5133 2009-03-18 Michel Dänzer <michel@daenzer.net>
5135 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
5136 checking inode flags for EXT4_EXTENTS_FLAG.
5138 2009-03-18 Robert Millan <rmh@aybabtu.com>
5140 * loader/i386/linux.c: Include `<grub/video.h>' and
5141 `<grub/i386/pc/vbe.h>'..
5142 (grub_linux_setup_video): New function. Loosely based on the EFI one.
5143 (grub_linux32_boot): Attempt to configure video settings with
5144 grub_linux_setup_video().
5145 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
5146 to avoid grub_console_fini() which would step out of graphical mode
5149 2009-03-14 Robert Millan <rmh@aybabtu.com>
5151 Fix build on powerpc.
5152 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
5154 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
5156 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
5157 background image command.
5159 2009-03-12 Colin D Bennett <colin@gibibit.com>
5161 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
5162 (grub_gfxterm_putchar): Extract pairs of identical calls to
5163 draw_cursor out of conditional blocks.
5165 2009-03-11 Pavel Roskin <proski@gnu.org>
5167 * fs/hfs.c (grub_hfs_strncasecmp): New function.
5168 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
5170 2009-03-11 Robert Millan <rmh@aybabtu.com>
5172 * loader/i386/multiboot_elfxx.c
5173 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
5175 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
5177 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
5180 2009-03-11 Robert Millan <rmh@aybabtu.com>
5182 * loader/i386/multiboot.c (code_size): New variable.
5183 (grub_multiboot): Define offsets by adding to `code_size' rather
5184 than subtracting from `grub_multiboot_payload_size'. Provide
5185 4-byte alignment to MBI and others by increasing
5186 `boot_loader_name_length' appropriately.
5188 * loader/i386/multiboot_elfxx.c
5189 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
5191 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
5193 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
5196 2009-03-08 Robert Millan <rmh@aybabtu.com>
5198 Make loader/i386/linux.c usable on i386-pc again.
5200 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
5202 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
5205 2009-03-07 Bean <bean123ch@gmail.com>
5207 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
5210 2009-03-06 Robert Millan <rmh@aybabtu.com>
5212 Fix display issue on terminals with screen size other than 80x25
5213 (e.g. gfxterm with resolution higher than 640x480).
5215 * normal/main.c (grub_normal_init_page): Display title text in a
5216 position relative to the center of the terminal instead of relying
5217 on a hardcoded offset.
5219 2009-03-04 Robert Millan <rmh@aybabtu.com>
5221 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
5224 * Makefile.in (host_kernel): New variable.
5225 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
5226 scripts instead of just the windows one.
5227 * configure.ac: Initialize and AC_SUBST `host_kernel'.
5229 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
5231 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
5233 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5234 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5235 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5236 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5237 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5238 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5240 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
5242 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
5243 or if there's no space for the disk label and print the partition number on a
5246 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
5248 * util/misc.c: Include <time.h>.
5249 (grub_millisleep): New function.
5251 2009-03-04 Bean <bean123ch@gmail.com>
5253 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
5254 another option -mno-red-zone.
5256 * commands/handler.c: Change module description.
5258 * kern/handler.c: Add missing space at the end of description line.
5260 * kern/list.c: Likewise.
5262 2009-03-03 Robert Millan <rmh@aybabtu.com>
5264 Move more components to the relocation area, and fix mbi pointer
5265 handling to use the destination rather than the origin (thanks to
5266 Vladimir Serbinenko for spotting).
5268 * loader/i386/multiboot.c (mbi_dest): New variable.
5269 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
5270 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
5273 2009-03-01 Bean <bean123ch@gmail.com>
5275 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
5276 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
5277 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
5278 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
5280 * loader/i386/efi/linux.c (acpi_guid): New variable.
5281 (acpi_guid): Likewise.
5282 (EBDA_SEG_ADDR): New constant.
5283 (LOW_MEM_ADDR): Likewise.
5284 (FAKE_EBDA_SEG): Likewise.
5285 (fake_bios_data): New function.
5286 (grub_linux_boot): Call fake_bios_data.
5288 2009-03-01 Bean <bean123ch@gmail.com>
5290 * commands/terminal.c: Removed.
5292 * commands/handler.c: New file.
5294 * include/grub/list.h: Likewise.
5296 * include/grub/handler.h: Likewise.
5298 * kern/list.c: Likewise.
5300 * kern/handler.c: Likewise.
5302 * kern/term.h: Include header file <grub/handler.h>.
5303 (grub_term_input): Move next field to the beginning.
5304 (grub_term_output): Likewise.
5305 (grub_term_input_class): New variable.
5306 (grub_term_output_class): Likewise.
5307 (grub_term_register_input): Changed to inline function.
5308 (grub_term_register_output): Likewise.
5309 (grub_term_unregister_input): Likewise.
5310 (grub_term_unregister_output): Likewise.
5311 (grub_term_set_current_input): Likewise.
5312 (grub_term_set_current_output): Likewise.
5313 (grub_term_get_current_input): Likewise.
5314 (grub_term_get_current_output): Likewise.
5315 (grub_term_iterate_input): Removed.
5316 (grub_term_iterate_output): Likewise.
5318 * kern/term.c (grub_term_list_input): Removed.
5319 (grub_term_list_output): Likewise.
5320 (grub_term_input_class): New variable.
5321 (grub_term_output_class): Likewise.
5322 (grub_cur_term_input): Change variable as macro.
5323 (grub_cur_term_output): Likewise.
5324 (grub_term_register_input): Removed.
5325 (grub_term_register_output): Likewise.
5326 (grub_term_unregister_input): Likewise.
5327 (grub_term_unregister_output): Likewise.
5328 (grub_term_set_current_input): Likewise.
5329 (grub_term_set_current_output): Likewise.
5330 (grub_term_iterate_input): Likewise.
5331 (grub_term_iterate_output): Likewise.
5332 (grub_term_get_current_input): Likewise.
5333 (grub_term_get_current_output): Likewise.
5335 * util/grub-editenv.c: Include header file <grub/handler.h>.
5336 (grub_term_get_current_input): Removed.
5337 (grub_term_get_current_output): Likewise.
5338 (grub_term_input_class): New variable.
5339 (grub_term_output_class): Likewise.
5341 * util/grub-fstest.c (grub_term_get_current_input): Removed.
5342 (grub_term_get_current_output): Likewise.
5343 (grub_term_input_class): New variable.
5344 (grub_term_output_class): Likewise.
5346 * util/grub-probe.c (grub_term_get_current_input): Removed.
5347 (grub_term_get_current_output): Likewise.
5348 (grub_term_input_class): New variable.
5349 (grub_term_output_class): Likewise.
5351 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
5352 (grub_term_get_current_output): Likewise.
5353 (grub_term_input_class): New variable.
5354 (grub_term_output_class): Likewise.
5356 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
5357 (terminal_mod_SOURCES): Likewise.
5358 (terminal_mod_CFLAGS): Likewise.
5359 (terminal_mod_LDFLAGS): Likewise.
5361 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
5363 (kernel_img_SOURCES): Add list.c and handler.c.
5364 (kernel_img_HEADERS): Add list.h and handler.h.
5366 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5368 (kernel_mod_SOURCES): Add list.c and handler.c.
5369 (kernel_mod_HEADERS): Add list.h and handler.h.
5371 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
5373 (kernel_elf_SOURCES): Add list.c and handler.c.
5374 (kernel_elf_HEADERS): Add list.h and handler.h.
5376 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5378 (kernel_elf_SOURCES): Add list.c and handler.c.
5379 (kernel_elf_HEADERS): Add list.h and handler.h.
5381 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
5383 (kernel_mod_SOURCES): Add list.c and handler.c.
5384 (kernel_mod_HEADERS): Add list.h and handler.h.
5386 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
5388 (kernel_elf_SOURCES): Add list.c and handler.c.
5389 (kernel_elf_HEADERS): Add list.h and handler.h.
5391 2009-02-27 Robert Millan <rmh@aybabtu.com>
5393 Factorize elf32 / elf64 code in Multiboot loader. This will
5394 prevent it from getting out of sync again.
5396 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
5397 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
5398 grub_multiboot_load_elf64): Move from here ...
5399 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
5400 grub_multiboot_load_elf): ... to here (new file).
5402 2009-02-27 Robert Millan <rmh@aybabtu.com>
5404 * util/grub.d/10_linux.in: Rename "single-user mode" to
5407 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
5409 Don't leak in SCSI code.
5410 * disk/scsi.c (grub_scsi_close): free `scsi'.
5412 2009-02-27 Robert Millan <rmh@aybabtu.com>
5414 * loader/i386/pc/multiboot.c: Move from here ...
5415 * loader/i386/multiboot.c: ... to here. Update all users.
5417 2009-02-27 Robert Millan <rmh@aybabtu.com>
5419 Patch from Alexandre Bique <bique.alexandre@gmail.com>
5420 * util/i386/pc/grub-setup.c (setup): Fix directory path.
5422 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
5424 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
5427 2009-02-27 Robert Millan <rmh@aybabtu.com>
5429 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
5430 `0x' qualifier as 0 when base is specified as parameter).
5432 2009-02-24 Bean <bean123ch@gmail.com>
5434 * configure.ac: Check for -mcmodel=large in x86_64 target.
5436 * include/grub/efi/api.h (efi_call_10): New macro.
5437 (efi_wrap_10): New function.
5439 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
5440 (GRUB_PE32_REL_BASED_HIGH): Likewise.
5441 (GRUB_PE32_REL_BASED_LOW): Likewise.
5442 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
5443 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
5444 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
5445 (GRUB_PE32_REL_BASED_SECTION): Likewise.
5446 (GRUB_PE32_REL_BASED_REL): Likewise.
5447 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
5448 (GRUB_PE32_REL_BASED_DIR64): Likewise.
5449 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
5451 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
5454 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
5455 (efi_wrap_10): New function.
5457 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
5459 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
5460 MB/MBP model (NV chipset).
5461 (devdata_devs): Add devpath_5 to the list.
5463 * load/i386/efi/linux.c (video_base): Remove variable.
5464 (RGB_MASK): New macro.
5465 (RGB_MAGIC): Likewise.
5466 (LINE_MIN): Likewise.
5467 (LINE_MAX): Likewise.
5468 (FBTEST_STEP): Likewise.
5469 (FBTEST_COUNT): Likewise.
5470 (fb_list): New variable.
5471 (grub_find_video_card): Remove function.
5472 (find_framebuf): New function.
5473 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
5476 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
5479 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
5481 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
5483 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
5486 2009-02-22 Robert Millan <rmh@aybabtu.com>
5488 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
5489 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
5490 in our relocation, instead of using it directly from heap. Also
5491 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
5493 2009-02-21 Robert Millan <rmh@aybabtu.com>
5495 Implement USB keyboard support (based on patch by Marco Gerards)
5497 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
5498 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
5499 (usb_keyboard_mod_LDFLAGS): New variables.
5501 * term/usb_keyboard.c: New file.
5503 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
5505 Corrected wrong declaration
5507 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
5509 2009-02-14 Christian Franke <franke@computer.org>
5511 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
5512 (grub_lspci_iter): Print class code and programming interface byte.
5514 2009-02-14 Christian Franke <franke@computer.org>
5516 * gendistlist.sh: Ignore `.svn' directories.
5518 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
5520 * fs/fat.c: Add 2009 to Copyright line.
5522 2009-02-14 Christian Franke <franke@computer.org>
5524 * commands/hdparm.c: New file. Provides `hdparm' command
5525 which sends ATA commands via grub_disk_ata_pass_through ().
5527 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
5529 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
5530 and <grub/cpu/io.h> to include/grub/ata.h.
5531 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
5532 (GRUB_CDROM_SECTOR_SIZE): Remove.
5533 (GRUB_ATA_*): Move to include/grub/ata.h.
5534 (GRUB_ATAPI_*): Likewise.
5535 (enum grub_ata_commands): Likewise.
5536 (enum grub_ata_timeout_milliseconds): Likewise.
5537 (struct grub_ata_device): Likewise.
5538 (grub_ata_regset): Likewise.
5539 (grub_ata_regget): Likewise.
5540 (grub_ata_regset2): Likewise.
5541 (grub_ata_regget2): Likewise.
5542 (grub_ata_check_ready): Likewise.
5543 (grub_ata_wait_not_busy): Remove static, exported in
5545 (grub_ata_wait_drq): Likewise.
5546 (grub_ata_pio_read): Likewise.
5548 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
5549 function for hdparm.mod.
5551 * include/grub/ata.h: New file, contains declarations from
5553 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
5555 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
5556 (grub_disk_ata_pass_through): New exported variable.
5558 * kern/disk.c (grub_disk_ata_pass_through): New variable.
5560 2009-02-13 Colin D Bennett <colin@gibibit.com>
5562 Support multiple fallback entries, and provide an API to support
5563 executing default+fallback menu entries. Renamed the `terminal' menu
5566 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
5567 variable declaration.
5568 (grub_menu_execute_callback): New structure declaration.
5569 (grub_menu_execute_callback_t): New typedef.
5570 (grub_menu_execute_with_fallback): New function declaration.
5571 (grub_menu_get_entry): Likewise.
5572 (grub_menu_get_timeout): Likewise.
5573 (grub_menu_set_timeout): Likewise.
5575 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
5577 * normal/menu.c (grub_wait_after_message): Moved to
5578 `normal/menu_text.c'.
5579 (draw_border): Likewise.
5580 (print_message): Likewise.
5581 (print_entry): Likewise.
5582 (print_entries): Likewise.
5583 (grub_menu_init_page): Likewise.
5584 (get_entry_number): Likewise.
5585 (print_timeout): Likewise.
5586 (run_menu): Likewise.
5587 (grub_menu_execute_entry): Likewise.
5588 (show_text_menu): Likewise.
5589 (get_and_remove_first_entry_number): New function.
5590 (grub_menu_execute_with_fallback): Likewise.
5591 (get_entry): Renamed to ...
5592 (grub_menu_get_entry): .. this and made it global.
5593 (get_timeout): Renamed to ...
5594 (grub_menu_get_timeout): ... this and made it global.
5595 (set_timeout): Renamed to ...
5596 (grub_menu_set_timeout): ... this and made it global.
5597 (grub_normal_terminal_menu_viewer): Renamed to ...
5598 (grub_normal_text_menu_viewer): ... this.
5600 * normal/menu_text.c: New file. Extracted text-menu-specific code
5603 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
5604 (normal_mod_SOURCES): Likewise.
5606 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5607 (normal_mod_SOURCES): Likewise.
5609 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5610 (normal_mod_SOURCES): Likewise.
5612 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
5613 (normal_mod_SOURCES): Likewise.
5615 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5616 (normal_mod_SOURCES): Likewise.
5618 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5619 (normal_mod_SOURCES): Likewise.
5621 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5622 (normal_mod_SOURCES): Likewise.
5624 2009-02-11 Robert Millan <rmh@aybabtu.com>
5626 * util/grub.d/00_header.in: Update old reference to `font' command.
5628 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
5630 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
5632 Based on patch from Javier MartÃn.
5634 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
5636 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
5637 to avoid false positives with FAT.
5638 (grub_fstest_SOURCES): Likewise.
5639 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5640 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5641 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5642 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5643 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5644 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5646 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
5648 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
5649 bpb.version_specific.fat12_or_fat16.fstype and
5650 bpb.version_specific.fat32.fstype.
5652 2009-02-08 Robert Millan <rmh@aybabtu.com>
5654 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
5656 2009-02-08 Robert Millan <rmh@aybabtu.com>
5658 * Makefile.in (host_os, host_cpu): New variables.
5659 (target_os): Remove. Update all users.
5661 2009-02-08 Marco Gerards <marco@gnu.org>
5663 * Makefile.in (enable_grub_emu_usb): New variable.
5664 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
5665 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
5666 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
5667 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
5668 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
5669 `usbtest.mod' and `usbms.mod'.
5670 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
5671 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
5672 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
5673 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
5674 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
5677 * disk/usbms.c: New file.
5679 * include/grub/usb.h: Likewise.
5681 * include/grub/usbtrans.h: Likewise.
5683 * include/grub/usbdesc.h: Likewise.
5685 * bus/usb/usbtrans.c: Likewise.
5687 * bus/usb/ohci.c: Likewise.
5689 * bus/usb/uhci.c: Likewise.
5691 * bus/usb/usbhub.c: Likewise.
5693 * bus/usb/usb.c: Likewise.
5695 * commands/usbtest.c: Likewise.
5697 * util/usb.c: Likewise.
5699 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
5701 * configure.ac: Test for libusb presence.
5703 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
5705 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
5707 * kern/mm.c: Add more comments.
5709 2009-02-08 Robert Millan <rmh@aybabtu.com>
5711 Patch from Javier MartÃn.
5712 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
5713 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
5715 2009-02-08 Robert Millan <rmh@aybabtu.com>
5717 * fs/cpio.c: Split tar functionality to ...
5718 * fs/tar.c: ... here (new file). Update all users.
5720 2009-02-07 Robert Millan <rmh@aybabtu.com>
5722 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
5723 backward-incompatible features.
5725 Based on patch from Javier MartÃn, with some adjustments.
5727 2009-02-07 Michael Scherer <misc@mandriva.org>
5729 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
5731 2009-02-07 Robert Millan <rmh@aybabtu.com>
5733 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
5734 position of `disk/lvm.c' to ensure grub_init_all() always picks it
5735 after the RAID stuff.
5737 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
5739 Fixes problem when running vbetest command as reported by
5740 Vladimir Serbinenko <phcoder@gmail.com>.
5742 * (grub_vbe_set_video_mode): Fixed problem with text modes.
5744 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
5746 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
5747 /dev/md/NpN style mdraid devices.
5749 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
5751 * util/unifont2pff.rb: Remove.
5753 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
5755 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
5758 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
5760 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
5761 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5762 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5763 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5764 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5765 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5766 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5768 2009-02-02 Christian Franke <franke@computer.org>
5770 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
5772 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
5774 * INSTALL: Note that we now require at least autoconf 2.59 and
5775 that LZO is optional.
5777 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
5779 Base on patch on bug #24154 created by Tomas Tintera
5782 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
5784 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
5786 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
5787 <bero@arklinux.org>.
5789 * normal/parser.y (script_init): Add missing semicolon.
5791 2009-01-31 Colin D Bennett <colin@gibibit.com>
5793 * normal/main.c: Add include to grub/menu_viewer.h.
5794 (free_menu_entry_classes): Added.
5795 (grub_normal_menu_addentry): Added class property handling.
5796 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
5797 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
5799 * normal/menu_viewer.c: New file.
5801 * normal/menu.c (run_menu_entry): Renamed to ...
5802 (grub_menu_execute_entry): ... this and made it as global.
5803 (grub_menu_run): Renamed to ...
5804 (show_text_menu): ... this and made it local.
5805 (show_text_menu): Adapt to new function names.
5806 (grub_normal_terminal_menu_viewer): New global variable.
5808 * include/grub/menu.h: New file.
5810 * include/grub/menu_viewer.h: New file.
5812 * include/grub/normal.h: Added include to grub/menu.h.
5813 (grub_menu_entry): Moved to include/grub/menu.h.
5814 (grub_menu_entry_t): Likewise.
5815 (grub_menu): Likewise.
5816 (grub_menu_t): Likewise.
5817 (grub_normal_terminal_menu_viewer): Added.
5818 (grub_menu_execute_entry): Likewise.
5819 (grub_menu_run): Removed.
5821 * DISTLIST: Added include/grub/menu.h.
5822 Added include/grub/menu_viewer.h.
5823 Added normal/menu_viewer.c.
5825 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
5827 * normal/execute.c (grub_script_execute_menuentry): Changed to use
5828 arglist for menutitle arguments.
5830 * normal/main.c (grub_normal_menu_addentry): Likewise.
5832 * normal/parser.y (menuentry): Likewise.
5834 * normal/script.c (grub_script_create_cmdmenu): Likewise.
5836 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
5837 (grub_script_create_cmdmenu): Likewise.
5839 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
5841 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
5844 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
5846 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
5848 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
5850 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5852 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5854 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5856 2009-01-30 Christian Franke <franke@computer.org>
5858 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
5859 in option help text.
5861 2009-01-27 Pavel Roskin <proski@gnu.org>
5863 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
5865 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
5867 * commands/lsmmap.c: Add include to grub/machine/memory.h.
5869 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
5871 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
5872 unregister function.
5874 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
5876 * disk/scsi.c (grub_scsi_read): Fix sign problem.
5878 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
5880 * util/grub-mkfont.c (usage): Fix typo.
5882 * util/elf/grub-mkimage.c (load_modules): Fix warning.
5884 2009-01-26 Daniel Mierswa <impulze@impulze.org>
5886 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
5888 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
5890 * kern/misc.c (grub_strcasecmp): New function.
5891 (grub_strcasecmp): Use grub_size_t instead of int for length.
5893 * include/grub/misc.h: Update function prototypes.
5895 2009-01-26 Robert Millan <rmh@aybabtu.com>
5897 * configure.ac: Fix cross-compilation check.
5899 2009-01-22 Christian Franke <franke@computer.org>
5901 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
5902 (precision) digit string. Allow `.format2' without `format1' (width).
5903 Limit input chars for `%s' output to `format2' if specified. This is
5904 compatible with standard printf ().
5906 2009-01-22 Christian Franke <franke@computer.org>
5908 * disk/ata.c (grub_ata_wait_status): Replace by ...
5909 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
5910 other status bits may be invalid while BSY is asserted.
5911 (grub_ata_check_ready): New function.
5912 (grub_ata_cmd): Removed.
5913 (grub_ata_wait_drq): New function.
5914 (grub_ata_strncpy): Remove inline.
5915 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
5916 and error check now done by grub_ata_wait_drq ().
5917 (grub_ata_pio_write): Likewise.
5918 (grub_atapi_identify): Set DEV before check for !BSY. Use
5919 grub_ata_wait_drq () to wait for data.
5920 (grub_ata_device_initialize): Add status register check to
5921 detect missing SATA slave devices. Add debug messages.
5922 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
5923 (grub_atapi_packet): Set DEV before check for !BSY. Replace
5924 transfer loop by grub_ata_pio_write ().
5925 (grub_ata_identify): Set DEV before check for !BSY. Use
5926 grub_ata_wait_drq () to wait for data.
5927 (grub_ata_setaddress): Set DEV before check for !BSY.
5928 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
5929 read/write in one loop. Fix invalid command on write. Fix incomplete
5930 command on (size % batch) == 0. Add missing error check after write of
5931 last block. Add debug messages.
5932 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
5934 2009-01-19 Christian Franke <franke@computer.org>
5936 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
5937 (GRUB_ATAPI_IREASON_*): Likewise.
5938 (grub_ata_pio_write): Fix timeout error return.
5939 (grub_atapi_identify): Add grub_ata_wait () after cmd.
5940 (grub_atapi_wait_drq): New function.
5941 (grub_atapi_packet): New parameter `size'.
5942 Use grub_atapi_wait_drq () and direct write instead of
5943 grub_ata_pio_write ().
5944 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
5945 reads the number of bytes requested by the device for each DRQ
5947 (grub_atapi_write): Remove old implementation, return not
5948 implemented instead.
5950 2009-01-19 Christian Franke <franke@computer.org>
5952 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
5953 of 512 to calculate data size.
5954 (grub_scsi_read12): Likewise.
5955 (grub_scsi_write10): Likewise.
5956 (grub_scsi_write12): Likewise.
5957 (grub_scsi_read): Adjust size according to blocksize.
5958 Add checks for invalid blocksize and unaligned transfer.
5960 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
5962 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
5964 * term/gfxterm.c (write_char): Fix background rendering for wide
5967 2009-01-19 Robert Millan <rmh@aybabtu.com>
5969 * config.guess: Update to latest version from config git.
5970 * config.sub: Likewise.
5972 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
5974 * Makefile.in: Change font compilation to use new grub-mkfont instead
5977 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
5978 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5979 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5980 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5981 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5982 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5983 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5984 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5985 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5987 2009-01-16 Christian Franke <franke@computer.org>
5989 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
5990 (enum grub_ata_timeout_milliseconds): New enum.
5991 (grub_ata_wait_status): Add parameter milliseconds.
5992 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
5993 recovery from timed-out commands.
5994 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
5995 return grub_errno instead of REG_ERROR.
5996 (grub_ata_pio_write): Add parameter milliseconds.
5997 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
5998 Pass milliseconds to grub_ata_wait_status () and
5999 grub_ata_pio_read ().
6000 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
6001 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
6002 grub_ata_wait_status (). Fix IDENTIFY timeout check.
6003 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
6004 It is not suitable for device detection, because DEV bit is ignored,
6005 the command may run too long, and not all devices set the signature
6007 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
6008 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
6009 Fix device selection, DEV bit must be set first to address the registers
6010 of the correct device.
6011 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
6012 grub_ata_pio_read/write ().
6013 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
6014 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
6016 2009-01-13 Carles Pina i Estany <carles@pina.cat>
6018 * util/grub-editenv.c (main): Use fseeko(), not fseek().
6020 2009-01-13 Bean <bean123ch@gmail.com>
6022 * util/grub-mkfont.c (write_font): forget to remove some debug code.
6024 2009-01-13 Bean <bean123ch@gmail.com>
6026 * Makefile.in: (enable_grub_mkfont): New variable.
6027 (freetype_cflags): Likewise.
6028 (freetype_libs): Likewise.
6030 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
6031 (grub_mkfont_SOURCES): New variable.
6032 (grub_mkfont_CFLAGS): Likewise.
6033 (grub_mkfont_LDFLAGS): Likewise.
6035 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
6036 library if `--enable-grub-mkfont' is requested.
6037 (enable_grub_mkfont): New variable.
6038 (freetype_cflags): Likewise.
6039 (freetype_libs): Likewise.
6041 * util/grub-mkfont.c: New file.
6043 2009-01-12 Christian Franke <franke@computer.org>
6045 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
6046 mode check. Fix setting of compat_use[].
6048 2009-01-10 Robert Millan <rmh@aybabtu.com>
6050 Update a few copyright years which we forgot to do in 2008 (only for
6051 files whose changes made in 2008 were copyright-significant)
6053 * Makefile.in: Add 2008 to Copyright line.
6054 * disk/ieee1275/ofdisk.c: Likewise.
6055 * disk/efi/efidisk.c: Likewise.
6056 * kern/dl.c: Likewise.
6057 * kern/sparc64/ieee1275/init.c: Likewise.
6058 * kern/mm.c: Likewise.
6059 * kern/efi/mm.c: Likewise.
6060 * boot/i386/pc/boot.S: Likewise.
6061 * genfslist.sh: Likewise.
6062 * fs/iso9660.c: Likewise.
6063 * fs/hfs.c: Likewise.
6064 * fs/jfs.c: Likewise.
6065 * fs/minix.c: Likewise.
6066 * fs/ufs.c: Likewise.
6067 * gensymlist.sh.in: Likewise.
6068 * genkernsyms.sh.in: Likewise.
6069 * include/grub/misc.h: Likewise.
6070 * include/grub/types.h: Likewise.
6071 * include/grub/symbol.h: Likewise.
6072 * include/grub/elf.h: Likewise.
6073 * include/grub/kernel.h: Likewise.
6074 * include/grub/disk.h: Likewise.
6075 * include/grub/dl.h: Likewise.
6076 * include/grub/i386/linux.h: Likewise.
6077 * include/grub/i386/pc/biosdisk.h: Likewise.
6078 * include/grub/efi/api.h: Likewise.
6079 * include/grub/efi/pe32.h: Likewise.
6080 * include/grub/util/misc.h: Likewise.
6081 * normal/execute.c: Likewise.
6082 * normal/arg.c: Likewise.
6083 * normal/completion.c: Likewise.
6084 * normal/lexer.c: Likewise.
6085 * normal/parser.y: Likewise.
6086 * normal/misc.c: Likewise.
6087 * commands/i386/pc/vbeinfo.c: Likewise.
6088 * commands/hexdump.c: Likewise.
6089 * commands/terminal.c: Likewise.
6090 * commands/ls.c: Likewise.
6091 * commands/help.c: Likewise.
6092 * partmap/pc.c: Likewise.
6093 * loader/efi/chainloader.c: Likewise.
6094 * loader/multiboot_loader.c: Likewise.
6095 * loader/i386/pc/multiboot2.c: Likewise.
6096 * term/efi/console.c: Likewise.
6097 * term/i386/pc/serial.c: Likewise.
6098 * util/lvm.c: Likewise.
6099 * util/console.c: Likewise.
6100 * util/i386/efi/grub-mkimage.c: Likewise.
6101 * util/raid.c: Likewise.
6103 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
6105 * commands/videotest.c: Removed include to grub/machine/memory.h.
6107 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
6108 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
6109 (video_mod_SOURCES): Removed.
6110 (video_mod_CFLAGS): Likewise.
6111 (video_mod_LDFLAGS): Likewise.
6112 (gfxterm_mod_SOURCES): Likewise.
6113 (gfxterm_mod_CFLAGS): Likewise.
6114 (gfxterm_mod_LDFLAGS): Likewise.
6115 (videotest_mod_SOURCES): Likewise.
6116 (videotest_mod_CFLAGS): Likewise.
6117 (videotest_mod_LDFLAGS): Likewise.
6118 (bitmap_mod_SOURCES): Likewise.
6119 (bitmap_mod_CFLAGS): Likewise.
6120 (bitmap_mod_LDFLAGS): Likewise.
6121 (tga_mod_SOURCES): Likewise.
6122 (tga_mod_CFLAGS): Likewise.
6123 (tga_mod_LDFLAGS): Likewise.
6124 (jpeg_mod_SOURCES): Likewise.
6125 (jpeg_mod_CFLAGS): Likewise.
6126 (jpeg_mod_LDFLAGS): Likewise.
6127 (png_mod_SOURCES): Likewise.
6128 (png_mod_CFLAGS): Likewise.
6129 (png_mod_LDFLAGS): Likewise.
6131 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
6132 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
6133 (video_mod_SOURCES): Added.
6134 (video_mod_CFLAGS): Likewise.
6135 (video_mod_LDFLAGS): Likewise.
6136 (videotest_mod_SOURCES): Likewise.
6137 (videotest_mod_CFLAGS): Likewise.
6138 (videotest_mod_LDFLAGS): Likewise.
6139 (bitmap_mod_SOURCES): Likewise.
6140 (bitmap_mod_CFLAGS): Likewise.
6141 (bitmap_mod_LDFLAGS): Likewise.
6142 (tga_mod_SOURCES): Likewise.
6143 (tga_mod_CFLAGS): Likewise.
6144 (tga_mod_LDFLAGS): Likewise.
6145 (jpeg_mod_SOURCES): Likewise.
6146 (jpeg_mod_CFLAGS): Likewise.
6147 (jpeg_mod_LDFLAGS): Likewise.
6148 (png_mod_SOURCES): Likewise.
6149 (png_mod_CFLAGS): Likewise.
6150 (png_mod_LDFLAGS): Likewise.
6151 (gfxterm_mod_SOURCES): Likewise.
6152 (gfxterm_mod_CFLAGS): Likewise.
6153 (gfxterm_mod_LDFLAGS): Likewise.
6155 * term/gfxterm.c: Removed include to grub/machine/memory.h,
6156 grub/machine/console.h.
6158 2009-01-04 Jerone Young <jerone@gmail.com>
6160 Make on screen instructions clearer
6162 Based on patch created by Jidanni <jidanni@jidanni.org>
6164 * normal/menu.c: print clearer instructions on the screen
6166 2009-01-02 Colin D Bennett <colin@gibibit.com>
6170 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
6171 build system and fixed gfxterm.c to work with different sized fonts.
6173 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
6175 * configure: Re-generated.
6177 * DISTLIST: Removed font/manager.c.
6179 Added font/font_cmd.c.
6181 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
6184 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
6186 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
6188 * kern/term.c: Changed users of grub_utf8_to_ucs4.
6190 * normal/menu.c: Likewise.
6192 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
6193 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
6195 * include/grub/font.h: Replaced with new file.
6197 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
6198 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
6199 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
6200 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
6201 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
6202 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
6203 fg_red, fg_green, fg_blue, fg_alpha.
6204 (grub_video_adapter): Removed blit_glyph.
6205 (grub_video_blit_glyph): Removed.
6207 * font/manager.c: Removed file.
6209 * font/font.c: New file.
6211 * font/font_cmd.c: Likewise.
6213 * video/video.c (grub_video_blit_glyph): Removed.
6215 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
6216 (grub_video_vbe_map_rgba): Likewise.
6217 (grub_video_vbe_unmap_color_int): Likewise.
6218 (grub_video_vbe_blit_glyph): Removed.
6219 (grub_video_vbe_adapter): Removed blit_glyph.
6221 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
6222 (get_pixel): Likewise.
6223 (set_pixel): Likewise.
6225 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
6227 * term/gfxterm.c: Adapted to new font engine.
6229 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
6231 * term/i386/pc/vga.c: Likewise.
6233 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
6235 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
6237 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6239 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
6241 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
6243 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
6245 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
6247 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
6249 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
6251 * util/grub.d/00_header.in: Changed to use new loadfont command.
6253 * util/grub-mkconfig_lib.in: Changed font extension.
6255 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
6257 * util/getroot.c (grub_util_get_grub_dev): Add support for
6258 /dev/md/dNNpNN style partitionable mdraid devices.
6260 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
6262 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
6263 at a time limit of the PXE TFTP API correctly.
6264 (grub_pxefs_close): Likewise.
6266 2008-11-29 Robert Millan <rmh@aybabtu.com>
6268 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
6269 grub_ata_device_initialize() calls.
6271 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
6273 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
6275 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
6277 2008-11-28 Robert Millan <rmh@aybabtu.com>
6279 Fix build on powerpc-ieee1275. Based on patch created by
6280 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
6281 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6282 `kern/ieee1275/mmap.c'.
6283 * include/grub/powerpc/ieee1275/memory.h: New file.
6285 Provide grub-install on coreboot.
6286 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
6287 (grub_install_SOURCES): New variable.
6288 * util/i386/pc/grub-install.in: Add a few condition checks to make it
6291 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
6293 * util/grub-fstest.c (grub_term_get_current_input): Change return type
6294 to `grub_term_input_t'.
6295 (grub_term_get_current_output): Change return type to
6296 `grub_term_output_t'.
6298 2008-11-22 Robert Millan <rmh@aybabtu.com>
6300 Fix breakage on coreboot due to declaration mismatch.
6301 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
6302 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
6303 grub_vga_text_cls().
6305 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
6306 comments. Avoid copying one more byte than necessary (just in case).
6308 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
6309 to 0x200000 (avoids trouble with some OFW implementations, and matches
6310 with the one in Yaboot).
6311 Reported by Manoel Abranches
6313 2008-11-20 Robert Millan <rmh@aybabtu.com>
6315 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
6316 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
6318 * util/grub-mkconfig_lib.in (grub_warn): New function.
6319 (convert_system_path_to_grub_path): Use grub_warn() when issuing
6320 warnings, to obtain consistent formatting.
6321 * util/grub.d/00_header.in: Likewise.
6322 * util/update-grub_lib.in: Likewise.
6324 * loader/i386/linux.c (allocate_pages): Fix a warning.
6325 Move comment text to `#error' stanza.
6327 Harmonize ieee1275's grub_available_iterate() with the generic
6328 grub_machine_mmap_iterate() interface (fixes a recently-introduced
6329 build problem on i386-ieee1275):
6330 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
6331 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
6332 parameter `type'. Update all users of this function.
6333 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6334 `kern/ieee1275/mmap.c'.
6335 * kern/ieee1275/init.c
6336 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
6338 (grub_machine_mmap_iterate): ... this.
6339 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
6340 return type to `grub_err_t'. Update all implementations of this
6342 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
6345 Add `lsmmap' command (lists firmware-provided memory map):
6346 * commands/lsmmap.c: New file.
6347 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
6348 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
6350 * conf/powerpc-ieee1275.rmk: Likewise.
6351 * conf/i386-coreboot.rmk: Likewise.
6352 * conf/i386-ieee1275.rmk: Likewise.
6354 2008-11-19 Robert Millan <rmh@aybabtu.com>
6356 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
6357 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
6358 constraints to initrd allocation (based on code from
6359 loader/i386/pc/linux.c). Without them, initrd was allocated too high
6360 for Linux to find it.
6362 2008-11-14 Robert Millan <rmh@aybabtu.com>
6364 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
6365 order to cope with duplicate slashes.
6367 2008-11-14 Robert Millan <rmh@aybabtu.com>
6369 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
6370 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
6371 don't want to mess with lower memory, because it is used in the Linux
6374 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
6375 an appropriate place in lower memory, between 0x10000 and 0x90000,
6376 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
6377 is in our heap (probably as a result of it being corrupted during
6378 decompression). Add #error instance with comment to explain why this
6379 loader isn't currently usable on PC/BIOS.
6381 2008-11-14 Robert Millan <rmh@aybabtu.com>
6383 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
6384 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
6386 2008-11-12 Robert Millan <rmh@aybabtu.com>
6388 Make loader/i386/linux.c buildable on i386-pc (although disabled).
6390 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
6391 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
6393 * include/grub/i386/pc/memory.h: ... to here.
6395 2008-11-12 Robert Millan <rmh@aybabtu.com>
6397 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
6400 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
6401 (grub_console_cur_color, grub_console_real_putchar)
6402 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6403 (grub_console_setcolorstate, grub_console_setcolor)
6404 (grub_console_getcolor): Move from here ...
6405 * include/grub/i386/vga_common.h: ... to here (new file).
6407 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
6408 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
6410 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
6411 `<grub/i386/vga_common.h>'.
6413 2008-11-12 Robert Millan <rmh@aybabtu.com>
6415 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
6416 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
6417 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
6419 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6420 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
6422 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
6423 grub_console_init() with call to grub_vga_text_init().
6424 (grub_machine_fini): Replace call to
6425 grub_console_fini() with call to grub_vga_text_fini() and
6426 grub_at_keyboard_fini().
6428 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
6429 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
6430 (grub_console_setcolorstate, grub_console_setcolor)
6431 (grub_console_getcolor): New function prototypes.
6433 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
6434 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
6435 (grub_vga_text_setcursor): Static-ize.
6436 (grub_vga_text_term): New structure.
6437 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
6439 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
6440 (grub_console_cur_color, grub_console_standard_color)
6441 (grub_console_normal_color, grub_console_highlight_color)
6442 (map_char, grub_console_putchar, grub_console_getcharwidth)
6443 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
6444 (grub_console_getcolor): Move from here ...
6445 * term/i386/vga_common.c: ... to here (same function names).
6447 2008-11-12 Robert Millan <rmh@aybabtu.com>
6449 Use newly-added Multiboot support in coreboot.
6451 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
6452 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
6454 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
6455 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
6456 (codestart): Store the MBI in `startup_multiboot_info' when we're
6457 being loaded using Multiboot.
6459 * kern/i386/coreboot/init.c (grub_machine_init): Move
6460 grub_at_keyboard_init() call to beginning of function (useful for
6461 debugging). Call grub_machine_mmap_init() before attempting to use
6462 grub_machine_mmap_iterate().
6463 (grub_lower_mem, grub_upper_mem): Move from here ...
6464 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
6467 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
6470 2008-11-12 Robert Millan <rmh@aybabtu.com>
6472 Fix a regression introduced by the at_keyboard.mod split. Because
6473 some terminals are default on some platforms and non-default on
6474 others, the first terminal being registered determines which is
6475 going to be default.
6477 * kern/term.c (grub_term_register_input): If this is the first
6478 terminal being registered, set it as the current one.
6479 (grub_term_register_output): Likewise.
6481 * term/efi/console.c (grub_console_init): Do not call
6482 grub_term_set_current_output() or grub_term_set_current_input().
6483 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
6484 * term/i386/pc/console.c (grub_console_init): Likewise.
6485 (grub_console_fini): Do not call grub_term_set_current_input()
6486 (but leave grub_term_set_current_output() to restore text mode).
6488 2008-11-10 Robert Millan <rmh@aybabtu.com>
6490 * util/grub.d/00_header.in: Add backward compatibility check for
6491 versions of terminal.mod that don't understand `terminal_input' or
6494 2008-11-09 Robert Millan <rmh@aybabtu.com>
6496 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
6497 `terminal_input' / `terminal_output', not `terminal'.
6499 2008-11-08 Robert Millan <rmh@aybabtu.com>
6501 * Makefile.in (include_DATA): Fix srcdir=. assumption.
6502 (DISTCLEANFILES): Add `build_env.mk'.
6504 2008-11-08 Robert Millan <rmh@aybabtu.com>
6506 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
6507 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
6508 members. Update all users.
6509 * util/console.c (grub_ncurses_term): Split in ...
6510 (grub_ncurses_term_input): ... this, and ...
6511 (grub_ncurses_term_output): ... this. Update all users.
6512 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
6514 2008-11-08 Robert Millan <rmh@aybabtu.com>
6516 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
6517 (PKGDATA): Add $(pkgdata_SRCDIR).
6518 (pkglib_BUILDDIR): New variable.
6519 (pkgdata_SRCDIR): New variable.
6520 (build_env.mk): New target.
6521 (include_DATA): New variable.
6522 (install-local): Install $(include_DATA) files in $(includedir).
6524 2008-11-07 Pavel Roskin <proski@gnu.org>
6526 * gendistlist.sh: Use C locale for sorting to ensure consistent
6527 output on all systems.
6529 * util/grub.d/00_header.in: Remove incorrect space before
6532 2008-11-07 Robert Millan <rmh@aybabtu.com>
6534 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
6536 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
6537 * loader/multiboot_loader.c (find_multi_boot2_header): New function
6538 (based on find_multi_boot1_header).
6539 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
6540 using find_multi_boot2_header(), and abort if neither Multiboot or
6541 Multiboot headers were found.
6543 2008-11-07 Robert Millan <rmh@aybabtu.com>
6545 Modularize at_keyboard.mod:
6547 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
6548 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
6549 (at_keyboard_mod_LDFLAGS): New variables.
6551 Actual terminal split:
6553 * include/grub/term.h (struct grub_term): Split in ...
6554 (struct grub_term_input): ... this, and ...
6555 (struct grub_term_output): ... this. Update all users.
6556 (grub_term_set_current): Split in ...
6557 (grub_term_set_current_input): ... this, and ...
6558 (grub_term_set_current_output): ... this.
6559 (grub_term_get_current): Split in ...
6560 (grub_term_get_current_input): ... this, and ...
6561 (grub_term_get_current_output): ... this.
6562 (grub_term_register): Split in ...
6563 (grub_term_register_input): ... this, and ...
6564 (grub_term_register_output): ... this.
6565 (grub_term_unregister): Split in ...
6566 (grub_term_unregister_input): ... this, and ...
6567 (grub_term_unregister_output): ... this.
6568 (grub_term_iterate): Split in ...
6569 (grub_term_iterate_input): ... this, and ...
6570 (grub_term_iterate_output): ... this.
6572 * kern/term.c (grub_term_list): Split in ...
6573 (grub_term_list_input): ... this, and ...
6574 (grub_term_list_output): ... this. Update all users.
6575 (grub_cur_term): Split in ...
6576 (grub_cur_term_input): ... this, and ...
6577 (grub_cur_term_output): ... this. Update all users.
6578 (grub_term_set_current): Split in ...
6579 (grub_term_set_current_input): ... this, and ...
6580 (grub_term_set_current_output): ... this.
6581 (grub_term_get_current): Split in ...
6582 (grub_term_get_current_input): ... this, and ...
6583 (grub_term_get_current_output): ... this.
6584 (grub_term_register): Split in ...
6585 (grub_term_register_input): ... this, and ...
6586 (grub_term_register_output): ... this.
6587 (grub_term_unregister): Split in ...
6588 (grub_term_unregister_input): ... this, and ...
6589 (grub_term_unregister_output): ... this.
6590 (grub_term_iterate): Split in ...
6591 (grub_term_iterate_input): ... this, and ...
6592 (grub_term_iterate_output): ... this.
6594 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
6595 a check for input and one for output (and only attempt to get keys
6596 from user when input works).
6598 * util/grub-probe.c (grub_term_get_current): Split in ...
6599 (grub_term_get_current_input): ... this, and ...
6600 (grub_term_get_current_output): ... this.
6601 * util/grub-fstest.c: Likewise.
6602 * util/i386/pc/grub-setup.c: Likewise.
6603 * util/grub-editenv.c: Likewise.
6605 Portability adjustments:
6607 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
6608 `term/i386/pc/at_keyboard.c'.
6609 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
6610 grub_keyboard_controller_init() (now handled by terminal .init).
6611 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
6612 grub_at_keyboard_init().
6613 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
6614 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
6615 at_keyboard.mod via input terminal interface).
6616 * include/grub/i386/coreboot/console.h: Convert into a stub for
6617 `<grub/i386/pc/console.h>'.
6619 Migrate full terminals to new API:
6621 * term/efi/console.c (grub_console_term): Split into ...
6622 (grub_console_term_input): ... this, and ...
6623 (grub_console_term_output): ... this. Update all users.
6624 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
6625 (grub_ofconsole_init): Split into ...
6626 (grub_ofconsole_init_input): ... this, and ...
6627 (grub_ofconsole_init_output): ... this.
6628 (grub_ofconsole_term): Split into ...
6629 (grub_ofconsole_term_input): ... this, and ...
6630 (grub_ofconsole_term_output): ... this. Update all users.
6631 * term/i386/pc/serial.c (grub_serial_term): Split into ...
6632 (grub_serial_term_input): ... this, and ...
6633 (grub_serial_term_output): ... this. Update all users.
6634 * term/i386/pc/console.c (grub_console_term): Split into ...
6635 (grub_console_term_input): ... this, and ...
6636 (grub_console_term_output): ... this. Update all users.
6637 (grub_console_term_input): Only enable it on PC/BIOS platform.
6638 (grub_console_init): Remove grub_keyboard_controller_init() call.
6640 Migrate input terminals to new API:
6642 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
6643 `i386' and `i386/pc' to enable build on x86_64 (this driver is
6644 i386-specific anyway).
6645 (grub_console_checkkey): Rename to ...
6646 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
6648 (grub_keyboard_controller_orig): New variable.
6649 (grub_console_getkey): Rename to ...
6650 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
6652 (grub_keyboard_controller_init): Static-ize. Save original
6653 controller value so that it can be restored ...
6654 (grub_keyboard_controller_fini): ... here (new function).
6655 (grub_at_keyboard_term): New structure.
6656 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
6659 Migrate output terminals to new API:
6661 * term/i386/pc/vga.c (grub_vga_term): Change type to
6662 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
6663 members. Update all users.
6664 * term/gfxterm.c (grub_video_term): Change type to
6665 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
6666 members. Update all users.
6667 * include/grub/i386/pc/console.h (grub_console_checkkey)
6668 (grub_console_getkey): Do not export (no longer needed by gfxterm,
6671 Migrate `terminal' command and userland tools to new API:
6673 * commands/terminal.c (grub_cmd_terminal): Split into ...
6674 (grub_cmd_terminal_input): ... this, and ...
6675 (grub_cmd_terminal_output): ... this.
6676 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
6677 `terminal_input' and `terminal_output'.
6678 * util/grub.d/00_header.in: Adjust `terminal' calls to new
6679 `terminal_input' / `terminal_output' API.
6680 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
6681 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
6682 provided ${GRUB_TERMINAL}, convert it).
6684 2008-11-04 Robert Millan <rmh@aybabtu.com>
6686 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
6688 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
6690 2008-11-03 Bean <bean123ch@gmail.com>
6692 * kern/elf.c (grub_elf32_load): Revert to previous code.
6693 (grub_elf64_load): Likewise.
6695 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
6697 2008-11-01 Robert Millan <rmh@aybabtu.com>
6699 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
6700 (TARGET_CPPFLAGS): Likewise.
6701 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
6703 2008-11-01 Carles Pina i Estany <carles@pina.cat>
6705 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
6707 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
6709 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
6710 addition of objects until the code is not going to be able to fail.
6712 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
6714 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
6715 (add a missing NULL check, and correct them by moving the pointer
6716 operations after the actual check).
6718 2008-10-29 Robert Millan <rmh@aybabtu.com>
6720 * util/i386/pc/grub-install.in: Handle empty string as output from
6721 make_system_path_relative_to_its_root().
6723 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
6725 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
6726 circular metadata worst case scenario. If the metadata is circular
6727 then copy the wrap in place.
6728 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
6729 project lib/format_text/layout.h
6730 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
6732 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
6734 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
6736 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
6738 * util/update-grub_lib.in: Mention filename in warning message.
6740 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
6742 * NEWS: Update for rename of update-grub to grub-mkconfig.
6744 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
6746 * util/update-grub_lib.in: Copy to ...
6747 * util/grub-mkconfig_lib.in: ... this. Update all users.
6748 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
6749 * util/update-grub.in: Rename to ...
6750 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
6751 option. Add `--output' option to allow users to specify the generated
6752 configuration file. Default to stdout.
6753 (update_grub_dir): Rename to ...
6754 (grub_mkconfig_dir): ... this.
6755 (grub_cfg): Default to an empty string.
6756 * conf/common.rmk (update-grub): Rename to ...
6757 (grub-mkconfig): ... this.
6758 (update-grub_lib): Copy to ...
6759 (grub-mkconfig_lib): ... this.
6760 (update-grub_SCRIPTS): Copy to ...
6761 (grub-mkconfig_SCRIPTS): ... this. Update all users.
6762 (update-grub_DATA): Rename to ...
6763 (grub-mkconfig_DATA): ... this.
6765 2008-09-28 Robert Millan <rmh@aybabtu.com>
6767 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
6768 to `modified'. Add the real `created' field.
6769 (grub_iso9660_uuid): Use `modified' rather than `created' for
6770 constructing the UUID.
6772 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
6774 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
6775 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
6777 2008-09-28 Bean <bean123ch@gmail.com>
6779 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
6780 Thanks to Christian Franke for finding this bug.
6782 2008-09-25 Robert Millan <rmh@aybabtu.com>
6784 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
6785 instances of grub_util_get_disk_name() (see previous commit).
6787 2008-09-25 Robert Millan <rmh@aybabtu.com>
6789 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
6790 `util/i386/get_disk_name.c'.
6791 * conf/i386-efi.rmk: Likewise.
6792 * conf/x86_64-efi.rmk: Likewise.
6793 * conf/i386-coreboot.rmk: Likewise.
6794 * conf/i386-ieee1275.rmk: Likewise.
6795 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
6796 `util/ieee1275/get_disk_name.c'.
6797 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
6798 * util/ieee1275/get_disk_name.c: Remove file.
6799 * util/i386/get_disk_name.c: Remove file.
6800 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
6801 "hd%d" for device.map entries, rather than using
6802 grub_util_get_disk_name().
6804 2008-09-24 Carles Pina i Estany <carles@pina.cat>
6806 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
6808 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
6810 2008-09-24 Carles Pina i Estany <carles@pina.cat>
6812 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
6814 (GRUB_TERM_PPAGE): Changed to 0x4900.
6816 2008-09-24 Robert Millan <rmh@aybabtu.com>
6818 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
6819 macros (they were i386-pc specific).
6820 * include/grub/sparc64/ieee1275/console.h: Likewise.
6821 * include/grub/efi/console.h: Likewise.
6823 2008-09-22 Bean <bean123ch@gmail.com>
6825 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
6826 resident and in attribute list.
6828 * include/grub/ntfs.h (BMP_LEN): Removed.
6830 2008-09-22 Bean <bean123ch@gmail.com>
6832 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
6833 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
6835 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
6836 error occurs, as grub_disk_open will call grub_disk_close, which will
6837 call p->close (scsi).
6839 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
6841 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
6842 (AC_PREREQ): Bumped to 2.59.
6843 (AC_TRY_COMPILE): Replace obsolete macro with ...
6844 (AC_COMPILE_IFELSE): ... this.
6845 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
6846 (AC_LINK_IFELSE): ... this.
6848 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
6850 * autogen.sh: Add a call to `gendistlist.sh'.
6852 2008-09-19 Christian Franke <franke@computer.org>
6854 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
6855 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
6856 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
6857 Export __enable_execute_stack() to modules.
6858 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
6861 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
6863 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
6866 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
6868 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
6869 #include <grub/util/hostdisk.h>.
6871 2008-09-08 Robert Millan <rmh@aybabtu.com>
6873 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
6874 segments when their filesz is zero (grub_file_read() interprets
6875 zero-size as "read until EOF", which results in memory corruption).
6876 Use `lowest_segment' rather than 0 for calculating the current
6877 segment load address.
6879 2008-09-08 Robert Millan <rmh@aybabtu.com>
6881 * util/hostdisk.c (open_device): Replace a grub_util_info() call
6882 with grub_dprintf("hostdisk", ...), as it was so verbose that it
6883 clobbered useful information.
6885 2008-09-08 Robert Millan <rmh@aybabtu.com>
6887 * include/grub/util/biosdisk.h: Move to ...
6888 * include/grub/util/hostdisk.h: ... here. Update all users.
6889 * util/biosdisk.c: Move to ...
6890 * util/hostdisk.c: ... here. Update all users.
6892 2008-09-07 Robert Millan <rmh@aybabtu.com>
6894 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
6896 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
6897 and length can be stored directly in the `mbi->mmap_addr' and
6898 `mbi->mmap_length' struct fields.
6900 2008-09-07 Robert Millan <rmh@aybabtu.com>
6902 * conf/i386.rmk: New file. Provides declaration for building
6904 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
6905 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
6907 Include `conf/i386.mk'.
6908 * conf/i386-efi.rmk: Likewise.
6909 * conf/x86_64-efi.rmk: Likewise.
6910 * conf/i386-coreboot.rmk: Likewise.
6911 * conf/i386-ieee1275.rmk: Likewise.
6913 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
6915 Based on patch created by Colin D Bennett <colin@gibibit.com>.
6916 Adds optimization support for BGR based modes.
6918 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
6919 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6920 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6921 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6922 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6923 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6924 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6925 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6926 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6927 (grub_video_i386_vbeblit_index_index): Likewise.
6928 (grub_video_i386_vbeblit_replace_directN): Added.
6929 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6930 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6931 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6932 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6933 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6934 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6935 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6936 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6937 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6938 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6939 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6940 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6941 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6943 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
6944 (grub_video_i386_vbefill_R8G8B8): Likewise.
6945 (grub_video_i386_vbefill_index): Likewise.
6946 (grub_video_i386_vbefill_direct32): Added.
6947 (grub_video_i386_vbefill_direct24): Likewise.
6948 (grub_video_i386_vbefill_direct16): Likewise.
6949 (grub_video_i386_vbefill_direct8): Likewise.
6951 * include/grub/video.h (grub_video_blit_format): Removed
6952 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
6953 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
6954 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
6955 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
6956 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
6958 * video/video.c (grub_video_get_blit_format): Updated to use new
6959 blit formats. Added handling for 16 bit color modes.
6961 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
6963 (common_blitter): Updated to use new blitters.
6965 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
6967 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6968 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6969 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6970 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6971 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6972 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6973 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6974 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6975 (grub_video_i386_vbeblit_index_index): Likewise.
6976 (grub_video_i386_vbeblit_replace_directN): Added.
6977 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6978 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6979 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6980 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6981 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6982 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6983 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6984 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6985 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6986 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6987 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6988 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6989 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6991 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
6992 (grub_video_i386_vbefill_R8G8B8): Likewise.
6993 (grub_video_i386_vbefill_index): Likewise.
6994 (grub_video_i386_vbefill_direct32): Added.
6995 (grub_video_i386_vbefill_direct24): Likewise.
6996 (grub_video_i386_vbefill_direct16): Likewise.
6997 (grub_video_i386_vbefill_direct8): Likewise.
6999 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
7002 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
7005 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
7008 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
7011 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
7013 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
7016 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
7018 * fs/iso9660.c (grub_iso9660_date): New structure.
7019 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
7020 (grub_iso9660_uuid): New function.
7022 2008-09-05 Bean <bean123ch@gmail.com>
7024 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
7026 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
7027 insensitive bit for names in Win32 and Win32 & DOS namespace.
7029 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
7031 * include/grub/types.h (LONG_MAX): Likewise.
7033 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
7035 * util/getroot.c: Include <config.h>.
7036 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
7037 add support for /dev/md/N devices and handle LVM double dash escaping.
7039 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
7041 * config.guess: Update to latest version from config git.
7042 * config.sub: Likewise.
7044 2008-09-03 Robert Millan <rmh@aybabtu.com>
7046 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
7047 `disk->total_sectors'.
7049 2008-09-01 Colin D Bennett <colin@gibibit.com>
7051 * include/grub/normal.h: Fixed incorrect comment for
7052 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
7054 2008-09-01 Colin D Bennett <colin@gibibit.com>
7056 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
7057 values with defines.
7059 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
7060 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
7061 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
7062 (GRUB_VBE_MODEATTR_COLOR): Likewise.
7063 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
7064 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
7065 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
7066 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
7067 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
7068 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
7069 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
7070 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
7071 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
7072 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
7073 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
7074 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
7075 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
7076 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
7077 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
7079 2008-08-31 Robert Millan <rmh@aybabtu.com>
7081 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
7083 (grub_multiboot): Fix a few warnings.
7085 2008-08-31 Robert Millan <rmh@aybabtu.com>
7087 * loader/i386/pc/multiboot.c: Update comment not to say that
7088 boot_device support is unimplemented.
7090 2008-08-31 Robert Millan <rmh@aybabtu.com>
7092 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
7093 or memory map support are unimplemented.
7095 2008-08-31 Colin D Bennett <colin@gibibit.com>
7097 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
7099 2008-08-31 Colin D Bennett <colin@gibibit.com>
7101 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
7102 total video memory in 'vbeinfo' output; show color format details for
7105 2008-08-30 Pavel Roskin <proski@gnu.org>
7107 * util/genmoddep.c: Remove for real this time.
7108 * DISTLIST: Remove util/genmoddep.c.
7110 2008-08-30 Robert Millan <rmh@aybabtu.com>
7112 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
7113 as required by Multiboot spec (it was already 4-byte aligned, but
7116 2008-08-29 Pavel Roskin <proski@gnu.org>
7118 * kern/powerpc/ieee1275/crt0.S: Rename to ...
7119 * kern/powerpc/ieee1275/startup.S: ... this.
7120 * conf/powerpc-ieee1275.rmk: Adjust for the above.
7121 * DISTLIST: Likewise.
7123 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
7124 grub/cpu/kernel.h. Add start label for consistency with other
7125 platforms. Add grub_prefix immediately after start. Add jump
7126 to the code after grub_prefix.
7127 * include/grub/powerpc/kernel.h: Provide valid values for
7128 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
7130 2008-08-29 Bean <bean123ch@gmail.com>
7132 * configure.ac: Change host_os to cygwin for mingw.
7133 (asprintf): New check for function.
7135 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
7136 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
7138 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
7139 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
7140 sync, sleep and grub_util_get_disk_size for mingw.
7142 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
7143 to get size in mingw.
7144 (open_device): Use flag O_BINARY if it's defined.
7145 (find_root_device): Add dummy code for mingw.
7147 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
7148 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
7149 (get_scsi_disk_name): Return 0 for mingw.
7151 * util/hostfs.c: #include <grub/util/misc.h>.
7152 (grub_hostfs_open): Use "rb" flag to open file, use
7153 grub_util_get_disk_size to get disk size for mingw.
7155 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
7156 (asprintf): New function if HAVE_ASPRINTF is not set.
7157 (sync): New function for mingw.
7159 (grub_util_get_disk_size): Likewise.
7161 2008-08-28 Pavel Roskin <proski@gnu.org>
7163 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7166 2008-08-28 Robert Millan <rmh@aybabtu.com>
7168 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
7170 2008-08-28 Robert Millan <rmh@aybabtu.com>
7172 Change find_grub_drive() syntax so it doesn't prevent it from
7173 detecting NULL names as errors.
7175 * util/biosdisk.c (find_grub_drive): Move free slot search code
7177 (find_free_slot): ... to here.
7178 (read_device_map): Use find_free_slot() to search for free slots.
7180 2008-08-27 Marco Gerards <marco@gnu.org>
7182 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
7183 (scsi_mod_SOURCES): New variable.
7184 (scsi_mod_CFLAGS): Likewise
7185 (scsi_mod_LDFLAGS): Likewise.
7187 * disk/scsi.c: New file.
7189 * include/grub/scsi.h: Likewise.
7191 * include/grub/scsicmd.h: Likewise.
7193 * disk/ata.c: Include <grub/scsi.h>.
7194 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
7196 (grub_ata_iterate): Skip ATAPI devices.
7197 (grub_ata_open): Only handle ATAPI devices.
7198 (struct grub_atapi_read): Removed.
7199 (grub_atapi_readsector): Likewise.
7200 (grub_ata_read): No longer handle ATAPI devices.
7201 (grub_ata_write): Likewise.
7202 (grub_atapi_iterate): New function.
7203 (grub_atapi_read): Likewise.
7204 (grub_atapi_write): Likewise.
7205 (grub_atapi_open): Likewise.
7206 (grub_atapi_close): Likewise.
7207 (grub_atapi_dev): New variable.
7208 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
7209 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
7211 * include/grub/disk.h (enum grub_disk_dev_id): Add
7212 `GRUB_DISK_DEVICE_SCSI_ID'.
7214 2008-08-26 Robert Millan <rmh@aybabtu.com>
7216 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
7217 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
7220 2008-08-23 Bean <bean123ch@gmail.com>
7222 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
7223 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
7224 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
7225 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
7227 (raid5rec_mod_SOURCES): New macro.
7228 (raid5rec_mod_CFLAGS): Likewise.
7229 (raid5rec_mod_LDFLAGS): Likewise.
7230 (raid6rec_mod_SOURCES): Likewise.
7231 (raid6rec_mod_CFLAGS): Likewise.
7232 (raid6rec_mod_LDFLAGS): Likewise.
7233 (mdraid_mod_SOURCES): Likewise.
7234 (mdraid_mod_CFLAGS): Likewise.
7235 (mdraid_mod_LDFLAGS): Likewise.
7236 (dm_nv_mod_SOURCES): Likewise.
7237 (dm_nv_mod_CFLAGS): Likewise.
7238 (dm_nv_mod_LDFLAGS): Likewise.
7240 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
7241 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
7242 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7244 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
7245 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
7247 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7249 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7251 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7253 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7255 * disk/raid5_recover.c: New file.
7257 * disk/raid6_recover.c: Likewise.
7259 * disk/mdraid_linux.c: Likewise.
7261 * disk/dmraid_nvidia.c: Likewise.
7263 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
7266 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
7267 calculate the size of raid device.
7268 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
7269 different layout of raid5.
7270 (grub_raid_scan_device): Remove code specific to mdraid.
7271 (grub_raid_list): New variable.
7272 (free_array): New function.
7273 (grub_raid_register): Likewise.
7274 (grub_raid_unregister): Likewise.
7275 (grub_raid_rescan): Likewise.
7276 (GRUB_MOD_INIT): Don't iterate device here.
7277 (GRUB_MOD_FINI): Use free_array to release resource.
7279 * include/grub/raid.h: Remove macro and structure specific to mdraid.
7280 (grub_raid5_recover_func_t): New function variable type.
7281 (grub_raid6_recover_func_t): Likewise.
7282 (grub_raid5_recover_func): New variable.
7283 (grub_raid6_recover_func): Likewise.
7284 (grub_raid_register): New function.
7285 (grub_raid_unregister): Likewise.
7286 (grub_raid_rescan): Likewise.
7287 (grub_raid_block_xor): Likewise.
7289 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
7290 (CMD_CRC): New macro.
7292 (read_file): Handle device as well as file.
7293 (cmd_crc): New function.
7294 (fstest): Handle multiple disks.
7295 (options): Remove part, raw and long, add root and diskcount.
7296 (usage): Add crc, remove -p, -r, -l, add -r and -c.
7297 (main): Find the first non option entry and ignore subsequent options,
7298 add handling for the new options, support multiple disks.
7300 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
7302 2008-08-23 Bean <bean123ch@gmail.com>
7304 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
7306 * genfslist.sh: Ignore kernel.mod.
7308 * genpartmaplist.sh: Likewise.
7310 2008-08-23 Robert Millan <rmh@aybabtu.com>
7312 * util/getroot.c (find_root_device): Skip anything that starts with
7313 a dot, not just directories. This avoids things like /dev/.tmp.md0.
7315 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
7317 * util/update-grub.in (GRUB_GFXMODE): Export variable.
7318 * util/grub.d/00_header.in: Allow the administrator to change default
7319 gfxmode via ${GRUB_GFXMODE}.
7321 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
7323 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
7325 2008-08-21 Robert Millan <rmh@aybabtu.com>
7327 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
7329 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
7330 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
7332 2008-08-20 Carles Pina i Estany <carles@pina.cat>
7334 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
7335 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
7337 2008-08-19 Robert Millan <rmh@aybabtu.com>
7339 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
7340 (struct grub_virtual_screen): Remove `cursor_color'.
7341 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
7343 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
7345 2008-08-18 Robert Millan <rmh@aybabtu.com>
7347 Unify (identical) linux_normal.c files.
7348 * loader/i386/efi/linux_normal.c: Move from here ...
7349 * loader/linux_normal.c: ... to here. Update all users.
7350 * loader/i386/pc/linux_normal.c: Delete. Update all users.
7351 * loader/i386/ieee1275/linux_normal.c: Likewise.
7353 2008-08-18 Robert Millan <rmh@aybabtu.com>
7355 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
7356 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
7357 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
7358 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
7359 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
7361 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
7362 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
7363 (GRUB_LINUX_CL_END_OFFSET): ... to here.
7364 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
7365 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
7366 (GRUB_EFI_CL_END_OFFSET): Rename to ...
7367 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
7368 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
7369 Initialize `params->video_cursor_x' and `params->video_cursor_y'
7370 portably using grub_getxy().
7371 Replace `-EFI' with `-bzImage' in boot message.
7373 2008-08-17 Robert Millan <rmh@aybabtu.com>
7375 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
7377 2008-08-17 Robert Millan <rmh@aybabtu.com>
7379 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
7381 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
7382 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
7383 (grub_machine_mmap_iterate): New function declaration.
7384 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
7386 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
7389 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
7390 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
7391 Move e820 parsing from here ...
7392 * kern/i386/pc/mmap.c: New file.
7393 (grub_machine_mmap_iterate): ... to here.
7395 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
7396 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
7397 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
7398 (grub_available_iterate): Redeclare to return `void', and redeclare
7399 its hook to use grub_uint64_t as addr and size parameters, and rename
7401 (grub_machine_mmap_iterate): ... this. Update all users.
7403 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
7404 to make it more readable. Rename to ...
7405 (grub_machine_mmap_iterate): ... this.
7407 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
7408 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
7409 (grub_multiboot): Allocate an extra region after the payload, and fill
7410 it with a Multiboot memory map. Adjust a.out loader to calculate size
7411 with the extra space.
7412 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
7413 with the extra space.
7415 2008-08-17 Carles Pina i Estany <carles@pina.cat>
7417 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
7419 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
7421 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
7422 mdate-sh to the list `find' searches for.
7423 * DISTLIST: Regenerated.
7425 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
7427 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
7428 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
7429 genmoddep.awk, gensymlist.sh.in.
7430 (DISTDIRS): Add bus, docs, hook, lib.
7431 * DISTLIST: Regenerated.
7432 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
7434 2008-08-16 Robert Millan <rmh@aybabtu.com>
7436 * disk/raid.c (grub_raid_init): Handle/report errors set by
7437 grub_device_iterate().
7438 * disk/lvm.c (grub_lvm_init): Likewise.
7440 2008-08-15 Bean <bean123ch@gmail.com>
7442 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7444 (datetime_mod_SOURCES): New macro.
7445 (datetime_mod_CFLAGS): Likewise.
7446 (datetime_mod_LDFLAGS): Likewise.
7447 (date_mod_SOURCES): Likewise.
7448 (date_mod_CFLAGS): Likewise.
7449 (date_mod_LDFLAGS): Likewise.
7450 (datehook_mod_SOURCES): Likewise.
7451 (datehook_mod_CFLAGS): Likewise.
7452 (datehook_mod_LDFLAGS): Likewise.
7454 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7456 (datetime_mod_SOURCES): New macro.
7457 (datetime_mod_CFLAGS): Likewise.
7458 (datetime_mod_LDFLAGS): Likewise.
7459 (date_mod_SOURCES): Likewise.
7460 (date_mod_CFLAGS): Likewise.
7461 (date_mod_LDFLAGS): Likewise.
7462 (datehook_mod_SOURCES): Likewise.
7463 (datehook_mod_CFLAGS): Likewise.
7464 (datehook_mod_LDFLAGS): Likewise.
7466 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7468 (datetime_mod_SOURCES): New macro.
7469 (datetime_mod_CFLAGS): Likewise.
7470 (datetime_mod_LDFLAGS): Likewise.
7471 (date_mod_SOURCES): Likewise.
7472 (date_mod_CFLAGS): Likewise.
7473 (date_mod_LDFLAGS): Likewise.
7474 (datehook_mod_SOURCES): Likewise.
7475 (datehook_mod_CFLAGS): Likewise.
7476 (datehook_mod_LDFLAGS): Likewise.
7478 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7480 (datetime_mod_SOURCES): New macro.
7481 (datetime_mod_CFLAGS): Likewise.
7482 (datetime_mod_LDFLAGS): Likewise.
7483 (date_mod_SOURCES): Likewise.
7484 (date_mod_CFLAGS): Likewise.
7485 (date_mod_LDFLAGS): Likewise.
7486 (datehook_mod_SOURCES): Likewise.
7487 (datehook_mod_CFLAGS): Likewise.
7488 (datehook_mod_LDFLAGS): Likewise.
7490 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
7492 (datetime_mod_SOURCES): New macro.
7493 (datetime_mod_CFLAGS): Likewise.
7494 (datetime_mod_LDFLAGS): Likewise.
7495 (date_mod_SOURCES): Likewise.
7496 (date_mod_CFLAGS): Likewise.
7497 (date_mod_LDFLAGS): Likewise.
7498 (datehook_mod_SOURCES): Likewise.
7499 (datehook_mod_CFLAGS): Likewise.
7500 (datehook_mod_LDFLAGS): Likewise.
7502 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
7504 * commands/date.c: New file.
7506 * hook/datehook.c: Likewise.
7508 * include/grub/lib/datetime.h: Likewise.
7510 * include/grub/i386/cmos.h: Likewise.
7512 * lib/datetime.c: Likewise.
7514 * lib/i386/datetime.c: Likewise.
7516 * lib/efi/datetime.c: Likewise.
7518 2008-08-14 Robert Millan <rmh@aybabtu.com>
7520 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
7521 (grub_mkelfimage_SOURCES): New variable.
7522 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
7524 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
7525 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
7526 * conf/powerpc-ieee1275.rmk: Likewise.
7527 * conf/i386-ieee1275.rmk: Likewise.
7529 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
7530 * kern/i386/coreboot/init.c: Likewise.
7532 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
7533 with `<grub/cpu/kernel.h>'.
7534 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
7536 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
7537 * kern/i386/coreboot/startup.S: Likewise.
7539 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
7540 (GRUB_MOD_GAP): Remove.
7541 * include/grub/powerpc/kernel.h: New file.
7542 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
7543 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7544 * include/grub/i386/kernel.h: New file.
7545 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
7546 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
7547 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
7549 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
7551 Use --directory when invoking grub_mkimage.
7553 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
7554 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
7555 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
7556 and GRUB_KERNEL_CPU_PREFIX.
7558 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
7560 * include/grub/err.h (grub_err_printf): New function prototype.
7561 * util/misc.c (grub_err_printf): New function.
7562 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
7564 * kern/err.c (grub_print_error): Use grub_err_printf.
7566 2008-08-13 Robert Millan <rmh@aybabtu.com>
7568 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
7570 2008-08-13 Robert Millan <rmh@aybabtu.com>
7572 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
7575 2008-08-12 Robert Millan <rmh@aybabtu.com>
7577 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
7578 of the relocation code from here ...
7579 (grub_multiboot): ... to here.
7580 (forward_relocator, backward_relocator): Move from here ...
7581 * kern/i386/loader.S (grub_multiboot_forward_relocator)
7582 (grub_multiboot_backward_relocator): ... to here.
7583 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
7584 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
7585 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
7586 (grub_multiboot_forward_relocator_end)
7587 (grub_multiboot_backward_relocator)
7588 (grub_multiboot_backward_relocator_end): New variables.
7590 2008-08-12 Bean <bean123ch@gmail.com>
7592 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
7594 2008-08-11 Robert Millan <rmh@aybabtu.com>
7596 * kern/i386/linuxbios/startup.S: Move from here ...
7597 * kern/i386/coreboot/startup.S: ... to here.
7599 * kern/i386/linuxbios/init.c: Move from here ...
7600 * kern/i386/coreboot/init.c: ... to here.
7602 * kern/i386/linuxbios/table.c: Move from here ...
7603 * kern/i386/coreboot/mmap.c: ... to here.
7605 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
7607 2008-08-11 Robert Millan <rmh@aybabtu.com>
7609 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
7610 errors. Leave it to the upper layer to handle them.
7612 2008-08-09 Christian Franke <franke@computer.org>
7614 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
7615 * conf/common.rmk: Install `grub-pe2elf' only if requested.
7616 Install `grub.d/10_windows' only on Cygwin.
7617 * configure.ac: Add subst of `target_os'.
7618 Check `target_os' also before setting TARGET_OBJ2ELF.
7619 Add `--enable-grub-pe2elf'.
7621 2008-08-08 Robert Millan <rmh@aybabtu.com>
7623 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7624 (grub_last_time): Change type to grub_uint64_t.
7625 (grub_disk_open): Migrate code from to using grub_get_time_ms().
7626 (grub_disk_close): Likewise.
7628 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
7629 (run_menu): Migrate code from to using grub_get_time_ms().
7631 * util/misc.c (grub_get_time_ms): New function.
7633 2008-08-08 Marco Gerards <marco@gnu.org>
7635 * disk/ata.c (grub_ata_regget): Change return type to
7637 (grub_ata_regget2): Likewise.
7638 (grub_ata_wait_status): New function.
7639 (grub_ata_wait_busy): Removed function, updated all users to use
7640 `grub_ata_wait_status'.
7641 (grub_ata_wait_drq): Likewise.
7642 (grub_ata_cmd): New function.
7643 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
7645 (grub_ata_pio_write): Add error handling.
7646 (grub_atapi_identify): Likewise.
7647 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
7649 (grub_ata_identify): Use `grub_ata_cmd' and improve error
7650 handling. Actually use the detected registers. Reorder the
7651 detection logic such that it is easier to read.
7652 (grub_ata_pciinit): Do not assign the same ID to each controller.
7653 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
7655 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
7657 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
7659 2008-08-08 Marco Gerards <marco@gnu.org>
7663 2008-08-07 Bean <bean123ch@gmail.com>
7665 * include/grub/x86_64/pci.h: New file.
7667 2008-08-07 Christian Franke <franke@computer.org>
7669 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
7670 (TIMER2_GATE): Likewise.
7671 (grub_pit_wait): Add enable/disable of the timer2 gate
7672 bit of port 0x61. This fixes a possible infinite loop.
7674 2008-08-07 Bean <bean123ch@gmail.com>
7676 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
7677 kern/i386/tsc.c and kern/i386/pit.c.
7679 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
7682 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
7685 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
7687 2008-08-07 Bean <bean123ch@gmail.com>
7689 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
7691 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
7693 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
7694 multiple inclusion. Add #include <grub/types.h>.
7696 2008-08-06 Christian Franke <franke@computer.org>
7698 * conf/common.rmk: Build and install `10_windows'.
7699 * util/grub.d/10_windows.in: New script.
7701 2008-08-06 Pavel Roskin <proski@gnu.org>
7703 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
7705 2008-08-06 Robert Millan <rmh@aybabtu.com>
7707 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
7708 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
7710 2008-08-06 Bean <bean123ch@gmail.com>
7712 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
7713 (grub_pxefs_fs_int): Remove dummy definition.
7714 (grub_pxefs_open): Use data->block_size to store the current block
7716 (grub_pxefs_read): Use block size stored in data->block_size. As the
7717 value of grub_pxe_blksize can be changed after the file is opened.
7719 2008-08-06 Bean <bean123ch@gmail.com>
7721 * fs/i386/pc/pxe.c (curr_file): new variable.
7722 (grub_pxefs_open): Simply the handling of pxe file system. Don't
7723 require the dummy internal file system anymore.
7724 (grub_pxefs_read): Removed.
7725 (grub_pxefs_close): Likewise.
7726 (grub_pxefs_fs_int): Likewise.
7727 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
7728 connection when we switch file.
7729 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
7731 2008-08-06 Robert Millan <rmh@aybabtu.com>
7733 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
7735 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
7736 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
7738 * kern/i386/halt.c: New file.
7739 * kern/i386/reboot.c: Likewise.
7740 * include/grub/i386/reboot.h: Likewise.
7741 * include/grub/i386/halt.h: Likewise.
7743 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
7744 Include `<grub/cpu/halt.h>'.
7745 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
7746 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
7748 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
7749 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
7750 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
7751 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
7752 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
7753 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
7755 * include/grub/i386/at_keyboard.h: ... to here.
7757 2008-08-05 Robert Millan <rmh@aybabtu.com>
7759 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
7760 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
7761 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
7762 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7763 `kern/generic/millisleep.c'.
7765 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
7766 instead of grub_get_rtc().
7767 (grub_tsc_init): Initialize `tsc_boot_time'.
7769 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
7770 (grub_machine_init): Use grub_tsc_init() rather than
7771 installing an RTC-based handler via grub_install_get_time_ms().
7773 * kern/i386/pit.c: New file.
7774 * include/grub/i386/pit.h: Likewise.
7776 2008-08-05 Bean <bean123ch@gmail.com>
7778 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
7780 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
7781 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
7782 (pxe_mod_SOURCES): New macro.
7783 (pxe_mod_CFLAGS): Likewise.
7784 (pxe_mod_LDFLAGS): Likewise.
7785 (pxecmd_mod_SOURCES): Likewise.
7786 (pxecmd_mod_CFLAGS): Likewise.
7787 (pxecmd_mod_LDFLAGS): Likewise.
7789 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
7790 (grub_pxe_call): Likewise.
7792 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
7794 * commands/i386/pc/pxecmd.c: New file.
7796 * fs/i386/pc/pxe.c: Likewise.
7798 * include/grub/i386/pc/pxe.h: Likewise.
7800 2008-08-05 Bean <bean123ch@gmail.com>
7802 * util/console.c (grub_console_cur_color): New variable.
7803 (grub_console_standard_color): Likewise.
7804 (grub_console_normal_color): Likewise.
7805 (grub_console_highlight_color): Likewise.
7806 (color_map): Likewise.
7807 (use_color): Likewise.
7808 (NUM_COLORS): New macro.
7809 (grub_ncurses_setcolorstate): Handle color properly.
7810 (grub_ncurses_setcolor): Don't change color here, just remember the
7811 settings, color will be set in grub_ncurses_setcolorstate.
7812 (grub_ncurses_getcolor): New function.
7813 (grub_ncurses_init): Initialize color pairs.
7814 (grub_ncurses_term): New member grub_ncurses_getcolor.
7816 2008-08-05 Colin D Bennett <colin@gibibit.com>
7818 High resolution timer support. Implemented for x86 CPUs using TSC.
7819 Extracted generic grub_millisleep() so it's linked in only as needed.
7820 This requires a Pentium compatible CPU; if the RDTSC instruction is
7821 not supported, then it falls back on the generic grub_get_time_ms()
7822 implementation that uses the machine's RTC.
7824 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
7825 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7826 `kern/generic/millisleep.c'.
7828 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
7829 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
7831 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
7832 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
7834 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7836 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7837 `kern/generic/millisleep.c'.
7839 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7841 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
7843 * kern/generic/rtc_get_time_ms.c: New file.
7845 * kern/generic/millisleep.c: New file.
7847 * kern/misc.c: Don't include
7848 <kern/time.h> anymore.
7849 (grub_millisleep_generic): Removed.
7851 * commands/sleep.c (grub_interruptible_millisleep): Uses
7852 grub_get_time_ms() instead of grub_get_rtc().
7854 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
7856 (grub_cpu_is_cpuid_supported): New inline function.
7857 (grub_cpu_is_tsc_supported): New inline function.
7858 (grub_tsc_init): New function prototype.
7859 (grub_tsc_get_time_ms): New function prototype.
7861 * kern/i386/tsc.c (grub_get_time_ms): New file.
7863 * include/grub/time.h: Include <grub/types.h.
7864 (grub_millisleep_generic): Removed.
7865 (grub_get_time_ms): New prototype.
7866 (grub_install_get_time_ms): New prototype.
7867 (grub_rtc_get_time_ms): New prototype.
7869 * kern/time.c (grub_get_time_ms): New function.
7870 (grub_install_get_time_ms): New function.
7872 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
7873 <grub/time.h> anymore.
7874 (grub_millisleep): Removed.
7875 (grub_machine_init): Call grub_tsc_init.
7877 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
7878 get_time_ms() implementation.
7880 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
7881 (ieee1275_get_time_ms): New function.
7882 (grub_machine_init): Install get_time_ms() implementation.
7884 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
7885 (grub_machine_init): Call grub_tsc_init().
7886 (grub_millisleep): Removed.
7888 * kern/ieee1275/init.c (grub_millisleep): Removed.
7889 (grub_machine_init): Install ieee1275_get_time_ms()
7891 (ieee1275_get_time_ms): New function.
7892 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
7895 2008-08-05 Marco Gerards <marco@gnu.org>
7897 * disk/ata.c: Include <grub/pci.h>.
7898 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
7899 (grub_ata_initialize): Rewritten.
7900 (grub_ata_device_initialize): New function.
7902 2008-08-04 Pavel Roskin <proski@gnu.org>
7904 * kern/main.c: Include grub/mm.h.
7906 2008-08-04 Robert Millan <rmh@aybabtu.com>
7908 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
7909 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
7910 corruption problem).
7912 2008-08-04 Robert Millan <rmh@aybabtu.com>
7914 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
7915 warnings introduced in my last commit.
7917 2008-08-03 Robert Millan <rmh@aybabtu.com>
7919 Make PCI available on all i386 architectures.
7921 * include/grub/i386/pc/pci.h: Move from here ...
7922 * include/grub/i386/pci.h: ... to here.
7924 * include/grub/i386/pc/pci.h: Remove.
7925 * include/grub/i386/efi/pci.h: Remove.
7926 * include/grub/x86_64/efi/pci.h: Remove.
7928 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
7931 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
7932 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
7933 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
7935 * conf/i386-ieee1275.rmk: Likewise.
7937 2008-08-03 Robert Millan <rmh@aybabtu.com>
7939 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
7940 (grub_console_setcursor): Make it possible to set cursor off.
7942 2008-08-03 Robert Millan <rmh@aybabtu.com>
7944 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
7945 of modules instead of assuming which platform provides what.
7946 * util/update-grub.in: Likewise.
7948 2008-08-03 Robert Millan <rmh@aybabtu.com>
7950 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
7951 instead of `grub_install_dos_part' to determine whether a drive needs
7952 to be prepended to prefix (`grub_install_dos_part' is not reliable,
7953 because it can be overridden when loading GRUB via Multiboot).
7955 2008-08-02 Robert Millan <rmh@aybabtu.com>
7957 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
7959 2008-08-02 Robert Millan <rmh@aybabtu.com>
7961 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
7962 of informational grub_dprintf() calls.
7964 2008-08-02 Robert Millan <rmh@aybabtu.com>
7966 * disk/memdisk.c (memdisk_size): Don't initialize.
7967 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
7969 * include/grub/i386/pc/kernel.h
7970 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
7971 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
7972 (grub_memdisk_image_size, grub_arch_memdisk_addr)
7973 (grub_arch_memdisk_size): Remove.
7975 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
7976 field (was only used to transfer a constant). Add `type' field to
7977 support multiple module types.
7978 (grub_module_iterate): New function.
7980 * kern/device.c (grub_device_open): Do not hide error messages
7981 when grub_disk_open() fails. Use grub_print_error() instead.
7983 * kern/i386/pc/init.c (grub_arch_modules_addr)
7984 (grub_arch_memdisk_size): Remove functions.
7985 (grub_arch_modules_addr): Return the module address in high memory
7986 (now that it isn't copied anymore).
7988 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
7989 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
7990 decompression routine (grub_total_module_size already includes that
7991 now). Don't copy modules back to low memory.
7993 * kern/main.c: Include `<grub/mm.h>'.
7994 (grub_load_modules): Split out (and use) ...
7995 (grub_module_iterate): ... this function, which iterates through
7996 module objects and runs a hook.
7997 Comment out grub_mm_init_region() call, as it would cause non-ELF
7998 modules to be overwritten.
8000 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
8001 the memdisk image in its own region, make it part of the module list.
8002 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
8003 (main): Parse --memdisk|-m option, and pass user-provided path as
8004 parameter to generate_image().
8005 (add_segments): Pass `memdisk_path' down to load_modules().
8006 (load_modules): Embed memdisk image in module section when requested.
8007 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
8008 `header.type' instead of `header.offset'.
8010 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
8011 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
8012 (memdisk_mod_LDFLAGS): New variables.
8013 * conf/i386-coreboot.rmk: Likewise.
8014 * conf/i386-ieee1275.rmk: Likewise.
8016 2008-08-02 Robert Millan <rmh@aybabtu.com>
8018 * loader/i386/pc/multiboot.c (playground, forward_relocator)
8019 (backward_relocator): New variables. Used to allocate and relocate
8020 the payload, respectively.
8021 (grub_multiboot_load_elf32): Load into heap instead of requested
8022 address, install the appropriate relocator code in each bound of
8023 the payload, and set the entry point such that
8024 grub_multiboot_real_boot() will jump to one of them.
8026 * kern/i386/loader.S (grub_multiboot_payload_size)
8027 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
8028 (grub_multiboot_payload_entry_offset): New variables.
8029 (grub_multiboot_real_boot): Set cpu context to what the relocator
8030 expects, and jump to the relocator instead of the payload.
8032 * include/grub/i386/loader.h (grub_multiboot_payload_size)
8033 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
8034 (grub_multiboot_payload_entry_offset): Export.
8036 2008-08-01 Bean <bean123ch@gmail.com>
8038 * normal/menu_entry.c (editor_getline): Don't return the original
8039 string as result, as it will be released by lexer once it has done
8042 2008-08-01 Robert Millan <rmh@aybabtu.com>
8044 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
8045 within menuentries, not before them.
8046 util/grub.d/10_hurd.in: Likewise.
8048 2008-08-01 Bean <bean123ch@gmail.com>
8050 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
8051 (bufio_mod_SOURCES): New macro.
8052 (bufio_mod_CFLAGS): Likewise.
8053 (bufio_mod_LDFLAGS): Likewise.
8055 * include/grub/bufio.h: New file.
8057 * io/bufio.c: Likewise.
8059 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
8060 (grub_video_reader_png): Use grub_buffile_open to open file.
8062 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
8063 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
8065 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
8066 (grub_video_reader_tga): Use grub_buffile_open to open file.
8068 * font/manager.c: Include <grub/bufio.h>.
8069 (add_font): Use grub_buffile_open to open file.
8071 2008-07-31 Robert Millan <rmh@aybabtu.com>
8073 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
8074 ELF segments, use a macro for arbitrarily accessing any of them instead
8075 of preparing a pointer that allows access to one at a time.
8076 (grub_multiboot_load_elf64): Likewise.
8078 2008-07-31 Bean <bean123ch@gmail.com>
8080 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
8081 GRUB_KERNEL_MACHINE_DATA_END.
8083 2008-07-30 Robert Millan <rmh@aybabtu.com>
8085 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
8086 Increase from 0x50 to 0x60.
8087 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
8088 use UUIDs to identify the root drive for them. If that's not
8090 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
8091 check, for cross-disk installs.
8093 2008-07-30 Robert Millan <rmh@aybabtu.com>
8095 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
8096 is non-empty, use it to set the `prefix' environment variable instead
8097 of the usual approach.
8098 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
8099 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
8100 environment variable instead of dummy make_install_device().
8102 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
8103 (start): Insert a data section, with `grub_prefix' variable.
8104 * kern/i386/linuxbios/startup.S: Likewise.
8106 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
8107 New variable reference.
8108 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
8109 New macro. Defines offset of `grub_prefix' within startup.S (relative
8111 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
8112 section within startup.S (relative to `start').
8113 * include/grub/i386/coreboot/kernel.h: Likewise.
8115 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
8116 Overwrite grub_prefix with its contents, at the beginning of the
8118 (main): Understand -p|--prefix.
8120 2008-07-30 Robert Millan <rmh@aybabtu.com>
8122 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
8124 2008-07-30 Robert Millan <rmh@aybabtu.com>
8126 * term/i386/pc/vga_text.c (grub_console_cls): Use
8127 grub_console_gotoxy() to go back to beginning of the screen.
8128 Found by Patrick Georgi <patrick.georgi@coresystems.de>
8130 2008-07-29 Christian Franke <franke@computer.org>
8132 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8133 Add conversion of emulated mount points on Cygwin.
8135 2008-07-29 Christian Franke <franke@computer.org>
8137 * util/update-grub.in: Add a check for admin
8139 Remove old `grub.cfg.new' before creation.
8140 Add `-f' to `mv' to handle the different filesystem
8141 semantics of Windows.
8143 2008-07-29 Bean <bean123ch@gmail.com>
8145 * normal/main.c (get_line): Fix buffer overflow bug.
8147 2008-07-28 Robert Millan <rmh@aybabtu.com>
8149 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
8150 (struct grub_apple_header): New struct. Describes the layout of
8152 (apple_partition_map_iterate): Check the header magic as well as the
8153 partition magic (which was already being checked).
8155 2008-07-28 Pavel Roskin <proski@gnu.org>
8157 * genmk.rb: Add a warning to the beginning of the output that
8158 it's a generated file and should not be edited.
8160 2008-07-28 Robert Millan <rmh@aybabtu.com>
8162 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
8163 with the same number are found, just use issue a warning with
8164 grub_dprintf(), as this error has been reported to be non-fatal.
8166 2008-07-27 Robert Millan <rmh@aybabtu.com>
8168 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
8171 2008-07-27 Bean <bean123ch@gmail.com>
8173 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
8174 (grub_fat_find_dir): Ignore case when comparing filename.
8176 2008-07-27 Bean <bean123ch@gmail.com>
8178 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
8179 smallino, as it's more descriptive, and i8count can be confused with
8180 the other field count.
8181 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
8184 2008-07-27 Bean <bean123ch@gmail.com>
8186 * commands/crc.c: New file.
8188 * lib/crc.c: Likewise.
8190 * include/grub/lib/crc.h: Likewise.
8192 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
8194 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
8195 (hexdump): Move this function to ...
8197 * lib/hexdump.c: ... here.
8199 * include/grub/hexdump.h: Renamed to ...
8201 * include/grub/lib/hexdump.h: ... this.
8203 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
8205 * util/grub-editenv.c: Likewise.
8207 * include/envblk.h: Renamed to ...
8209 * include/lib/envblk.h: ... this.
8211 * util/envblk.c: Renamed to ...
8213 * lib/envblk.c: ... this.
8215 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
8217 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
8218 (pkglib_MODULES): Add crc.mod.
8219 (hexdump_mod_SOURCES): Add lib/hexdump.c.
8220 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
8221 (crc_mod_SOURCES): New macro.
8222 (crc_mod_CFLAGS): Likewise.
8223 (crc_mod_LDFLAGS): Likewise.
8225 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
8227 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8229 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8231 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8233 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
8235 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
8237 * commands/help.c: Include <grub/term.h>.
8238 (TERM_WIDTH): Removed. Updated all users.
8240 2008-07-27 Pavel Roskin <proski@gnu.org>
8242 * util/getroot.c (find_root_device): Rephrase a comment to avoid
8243 spurious warnings about a comment within a comment.
8245 2008-07-25 Robert Millan <rmh@aybabtu.com>
8247 * util/getroot.c (find_root_device): Skip devices that match
8248 /dev/dm-[0-9]. This lets the real device be found for any type of
8249 abstraction (LVM, EVMS, RAID..).
8250 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
8251 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
8252 device is found first, find_root_device() will now skip it.
8254 2008-07-24 Pavel Roskin <proski@gnu.org>
8256 * include/grub/types.h: Use __builtin_bswap32() and
8257 __builtin_bswap64() with gcc 4.3 and newer.
8259 2008-07-24 Christian Franke <franke@computer.org>
8261 * util/i386/pc/grub-install.in: If `--debug' is specified,
8262 pass `--verbose' to grub-setup.
8263 Abort script if make_system_path_relative_to_its_root() fails.
8265 2008-07-24 Bean <bean123ch@gmail.com>
8267 * configure.ac: Fixed a bug caused by the previous cygwin patch,
8268 variable `target_platform' should be `platform'.
8270 2008-07-24 Bean <bean123ch@gmail.com>
8272 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
8273 (grub_png_init_fixed_block): New function.
8274 (grub_png_decode_image_data): Handle fixed huffman code compression.
8276 2008-07-24 Bean <bean123ch@gmail.com>
8278 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
8279 (grub_pe2elf_SOURCES): New macro.
8280 (CLEANFILES): Add grub-pe2elf.
8282 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
8283 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
8284 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
8285 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
8286 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
8287 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
8288 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
8289 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
8290 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
8291 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
8292 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
8293 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
8294 (GRUB_PE32_DT_FUNCTION): Likewise.
8295 (GRUB_PE32_REL_I386_DIR32): Likewise.
8296 (GRUB_PE32_REL_I386_REL32): Likewise.
8297 (grub_pe32_symbol): New structure.
8298 (grub_pe32_reloc): Likewise.
8300 * util/grub-pe2elf.c: New file.
8302 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
8303 start symbol in non pc platform.
8305 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
8307 The following patches are from Christian Franke.
8309 * include/grub/dl.h: Remove .previous, gas supports this only
8312 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
8313 Remove .type, gas supports this only for ELF format.
8315 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
8316 nullbytes in symbol table. This fixes an infinite loop if table is
8319 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
8320 TARGET_IMG_LDFLAGS and EXEEXT.
8322 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
8323 TARGET_IMG_LDFLAGS_AC.
8324 (grub_CHECK_STACK_ARG_PROBE): New function.
8326 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
8328 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
8330 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
8331 to set TARGET_IMG_LD* accordingly.
8332 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
8333 Add call to grub_CHECK_STACK_ARG_PROBE.
8334 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
8336 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
8338 * genmk.rb: Add EXEEXT to CLEANFILES.
8340 2008-07-23 Robert Millan <rmh@aybabtu.com>
8342 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
8343 define the codes for arrows and lines used for the menu).
8344 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
8347 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
8348 fonts, because the latter are too slow.
8350 2008-07-21 Bean <bean123ch@gmail.com>
8352 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
8353 a20. Run keyboard test last, as it will cause macbook to halt.
8355 2008-07-18 Pavel Roskin <proski@gnu.org>
8357 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
8358 load foreign architecture modules correctly anyway. Keep
8359 support for loading host architecture modules, whether we
8360 compile them or not.
8362 2008-07-17 Pavel Roskin <proski@gnu.org>
8364 * configure.ac: Use -m32 or -m64 regardless of whether we had to
8365 change target_cpu. The compiler default can mismatch target_cpu
8368 * disk/efi/efidisk.c: Fix format warnings on x86_64.
8369 * kern/efi/efi.c: Likewise.
8371 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
8372 target compiler is functional.
8373 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
8376 * configure.ac: Default to efi platform for x86_64-apple. Allow
8377 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
8378 adjustments from the rest, only do them if target is not
8379 explicitly given. Merge other adjustments with the final sanity
8380 check. Remove an extraneous check for supported CPU. Be
8381 specific which CPU and which platform is not supported.
8383 * configure.ac: Default to pc platform for x86_64.
8385 2008-07-17 Robert Millan <rmh@aybabtu.com>
8387 Partial LinuxBIOS -> Coreboot rename.
8389 * conf/i386-linuxbios.rmk: Renamed to ...
8390 * conf/i386-coreboot.rmk: ... this.
8391 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
8392 * configure.ac: Accept "coreboot" as input platform (but maintain
8393 compatibility with "linuxbios").
8394 * include/grub/i386/linuxbios: Renamed to ...
8395 * include/grub/i386/coreboot: ... this.
8397 2008-07-17 Bean <bean123ch@gmail.com>
8399 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
8400 (appleldr_mod_SOURCE): New variable.
8401 (appleldr_mod_CFLAGS): Likewise.
8402 (appleldr_mod_LDFLAGS): Likewise.
8403 (pci_mod_SOURCES): Likewise.
8404 (pci_mod_CFLAGS): Likewise.
8405 (pci_mod_LDFLAGS): Likewise.
8406 (lspci_mod_SOURCES): Likewise.
8407 (lspci_mod_CFLAGS): Likewise.
8408 (lspci_mod_LDFLAGS): Likewise.
8410 * conf/x86_64-efi.rmk: New file.
8412 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
8414 (grub_efidisk_write): Likewise.
8416 * include/efi/api.h (efi_call_0): New macro.
8417 (efi_call_1): Likewise.
8418 (efi_call_2): Likewise.
8419 (efi_call_3): Likewise.
8420 (efi_call_4): Likewise.
8421 (efi_call_5): Likewise.
8422 (efi_call_6): Likewise.
8424 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
8425 grub_rescue_cmd_chainloader.
8427 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
8428 (grub_pe32_optional_header): Change some fields based on i386 or
8430 (GRUB_PE32_PE32_MAGIC): Likewise.
8432 * include/grub/efi/uga_draw.h: New file.
8434 * include/grub/elf.h (STN_ABS): New constant.
8435 (R_X86_64_NONE): Relocation constant for x86_64.
8436 (R_X86_64_64): Likewise.
8437 (R_X86_64_PC32): Likewise.
8438 (R_X86_64_GOT32): Likewise.
8439 (R_X86_64_PLT32): Likewise.
8440 (R_X86_64_COPY): Likewise.
8441 (R_X86_64_GLOB_DAT): Likewise.
8442 (R_X86_64_JUMP_SLOT): Likewise.
8443 (R_X86_64_RELATIVE): Likewise.
8444 (R_X86_64_GOTPCREL): Likewise.
8445 (R_X86_64_32): Likewise.
8446 (R_X86_64_32S): Likewise.
8447 (R_X86_64_16): Likewise.
8448 (R_X86_64_PC16): Likewise.
8449 (R_X86_64_8): Likewise.
8450 (R_X86_64_PC8): Likewise.
8452 * include/grub/i386/efi/pci.h: New file.
8454 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
8455 Change it value based on platform.
8456 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
8457 (GRUB_E820_RAM): Likewise.
8458 (GRUB_E820_RESERVED): Likewise.
8459 (GRUB_E820_ACPI): Likewise.
8460 (GRUB_E820_NVS): Likewise.
8461 (GRUB_E820_EXEC_CODE): Likewise.
8462 (GRUB_E820_MAX_ENTRY): Likewise.
8463 (grub_e820_mmap): New structure.
8464 (linux_kernel_header): Change the efi field according to different
8465 kernel version, also field from linux_kernel_header.
8467 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
8469 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
8470 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
8471 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
8472 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
8473 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
8474 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
8475 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
8476 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
8477 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
8478 (GRUB_PCI_ADDR_IO_MASK): Likewise.
8480 * include/grub/x86_64/efi/kernel.h: New file.
8482 * include/grub/x86_64/efi/loader.h: Likewise.
8484 * include/grub/x86_64/efi/machine.h: Likewise.
8486 * include/grub/x86_64/efi/pci.h: Likewise.
8488 * include/grub/x86_64/efi/time.h: Likewise.
8490 * include/grub/x86_64/linux.h: Likewise.
8492 * include/grub/x86_64/setjmp.h: Likewise.
8494 * include/grub/x86_64/time.h: Likewise.
8496 * include/grub/x86_64/types.h: Likewise.
8498 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
8499 GRUB_TARGET_SIZEOF_VOID_P.
8501 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
8502 (grub_efi_locate_handle): Likewise.
8503 (grub_efi_open_protocol): Likewise.
8504 (grub_efi_set_text_mode): Likewise.
8505 (grub_efi_stall): Likewise.
8506 (grub_exit): Likewise.
8507 (grub_reboot): Likewise.
8508 (grub_halt): Likewise.
8509 (grub_efi_exit_boot_services): Likewise.
8510 (grub_get_rtc): Likewise.
8512 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
8513 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
8514 (grub_efi_allocate_pages): Wrap efi calls.
8515 (grub_efi_free_pages): Wrap efi calls.
8516 (grub_efi_get_memory_map): Wrap efi calls.
8518 * kern/x86_64/dl.c: New file.
8520 * kern/x86_64/efi/callwrap.S: Likewise.
8522 * kern/x86_64/efi/startup.S: Likewise.
8524 * loader/efi/appleloader.c: Likewise.
8526 * loader/efi/chainloader.c (cmdline): New variable.
8527 (grub_chainloader_unload): Wrap efi calls.
8528 (grub_chainloader_boot): Likewise.
8529 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
8532 * loader/efi/chainloader_normal.c (chainloader_command):
8533 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
8536 * loader/i386/efi/linux.c (allocate_pages): Change allocation
8538 (grub_e820_add_region): New function.
8539 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
8541 (grub_find_video_card): New function.
8542 (grub_linux_setup_video): New function.
8543 (grub_rescue_cmd_linux): Probe for video information.
8545 * normal/x86_64/setjmp.S: New file.
8547 * term/efi/console.c (map_char): New function.
8548 (grub_console_putchar): Map unicode char.
8549 (grub_console_checkkey): Wrap efi calls.
8550 (grub_console_getkey): Likewise.
8551 (grub_console_getwh): Likewise.
8552 (grub_console_gotoxy): Likewise.
8553 (grub_console_cls): Likewise.
8554 (grub_console_setcolorstate): Likewise.
8555 (grub_console_setcursor): Likewise.
8557 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
8559 2008-07-16 Pavel Roskin <proski@gnu.org>
8561 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
8564 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
8565 pointer, not an integer. This fixes a warning and prevents
8566 precision loss on 64-bit systems.
8567 (relocate_addresses): Remove unneeded cast.
8569 2008-07-15 Pavel Roskin <proski@gnu.org>
8571 * kern/i386/ieee1275/init.c: Include grub/cache.h.
8573 * term/ieee1275/ofconsole.c: Disable code unused on i386.
8575 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
8576 Fix comparison between signed and unsigned.
8578 * include/grub/i386/ieee1275/console.h: Declare
8579 grub_console_init() and grub_console_fini().
8581 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
8582 It's empty and unused.
8584 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
8585 beginning to avoid warnings with some compilers.
8587 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
8588 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
8590 2008-07-14 Pavel Roskin <proski@gnu.org>
8592 * kern/env.c (grub_register_variable_hook): Don't copy empty
8593 string, it leaks memory. Pass "" to grub_env_set(), it should
8594 handle constant strings.
8596 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
8597 * commands/cmp.c (grub_cmd_cmp): Likewise.
8598 * kern/dl.c (grub_dl_flush_cache): Likewise.
8599 (grub_dl_load_core): Likewise.
8600 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
8601 (grub_elf64_load_phdrs): Likewise.
8603 2008-07-13 Pavel Roskin <proski@gnu.org>
8605 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
8606 between signed and unsigned.
8607 (LzmaEnc_Finish): Fix warning about an unused parameter.
8609 2008-07-13 Bean <bean123ch@gmail.com>
8611 * Makefile.in (enable_lzo): New rule.
8613 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
8615 * configure.ac (ENABLE_LZO): New option --enable-lzo.
8617 * boot/i386/pc/lnxboot.S: #include <config.h>.
8619 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
8620 its value according to the compression algorithm used, lzo or lzma.
8622 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
8623 compression algorithm according to configure macro.
8625 * kern/i386/pc/startup.S (codestart): Likewise.
8627 * kern/i386/pc/lzma_decode.S: New file.
8629 * include/grub/lib/LzFind.h: Likewise.
8631 * include/grub/lib/LzHash.h: Likewise.
8633 * include/grub/lib/LzmaDec.h: Likewise.
8635 * include/grub/lib/LzmaEnc.h: Likewise.
8637 * include/grub/lib/LzmaTypes.h: Likewise.
8639 * lib/LzFind.c: Likewise.
8641 * lib/LzmaDec.c: Likewise.
8643 * lib/LzmaEnc.c: Likewise.
8645 2008-07-13 Bean <bean123ch@gmail.com>
8647 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
8648 (grub_ext4_extent_header): New structure.
8649 (grub_ext4_extent): Likewise.
8650 (grub_ext4_extent_idx): Likewise.
8651 (grub_ext4_find_leaf): New function.
8652 (grub_ext2_read_block): Handle extents.
8654 2008-07-12 Robert Millan <rmh@aybabtu.com>
8656 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
8658 2008-07-11 Robert Millan <rmh@aybabtu.com>
8660 * util/grub.d/40_custom.in: New file. Example on how to add custom
8661 entries to /etc/grub.d.
8662 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
8663 40_custom (implicitly, by merging all the grub.d rules).
8665 2008-07-11 Pavel Roskin <proski@gnu.org>
8667 * commands/read.c (grub_getline): Fix invalid memory access.
8668 Don't add newline to the variable value.
8670 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
8671 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
8672 (serial_hw_get_port): Check validity of the port number.
8673 (grub_cmd_serial): Check return value of serial_hw_get_port().
8675 2008-07-07 Pavel Roskin <proski@gnu.org>
8677 * boot/i386/pc/diskboot.S (notification_string): Replace
8678 "Loading kernel" with just "loading". This is shorter, less
8679 confusing and saves a few bytes for possible future changes.
8681 2008-07-05 Pavel Roskin <proski@gnu.org>
8683 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
8684 size for ATAPI devices, they are undefined. Output sector
8685 number in decimal form.
8687 * disk/ata.c: Use named constants for status bits.
8689 2008-07-04 Pavel Roskin <proski@gnu.org>
8691 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
8692 grub_addr_t before casting it to the void pointer to fix a
8693 warning. Non-addressable regions are discarded earlier.
8694 (grub_arch_modules_addr): Cast _end to grub_addr_t.
8695 * kern/i386/linuxbios/table.c: Include grub/misc.h.
8696 (check_signature): Don't shadow table_header.
8697 (grub_linuxbios_table_iterate): Cast numeric constants to
8698 grub_linuxbios_table_header_t.
8699 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
8702 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
8705 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
8706 pointer, which can cause warnings. Support 64-bit addresses.
8708 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
8709 of sizeof(long). This fixes PowerPC image generation on x86_64.
8711 2008-07-04 Robert Millan <rmh@aybabtu.com>
8713 This fixes a performance issue when pc & gpt partmap iterators
8714 didn't abort iteration even after our hook found what it was
8715 looking for (often causing expensive probes of non-existent drives).
8717 Some callers relied on previous buggy behaviour, since they would
8718 raise an error when their own hooks caused early abortion of its
8721 * kern/device.c (grub_device_open): Improve error message.
8722 * disk/lvm.c (grub_lvm_open): Likewise.
8723 * disk/raid.c (grub_raid_open): Likewise.
8725 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
8726 when hook requests it, independently of grub_errno.
8727 (pc_partition_map_probe): Do not fail when find_func() caused
8728 early abortion of pc_partition_map_iterate().
8730 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
8731 when hook requests it, independently of grub_errno.
8732 (gpt_partition_map_probe): Do not fail when find_func() caused
8733 early abortion of gpt_partition_map_iterate().
8735 * kern/partition.c (grub_partition_iterate): Abort parent iteration
8736 when hook requests it, independently of grub_errno. Do not fail when
8737 part_map_iterate_hook() caused early abortion of p->iterate().
8739 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
8740 when grub_partition_iterate() returned with non-zero.
8742 2008-07-03 Pavel Roskin <proski@gnu.org>
8744 * disk/ata.c (grub_ata_pio_write): Check status before writing,
8745 like we do in grub_ata_pio_read().
8746 (grub_ata_readwrite): Always write individual sectors. Fix the
8747 sector count for the remainder.
8748 (grub_ata_write): Enable writing to ATA devices. Correctly
8749 report error for ATAPI devices.
8751 2008-07-02 Pavel Roskin <proski@gnu.org>
8753 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
8756 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
8757 for every read sector, we already increment it for the whole
8758 batch. This fixes reading more than 256 sectors at once.
8760 * util/grub-editenv.c (cmd_info): Cast argument to long
8761 explicitly. ptrdiff_t reduces to int on i386.
8763 * util/grub-editenv.c (main): Be specific which parameter is
8766 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
8767 (memdisk): Make memdisk_orig_addr a pointer.
8769 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
8770 for file offsets, use grub_off_t instead. Fix printf format
8773 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
8774 there. Real unexpected warnings should not drown in the noise
8775 about known problems.
8777 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
8778 grub_disk_addr_t for memory addresses.
8780 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
8781 explicitly to fix a warning.
8783 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
8785 * Makefile.in (MODULE_LDFLAGS): New variable.
8786 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
8787 the linker accepts --build-id=none.
8788 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
8790 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
8792 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
8793 those in Linux XFS code. Provide a way to access 64-bit parent
8795 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
8796 the end of struct grub_xfs_dir_header.
8798 2008-07-02 Bean <bean123ch@gmail.com>
8800 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
8801 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8802 and GRUB_IEEE1275_FLAG_NO_ANSI.
8804 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
8805 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8806 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
8808 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
8809 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
8811 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
8812 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
8814 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
8815 esc sequence on non ANSI terminal.
8816 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
8818 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
8821 2008-07-02 Bean <bean123ch@gmail.com>
8823 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
8824 (grub_editenv_SOURCES): New variable.
8825 (pkglib_MODULES): Add loadenv.mod.
8826 (loadenv_mod_SOURCES): New variable.
8827 (loadenv_mod_CFLAGS): Likewise.
8828 (loadenv_mod_LDFLAGS): Likewise.
8830 * include/grub/envblk.h: New file.
8832 * util/envblk.c: New file.
8834 * util/grub-editenv.c: New file.
8836 * commands/loadenv.c: New file.
8838 2008-07-01 Pavel Roskin <proski@gnu.org>
8840 * include/multiboot2.h (struct multiboot_tag_module): Use char,
8841 not unsigned char. This fixes warnings and is consistent with
8844 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
8846 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
8848 * term/tparm.c (analyze): Always set *popcount.
8850 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
8851 cast to fix a warning.
8853 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
8854 cast to suppress a warning.
8856 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
8857 grub_fshelp_read_file() expects.
8859 * fs/fat.c: Fix UUID calculation on big-endian systems. We
8860 write uuid as a 32-bit value in CPU byte order, so declare and
8863 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
8864 long if the format specifier expects it.
8865 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
8866 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8867 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
8868 long to fix a warning.
8869 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
8870 grub_dprintf() arguments to fix warnings.
8872 2008-06-30 Pavel Roskin <proski@gnu.org>
8874 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
8875 install_bsd_part immediately before core.img is embedded or
8876 modified on disk. This fixes core.img verification if core.img
8879 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
8880 core_path to calculate the blocklist.
8881 Patch from Javier MartÃn <lordhabbit@gmail.com>
8883 2008-06-29 Robert Millan <rmh@aybabtu.com>
8885 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
8886 block to disk block.
8887 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
8888 Patch from Niels Böhm <bitbucket@arcor.de>
8890 2008-06-29 Robert Millan <rmh@aybabtu.com>
8892 * util/update-grub_lib.in (font_path): Search for fonts in
8893 /boot/grub first, which is more likely to be readable (we aren't
8894 deciding where fonts live, just looking for them).
8896 2008-06-26 Pavel Roskin <proski@gnu.org>
8898 * util/biosdisk.c (read_device_map): Don't leave dead map
8899 entries for devices failing stat() check.
8901 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
8902 core_path_dev for the core.img path on the target device.
8904 2008-06-26 Robert Millan <rmh@aybabtu.com>
8906 * disk/fs_uuid.c: New file.
8907 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
8908 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
8909 (fs_uuid_mod_LDFLAGS): New variables.
8910 * include/grub/disk.h (grub_disk_dev_id): Add
8911 `GRUB_DISK_DEVICE_UUID_ID'.
8912 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
8913 implement iterate().
8915 2008-06-26 Robert Millan <rmh@aybabtu.com>
8917 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
8918 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
8919 Linux image includes no initrd.
8921 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
8923 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
8924 call to resolve the core image location that effectively appended the
8927 2008-06-21 Robert Millan <rmh@aybabtu.com>
8929 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
8932 * util/grub.d/10_hurd.in: ... to here ...
8933 * util/grub.d/10_linux.in: ... and here.
8935 2008-06-19 Robert Millan <rmh@aybabtu.com>
8937 * kern/main.c (grub_main): Export `prefix' variable immediately
8938 after it has been set by grub_machine_set_prefix().
8940 2008-06-19 Robert Millan <rmh@aybabtu.com>
8942 * commands/search.c (search_label, search_fs_uuid, search_file): Print
8943 search result when not saving to variable, not the other way around.
8944 When saving to variable, abort iteration as soon as a match is found.
8946 2008-06-19 Robert Millan <rmh@aybabtu.com>
8948 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
8949 check for partition that provides /boot/grub. Its logic is flawed,
8950 as it prevents prepare_grub_to_access_device() from being called
8953 2008-06-19 Robert Millan <rmh@aybabtu.com>
8955 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
8956 "insmod" command directly when abstraction modules are needed,
8957 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
8958 since it had already been processed).
8960 2008-06-19 Pavel Roskin <proski@gnu.org>
8962 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
8963 changed. This is needed in case GRUB_LIBDIR changes.
8964 * conf/i386-ieee1275.rmk: Likewise.
8965 * conf/i386-linuxbios.rmk: Likewise.
8966 * conf/i386-pc.rmk: Likewise.
8967 * conf/powerpc-ieee1275.rmk: Likewise.
8969 2008-06-18 Pavel Roskin <proski@gnu.org>
8971 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
8972 kernel_elf_symlist.c to symlist.c for consistency with other
8973 architectures. Update all users.
8974 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8976 2008-06-18 Robert Millan <rmh@aybabtu.com>
8978 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
8981 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
8982 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
8983 a RAID device, run setup() for all members independently on whether
8984 LVM abstraction is being used.
8985 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
8986 If grub-mkimage has set `*install_dos_part == -2', don't override this
8988 Perform *install_dos_part adjustments independently on whether
8989 we're embedding or not.
8990 Clarify error message when image is too big for embedding.
8991 Remove duplicate *install_dos_part stanza.
8993 2008-06-17 Robert Millan <rmh@aybabtu.com>
8995 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
8996 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
8998 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
8999 values in grub_ofconsole_normal_color and
9000 grub_ofconsole_highlight_color (they're not directly related to
9001 background and foreground).
9002 (grub_ofconsole_setcolorstate): Extract background and foreground
9003 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
9005 2008-06-17 Robert Millan <rmh@aybabtu.com>
9007 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
9008 /boot/grub for the check in last commit, not /boot (they could be
9009 different partitions).
9011 2008-06-16 Robert Millan <rmh@aybabtu.com>
9013 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
9014 asked to setup access for the same partition that provides /boot,
9015 don't bother using UUIDs since our root already has the value we
9018 2008-06-16 Robert Millan <rmh@aybabtu.com>
9020 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
9022 Patch from Sven Mueller <sven@debian.org>.
9024 2008-06-16 Robert Millan <rmh@aybabtu.com>
9026 * util/update-grub.in: Check for $EUID instead of $UID.
9027 Reported by Vincent Zweije.
9029 2008-06-16 Bean <bean123ch@gmail.com>
9031 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
9032 (grub_ext2_read_block): Likewise.
9033 (grub_ext2_read_inode): Likewise.
9034 (grub_ext2_mount): Likewise.
9035 (grub_ext2_close): Likewise.
9036 (grub_ext3_get_journal): Removed.
9038 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
9039 (grub_reiserfs_read_symlink): Likewise.
9040 (grub_reiserfs_mount): Likewise.
9041 (grub_reiserfs_open): Likewise.
9042 (grub_reiserfs_read): Likewise.
9043 (grub_reiserfs_close): Likewise.
9044 (grub_reiserfs_get_journal): Removed.
9046 * fs/fshelp.c (grub_fshelp_read): Removed.
9047 (grub_fshelp_map_block): Likewise.
9049 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
9050 (grub_fshelp_journal): Likewise.
9051 (grub_fshelp_read): Likewise.
9052 (grub_fshelp_map_block): Likewise.
9054 2008-06-16 Pavel Roskin <proski@gnu.org>
9056 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
9057 floating point anymore.
9058 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
9060 2008-06-15 Pavel Roskin <proski@gnu.org>
9062 * commands/ls.c (grub_ls_list_files): Use integer calculations
9063 for human readable format, avoid floating point use.
9064 * kern/misc.c (grub_ftoa): Remove.
9065 (grub_vsprintf): Remove floating point support.
9067 2008-06-15 Robert Millan <rmh@aybabtu.com>
9069 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
9071 Reported by Max Vozeler.
9073 2008-06-15 Robert Millan <rmh@aybabtu.com>
9075 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
9076 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
9078 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
9079 the beginning of the prefix.
9081 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
9082 It is assumed that if we have a memdisk, grub-mkimage has set
9083 grub_prefix to include the "(memdisk)" drive in it.
9085 2008-06-15 Robert Millan <rmh@aybabtu.com>
9087 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
9088 Initialize keyboard controller after registering the terminal, so that
9089 grub_printf() can be called from grub_keyboard_controller_init().
9091 2008-06-15 Robert Millan <rmh@aybabtu.com>
9093 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
9094 extent-btree which is written as big endian on disk.
9095 Reported by Alain Greppin <al@chilibi.org>.
9097 2008-06-14 Robert Millan <rmh@aybabtu.com>
9099 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
9100 * util/i386/pc/grub-install.in (modules): Likewise.
9102 2008-06-13 Pavel Roskin <proski@gnu.org>
9104 * commands/ls.c (grub_ls_list_files): Fix format warnings.
9106 2008-06-13 Bean <bean123ch@gmail.com>
9108 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
9110 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
9112 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
9113 to indicate sparse block.
9115 2008-06-12 Pavel Roskin <proski@gnu.org>
9117 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
9118 number, grub_fshelp_read() does it for us.
9120 * fs/fshelp.c (grub_fshelp_read): New function. Implement
9121 linear disk read with journal translation.
9122 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
9123 * include/grub/fshelp.h: Declare grub_fshelp_read().
9125 2008-06-09 Pavel Roskin <proski@gnu.org>
9127 * fs/minix.c (grub_minix_mount): Handle error reading
9130 2008-06-08 Robert Millan <rmh@aybabtu.com>
9132 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
9133 don't append the RAID prefix afterwards.
9134 Reported by Clint Adams.
9136 2008-06-08 Robert Millan <rmh@aybabtu.com>
9138 Based on description from Pavel:
9139 * kern/disk.c (grub_disk_check_range): Rename to ...
9140 (grub_disk_adjust_range): ... this. Add a comment explaining the
9141 tasks performed by this function.
9143 2008-06-08 Robert Millan <rmh@aybabtu.com>
9145 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
9146 `num_serial' (for consistency with other variables).
9147 (struct grub_ntfs_data): Add `uuid' member.
9148 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
9149 (grub_ntfs_uuid): New function.
9150 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
9152 2008-06-07 Pavel Roskin <proski@gnu.org>
9154 * util/biosdisk.c (open_device): Revert last change to the
9155 function, it broke installation. The sector needs to be
9156 different dependent on which device is opened.
9158 2008-06-06 Robert Millan <rmh@aybabtu.com>
9160 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
9161 rest of GRUB, and breakage doesn't happen if its value were modified.
9163 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9164 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
9165 a constant (same value).
9166 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
9167 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
9169 2008-06-06 Robert Millan <rmh@aybabtu.com>
9171 * util/biosdisk.c (open_device): Do not modify sector offset when
9172 accessing a partition. kern/disk.c already handles this for us.
9174 2008-06-06 Robert Millan <rmh@aybabtu.com>
9176 * util/grub-emu.c (grub_machine_init): Move code in this function from
9178 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
9179 segfault in case grub_printf() is called).
9181 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
9182 grub_probe. Update all users not to explicitly add it again.
9183 (grub_device): New variable; contains corresponding device for grubdir.
9184 (fs_module, partmap_module, devabstraction_module): Pass
9185 `--device ${grub_device}' to grub_probe to avoid traversing /dev
9188 2008-06-05 Robert Millan <rmh@aybabtu.com>
9190 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
9191 is found, print it (same layout as with labels).
9193 2008-06-04 Robert Millan <rmh@aybabtu.com>
9195 * util/biosdisk.c (get_drive): Rename to ...
9196 (find_grub_drive): ... this. Update all users.
9198 (get_os_disk): Rename to ...
9199 (convert_system_partition_to_system_disk): ... this. Update all users.
9201 (find_drive): Rename to ...
9202 (find_system_device): ... this. Update all users.
9204 2008-06-04 Robert Millan <rmh@aybabtu.com>
9206 * util/biosdisk.c (get_os_disk): Handle IDA devices.
9207 * util/grub-mkdevicemap.c (get_mmc_disk_name)
9208 (make_device_map): Likewise.
9210 2008-06-01 Robert Millan <rmh@aybabtu.com>
9212 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
9213 before dereferencing it.
9215 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
9216 union with fat12/fat16-specific ones. Add some new fields, including
9217 `num_serial' for both versions.
9218 (struct grub_fat_data): Add `uuid' member.
9219 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
9220 names. Initialize `data->uuid' using `num_serial'.
9221 (grub_fat_uuid): New function.
9222 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
9224 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
9225 (grub_reiserfs_uuid): New function.
9226 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
9229 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
9230 (grub_xfs_uuid): New function.
9231 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
9233 2008-06-01 Robert Millan <rmh@aybabtu.com>
9235 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
9236 code that is backward compatible with pre-uuid search command.
9238 2008-05-31 Robert Millan <rmh@aybabtu.com>
9240 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
9241 floppies after everything else, to ensure floppy drive isn't accessed
9242 unnecessarily (patch from Bean).
9244 2008-05-31 Robert Millan <rmh@aybabtu.com>
9246 * commands/search.c (search_label, search_fs_uuid, search_file): Do
9247 not print device names when we were asked to set a variable.
9249 2008-05-31 Robert Millan <rmh@aybabtu.com>
9251 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
9252 using "cursor-on" and "cursor-off" commands (understood at least by
9253 the Open Firmware flavour on OLPC).
9255 2008-05-31 Michael Gorven <michael@gorven.za.net>
9257 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
9258 on and off sequences.
9260 2008-05-31 Robert Millan <rmh@aybabtu.com>
9262 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
9263 * util/update-grub.in: Likewise.
9265 2008-05-30 Pavel Roskin <proski@gnu.org>
9267 * util/biosdisk.c (linux_find_partition): Simplify logic and
9268 make the code more universal. Keep special processing for
9269 devfs, but use a simple rule for all other devices. If the
9270 device ends with a number, append 'p' and the partition number.
9271 Otherwise, append only the partition number.
9273 2008-05-30 Robert Millan <rmh@aybabtu.com>
9275 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
9276 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
9277 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
9278 the `root' parameter to Linux.
9280 2008-05-30 Robert Millan <rmh@aybabtu.com>
9282 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
9283 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
9284 --fs_uuid with --fs-uuid.
9285 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
9286 all filesystems support them).
9288 2008-05-30 Robert Millan <rmh@aybabtu.com>
9290 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
9291 grub_printf() flags, since we're printing in units of 2 bytes.
9293 2008-05-30 Robert Millan <rmh@aybabtu.com>
9295 * util/grub.d/00_header.in: Remove obsolete comment referencing
9296 convert_system_path_to_grub_path().
9297 * util/update-grub.in: Likewise.
9298 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
9299 (convert_system_path_to_grub_path): Add a warning message explaining
9300 that this function is deprecated. Rely on is_path_readable_by_grub()
9301 for the readability checks.
9302 (font_path): Use is_path_readable_by_grub() for the readability
9303 check rather than convert_system_path_to_grub_path().
9305 2008-05-30 Robert Millan <rmh@aybabtu.com>
9307 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
9308 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
9309 converting it first.
9310 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
9311 grub.cfg for access to font file, and afterwards call it again to set
9314 2008-05-30 Robert Millan <rmh@aybabtu.com>
9316 * commands/search.c (options): Add --fs_uuid option.
9317 (search_fs_uuid): New function.
9318 (grub_cmd_search): Fix --set argument passing.
9319 Use search_fs_uuid() when requested via --fs_uuid.
9320 (grub_search_init): Update help message.
9321 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
9322 and redeclare it as an array of 16-bit words.
9323 (grub_ext2_uuid): New function.
9324 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
9325 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
9326 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
9327 (GRUB_DEVICE_BOOT_UUID): New variables.
9328 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
9329 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
9331 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
9332 just assume `root' variable has the right value.
9333 * util/grub.d/10_linux.in: Likewise.
9334 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
9336 (main): Recognise `-t fs_uuid' argument.
9338 2008-05-30 Robert Millan <rmh@aybabtu.com>
9340 * util/biosdisk.c (map): Redefine structure to hold information
9341 about GRUB drive name.
9342 (get_drive): Reimplement without assuming (and verifying) BIOS-like
9344 (call_hook): Remove.
9345 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
9346 member. Assume drive has partitions.
9347 (grub_util_biosdisk_open): Access device names via `.device' struct
9349 (open_device): Likewise.
9350 (find_drive): Likewise.
9351 (read_device_map): Adjust map[] usage to match the new struct
9352 definition. Don't check for duplicates (still possible, but not cheap
9354 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
9355 (make_device_name): Remove assumption of BIOS-like drive names.
9357 2008-05-30 Pavel Roskin <proski@gnu.org>
9359 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
9360 compiling execute.c doesn't need grub_script.tab.h anymore.
9361 (normal/command.c_DEPENDENCIES): Likewise.
9362 (normal/function.c_DEPENDENCIES): Likewise.
9363 * conf/i386-ieee1275.rmk: Likewise.
9364 * conf/i386-linuxbios.rmk: Likewise.
9365 * conf/i386-pc.rmk: Likewise.
9366 * conf/powerpc-ieee1275.rmk: Likewise.
9367 * conf/sparc64-ieee1275.rmk: Likewise.
9369 2008-05-29 Pavel Roskin <proski@gnu.org>
9371 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
9372 when scanning metadata for volume group name.
9374 * include/grub/script.h: Don't include grub_script.tab.h. It's
9375 a generated file, which may only be included from the files with
9376 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
9377 use union YYSTYPE, as the later allows forward declaration.
9378 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
9380 2008-05-29 Robert Millan <rmh@aybabtu.com>
9382 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
9383 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
9384 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
9385 (grub_console_checkkey): Add grub_dprintf() call to report unknown
9388 2008-05-29 Robert Millan <rmh@aybabtu.com>
9390 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
9391 control key combinations.
9393 2008-05-29 Robert Millan <rmh@aybabtu.com>
9395 * util/powerpc/ieee1275/grub-install.in: Move from here ...
9396 * util/ieee1275/grub-install.in: ... to here.
9397 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
9398 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
9399 (grub_install_SOURCES): Likewise.
9401 2008-05-29 Robert Millan <rmh@aybabtu.com>
9403 * fs/affs.c: Update copyright year.
9404 * fs/ext2.c: Likewise.
9405 * fs/fshelp.c: Likewise.
9406 * fs/hfsplus.c: Likewise.
9407 * fs/ntfs.c: Likewise.
9408 * fs/xfs.c: Likewise.
9409 * include/grub/fshelp.h: Likewise.
9410 * util/grub-mkdevicemap.c: Likewise.
9412 2008-05-28 Robert Millan <rmh@aybabtu.com>
9414 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
9415 might need to be fatfs to support some firmware implementations
9418 2008-05-28 Robert Millan <rmh@aybabtu.com>
9420 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
9422 * util/grub-mkdevicemap.c (get_mmc_disk_name)
9423 (make_device_map): Likewise.
9425 2008-05-20 Bean <bean123ch@gmail.com>
9427 * fs/fshelp.c (grub_fshelp_map_block): New function.
9428 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
9429 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
9431 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
9432 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
9433 (grub_fshelp_journal): New structure.
9434 (grub_fshelp_map_block): New function prototype.
9435 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
9436 (grub_fshelp_map_block): Likewise.
9438 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
9439 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
9440 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
9441 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
9442 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
9443 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
9444 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
9445 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
9446 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
9447 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
9448 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
9449 (grub_ext2_sblock): New members for journal support.
9450 (grub_ext3_journal_header): New structure.
9451 (grub_ext3_journal_revoke_header): Likewise.
9452 (grub_ext3_journal_block_tag): Likewise.
9453 (grub_ext3_journal_sblock): Likewise.
9454 (grub_fshelp_node): New members logfile and journal.
9455 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
9456 grub_fshelp_map_block to get real block number.
9457 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
9459 (grub_ext2_read_inode): Likewise.
9460 (grub_ext3_get_journal): New function.
9461 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
9462 (grub_ext2_close): Release memory used by journal.
9464 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
9465 (REISERFS_MAGIC_DESC_BLOCK): New macro.
9466 (grub_reiserfs_transaction_header): Renamed to
9467 grub_reiserfs_description_block, replace field data with real_blocks.
9468 (grub_reiserfs_commit_block): New structure.
9469 (grub_reiserfs_data): New member journal.
9470 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
9472 (grub_reiserfs_read_symlink): Likewise.
9473 (grub_reiserfs_iterate_dir): Likewise.
9474 (grub_reiserfs_open): Likewise.
9475 (grub_reiserfs_read): Likewise.
9476 (grub_reiserfs_get_journal): New function.
9477 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
9478 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
9479 using grub_reiserfs_get_journal.
9480 (grub_reiserfs_close): Release memory used by journal.
9482 * fs/affs.c (grub_affs_read_block): Change block type to
9483 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
9485 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
9487 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
9489 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
9491 * fs/udf.c (grub_udf_read_block): Change block type to
9492 grub_disk_addr_t. Use type cast to avoid warning.
9494 * fs/xfs.c (grub_xfs_read_block): Likewise.
9496 2008-05-16 Christian Franke <franke@computer.org>
9498 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
9499 to ensure that break with ESC will always work.
9500 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
9501 Remove ESC from keyboard queue.
9503 2008-05-16 Christian Franke <franke@computer.org>
9505 * util/biosdisk.c: [__CYGWIN__] Add includes.
9506 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
9507 (get_os_disk): Move variable declarations to OS specific
9508 parts to avoid warning.
9509 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
9510 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
9511 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
9513 * util/getroot.c: [__CYGWIN__] Add includes.
9514 (strip_extra_slashes): Fix "/" case.
9515 [__CYGWIN__] (get_win32_path): New function.
9516 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
9517 [__CYGWIN__] (find_root_device): Disable.
9518 [__CYGWIN__] (get_bootsec_serial): New function.
9519 [__CYGWIN__] (find_cygwin_root_device): Likewise.
9520 [__linux__] (grub_guess_root_device): Add early returns to simplify
9522 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
9523 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
9524 check for Linux only.
9526 2008-05-15 Bean <bean123ch@gmail.com>
9528 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
9529 keyboard hang problem in apple's intel mac.
9531 2008-05-09 Robert Millan <rmh@aybabtu.com>
9533 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
9535 * util/grub-mkdevicemap.c (get_virtio_disk_name)
9536 (make_device_map): Likewise.
9537 Reported by Aurelien Jarno <aurel32@debian.org>
9539 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
9541 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
9542 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
9543 (make_device_map): Output entries for xvd type disks.
9545 2008-05-07 Robert Millan <rmh@aybabtu.com>
9547 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
9549 * util/grub-mkdevicemap.c (get_cciss_disk_name)
9550 (make_device_map): Likewise.
9551 Reported by Roland Dreier <rdreier@cisco.com>
9553 2008-05-07 Robert Millan <rmh@aybabtu.com>
9555 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
9556 grub_strstr() call. Correct a few mistakes in failure path handling.
9558 2008-05-06 Robert Millan <rmh@aybabtu.com>
9560 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
9561 Do not print a trailing slash (therefore, the root directory is an
9563 (convert_system_path_to_grub_path): Do not remove trailing slash
9564 from make_system_path_relative_to_its_root() output.
9566 * util/i386/pc/grub-install.in: Add trailing slash to output from
9567 make_system_path_relative_to_its_root().
9569 2008-05-06 Robert Millan <rmh@aybabtu.com>
9571 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
9572 ensures that output lines aren't intermangled with those sent to
9573 stderr (via grub_util_info()).
9574 * util/grub-probe.c (grub_refresh): Likewise.
9575 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
9577 2008-05-05 Christian Franke <franke@computer.org>
9579 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
9580 Add Cygwin device names.
9581 (get_ide_disk_name) [__CYGWIN__]: Likewise.
9582 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
9583 (check_device): Return error instead of success on empty name.
9584 (make_device_map): Move label inside linux specific code to
9585 prevent compiler warning.
9587 2008-04-30 Robert Millan <rmh@aybabtu.com>
9589 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
9590 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
9592 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
9594 2008-04-29 Robert Millan <rmh@aybabtu.com>
9596 * docs/grub.cfg: New file (example GRUB configuration).
9598 2008-04-26 Robert Millan <rmh@aybabtu.com>
9600 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
9601 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
9602 and `disk/ieee1275/nand.c'.
9604 2008-04-25 Bean <bean123ch@gmail.com>
9606 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
9609 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
9610 change the buffer size to 4096 for cdrom device.
9612 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
9614 (_linux_mod_SOURCES): New variable.
9615 (_linux_mod_CFLAGS): Likewise.
9616 (_linux_mod_LDFLAGS): Likewise.
9617 (linux_mod_SOURCES): Likewise.
9618 (linux_mod_CFLAGS): Likewise.
9619 (linux_mod_LDFLAGS): Likewise.
9620 (nand_mod_SOURCES): Likewise.
9621 (nand_mod_CFLAGS): Likewise.
9622 (nand_mod_LDFLAGS): Likewise.
9624 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
9625 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
9626 type property. (nand device in olpc don't have this property)
9628 * include/grub/disk.h (grub_disk_dev_id): New macro
9629 GRUB_DISK_DEVICE_NAND_ID.
9631 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
9633 (grub_rescue_cmd_initrd): Likewise.
9635 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
9636 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
9637 ofw_cif_handler and ofw_idt, adjust padding number.
9639 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
9640 GRUB_MACHINE_IEEE1275 is defined.
9642 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
9643 Use NESTED_FUNC_ATTR attribute on the hook parameter.
9645 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
9646 on nested function heap_init.
9647 (grub_upper_mem): New variable for i386-ieee1275.
9648 (grub_get_extended_memory): New function for i386-ieee1275.
9649 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
9651 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
9652 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
9655 * loader/i386/ieee1275/linux.c: New file.
9657 * loader/i386/ieee1275/linux_normal.c: New file.
9659 * disk/ieee1275/nand.c: New file.
9661 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
9663 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
9665 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
9667 2008-04-18 Robert Millan <rmh@aybabtu.com>
9669 Restructures early code path on ieee1275 to unify grub_main() as
9670 the first C function that is executed in every platform.
9672 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
9673 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
9675 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
9676 * kern/ieee1275/cmain.c (cmain): Rename to ...
9677 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
9678 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
9681 2008-04-18 Robert Millan <rmh@aybabtu.com>
9683 * util/update-grub.in: Fix syntax error when setting
9684 `GRUB_PRELOAD_MODULES'.
9685 Reported by Stephane Chazelas <stephane@artesyncp.com>
9687 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
9689 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
9690 section into account, newer toolchains generate unique build ids
9691 * configure.ac: remove the test for --build-id=none acceptance,
9692 we want build ids to be preserved
9693 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
9694 far from other sections don't cause the raw binary images grow
9697 2008-04-15 Robert Millan <rmh@aybabtu.com>
9699 * disk/lvm.c: Update copyright year.
9700 * kern/misc.c: Likewise.
9702 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
9704 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
9705 there is no memory left for physical volume name.
9707 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
9709 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
9710 volume name mapping to support bigger than 9 character names properly.
9712 2008-04-13 Robert Millan <rmh@aybabtu.com>
9714 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
9715 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
9717 2008-04-13 Christian Franke <franke@computer.org>
9719 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
9720 to create a floppy emulation boot CD when non emulation mode
9722 Enable Joliet CD filesystem extension.
9724 2008-04-13 Robert Millan <rmh@aybabtu.com>
9726 * kern/misc.c (grub_strncat): Fix off-by-one error.
9727 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
9729 * kern/env.c (grub_env_context_close): Clear current context, not
9731 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
9733 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
9735 2008-04-13 Robert Millan <rmh@aybabtu.com>
9737 Improve robustness when handling LVM.
9739 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
9740 (and leave `*p' unmodified).
9741 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
9743 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
9744 iterating through it.
9745 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
9747 (grub_lvm_scan_device): Check the return value (and fail gracefully
9748 when due) on each grub_lvm_getvalue() or grub_strstr() call.
9749 Don't assume `vg->pvs != NULL' when iterating through it.
9751 2008-04-13 Robert Millan <rmh@aybabtu.com>
9753 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
9754 * genmk.rb (partmap): New variable.
9755 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
9756 (#{partmap}): New target rule.
9757 * genpartmaplist.sh: New file.
9758 * Makefile.in (pkglib_DATA): Add partmap.lst.
9759 (partmap.lst): New target rule.
9760 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
9761 modules (including all partition maps), instead of preloading them.
9763 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
9765 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
9766 `linux-boot-prober' (if installed) to detect other operating
9767 systems which are installed on the computer and add them to
9769 * conf/common.rmk: Build and install 30_os-prober.
9771 2008-04-12 Robert Millan <rmh@aybabtu.com>
9773 * kern/powerpc/ieee1275/init.c: Move from here ...
9774 * kern/ieee1275/init.c: ... to here. Update all users.
9776 * kern/powerpc/ieee1275/cmain.c: Move from here ...
9777 * kern/ieee1275/cmain.c: ... to here. Update all users.
9779 * kern/powerpc/ieee1275/openfw.c: Move from here ...
9780 * kern/ieee1275/openfw.c: ... to here. Update all users.
9782 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
9783 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
9785 2008-04-10 Pavel Roskin <proski@gnu.org>
9787 * configure.ac: Always use "_cv_" in cache variables for
9788 compatibility with Autoconf 2.62.
9790 2008-04-07 Robert Millan <rmh@aybabtu.com>
9792 Revert grub/machine/init.h addition by Pavel (since it breaks on
9793 i386-ieee1275 and others):
9794 * util/i386/pc/misc.c: Remove grub/machine/init.h.
9795 * util/powerpc/ieee1275/misc.c: Likewise.
9797 2008-04-07 Robert Millan <rmh@aybabtu.com>
9799 * util/grub-probe.c (probe): Improve error message.
9801 2008-04-07 Robert Millan <rmh@aybabtu.com>
9803 * util/biosdisk.c (read_device_map): Skip devices that don't exist
9804 (this prevents the presence of a bogus entry from ruining the whole
9807 2008-04-06 Pavel Roskin <proski@gnu.org>
9809 * util/biosdisk.c: Include grub/util/biosdisk.h.
9810 * util/grub-fstest.c (execute_command): Make static.
9811 * util/grub-mkdevicemap.c (check_device): Likewise.
9812 * util/i386/pc/misc.c: Include grub/machine/init.h.
9813 * util/powerpc/ieee1275/misc.c: Likewise.
9814 * util/lvm.c: Include grub/util/lvm.h.
9815 * util/misc.c: Include grub/kernel.h, grub/misc.h and
9817 * util/raid.c: Include grub/util/raid.h.
9818 (grub_util_getdiskname): Make static.
9820 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
9821 grub_hostfs_fini(), as they are called from grub_init_all() and
9822 grub_fini_all() respectively. This fixes an infinite loop in
9823 grub-fstest due to double registration of hostfs.
9824 Reported by Christian Franke <Christian.Franke@t-online.de>
9826 2008-04-05 Pavel Roskin <proski@gnu.org>
9828 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
9829 all 8 functions. Otherwise, probe function 0 only.
9831 2008-04-04 Pavel Roskin <proski@gnu.org>
9833 * commands/lspci.c (grub_lspci_iter): Print the bus number
9836 * commands/lspci.c (grub_pci_classes): Fix typos.
9837 (grub_lspci_iter): Don't print func twice. Print vendor ID
9838 before device ID, as it's normally done.
9840 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9841 Fix signedness warnings.
9842 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
9844 * util/ieee1275/get_disk_name.c: Include config.h so that
9845 _GNU_SOURCE is defined and getline() is declared. Mark an
9846 unused argument as such. Fix a signedness warning.
9848 2008-04-02 Pavel Roskin <proski@gnu.org>
9850 * genkernsyms.sh.in: Use more robust assignments for CC and
9851 srcdir. Quote srcdir.
9852 * gensymlist.sh.in: Likewise. Assert at the compile time that
9853 the symbol table is not empty.
9855 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
9856 * fs/cpio.c (grub_cpio_read): Likewise.
9858 2008-04-01 Pavel Roskin <proski@gnu.org>
9860 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
9861 * disk/host.c (grub_host_open): Likewise.
9862 * disk/loopback.c (grub_loopback_open): Likewise.
9863 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
9864 disk->id as in disk/host.c, not a multi-character constant.
9866 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
9867 later is obsolete, potentially dangerous and sets a bad example.
9868 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
9869 * util/misc.c (grub_util_get_image_size): Likewise.
9871 * disk/loopback.c (options): Improve help for "--partitions".
9873 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
9874 options to align them with the short options, e.g. "echo -e".
9876 2008-03-31 Bean <bean123ch@gmail.com>
9878 * video/reader/png.c (grub_png_data): New member is_16bit and
9880 (grub_png_decode_image_header): Detect 16 bit png image.
9881 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
9882 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
9883 (grub_video_reader_png): Release memory occupied by image_data.
9885 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
9887 (grub_nfs_mount): Skip the test for sector per cluster.
9889 * include/grub/ntfs.h (MAX_SPC): Removed.
9891 2008-03-31 Bean <bean123ch@gmail.com>
9893 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
9894 (grub_probe_SOURCES): Add fs/afs.c.
9895 (grub_fstest_SOURCES): Likewise.
9896 (afs_mod_SOURCES): New variable.
9897 (afs_mod_CFLAGS): Likewise.
9898 (afs_mod_LDFLAGS): Likewise.
9900 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
9901 (grub_emu_SOURCES): Likewise.
9903 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9905 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9907 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9909 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9911 * fs/afs.c: New file.
9913 2008-03-30 Pavel Roskin <proski@gnu.org>
9915 * disk/host.c: Include grub/misc.h to fix a warning.
9916 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
9917 warnings about implicit declarations.
9919 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
9921 * include/grub/i386/loader.h: Change declaration of
9922 grub_linux_boot() to match what grub_loader_set() expects.
9923 * util/getroot.c (grub_guess_root_device): Return const char* to
9925 * util/grub-probe.c (probe): Fix a warning about uninitialized
9926 abstraction_name variable.
9927 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
9928 second argument as unused to fix a warning.
9930 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
9931 missing grub_error() call.
9933 * util/update-grub_lib.in: Define datarootdir, since Autoconf
9934 2.60 and newer uses it to define datadir.
9936 * commands/sleep.c: Fix warning about implicit declaration.
9937 * disk/memdisk.c: Likewise.
9938 * loader/aout.c: Likewise.
9939 * loader/i386/bsd_normal.c: Likewise.
9940 * util/grub-probe.c: Likewise.
9942 * commands/i386/cpuid.c (has_longmode): Make static.
9943 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
9944 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
9946 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
9947 GDT. This is more robust, as %ds can change.
9948 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
9949 calling real_to_prot().
9950 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
9952 2008-03-28 Pavel Roskin <proski@gnu.org>
9954 * kern/i386/pc/startup.S: Assert that uncompressed functions
9955 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
9956 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
9957 code, as they push parts of the code (error handlers) beyond
9958 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
9959 code as correctness and size.
9961 2008-03-28 Pavel Roskin <proski@gnu.org>
9963 * kern/i386/pc/startup.S
9964 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
9965 data block address to the real mode, keep offset minimal. This
9966 works around a bug in AWARD BIOS on old Athlon systems, which
9967 makes CD detection hang.
9969 2008-03-26 Pavel Roskin <proski@gnu.org>
9971 * normal/color.c (grub_parse_color_name_pair): Make `name' a
9973 * include/grub/normal.h: Add grub_parse_color_name_pair()
9976 2008-03-24 Bean <bean123ch@gmail.com>
9978 * disk/i386/pc/biosdisk.c (cd_start): Removed.
9979 (cd_count): Removed.
9980 (cd_drive): New variable.
9981 (grub_biosdisk_get_drive): Don't check for (cdN) device.
9982 (grub_biosdisk_call_hook): Likewise.
9983 (grub_biosdisk_iterate): Change cdrom detection method.
9984 (grub_biosdisk_open): Replace cd_start with cd_drive.
9985 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
9986 detect cdrom device.
9988 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
9990 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
9991 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
9992 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
9993 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
9994 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
9995 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
9996 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
9997 (grub_biosdisk_cdrp): New structure.
9998 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
10000 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
10002 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
10005 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
10008 2008-03-20 Robert Millan <rmh@aybabtu.com>
10010 Remove 2 TiB limit in ata.mod.
10011 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
10012 (grub_ata_dumpinfo): Print sector count with 0x%llx.
10013 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
10014 grub_uint64_t instead of grub_uint32_t.
10016 2008-03-05 Bean <bean123ch@gmail.com>
10018 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
10019 (grub_multiboot): Set boot device.
10021 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
10023 2008-03-02 Bean <bean123ch@gmail.com>
10025 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
10028 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
10030 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
10033 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
10036 * docs/fdl.texi: New file.
10038 * docs/mdate-sh: New file. Copied from gnulib.
10039 * docs/texinfo.tex: Likewise.
10041 * config.guess: Updated from gnulib.
10042 * install-sh: Likewise.
10044 2008-02-28 Robert Millan <rmh@aybabtu.com>
10046 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
10047 (aout_mod_SOURCES): New variable.
10048 (aout_mod_CFLAGS): Likewise.
10049 (aout_mod_LDFLAGS): Likewise.
10051 * conf/i386-ieee1275.rmk: Likewise.
10053 2008-02-28 Robert Millan <rmh@aybabtu.com>
10055 * util/update-grub.in: Reorganise terminal validity check. Accept
10056 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
10057 Based on suggestion by Franklin PIAT.
10059 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
10061 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
10063 * util/getroot.c (grub_util_check_block_device): New function that
10064 returns the given argument if it is a block device and returns NULL else.
10065 * util/grub-probe.c (argument_is_device): New variable.
10066 (probe): Promote device_name from a variable to an argument. Receive
10067 device_name from grub_util_check_block_device() if path is NULL and from
10068 grub_guess_root_device() else. Do not free() device_name anymore.
10069 (options): Introduce new parameter '-d, --device'.
10070 (main): Add description of the new parameter to the help screen.
10071 Rename path variable to argument. Set argument_is_device if the '-d'
10072 option is given. Pass argument to probe() depending on
10073 argument_is_device.
10075 2008-02-24 Bean <bean123ch@gmail.com>
10077 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
10078 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
10079 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
10080 (GRUB_ISO9660_VOLDESC_PART): Likewise.
10081 (GRUB_ISO9660_VOLDESC_END): Likewise.
10082 (grub_iso9660_primary_voldesc): New member escape.
10083 (grub_iso9660_data): New member joliet.
10084 (grub_iso9660_convert_string): New function.
10085 (grub_iso9660_mount): Detect joliet extension.
10086 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
10087 (grub_iso9660_iso9660_label): Likewise.
10089 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
10090 (grub_setup_SOURCES): Add fs/udf.c.
10091 (grub_fstest_SOURCES): Likewise.
10092 (udf_mod_SOURCES): New variable.
10093 (udf_mod_CFLAGS): Likewise.
10094 (udf_mod_LDFLAGS): Likewise.
10096 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
10097 (grub_emu_SOURCES): Likewise.
10099 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10101 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10103 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10105 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10107 * fs/udf.c: New file.
10109 2008-02-24 Robert Millan <rmh@aybabtu.com>
10111 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
10112 (normal/lexer.c_DEPENDENCIES): New variables.
10113 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10114 (normal/lexer.c_DEPENDENCIES): Likewise.
10115 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
10116 (normal/lexer.c_DEPENDENCIES): Likewise.
10117 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
10118 (normal/lexer.c_DEPENDENCIES): Likewise.
10119 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10120 (normal/lexer.c_DEPENDENCIES): Likewise.
10121 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
10122 (normal/lexer.c_DEPENDENCIES): Likewise.
10124 2008-02-23 Robert Millan <rmh@aybabtu.com>
10126 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
10127 since they were intended to be in hex. This didn't break previously
10128 because of a bug in gpt_partition_map_iterate() (see below).
10130 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
10131 when checking the validity of GPT header.
10132 Remove `partno', since it always provides the same information as `i'.
10134 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
10136 * include/grub/efi/time.h: Fix a wrong comment.
10138 2008-02-19 Pavel Roskin <proski@gnu.org>
10140 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
10143 2008-02-19 Bean <bean123ch@gmail.com>
10145 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
10146 (aout_mod_SOURCES): New variable.
10147 (aout_mod_CFLAGS): Likewise.
10148 (aout_mod_LDFLAGS): Likewise.
10149 (_bsd_mod_SOURCES): New variable.
10150 (_bsd_mod_CFLAGS): Likewise.
10151 (_bsd_mod_LDFLAGS): Likewise.
10152 (bsd_mod_SOURCES): New variable.
10153 (bsd_mod_CFLAGS): Likewise.
10154 (bsd_mod_LDFLAGS): Likewise.
10156 * include/grub/aout.h: New file.
10158 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
10160 * include/grub/i386/bsd.h: New file.
10162 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
10165 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
10166 function is called, so that it's possible to change it inside the hook.
10167 (grub_elf64_load): Likewise.
10168 (grub_elf_file): Don't close the file if elf header is not found.
10169 (grub_elf_close): Close the file if grub_elf_file fails (The new
10170 grub_elf_file won't close it).
10171 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
10172 (grub_elf64_size): Likewise.
10174 * kern/i386/loader.S (grub_unix_real_boot): New function.
10176 * loader/aout.c: New file.
10178 * loader/i386/bsd.c: New file.
10180 * loader/i386/bsd_normal.c: New file.
10182 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
10184 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
10185 can test other formats.
10187 2008-02-19 Robert Millan <rmh@aybabtu.com>
10189 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
10190 (grub_gpt_partition_type_empty): Redefine with macro from
10191 `<grub/gpt_partition.h>'.
10192 (gpt_partition_map_iterate): Adjust partition type comparison.
10194 Export `entry' as partmap-specific `part.data' struct.
10195 (grub_gpt_header, grub_gpt_partentry): Move from here ...
10197 * include/grub/gpt_partition.h (grub_gpt_header)
10198 (grub_gpt_partentry): ... to here (new file).
10200 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
10202 (grub_gpt_partition_type_bios_boot): New const variable, defined
10203 with macro from `<grub/gpt_partition.h>'.
10205 (setup): Replace `first_start' with `embed_region', which keeps
10206 track of the embed region (and is partmap-agnostic).
10208 Replace find_first_partition_start() with find_usable_region(),
10209 which finds a usable region for embedding using partmap-specific
10210 knowledge (supports PC/MSDOS and GPT).
10212 Fix all assumptions that the embed region start at sector 1, using
10213 `embed_region.start' from now on. Similarly, use `embed_region.end'
10214 rather than `first_start' to calculate available size.
10216 In grub_util_info() message, replace "into after the MBR" with an
10217 indication of the specific sector our embed region starts at.
10219 2008-02-19 Robert Millan <rmh@aybabtu.com>
10221 * DISTLIST: Replace `commands/ieee1275/halt.c' and
10222 `commands/ieee1275/reboot.c' with `commands/halt.c' and
10223 `commands/reboot.c'.
10224 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10225 (halt_mod_SOURCES): Likewise.
10226 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
10227 (halt_mod_SOURCES): Likewise.
10229 2008-02-17 Christian Franke <franke@computer.org>
10231 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
10233 2008-02-17 Robert Millan <rmh@aybabtu.com>
10235 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10236 set `first_start' to 0 for non-PC/MSDOS partition maps.
10238 2008-02-16 Robert Millan <rmh@aybabtu.com>
10240 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
10241 do not assume partition map is PC/MSDOS before performing checks that
10242 are specific to that layout.
10244 2008-02-13 Robert Millan <rmh@aybabtu.com>
10246 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
10247 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
10248 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
10250 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
10252 * configure.ac: Only a cosmetic change on the handling of
10253 -fno-stack-protector.
10255 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
10257 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
10258 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
10260 (grub_install_SOURCES): Add halt.mod and reboot.mod.
10261 (halt_mod_SOURCES): New variable.
10262 (halt_mod_CFLAGS): Likewise.
10263 (halt_mod_LDFLAGS): Likewise.
10264 (reboot_mod_SOURCES): Likewise.
10265 (reboot_mod_CFLAGS): Likewise.
10266 (reboot_mod_LDFLAGS): Likewise.
10268 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
10269 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
10271 (halt_mod_SOURCES): Likewise.
10272 (reboot_mod_SOURCES): Likewise.
10274 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
10275 commands/i386/pc/reboot.c by commands/reboot.c.
10276 (reboot_mod_SOURCES): Likewise.
10278 * commands/i386/pc/reboot.c: merge this file ...
10280 * commands/ieee1275/reboot.c: ... and this file ...
10282 * commands/reboot.c: ... to this file.
10283 Add some precompiler directive to include the correct header for
10286 * commands/ieee1275/halt.c: move this file ...
10288 * commands/halt.c: ... to here.
10289 Add some precompiler directive to include the correct header for
10292 * include/grub/efi/efi.h (grub_reboot): New function declaration.
10293 (grub_halt): Likewise.
10295 * kern/efi/efi.c (grub_reboot): New function.
10296 (grub_halt): Likewise.
10298 2008-02-12 Robert Millan <rmh@aybabtu.com>
10300 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
10301 /dev (like it is done for /dev/mapper). This doesn't provide support
10302 for EVMS, but at least it is now easy to identify the problem when it
10305 2008-02-11 Robert Millan <rmh@aybabtu.com>
10307 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
10308 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
10309 comparing it with -1, not 0.
10311 2008-02-10 Robert Millan <rmh@aybabtu.com>
10313 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
10315 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10316 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
10318 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
10319 `disk/lvm.c' to the end of the list.
10320 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10321 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10323 2008-02-10 Robert Millan <rmh@aybabtu.com>
10325 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
10326 grub_print_error() instead. This will let user know why we're entering
10328 Based on suggestions from Sam Morris.
10330 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
10332 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
10333 on remaining N args, instead of "--" arg N times.
10335 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
10337 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
10338 (fill_with_default_glyph): Changed to use unknown_glyph for fill
10339 pattern for unknown glyphs.
10341 2008-02-09 Robert Millan <rmh@aybabtu.com>
10343 * configure.ac: Probe for `help2man'.
10344 * Makefile.in (builddir): New variable.
10345 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
10346 or otherwise add a few flags/options to it.
10347 (install-local): For every executable utility or script that is
10348 installed, invoke $(HELP2MAN) to install a manpage based on --help
10351 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
10352 that it doesn't prevent --help from working in build tree.
10354 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
10355 with `bug-grub@gnu.org'.
10356 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
10357 * util/update-grub.in (usage): New function.
10358 Implement proper argument check, with support for --help and --version
10359 (as well as existing -y).
10361 2008-02-09 Christian Franke <franke@computer.org>
10363 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
10364 avoid overwriting previous output.
10365 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
10367 2008-02-09 Robert Millan <rmh@aybabtu.com>
10369 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
10372 2008-02-09 Robert Millan <rmh@aybabtu.com>
10374 * commands/sleep.c: New file.
10375 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
10376 (sleep_mod_SOURCES): New variable.
10377 (sleep_mod_CFLAGS): Likewise.
10378 (sleep_mod_LDFLAGS): Likewise.
10380 2008-02-09 Robert Millan <rmh@aybabtu.com>
10382 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
10383 situations in which we can deduce the RAID size and the superblock
10386 2008-02-09 Robert Millan <rmh@aybabtu.com>
10388 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
10389 and return a grub_diskmemberlist_t composed of LVM physical volumes.
10390 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
10392 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
10393 and return a grub_diskmemberlist_t composed of physical array members.
10394 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
10396 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
10398 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
10399 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
10400 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
10402 * util/grub-probe.c (probe): Move partmap probing code from here ...
10403 (probe_partmap): ... to here.
10404 (probe): Use probe_partmap() once for the disk we're probing, and
10405 additionally, when such disk contains a memberlist() struct member,
10406 once for each disk that is contained in the structure returned by
10409 2008-02-09 Robert Millan <rmh@aybabtu.com>
10411 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
10412 environment variable to 'all' in order to obtain debug output from
10414 * util/i386/pc/grub-setup.c (main): Likewise.
10416 2008-02-08 Robert Millan <rmh@aybabtu.com>
10418 * disk/raid.c (grub_raid_scan_device): Check for
10419 `array->device[sb.this_disk.number]' rather than for
10420 `array->device[sb.this_disk.number]->name', since the latter is not
10421 guaranteed to be accessible.
10423 2008-02-08 Robert Millan <rmh@aybabtu.com>
10425 * disk/raid.c: Update copyright.
10426 * fs/cpio.c: Likewise.
10427 * include/grub/raid.h: Likewise.
10428 * loader/i386/pc/multiboot.c: Likewise.
10429 * util/hostfs.c: Likewise.
10431 2008-02-08 Robert Millan <rmh@aybabtu.com>
10433 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
10434 to a grub_disk_t array.
10435 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
10437 (grub_raid_scan_device): Replace `device[x].name' accesses with
10438 `device[x]->name'. Simplify initialization of `array->device[x]'.
10440 2008-02-08 Robert Millan <rmh@aybabtu.com>
10442 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
10443 grub_dprintf() calls.
10444 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
10447 2008-02-07 Christian Franke <franke@computer.org>
10449 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
10450 instead of fseek and ftell to support large files.
10451 (grub_hostfs_read): Likewise.
10453 2008-02-07 Robert Millan <rmh@aybabtu.com>
10455 Patch from Jeroen Dekkers.
10456 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
10457 failure, since successfully reading all array members might not be
10460 2008-02-06 Robert Millan <rmh@aybabtu.com>
10462 * util/grub-probe.c (probe): Simplify partmap probing (with the
10463 assumption that the first word up to the underscore equals to
10466 2008-02-06 Christian Franke <franke@computer.org>
10468 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
10469 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
10470 last block of a cpio or tar stream.
10471 Check for "TRAILER!!!" instead of any empty data
10472 block to detect last block of a cpio stream.
10473 (grub_cpio_dir): Fix constness of variable np.
10474 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
10475 cpio or tar trailer is detected. This fixes a crash
10476 on open of a non existing file.
10478 2008-02-05 Bean <bean123ch@gmail.com>
10480 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
10482 (grub_multiboot_load_elf64): Likewise.
10483 (grub_multiboot): Initialize mbi structure.
10485 * util/grub-fstest.c: Don't include unused header file script.h.
10487 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
10489 (grub_fstest_SOURCES): Likewise.
10491 2008-02-05 Robert Millan <rmh@aybabtu.com>
10493 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
10494 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
10495 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
10496 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
10498 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
10499 (translation_table): Replace hardcoded values with macros
10500 provided by `<grub/term.h>'.
10502 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
10503 (keyboard_map): Correct/add a few values, with macros provided
10504 by `<grub/term.h>'.
10505 (keyboard_map_shift): Zero values that don't differ from their
10506 `keyboard_map' equivalents.
10507 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
10508 Discard the second scan code that is always sent by Caps lock.
10509 Only use `keyboard_map_shift' when it provides a non-zero value,
10510 otherwise fallback to `keyboard_map'.
10512 2008-02-04 Bean <bean123ch@gmail.com>
10514 * Makefile.in (enable_grub_fstest): New variable.
10516 * conf/common.rmk (grub_fstest_init.lst): New rule.
10517 (grub_fstest_init.h): Likewise.
10518 (grub_fstest_init.c): Likewise.
10519 (util/grub-fstest.c_DEPENDENCIES): New variable.
10520 (grub_fstest_SOURCES): Likewise.
10522 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
10524 * util/grub-fstest.c: New file.
10526 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
10528 Make grub-setup handle a separate root device.
10530 * util/i386/pc/grub-setup.c (setup): Always open the root device,
10531 so that the root device can be compared with the destination
10533 When embedding the core image, if the root and destination devices
10534 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
10536 When not embedding, set ROOT_DRIVE to 0xFF.
10538 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
10540 Add support for having a grub directory in a different drive. This
10541 is still only the data handling part.
10543 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
10544 (codestart): Save %dh in GRUB_ROOT_DRIVE.
10545 (grub_root_drive): New variable.
10547 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
10548 instead of GRUB_BOOT_DRIVE to construct a device name. Set
10549 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
10552 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
10554 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
10556 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
10558 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
10559 is bogus, because PXE booting does not specify any drive
10562 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
10563 am not sure if this is really correct.
10565 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
10566 is always identical to the boot drive when booting from a CD.
10568 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
10570 (root_drive): New variable.
10571 (real_start): Unconditionally set %dh to ROOT_DRIVE.
10572 (setup_sectors): Push %dx right after popping it, because %dh will
10574 (copy_buffer): Restore %dx.
10576 2008-02-03 Robert Millan <rmh@aybabtu.com>
10578 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
10579 use `cdboot.img' for cdrom images.
10581 2008-02-03 Robert Millan <rmh@aybabtu.com>
10583 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
10584 only setup gfxterm when `font' command has succeeded.
10586 2008-02-03 Robert Millan <rmh@aybabtu.com>
10588 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
10589 (grub_rescue_cmd_multiboot_loader)
10590 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
10592 2008-02-03 Pavel Roskin <proski@gnu.org>
10594 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
10595 %edx and %esi from stack only after grub_gate_a20() is called.
10596 grub_gate_a20() clobbers %edx.
10598 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
10600 * configure.ac (AC_INIT): Bumped to 1.96.
10602 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
10603 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
10604 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
10605 video/readers/png.c.
10607 2008-02-03 Bean <bean123ch@gmail.com>
10609 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
10610 (cdboot_img_SOURCES): New variable.
10611 (cdboot_img_ASFLAGS): New variable.
10612 (cdboot_img_LDFLAGS): New variable.
10614 * boot/i386/pc/cdboot.S: New file.
10616 * disk/i386/pc/biosdisk.c (cd_start): New variable.
10617 (cd_count): Likewise.
10618 (grub_biosdisk_get_drive): Add support for cd device.
10619 (grub_biosdisk_call_hook): Likewise.
10620 (grub_biosdisk_iterate): Likewise.
10621 (grub_biosdisk_open): Likewise.
10622 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
10623 (grub_biosdisk_rw): Support reading from cd device.
10624 (GRUB_MOD_INIT): Iterate cd devices.
10626 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
10627 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
10628 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
10630 * kern/i386/pc/init.c (make_install_device): Check for cd device.
10632 2008-02-02 Robert Millan <rmh@aybabtu.com>
10634 * commands/read.c: New file.
10635 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
10636 (read_mod_SOURCES): New variable.
10637 (read_mod_CFLAGS): Likewise.
10638 (read_mod_LDFLAGS): Likewise.
10640 2008-02-02 Robert Millan <rmh@aybabtu.com>
10642 * normal/main.c (grub_normal_execute): Check for `menu->size' when
10643 determining whether menu has to be displayed.
10645 2008-02-02 Marco Gerards <marco@gnu.org>
10647 * bus/pci.c: New file.
10649 * include/grub/pci.h: Likewise.
10651 * include/grub/i386/pc/pci.h: Likewise.
10653 * commands/lspci.c: Likewise.
10655 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
10657 (pci_mod_SOURCES): New variable.
10658 (pci_mod_CFLAGS): Likewise.
10659 (pci_mod_LDFLAGS): Likewise.
10660 (lspci_mod_SOURCES): Likewise.
10661 (lspci_mod_CFLAGS): Likewise.
10662 (lspci_mod_LDFLAGS): Likewise.
10664 2008-02-02 Bean <bean123ch@gmail.com>
10666 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
10667 (grub_ufs_get_file_block): Fix indirect block calculation problem.
10669 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
10670 (grub_xfs_btree_node): New structure.
10671 (grub_xfs_btree_root): New structure.
10672 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
10673 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
10674 (GRUB_XFS_EXTENT_BLOCK): Likewise.
10675 (GRUB_XFS_EXTENT_SIZE): Likewise.
10676 (grub_xfs_read_block): Support btree format type.
10677 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
10678 Use directory block as basic unit.
10680 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
10682 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
10683 __attribute__ ((__regparm__ (1))).
10685 2008-02-01 Robert Millan <rmh@aybabtu.com>
10687 Correct a mistake in previous commit.
10689 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
10691 (normal/command.c_DEPENDENCIES): New variable.
10693 2008-02-01 Robert Millan <rmh@aybabtu.com>
10695 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
10697 (normal/command.c_DEPENDENCIES): New variable.
10698 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
10699 * conf/i386-ieee1275.rmk: Likewise.
10700 * conf/i386-linuxbios.rmk: Likewise.
10701 * conf/i386-pc.rmk: Likewise.
10702 * conf/sparc64-ieee1275.rmk: Likewise.
10703 * conf/powerpc-ieee1275.rmk: Likewise.
10704 (grub_emu_SOURCES): Add `fs/fshelp.c'.
10706 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
10708 2008-02-01 Robert Millan <rmh@aybabtu.com>
10710 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
10711 call at beginning of function.
10713 2008-01-31 Pavel Roskin <proski@gnu.org>
10715 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
10716 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
10717 (grub_mkrescue_SOURCES): Likewise.
10718 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
10720 2008-01-30 Robert Millan <rmh@aybabtu.com>
10722 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
10723 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
10724 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
10725 (grub_probe_SOURCES): ... to here.
10727 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
10728 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
10729 * conf/i386-ieee1275.rmk: Likewise.
10730 * conf/i386-linuxbios.rmk: Likewise.
10731 * conf/powerpc-ieee1275.rmk: Likewise.
10733 2008-01-30 Tristan Gingold <gingold@free.fr>
10735 * kern/rescue.c: Silently accept empty lines.
10737 2008-01-29 Bean <bean123ch@gmail.com>
10739 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
10740 (real_code_2): Code cleanup and change comment style.
10741 (move_memory): Avoid using 32-bit address mode.
10743 2008-01-29 Bean <bean123ch@gmail.com>
10745 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
10746 (png_mod_SOURCES): New variable.
10747 (png_mod_CFLAGS): Likewise.
10748 (png_mod_LDFLAGS): Likewise.
10750 * video/readers/png.c: New file.
10752 2008-01-28 Robert Millan <rmh@aybabtu.com>
10754 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
10755 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
10756 `ifndef GRUB_MOD_GAP' hack.
10757 * util/elf/grub-mkimage.c (add_segments): Likewise.
10759 2008-01-27 Robert Millan <rmh@aybabtu.com>
10761 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
10762 `GRUB_MOD_GAP' for platforms in which it's not defined.
10763 * util/elf/grub-mkimage.c (add_segments): Likewise.
10765 2008-01-27 Robert Millan <rmh@aybabtu.com>
10767 Get grub-emu to build again (including parallel builds).
10769 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
10771 (util/grub-emu.c_DEPENDENCIES): ... this, ...
10772 (normal/execute.c_DEPENDENCIES): ... this, ...
10773 (grub-emu_DEPENDENCIES): ... and this.
10775 * conf/i386-efi.rmk: Likewise.
10776 * conf/i386-linuxbios.rmk: Likewise.
10777 * conf/i386-ieee1275.rmk: Likewise.
10778 * conf/powerpc-ieee1275.rmk: Likewise.
10779 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
10781 2008-01-27 Robert Millan <rmh@aybabtu.com>
10783 * NEWS: Add a few items.
10785 2008-01-27 Robert Millan <rmh@aybabtu.com>
10787 Fix parallel builds with grub-emu. Based on earlier commit for
10788 grub-probe and grub-setup.
10790 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10791 (util/grub-emu.c_DEPENDENCIES): ... this.
10792 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10793 (util/grub-emu.c_DEPENDENCIES): ... this.
10794 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10795 (util/grub-emu.c_DEPENDENCIES): ... this.
10796 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10797 (util/grub-emu.c_DEPENDENCIES): ... this.
10798 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10799 (util/grub-emu.c_DEPENDENCIES): ... this.
10801 2008-01-27 Pavel Roskin <proski@gnu.org>
10803 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
10804 to create a gap between _end and the modules added to the image
10805 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
10806 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
10807 * util/elf/grub-mkimage.c (add_segments): Likewise.
10809 2008-01-26 Pavel Roskin <proski@gnu.org>
10811 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
10812 just return an error.
10814 2008-01-26 Bean <bean123ch@gmail.com>
10816 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
10817 (grub_reiserfs_get_item): Save offset of the next item.
10818 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
10820 2008-01-25 Robert Millan <rmh@aybabtu.com>
10822 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
10823 make all filesystem sources appear together (possibly fixing omissions
10825 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10826 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10827 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10828 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10830 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
10832 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
10833 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10834 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
10835 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10837 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
10838 (probe): Add a sanity check to make sure of our ability to read
10839 requested files when probing for filesystem type.
10841 * genmk.rb: Update copyright year (2007).
10843 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
10844 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
10845 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
10846 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
10847 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
10848 : Remove function prototypes.
10850 2008-01-25 Robert Millan <rmh@aybabtu.com>
10852 Revert my previous commits (based on wrong assumption of how grub_errno
10855 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
10856 * kern/file.c (grub_file_open): Likewise.
10858 2008-01-24 Pavel Roskin <proski@gnu.org>
10860 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
10861 that hang if GRUB tries to setup colors.
10862 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
10863 colors for firmwares that don't support it.
10864 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
10865 Recognize Open Hack'Ware, set flags to work around its
10868 2008-01-24 Robert Millan <rmh@aybabtu.com>
10870 * kern/file.c (grub_file_open): Do not account previous failures of
10871 unrelated functions when grub_errno is checked for.
10872 Reported by Oleg Strikov.
10874 2008-01-24 Bean <bean123ch@gmail.com>
10876 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
10877 (grub_ufs_sblock): New member volume name.
10878 (grub_ufs_find_file): Fix string copy bug.
10879 (grub_ufs_label): Implement this function properly.
10881 * fs/hfs.c (grub_hfs_cnid_type): New enum.
10882 (grub_hfs_iterate_records): Use the correct file number for extents
10883 and catalog file. Fix problem in next index calculation.
10884 (grub_hfs_find_node): Replace recursive function call with loop.
10885 (grub_hfs_iterate_dir): Replace recursive function call with loop.
10887 2008-01-23 Robert Millan <rmh@aybabtu.com>
10889 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
10890 `<grub/symbol.h>' and `<grub/multiboot.h>'.
10891 (grub_multiboot2_real_boot): New function prototype.
10893 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
10894 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
10896 * kern/i386/ieee1275/init.c (grub_os_area_addr)
10897 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
10899 2008-01-23 Robert Millan <rmh@aybabtu.com>
10901 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
10902 #ifdef'ed out grub_printf().
10904 2008-01-23 Robert Millan <rmh@aybabtu.com>
10906 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
10907 grub_dprintf calls, since they make "debug=all" mode unusable.
10908 (grub_console_checkkey): Likewise.
10910 2008-01-23 Robert Millan <rmh@aybabtu.com>
10912 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
10913 `term/i386/pc/at_keyboard.c'.
10914 (pkglib_MODULES): Add `serial.mod'.
10915 (serial_mod_SOURCES): New variable.
10916 (serial_mod_CFLAGS): Likewise.
10917 (serial_mod_LDFLAGS): Likewise.
10919 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
10920 `<grub/powerpc/ieee1275/console.h>'.
10921 (grub_keyboard_controller_init): New function prototype.
10922 (grub_console_checkkey): Likewise.
10923 (grub_console_getkey): Likewise.
10925 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
10928 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
10929 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
10931 2008-01-23 Robert Millan <rmh@aybabtu.com>
10933 * kern/i386/pc/init.c (make_install_device): When memdisk image is
10934 present, "(memdisk)/boot/grub" becomes the default prefix.
10936 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
10937 a memdisk tarball with all the modules. Add --overlay=DIR option that
10938 allows users to overlay additional files into the image.
10940 2008-01-23 Robert Millan <rmh@aybabtu.com>
10942 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
10943 and `machine/memory.h'.
10944 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
10945 (_multiboot_mod_SOURCES): New variable.
10946 (_multiboot_mod_CFLAGS): Likewise.
10947 (_multiboot_mod_LDFLAGS): Likewise.
10948 (multiboot_mod_SOURCES): Likewise.
10949 (multiboot_mod_CFLAGS): Likewise.
10950 (multiboot_mod_LDFLAGS): Likewise.
10952 * include/grub/i386/ieee1275/loader.h: New file.
10954 * include/grub/i386/ieee1275/machine.h: Likewise.
10956 * include/grub/i386/ieee1275/memory.h: Likewise.
10958 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
10959 variable declaration.
10960 (grub_os_area_size): Likewise.
10962 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
10963 (grub_lower_mem, grub_upper_mem): New variables.
10964 (grub_stop_floppy): New function (just to make
10965 grub_multiboot2_real_boot() happy).
10967 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
10968 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
10969 (grub_stop): New function.
10970 Include `"../realmode.S"' and `"../loader.S"'.
10972 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
10973 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
10975 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
10976 rely on grub_multiboot2_real_boot() for final boot.
10978 2008-01-22 Robert Millan <rmh@aybabtu.com>
10980 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
10981 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
10982 device that doesn't look like an SD card.
10983 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10984 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
10985 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
10986 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
10989 2008-01-22 Robert Millan <rmh@aybabtu.com>
10991 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
10992 avoid claiming over our own code.
10994 2008-01-22 Bean <bean123ch@gmail.com>
10996 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
10997 (jpeg_mod_SOURCES): New variable.
10998 (jpeg_mod_CFLAGS): Likewise.
10999 (jpeg_mod_LDFLAGS): Likewise.
11001 * video/readers/jpeg.c : New file.
11003 2008-01-22 Bean <bean123ch@gmail.com>
11005 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
11006 there are no more items.
11008 2008-01-21 Robert Millan <rmh@aybabtu.com>
11010 * kern/mm.c (grub_mm_init_region): Improve debug message.
11012 2008-01-21 Robert Millan <rmh@aybabtu.com>
11014 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
11015 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
11017 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
11019 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
11020 Indicates start of upper memory.
11021 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
11022 (generate_image): Abort when image size is big enough to corrupt
11025 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
11026 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
11027 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
11028 instead of hardcoding 0xA0000.
11029 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
11030 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
11031 instead of hardcoding 0xA0000.
11033 2008-01-21 Robert Millan <rmh@aybabtu.com>
11035 * disk/memdisk.c (memdisk_size): New variable.
11036 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
11038 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
11039 image to dynamic memory.
11040 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
11041 `memdisk_size'. Free memdisk block.
11043 2008-01-21 Robert Millan <rmh@aybabtu.com>
11045 Fix detection of very small filesystems (like tar).
11047 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
11048 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
11049 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
11050 a problem with this disk).
11052 2008-01-21 Robert Millan <rmh@aybabtu.com>
11054 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
11055 on grub_biosdisk_rw_standard() error.
11057 2008-01-21 Robert Millan <rmh@aybabtu.com>
11059 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
11061 * kern/elf.c: Likewise.
11062 * kern/ieee1275/ieee1275.c: Likewise.
11063 * kern/powerpc/ieee1275/openfw.c: Likewise.
11064 * term/ieee1275/ofconsole.c: Likewise.
11066 2008-01-21 Robert Millan <rmh@aybabtu.com>
11068 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
11070 * include/grub/kernel.h (grub_arch_memdisk_addr)
11071 (grub_arch_memdisk_size): Moved from here ...
11073 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
11074 (grub_arch_memdisk_size): ... to here.
11076 2008-01-21 Robert Millan <rmh@aybabtu.com>
11078 Mostly based on bugfix from Bean.
11080 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
11081 attribute with hook() parameter.
11082 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
11084 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
11085 attribute with hook() parameter.
11086 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
11089 2008-01-21 Robert Millan <rmh@aybabtu.com>
11091 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
11092 (pkglib_MODULES): Add `memdisk.mod'.
11093 (memdisk_mod_SOURCES): New variable.
11094 (memdisk_mod_CFLAGS): Likewise.
11095 (memdisk_mod_LDFLAGS): Likewise.
11097 * disk/memdisk.c: New file.
11099 * include/grub/disk.h (grub_disk_dev_id): Add
11100 `GRUB_DISK_DEVICE_MEMDISK_ID'.
11102 * include/grub/i386/pc/kernel.h
11103 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
11104 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
11105 (grub_kernel_image_size): New variable declaration.
11106 (grub_total_module_size): Likewise.
11107 (grub_memdisk_image_size): Likewise.
11109 * include/grub/i386/pc/memory.h
11110 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
11112 * include/grub/kernel.h: Include `<grub/symbol.h>'.
11113 (grub_arch_memdisk_addr): New variable declaration.
11114 (grub_arch_memdisk_size): Likewise.
11116 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
11117 (grub_arch_memdisk_size): Likewise.
11119 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
11120 (codestart): Replace hardcoded `0x100000' with
11121 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
11123 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
11124 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
11125 not NULL, append the contents of the file it refers to, at the end of
11126 the compressed kernel image. Initialize `grub_memdisk_image_size'
11127 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
11128 (options): Add "memdisk"|'m' option.
11129 (main): Parse --memdisk|-m option, and pass user-provided path as
11130 parameter to generate_image().
11132 2008-01-20 Robert Millan <rmh@aybabtu.com>
11134 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
11135 grub_dprintf() calls from here ...
11136 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
11138 2008-01-20 Robert Millan <rmh@aybabtu.com>
11140 Fix detection of "real mode" when /options/real-mode? doesn't exist.
11142 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
11144 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
11145 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
11146 `GRUB_IEEE1275_FLAG_REAL_MODE'.
11147 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
11149 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
11150 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
11152 2008-01-19 Robert Millan <rmh@aybabtu.com>
11154 Get rid of confusing function (superseded by
11155 `grub_ieee1275_get_integer_property')
11156 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
11158 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
11160 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
11161 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
11162 in native endianness from grub_ieee1275_get_integer_property().
11164 2008-01-19 Robert Millan <rmh@aybabtu.com>
11166 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
11167 command after "shut-down", since implementations differ on which
11168 the command for halt is.
11170 2008-01-19 Robert Millan <rmh@aybabtu.com>
11172 * include/grub/i386/linuxbios/console.h: Add header protection.
11173 (grub_keyboard_controller_init): New function prototype.
11174 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
11175 (KEYBOARD_COMMAND_READ): Likewise.
11176 (KEYBOARD_COMMAND_WRITE): Likewise.
11177 (KEYBOARD_SCANCODE_SET1): Likewise.
11178 (grub_keyboard_controller_write): New function.
11179 (grub_keyboard_controller_read): Likewise.
11180 (grub_keyboard_controller_init): Likewise.
11182 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
11183 (grub_console_init): On coreboot/LinuxBIOS, call
11184 grub_keyboard_controller_init().
11186 2008-01-19 Robert Millan <rmh@aybabtu.com>
11188 PowerPC changes provided by Pavel Roskin.
11190 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
11191 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
11192 don't rely on cmain() doing it.
11193 * kern/i386/ieee1275/startup.S (_start): Store %eax in
11194 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
11196 2008-01-16 Robert Millan <rmh@aybabtu.com>
11198 * include/grub/i386/linuxbios/memory.h
11199 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
11200 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
11201 receive `table_header' as argument. Instead, probe for it in the
11202 known memory ranges where it can be present.
11203 (grub_available_iterate): Do not pass a fixed `table_header' address
11204 to grub_linuxbios_table_iterate().
11206 2008-01-15 Robert Millan <rmh@aybabtu.com>
11208 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
11209 * conf/i386-ieee1275.rmk: New file.
11210 * include/grub/i386/ieee1275/console.h: Likewise.
11211 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
11212 * include/grub/i386/ieee1275/kernel.h: Likewise.
11213 * include/grub/i386/ieee1275/time.h: Likewise.
11214 * kern/i386/ieee1275/init.c: Likewise.
11215 * kern/i386/ieee1275/startup.S: Likewise.
11217 2008-01-15 Robert Millan <rmh@aybabtu.com>
11219 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
11220 when pointers are 32-bit (but still do set it to one when they are
11223 2008-01-15 Robert Millan <rmh@aybabtu.com>
11225 * include/grub/ieee1275/ieee1275.h
11226 (grub_ieee1275_get_integer_property): New function prototype.
11228 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
11229 (grub_ieee1275_get_integer_property): New function. Wraps around
11230 grub_ieee1275_get_property() to handle endianness.
11232 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
11233 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
11235 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
11236 (grub_map): Likewise.
11237 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
11239 2008-01-15 Bean <bean123ch@gmail.com>
11241 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
11242 (grub_script_execute_cmdline): Reset grub_errno.
11244 * normal/main.c (read_config_file): Reset grub_errno.
11246 * normal/parse.y (script_init): New.
11247 (script): Move function and menuentry here.
11249 (command): Add delimiter at the end of command.
11250 (commands): Adjust to match the new command.
11251 (commandblock): Remove grub_script_lexer_record_start.
11252 (menuentry): Add grub_script_lexer_record_start, use the new commands.
11253 (if): Use the new commands.
11255 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
11257 2008-01-15 Robert Millan <rmh@aybabtu.com>
11259 * normal/menu.c (run_menu): Move timeout message from here ...
11260 (print_timeout): ... to here.
11261 (run_menu): Use print_timeout() once during initial draw to print
11262 the whole message, and again in every clock tick to update only
11263 the number of seconds.
11265 2008-01-15 Robert Millan <rmh@aybabtu.com>
11267 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
11268 actual size of `available' from grub_ieee1275_get_property(), and
11269 restrict parsing to that bound.
11271 2008-01-15 Christian Franke <franke@computer.org>
11273 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
11274 (argp_program_version): Remove variable.
11275 (argp_program_bug_address): Likewise.
11276 (options): Convert from struct argp_option to struct option.
11277 (struct arguments): Remove.
11278 (parse_opt): Remove.
11279 (usage): New function.
11280 (main): Replace struct args members by simple variables.
11281 Replace argp_parse() by getopt_long().
11282 Add switch to evaluate options.
11283 Add missing "(...)" around root_dev in prefix string.
11285 2008-01-14 Robert Millan <rmh@aybabtu.com>
11287 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
11288 for grub_ieee1275_exit(), in order to improve portability.
11290 2008-01-14 Robert Millan <rmh@aybabtu.com>
11292 * util/grub.d/10_linux.in (prefix): Define.
11293 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
11295 2008-01-13 Pavel Roskin <proski@gnu.org>
11297 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
11298 grub_errno if no errors have been detected.
11300 2008-01-12 Robert Millan <rmh@aybabtu.com>
11302 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
11303 (grub_util_get_dev_abstraction): New function prototype.
11305 * util/getroot.c: Include `<grub/util/getroot.h>'
11306 (grub_util_get_grub_dev): Move detection of abstraction type to ...
11307 (grub_util_get_dev_abstraction): ... here (new function).
11309 * util/grub-probe.c: Convert PRINT_* to an enum. Add
11310 `PRINT_ABSTRACTION'.
11311 (probe): Probe for abstraction type when requested.
11312 (main): Understand `--target=abstraction'.
11314 * util/i386/efi/grub-install.in: Add abstraction module to core
11315 image when it is found to be necessary.
11316 * util/i386/pc/grub-install.in: Likewise.
11317 * util/powerpc/ieee1275/grub-install.in: Likewise.
11319 * util/update-grub_lib.in (font_path): Return system path without
11320 converting to GRUB path.
11321 * util/update-grub.in: Convert system path returned by font_path()
11322 to a GRUB path. Use `grub-probe -t abstraction' to determine what
11323 abstraction module is needed for loading fonts (if any). Export
11324 that as `GRUB_PRELOAD_MODULES'.
11325 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
11328 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
11330 Remove some unused code from reiserfs.
11332 * fs/reiserfs.c (struct grub_reiserfs_key)
11333 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
11334 (struct grub_reiserfs_node_body): Removed.
11335 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11337 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11339 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11341 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
11343 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
11345 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
11347 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11348 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11349 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
11351 2008-01-10 Robert Millan <rmh@aybabtu.com>
11353 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
11354 Determines if a file is garbage left by packaging systems, etc.
11355 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
11356 for processing /etc/grub.d scripts.
11357 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
11358 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
11359 as a condition for processing Linux images.
11361 2008-01-10 Pavel Roskin <proski@gnu.org>
11363 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
11364 to compile reiserfs.c on PowerPC.
11366 2008-01-10 Robert Millan <rmh@aybabtu.com>
11368 * kern/device.c (grub_device_iterate): Do not abort device iteration
11369 when one of the devices cannot be opened.
11370 * kern/disk.c (grub_disk_open): Do not account previous failures of
11371 unrelated functions when grub_errno is checked for.
11373 2008-01-08 Robert Millan <rmh@aybabtu.com>
11375 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
11376 `! grub_linux_is_bzimage', change order of address comparison to make
11377 it more intuitive, and improve "too big zImage" error message.
11379 2008-01-08 Robert Millan <rmh@aybabtu.com>
11381 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
11382 `$(update-grub_DATA)'.
11383 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
11386 2008-01-07 Robert Millan <rmh@aybabtu.com>
11388 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
11389 which instruction is modified by grub-setup during installation
11390 (since it wasn't obvious by only looking at this file).
11392 2008-01-07 Robert Millan <rmh@aybabtu.com>
11394 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
11395 listing actual TODO items.
11397 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
11399 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
11401 (grub_reiserfs_get_key_offset): Likewise.
11402 (grub_reiserfs_set_key_offset): Likewise.
11403 (grub_reiserfs_set_key_type): Likewise.
11404 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
11406 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
11407 better to remove the bitfield version completely.
11409 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
11411 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
11412 allocated from the heap, due to the fshelp implementation.
11413 (grub_reiserfs_dir): Free NODE, due to the same reason.
11415 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
11417 Mostly from Vincent Pelletier:
11419 * fs/reiserfs.c: New file.
11421 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
11422 (reiserfs_mod_SOURCES): New variable.
11423 (reiserfs_mod_CFLAGS): Likewise.
11424 (reiserfs_mod_LDFLAGS): Likewise.
11426 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
11427 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
11428 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
11431 2008-01-06 Robert Millan <rmh@aybabtu.com>
11433 * normal/color.c: Remove `<grub/env.h>'.
11435 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
11437 * include/grub/normal.h: Include <grub/env.h>.
11439 2008-01-05 Robert Millan <rmh@aybabtu.com>
11441 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
11442 usage example with `(hd0,1)'.
11443 Reported by Samuel Thibault.
11445 2008-01-05 Robert Millan <rmh@aybabtu.com>
11447 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
11448 (grub_linux_boot_zimage): Rename to ...
11449 (grub_linux_boot): ... this.
11450 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
11451 (grub_linux_boot_zimage): Conditionalize zImage copy.
11453 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
11454 (grub_linux_boot_bzimage): Remove prototype.
11455 (grub_linux_boot_zimage): Rename to ...
11456 (grub_linux_boot): ... this.
11458 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
11459 (grub_linux_boot): Remove function.
11461 2008-01-05 Robert Millan <rmh@aybabtu.com>
11463 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
11464 (grub_env_write_color_highlight): Likewise.
11465 (grub_wait_after_message): Likewise.
11467 * normal/color.c: New file.
11469 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11470 (normal_mod_DEPENDENCIES): Likewise.
11472 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11473 (normal_mod_DEPENDENCIES): Likewise.
11475 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11476 (normal_mod_DEPENDENCIES): Likewise.
11478 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
11479 (normal_mod_DEPENDENCIES): Likewise.
11481 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
11482 for waiting after a message is printed.
11483 * normal/main.c (read_config_file): Likewise.
11484 (grub_normal_init): Register grub_env_write_color_normal() and
11485 grub_env_write_color_highlight() hooks. Mark `color_normal' and
11486 `color_highlight' variables as global.
11488 * normal/menu.c (grub_wait_after_message): New function.
11489 (grub_color_menu_normal): New variable. Replaces ...
11490 (GRUB_COLOR_MENU_NORMAL): ... this macro.
11491 (grub_color_menu_highlight): New variable. Replaces ...
11492 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
11493 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
11494 `GRUB_TERM_COLOR_STANDARD'.
11495 (print_message): Use `grub_setcolorstate' to reload colors. Rename
11496 `normal_code' and `highlight_code' to `old_color_normal' and
11497 `old_color_highlight', respectively.
11498 (grub_menu_init_page): Update colors when drawing the menu, based on
11499 `menu_color_normal' and `menu_color_highlight' variables.
11500 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
11501 a message is printed.
11503 2008-01-05 Robert Millan <rmh@aybabtu.com>
11505 * kern/env.c (grub_env_context_open): Propagate hooks for global
11506 variables to new context.
11508 * kern/main.c (grub_set_root_dev): Export `root' variable.
11510 2008-01-05 Robert Millan <rmh@aybabtu.com>
11512 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
11513 discs unconditionally, since udev and others have options to provide
11516 2008-01-05 Robert Millan <rmh@aybabtu.com>
11518 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
11520 2008-01-04 Christian Franke <franke@computer.org>
11522 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
11525 2008-01-03 Pavel Roskin <proski@gnu.org>
11527 * kern/i386/linuxbios/init.c: Put "void" to all function
11528 declarations with no arguments.
11529 * kern/powerpc/ieee1275/init.c: Likewise.
11530 * term/i386/pc/at_keyboard.c: Likewise.
11531 * term/i386/pc/vga_text.c: Likewise.
11532 * util/grub-mkdevicemap.c: Likewise.
11534 2008-01-02 Robert Millan <rmh@aybabtu.com>
11536 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
11537 message when loaded image is out of bounds.
11538 (grub_multiboot_load_elf64): Likewise.
11540 2008-01-02 Pavel Roskin <proski@gnu.org>
11542 * util/grub.d/10_linux.in: Try version without ".old" when
11543 looking for initrd. It's better to use initrd from the newer
11544 kernel of the same version than no initrd at all.
11546 2008-01-01 Robert Millan <rmh@aybabtu.com>
11548 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
11550 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
11552 * include/grub/video.h: Added grub_video_unmap_color and
11553 grub_video_get_active_render_target.
11554 (grub_video_adapter): Added unmap_color and get_active_render_target.
11556 * video/video.c: Added grub_video_unmap_color and
11557 grub_video_get_active_render_target.
11558 (grub_video_get_info): Changed method to accept NULL pointer as an
11559 argument to allow detection of active video adapter.
11561 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
11562 grub_video_vbe_unmap_color_int.
11563 Added grub_video_vbe_unmap_color and
11564 grub_video_vbe_get_active_render_target.
11565 (grub_video_vbe_adapter): Added unmap_color and
11566 get_active_render_target.
11568 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
11569 with grub_video_vbe_unmap_color_int.
11571 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
11572 (DEFAULT_NORMAL_COLOR): Likewise.
11573 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
11574 (DEFAULT_FG_COLOR): Removed.
11575 (DEFAULT_BG_COLOR): Likewise.
11576 (DEFAULT_CURSOR_COLOR): Changed value.
11577 (grub_virtual_screen): Added standard_color_setting,
11578 normal_color_setting, highlight_color_setting and term_color.
11579 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
11580 (bitmap_width): Added.
11581 (bitmap_height): Likewise.
11582 (bitmap): Likewise.
11583 (set_term_color): Likewise.
11584 (grub_virtual_screen_setup): Changed to use new terminal coloring
11586 (grub_gfxterm_init): Added init for bitmap.
11587 (grub_gfxterm_fini): Added destroy for bitmap.
11588 (redraw_screen_rect): Updated to use background bitmap and new
11590 (scroll_up): Added optimization for case when there is no bitmap.
11591 (grub_gfxterm_cls): Fixed to use correct background color.
11592 (grub_virtual_screen_setcolorstate): Changed to use new terminal
11594 (grub_virtual_screen_setcolor): Likewise.
11595 (grub_virtual_screen_getcolor): Added.
11596 (grub_gfxterm_background_image_cmd): Likewise.
11597 (grub_video_term): Added setcolor and getcolor.
11598 (MOD_INIT): Added registration of background_image command.
11599 (MOD_TERM): Added unregistration for background_image command.
11601 2007-12-30 Pavel Roskin <proski@gnu.org>
11603 * loader/multiboot_loader.c: Fix multiboot command
11604 unregistration. Fix all typos in the word "multiboot".
11606 2007-12-29 Pavel Roskin <proski@gnu.org>
11608 * util/grub.d/10_linux.in: Refactor search for initrd. Add
11609 support for initrd names used in Fedora.
11611 2007-12-26 Bean <bean123ch@gmail.com>
11613 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
11614 (cpio_mod_SOURCES): New variable.
11615 (cpio_mod_CFLAGS): Likewise.
11616 (cpio_mod_LDFLAGS): Likewise.
11618 * fs/cpio.c: New file.
11620 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
11622 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
11624 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
11626 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11628 2007-12-25 Robert Millan <rmh@aybabtu.com>
11630 * include/grub/term.h (struct grub_term): Add `getcolor' function.
11631 (grub_getcolor): New function.
11633 * kern/term.c (grub_getcolor): New function.
11634 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
11635 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
11636 (print_entry): Set normal and highlight colors to
11637 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
11638 respectively, before printing and restore them to old
11640 (grub_menu_init_page): Likewise. Fill an additional colored space
11641 that would otherwise be left blank.
11643 * term/efi/console.c (grub_console_getcolor): New function.
11644 (struct grub_console_term.getcolor): New variable.
11645 * term/i386/pc/console.c (grub_console_getcolor): New function.
11646 (struct grub_console_term.getcolor): New variable.
11647 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
11648 (struct grub_console_term.getcolor): New variable.
11650 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
11651 (struct grub_console_term.setcolor): Remove variable.
11652 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
11653 (struct grub_console_term.setcolor): Remove variable.
11654 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
11655 (struct grub_console_term.setcolor): Remove variable.
11656 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
11657 (struct grub_console_term.setcolor): Remove variable.
11659 2007-12-25 Robert Millan <rmh@aybabtu.com>
11661 * configure.ac: Search for possible unifont.hex locations, and
11662 define UNIFONT_HEX if found.
11664 * Makefile.in (UNIFONT_HEX): Define variable.
11665 (DATA): Rename to ...
11666 (PKGLIB): ... this. Update all users.
11667 (PKGDATA): New variable.
11668 (pkgdata_IMAGES): Rename to ...
11669 (pkglib_IMAGES): ... this. Update all users.
11670 (pkgdata_MODULES): Rename to ...
11671 (pkglib_MODULES): ... this. Update all users.
11672 (pkgdata_PROGRAMS): Rename to ...
11673 (pkglib_PROGRAMS): ... this. Update all users.
11674 (pkgdata_DATA): Rename to ...
11675 (pkglib_DATA): ... this. Update all users.
11676 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
11677 (unicode.pff, ascii.pff): New rules.
11678 (all-local): Add `$(PKGDATA)' dependency.
11679 (install-local): Process `$(PKGDATA)'.
11681 * util/update-grub_lib.in (font_path): Search for *.pff files in
11682 a few more locations, including `${pkgdata}'.
11684 2007-12-23 Robert Millan <rmh@aybabtu.com>
11686 Patch from Bean <bean123ch@gmail.com>:
11687 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
11690 2007-12-21 Bean <bean123ch@gmail.com>
11692 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
11693 (ntfscomp_mod_SOURCES): New variable.
11694 (ntfscomp_mod_CFLAGS): Likewise.
11695 (ntfscomp_mod_LDFLAGS): Likewise.
11697 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
11698 (grub_probe_SOURCES): Likewise.
11699 (grub_emu_SOURCES): Likewise.
11701 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11702 (grub_emu_SOURCES): Likewise.
11704 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11705 (grub_emu_SOURCES): Likewise.
11707 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11708 (grub_emu_SOURCES): Likewise.
11710 * fs/ntfs.c (grub_ntfscomp_func): New variable.
11711 (read_run_list): Renamed to grub_ntfs_read_run_list.
11712 (decomp_nextvcn): Moved to ntfscomp.c.
11713 (decomp_getch): Likewise.
11714 (decomp_get16): Likewise.
11715 (decomp_block): Likewise.
11716 (read_block): Likewise.
11717 (read_data): Partially moved to ntfscomp.c.
11718 (fixup): Change unsigned to grub_uint16_t.
11719 (read_mft): Change unsigned long to grub_uint32_t.
11720 (read_attr): Likewise.
11721 (read_data): Likewise.
11722 (read_run_data): Likewise.
11723 (read_run_list): Likewise.
11724 (read_mft): Likewise.
11726 * fs/ntfscomp.c: New file.
11728 * include/grub/ntfs.h: New file.
11730 2007-12-16 Robert Millan <rmh@aybabtu.com>
11732 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
11733 IDE disk check, since Linux is known to support 20 IDE disks.
11734 Reported by Colin Watson.
11736 2007-12-15 Bean <bean123ch@gmail.com>
11738 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
11739 (lnxboot_img_SOURCES): New variable.
11740 (lnxboot_img_ASFLAGS): Likewise.
11741 (lnxboot_img_LDFLAGS): Likewise.
11743 * boot/i386/pc/lnxboot.S: New file.
11745 2007-11-24 Pavel Roskin <proski@gnu.org>
11747 * configure.ac: Test if '--build-id=none' is supported by the
11748 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
11749 objcopy to generate incorrect binary files (binutils
11750 2.17.50.0.18-1 as shipped by Fedora 8).
11751 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
11752 linking, so that build ID doesn't break the test.
11754 2007-11-24 Pavel Roskin <proski@gnu.org>
11756 * include/grub/i386/time.h: use "void" in the argument list
11757 of grub_cpu_idle().
11758 * include/grub/powerpc/time.h: Likewise.
11759 * include/grub/sparc64/time.h: Likewise.
11761 2007-11-18 Christian Franke <franke@computer.org>
11763 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
11764 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
11765 This fixes the problem that function keys did not work in grub-emu.
11767 2007-11-18 Christian Franke <franke@computer.org>
11769 * disk/host.c (grub_host_open): Remove attribute unused from
11770 name parameter. Add check for "host". This fixes the problem
11771 that grub-emu does not find partitions.
11773 2007-11-18 Christian Franke <franke@computer.org>
11775 * util/hostfs.c (is_dir): New function.
11776 (grub_hostfs_dir): Handle missing dirent.d_type case.
11777 (grub_hostfs_read): Add missing fseek().
11778 (grub_hostfs_label): Clear label pointer. This fixes a crash
11779 of grub-emu on "ls (host)".
11781 2007-11-18 Christian Franke <franke@computer.org>
11783 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
11784 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
11785 to 64 bit boundary by default.
11787 2007-11-18 Bean <bean123ch@gmail.com>
11789 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
11790 (hexdump_mod_SOURCES): New variable.
11791 (hexdump_mod_CFLAGS): Likewise.
11792 (hexdump_mod_LDFLAGS): Likewise.
11794 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11796 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11798 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11800 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11802 * include/grub/hexdump.h: New file.
11804 * commands/hexdump.c: New file.
11806 2007-11-10 Robert Millan <rmh@aybabtu.com>
11808 * commands/i386/pc/play.c (beep_off): Switch order of arguments
11809 in grub_outb() calls.
11810 (beep_on): Likewise.
11812 2007-11-10 Christian Franke <franke@computer.org>
11814 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
11815 (grub_menu_run): Likewise.
11817 2007-11-10 Robert Millan <rmh@aybabtu.com>
11819 * include/grub/i386/efi/machine.h: New file.
11820 * include/grub/i386/linuxbios/machine.h: Likewise.
11821 * include/grub/i386/pc/machine.h: Likewise.
11822 * include/grub/powerpc/ieee1275/machine.h: Likewise.
11823 * include/grub/sparc64/ieee1275/machine.h: Likewise.
11825 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
11826 (serial_hw_io_addr): New variable.
11827 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
11828 instead of `(unsigned short *) 0x400'.
11830 2007-11-10 Bean <bean123ch@gmail.com>
11832 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
11834 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
11836 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
11837 (vga_mod_SOURCES): Added.
11838 (vga_mod_CFLAGS): Likewise.
11839 (vga_mod_LDFLAGS): Likewise.
11841 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
11843 (set_map_mask): Likewise.
11844 (set_read_map): Likewise.
11845 (set_read_address): Likewise.
11846 (vga_font): Removed variable.
11847 (get_vga_glyph): Removed function.
11848 (invalidate_char): Likewise.
11849 (write_char): Changed to use grub_font_get_glyph() for font
11851 (grub_vga_putchar): Likewise.
11852 (grub_vga_getcharwidth): Likewise.
11854 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
11856 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
11858 (pxeboot_img_LDFLAGS): Likewise.
11859 (diskboot_img_LDFLAGS): Likewise.
11860 (kernel_img_LDFLAGS): Likewise.
11862 2007-11-06 Robert Millan <rmh@aybabtu.com>
11864 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
11865 in grub_outb() calls.
11866 (serial_hw_init): Likewise.
11868 2007-11-05 Robert Millan <rmh@aybabtu.com>
11870 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
11871 spaces. Skip non-regular files.
11873 2007-11-05 Robert Millan <rmh@aybabtu.com>
11875 * kern/disk.c (grub_disk_firmware_fini)
11876 (grub_disk_firmware_is_tainted): New variables.
11878 * include/grub/disk.h (grub_disk_firmware_fini)
11879 (grub_disk_firmware_is_tainted): Likewise.
11881 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
11882 (grub_disk_biosdisk_fini): ... to here.
11883 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
11884 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
11885 is set. Register grub_disk_biosdisk_fini() in
11886 `grub_disk_firmware_fini'.
11888 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
11889 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
11890 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
11891 to finish existing firmware disk interface.
11893 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
11894 (ata_mod_SOURCES): New variable.
11895 (ata_mod_CFLAGS): Likewise.
11896 (ata_mod_LDFLAGS): Likewise.
11898 2007-11-05 Robert Millan <rmh@aybabtu.com>
11900 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
11901 (grub_ata_wait): Reimplement using grub_millisleep().
11903 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
11904 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
11906 2007-11-03 Marco Gerards <marco@gnu.org>
11908 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
11909 (CRTC_ADDR_PORT): New macro.
11910 (CRTC_DATA_PORT): Likewise.
11911 (CRTC_CURSOR): Likewise.
11912 (CRTC_CURSOR_ADDR_HIGH): Likewise.
11913 (CRTC_CURSOR_ADDR_LOW): Likewise.
11914 (update_cursor): New function.
11915 (grub_console_real_putchar): Call `update_cursor'.
11916 (grub_console_gotoxy): Likewise.
11917 (grub_console_cls): Set the default color when clearing the
11919 (grub_console_setcursor): Implemented.
11921 2007-11-03 Marco Gerards <marco@gnu.org>
11923 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
11925 (grub_ata_pio_write): Likewise.
11927 (grub_atapi_identify): Wait after issuing an ATA command.
11928 (grub_atapi_packet): Likewise.
11929 (grub_ata_identify): Likewise.
11930 (grub_ata_readwrite): Likewise.
11932 2007-11-03 Marco Gerards <marco@gnu.org>
11934 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
11935 (grub_ata_pio_write): Likewise.
11936 (grub_ata_readwrite): Use `grub_error', instead of
11937 returning `grub_errno'.
11939 2007-11-03 Marco Gerards <marco@gnu.org>
11941 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
11942 grub_ata_pio_write once for every single sector, instead of for
11945 2007-10-31 Robert Millan <rmh@aybabtu.com>
11947 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
11949 * conf/i386-linuxbios.rmk: New file.
11951 * kern/i386/pc/hardware.c: Likewise.
11952 * term/i386/pc/at_keyboard.c: Likewise.
11953 * term/i386/pc/vga_text.c: Likewise.
11955 * include/grub/i386/linuxbios/boot.h: Likewise.
11956 * include/grub/i386/linuxbios/console.h: Likewise.
11957 * include/grub/i386/linuxbios/init.h: Likewise.
11958 * include/grub/i386/linuxbios/kernel.h: Likewise.
11959 * include/grub/i386/linuxbios/loader.h: Likewise.
11960 * include/grub/i386/linuxbios/memory.h: Likewise.
11961 * include/grub/i386/linuxbios/serial.h: Likewise.
11962 * include/grub/i386/linuxbios/time.h: Likewise.
11964 * kern/i386/linuxbios/init.c: Likewise.
11965 * kern/i386/linuxbios/startup.S: Likewise.
11966 * kern/i386/linuxbios/table.c: Likewise.
11968 2007-10-31 Marco Gerards <marco@gnu.org>
11970 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
11971 (ata_mod_SOURCES): New variable.
11972 (ata_mod_CFLAGS): Likewise.
11973 (ata_mod_LDFLAGS): Likewise.
11975 * disk/ata.c: New file.
11977 * include/grub/disk.h (grub_disk_dev_id): Add
11978 `GRUB_DISK_DEV_ATA_ID'.
11980 2007-10-31 Robert Millan <rmh@aybabtu.com>
11982 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
11983 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
11985 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
11986 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
11988 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
11991 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
11993 2007-10-27 Robert Millan <rmh@aybabtu.com>
11995 * include/grub/types.h (ULONG_MAX): Define macro.
11997 2007-10-22 Robert Millan <rmh@aybabtu.com>
11999 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
12001 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
12003 2007-10-22 Robert Millan <rmh@aybabtu.com>
12005 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
12006 (pkgdata_MODULES): Add `biosdisk.mod'.
12007 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
12010 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
12011 (grub_biosdisk_init): Replace with ...
12012 (GRUB_MOD_INIT(biosdisk)): ... this.
12013 (grub_biosdisk_fini): Replace with ...
12014 (GRUB_MOD_FINI(biosdisk)): ... this.
12016 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
12017 (grub_machine_init): Remove call to grub_biosdisk_init().
12018 (grub_machine_fini): Remove call to grub_machine_fini().
12020 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
12022 2007-10-22 Robert Millan <rmh@aybabtu.com>
12024 * include/grub/time.h: New file.
12025 * include/grub/i386/time.h: Likewise.
12026 * include/grub/powerpc/time.h: Likewise.
12027 * include/grub/sparc64/time.h: Likewise.
12029 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
12031 (KERNEL_MACHINE_TIME_HEADER): ... this.
12032 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
12034 (KERNEL_MACHINE_TIME_HEADER): ... this.
12035 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
12037 (KERNEL_MACHINE_TIME_HEADER): ... this.
12039 * kern/i386/efi/init.c: Include `<grub/time.h>'.
12040 (grub_millisleep): New function.
12041 * kern/i386/pc/init.c: Include `<grub/time.h>'.
12042 (grub_millisleep): New function.
12043 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
12044 Remove `grub/machine/time.h' include.
12045 (grub_millisleep): New function.
12046 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
12047 Remove `grub/machine/time.h' include.
12048 (grub_millisleep): New function.
12050 * include/grub/misc.h (grub_div_roundup): New function.
12052 * kern/misc.c: Include `<grub/time.h>'.
12053 (grub_millisleep_generic): New function.
12055 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
12057 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
12059 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
12060 `machine/time.h'. Add `time.h'.
12061 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12063 2007-10-21 Robert Millan <rmh@aybabtu.com>
12065 * include/grub/misc.h (grub_max): New function.
12067 2007-10-21 Robert Millan <rmh@aybabtu.com>
12069 * util/misc.c (grub_util_info): Call fflush() before returning.
12071 2007-10-20 Robert Millan <rmh@aybabtu.com>
12073 * genmk.rb (Image): Copy `extra_flags' from here ...
12074 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
12076 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
12077 to `argc' and `args' arguments.
12079 2007-10-17 Robert Millan <rmh@aybabtu.com>
12081 * kern/i386/loader.S: New file.
12083 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
12084 * kern/i386/loader.S (grub_linux_prot_size)... to here.
12085 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
12086 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
12087 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
12088 * kern/i386/loader.S (grub_linux_real_addr)... to here.
12089 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
12090 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
12091 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
12092 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
12093 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
12094 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
12095 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
12096 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
12098 * kern/i386/realmode.S: New file.
12100 * kern/i386/pc/startup.S (protstack): Moved from here ...
12101 * kern/i386/realmode.S (protstack)... to here.
12102 * kern/i386/pc/startup.S (gdt): Moved from here ...
12103 * kern/i386/realmode.S (gdt)... to here.
12104 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
12105 * kern/i386/realmode.S (prot_to_real)... to here.
12107 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
12108 `kern/i386/realmode.S'.
12110 2007-10-17 Robert Millan <rmh@aybabtu.com>
12112 * include/grub/i386/loader.h: New file.
12114 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
12115 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12116 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12117 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12118 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
12119 * include/grub/i386/loader.h (grub_linux_prot_size)
12120 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
12121 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
12122 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
12123 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
12125 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
12127 2007-10-15 Robert Millan <rmh@aybabtu.com>
12129 * normal/misc.c (grub_normal_print_device_info): Do not probe for
12130 filesystem when dev->disk is unset.
12131 Do probe for filesystem even when dev->disk->has_partitions is set.
12132 In case a filesystem is found, always report it.
12133 In case it isn't, if dev->disk->has_partitions is set, report that
12134 a partition table was found instead of reporting that no filesystem
12135 could be identified.
12137 2007-10-12 Robert Millan <rmh@aybabtu.com>
12139 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
12140 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
12142 * include/grub/types.h (grub_host_to_target16): New macro.
12143 (grub_host_to_target32): Likewise.
12144 (grub_host_to_target64): Likewise.
12145 (grub_target_to_host16): Likewise.
12146 (grub_target_to_host32): Likewise.
12147 (grub_target_to_host64): Likewise.
12149 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12150 Renamed from to ...
12151 (GRUB_MOD_ALIGN): ...this. Update all users.
12153 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
12154 grub_host_to_target32.
12155 Replace grub_be_to_cpu32 with grub_target_to_host32.
12156 (load_modules): Likewise.
12157 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
12158 Replace grub_be_to_cpu32 with grub_target_to_host32.
12159 Replace grub_cpu_to_be16 with grub_host_to_target16.
12160 Replace grub_cpu_to_be32 grub_host_to_target32.
12162 2007-10-12 Robert Millan <rmh@aybabtu.com>
12164 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
12165 * util/elf/grub-mkimage.c: ... here.
12167 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
12168 `util/powerpc/ieee1275/grub-mkimage.c'.
12170 2007-10-07 Robert Millan <rmh@aybabtu.com>
12172 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
12173 and make it easier to figure out.
12174 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
12175 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
12176 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
12177 leave us with less than HEAP_MIN_SIZE total heap.
12178 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
12180 2007-10-03 Robert Millan <rmh@aybabtu.com>
12182 * include/grub/i386/io.h: New file.
12183 * commands/i386/pc/play.c (inb): Removed.
12185 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
12187 * term/i386/pc/serial.c (inb): Removed.
12189 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
12191 * term/i386/pc/vga.c (inb): Removed.
12193 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
12196 2007-10-02 Robert Millan <rmh@aybabtu.com>
12198 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
12199 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12200 Reported by Marcin Kurek.
12202 2007-09-07 Robert Millan <rmh@aybabtu.com>
12204 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
12205 SmartFirmware version updates (as released by Sven Luther), and avoid
12206 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
12207 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
12210 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12212 From Hitoshi Ozeki:
12213 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
12214 when merging two regions.
12216 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12218 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
12219 * normal/completion.c (grub_normal_do_completion): Likewise.
12220 Reported by Hitoshi Ozeki.
12222 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12224 Do not use devices at boot in chainloading.
12226 * loader/i386/pc/chainloader.c (boot_drive): New variable.
12227 (boot_part_addr): Likewise.
12228 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
12229 with BOOT_DRIVE and BOOT_PART_ADDR.
12230 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
12231 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
12233 2007-08-29 Robert Millan <rmh@aybabtu.com>
12235 Patch from Simon Peter <dn.tlp@gmx.net>:
12236 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
12237 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
12238 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
12239 util/i386/pc/grub-setup.c_DEPENDENCIES.
12240 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
12241 util/grub-probe.c_DEPENDENCIES.
12242 * conf/powerpc-ieee1275.rmk: Likewise.
12244 2007-08-28 Robert Millan <rmh@aybabtu.com>
12246 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
12247 to tell grub-mkdevicemap how to name devices.
12248 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
12251 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
12252 util/i386/get_disk_name.c.
12253 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
12254 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
12255 util/ieee1275/get_disk_name.c.
12257 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
12259 * DISTLIST: Add util/i386/get_disk_name.c and
12260 util/ieee1275/get_disk_name.c.
12262 * util/grub-mkdevicemap.c: Replace device naming logic with
12263 grub_util_get_disk_name() calls.
12265 2007-08-20 Robert Millan <rmh@aybabtu.com>
12267 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
12268 (so that it works for both plural and singular quantities).
12270 2007-08-05 Robert Millan <rmh@aybabtu.com>
12272 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
12273 so that [xz] isn't taken into account when determining order.
12275 2007-08-02 Marco Gerards <marco@gnu.org>
12277 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
12278 `include/multiboot2.h', `include/grub/elfload.h',
12279 `include/multiboot.h', `include/grub/multiboot.h',
12280 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
12281 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
12282 `kern/elf.c', `loader/multiboot_loader.c',
12283 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
12284 `loader/i386/pc/multiboot2.c',
12285 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
12286 `util/i386/pc/grub-mkrescue.in'. Remove
12287 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
12288 `include/grub/i386/pc/util/biosdisk.h' and
12289 `include/grub/powerpc/ieee1275/multiboot.h'.
12291 2007-08-02 Bean <bean123ch@gmail.com>
12293 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
12294 (ntfs_mod_SOURCES): New variable.
12295 (ntfs_mod_CFLAGS): Likewise.
12296 (ntfs_mod_LDFLAGS): Likewise.
12298 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
12299 (grub_probe_SOURCES): Likewise.
12300 (grub_emu_SOURCES): Likewise.
12302 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12303 (grub_emu_SOURCES): Likewise.
12305 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
12306 (grub_emu_SOURCES): Likewise.
12308 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
12310 * fs/ntfs.c: New file.
12312 2007-08-02 Bean <bean123ch@gmail.com>
12314 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
12316 * file.h (grub_file): Likewise.
12318 * fshelp.h (grub_fshelp_read_file): Likewise.
12320 * util/i386/pc/grub-setup.c (setup): Likewise.
12321 (save_first_sector): Likewise.
12322 (save_blocklists): Likewise.
12324 * fs/affs.c (grub_affs_read_file): Likewise.
12326 * fs/ext2.c (grub_ext2_read_file): Likewise.
12328 * fs/fat.c (grub_fat_read_data): Likewise.
12330 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
12332 * fs/hfs.c (grub_hfs_read_file): Likewise.
12334 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12336 * fs/jfs.c (grub_jfs_read_file): Likewise.
12338 * fs/minix.c (grub_minix_read_file): Likewise.
12340 * fs/sfs.c (grub_sfs_read_file): Likewise.
12342 * fs/ufs.c (grub_ufs_read_file): Likewise.
12344 * fs/xfs.c (grub_xfs_read_file): Likewise.
12346 * command/blocklist.c (read_blocklist): Likewise.
12347 (print_blocklist): Likewise.
12349 2007-08-02 Marco Gerards <marco@gnu.org>
12351 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
12354 * disk/host.c: New file.
12356 * util/hostfs.c: Likewise.
12358 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
12359 return `GRUB_ERR_BAD_FS'.
12360 * fs/sfs.c (grub_sfs_mount): Likewise.
12361 * fs/xfs.c (grub_xfs_mount): Likewise.
12363 * include/grub/disk.h (enum grub_disk_dev_id): Add
12364 `GRUB_DISK_DEVICE_HOST_ID'.
12366 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
12368 2007-07-24 Jerone Young <jerone@gmail.com>
12370 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
12371 modules for compilation.
12372 * conf/powerpc-ieee1275.rmk: Likewise.
12374 * include/multiboot.h: Move multiboot definitions to one file. Rename
12375 many definitions to not get grub specific.
12376 * include/multiboot2.h: Create header with multiboot 2 definitions.
12377 * include/grub/multiboot.h: Header for grub specific function
12378 prototypes and definitions.
12379 * include/grub/multiboot2.h: Likewise.
12380 * include/grub/multiboot_loader.h: Likewise.
12381 * include/grub/i386/pc/multiboot.h: Removed.
12382 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
12384 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
12385 and 2 to allow for one multiboot and module commands.
12386 * loader/multiboot2.c: Add multiboot2 functionality.
12387 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
12388 and definition names.
12389 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
12391 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
12392 ieee1275 specific multiboot2 code.
12394 * kern/i386/pc/startup.S: Change headers and definition names for
12395 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
12397 2007-07-22 Robert Millan <rmh@aybabtu.com>
12399 * geninitheader.sh: Process file specified in first parameter rather
12400 than hardcoding grub_modules_init.lst.
12401 * geninit.sh: Likewise. Also, construct header name dynamically rather
12402 than hardcoding grub_modules_init.h.
12404 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
12405 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
12406 grub_probe_init.[ch] and grub_setup_init.[ch].
12408 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
12409 grub_modules_init.h with grub_emu_init.h.
12410 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
12411 grub_probe_init.[ch] files.
12412 * conf/i386-efi.rmk: Likewise.
12413 * conf/i386-pc.rmk: Likewise.
12414 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
12415 grub_setup_init.[ch] files.
12417 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
12418 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
12419 to initialize modules rather than a list of hardcoded functions.
12420 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
12421 grub_init_all() to initialize modules rather than a list of hardcoded
12424 2007-07-22 Robert Millan <rmh@aybabtu.com>
12426 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
12427 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
12429 2007-07-22 Robert Millan <rmh@aybabtu.com>
12431 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
12432 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
12433 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
12434 flag when running on SmartFirmware.
12435 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
12436 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
12439 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12440 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
12441 rather than decreasing it.
12443 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
12444 there's not enough space to do it, fail in the same way as when it
12445 can't be done because there are no partitions.
12447 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
12448 when nvsetenv failed.
12450 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
12452 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
12453 because this rule is automatically generated.
12454 (grub-mkrescue): Removed for the same reason as above.
12456 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
12458 Migrate to GNU General Public License Version 3.
12460 * COPYING: Replaced with the plain text version of GPLv3.
12462 * config.guess: Updated from gnulib.
12463 * config.sub: Likewise.
12465 * geninit.sh: Output a GPLv3 copyright notice.
12466 * geninitheader.sh: Likewise.
12467 * genmodsrc.sh: Likewise.
12468 * gensymlist.sh.in: Likewise.
12470 * boot/i386/pc/boot.S: Upgraded to GPLv3.
12471 * boot/i386/pc/diskboot.S: Likewise.
12472 * boot/i386/pc/pxeboot.S: Likewise.
12473 * commands/blocklist.c: Likewise.
12474 * commands/boot.c: Likewise.
12475 * commands/cat.c: Likewise.
12476 * commands/cmp.c: Likewise.
12477 * commands/configfile.c: Likewise.
12478 * commands/echo.c: Likewise.
12479 * commands/help.c: Likewise.
12480 * commands/ls.c: Likewise.
12481 * commands/search.c: Likewise.
12482 * commands/terminal.c: Likewise.
12483 * commands/test.c: Likewise.
12484 * commands/videotest.c: Likewise.
12485 * commands/i386/cpuid.c: Likewise.
12486 * commands/i386/pc/halt.c: Likewise.
12487 * commands/i386/pc/play.c: Likewise.
12488 * commands/i386/pc/reboot.c: Likewise.
12489 * commands/i386/pc/vbeinfo.c: Likewise.
12490 * commands/i386/pc/vbetest.c: Likewise.
12491 * commands/ieee1275/halt.c: Likewise.
12492 * commands/ieee1275/reboot.c: Likewise.
12493 * commands/ieee1275/suspend.c: Likewise.
12494 * disk/loopback.c: Likewise.
12495 * disk/lvm.c: Likewise.
12496 * disk/raid.c: Likewise.
12497 * disk/efi/efidisk.c: Likewise.
12498 * disk/i386/pc/biosdisk.c: Likewise.
12499 * disk/ieee1275/ofdisk.c: Likewise.
12500 * font/manager.c: Likewise.
12501 * fs/affs.c: Likewise.
12502 * fs/ext2.c: Likewise.
12503 * fs/fat.c: Likewise.
12504 * fs/fshelp.c: Likewise.
12505 * fs/hfs.c: Likewise.
12506 * fs/hfsplus.c: Likewise.
12507 * fs/iso9660.c: Likewise.
12508 * fs/jfs.c: Likewise.
12509 * fs/minix.c: Likewise.
12510 * fs/sfs.c: Likewise.
12511 * fs/ufs.c: Likewise.
12512 * fs/xfs.c: Likewise.
12513 * hello/hello.c: Likewise.
12514 * include/grub/acorn_filecore.h: Likewise.
12515 * include/grub/arg.h: Likewise.
12516 * include/grub/bitmap.h: Likewise.
12517 * include/grub/boot.h: Likewise.
12518 * include/grub/cache.h: Likewise.
12519 * include/grub/device.h: Likewise.
12520 * include/grub/disk.h: Likewise.
12521 * include/grub/dl.h: Likewise.
12522 * include/grub/elfload.h: Likewise.
12523 * include/grub/env.h: Likewise.
12524 * include/grub/err.h: Likewise.
12525 * include/grub/file.h: Likewise.
12526 * include/grub/font.h: Likewise.
12527 * include/grub/fs.h: Likewise.
12528 * include/grub/fshelp.h: Likewise.
12529 * include/grub/gzio.h: Likewise.
12530 * include/grub/hfs.h: Likewise.
12531 * include/grub/kernel.h: Likewise.
12532 * include/grub/loader.h: Likewise.
12533 * include/grub/lvm.h: Likewise.
12534 * include/grub/misc.h: Likewise.
12535 * include/grub/mm.h: Likewise.
12536 * include/grub/net.h: Likewise.
12537 * include/grub/normal.h: Likewise.
12538 * include/grub/parser.h: Likewise.
12539 * include/grub/partition.h: Likewise.
12540 * include/grub/pc_partition.h: Likewise.
12541 * include/grub/raid.h: Likewise.
12542 * include/grub/rescue.h: Likewise.
12543 * include/grub/script.h: Likewise.
12544 * include/grub/setjmp.h: Likewise.
12545 * include/grub/symbol.h: Likewise.
12546 * include/grub/term.h: Likewise.
12547 * include/grub/terminfo.h: Likewise.
12548 * include/grub/tparm.h: Likewise.
12549 * include/grub/types.h: Likewise.
12550 * include/grub/video.h: Likewise.
12551 * include/grub/efi/api.h: Likewise.
12552 * include/grub/efi/chainloader.h: Likewise.
12553 * include/grub/efi/console.h: Likewise.
12554 * include/grub/efi/console_control.h: Likewise.
12555 * include/grub/efi/disk.h: Likewise.
12556 * include/grub/efi/efi.h: Likewise.
12557 * include/grub/efi/pe32.h: Likewise.
12558 * include/grub/efi/time.h: Likewise.
12559 * include/grub/i386/linux.h: Likewise.
12560 * include/grub/i386/setjmp.h: Likewise.
12561 * include/grub/i386/types.h: Likewise.
12562 * include/grub/i386/efi/kernel.h: Likewise.
12563 * include/grub/i386/efi/loader.h: Likewise.
12564 * include/grub/i386/efi/time.h: Likewise.
12565 * include/grub/i386/pc/biosdisk.h: Likewise.
12566 * include/grub/i386/pc/boot.h: Likewise.
12567 * include/grub/i386/pc/chainloader.h: Likewise.
12568 * include/grub/i386/pc/console.h: Likewise.
12569 * include/grub/i386/pc/init.h: Likewise.
12570 * include/grub/i386/pc/kernel.h: Likewise.
12571 * include/grub/i386/pc/loader.h: Likewise.
12572 * include/grub/i386/pc/memory.h: Likewise.
12573 * include/grub/i386/pc/multiboot.h: Likewise.
12574 * include/grub/i386/pc/serial.h: Likewise.
12575 * include/grub/i386/pc/time.h: Likewise.
12576 * include/grub/i386/pc/vbe.h: Likewise.
12577 * include/grub/i386/pc/vbeblit.h: Likewise.
12578 * include/grub/i386/pc/vbefill.h: Likewise.
12579 * include/grub/i386/pc/vbeutil.h: Likewise.
12580 * include/grub/i386/pc/vga.h: Likewise.
12581 * include/grub/ieee1275/ieee1275.h: Likewise.
12582 * include/grub/ieee1275/ofdisk.h: Likewise.
12583 * include/grub/powerpc/libgcc.h: Likewise.
12584 * include/grub/powerpc/setjmp.h: Likewise.
12585 * include/grub/powerpc/types.h: Likewise.
12586 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
12587 * include/grub/powerpc/ieee1275/console.h: Likewise.
12588 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
12589 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
12590 * include/grub/powerpc/ieee1275/loader.h: Likewise.
12591 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
12592 * include/grub/powerpc/ieee1275/time.h: Likewise.
12593 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
12594 * include/grub/sparc64/libgcc.h: Likewise.
12595 * include/grub/sparc64/setjmp.h: Likewise.
12596 * include/grub/sparc64/types.h: Likewise.
12597 * include/grub/sparc64/ieee1275/console.h: Likewise.
12598 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12599 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12600 * include/grub/sparc64/ieee1275/time.h: Likewise.
12601 * include/grub/util/biosdisk.h: Likewise.
12602 * include/grub/util/getroot.h: Likewise.
12603 * include/grub/util/lvm.h: Likewise.
12604 * include/grub/util/misc.h: Likewise.
12605 * include/grub/util/raid.h: Likewise.
12606 * include/grub/util/resolve.h: Likewise.
12607 * io/gzio.c: Likewise.
12608 * kern/device.c: Likewise.
12609 * kern/disk.c: Likewise.
12610 * kern/dl.c: Likewise.
12611 * kern/elf.c: Likewise.
12612 * kern/env.c: Likewise.
12613 * kern/err.c: Likewise.
12614 * kern/file.c: Likewise.
12615 * kern/fs.c: Likewise.
12616 * kern/loader.c: Likewise.
12617 * kern/main.c: Likewise.
12618 * kern/misc.c: Likewise.
12619 * kern/mm.c: Likewise.
12620 * kern/parser.c: Likewise.
12621 * kern/partition.c: Likewise.
12622 * kern/rescue.c: Likewise.
12623 * kern/term.c: Likewise.
12624 * kern/efi/efi.c: Likewise.
12625 * kern/efi/init.c: Likewise.
12626 * kern/efi/mm.c: Likewise.
12627 * kern/i386/dl.c: Likewise.
12628 * kern/i386/efi/init.c: Likewise.
12629 * kern/i386/efi/startup.S: Likewise.
12630 * kern/i386/pc/init.c: Likewise.
12631 * kern/i386/pc/lzo1x.S: Likewise.
12632 * kern/i386/pc/startup.S: Likewise.
12633 * kern/ieee1275/ieee1275.c: Likewise.
12634 * kern/powerpc/cache.S: Likewise.
12635 * kern/powerpc/dl.c: Likewise.
12636 * kern/powerpc/ieee1275/cmain.c: Likewise.
12637 * kern/powerpc/ieee1275/crt0.S: Likewise.
12638 * kern/powerpc/ieee1275/init.c: Likewise.
12639 * kern/powerpc/ieee1275/openfw.c: Likewise.
12640 * kern/sparc64/cache.S: Likewise.
12641 * kern/sparc64/dl.c: Likewise.
12642 * kern/sparc64/ieee1275/init.c: Likewise.
12643 * kern/sparc64/ieee1275/openfw.c: Likewise.
12644 * loader/efi/chainloader.c: Likewise.
12645 * loader/efi/chainloader_normal.c: Likewise.
12646 * loader/i386/efi/linux.c: Likewise.
12647 * loader/i386/efi/linux_normal.c: Likewise.
12648 * loader/i386/pc/chainloader.c: Likewise.
12649 * loader/i386/pc/chainloader_normal.c: Likewise.
12650 * loader/i386/pc/linux.c: Likewise.
12651 * loader/i386/pc/linux_normal.c: Likewise.
12652 * loader/i386/pc/multiboot.c: Likewise.
12653 * loader/i386/pc/multiboot_normal.c: Likewise.
12654 * loader/powerpc/ieee1275/linux.c: Likewise.
12655 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12656 * normal/arg.c: Likewise.
12657 * normal/cmdline.c: Likewise.
12658 * normal/command.c: Likewise.
12659 * normal/completion.c: Likewise.
12660 * normal/execute.c: Likewise.
12661 * normal/function.c: Likewise.
12662 * normal/lexer.c: Likewise.
12663 * normal/main.c: Likewise.
12664 * normal/menu.c: Likewise.
12665 * normal/menu_entry.c: Likewise.
12666 * normal/misc.c: Likewise.
12667 * normal/parser.y: Likewise.
12668 * normal/script.c: Likewise.
12669 * normal/i386/setjmp.S: Likewise.
12670 * normal/powerpc/setjmp.S: Likewise.
12671 * normal/sparc64/setjmp.S: Likewise.
12672 * partmap/acorn.c: Likewise.
12673 * partmap/amiga.c: Likewise.
12674 * partmap/apple.c: Likewise.
12675 * partmap/gpt.c: Likewise.
12676 * partmap/pc.c: Likewise.
12677 * partmap/sun.c: Likewise.
12678 * term/gfxterm.c: Likewise.
12679 * term/terminfo.c: Likewise.
12680 * term/efi/console.c: Likewise.
12681 * term/i386/pc/console.c: Likewise.
12682 * term/i386/pc/serial.c: Likewise.
12683 * term/i386/pc/vesafb.c: Likewise.
12684 * term/i386/pc/vga.c: Likewise.
12685 * term/ieee1275/ofconsole.c: Likewise.
12686 * util/biosdisk.c: Likewise.
12687 * util/console.c: Likewise.
12688 * util/genmoddep.c: Likewise.
12689 * util/getroot.c: Likewise.
12690 * util/grub-emu.c: Likewise.
12691 * util/grub-mkdevicemap.c: Likewise.
12692 * util/grub-probe.c: Likewise.
12693 * util/lvm.c: Likewise.
12694 * util/misc.c: Likewise.
12695 * util/raid.c: Likewise.
12696 * util/resolve.c: Likewise.
12697 * util/update-grub.in: Likewise.
12698 * util/update-grub_lib.in: Likewise.
12699 * util/grub.d/00_header.in: Likewise.
12700 * util/grub.d/10_hurd.in: Likewise.
12701 * util/grub.d/10_linux.in: Likewise.
12702 * util/i386/efi/grub-install.in: Likewise.
12703 * util/i386/efi/grub-mkimage.c: Likewise.
12704 * util/i386/pc/grub-install.in: Likewise.
12705 * util/i386/pc/grub-mkimage.c: Likewise.
12706 * util/i386/pc/grub-mkrescue.in: Likewise.
12707 * util/i386/pc/grub-setup.c: Likewise.
12708 * util/i386/pc/misc.c: Likewise.
12709 * util/powerpc/ieee1275/grub-install.in: Likewise.
12710 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
12711 * util/powerpc/ieee1275/misc.c: Likewise.
12712 * video/bitmap.c: Likewise.
12713 * video/video.c: Likewise.
12714 * video/i386/pc/vbe.c: Likewise.
12715 * video/i386/pc/vbeblit.c: Likewise.
12716 * video/i386/pc/vbefill.c: Likewise.
12717 * video/i386/pc/vbeutil.c: Likewise.
12718 * video/readers/tga.c: Likewise.
12720 2007-07-02 Robert Millan <rmh@aybabtu.com>
12722 * conf/i386-efi.rmk: Replace obsolete reference to
12723 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
12724 with util/getroot.c.
12725 * conf/powerpc-ieee1275.rmk: Likewise.
12726 * conf/sparc64-ieee1275.rmk: Likewise.
12728 * util/grub-emu.c (main): Fix unchecked pointer handling.
12730 2007-07-02 Robert Millan <rmh@aybabtu.com>
12732 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
12733 invocation to fail, in order to support partition-less media.
12735 * util/i386/pc/grub-install.in: Likewise.
12737 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
12738 which fs or partmap modules are needed (akin to its sister scripts).
12740 Also use grub-probe to get rid of unportable /proc/mounts check.
12742 Print the same informational message that the other scripts do, before
12745 2007-06-23 Robert Millan <rmh@aybabtu.com>
12747 * util/update-grub_lib.in (font_path): New function. Determine whether
12748 a font file can be found and, if so, echo the GRUB path to it.
12750 * util/update-grub.in: Handle multiple terminals depending on user
12751 input, platform availability and font file presence. Propagate
12752 variables of our findings to /etc/grub.d/ children.
12754 * util/grub.d/00_header.in: Handle multiple terminals, based on
12755 environment setup by update-grub.
12757 2007-06-23 Robert Millan <rmh@aybabtu.com>
12759 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
12761 2007-06-21 Robert Millan <rmh@aybabtu.com>
12763 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
12764 indicate end of data section in kernel image.
12765 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
12766 GRUB_KERNEL_MACHINE_DATA_END.
12768 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
12770 * kern/i386/efi/startup.S: Likewise.
12772 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
12773 during image generation. Implement --prefix option to override this
12775 * util/i386/efi/grub-mkimage.c: Likewise.
12777 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
12778 code to make path relative to its root into a separate function.
12780 * util/i386/pc/grub-install.in: Use newly provided
12781 make_system_path_relative_to_its_root() to convert ${grubdir}, then
12782 pass the result to grub-install --prefix.
12784 2007-06-13 Robert Millan <rmh@aybabtu.com>
12786 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
12787 DEFAULT_DEVICE_MAP.
12788 * util/grub-emu.c: Use above definitions from misc.h instead of
12790 * util/grub-mkdevicemap.c: Likewise.
12791 * util/i386/pc/grub-setup.c: Likewise.
12792 * util/grub-probe.c: Likewise.
12793 (probe): Abort with grub_util_error() when either
12794 grub_guess_root_device or grub_util_get_grub_dev fails.
12796 2007-06-12 Robert Millan <rmh@aybabtu.com>
12798 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
12799 "pager" assignment.
12800 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
12802 * util/grub-probe.c (probe): Likewise for "drive_name".
12804 2007-06-11 Robert Millan <rmh@aybabtu.com>
12806 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
12807 not just the cdrom one.
12809 2007-06-11 Robert Millan <rmh@aybabtu.com>
12811 * util/i386/pc/grub-mkrescue.in: Add "set -e".
12812 Add --pkglibdir=DIR option to override pkglibdir.
12813 Mention --image-type=TYPE in help output.
12814 Fix --grub-mkimage (it was a no-op).
12815 Abort gracefully when no parameter is given.
12817 2007-06-11 Robert Millan <rmh@aybabtu.com>
12819 * util/i386/pc/grub-mkrescue.in: New file.
12820 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
12821 * Makefile.in: Handle bin_SCRIPTS.
12823 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
12825 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
12826 list of video modes.
12828 2007-06-06 Robert Millan <rmh@aybabtu.com>
12830 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
12831 file doesn't exist, or if it is in a filesystem grub can't read.
12833 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
12834 not abort if GRUB_DRIVE could not be defined. Rearrange generated
12835 header comment to fit in 80 columns when the variables are resolved.
12837 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
12838 could be identified by update-grub. Remove redundant check for
12839 unifont.pff existence (since convert_system_path_to_grub_path now
12842 2007-06-04 Robert Millan <rmh@aybabtu.com>
12844 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
12846 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
12848 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
12850 2007-06-04 Robert Millan <rmh@aybabtu.com>
12852 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
12854 * include/grub/partition.h: Declare grub_apple_partition_map_init and
12855 grub_apple_partition_map_fini.
12858 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
12859 to access >2 TiB disks).
12861 Print disk->total_sectors with %llu instead of %lu, since this
12862 variable is always 64-bit (prevents wrong disk size from being displayed
12863 on either >2 TiB disk or big-endian CPU).
12865 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
12866 into a generic case that supports all (sane) partition maps.
12868 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
12871 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
12872 and grub_apple_partition_map_fini() after that.
12874 2007-06-01 Robert Millan <rmh@aybabtu.com>
12876 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
12878 * util/grub.d/00_header.in: Only enable gfxterm when
12879 convert_system_path_to_grub_path() succeeds.
12881 2007-05-20 Robert Millan <rmh@aybabtu.com>
12883 * util/update-grub_lib.in: New file.
12884 * DISTLIST: Add update-grub_lib.in.
12885 * conf/common.rmk: Generate update-grub_lib and install it in
12887 * Makefile.in: Add install routine for $(lib_DATA).
12889 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
12890 function provided by update-grub_lib to support arbitrary paths of
12892 * util/update-grub.in: Use convert_system_path_to_grub_path() to
12893 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
12895 2007-05-19 Robert Millan <rmh@aybabtu.com>
12897 * commands/i386/cpuid.c: New module.
12898 * DISTLIST: Add it.
12899 * conf/i386-efi.rmk: Enable cpuid.mod.
12900 * conf/i386-pc.rmk: Likewise.
12902 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
12904 * kern/disk.c (grub_disk_read): Check return value of
12907 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
12909 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
12911 * disk/raid.c (grub_raid_open): Likewise.
12913 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
12915 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
12916 stack instead of on the heap.
12918 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
12919 before doing a read on it.
12921 * configure.ac: Only use -fno-stack-protector for the target
12924 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
12926 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
12927 __attribute_ ((unused)) to mode_type argument.
12929 * util/getroot.c (grub_guess_root_device): Fix #endif.
12931 * kern/misc.c (memcmp): Fix prototype.
12933 * include/grub/partition.h [GRUB_UTIL]
12934 (grub_gpt_partition_map_init): Add prototype.
12935 (grub_gpt_partition_map_fini): Likewise.
12937 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
12938 at the right place.
12940 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
12941 (grub_fat_read_data): Likewise.
12942 (grub_fat_find_dir): Likewise.
12944 * font/manager.c (find_glyph): Make table a const.
12945 (grub_font_get_glyph): Remove bitmap from if statement.
12947 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
12949 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
12950 code, first search for device in /dev/mapper, then in /dev.
12951 (grub_util_get_grub_dev): New function.
12952 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
12954 * util/grub-probe.c (probe): Remove check for RAID, call
12955 grub_util_get_grub_dev() instead of
12956 grub_util_biosdisk_get_grub_dev().
12957 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
12958 grub_util_biosdisk_get_grub_dev().
12959 * util/i386/pc/grub-setup.c (main): Likewise.
12961 2007-05-16 Robert Millan <rmh@aybabtu.com>
12963 * DISTLIST: Update for the latest changes.
12964 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
12965 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
12966 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
12967 grub/util/biosdisk.h.
12968 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
12969 grub/util/biosdisk.h.
12971 2007-05-16 Robert Millan <rmh@aybabtu.com>
12973 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
12975 2007-05-16 Robert Millan <rmh@aybabtu.com>
12977 * util/i386/efi/grub-install.in: New.
12978 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
12979 newly added grub-install.
12980 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
12982 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
12983 grub/util/biosdisk.h.
12984 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
12985 grub/util/biosdisk.h.
12987 2007-05-16 Robert Millan <rmh@aybabtu.com>
12989 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
12990 * include/grub/util/biosdisk.h: ... here.
12991 * util/i386/pc/biosdisk.c: Moved to ...
12992 * util/biosdisk.c: ... here.
12993 * util/i386/pc/getroot.c: Moved to ...
12994 * util/getroot.c: ... here.
12995 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
12996 * util/grub-mkdevicemap.c: ... here.
12997 * util/i386/pc/grub-probe.c: Moved to ...
12998 * util/grub-probe.c: ... here.
13000 2007-05-15 Robert Millan <rmh@aybabtu.com>
13002 * util/update-grub.in: Remove duplicated line in grub.cfg header
13005 2007-05-13 Robert Millan <rmh@aybabtu.com>
13007 * util/update-grub.in: Fix a few assumptions about the devices holding
13008 /, /boot and /boot/grub being the same.
13009 * util/grub.d/00_header.in: Likewise.
13010 * util/grub.d/10_hurd.in: Likewise.
13011 * util/grub.d/10_linux.in: Likewise.
13013 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
13014 patterns. Use that to define the `.old' suffix as older than `'.
13016 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
13018 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
13019 the grub.cfg header message.
13021 2007-05-11 Robert Millan <rmh@aybabtu.com>
13023 * util/update-grub.in: Create device.map if it doesn't already exist,
13024 before attempting to run grub-probe.
13025 Check for grub-probe and grub-mkdevicemap with the same code
13026 grub-install is using.
13029 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
13031 * Makefile.in: Add the datarootdir autoconf variable.
13033 2007-05-09 Robert Millan <rmh@aybabtu.com>
13035 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
13036 fail gracefully if dev->disk->partition == NULL.
13038 2007-05-07 Robert Millan <rmh@aybabtu.com>
13040 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
13041 determine partition map module.
13042 * util/i386/pc/grub-install.in: Use this feature to decide which
13043 partition module to load, instead of hardcoding pc and gpt.
13045 2007-05-07 Robert Millan <rmh@aybabtu.com>
13047 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
13048 source directory differs from build directory.
13050 2007-05-05 Robert Millan <rmh@aybabtu.com>
13052 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
13055 2007-05-05 Robert Millan <rmh@aybabtu.com>
13057 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
13059 2007-05-05 Robert Millan <rmh@aybabtu.com>
13061 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
13062 command-line arguments via ${GRUB_CMDLINE_LINUX}.
13064 2007-05-05 Robert Millan <rmh@aybabtu.com>
13066 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
13067 (grub_probe_SOURCES): Likewise.
13068 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
13069 GPT and initialize dos_part and bsd_part accordingly.
13070 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
13072 (main): Activate gpt module for use during partition identification,
13073 and deactivate it afterwards.
13074 * util/i386/pc/grub-install.in: Add gpt module to core.img.
13075 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
13076 partition identification, and deactivate it afterwards.
13078 2007-05-05 Robert Millan <rmh@aybabtu.com>
13080 * term/i386/pc/console.c (grub_console_fini): Call
13081 grub_term_set_current() before grub_term_unregister().
13083 2007-05-04 Robert Millan <rmh@aybabtu.com>
13085 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
13086 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
13087 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
13088 and update-grub_DATA.
13089 * conf/common.rmk: Build and install update-grub components.
13090 * conf/common.mk: Regenerate.
13091 * util/update-grub.in: New. Core of update-grub.
13092 * util/grub.d/00_header.in: New. Generates grub.cfg header.
13093 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
13094 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
13095 * util/grub.d/README: New. Document grub.d directory layout.
13097 2007-05-01 Robert Millan <rmh@aybabtu.com>
13099 * util/grub-emu.c: Move initialization functions
13100 grub_util_biosdisk_init() and grub_init_all() before
13101 grub_util_biosdisk_get_grub_dev(), which relies on them.
13103 2007-04-19 Robert Millan <rmh@aybabtu.com>
13105 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
13108 2007-04-18 Jerone Young <jerone@gmail.com>
13110 * kernel/elf.c: Add missing parenthesis for conditional statement
13113 2007-04-10 Jerone Young <jerone@gmail.com>
13115 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
13116 continue on and look for device node with real device name.
13118 2007-04-10 Jerone Young <jerone@gmail.com>
13120 * configure.ac: Add argument for autoconf to use transformation
13122 * Makefile.in: Add autoconf package transformation code.
13123 * util/i386/pc/grub-install.in: Likewise.
13124 * util/powerpc/ieee1275/grub-install.in: Likewise.
13126 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
13128 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
13129 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
13130 (EXT2_REVISION): Likewise.
13131 (EXT2_INODE_SIZE): Likewise.
13132 (struct grub_ext2_block_group): Added a missing member
13134 (grub_ext2_read_inode): Divide by the inode size in a superblock
13135 instead of 128 to obtain INODES_PER_BLOCK.
13136 Use the macro EXT2_INODE_SIZE instead of directly using
13137 SBLOCK->INODE_SIZE.
13139 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
13141 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
13142 superblock instead of the structure size to compute an
13143 offset. This fixes the problem that GRUB could not read a
13144 filesystem when inode size is different from 128-byte.
13146 2007-03-05 Marco Gerards <marco@gnu.org>
13148 * normal/main.c (read_config_file): When "menu" is not set, create
13149 an initial context.
13151 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
13153 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
13154 (HEAP_LIMIT): New macro.
13155 (grub_claim_heap): Claim memory up to `heaplimit'.
13157 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
13159 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
13160 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
13161 (_start): Likewise.
13162 (grub_arch_modules_addr): Return address after `_end'.
13163 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
13164 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
13165 (add_segments): Calculate `_end' from phdr size and location.
13166 (ALIGN_UP): Moved to ...
13167 * include/grub/misc.h: here.
13168 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
13170 (GRUB_IEEE1275_MODULE_BASE): Removed.
13172 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
13174 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
13177 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
13179 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
13181 (grub_elf64_load_hook_t): Likewise.
13182 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
13185 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
13187 * kern/mm.c: Update copyright.
13188 (grub_mm_debug): Correct syntax error.
13189 (grub_mm_dump_free): New function.
13190 (grub_debug_free): Call `grub_free'.
13191 * include/grub/mm.h: Update copyright.
13192 (grub_mm_dump_free): Add declaration.
13194 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
13196 * include/grub/ieee1275/ieee1275.h: Update copyright.
13197 * kern/powerpc/ieee1275/init.c: Likewise.
13198 * kern/powerpc/ieee1275/openfw.c: Likewise.
13200 * loader/powerpc/ieee1275/linux.c: Likewise.
13201 * include/grub/elfload.h: Likewise.
13202 * kern/elf.c: Likewise.
13203 (grub_elf32_load): Pass `base' and `size' parameters. Update all
13205 (grub_elf64_load): Likewise.
13206 (grub_elf32_load_segment): Move to a nested function.
13207 (grub_elf64_load_segment): Likewise.
13209 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
13211 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
13213 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
13214 (grub_heap_len): Likewise.
13215 (HEAP_SIZE): New macro.
13216 (grub_claim_heap): New function.
13217 (grub_machine_init): Don't claim heap directly. Call
13219 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
13220 (grub_available_iterate): New function.
13222 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
13224 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
13225 * configure.ac: Use it for testing the HOST and TARGET compilers.
13227 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
13229 * Makefile.in (enable_grub_emu): New variable.
13230 * configure.ac (--enable-grub-emu): New option.
13231 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
13232 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
13233 * conf/i386-pc.rmk: Likewise.
13234 * conf/powerpc-ieee1275.rmk: Likewise.
13235 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
13237 2006-12-12 Marco Gerards <marco@gnu.org>
13239 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
13241 * kern/env.c (grub_env_unset): Don't free the member `value' when
13242 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
13245 * normal/main.c (current_menu): Removed.
13246 (free_menu): Unset the `menu' environment variable.
13247 (grub_normal_menu_addentry): Make use of the environment variable
13248 `menu', instead of using the global `current_menu'. Allocate
13249 memory for the sourcecode of this entry.
13250 (read_config_file): New argument `nested', changed all callers.
13251 Only in the case of a new context, initialize a new menu. Set the
13252 `menu' environment variable.
13253 (grub_normal_execute): Don't set and unset the environment
13254 variable `menu' here anymore. Only free the menu when leaving the
13257 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
13260 2006-12-11 Marco Gerards <marco@gnu.org>
13262 * normal/menu_entry.c (run): Fix off by one bug so the last line
13263 is executed. Move the loader check to outside the loop.
13265 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
13267 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
13269 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
13271 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
13272 the number of sectors. Reported by Andrey Shuvikov
13273 <mr_hyro@yahoo.com>.
13275 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
13277 * kern/disk.c (grub_disk_read): When there is a read error, always
13278 try to read only the necessary data.
13280 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
13282 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
13284 [GRUB_UTIL] (grub_raid_fini): Likewise.
13285 [GRUB_UTIL] (grub_lvm_init): Likewise.
13286 [GRUB_UTIL] (grub_lvm_fini): Likewise.
13287 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
13288 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
13289 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
13290 and grub_raid_fini().
13292 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13294 * include/grub/types.h (__unused): Rename to UNUSED.
13295 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
13296 (grub_elf64_size): Likewise.
13298 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
13300 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
13301 grub_error_push and grub_error_pop in the error-handling path.
13302 (grub_elf32_load_segment): Only call grub_file_read with non-zero
13305 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
13307 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
13308 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13309 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13310 (kernel_elf_SOURCES): Likewise.
13311 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
13312 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
13313 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13314 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
13315 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
13316 (elf_mod_SOURCES): New variable.
13317 (elf_mod_CFLAGS): Likewise.
13318 (elf_mod_LDFLAGS): Likewise.
13319 * include/grub/types.h (__unused): New macro.
13320 * include/grub/elfload.h: New file.
13321 * kern/elf.c: Likewise.
13322 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
13323 (ELF32_LOADMASK): New macro.
13324 (ELF64_LOADMASK): Likewise.
13325 (vmlinux): Removed.
13326 (grub_linux_load32): New function.
13327 (grub_linux_load64): Likewise.
13328 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
13329 Use grub_elf_t instead of grub_file_t.
13331 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
13333 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
13334 `catch_result' to struct set_color_args.
13336 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13338 * normal/menu.c: Include grub/script.h.
13339 * normal/menu_entry.c: Likewise.
13340 * include/grub/normal.h: Do not include grub/script.h.
13342 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
13344 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
13346 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
13348 * kern/disk.c (grub_disk_open): Print debug messages when opening a
13350 (grub_disk_close): Print debug messages when closing a disk.
13351 (grub_disk_read): Print debug messages when disk read fails.
13352 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
13354 * kern/partition.c: Include misc.h.
13355 (grub_partition_iterate): Print debug messages when detecting
13358 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
13360 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
13362 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
13364 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
13366 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
13367 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
13369 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
13371 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
13372 instead of sizeof(lv). Patch by Michael Guntsche.
13374 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
13376 * disk/lvm.c: Rename VGS to VG_LIST.
13377 (grub_lvm_iterate): Change VGS->LV to VG-LV.
13378 (grub_lvm_open): Likewise.
13379 Thanks to Michael Guntsche for finding this bug.
13381 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13383 * configure.ac (AC_INIT): Bumped to 1.95.
13385 2006-10-14 Robert Millan <rmh@aybabtu.com>
13387 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
13388 with "/dev/.static/dev/md".
13390 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
13392 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
13393 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
13394 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
13395 DRIVE_NAME are always freed.
13397 * util/i386/pc/biosdisk.c (make_device_name): Add one into
13398 DOS_PART, as a DOS partition is counted from one instead of zero
13399 now. Reported by Robert Millan.
13401 2006-10-14 Robert Millan <rmh@aybabtu.com>
13403 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
13404 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
13405 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
13406 string returned by grub_guess_root_device.
13407 * util/i386/pc/grub-setup.c: Likewise.
13408 * util/i386/pc/grub-probefs.c: Likewise.
13410 * util/i386/pc/grub-probefs.c: Rename to ...
13411 * util/i386/pc/grub-probe.c: ... this.
13412 * DISTLIST: Remove grub-probefs, add grub-probe.
13413 * conf/i386-efi.rmk: Likewise.
13414 * conf/i386-pc.rmk: Likewise.
13415 * util/i386/pc/grub-install.in: Likewise.
13417 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
13418 choose which information we want to print.
13420 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
13422 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
13423 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
13424 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
13425 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
13426 video/readers/tga.c and video/i386/pc/vbeutil.c.
13428 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
13430 Added support for RAID and LVM.
13432 * disk/lvm.c: New file.
13433 * disk/raid.c: Likewise.
13434 * include/grub/lvm.h: Likewise.
13435 * include/grub/raid.h: Likewise.
13436 * include/grub/util/lvm.h: Likewise.
13437 * include/grub/util/raid.h: Likewise.
13438 * util/lvm.c: Likewise.
13439 * util/raid.c: Likewise.
13441 * include/grub/disk.h (grub_disk_dev_id): Add
13442 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
13443 (grub_disk_get_size): New prototype.
13444 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
13445 returns a partition.
13446 (grub_disk_get_size): New function.
13448 * kern/i386/pc/init.c (make_install_device): Copy the prefix
13449 verbatim if grub_install_dos_part is -2.
13451 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
13454 * util/i386/pc/grub-setup.c (setup): New argument
13455 MUST_EMBED. Force embedding of GRUB when the argument is
13456 true. Close FILE before returning.
13457 (main): Add support for RAID and LVM.
13459 * conf/common.rmk: Add RAID and LVM modules.
13460 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
13462 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
13464 * kern/misc.c (grub_strstr): New function.
13465 * include/grub/misc.h (grub_strstr): New prototype.
13467 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
13469 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
13471 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
13473 * kern/misc.c (grub_strtoull): Guess the base only if not
13476 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
13478 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
13481 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
13483 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
13485 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
13486 Remove `flags' argument. All callers changed.
13487 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
13488 (IEEE1275_IHANDLE_INVALID): New variable.
13489 (IEEE1275_CELL_INVALID): New variable.
13490 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
13491 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
13492 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
13493 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
13494 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
13495 codes from Open Firmware. All callers updated.
13496 (grub_ieee1275_next_property): Directly return Open Firmware return
13498 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
13499 Standardize error checking from `grub_ieee1275_get_property'.
13500 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
13501 `devalias' to `aliases'. Correct comments. Consolidate error paths.
13503 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
13505 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
13506 `instance_to_package_args' to `instance_to_path_args'.
13508 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
13509 `grub_ieee1275_chosen'.
13511 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
13512 `grub_ieee1275_interpret'.
13514 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
13516 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
13518 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
13520 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
13521 (__cmpdi): Likewise.
13523 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
13524 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
13527 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
13529 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
13530 to type `grub_ssize_t'.
13531 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
13533 2006-09-22 Marco Gerards <marco@gnu.org>
13535 * normal/script.c (grub_script_create_cmdmenu): Skip leading
13538 2006-09-22 Marco Gerards <marco@gnu.org>
13540 * commands/echo.c: New file.
13542 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
13544 * conf/common.rmk (echo_mod_SOURCES): New variable.
13545 (echo_mod_CFLAGS): Likewise.
13546 (echo_mod_LDFLAGS): Likewise.
13548 2006-09-22 Marco Gerards <marco@gnu.org>
13550 * normal/main.c (get_line): Malloc memory instead of using
13551 preallocated memory. Removed the arguments `cmdline' and
13552 `max_len'. Updated all callers.
13554 2006-09-22 Marco Gerards <marco@gnu.org>
13556 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
13557 (normal_mod_DEPENDENCIES): Likewise.
13559 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
13560 (normal_mod_DEPENDENCIES): Likewise.
13562 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
13564 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
13566 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
13568 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
13569 (normal_mod_DEPENDENCIES): Likewise.
13570 * conf/i386-pc.mk: Regenerate.
13571 * conf/i386-efi.mk: Likewise
13572 * conf/common.mk: Likewise.
13573 * conf/powerpc-ieee1275.mk: Likewise.
13574 * conf/sparc64-ieee1275.mk: Likewise.
13576 2006-09-22 Robert Millan <rmh@aybabtu.com>
13578 Sync with i386 version.
13579 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
13580 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
13582 2006-09-21 Robert Millan <rmh@aybabtu.com>
13584 Import from GRUB Legacy (lib/device.c):
13585 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
13586 (init_device_map) [__linux__]: Add support for I2O devices.
13588 2006-09-14 Marco Gerards <marco@gnu.org>
13590 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
13593 2006-09-14 Robert Millan <rmh@aybabtu.com>
13595 * util/i386/pc/grub-install.in: Skip menu.lst when removing
13598 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
13600 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
13601 before adding it to device.map.
13603 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
13605 * genmk.rb: Let GCC generate dependencies the first time it
13606 compiles a file; using the -MD option.
13607 * conf/common.mk: Regenerate.
13608 * conf/i386-pc.mk: Likewise.
13609 * conf/i386-efi.mk: Likewise.
13610 * conf/powerpc-ieee1275.mk: Likewise.
13611 * conf/sparc64-ieee1275.mk: Likewise.
13613 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
13615 Move the prototypes of grub_setjmp and grub_longjmp to
13616 cpu/setjmp.h, so that each architecture may specify different
13619 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
13620 (grub_longjmp): Likewise.
13621 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
13622 (grub_longjmp): Likewise.
13623 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
13624 (grub_longjmp): Likewise.
13626 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
13627 [!GRUB_UTIL] (grub_longjmp): Removed.
13629 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
13631 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
13632 "color!" method does not return any value.
13634 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
13636 * include/grub/bitmap.h: New file.
13638 * include/grub/i386/pc/vbeutil.h: Likewise.
13640 * video/bitmap.c: Likewise.
13642 * video/readers/tga.c: Likewise.
13644 * video/i386/pc/vbeutil.c: Likewise.
13646 * commands/videotest.c: Code cleanup and updated to reflect to new
13649 * term/gfxterm.c: Likewise.
13651 * video/video.c: Likewise.
13653 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
13654 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
13655 (bitmap_mod_SOURCES): New entry.
13656 (bitmap_mod_CFLAGS): Likewise.
13657 (bitmap_mod_LDFLAGS): Likewise.
13658 (tga_mod_SOURCES): Likewise.
13659 (tga_mod_CFLAGS): Likewise.
13660 (tga_mod_LDFLAGS): Likewise.
13662 * include/grub/video.h (grub_video_blit_operators): New enum type.
13663 (grub_video_render_target): Changed as forward declaration and moved
13664 actual definition to be video driver specific.
13665 (grub_video_adapter.blit_bitmap): Added blitting operator.
13666 (grub_video_adapter.blit_render_target): Likewise.
13667 (grub_video_blit_bitmap): Likewise.
13668 (grub_video_blit_render_target): Likewise.
13670 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
13671 driver specific render target definition.
13672 (grub_video_vbe_map_rgba): Added driver internal helper.
13673 (grub_video_vbe_unmap_color): Updated to use
13674 grub_video_i386_vbeblit_info.
13675 (grub_video_vbe_get_video_ptr): Likewise.
13677 * include/grub/i386/pc/vbeblit.h
13678 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
13679 grub_video_i386_vbeblit_info.
13680 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
13681 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
13682 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
13683 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
13684 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
13685 (grub_video_i386_vbeblit_index_index): Likewise.
13686 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
13687 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
13688 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
13689 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
13691 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
13694 * video/i386/pc/vbeblit.c: Updated to reflect changes on
13695 include/grub/i386/pc/vbeblit.h.
13697 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
13698 Updated to use grub_video_i386_vbeblit_info.
13699 (grub_video_i386_vbefill_R8G8B8): Likewise.
13700 (grub_video_i386_vbefill_index): Likewise.
13701 (grub_video_i386_vbefill): Added generic filler.
13703 * video/i386/pc/vbefill.c: Updated to reflect changes on
13704 include/grub/i386/pc/vbefill.h.
13706 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
13707 grub_video_i386_vbeblit_info.
13708 (grub_video_vbe_unmap_color): Likewise.
13709 (grub_video_vbe_blit_glyph): Likewise.
13710 (grub_video_vbe_scroll): Likewise.
13711 (grub_video_vbe_draw_pixel): Removed function.
13712 (grub_video_vbe_get_pixel): Likewise.
13713 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
13714 updated code to use it.
13715 (common_blitter): Added common blitter for render target and bitmap.
13716 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
13717 (grub_video_vbe_blit_render_target): Likewise.
13719 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
13721 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
13722 is in text mode if there is no console control protocol instance
13725 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
13727 * include/grub/video.h: Code cleanup.
13729 * include/grub/i386/pc/vbe.h: Likewise.
13731 * video/i386/pc/vbe.c: Likewise.
13733 * video/i386/pc/vbeblit.c: Likewise.
13735 * video/i386/pc/vbefill.c: Likewise.
13737 * video/video.c: Likewise. Also added more comments.
13739 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
13741 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
13742 (struct grub_biosdisk_dap): Likewise.
13744 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
13745 linkage settings for all functions.
13747 2006-07-12 Marco Gerards <marco@gnu.org>
13749 * configure.ac (--enable-mm-debug): Fix typo.
13751 * genkernsyms.sh.in: Use proper quoting for `CC'.
13753 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
13755 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
13756 (normal_mod_ASFLAGS): Remove "-m32".
13758 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
13760 * util/misc.c: Include config.h.
13761 [!HAVE_MEMALIGN]: Do not include malloc.h.
13762 (grub_memalign): Use posix_memalign, if present. Then, use
13763 memalign, if present. Otherwise, emit an error.
13765 * util/grub-emu.c: Do not include malloc.h.
13767 * include/grub/util/misc.h: Include unistd.h. This is required for
13768 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
13769 D. Eades III <hde@foobar-qux.org>.
13771 * configure.ac (AC_GNU_SOURCE): Added.
13772 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
13775 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
13777 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
13778 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
13780 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
13782 * include/grub/types.h (grub_host_addr_t): Rename to
13783 grub_target_addr_t.
13784 (grub_host_off_t): Rename to grub_target_off_t.
13785 (grub_host_size_t): Rename to grub_target_size_t.
13786 (grub_host_ssize_t): Rename to grub_target_ssize_t.
13787 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
13789 * include/grub/kernel.h (struct grub_module_header): Change type
13790 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
13791 (grub_module_info): Likewise.
13793 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
13795 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
13796 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
13797 Velazquez <jesus.velazquez@gmail.com>.
13799 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
13801 Count partitions from 1 instead of 0 in the string representation
13802 of partitions. Still use 0-based internally.
13804 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
13805 (sun_partition_map_iterate): Use grub_partition_t instead of
13806 struct grub_partition *. Cast DESC->START_CYLINDER to
13807 grub_uint64_t after converting the endian.
13808 (sun_partition_map_probe): Subtract 1 for PARTNUM.
13809 (sun_partition_map_get_name): Add 1 to P->INDEX.
13811 * partmap/pc.c (grub_partition_parse): Subtract 1 for
13813 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
13815 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
13816 zero instead of one.
13817 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
13818 (gpt_partition_map_get_name): Add 1 into P->INDEX.
13820 * partmap/apple.c (apple_partition_map_iterate): Change the type
13821 of POS to unsigned.
13822 (apple_partition_map_probe): Subtract 1 for PARTNUM.
13823 (apple_partition_map_get_name): Add 1 into P->INDEX.
13825 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
13826 of POS to unsigned.
13827 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
13828 calculate the offset of a partition.
13829 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
13830 (amiga_partition_map_get_name): Add 1 into P->INDEX.
13832 * partmap/acorn.c (acorn_partition_map_find): Change the type of
13833 SECTOR to grub_disk_addr_t.
13834 (acorn_partition_map_iterate): Likewise.
13835 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
13836 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
13838 (acorn_partition_map_get_name): Add 1 into P->INDEX.
13840 * kern/i386/pc/init.c (make_install_device): Add 1 into
13841 GRUB_INSTALL_DOS_PART.
13843 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
13846 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
13848 Clean up the code to support 64-bit addressing in disks and
13849 files. This change is not enough for filesystems yet.
13851 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
13852 type of "start" to grub_uint64_t.
13853 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
13854 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
13855 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
13858 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
13859 to grub_disk_addr_t.
13861 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
13864 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13866 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
13869 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
13871 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
13873 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
13875 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
13876 to grub_off_t, to detect an error from grub_file_seek.
13877 (grub_multiboot_load_elf32): Likewise.
13879 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
13880 maximum unsigned long value when an overflow is detected.
13881 (grub_strtoull): New function.
13882 (grub_divmod64): Likewise.
13883 (grub_lltoa): use grub_divmod64.
13885 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
13887 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
13888 the pointer to next character. Use grub_strtoull instead of
13890 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
13891 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
13894 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
13895 return value is signed.
13896 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
13897 test if OFFSET is less than zero, as OFFSET is unsigned now.
13899 * kern/disk.c (struct grub_disk_cache): Change the type of
13900 "sector" to grub_disk_addr_t.
13901 (grub_disk_cache_get_index): Change the type of SECTOR to
13902 grub_disk_addr_t. Calculate the hash with SECTOR casted to
13903 unsigned after shifting.
13904 (grub_disk_cache_invalidate): Change the type of SECTOR to
13906 (grub_disk_cache_unlock): Likewise.
13907 (grub_disk_cache_store): Likewise.
13908 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
13909 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
13910 grub_disk_addr_t and grub_uint64_t, respectively.
13911 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
13912 body, as the value of OFFSET is tweaked by
13913 grub_disk_check_range. Change the types of START_SECTOR, LEN and
13914 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
13916 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
13917 body, as the value of OFFSET is tweaked by
13918 grub_disk_check_range. Change the types of LEN and N to
13921 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
13922 and "saved_offset" to grub_off_t.
13923 (test_header): Cast BUF to char *.
13924 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
13926 (grub_gzio_read): Change the types of OFFSET and SIZE to
13927 grub_off_t and grub_size_t, respectively.
13929 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
13931 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
13932 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
13933 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
13934 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
13935 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
13937 * include/grub/types.h (grub_off_t): Unconditionally set to
13939 (grub_disk_addr_t): Changed to grub_uint64_t.
13941 * include/grub/partition.h (struct grub_partition): Change the
13942 types of "start", "len" and "offset" to grub_disk_addr_t,
13943 grub_uint64_t and grub_disk_addr_t, respectively.
13944 (grub_partition_get_start): Return grub_disk_addr_t.
13945 (grub_partition_get_len): Return grub_uint64_t.
13947 * include/grub/misc.h (grub_strtoull): New prototype.
13948 (grub_divmod64): Likewise.
13950 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
13951 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
13952 grub_off_t, respectively.
13953 All callers and references changed.
13955 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
13956 grub_size_t in "read".
13957 All callers and references changed.
13959 * include/grub/file.h (struct grub_file): Change the types of
13960 "offset" and "size" to grub_off_t and grub_off_t,
13961 respectively. Change the type of SECTOR to grub_disk_addr_t in
13963 (grub_file_read): Change the type of LEN to grub_size_t.
13964 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
13966 (grub_file_size): Return grub_off_t.
13967 (grub_file_tell): Likewise.
13968 All callers and references changed.
13970 * include/grub/disk.h (struct grub_disk_dev): Change the types of
13971 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
13973 (struct grub_disk): Change the type of "total_sectors" to
13974 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
13976 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
13977 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
13978 (grub_disk_write): Likewise.
13979 All callers and references changed.
13981 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
13982 char * for grub_strncmp to silence gcc.
13983 (grub_iso9660_mount): Likewise.
13984 (grub_iso9660_mount): Likewise.
13985 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
13987 (grub_iso9660_iterate_dir): Likewise.
13988 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
13990 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
13991 LEN to grub_disk_addr_t and grub_size_t, respectively.
13993 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13995 * fs/jfs.c (grub_jfs_read_file): Likewise.
13997 * fs/minix.c (grub_jfs_read_file): Likewise.
13999 * fs/sfs.c (grub_jfs_read_file): Likewise.
14001 * fs/ufs.c (grub_jfs_read_file): Likewise.
14003 * fs/xfs.c (grub_jfs_read_file): Likewise.
14005 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
14006 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
14009 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
14010 BLKNR to -1 instead of returning GRUB_ERRNO.
14011 (grub_ext2_read_file): Change the types of SECTOR and
14012 LEN to grub_disk_addr_t and grub_size_t, respectively.
14014 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
14015 LEN to grub_disk_addr_t and grub_size_t, respectively.
14017 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
14020 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
14021 string. Do not cast SECTOR explicitly.
14023 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
14024 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
14025 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
14026 grub_disk_addr_t and grub_size_t, respectively. If the sector is
14027 over 2TB and LBA mode is not supported, raise an error.
14028 (get_safe_sectors): New function.
14029 (grub_biosdisk_read): Use get_safe_sectors.
14030 (grub_biosdisk_write): Likewise.
14032 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
14033 (grub_efidisk_write): Likewise.
14035 * disk/loopback.c (delete_loopback): Cosmetic changes.
14036 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
14038 (grub_loopback_open): Likewise.
14039 (grub_loopback_read): Likewise. Also, change the type of POS to
14040 grub_off_t, and fix the usage of grub_memset.
14042 * commands/i386/pc/play.c: Include grub/machine/time.h.
14044 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
14047 * commands/configfile.c: Include grub/env.h.
14049 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
14050 GRUB_ERRNO directly instead. Change the type of POS to
14051 grub_off_t. Follow the coding standard.
14053 * commands/blocklist.c: Include grub/partition.h.
14054 (grub_cmd_blocklist): Return an error if the underlying device is
14055 not a disk. Take the starting sector of a partition into account,
14056 if a partition is used.
14058 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
14060 (lba_mode): Support 64-bit addresses.
14061 (chs_mode): Likewise.
14062 (copy_buffer): Adapted to the new offsets of a length field and a
14064 (blocklist_default_start): Allocate 64-bit space.
14066 * boot/i386/pc/boot.S (force_lba): Removed.
14067 (boot_drive): Moved to under KERNEL_SECTOR.
14068 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
14070 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
14072 (lba_mode): Refactored to support a 64-bit address. More size
14074 (setup_sectors): Likewise.
14076 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
14078 * DISTLIST: Added include/grub/i386/linux.h. Removed
14079 include/grub/i386/pc/linux.h
14081 * configure.ac (AC_INIT): Bumped to 1.94.
14083 * config.guess: Updated from gnulib.
14084 * config.sub: Likewise.
14085 * install-sh: Likewise.
14086 * mkinstalldirs: Likewise.
14088 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
14090 * conf/common.rmk (grub_modules_init.lst): Depended on
14091 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
14094 * genmk.rb (PModule::rule): Reverted the previous change.
14096 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
14098 * conf/common.rmk (grub_modules_init.lst): Depends on
14099 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
14100 that the target does not exist before producing.
14101 (grub_modules_init.h): Remove the target before generating.
14102 (grub_emu_init.c): Likewise.
14104 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
14106 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
14108 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
14109 for the target-specific tests. Make sure that we also have the
14110 up-to-date target variables for those tests.
14112 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
14114 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
14115 (PModule::rule): Likewise.
14117 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
14119 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
14120 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
14121 target-specific flags should be prefixed.
14122 (PModule::rule): Likewise.
14124 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
14126 * configure.ac (CMP): Check if cmp is available explicitly.
14128 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
14130 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
14131 (target_cpu): New variable.
14132 (pkglibdir): Use target_cpu instead of host_cpu.
14134 * util/i386/pc/grub-install.in (host_cpu): Removed.
14135 (target_cpu): New variable.
14136 (pkglibdir): Use target_cpu instead of host_cpu.
14138 * util/genmoddep.c: Removed.
14140 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
14141 instead of GRUB_HOST_SIZEOF_VOID_P.
14142 * kern/dl.c: Likewise.
14144 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
14146 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14147 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14148 (GRUB_TARGET_SIZEOF_LONG): ... this.
14149 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14150 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14151 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14153 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14154 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14155 (GRUB_TARGET_SIZEOF_LONG): ... this.
14156 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14157 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14158 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
14160 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
14161 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
14162 (GRUB_TARGET_SIZEOF_LONG): ... this.
14163 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
14164 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
14166 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
14167 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
14168 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
14169 instead of GRUB_HOST_SIZEOF_LONG.
14170 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
14171 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
14172 GRUB_CPU_WORDS_BIGENDIAN.
14173 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
14174 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
14177 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
14178 (genmoddep_SOURCES): Likewise.
14179 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
14180 (genmoddep_SOURCES): Likewise.
14181 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
14182 (genmoddep_SOURCES): Likewise.
14183 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
14185 (genmoddep_SOURCES): Likewise.
14187 * genmoddep.awk: New file.
14189 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
14190 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
14191 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
14192 (PModule::rule): Likewise.
14193 (Program::rule): Likewise.
14194 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
14195 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
14198 * configure.ac: Rewritten intensively to use host and target
14199 instead of build and host, respectively.
14201 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
14202 (host_cpu): Removed.
14203 (target_cpu): New variable.
14204 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
14205 (BUILD_CC): Removed.
14206 (BUILD_CFLAGS): Likewise.
14207 (BUILD_CPPFLAGS): Likewise.
14208 (TARGET_CC): New variable.
14209 (TARGET_CFLAGS): Likewise.
14210 (TARGET_CPPFLAGS): Likewise.
14211 (TARGET_LDFLAGS): Likewise.
14213 (include): Use target_cpu instead of host_cpu.
14214 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
14216 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
14218 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
14220 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
14221 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
14222 field 'false' to 'exec_on_false'.
14223 (grub_script_create_cmdif): Renamed argument names to reflect above
14226 * normal/execute.c (grub_script_execute_cmdif): Likewise.
14228 * normal/script.c (grub_script_create_cmdif): Likewise.
14230 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
14232 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
14234 (grub_hfsplus_btree_recptr): Likewise.
14235 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
14236 FILEBLOCK both to pass a block number and store next block
14238 (grub_hfsplus_read_block): Rewritten heavily to support an extent
14239 overflow file correctly. Specify errors appropriately, because
14240 fshelp expects that GRUB_ERRNO is set when fails. Reuse
14241 grub_hfsplus_btree_recptr to get the pointer to a found key.
14242 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
14245 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
14247 (_linux_mod_SOURCES): New variable.
14248 (_linux_mod_CFLAGS): Likewise.
14249 (_linux_mod_LDFLAGS): Likewise.
14250 (linux_mod_SOURCES): Likewise.
14251 (linux_mod_CFLAGS): Likewise.
14252 (linux_mod_LDFLAGS): Likewise.
14254 * DISTLIST: Added loader/i386/efi/linux.c,
14255 loader/i386/efi/linux_normal.c and
14256 include/grub/i386/efi/loader.h.
14258 * loader/i386/efi/linux.c: New file.
14259 * loader/i386/efi/linux_normal.c: Likewise.
14260 * include/grub/i386/efi/loader.h: Likewise.
14262 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
14264 * commands/blocklist.c: New file.
14266 * DISTLIST: Added commands/blocklist.c.
14268 * term/efi/console.c (grub_console_highlight_color): Use a lighter
14269 color for the background, and a darker color for the foreground.
14270 (grub_console_checkkey): Return READ_KEY.
14271 (grub_console_cls): Set the background to
14272 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
14274 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
14276 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
14277 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
14279 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
14282 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
14283 BG. The spec is wrong again.
14285 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
14287 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
14289 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14290 commands/blocklist.c.
14291 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14293 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
14294 (blocklist_mod_SOURCES): New variable.
14295 (blocklist_mod_CFLAGS): Likewise.
14296 (blocklist_mod_LDFLAGS): Likewise.
14298 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
14300 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
14302 (lba_mode): Use %eax more intensively to reduce the code size.
14304 2006-05-20 Marco Gerards <marco@gnu.org>
14306 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
14308 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
14310 (script): Accept leading newlines.
14311 (newlines): New rule to describe 0 or more newlines.
14312 (commands): Accept `command' with trailing newline. Fixed the
14313 order in which arguments were passed to `grub_script_add_cmd'.
14314 Accept commands separated by newlines.
14315 (function): Changed to accept newlines.
14316 (menuentry) Rewritten.
14318 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
14319 front of the list, instead of to the end.
14321 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
14323 * util/i386/pc/grub-install.in (bindir): New variable.
14324 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
14325 Shaver <lbgwjl@gmail.com>.
14327 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
14329 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
14330 grub/machine/linux.h
14331 * loader/i386/pc/linux.c: Likewise.
14333 * include/grub/i386/pc/linux.h: Moved to ...
14334 * include/grub/i386/linux.h: ... here.
14336 * include/grub/i386/linux.h (struct linux_kernel_params): New
14339 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
14341 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
14343 (grub_video_vbe_blit_glyph): Likewise.
14344 (grub_video_vbe_blit_bitmap): Likewise.
14345 (grub_video_vbe_blit_render_target): Likewise.
14347 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
14349 * configure.ac (--with-platform): Properly quote the square
14352 2006-05-08 Marco Gerards <marco@gnu.org>
14354 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
14356 (kernel_elf_HEADERS): ...to this. Updated all users.
14357 (grubof_symlist.c): Renamed from this...
14358 (kernel_elf_symlist.c): ...to this. Updated all users.
14359 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14360 (grubof_SOURCES): Renamed from this...
14361 (kernel_elf_SOURCES): ...to this.
14362 (grubof_HEADERS): Renamed from this...
14363 (kernel_elf_HEADERS): ...to this.
14364 (grubof_CFLAGS): Renamed from this...
14365 (kernel_elf_CFLAGS): ...to this.
14366 (grubof_ASFLAGS): Renamed from this...
14367 (kernel_elf_ASFLAGS): ...to this.
14368 (grubof_LDFLAGS): Renamed from this...
14369 (kernel_elf_LDFLAGS): ...to this.
14371 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
14373 (kernel_elf_HEADERS): ...to this. Updated all users.
14374 (grubof_symlist.c): Renamed from this...
14375 (kernel_elf_symlist.c): ...to this. Updated all users.
14376 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
14377 (grubof_SOURCES): Renamed from this...
14378 (kernel_elf_SOURCES): ...to this.
14379 (grubof_HEADERS): Renamed from this...
14380 (kernel_elf_HEADERS): ...to this.
14381 (grubof_CFLAGS): Renamed from this...
14382 (kernel_elf_CFLAGS): ...to this.
14383 (grubof_ASFLAGS): Renamed from this...
14384 (kernel_elf_ASFLAGS): ...to this.
14385 (grubof_LDFLAGS): Renamed from this...
14386 (kernel_elf_LDFLAGS): ...to this.
14388 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
14389 `kernel.elf' instead of `grubof'.
14391 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
14393 Add --with-platform to configure. Use pkglibdir instead of
14394 pkgdatadir. This is reported by Roger Leigh.
14396 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
14397 (host_vendor): Likewise.
14398 (host_os): Likewise.
14399 (pkgdatadir): Likewise.
14400 (platform): New variable.
14401 (pkglibdir): Likewise.
14402 Use PKGLIBDIR instead of PKGDATADIR.
14404 * util/i386/pc/grub-install.in (datadir): Removed.
14405 (host_vendor): Likewise.
14406 (host_os): Likewise.
14407 (pkgdatadir): Likewise.
14408 (platform): New variable.
14409 (pkglibdir): Likewise.
14410 Use PKGLIBDIR instead of PKGDATADIR.
14412 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
14413 instead of GRUB_DATADIR.
14415 * util/i386/pc/grub-mkimage.c (usage): Likewise.
14417 * util/i386/efi/grub-mkimage.c (usage): Likewise.
14420 * configure.ac (--with-platform): New option.
14421 Use PLATFORM instead of HOST_VENDOR to specify a platform.
14423 * Makefile.in: Include a makefile based on PLATFORM instead of
14425 (pkgdatadir): Not appended by the machine type.
14426 (pkglibdir): Appended by the machine type.
14427 (host_vendor): Removed.
14428 (platform): New variable.
14429 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
14430 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
14431 (uninstall): Likewise.
14433 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
14435 Use the environment context in the menu. Remove the commands
14436 "default" and "timeout", and use variables instead.
14438 * normal/menu.c: Include grub/env.h.
14439 (print_entry): Cast TITLE to silence gcc.
14440 (get_timeout): New function.
14441 (set_timeout): Likewise.
14442 (get_entry_number): Likewise.
14443 (run_menu): Use a default entry, a fallback entry and a timeout
14444 in the environment variables "default", "fallback" and
14445 "timeout". Also, tweak the default entry if it is not within the
14446 current menu entries.
14447 (grub_menu_run): Use a fallback entry in the environment variable
14450 * normal/main.c (read_config_file): Do not initialize
14451 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
14453 (grub_normal_execute): Use a data slot to store the menu.
14455 * include/grub/normal.h (struct grub_menu): Removed default_entry,
14456 fallback_entry and timeout.
14457 (struct grub_menu_list): Removed.
14458 (grub_menu_list_t): Likewise.
14459 (struct grub_context): Likewise.
14460 (grub_context_t): Likewise.
14461 (grub_context_get): Likewise.
14462 (grub_context_get_current_menu): Likewise.
14463 (grub_context_push_menu): Likewise.
14464 (grub_context_pop_menu): Likewise.
14465 (grub_default_init): Likewise.
14466 (grub_default_fini): Likewise.
14467 (grub_timeout_init): Likewise.
14468 (grub_timeout_fini): Likewise.
14470 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
14472 (normal_mod_SOURCES): Removed normal/context.c.
14474 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
14475 commands/default.c, commands/timeout.c and normal/context.c.
14476 (normal_mod_SOURCES): Removed normal/context.c.
14478 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
14479 commands/timeout.c and normal/context.c.
14480 (normal_mod_SOURCES): Removed normal/context.c.
14482 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
14483 commands/default.c, commands/timeout.c and normal/context.c.
14484 (normal_mod_SOURCES): Removed normal/context.c.
14486 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
14488 (default_mod_SOURCES): Removed.
14489 (default_mod_CFLAGS): Likewise.
14490 (default_mod_LDFLAGS): Likewise.
14491 (timeout_mod_SOURCES): Removed.
14492 (timeout_mod_CFLAGS): Likewise.
14493 (timeout_mod_LDFLAGS): Likewise.
14495 * DISTLIST: Removed commands/default.c, commands/timeout.c and
14498 * commands/default.c: Removed.
14499 * commands/timeout.c: Likewise.
14500 * normal/context.c: Likewise.
14502 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
14504 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
14506 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
14508 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
14509 "next" to "prev" for readability.
14510 (struct grub_env_sorted_var): New struct.
14511 (grub_env_context): Renamed to ...
14512 (initial_context): ... this.
14513 (grub_env_var_context): Renamed to ...
14514 (current_context): ... this.
14515 (grub_env_find): Look only at CURRENT_CONTEXT.
14516 (grub_env_context_open): Rewritten to copy exported variables from
14518 (grub_env_context_close): Rewritten according to the new
14519 scheme. Also, add an assertion to prevent the initial context from
14521 (grub_env_insert): Removed the code for the sorted list.
14522 (grub_env_remove): Likewise.
14523 (grub_env_export): Simply mark the variable with
14524 GRUB_ENV_VAR_GLOBAL.
14525 (grub_env_set): A cosmetic change for naming consistency.
14526 (grub_env_get): Likewise.
14527 (grub_env_unset): Likewise.
14528 (grub_env_iterate): Rewritten to sort variables within this
14530 (grub_register_variable_hook): Fixed for naming consistency. Call
14531 grub_env_find again, only if NAME is not found at the first time.
14532 (mangle_data_slot_name): New function.
14533 (grub_env_set_data_slot): Likewise.
14534 (grub_env_get_data_slot): Likewise.
14535 (grub_env_unset_data_slot): Likewise.
14537 * include/grub/env.h (grub_env_var_type): New enum.
14538 (GRUB_ENV_VAR_LOCAL): New constant.
14539 (GRUB_ENV_VAR_GLOBAL): Likewise.
14540 (GRUB_ENV_VAR_DATA): Likewise.
14541 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
14543 (grub_env_set): Replace VAR with NAME for consistency.
14544 (grub_register_variable_hook): Likewise.
14545 (grub_env_export): Specify the name of the argument.
14546 (grub_env_set_data_slot): New prototype.
14547 (grub_env_get_data_slot): Likewise.
14548 (grub_env_unset_data_slot): Likewise.
14550 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
14552 Extend the loader so that GRUB can accept a loader which comes
14553 back to GRUB when a loaded image exits. Also, this change adds
14554 support for a chainloader on EFI.
14556 * term/efi/console.c: Include grub/misc.h.
14557 (grub_console_checkkey): Display a scan code on the top for
14558 debugging. This will be removed once the EFI port gets stable.
14559 Correct the scan code mapping.
14561 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
14562 allocate memory from larger regions, in order to reduce the number
14563 of allocated regions. Otherwise, the MacOSX loader panics.
14564 (filter_memory_map): Avoid less than 1MB for compatibility with
14566 (add_memory_regions): Allocate from the tail of a region, if
14567 possible, to avoid allocating a region near to 1MB, for the MacOSX
14570 * kern/efi/init.c (grub_efi_set_prefix): Specify
14571 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
14573 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
14574 argument IMAGE_HANDLE and specify it to get a loaded image.
14575 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
14576 grub_efi_get_loaded_image.
14577 (grub_efi_get_filename): Divide the length by the size of
14579 (grub_efi_get_device_path): New function.
14580 (grub_efi_print_device_path): Print End Device Path nodes. Divide
14581 the length by the size of grub_efi_char16_t for a file path device
14584 * kern/loader.c (grub_loader_noreturn): New variable.
14585 (grub_loader_set): Accept a new argument NORETURN. Set
14586 GRUB_LOADER_NORETURN to NORETURN.
14587 All callers changed.
14588 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
14591 * include/grub/efi/efi.h (grub_efi_get_device_path): New
14593 (grub_efi_get_loaded_image): Take an argument to specify an image
14596 * include/grub/loader.h (grub_loader_set): Added one more argument
14599 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
14600 instead of grub_efi_open_protocol.
14601 (grub_efidisk_get_device_name): Likewise.
14602 (grub_efidisk_close): Print a newline.
14603 (grub_efidisk_get_device_handle): Fixed to use
14604 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
14605 GRUB_EFI_DEVICE_PATH_TYPE.
14607 * disk/efi/efidisk.c (device_path_guid): Moved to ...
14608 * kern/efi/efi.c (device_path_guid): ... here.
14610 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
14612 (kernel_mod_HEADERS): Added efi/disk.h.
14613 (_chain_mod_SOURCES): New variable.
14614 (_chain_mod_CFLAGS): Likewise.
14615 (_chain_mod_LDFLAGS): Likewise.
14616 (chain_mod_SOURCES): Likewise.
14617 (chain_mod_CFLAGS): Likewise.
14618 (chain_mod_LDFLAGS): Likewise.
14620 * DISTLIST: Added include/grub/efi/chainloader.h,
14621 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
14623 * include/grub/efi/chainloader.h: New file.
14624 * loader/efi/chainloader.c: Likewise.
14625 * loader/efi/chainloader_normal.c: Likewise.
14627 2006-04-30 Marco Gerards <marco@gnu.org>
14629 * commands/configfile.c (grub_cmd_source): New function.
14630 (GRUB_MOD_INIT): Register the commands `source' and `.'.
14631 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
14633 2006-04-30 Marco Gerards <marco@gnu.org>
14635 * normal/execute.c (grub_script_execute_cmd): Change the return
14636 type to `grub_err_t'. Correctly return the error.
14637 (grub_script_execute_cmdline): In case a command line is not a
14638 command or a function, try to interpret it as an assignment.
14640 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
14642 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
14643 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
14644 skip a node whose name is obviously invalid as UTF-16,
14645 i.e. contains a NUL character. Stop the iteration when the last
14646 directory entry is found. Instead of using the return value of
14647 grub_hfsplus_btree_iterate_node, store the value in RET and use
14648 it, because the iterator can be stopped by the last directory
14651 2006-04-30 Marco Gerards <marco@gnu.org>
14653 * include/grub/env.h (grub_env_export): New prototype. Reported
14654 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
14656 2006-04-30 Marco Gerards <marco@gnu.org>
14658 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
14659 size of the extents in a catalog file record.
14661 2006-04-29 Marco Gerards <marco@gnu.org>
14663 * commands/configfile.c (grub_cmd_configfile): Execute the
14664 configfile within its own context.
14666 * include/grub/env.h (grub_env_context_open): New prototype.
14667 (grub_env_context_close): Likewise.
14669 * kern/env.c (grub_env): Removed.
14670 (grub_env_sorted): Likewise.
14671 (grub_env_context): New variable.
14672 (grub_env_var_context): Likewise.
14673 (grub_env_find): Search both the active context and the global
14675 (grub_env_context_open): New function.
14676 (grub_env_context_close): Likewise.
14677 (grub_env_insert): Likewise.
14678 (grub_env_remove): Likewise.
14679 (grub_env_export): Likewise.
14680 (grub_env_set): Changed to use helper functions to avoid code
14682 (grub_env_iterate): Rewritten so both the current context and the
14683 global context are being used.
14685 * normal/command.c (export_command): New function.
14686 (grub_command_init): Register the `export' function.
14688 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
14690 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
14691 explicitly to suppress gcc's warnings.
14692 * fs/fat.c (grub_fat_find_dir): Likewise.
14693 (grub_fat_label): Likewise.
14694 * fs/xfs.c (grub_xfs_read_inode): Likewise.
14695 (grub_xfs_mount): Likewise.
14696 (grub_xfs_label): Likewise.
14697 * fs/affs.c (grub_affs_mount): Likewise.
14698 (grub_affs_label): Likewise.
14699 (grub_affs_iterate_dir): Likewise.
14700 * fs/sfs.c (grub_sfs_mount): Likewise.
14701 (grub_sfs_iterate_dir): Likewise.
14702 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
14703 * fs/hfs.c (grub_hfs_mount): Likewise.
14704 (grub_hfs_cmp_catkeys): Likewise.
14705 (grub_hfs_find_dir): Likewise.
14706 (grub_hfs_dir): Likewise.
14707 (grub_hfs_label): Likewise.
14708 * fs/jfs.c (grub_jfs_mount): Likewise.
14709 (grub_jfs_opendir): Likewise.
14710 (grub_jfs_getent): Likewise.
14711 (grub_jfs_lookup_symlink): Likewise.
14712 (grub_jfs_label): Likewise.
14713 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
14714 (grub_hfsplus_iterate_dir): Likewise.
14715 (grub_hfsplus_btree_iterate_node): Made static.
14717 * util/grub-emu.c (prefix): New variable.
14718 (grub_machine_set_prefix): New function.
14719 (main): Do not set the environment variable "prefix" here. Only
14720 set PREFIX, which is used later by grub_machine_set_prefix.
14722 * include/grub/video.h: Do not include grub/symbol.h.
14723 (grub_video_register): Not exported. This symbol is not defined in
14725 (grub_video_unregister): Likewise.
14726 (grub_video_iterate): Likewise.
14727 (grub_video_setup): Likewise.
14728 (grub_video_restore): Likewise.
14729 (grub_video_get_info): Likewise.
14730 (grub_video_get_blit_format): Likewise.
14731 (grub_video_set_palette): Likewise.
14732 (grub_video_get_palette): Likewise.
14733 (grub_video_set_viewport): Likewise.
14734 (grub_video_get_viewport): Likewise.
14735 (grub_video_map_color): Likewise.
14736 (grub_video_map_rgb): Likewise.
14737 (grub_video_map_rgba): Likewise.
14738 (grub_video_fill_rect): Likewise.
14739 (grub_video_blit_glyph): Likewise.
14740 (grub_video_blit_bitmap): Likewise.
14741 (grub_video_blit_render_target): Likewise.
14742 (grub_video_scroll): Likewise.
14743 (grub_video_swap_buffers): Likewise.
14744 (grub_video_create_render_target): Likewise.
14745 (grub_video_delete_render_target): Likewise.
14746 (grub_video_set_active_render_target): Likewise.
14748 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
14750 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
14752 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
14753 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14754 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14755 instead of $(srcdir)/genkernsyms.sh.
14757 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
14758 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14759 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14760 instead of $(srcdir)/genkernsyms.sh.
14762 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
14763 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14764 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14765 instead of $(srcdir)/genkernsyms.sh.
14767 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
14768 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14769 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14770 instead of $(srcdir)/genkernsyms.sh.
14772 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
14775 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
14777 (gensymlist.sh): New target.
14778 (genkernsyms.sh): Likewise.
14780 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
14781 genkernsyms.sh.in and gensymlist.sh.in.
14783 * genkernsyms.sh: Removed.
14784 * gensymlist.sh: Likewise.
14786 * genkernsyms.sh.in: New file.
14787 * gensymlist.sh.in: Likewise.
14789 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
14791 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
14792 clobber "prefix", since we may have already set it manually.
14794 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
14796 * kern/misc.c (abort): New alias for grub_abort.
14798 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
14800 A new machine-specific function "grub_machine_set_prefix" is
14801 defined. This is called after loading modules, so that a prefix
14802 initialization can use modules. Also, this change adds an
14803 intensive debugging feature for the memory manager via the
14804 configure option "--enable-mm-debug".
14806 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
14809 * kern/sparc64/ieee1275/init.c (abort): Removed.
14810 (grub_stop): Likewise.
14811 (grub_exit): New function.
14812 (grub_set_prefix): Renamed to ...
14813 (grub_machine_set_prefix): ... this.
14814 (grub_machine_init): Do not call grub_set_prefix.
14816 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
14817 (grub_machine_set_prefix): ... this.
14818 (grub_machine_init): Do not call grub_set_prefix.
14820 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
14821 (grub_machine_init): Do not set the prefix here.
14823 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
14825 * kern/efi/init.c: Include grub/mm.h.
14826 (grub_efi_set_prefix): New function.
14828 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
14829 (grub_efi_get_filename): New function.
14830 (grub_print_device_path): Renamed to ...
14831 (grub_efi_print_device_path): ... this.
14833 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
14834 [MM_DEBUG] (grub_realloc): Likewise.
14835 [MM_DEBUG] (grub_free): Likewise.
14836 [MM_DEBUG] (grub_memalign): Likewise.
14837 [MM_DEBUG] (grub_mm_debug): New variable.
14838 [MM_DEBUG] (grub_debug_malloc): New function.
14839 [MM_DEBUG] (grub_debug_free): New function.
14840 [MM_DEBUG] (grub_debug_realloc): New function.
14841 [MM_DEBUG] (grub_debug_memalign): New function.
14843 * kern/misc.c (grub_abort): Print a newline to distinguish
14846 * kern/main.c (grub_main): Call grub_machine_set_prefix and
14847 grub_set_root_dev after loading modules. This is necessary when
14848 setting a prefix depends on modules.
14850 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
14851 (grub_efi_print_device_path): ... this.
14852 (grub_efi_get_filename): New prototype.
14853 (grub_efi_set_prefix): Likewise.
14855 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
14857 (grub_efidisk_get_device_handle): New prototype.
14858 (grub_efidisk_get_device_name): Likewise.
14860 * include/grub/mm.h: Include config.h.
14861 (MM_DEBUG): Removed.
14862 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
14863 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
14864 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
14865 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
14866 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
14867 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
14868 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
14869 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
14870 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
14872 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
14874 * disk/efi/efidisk.c: Include grub/partition.h.
14875 (iterate_child_devices): New function.
14876 (add_device): First, compare only last device path nodes, so that
14877 devices are sorted by the types.
14878 (grub_efidisk_get_device_handle): New function.
14879 (grub_efidisk_get_device_name): Likewise.
14881 * configure.ac (--enable-mm-debug): New option to enable the
14882 memory manager debugging feature. This makes the binary much
14883 bigger, so is disabled by default.
14885 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
14887 Use grub_abort instead of grub_stop, and grub_exit must be
14888 define in each architecture now. Also, this change adds support
14891 * util/i386/pc/grub-probefs.c: Include grub/term.h.
14892 (grub_getkey): New function.
14893 (grub_term_get_current): Likewise.
14895 * util/i386/pc/grub-setup.c: Include grub/term.h.
14896 (grub_getkey): New function.
14897 (grub_term_get_current): Likewise.
14899 * util/misc.c (grub_stop): Renamed to ...
14900 (grub_exit): ... this.
14902 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
14903 (grub_exit): ... this.
14904 (grub_machine_init): Use grub_abort instead of abort.
14905 (grub_stop): Removed.
14907 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
14910 * kern/i386/pc/startup.S (grub_exit): New function.
14911 (cold_reboot): New label.
14913 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
14914 (grub_efi_init): Call grub_efidisk_init.
14915 (grub_efi_fini): Call grub_efidisk_fini.
14917 * kern/efi/efi.c: Include grub/mm.h.
14918 (grub_efi_console_control_guid): Renamed to ...
14919 (console_control_guid): ... this.
14920 (grub_efi_loaded_image_guid): Renamed to ...
14921 (loaded_image_guid): ... this.
14922 (grub_efi_locate_handle): New function.
14923 (grub_efi_open_protocol): Likewise.
14924 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
14925 GRUB_EFI_CONSOLE_CONTROL_GUID.
14926 (grub_efi_exit): Removed.
14927 (grub_stop): Likewise.
14928 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
14929 (grub_exit): New function.
14930 (grub_print_device_path): Likewise.
14932 * kern/rescue.c (grub_rescue_cmd_exit): New function.
14933 (grub_enter_rescue_mode): Register "exit".
14935 * kern/misc.c (grub_real_dprintf): A cosmetic change.
14936 (grub_abort): New function.
14938 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
14940 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
14942 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
14944 * include/grub/efi/efi.h (grub_efi_exit): Removed.
14945 (grub_print_device_path): New prototype.
14946 (grub_efi_locate_handle): Likewise.
14947 (grub_efi_open_protocol): Likewise.
14949 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
14950 * disk/efi/efidisk.c: Likewise.
14952 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
14954 * include/grub/efi/console_control.h
14955 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
14957 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
14958 last 8 bytes as an array.
14959 (GRUB_EFI_DISK_IO_GUID): New macro.
14960 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
14961 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
14962 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
14964 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
14965 (struct grub_efi_device_path): Rename the member "sub_type" to
14967 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
14968 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
14969 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
14970 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
14971 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
14972 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
14973 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
14974 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
14975 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
14976 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
14977 (struct grub_efi_pci_device_path): New structure.
14978 (grub_efi_pci_device_path_t): New type.
14979 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
14980 (struct grub_efi_pccard_device_path): New structure.
14981 (grub_efi_pccard_device_path_t): New type.
14982 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
14983 (struct grub_efi_memory_mapped_device_path): New structure.
14984 (grub_efi_memory_mapped_device_path_t): New type.
14985 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
14986 (struct grub_efi_vendor_device_path): New structure.
14987 (grub_efi_vendor_device_path_t): New type.
14988 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
14989 (struct grub_efi_controller_device_path): New structure.
14990 (grub_efi_controller_device_path_t): New type.
14991 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
14992 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
14993 (struct grub_efi_acpi_device_path): New structure.
14994 (grub_efi_acpi_device_path_t): New type.
14995 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
14996 (struct grub_efi_expanded_acpi_device_path): New structure.
14997 (grub_efi_expanded_acpi_device_path_t): New type.
14998 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
14999 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
15000 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
15001 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
15002 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
15003 (struct grub_efi_atapi_device_path): New structure.
15004 (grub_efi_atapi_device_path_t): New type.
15005 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
15006 (struct grub_efi_fibre_channel_device_path): New structure.
15007 (grub_efi_fibre_channel_device_path_t): New type.
15008 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
15009 (struct grub_efi_1394_device_path): New structure.
15010 (grub_efi_1394_device_path_t): New type.
15011 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
15012 (struct grub_efi_usb_device_path): New structure.
15013 (grub_efi_usb_device_path_t): New type.
15014 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
15015 (struct grub_efi_usb_class_device_path): New structure.
15016 (grub_efi_usb_class_device_path_t): New type.
15017 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
15018 (struct grub_efi_i2o_device_path): New structure.
15019 (grub_efi_i2o_device_path_t): New type.
15020 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
15021 (struct grub_efi_mac_address_device_path): New structure.
15022 (grub_efi_mac_address_device_path_t): New type.
15023 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
15024 (struct grub_efi_ipv4_device_path): New structure.
15025 (grub_efi_ipv4_device_path_t): New type.
15026 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
15027 (struct grub_efi_ipv6_device_path): New structure.
15028 (grub_efi_ipv6_device_path_t): New type.
15029 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
15030 (struct grub_efi_infiniband_device_path): New structure.
15031 (grub_efi_infiniband_device_path_t): New type.
15032 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
15033 (struct grub_efi_uart_device_path): New structure.
15034 (grub_efi_uart_device_path_t): New type.
15035 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
15036 (struct grub_efi_vendor_messaging_device_path): New structure.
15037 (grub_efi_vendor_messaging_device_path_t): New type.
15038 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
15039 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
15040 (struct grub_efi_hard_drive_device_path): New structure.
15041 (grub_efi_hard_drive_device_path_t): New type.
15042 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
15043 (struct grub_efi_cdrom_device_path): New structure.
15044 (grub_efi_cdrom_device_path_t): New type.
15045 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
15046 (struct grub_efi_vendor_media_device_path): New structure.
15047 (grub_efi_vendor_media_device_path_t): New type.
15048 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
15049 (struct grub_efi_file_path_device_path): New structure.
15050 (grub_efi_file_path_device_path_t): New type.
15051 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
15052 (struct grub_efi_protocol_device_path): New structure.
15053 (grub_efi_protocol_device_path_t): New type.
15054 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
15055 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
15056 (struct grub_efi_bios_device_path): New structure.
15057 (grub_efi_bios_device_path_t): New type.
15058 (struct grub_efi_disk_io): New structure.
15059 (grub_efi_disk_io_t): New type.
15060 (struct grub_efi_block_io_media): New structure.
15061 (grub_efi_block_io_media_t): New type.
15062 (struct grub_efi_block_io): New structure.
15063 (grub_efi_block_io_t): New type.
15065 * include/grub/misc.h (grub_stop): Removed.
15066 (grub_exit): New prototype.
15067 (grub_abort): Likewise.
15069 * include/grub/disk.h (enum grub_disk_dev_id): Added
15070 GRUB_DISK_DEVICE_EFIDISK_ID.
15072 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
15073 disk/efi/efidisk.c.
15074 (kernel_syms.lst): Remove the target if an error occurs.
15076 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
15078 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
15079 as it was simply too buggy.
15081 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
15083 * kern/misc.c (grub_lltoa): New function.
15084 (grub_vsprintf): Added support for the long long suffix,
15087 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
15089 * Makefile.in (LDFLAGS): Add variable.
15090 (LD): Remove variable.
15091 * configure.ac: Add -m32 to LDFLAGS.
15092 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
15093 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
15094 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
15095 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
15096 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
15098 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
15099 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
15100 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
15102 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
15104 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
15105 length for unknown glyph.
15107 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
15109 Add support for pre-loaded modules into the EFI port.
15111 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
15112 completely. Accept one more argument DIR. The caller has changed.
15114 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
15116 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
15117 (grub_efi_loaded_image_guid): New variable.
15118 (grub_efi_get_loaded_image): New function.
15119 (grub_arch_modules_addr): Likewise.
15121 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
15124 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
15125 (struct grub_efi_loaded_image): New structure.
15126 (grub_efi_loaded_image_t): New type.
15128 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
15130 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
15131 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
15132 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
15134 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
15136 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
15138 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
15140 * DISTLIST: Added include/grub/efi/console.h,
15141 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
15142 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15144 * include/grub/efi/console.h: New file.
15145 * include/grub/efi/time.h: Likewise.
15146 * include/grub/i386/efi/kernel.h: Likewise.
15147 * kern/efi/init.c: Likewise.
15148 * kern/efi/mm.c: Likewise.
15149 * term/efi/console.c: Likewise.
15151 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
15152 (grub_stop): Removed.
15153 (grub_get_rtc): Likewise.
15154 (grub_machine_init): Simply call grub_efi_init.
15155 (grub_machine_fini): Call grub_efi_fini.
15157 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
15158 (grub_efi_output_string): Removed.
15159 (grub_efi_stall): New function.
15160 (grub_stop): Likewise.
15161 (grub_get_rtc): Likewise.
15163 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
15164 (grub_efi_stall): New prototype.
15165 (grub_efi_allocate_pages): Likewise.
15166 (grub_efi_free_pages): Likewise.
15167 (grub_efi_get_memory_map): Likewise.
15168 (grub_efi_mm_init): Likewise.
15169 (grub_efi_mm_fini): Likewise.
15170 (grub_efi_init): Likewise.
15171 (grub_efi_fini): Likewise.
15173 * include/grub/i386/efi/time.h: Do not include
15174 grub/symbol.h. Include grub/efi/time.h.
15175 (GRUB_TICKS_PER_SECOND): Removed.
15176 (grub_get_rtc): Likewise.
15178 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
15179 Added padding. The EFI spec is buggy.
15180 (GRUB_EFI_BLACK): New macro.
15181 (GRUB_EFI_BLUE): Likewise.
15182 (GRUB_EFI_GREEN): Likewise.
15183 (GRUB_EFI_CYAN): Likewise.
15184 (GRUB_EFI_RED): Likewise.
15185 (GRUB_EFI_MAGENTA): Likewise.
15186 (GRUB_EFI_BROWN): Likewise.
15187 (GRUB_EFI_LIGHTGRAY): Likewise.
15188 (GRUB_EFI_BRIGHT): Likewise.
15189 (GRUB_EFI_DARKGRAY): Likewise.
15190 (GRUB_EFI_LIGHTBLUE): Likewise.
15191 (GRUB_EFI_LIGHTGREEN): Likewise.
15192 (GRUB_EFI_LIGHTCYAN): Likewise.
15193 (GRUB_EFI_LIGHTRED): Likewise.
15194 (GRUB_EFI_LIGHTMAGENTA): Likewise.
15195 (GRUB_EFI_YELLOW): Likewise.
15196 (GRUB_EFI_WHITE): Likewise.
15197 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
15198 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
15199 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
15200 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
15201 (GRUB_EFI_BACKGROUND_RED): Likewise.
15202 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
15203 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
15204 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
15205 (GRUB_EFI_TEXT_ATTR): Likewise.
15207 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
15208 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
15209 (kernel_mod_HEADERS): Added efi/time.h.
15211 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
15213 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
15214 include/grub/efi/api.h, include/grub/efi/console_control.h,
15215 include/grub/efi/efi.h, include/grub/efi/pe32.h,
15216 include/grub/i386/efi/time.h, kern/efi/efi.c,
15217 kern/i386/efi/init.c, kern/i386/efi/startup.S,
15218 and util/i386/efi/grub-mkimage.c.
15220 * Makefile.in (RMKFILES): Added i386-efi.rmk.
15222 * genmk.rb (PModule#rule): Do not export symbols if
15223 #{prefix}_EXPORTS is set to "no".
15225 * conf/i386-efi.mk: New file.
15226 * conf/i386-efi.rmk: Likewise.
15227 * include/grub/efi/api.h: Likewise.
15228 * include/grub/efi/console_control.h: Likewise.
15229 * include/grub/efi/efi.h: Likewise.
15230 * include/grub/efi/pe32.h: Likewise.
15231 * include/grub/i386/efi/time.h: Likewise.
15232 * kern/efi/efi.c: Likewise.
15233 * kern/i386/efi/init.c: Likewise.
15234 * kern/i386/efi/startup.S: Likewise.
15235 * util/i386/efi/grub-mkimage.c: Likewise.
15237 2006-04-17 Marco Gerards <marco@gnu.org>
15239 * include/grub/script.h: Include <grub/parser.h> and
15240 "grub_script.tab.h".
15241 (struct grub_lexer_param): New struct.
15242 (struct grub_parser_param): Likewise.
15243 (grub_script_create_arglist): Pass the state in an argument.
15244 (grub_script_add_arglist): Likewise.
15245 (grub_script_create_cmdline): Likewise.
15246 (grub_script_create_cmdblock): Likewise.
15247 (grub_script_create_cmdif): Likewise.
15248 (grub_script_create_cmdmenu): Likewise.
15249 (grub_script_add_cmd): Likewise.
15250 (grub_script_arg_add): Likewise.
15251 (grub_script_lexer_ref): Likewise.
15252 (grub_script_lexer_deref): Likewise.
15253 (grub_script_lexer_record_start): Likewise.
15254 (grub_script_lexer_record_stop): Likewise.
15255 (grub_script_mem_record): Likewise.
15256 (grub_script_mem_record_stop): Likewise.
15257 (grub_script_malloc): Likewise.
15258 (grub_script_yylex): Likewise.
15259 (grub_script_yyparse): Likewise.
15260 (grub_script_yyerror): Likewise.
15261 (grub_script_yylex): Likewise.
15262 (grub_script_lexer_init): Return the state.
15264 * normal/lexer.c (grub_script_lexer_state): Removed variable.
15265 (grub_script_lexer_done): Likewise.
15266 (grub_script_lexer_getline): Likewise.
15267 (grub_script_lexer_refs): Likewise.
15268 (script): Likewise.
15269 (newscript): Likewise.
15270 (record): Likewise.
15271 (recording): Likewise.
15272 (recordpos): Likewise.
15273 (recordlen): Likewise.
15274 (grub_script_lexer_init): Return the state instead of setting
15276 (grub_script_lexer_ref): Use the newly added argument for state
15277 instead of globals.
15278 (grub_script_lexer_deref): Likewise.
15279 (grub_script_lexer_record_start): Likewise.
15280 (grub_script_lexer_record_stop): Likewise.
15281 (recordchar): Likewise.
15282 (nextchar): Likewise.
15283 (grub_script_yylex2): Likewise.
15284 (grub_script_yylex): Likewise.
15285 (grub_script_yyerror): Likewise.
15287 * normal/parser.y (func_mem): Removed variable.
15288 (menu_entry): Likewise.
15290 (%lex-param): New parser option.
15291 (%parse-param): Likewise.
15292 (script): Always return the AST.
15293 (argument): Pass the state around.
15294 (arguments): Likewise.
15295 (grubcmd): Likewise.
15296 (commands): Likewise.
15297 (function): Likewise.
15298 (menuentry): Likewise.
15299 (if_statement): Likewise.
15302 * normal/script.c (grub_script_memused): Removed variable.
15303 (grub_script_parsed): Likewise.
15304 (grub_script_malloc): Added a state argument. Use that instead of
15306 (grub_script_mem_record): Likewise.
15307 (grub_script_mem_record_stop): Likewise.
15308 (grub_script_arg_add): Likewise.
15309 (grub_script_add_arglist): Likewise.
15310 (grub_script_create_cmdline): Likewise.
15311 (grub_script_create_cmdif): Likewise.
15312 (grub_script_create_cmdmenu): Likewise.
15313 (grub_script_add_cmd): Likewise.
15314 (grub_script_parse): Setup the state before calling the parser.
15316 2006-04-16 Marco Gerards <marco@gnu.org>
15318 * normal/command.c (grub_command_init): Remove the title command.
15320 * normal/lexer.c (grub_script_yylex): Renamed from this...
15321 (grub_script_yylex2): ... to this.
15322 (grub_script_yylex): New function. Temporary
15323 introduced to filter some tokens.
15324 (grub_script_yyerror): Print a newline.
15326 * normal/main.c (read_config_file): Output information about the
15327 lines that contain errors. Wait for a key after all lines have
15328 been processed. Don't return an empty menu.
15330 * normal/parser.y (func_mem): Don't initialize.
15331 (menu_entry): Likewise.
15332 (err): New variable.
15333 (script): Don't return anything when an error was encountered.
15334 (ws, returns): Removed rules.
15335 (argument): Disabled concatenated variable support.
15336 (arguments): Remove explicit separators.
15337 (grubcmd): Likewise.
15338 (function): Likewise.
15339 (menuentry): Likewise.
15341 (commands): Likewise. Add error handling.
15343 * normal/script.c (grub_script_create_cmdline): If
15344 `grub_script_parsed' is 0, assume the parser encountered an error.
15346 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
15348 * configure.ac: Add support for EFI. Fix the typo
15349 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
15351 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
15353 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
15354 foreign multibyte characters should be shown correctly.
15356 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
15358 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
15360 (read_config_file): Made it to close file before returning.
15362 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
15364 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
15365 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
15366 video/i386/pc/vbefill.c.
15368 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
15369 video/i386/pc/vbefill.c.
15371 * include/grub/video.h (grub_video_blit_format): New enum.
15372 (grub_video_mode_info): Added new member blit_format.
15373 (grub_video_get_blit_format): New function prototype.
15375 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
15376 function prototype.
15377 (grub_video_vbe_map_rgb): Likewise.
15378 (grub_video_vbe_unmap_color): Likewise.
15380 * include/grub/i386/pc/vbeblit.h: New file.
15382 * include/grub/i386/pc/vbefill.h: New file.
15384 * video/video.c (grub_video_get_blit_format): New function.
15385 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
15386 (grub_video_vbe_map_rgb): Likewise.
15387 (grub_video_vbe_unmap_color): Likewise.
15389 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
15391 (grub_video_vbe_blit_render_target): Changed to use more optimized
15393 (grub_video_vbe_setup): Added detection for optimized settings.
15394 (grub_video_vbe_create_render_target): Likewise.
15396 * video/i386/pc/vbeblit.c: New file.
15398 * video/i386/pc/vbefill.c: New file.
15400 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
15402 * font/manager.c (grub_font_get_glyph): Removed font fixup from
15405 * util/unifont2pff.rb: ... and moved it to here. Improved argument
15406 parsing to support both hex and dec ranges. If filename was missing
15407 show usage information.
15409 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
15411 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
15412 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
15414 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
15415 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
15416 (video_mod_SOURCES): Added.
15417 (video_mod_CFLAGS): Likewise.
15418 (video_mod_LDFLAGS): Likewise.
15419 (gfxterm_mod_SOURCES): Likewise.
15420 (gfxterm_mod_CFLAGS): Likewise.
15421 (gfxterm_mod_LDFLAGS): Likewise.
15422 (videotest_mod_SOURCES): Likewise.
15423 (videotest_mod_CFLAGS): Likewise.
15424 (videotest_mod_LDFLAGS): Likewise.
15425 (vesafb_mod_SOURCES): Removed.
15426 (vesafb_mod_CFLAGS): Likewise.
15427 (vesafb_mod_LDFLAGS): Likewise.
15428 (vga_mod_SOURCES): Likewise.
15429 (vga_mod_CFLAGS): Likewise.
15430 (vga_mod_LDFLAGS): Likewise.
15432 * commands/videotest.c: New file.
15434 * font/manager.c (fill_with_default_glyph): Modified to use
15436 (grub_font_get_glyph): Likewise.
15437 (fontmanager): Renamed from this...
15438 (font_manager): ... to this.
15440 * include/grub/font.h (grub_font_glyph): Added new structure.
15441 (grub_font_get_glyph): Modified to use grub_font_glyph.
15443 * include/grub/misc.h (grub_abs): Added as inline function.
15445 * include/grub/video.h: New file.
15447 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
15448 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
15449 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
15450 (grub_vbe_get_controller_info): Renamed from this...
15451 (grub_vbe_bios_get_controller_info): ... to this.
15452 (grub_vbe_get_mode_info): Renamed from this...
15453 (grub_vbe_bios_get_mode_info): ... to this.
15454 (grub_vbe_set_mode): Renamed from this...
15455 (grub_vbe_bios_set_mode): ... to this.
15456 (grub_vbe_get_mode): Renamed from this...
15457 (grub_vbe_bios_get_mode): ... to this.
15458 (grub_vbe_set_memory_window): Renamed from this...
15459 (grub_vbe_bios_set_memory_window): ... to this.
15460 (grub_vbe_get_memory_window): Renamed from this...
15461 (grub_vbe_bios_get_memory_window): ... to this.
15462 (grub_vbe_set_scanline_length): Renamed from this...
15463 (grub_vbe_set_scanline_length): ... to this.
15464 (grub_vbe_get_scanline_length): Renamed from this...
15465 (grub_vbe_bios_get_scanline_length): ... to this.
15466 (grub_vbe_set_display_start): Renamed from this...
15467 (grub_vbe_bios_set_display_start): ... to this.
15468 (grub_vbe_get_display_start): Renamed from this...
15469 (grub_vbe_bios_get_display_start): ... to this.
15470 (grub_vbe_set_palette_data): Renamed from this...
15471 (grub_vbe_bios_set_palette_data): ... to this.
15472 (grub_vbe_set_pixel_rgb): Removed.
15473 (grub_vbe_set_pixel_index): Likewise.
15475 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
15477 (grub_vbe_bios_get_controller_info): ... to this.
15478 (grub_vbe_get_mode_info): Renamed from this...
15479 (grub_vbe_bios_get_mode_info): ... to this.
15480 (grub_vbe_set_mode): Renamed from this...
15481 (grub_vbe_bios_set_mode): ... to this.
15482 (grub_vbe_get_mode): Renamed from this...
15483 (grub_vbe_bios_get_mode): ... to this.
15484 (grub_vbe_set_memory_window): Renamed from this...
15485 (grub_vbe_bios_set_memory_window): ... to this.
15486 (grub_vbe_get_memory_window): Renamed from this...
15487 (grub_vbe_bios_get_memory_window): ... to this.
15488 (grub_vbe_set_scanline_length): Renamed from this...
15489 (grub_vbe_set_scanline_length): ... to this.
15490 (grub_vbe_get_scanline_length): Renamed from this...
15491 (grub_vbe_bios_get_scanline_length): ... to this.
15492 (grub_vbe_set_display_start): Renamed from this...
15493 (grub_vbe_bios_set_display_start): ... to this.
15494 (grub_vbe_get_display_start): Renamed from this...
15495 (grub_vbe_bios_get_display_start): ... to this.
15496 (grub_vbe_set_palette_data): Renamed from this...
15497 (grub_vbe_bios_set_palette_data): ... to this.
15498 (grub_vbe_bios_get_controller_info): Fixed problem with registers
15499 getting corrupted after calling it. Added more pushes and pops.
15500 (grub_vbe_bios_set_mode): Likewise.
15501 (grub_vbe_bios_get_mode): Likewise.
15502 (grub_vbe_bios_get_memory_window): Likewise.
15503 (grub_vbe_bios_set_scanline_length): Likewise.
15504 (grub_vbe_bios_get_scanline_length): Likewise.
15505 (grub_vbe_bios_get_display_start): Likewise.
15506 (grub_vbe_bios_set_palette_data): Likewise.
15508 * normal/cmdline.c (cl_set_pos): Refresh the screen.
15509 (cl_insert): Likewise.
15510 (cl_delete): Likewise.
15512 * term/gfxterm.c: New file.
15514 * term/i386/pc/vesafb.c: Removed file.
15516 * video/video.c: New file.
15518 * video/i386/pc/vbe.c (real2pm): Added new function.
15519 (grub_video_vbe_draw_pixel): Likewise.
15520 (grub_video_vbe_get_video_ptr): Likewise.
15521 (grub_video_vbe_get_pixel): Likewise
15522 (grub_video_vbe_init): Likewise.
15523 (grub_video_vbe_fini): Likewise.
15524 (grub_video_vbe_setup): Likewise.
15525 (grub_video_vbe_get_info): Likewise.
15526 (grub_video_vbe_set_palette): Likewise.
15527 (grub_video_vbe_get_palette): Likewise.
15528 (grub_video_vbe_set_viewport): Likewise.
15529 (grub_video_vbe_get_viewport): Likewise.
15530 (grub_video_vbe_map_color): Likewise.
15531 (grub_video_vbe_map_rgb): Likewise.
15532 (grub_video_vbe_map_rgba): Likewise.
15533 (grub_video_vbe_unmap_color): Likewise.
15534 (grub_video_vbe_fill_rect): Likewise.
15535 (grub_video_vbe_blit_glyph): Likewise.
15536 (grub_video_vbe_blit_bitmap): Likewise.
15537 (grub_video_vbe_blit_render_target): Likewise.
15538 (grub_video_vbe_scroll): Likewise.
15539 (grub_video_vbe_swap_buffers): Likewise.
15540 (grub_video_vbe_create_render_target): Likewise.
15541 (grub_video_vbe_delete_render_target): Likewise.
15542 (grub_video_vbe_set_active_render_target): Likewise.
15543 (grub_vbe_set_pixel_rgb): Remove function.
15544 (grub_vbe_set_pixel_index): Likewise.
15545 (index_color_mode): Remove static variable.
15546 (active_mode): Likewise.
15547 (framebuffer): Likewise.
15548 (bytes_per_scan_line): Likewise.
15549 (grub_video_vbe_adapter): Added new static variable.
15550 (framebuffer): Likewise.
15551 (render_target): Likewise.
15552 (initial_mode): Likewise.
15553 (mode_in_use): Likewise.
15554 (mode_list): Likewise.
15556 2006-03-10 Marco Gerards <marco@gnu.org>
15558 * configure.ac (AC_INIT): Bumped to 1.93.
15560 * DISTLIST: Added `include/grub/hfs.h'.
15562 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
15564 * boot/i386/pc/boot.S (general_error): Before looping, try INT
15565 18H, which might help the BIOS falling back to next boot media.
15567 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
15569 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
15570 Poe Chen <poe.poechen@gmail.com>.
15572 2006-01-17 Marco Gerards <marco@gnu.org>
15574 * include/grub/normal.h: Include <grub/script.h>.
15575 (grub_command_list): Removed struct.
15576 (grub_command_list_t): Removed type.
15577 (grub_menu_entry): Remove members `num' and `command_list'. Add
15578 members `commands' and `sourcecode'.
15579 * include/grub/script.h: Add inclusion guards.
15580 (grub_script_cmd_menuentry): New struct.
15581 (grub_script_execute_menuentry): New prototype.
15582 (grub_script_lexer_record_start): Likewise.
15583 (grub_script_lexer_record_stop): Likewise.
15584 * normal/execute.c (grub_script_execute_menuentry): New function.
15585 * normal/lexer.c (record, recording, recordpos, recordlen): New
15587 (grub_script_lexer_record_start): New function.
15588 (grub_script_lexer_record_stop): Likewise.
15589 (recordchar): Likewise.
15590 (nextchar): Likewise.
15591 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
15592 2048 as the buffer size. Add the tokens `menuentry' and `@'.
15593 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
15594 (current_menu): New variable.
15595 (free_menu): Mainly rewritten.
15596 (grub_normal_menu_addentry): New function.
15597 (read_config_file): Rewritten.
15598 * normal/menu.c (run_menu_entry): Mainly rewritten.
15599 * normal/menu_entry.c (make_screen): Rewritten the code to insert
15601 (run): Mainly rewritten.
15602 * normal/parser.y (menu_entry): New variable.
15603 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
15604 (menuentry): New rule.
15605 (command): Add `menuentry'.
15606 (if_statement): Allow additional returns before `fi'.
15607 * normal/script.c (grub_script_create_cmdmenu): New function.
15609 2006-01-03 Marco Gerards <marco@gnu.org>
15611 * INSTALL: GNU Bison is required.
15612 * configure.ac: Rewritten the test to detect Bison.
15613 * Makefile.in (YACC): New variable. Reported by Xun Sun
15614 <xun.sun.cn@gmail.com>.
15616 2006-01-03 Marco Gerards <marco@gnu.org>
15618 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
15619 the HFS+ filesystem to filesystem blocks.
15620 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
15621 GCC warning is silenced.
15623 2006-01-03 Marco Gerards <marco@gnu.org>
15625 * partmap/apple.c (apple_partition_map_iterate): Convert the data
15626 read from disk from big endian to host byte order.
15628 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
15630 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
15632 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
15633 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
15634 embedded HFS+ filesystem.
15635 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
15636 (grub_hfs_sblock): Move from here...
15637 * include/grub/hfs.h: To here... New file.
15638 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
15640 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
15642 (grub_hfsplus_volheader): Change type of member `magic' to
15644 (grub_hfsplus_data): Add new member `embedded_offset'.
15645 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
15647 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
15648 Calculate the offset.
15650 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
15652 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
15654 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
15656 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
15658 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
15659 ENV->NAME is NULL after allocating ENV->VALUE.
15661 2005-12-25 Marco Gerards <marco@gnu.org>
15663 * kern/env.c (grub_env_set): Rewritten the error handling code.
15665 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
15667 * geninit.sh: Made more robust, and more portable.
15669 2005-12-25 Marco Gerards <marco@gnu.org>
15671 Add support for Apple HFS+ filesystems.
15673 * fs/hfsplus.c: New file.
15675 * DISTLIST: Added `fs/hfsplus.c'.
15677 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
15678 (hfsplus_mod_SOURCES): New variable.
15679 (hfsplus_mod_CFLAGS): Likewise.
15680 (hfsplus_mod_LDFLAGS): Likewise.
15681 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
15682 (grub_setup_SOURCES): Likewise.
15683 (grub_mkdevicemap_SOURCES): Likewise.
15684 (grub_emu_SOURCES): Likewise.
15685 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15687 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
15689 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
15691 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
15693 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
15694 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
15695 include/grub/parser.h, include/grub/script.h, kern/parser.c,
15696 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
15697 normal/lexer.c, normal/parser.y, normal/script.c, and
15699 Removed kern/sparc64/cache.c.
15701 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
15702 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
15705 * configure.ac (AC_INIT): Bumped to 1.92.
15707 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
15709 * kern/err.c (grub_error_push): Added new function to support error
15711 (grub_error_pop): Likewise.
15712 (grub_error_stack_items): New local variable to support error stacks.
15713 (grub_error_stack_pos): Likewise.
15714 (grub_error_stack_assert): Likewise.
15715 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
15717 (grub_print_error): Added support to print errors from error stack.
15719 * include/grub/err.h (grub_error_push): Added function prototype.
15720 (grub_error_pop): Likewise.
15722 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
15724 * configure.ac: Accept `powerpc64' as host_cpu.
15725 (amd64): Rename to `biarch32'.
15727 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
15728 non-cacheline-aligned addresses.
15730 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
15731 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
15732 if `size' is non-zero.
15734 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
15736 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
15737 and `cd' to make sure the filename is not prefixed with a
15739 (pkgdata_MODULES): Add `gpt.mod'.
15740 (gpt_mod_SOURCES): New variable.
15741 (gpt_mod_CFLAGS): Likewise.
15742 (gpt_mod_LDFLAGS): Likewise.
15744 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
15746 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
15749 * partmap/gpt.c: New file.
15751 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
15752 GPT partition map is detected.
15754 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
15756 * commands/i386/pc/play.c: New file.
15757 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
15758 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
15761 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
15763 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
15764 ((unused))' to silence gcc warning.
15766 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
15768 * configure.ac: Correct `AC_PROG_YACC' test.
15770 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
15772 * util/powerpc/ieee1275/grub-install.in: Run the mount point
15773 check before installing files.
15775 2005-11-22 Mike Small <smallm@panix.com>
15777 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
15778 number regex so multidigit numbers are recognized correctly.
15780 2005-11-22 Mike Small <smallm@panix.com>
15782 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
15783 debugging message before attempting to claim memory.
15784 (grub_rescue_cmd_initrd): Add a claim debugging message and try
15785 multiple addresses in case of failure.
15787 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
15789 * term/tparm.c (get_space): Remove empty `if' statement.
15791 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
15793 * kern/parser.c (check_varstate): Rename `state' to 's'.
15795 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
15797 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
15798 variable definitions to the beginning of each function. Sort stack
15800 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
15801 `buf' argument to `char *'.
15803 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
15805 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
15806 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15807 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15808 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15809 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15810 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15811 configfile.mod, search.mod, gzio.mod and test.mod.
15812 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15813 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15814 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15815 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15816 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15817 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15818 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15819 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15820 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15821 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15822 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15823 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15824 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15825 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15826 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15827 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15828 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15829 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15830 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15831 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15832 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15833 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15834 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
15836 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
15838 (pkgdata_MODULES): Add test.mod.
15840 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15842 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
15843 appending to variables with "+=".
15844 (PModule): Use full pathname to generate *.lst filenames.
15846 * Makefile.in: Fixed list rules moved from genmk.rb.
15847 (.DELETE_ON_ERROR): New special target.
15848 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
15850 * conf/i386-pc.rmk: Include conf/common.mk.
15851 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15852 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15853 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15854 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15855 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15856 configfile.mod, search.mod, gzio.mod and test.mod.
15857 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15858 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15859 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15860 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15861 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15862 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15863 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15864 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15865 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15866 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15867 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15868 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15869 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15870 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15871 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15872 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15873 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15874 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15875 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15876 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15877 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15878 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15879 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
15881 * conf/common.rmk: ... to here. New file.
15883 * conf/common.mk: New file.
15885 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
15887 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
15888 (grub_script.tab.c): ... here.
15890 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
15891 (grub_script.tab.c): ... here.
15893 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
15894 (grub_script.tab.c): ... here.
15896 * normal/command.c (grub_command_find): Fixed a memory leak of
15897 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
15899 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15901 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
15902 "@" which marks the start of a comment on ARM.
15903 (VARIABLE): Likewise.
15905 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15907 Add support for Linux/ADFS partition tables.
15909 * partmap/acorn.c: New file.
15911 * include/grub/acorn_filecore.h: Likewise.
15913 * DISTLIST: Added `partmap/acorn.c' and
15914 `include/grub/acorn_filecore.h'.
15916 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15918 (pkgdata_MODULES): Add `acorn.mod'.
15919 (acorn_mod_SOURCES): New variable.
15920 (acorn_mod_CFLAGS): Likewise.
15922 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15924 (pkgdata_MODULES): Add `acorn.mod'.
15925 (acorn_mod_SOURCES): New variable.
15926 (acorn_mod_CFLAGS): Likewise.
15928 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
15929 (pkgdata_MODULES): Add `acorn.mod'.
15930 (acorn_mod_SOURCES): New variable.
15931 (acorn_mod_CFLAGS): Likewise.
15932 (acorn_mod_LDFLAGS): Likewise.
15934 * include/types.h (grub_disk_addr_t): New typedef.
15936 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
15938 * geninit.sh: New file.
15940 * geninitheader.sh: Likewise.
15942 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
15943 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
15944 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
15945 * commands/configfile.c (grub_configfile_init)
15946 (grub_configfile_fini): Likewise.
15947 * commands/default.c (grub_default_init, grub_default_fini):
15949 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
15950 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
15951 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
15952 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
15954 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
15955 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
15957 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
15958 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
15960 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
15962 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
15964 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
15965 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
15966 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
15967 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
15968 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
15969 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
15970 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
15971 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
15972 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
15973 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
15974 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
15975 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
15976 * partmap/amiga.c (grub_amiga_partition_map_init)
15977 (grub_amiga_partition_map_fini): Likewise.
15978 * partmap/apple.c (grub_apple_partition_map_init)
15979 (grub_apple_partition_map_fini): Likewise.
15980 * partmap/pc.c (grub_pc_partition_map_init)
15981 (grub_pc_partition_map_fini): Likewise.
15982 * partmap/sun.c (grub_sun_partition_map_init,
15983 grub_sun_partition_map_fini): Likewise.
15984 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
15987 * util/grub-emu.c: Include <grub_modules_init.h>.
15988 (main): Don't initialize and de-initialize any modules directly,
15989 use `grub_init_all' and `grub_fini_all' instead.
15991 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
15992 `grub_vesafb_mod_init'.
15993 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
15995 * term/i386/pc/vga.c (grub_vga_init): Renamed to
15996 `grub_vga_mod_init'. Updated all users.
15997 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
15999 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
16000 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
16003 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
16004 Generate a function to initialize the module in utilities.
16005 Updated all callers.
16006 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
16007 initialize the module in utilities. Updated all callers.
16009 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
16011 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
16012 escape sequence and a literal ^L to clear the screen.
16014 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
16015 when returning from Open Firmware.
16017 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
16019 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
16020 (grub_ofconsole_height): Likewise.
16021 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
16022 manually insert a '\n'.
16023 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
16024 `grub_ofconsole_height'. Return early if these are already set.
16026 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
16028 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
16029 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
16030 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
16031 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
16032 and `normal/script.c'.
16033 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16034 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16035 (test_mod_SOURCES): New variable.
16036 (test_mod_CFLAGS): Likewise.
16037 (test_mod_LDFLAGS): Likewise.
16038 (pkgdata_MODULES): Add `test.mod'.
16039 (grub_script.tab.c): New rule.
16040 (grub_script.tab.h): Likewise.
16042 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
16044 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16045 `commands/test.c', `normal/execute.c', `normal/lexer.c',
16046 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16047 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16048 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16049 (test_mod_SOURCES): New variable.
16050 (test_mod_CFLAGS): Likewise.
16051 (pkgdata_MODULES): Add `test.mod'.
16052 (grub_script.tab.c): New rule.
16053 (grub_script.tab.h): Likewise.
16055 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
16057 Add initial scripting support.
16059 * commands/test.c: New file.
16060 * include/grub/script.h: Likewise.
16061 * normal/execute.c: Likewise.
16062 * normal/function.c: Likewise.
16063 * normal/lexer.c: Likewise.
16064 * normal/parser.y: Likewise.
16065 * normal/script.c: Likewise.
16067 * configure.ac: Add `AC_PROG_YACC' test.
16069 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
16070 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
16071 `normal/function.c' and `normal/script.c'.
16072 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
16073 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
16074 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
16076 (pkgdata_MODULES): Add `test.mod'.
16077 (grub_script.tab.c): New rule.
16078 (grub_script.tab.h): Likewise.
16080 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
16082 * include/grub/normal.h (grub_test_init): New prototype.
16083 (grub_test_fini): Likewise.
16085 * normal/command.c: Include <grub/script.h>.
16086 (grub_command_execute): Rewritten.
16088 * util/grub-emu.c (main): Call `grub_test_init' and
16091 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
16093 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
16095 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
16096 there are no pending characters.
16098 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
16100 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
16101 `grub_strndup' to drop device arguments. Replace unnecessary
16102 `grub_strndup' with `grub_strdup'.
16104 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
16106 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
16107 `debug' environment variable has been set.
16109 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
16111 * Makefile.in (install-local): Use $(DATA).
16112 (uninstall): Likewise.
16113 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
16114 (sbin_UTILITIES): ... to here.
16115 (sbin_SCRIPTS): New variable.
16116 (grub_install_SOURCES): New variable.
16117 * util/powerpc/ieee1275/grub-install.in: New file.
16118 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
16120 (add_segments): Call `grub_util_get_path'.
16122 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
16124 From Timothy Baldwin:
16125 * commands/ls.c (grub_ls_list_files): Close FILE with
16127 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
16129 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
16131 * include/grub/parser.h: New file.
16133 * kern/parser.c: Likewise.
16135 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
16136 (grub_setup_SOURCES): Likewise.
16137 (grub_probefs_SOURCES): Likewise.
16138 (grub_emu_SOURCES): Likewise.
16139 (kernel_img_HEADERS): Add `parser.h'.
16141 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16142 (grub_emu_SOURCES): Add `kern/parser.c'.
16143 (grubof_SOURCES): Likewise.
16145 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
16146 (grubof_SOURCES): Add `kern/parser.c'.
16148 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
16150 * kern/misc.c (grub_split_cmdline): Removed function.
16152 * kern/rescue.c: Include <grub/parser.h>.
16153 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
16154 of `grub_split_cmdline'.
16156 * normal/command.c: Include <grub/parser.h>.
16157 (grub_command_execute): Use `grub_parser_split_cmdline' instead
16158 of `grub_split_cmdline'.
16160 * normal/completion.c: Include <grub/parser.h>.
16161 (cmdline_state): New variable.
16162 (iterate_dir): End the filename with a quote depending on the
16163 command line state.
16164 (get_state): new function.
16165 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
16166 split the arguments and determine the current argument. When the
16167 argument string is not quoted, escape all spaces.
16169 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
16171 * normal/sparc64/setjmp.S: New file.
16173 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
16175 * include/grub/sparc64/libgcc.h: New file.
16176 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
16177 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
16178 normal/sparc64/setjmp.c.
16180 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
16182 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
16183 * kern/sparc64/cache.S: New file.
16184 * kern/sparc64/cache.c: Removed.
16185 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
16186 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
16188 (COMMON_LDFLAGS): Add -melf64_sparc.
16189 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
16190 (grubof_SOURCES): Use cache.S instead of cache.c.
16191 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
16192 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
16193 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
16195 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
16196 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
16197 (linux_mod_CFLAGS): Commented out.
16198 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
16199 out because module isn't built.
16200 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
16201 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
16202 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
16203 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
16204 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
16205 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16206 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16207 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
16208 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
16209 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
16210 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
16211 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
16212 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
16213 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
16215 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
16217 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
16218 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
16219 longer, because HFS should not be used on PC.
16221 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16223 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
16224 consistently within the loop.
16226 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
16228 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
16229 directory can not be read.
16231 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
16233 * configure.ac (AC_INIT): Increase the version number to 1.91.
16235 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
16236 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
16237 term/i386/pc/serial.c.
16239 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
16241 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
16242 file size must be permitted.
16244 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
16245 between %ah and %al.
16247 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
16249 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
16251 Call the hook with a NUL-terminated filename.
16252 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
16255 * kern/term.c (cursor_state): New variable.
16256 (grub_term_set_current): Reset the cursor state on a new
16258 (grub_setcursor): Rewritten to use CURSOR_STATE.
16259 (grub_getcursor): New function.
16261 * include/grub/term.h (grub_getcursor): New prototype.
16263 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
16264 integers on ARM. Reported by Timothy Baldwin
16265 <T.E.Baldwin99@members.leeds.ac.uk>.
16267 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
16269 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
16271 (grub_sfs_dir): Likewise.
16273 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
16275 Add support for the SFS filesystem.
16277 * fs/sfs.c: New file.
16279 * DISTLIST: Added `fs/sfs.c'.
16281 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
16282 (grub_probefs_SOURCES): Likewise.
16283 (grub_emu_SOURCES): Likewise.
16284 (pkgdata_MODULES): Add `sfs.mod'.
16285 (sfs_mod_SOURCES): New variable.
16286 (sfs_mod_CFLAGS): Likewise.
16287 (sfs_mod_LDFLAGS): Likewise.
16289 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
16290 (pkgdata_MODULES): Add `sfs.mod'.
16291 (sfs_mod_SOURCES): New variable.
16292 (sfs_mod_CFLAGS): Likewise.
16294 * util/grub-emu.c (main): Call `grub_sfs_init' and
16297 * include/grub/fs.h (grub_sfs_init): New prototype.
16298 (grub_sfs_fini): Likewise.
16300 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
16302 Add support for the AFFS filesystem.
16304 * fs/affs.c: New file.
16306 * DISTLIST: Added `fs/affs.c'.
16308 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
16309 (grub_probefs_SOURCES): Likewise.
16310 (grub_emu_SOURCES): Likewise.
16311 (pkgdata_MODULES): Add `affs.mod'.
16312 (affs_mod_SOURCES): New variable.
16313 (affs_mod_CFLAGS): Likewise.
16314 (affs_mod_LDFLAGS): Likewise.
16316 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
16317 (pkgdata_MODULES): Add `affs.mod'.
16318 (affs_mod_SOURCES): New variable.
16319 (affs_mod_CFLAGS): Likewise.
16321 * util/grub-emu.c (main): Call `grub_affs_init' and
16324 * include/grub/fs.h (grub_affs_init): New prototype.
16325 (grub_affs_fini): Likewise.
16327 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
16329 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
16331 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
16333 * configure.ac: Accept `x86_64' as host_cpu. In that case add
16336 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
16339 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
16340 (COMMON_LDFLAGS): New variable.
16341 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
16342 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
16343 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
16344 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
16345 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
16346 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
16347 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
16348 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
16349 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
16350 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
16351 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
16352 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
16353 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
16354 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
16355 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
16357 (normal_mod_ASFLAGS): Add `-m32'.
16359 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
16360 (grub_host_size_t, grub_host_ssize_t): New types.
16361 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
16362 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
16363 `GRUB_HOST_SIZEOF_VOID_P'.
16365 * include/grub/kernel.h (struct grub_module_header): Type of
16366 member offset changed to `grub_host_off_t'. Type of member size
16367 changed to `grub_host_size_t'.
16368 (struct grub_module_info): Type of member offset changed to
16369 `grub_host_off_t'. Type of member size changed to
16370 `grub_host_size_t'.
16372 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
16374 Make GRUB's kernel compliant to Multiboot Specification.
16376 * kern/i386/pc/startup.S (multiboot_header): New label.
16377 (multiboot_entry): Likewise.
16378 (multiboot_trampoline): Likewise.
16380 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16381 Increased to 0x4A0.
16383 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
16384 put parentheses after a question mark.
16385 [!GRUB_UTIL] (my_mod): New variable.
16387 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
16389 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
16391 Adds support for the XFS filesystem. Btrees are not supported
16394 * fs/xfs.c: New file.
16396 * DISTLIST: Added `fs/xfs.c'.
16398 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
16399 (grub_probefs_SOURCES): Likewise.
16400 (grub_emu_SOURCES): Likewise.
16401 (pkgdata_MODULES): Add `xfs.mod'.
16402 (xfs_mod_SOURCES): New variable.
16403 (xfs_mod_CFLAGS): Likewise.
16405 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
16406 (pkgdata_MODULES): Add `xfs.mod'.
16407 (xfs_mod_SOURCES): New variable.
16408 (xfs_mod_CFLAGS): Likewise.
16410 * util/grub-emu.c (main): Call `grub_xfs_init' and
16413 * include/grub/fs.h (grub_xfs_init): New prototype.
16414 (grub_xfs_fini): Likewise.
16417 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
16419 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
16420 color modes, allow greater than 16 colors to be configured as
16423 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
16425 * normal/completion.c (complete_arguments): Add the qualifier
16426 const into OPTIONS.
16428 From Omniflux <omniflux+lists@omniflux.com>:
16429 * include/grub/terminfo.h: New file.
16430 * include/grub/tparm.h: Likewise.
16431 * include/grub/i386/pc/serial.h: Likewise.
16432 * term/terminfo.c: Likewise.
16433 * term/tparm.c: Likewise.
16434 * term/i386/pc/serial.c: Likewise.
16435 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
16437 (terminfo_mod_SOURCES): New variable.
16438 (terminfo_mod_CFLAGS): Likewise.
16439 (serial_mod_SOURCES): Likewise.
16440 (serial_mod_CFLAGS): Likewise.
16442 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
16444 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
16445 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
16446 and kern/powerpc/ieee1275/cmain.c, respectively.
16448 * boot/powerpc/ieee1275/crt0.S: Moved to ...
16449 * kern/powerpc/ieee1275/crt0.S: ... here.
16451 * boot/powerpc/ieee1275/cmain.c: Moved to ...
16452 * kern/powerpc/ieee1275/cmain.c: ... here.
16454 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
16455 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
16456 instead of boot/powerpc/ieee1275/crt0.S and
16457 boot/powerpc/ieee1275/cmain.c, respectively.
16459 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
16460 sectors. It was not used anyway.
16462 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
16464 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
16465 `unused parameter' warning.
16467 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
16469 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
16471 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
16474 2005-08-28 Marco Gerards <metgerards@student.han.nl>
16476 * include/grub/normal.h (enum grub_completion_type): Added
16477 `GRUB_COMPLETION_TYPE_ARGUMENT'.
16479 * normal/cmdline.c (print_completion): Handle
16480 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
16481 * normal/menu_entry.c (store_completion): Likewise.
16483 * normal/completion.c (complete_arguments): New function.
16484 (grub_normal_do_completion): Call `complete_arguments' when the
16485 current words start with a dash.
16487 2005-08-27 Marco Gerards <metgerards@student.han.nl>
16489 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
16490 `gzio.mod' instead of `io.mod').
16492 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
16494 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
16495 (DISTDIRS): Added io and video.
16496 Rewrite the search routine to make an output consistently.
16498 * DISTLIST: Added conf/sparc64-ieee1275.mk,
16499 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
16500 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
16501 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
16502 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
16503 util/powerpc/ieee1275/misc.c.
16505 * include/grub/gzio.h: New file.
16506 * io/gzio.c: Likewise.
16508 * kern/file.c (grub_file_close): Call grub_device_close only if
16509 FILE->DEVICE is not NULL.
16511 * include/grub/mm.h [!NULL] (NULL): New macro.
16513 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
16515 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
16516 (pkgdata_MODULES): Added gzio.mod.
16517 (gzio_mod_SOURCES): New variable.
16518 (gzio_mod_CFLAGS): Likewise.
16520 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
16521 (pkgdata_MODULES): Added gzio.mod.
16522 (gzio_mod_SOURCES): New variable.
16523 (gzio_mod_CFLAGS): Likewise.
16525 * commands/cat.c: Include grub/gzio.h.
16526 (grub_cmd_cat): Use grub_gzfile_open instead of
16529 * commands/cmp.c: Include grub/gzio.h.
16530 (grub_cmd_cmp): Use grub_gzfile_open instead of
16533 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
16534 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
16536 (grub_rescue_cmd_module): Likewise.
16538 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
16540 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
16541 kern/sparc64/ieee1275/init.c because it contains _start.
16542 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
16544 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
16546 * configure.ac: Add support for sparc64 host with ieee1275
16548 * configure: Generated from configure.ac.
16549 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
16551 (grub_ofdisk_read): Likewise.
16552 (grub_ofdisk_open): Use %p to print pointer values, and cast the
16553 pointers as (void *) to remove a warning.
16554 (grub_ofdisk_close): Likewise.
16555 (grub_ofdisk_read): Likewise.
16556 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
16557 returns, so make it return void to remove a warning.
16558 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
16559 Corresponding prototype change.
16560 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
16561 values, and cast the pointers as (void *) to remove a warning.
16562 (grub_mm_dump): Likewise.
16563 * conf/sparc64-ieee1275.mk: New file.
16564 * conf/sparc64-ieee1275.rmk: Likewise.
16565 * include/grub/sparc64/setjmp.h: Likewise.
16566 * include/grub/sparc64/types.h: Likewise.
16567 * include/grub/sparc64/ieee1275/console.h: Likewise.
16568 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
16569 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
16570 * include/grub/sparc64/ieee1275/time.h: Likewise.
16571 * kern/sparc64/cache.c: Likewise.
16572 * kern/sparc64/dl.c: Likewise.
16573 * kern/sparc64/ieee1275/init.c: Likewise.
16574 * kern/sparc64/ieee1275/openfw.c: Likewise.
16576 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16578 * util/console.c (grub_ncurses_putchar): If C is greater than
16579 0x7f, set C to a question mark.
16580 (grub_ncurses_getcharwidth): New function.
16581 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
16584 * normal/menu.c (print_entry): Made aware of Unicode. First,
16585 convert TITLE to UCS-4, and predict the cursor position by
16588 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
16590 * kern/misc.c (grub_utf16_to_utf8): Likewise.
16592 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
16594 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
16595 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16598 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
16599 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
16600 grub_strcpy and grub_strlen. Take it into account that a space
16601 character is inserted as a delimiter.
16603 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
16605 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
16606 invalid magic in the error.
16608 * commands/search.c: New file.
16610 * util/grub-emu.c (main): Call grub_search_init and
16613 * kern/rescue.c (grub_rescue_print_disks): Removed.
16614 (grub_rescue_print_devices): New function.
16615 (grub_rescue_cmd_ls): Use grub_device_iterate with
16616 grub_rescue_print_devices instead of grub_disk_dev_iterate with
16617 grub_rescue_print_disks.
16619 * kern/partition.c (grub_partition_iterate): Return the result of
16620 PARTMAP->ITERATE instead of GRUB_ERRNO.
16622 * kern/device.c: Include grub/partition.h.
16623 (grub_device_iterate): New function.
16625 * include/grub/partition.h (grub_partition_iterate): Return int
16626 instead of grub_err_t.
16628 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
16630 [GRUB_UTIL] (grub_search_fini): Likewise.
16632 * include/grub/device.h (grub_device_iterate): New prototype.
16634 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16636 (pkgdata_MODULES): Added search.mod.
16637 (search_mod_SOURCES): New variable.
16638 (search_mod_CFLAGS): Likewise.
16640 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
16641 (pkgdata_MODULES): Added search.mod.
16642 (search_mod_SOURCES): New variable.
16643 (search_mod_CFLAGS): Likewise.
16645 * commands/ls.c (grub_ls_list_disks): Renamed to ...
16646 (grub_ls_list_devices): ... this, and use grub_device_iterate.
16647 All callers changed.
16649 * DISTLIST: Added commands/search.c.
16651 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
16653 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
16655 (grub_getcharwidth): New function.
16657 * kern/misc.c (grub_utf8_to_ucs4): New function.
16659 * include/grub/term.h (struct grub_term): Added a new member
16661 (grub_getcharwidth): New prototype.
16663 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
16665 * term/i386/pc/console.c (map_char): New function. Segregated from
16666 grub_console_putchar.
16667 (grub_console_putchar): Use map_char.
16668 (grub_console_getcharwidth): New function.
16669 (grub_console_term): Specified grub_console_getcharwidth as
16672 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
16673 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
16675 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
16677 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
16678 on grub_strtoul completely.
16679 (write_char): Declare local variables in the beginning of the
16681 (grub_vesafb_getcharwidth): New function.
16682 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
16685 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
16687 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
16688 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
16689 commands/i386/pc/vbetest.c.
16691 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
16692 call grub_vbe_get_controller_info again, because the returned
16693 information is volatile.
16694 (grub_vbe_set_video_mode): Mostly rewritten.
16695 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
16696 grub_vbe_status_t correctly.
16697 (grub_vbe_get_video_mode_info): Likewise.
16698 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
16699 several if statements.
16701 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
16702 * commands/i386/pc/vbeinfo.c: ... this.
16704 * commands/i386/pc/vbe_test.c: Renamed to ...
16705 * commands/i386/pc/vbetest.c: ... this.
16707 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
16709 (grub_cmd_vbeinfo): ... this. Save video modes before
16710 iterating. Skip a video mode, if it is not available, not enough
16711 information is given or it is monochrome. Show the memory
16712 model. Leave the interpretation of MODEVAR to grub_strtoul
16714 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
16715 (GRUB_MOD_FINI): Likewise.
16717 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
16718 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
16719 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
16720 duplicated grub_env_get. Leave the interpretation of MODEVAR to
16721 grub_strtoul completely.
16722 (real2pm): Removed.
16723 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
16724 (GRUB_MOD_FINI): Likewise.
16726 * normal/misc.c: Include grub/mm.h.
16728 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
16729 vbe_list_modes with vbetest.mod and vbeinfo.mod.
16730 (vbe_list_modes_mod_SOURCES): Removed.
16731 (vbe_list_modes_mod_CFLAGS): Likewise.
16732 (vbe_test_mod_SOURCES): Likewise.
16733 (vbe_test_mod_CFLAGS): Likewise.
16734 (vbeinfo_mod_SOURCES): New variable.
16735 (vbeinfo_mod_CFLAGS): Likewise.
16736 (vbetest_mod_SOURCES): Likewise.
16737 (vbetest_mod_CFLAGS): Likewise.
16739 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
16741 * normal/misc.c: New file.
16743 * DISTLIST: Added normal/misc.c.
16745 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
16746 DISK to HOOK. Call HOOK with DISK.
16747 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16748 * partmap/pc.c (pc_partition_map_iterate): Likewise.
16749 * partmap/sun.c (sun_partition_map_iterate): Likewise.
16751 * normal/menu_entry.c (struct screen): Added a new member
16752 "completion_shown".
16753 (completion_buffer): New global variable.
16754 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
16755 (store_completion): New function.
16756 (complete): Likewise.
16757 (clear_completions): Likewise.
16758 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
16759 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
16760 a tab, call complete.
16762 * normal/completion.c (disk_dev): Removed.
16763 (print_simple_completion): Likewise.
16764 (print_partition_completion): Likewise.
16765 (print_func): New global variable.
16766 (add_completion): Do not take the arguments WHAT or PRINT any
16767 longer. Added a new argument TYPE. Instead of printing directly,
16768 call PRINT_FUNC if not NULL.
16769 All callers changed.
16770 (complete_device): Use a local variable DEV instead of
16771 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
16772 (grub_normal_do_completion): Take a new argument HOOK. Do not
16773 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
16774 empty string, return NULL instead.
16775 All callers changed.
16777 * normal/cmdline.c (print_completion): New function.
16779 * kern/partition.c (grub_partition_iterate): Add an argument DISK
16781 All callers changed.
16783 * kern/disk.c (grub_print_partinfo): Removed.
16785 * include/grub/partition.h (struct grub_partition_map): Add a new
16786 argument DISK into HOOK of ITERATE.
16787 (grub_partition_iterate): Add a new argument DISK to HOOK.
16789 * include/grub/normal.h (enum grub_completion_type): New enum.
16790 (grub_completion_type_t): New type.
16791 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
16792 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
16793 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
16794 (GRUB_COMPLETION_TYPE_FILE): Likewise.
16795 (grub_normal_do_completion): Added a new argument HOOK.
16796 (grub_normal_print_device_info): New prototype.
16798 * include/grub/disk.h (grub_print_partinfo): Removed.
16800 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
16801 (normal_mod_SOURCES): Likewise.
16802 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16803 (normal_mod_SOURCES): Likewise.
16805 * commands/ls.c (grub_ls_list_disks): Use
16806 grub_normal_print_device_info instead of grub_print_partinfo. Free
16808 (grub_ls_list_files): Use grub_normal_print_device_info instead of
16809 duplicating the code.
16811 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
16813 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
16814 follow GCS more precisely.
16815 * commands/i386/pc/vbe_test.c: Likewise.
16816 * include/grub/i386/pc/vbe.h: Likewise.
16817 * term/i386/pc/vesafb.c: Likewise.
16818 * video/i386/pc/vbe.c: Likewise.
16820 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
16822 * DISTLIST: Added term/i386/pc/vesafb.c
16823 DISTLIST: Added video/i386/pc/vbe.c
16824 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
16825 DISTLIST: Added commands/i386/pc/vbe_test.c.
16826 * commands/i386/pc/vbe_list_modes.c: New file.
16827 * commands/i386/pc/vbe_test.c: Likewise.
16828 * term/i386/pc/vesafb.c: Likewise.
16829 * video/i386/pc/vbe.c: Likewise.
16830 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
16831 (grub_vbe_probe) Added prototype.
16832 (grub_vbe_set_video_mode) Likewise.
16833 (grub_vbe_get_video_mode) Likewise.
16834 (grub_vbe_get_video_mode_info) Likewise.
16835 (grub_vbe_set_pixel_rgb) Likewise.
16836 (grub_vbe_set_pixel_index) Likewise.
16837 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
16838 (pkgdata_MODULES): Added vesafb.mod.
16839 (pkgdata_MODULES): Added vbe_list_modes.mod.
16840 (pkgdata_MODULES): Added vbe_test.mod.
16841 (vbe_mod_SOURCES): Added.
16842 (vbe_mod_CFLAGS): Likewise.
16843 (vesafb_mod_SOURCES): Likewise.
16844 (vesafb_mod_CFLAGS): Likewise.
16845 (vbe_list_modes_mod_SOURCES): Likewise.
16846 (vbe_list_modes_mod_CFLAGS): Likewise.
16847 (vbe_test_mod_SOURCES): Likewise.
16848 (vbe_test_mod_CFLAGS): Likewise.
16850 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
16852 * normal/command.c (grub_command_execute): If INTERACTIVE is
16853 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
16854 CMDLINE. Disable the pager if INTERACTIVE is true.
16855 All callers are changed.
16857 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
16858 before reading a config file.
16859 * normal/main.c (read_config_file): Even if a command is not
16860 found, register it if it is within an entry.
16862 * util/grub-emu.c: Include sys/types.h and unistd.h.
16863 (options): Added --hold.
16864 (struct arguments): Added a new member "hold".
16865 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
16867 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
16868 cleared by a debugger, if it is not zero.
16870 * include/grub/normal.h (grub_command_execute): Add an argument
16873 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
16875 * DISTLIST: Added include/grub/i386/pc/vbe.h.
16877 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
16879 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
16880 program with another one, because the old one didn't detect a bug
16881 in gcc-3.4. Always use regparm 2, because the new test is still
16882 not enough for gcc-4.0. Someone must investigate a simple test
16883 case which detects a bug in gcc-4.0.
16885 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
16887 * DISTLIST: Added normal/completion.c.
16889 * normal/completion.c: New file.
16891 * term/i386/pc/console.c (grub_console_getwh): New function.
16892 (grub_console_term): Assign grub_console_getwh to getwh.
16894 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
16895 function is defined in normal/completion.c as
16896 grub_normal_do_completion.
16897 (grub_cmdline_get): Use grub_normal_do_completion instead of
16900 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
16901 returns non-zero, otherwise return 0.
16902 (grub_partition_iterate): First, probe the partition map. Then,
16903 call ITERATE only for this partition map.
16905 * kern/misc.c (grub_strncmp): Rewritten.
16907 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
16908 returns non-zero. Otherwise return 0.
16910 * include/grub/partition.h (grub_partition_map_iterate): Return
16911 int instead of void.
16913 * include/grub/normal.h (grub_normal_do_completion): New prototype.
16915 * include/grub/misc.h (grub_strncmp): Change the type of N to
16918 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
16921 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
16922 unsigned explicitly before comparing it with I.
16924 * kern/main.c (grub_env_write_root): Add the attribute unused into
16927 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16928 normal/completion.c.
16929 (normal_mod_SOURCES): Likewise.
16930 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
16931 (normal_mod_SOURCES): Likewise.
16933 * normal/command.c (grub_iterate_commands): If ITERATE returns
16934 non-zero, return one immediately.
16936 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
16938 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
16939 * kern/i386/pc/startup.S: Updated Global Descriptor table's
16941 (grub_vbe_get_controller_info): New function.
16942 (grub_vbe_get_mode_info): Likewise.
16943 (grub_vbe_set_mode): Likewise.
16944 (grub_vbe_get_mode): Likewise.
16945 (grub_vbe_set_memory_window): Likewise.
16946 (grub_vbe_get_memory_window): Likewise.
16947 (grub_vbe_set_scanline_length): Likewise.
16948 (grub_vbe_get_scanline_length): Likewise.
16949 (grub_vbe_set_display_start): Likewise.
16950 (grub_vbe_get_display_start): Likewise.
16951 (grub_vbe_set_palette_data): Likewise.
16952 * include/grub/i386/pc/vbe.h: New file.
16954 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
16956 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16957 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
16958 * DISTLIST: Likewise.
16959 * kern/ieee1275/of.c: Moved to ...
16960 * kern/ieee1275/ieee1275.c: ... here.
16962 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
16964 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
16965 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
16966 Pass 0 as `end' parameter to grub_strtoul().
16968 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
16970 * include/grub/powerpc/ieee1275/console.h: Do not include
16971 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
16973 (grub_console_cur_color): Remove i386-specific prototype.
16974 (grub_console_real_putchar): Likewise.
16975 (grub_console_checkkey): Likewise.
16976 (grub_console_getkey): Likewise.
16977 (grub_console_getxy): Likewise.
16978 (grub_console_gotoxy): Likewise.
16979 (grub_console_cls): Likewise.
16980 (grub_console_setcursor): Likewise.
16981 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
16982 Include <grub/machine/console.h>.
16983 * term/ieee1275/ofconsole.c: Likewise.
16985 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
16987 * Makefile.in (LIBLZO): New variable.
16989 * configure.ac: Check for LZO version 2.
16991 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
16992 lzo/lzo1x.h instead of lzo1x.h.
16994 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
16997 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
16998 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
17000 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
17001 copying the data from PARTITION to P.
17003 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
17005 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
17006 negative, unload the module.
17008 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
17009 map is "pc_partition_map" but not "pc".
17010 (usage): Fix the description. The options are --boot-image and
17011 --core-image but not --boot-file or --core-file.
17012 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
17013 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
17016 * util/i386/pc/grub-install.in: Do not specify --boot-file or
17017 --core-file. Specify INSTALL_DEVICE as an argument.
17019 * util/console.c: Include config.h.
17020 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
17021 [HAVE_NCURSES_H]: Include ncurses.h.
17022 [HAVE_CURSES_H]: Include curses.h.
17023 [!A_NORMAL] (A_NORMAL): Defined as zero.
17024 [!A_STANDOUT] (A_STANDOUT): Likewise.
17026 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
17028 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
17030 * configure.ac: Check for curses libraries and headers.
17032 * Makefile.in (LIBCURSES): New variable.
17034 * genmk.rb (Script::rule): Set the executable bits.
17036 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
17037 name of the PC partition map is "pc_partition_map" but not "pc".
17039 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
17041 * util/i386/pc/grub-install.in (grub_probefs): New variable.
17042 (modules): Likewise.
17043 (usage): Added descriptions for --modules and --grub-probefs.
17044 Handle --modules and --grub-probefs. Save the arguments in MODULES
17045 and GRUB_PROBEFS, respectively.
17046 Auto-detect a filesystem module against GRUBDIR. If the result is
17047 empty and modules are not specified explicitly, abort the
17048 installation. Add the result to MODULES.
17050 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
17051 disk/powerpc/ieee1275/ofdisk.c,
17052 include/grub/powerpc/ieee1275/init.h and
17053 term/powerpc/ieee1275/ofconsole.c.
17054 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
17055 term/ieee1275/ofconsole.c.
17057 * include/grub/powerpc/ieee1275/console.h: Resurrected.
17059 * COPYING: Upgraded to the latest version. Only the address of the
17060 FSF office has changed.
17062 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
17064 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
17065 kern/ieee1275.c with kern/ieee1275/of.c.
17067 * kern/ieee1275.c: Moved to ...
17068 * kern/ieee1275/of.c: ... here.
17070 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
17072 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
17075 * config.guess: Updated to the latest version from gnulib.
17076 * config.sub: Likewise.
17077 * install.sh: Likewise.
17078 * mkinstalldirs: Likewise.
17080 * include/grub/console.h: Removed. This file is arch-specific. Do
17081 not put this in include/grub.
17083 * include/grub/i386/pc/console.h: Resurrected.
17085 * util/console.c: Include grub/machine/console.h instead of
17087 * util/grub-emu.c: Likewise.
17089 2005-08-04 Marco Gerards <metgerards@student.han.nl>
17091 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
17094 From Vincent Pelletier <subdino2004@yahoo.fr>
17095 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
17096 Redefined to use grub_getwh.
17097 (grub_term): New member named getwh.
17098 (grub_getwh): New prototype.
17099 * kern/term.c (grub_getwh): New function.
17100 * term/i386/pc/console.c (grub_console_getwh): New function.
17101 (grub_console_term): New member `getwh'.
17102 * term/i386/pc/vga.c (grub_vga_getwh): New function.
17103 (grub_vga_term): New member `getwh'.
17104 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
17106 (grub_ofconsole_getw): New function.
17107 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
17108 (grub_ofconsole_term): New field named getwh and new initial
17111 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
17113 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
17114 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
17115 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
17116 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
17117 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
17118 of <grub/machine/ieee1275.h>.
17119 * commands/ieee1275/reboot.c: Likewise.
17120 * boot/powerpc/ieee1275/ieee1275.c: Move ...
17121 * kern/ieee1275.c: ... to here. All users updated. Change all
17122 parameter structs to use new type `grub_ieee1275_cell_t'.
17123 * term/powerpc/ieee1275/ofconsole.c: Move ...
17124 * term/ieee1275/ofconsole.c: ... to here. All users updated.
17125 * disk/powerpc/ieee1275/ofdisk.c: Move ...
17126 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
17127 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
17129 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
17130 Remove unused prototypes. All users updated.
17131 * include/grub/powerpc/ieee1275/console.h: Removed.
17132 * include/grub/powerpc/ieee1275/ieee1275.h: Define
17133 `grub_ieee1275_cell_t'.
17134 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
17135 Cast comparisons with -1 to the correct type.
17136 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
17137 type to match `grub_ieee1275_entry_fn'.
17139 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
17141 * DISTLIST: Added util/i386/pc/grub-probefs.c.
17143 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
17144 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
17146 (grub_probefs_SOURCES): New variable.
17148 * util/i386/pc/grub-probefs.c: New file.
17150 * util/i386/pc/grub-setup.c (main): Call
17151 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
17152 grub_hfs_init and grub_jfs_init to initialize the system. Call
17153 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
17154 grub_pc_partition_map_fini to finish the system.
17156 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
17158 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
17160 (grub_multiboot_load_elf32): Likewise.
17161 (grub_multiboot_is_elf64): Likewise.
17162 (grub_multiboot_load_elf64): Likewise.
17163 (grub_multiboot_load_elf): Likewise.
17164 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
17165 an ELF32 or ELF64 file.
17166 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
17168 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
17169 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
17170 NULL before calling FS->LABEL.
17171 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
17172 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
17173 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
17174 before calling FS->LABEL.
17176 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
17178 * util/i386/pc/grub-install.in (datadir): New variable.
17180 (pkgdatadir): New variable.
17181 (pkglibdir): Removed.
17183 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
17185 * DISTLIST: Added util/i386/pc/grub-install.in.
17187 * util/i386/pc/grub-install.in: New file.
17189 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
17190 (grub_install_SOURCES): Likewise.
17192 * genmk.rb: Added support for scripts.
17193 (Script): New class.
17194 (scripts): New variable.
17196 * Makefile.in (install-local): Install sbin_SCRIPTS by
17198 (uninstall): Remove sbin_SCRIPTS.
17200 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
17201 device, try to get a GRUB device by
17202 grub_util_biosdisk_get_grub_dev.
17205 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
17206 description for --device-map.
17208 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
17210 Change the semantics of variable hooks. They now return strings
17211 instead of error values.
17213 * util/i386/pc/grub-setup.c: Include grub/env.h.
17214 (setup): Use grub_device_set_root instead of grub_env_set.
17216 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
17217 grub_env_get instead of grub_device_set_root and
17218 grub_device_get_root, respectively.
17220 * kern/main.c (grub_env_write_root): New function.
17221 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
17222 grub_env_set instead of grub_device_set_root.
17224 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
17226 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
17227 rather than calling ENV->WRITE_HOOK afterwards.
17228 (grub_env_get): Return the result of ENV->READ_HOOK rather than
17229 passing a pointer of a pointer.
17230 (grub_register_variable_hook): Change the types of "read_hook" and
17231 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
17233 Allocate the default empty string on the heap, because this string
17234 may be freed later.
17236 * kern/device.c: Include grub/env.h.
17237 (grub_device_set_root): Removed.
17238 (grub_device_get_root): Likewise.
17239 (grub_device_open): Use grub_env_get instead of
17240 grub_device_get_root.
17242 * include/grub/env.h (grub_env_read_hook_t): New type.
17243 (grub_env_write_hook_t): Likewise.
17244 (grub_env_var): Change the types of "read_hook" and "write_hook"
17245 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
17246 (grub_register_variable_hook): Likewise.
17248 * include/grub/device.h (grub_device_set_root): Removed.
17249 (grub_device_set_root): Likewise.
17251 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
17252 make sure that DIRNAME terminates with '/', so that
17253 grub_fat_find_dir will fail if PATH is not a directory.
17255 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
17257 Use the qualifier auto for print_files and print_files_long.
17258 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
17260 Put a newline only if there is no error.
17261 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
17264 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
17266 * kern/partition.c (grub_partition_probe): Initialize PART to
17267 NULL. Otherwise, when no partition map is registered, this returns
17270 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
17272 * partmap/apple.c (apple_partition_map_iterate): Check if POS
17273 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
17276 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
17278 * commands/ls.c (grub_ls_list_disks): Print the filesystem
17279 information on each device, if it does not have partitions. Print
17280 "Device" instead of "Disk", because this function is not specific
17283 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
17284 static to ensure that it is put on the memory rather than a
17287 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
17289 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
17290 (grub_cat_init): Likewise.
17291 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
17292 (options): Likewise.
17293 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
17294 (grub_configfile_init): Likewise.
17295 * font/manager.c (GRUB_MOD_INIT): Likewise.
17296 * commands/help.c (GRUB_MOD_INIT): Likewise.
17297 (grub_help_init): Likewise.
17298 * normal/command.c (grub_command_init): Likewise.
17299 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
17300 * disk/loopback.c (grub_loop_init): Likewise.
17301 (GRUB_MOD_INIT): Likewise.
17302 * commands/ls.c (grub_ls_init): Likewise.
17303 (GRUB_MOD_INIT): Likewise.
17304 (options): Likewise.
17305 * commands/boot.c (grub_boot_init): Likewise.
17306 (GRUB_MOD_INIT): Likewise.
17307 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
17308 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
17309 (GRUB_MOD_INIT): Likewise.
17310 * commands/cmp.c (grub_cmp_init): Likewise.
17311 (GRUB_MOD_INIT): Likewise.
17313 * normal/arg.c: Use <> instead of "" to include header files.
17314 (SHORT_ARG_HELP): New macro.
17315 (SHORT_ARG_USAGE): Likewise.
17316 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
17317 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
17319 (find_short): Check if C is 'h' or 'u' explicitly.
17320 (grub_arg_show_help): Use space characters instead of tabs. Treat
17321 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
17322 are shown with --help and --usage only if they are not used for
17323 the command itself.
17324 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
17327 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
17328 const into "longarg". Change the type of "shortarg" to int.
17330 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
17332 * boot/i386/pc/boot.S (boot_drive_check): New label.
17334 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
17337 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
17338 which do not pass a boot drive correctly. Copied from GRUB Legacy.
17340 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
17342 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
17343 When turning off Gate A20, skip the check and return immediately,
17344 because this is not fatal usually.
17346 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
17348 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
17349 be 0x7C00 instead of 0x8000.
17351 * boot/i386/pc/pxeboot.S: Rewritten.
17353 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
17355 (gate_a20_check_state): Read a byte from 0x108000. Invert the
17358 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
17360 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
17361 robustness. This routine now supports a BIOS call and System
17362 Control Port A to modify the gate A20.
17364 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
17365 Increased to 0x440.
17367 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
17369 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
17370 device path and resulting ihandle.
17371 (grub_ofdisk_close): dprintf the ihandle being closed.
17372 (grub_ofdisk_read): dprintf function parameters.
17373 * kern/mm.c (grub_mm_init_region): Likewise.
17374 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
17375 (grub_linux_boot): dprintf the Linux entry point, initrd address and
17376 size, and boot arguments.
17377 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
17378 before loading into memory.
17379 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
17380 before loading into memory.
17382 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
17384 * kern/mm.c: Added much documentation.
17385 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
17386 8, set to 5 instead of 8.
17388 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
17390 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
17392 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
17393 (grub_mkdevicemap_SOURCES): New variable.
17395 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
17396 lib/device.c of GRUB Legacy.
17398 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
17400 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
17401 instead of PATH is NULL.
17403 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
17405 * commands/cmp.c (BUFFER_SIZE): New macro.
17406 (grub_cmd_cmp): Close the right file at the right time. Compare
17407 only data just read. Don't report files of different size as
17408 identical. Dynamically allocate buffers. Move variable
17409 declarations at the beginning of function.
17411 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
17413 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
17416 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
17418 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
17419 when backspace is pressed at beginning of line.
17421 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
17423 * DISTLIST: Added genfslist.sh.
17425 * normal/main.c (fs_module_list): New variable.
17426 (autoload_fs_module): New function.
17427 (read_fs_list): Likewise.
17428 (grub_normal_execute): Call read_fs_list.
17430 * kern/fs.c (grub_fs_autoload_hook): New variable.
17431 (grub_fs_probe): Added support for auto-loading.
17433 * include/grub/normal.h (struct grub_fs_module_list): New struct.
17434 (grub_fs_module_list_t): New type.
17436 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
17437 (grub_fs_autoload_hook): New prototype.
17439 * genfslist.sh: New file.
17441 * genmk.rb: Added a rule to generate a filesystem list.
17443 2005-06-30 Marco Gerards <metgerards@student.han.nl>
17445 * configure.ac: Fix the test for cross-compiling.
17447 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
17448 define GRUB_UTIL anymore.
17450 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
17451 so this function works on other systems than just big endian.
17452 (load_modules): Likewise.
17453 (add_segments): Likewise.
17455 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
17457 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
17458 contains `l' modifier, get a long from va_arg().
17460 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
17462 * kern/mm.c (grub_free): If the next free block which is being
17463 merged is the first free block, set the first block to the block
17465 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
17467 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
17469 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
17470 `grub_ieee1275_chosen'.
17472 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
17474 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
17475 (grub_ieee1275_chosen): New variable.
17476 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
17478 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
17479 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17480 Rename first argument to `phandle' for consistency.
17481 (grub_ieee1275_get_property_length): Likewise.
17482 (grub_ieee1275_next_property): Likewise. Change type of first argument
17483 to grub_ieee1275_phandle_t.
17484 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
17485 Move export next to declaration.
17486 (grub_ieee1275_chosen): New variable.
17487 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
17488 Correct cosmetic typo.
17489 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
17490 `grub_ieee1275_chosen'.
17491 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
17492 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
17493 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
17494 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
17495 `grub_ieee1275_chosen'.
17497 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
17499 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
17501 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
17502 /chosen/bootargs as "variable=value" pairs.
17504 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
17506 * include/grub/misc.h (grub_dprintf): New macro.
17507 (grub_real_dprintf): New prototype.
17508 (grub_strword): Likewise.
17509 (grub_iswordseparator): Likewise.
17510 * kern/misc.c (grub_real_dprintf): New function.
17511 (grub_strword): Likewise.
17512 (grub_iswordseparator): Likewise.
17514 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
17516 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
17517 (roundup): Remove macro.
17518 (grub_ieee1275_flags): Make static.
17519 (grub_ieee1275_realmode): Remove.
17520 (grub_ieee1275_test_flag): New function.
17521 (grub_ieee1275_set_flag): Likewise.
17522 (find_options): Rename to `grub_ieee1275_find_options'; update
17523 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
17524 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
17525 (cmain): New prototype.
17526 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
17527 `grub_ieee1275_flags' directly.
17528 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
17529 machine/biosdisk.h.
17530 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
17531 Don't include grub/machine/init.h.
17532 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
17533 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17535 (grub_ieee1275_realmode): Likewise.
17536 (grub_ieee1275_flag): New enum.
17537 (grub_ieee1275_test_flag): New prototype.
17538 (grub_ieee1275_set_flag): New prototype.
17539 * include/grub/powerpc/ieee1275/init.h: Remove file.
17540 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
17541 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
17542 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
17543 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
17545 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
17546 `grub_ieee1275_test_flag'.
17547 (grub_ieee1275_encode_devname): Likewise.
17549 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
17551 * include/grub/powerpc/ieee1275/ieee1275.h
17552 (grub_ieee1275_encode_devname): New prototype.
17553 (grub_ieee1275_get_filename): Likewise.
17554 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
17556 (grub_set_prefix): Likewise.
17557 (grub_machine_init): Call grub_set_prefix.
17558 * kern/powerpc/ieee1275/openfw.c: Fix typos.
17559 (grub_parse_type): New enum.
17560 (grub_ieee1275_get_devargs): New function.
17561 (grub_ieee1275_get_devname): Likewise.
17562 (grub_ieee1275_parse_args): Likewise.
17563 (grub_ieee1275_get_filename): Likewise.
17564 (grub_ieee1275_encode_devname): Likewise.
17566 2005-03-30 Marco Gerards <metgerards@student.han.nl>
17568 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
17569 `grub_loader_unset'.
17571 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
17573 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
17574 instead of grub_ieee1275_interpret.
17575 (grub_halt_init): New function.
17576 (grub_halt_fini): Likewise.
17577 (GRUB_MOD_INIT): Correct message grammar.
17578 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
17579 instead of grub_ieee1275_interpret.
17580 (grub_reboot_init): New function.
17581 (grub_reboot_fini): Likewise.
17582 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
17583 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
17584 util/i386/pc/misc.c with commands/ieee1275/halt.c,
17585 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
17586 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
17588 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
17590 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
17592 (grub_halt): Likewise.
17593 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
17594 (cmain): Remove __attribute__((unused)).
17595 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
17596 (grub_heap_len): Likewise.
17597 (grub_machine_fini): New function.
17598 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
17599 (grub_halt): Likewise.
17600 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
17602 * util/powerpc/ieee1275/misc.c: New file.
17604 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
17606 * DISTLIST: New file.
17607 * gendistlist.sh: Likewise.
17609 * Makefile.in (COMMON_DISTFILES): Removed.
17610 (BOOT_DISTFILES): Likewise.
17611 (CONF_DISTFILES): Likewise.
17612 (DISK_DISTFILES): Likewise.
17613 (FS_DISTFILES): Likewise.
17614 (INCLUDE_DISTFILES): Likewise.
17615 (KERN_DISTFILES): Likewise.
17616 (LOADER_DISTFILES): Likewise.
17617 (TERM_DISTFILES): Likewise.
17618 (UTIL_DISTFILES): Likewise.
17619 (DISTFILES): Likewise.
17620 (uninstall): Uninstall files in $(pkgdata_DATA).
17621 (DISTLIST): New target.
17622 (distdir): Use the contents of the file DISTLIST to get a list of
17625 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
17627 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
17628 descriptor. This is ported from GRUB Legacy.
17630 * gencmdlist.sh: Added an extra semicolon to make it work with
17631 old sed versions. Reported by Robert Bihlmeyer
17632 <robbe@orcus.priv.at>.
17634 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
17636 Automatic loading of commands is supported.
17638 * normal/main.c (read_command_list): New function.
17639 (grub_normal_execute): Call read_command_list.
17641 * normal/command.c (grub_register_command): Return zero or CMD.
17642 Allocate CMD->NAME from the heap.
17643 Initialize CMD->MODULE_NAME to zero.
17644 Find the same name as well. If the same command is found and it is
17645 a dummy command, overwrite members. If it is not a dummy command,
17647 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
17648 (grub_command_find): If a dummy command is found, load a module
17649 and retry to find a command only once.
17651 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
17652 make sure that each command is loaded.
17654 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
17656 (struct grub_command): Remove const from the member `name'.
17657 Add a new member `module_name'.
17658 (grub_register_command): Return grub_command_t.
17660 * commands/help.c (grub_cmd_help): Call grub_command_find to make
17661 sure that each command is loaded.
17663 * genmk.rb (PModule::rule): Specify a module name without the
17664 suffix ".mod" to gencmdlist.sh.
17666 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
17668 * gencmdlist.sh: New file.
17670 * genmk.rb (PModule::rule): Generate a rule for a command list.
17672 Generate command.lst from $(COMMANDFILES).
17674 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
17675 (DATA): Added $(pkgdata_DATA).
17676 (install-local): Install files in $(pkgdata_DATA).
17678 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
17680 * term/i386/pc/vga.c (debug_command): Removed.
17681 (GRUB_MOD_INIT): Do not register the command "debug".
17683 From Hollis Blanchard:
17684 * commands/configfile.c: New file.
17685 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17686 commands/configfile.c.
17687 (pkgdata_MODULES): Added configfile.mod.
17688 (configfile_mod_SOURCES): New variable.
17689 (configfile_mod_CFLAGS): Likewise.
17690 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17691 commands/configfile.c.
17692 (pkgdata_MODULES): Added configfile.mod.
17693 (configfile_mod_SOURCES): New variable.
17694 (configfile_mod_CFLAGS): Likewise.
17695 * util/grub-emu.c (main): Call grub_configfile_init and
17696 grub_configfile_fini.
17697 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
17699 [GRUB_UTIL] (grub_configfile_fini): Likewise.
17701 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
17703 * normal/arg.c (grub_arg_show_help): Do not show the bug report
17706 * commands/help.c (grub_cmd_help): Do not print newlines after
17707 the last command in print_command_help.
17709 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
17711 * commands/default.h: New file.
17712 * commands/timeout.h: Likewise.
17713 * normal/context.c: Likewise.
17715 * util/misc.c: Do not include sys/times.h.
17716 Include sys/time.h and grub/machine/time.h.
17717 (grub_get_rtc): Rewritten with gettimeofday.
17719 * util/grub-emu.c (main): Call grub_default_init and
17720 grub_timeout_init before grub_normal_init, and call
17721 grub_timeout_fini and grub_default_fini after grub_main.
17723 * util/console.c (grub_ncurses_checkkey): Return the read
17726 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
17729 * normal/main.c (read_config_file): Push MENU. If this fails,
17730 print an error and wait for a user input.
17731 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
17732 If a menu is empty or an error occurs, pop MENU.
17733 (grub_normal_execute): Pop and free MENU after grub_menu_run
17736 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
17738 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
17740 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17742 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
17744 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17747 * include/grub/normal.h (struct grub_menu_list): New struct.
17748 (grub_menu_list_t): New type.
17749 (struct grub_context): New struct.
17750 (grub_context_t): New type.
17751 (grub_register_command): Got rid of EXPORT_FUNC.
17752 (grub_unregister_command): Likewise.
17753 (grub_context_get): New prototype.
17754 (grub_context_get_current_menu): Likewise.
17755 (grub_context_push_menu): Likewise.
17756 (grub_context_pop_menu): Likewise.
17757 [GRUB_UTIL] (grub_default_init): Likewise.
17758 [GRUB_UTIL] (grub_default_fini): Likewise.
17759 [GRUB_UTIL] (grub_timeout_init): Likewise.
17760 [GRUB_UTIL] (grub_timeout_fini): Likewise.
17762 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
17763 commands/timeout.c and normal/context.c.
17764 (pkgdata_MODULES): Added default.mod and timeout.mod.
17765 (normal_mod_SOURCES): Added normal/context.c.
17766 (default_mod_SOURCES): New variable.
17767 (default_mod_CFLAGS): Likewise.
17768 (timeout_mod_SOURCES): Likewise.
17769 (timeout_mod_CFLAGS): Likewise.
17770 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
17772 (pkgdata_MODULES): Added default.mod and timeout.mod.
17773 (normal_mod_SOURCES): Added normal/context.c.
17774 (default_mod_SOURCES): New variable.
17775 (default_mod_CFLAGS): Likewise.
17776 (timeout_mod_SOURCES): Likewise.
17777 (timeout_mod_CFLAGS): Likewise.
17779 * Makefile.in (all-local): Added $(MKFILES).
17781 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
17783 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
17784 (grub_emu_SOURCES): Likewise.
17785 (pkgdata_MODULES): Add `sun.mod'.
17786 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17787 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17789 (pkgdata_MODULES): Add `sun.mod'.
17790 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17791 * include/grub/partition.h (grub_sun_partition_map_init): New
17793 (grub_sun_partition_map_fini): Likewise.
17794 * partmap/sun.c: New file.
17795 * util/grub-emu.c (main): Initialize and de-initialize the sun
17796 partitionmap support.
17798 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
17800 This implements an Emacs-like menu entry editor.
17802 * normal/menu_entry.c: New file.
17804 * util/console.c (grub_ncurses_putchar): Translate some Unicode
17805 characters to ASCII.
17806 (saved_char): New variable.
17807 (grub_ncurses_checkkey): Rewritten completely.
17808 (grub_ncurses_getkey): Likewise.
17809 (grub_ncurses_init): Call raw instead of cbreak.
17811 * normal/menu.c (print_entry): Do not put a space.
17812 (init_page): Renamed to ...
17813 (grub_menu_init_page): ... this. All callers changed.
17814 (edit_menu_entry): Removed.
17815 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
17817 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
17819 * kern/misc.c (grub_vprintf): Call grub_refresh.
17821 * normal/menu.c (DISP_LEFT): Renamed to ...
17822 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
17823 * normal/menu.c (DISP_UP): Renamed to ...
17824 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
17825 * normal/menu.c (DISP_RIGHT): Renamed to ...
17826 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
17827 * normal/menu.c (DISP_DOWN): Renamed to ...
17828 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
17829 * normal/menu.c (DISP_HLINE): Renamed to ...
17830 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
17831 * normal/menu.c (DISP_VLINE): Renamed to ...
17832 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
17833 * normal/menu.c (DISP_UL): Renamed to ...
17834 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
17835 * normal/menu.c (DISP_UR): Renamed to ...
17836 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
17837 * normal/menu.c (DISP_LL): Renamed to ...
17838 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
17839 * normal/menu.c (DISP_LR): Renamed to ...
17840 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
17841 * normal/menu.c (TERM_WIDTH): Renamed to ...
17842 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
17843 * normal/menu.c (TERM_HEIGHT): Renamed to ...
17844 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
17845 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
17846 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
17847 * normal/menu.c (TERM_MARGIN): Renamed to ...
17848 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
17849 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
17850 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
17851 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
17852 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
17853 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
17854 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
17855 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
17856 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
17857 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
17858 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
17859 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
17860 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
17861 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
17862 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
17863 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
17864 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
17865 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
17866 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
17867 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
17868 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
17869 All callers changed.
17871 * include/grub/normal.h: New prototype.
17873 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17874 normal/menu_entry.c.
17875 (normal_mod_SOURCES): Likewise.
17876 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17877 (normal_mod_SOURCES): Likewise.
17879 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
17881 * include/grub/normal.h (grub_halt_init): New prototype.
17882 (grub_halt_fini): Likewise.
17883 (grub_reboot_init): Likewise.
17884 (grub_reboot_fini): Likewise.
17886 * util/grub-emu.c: Include signal.h.
17887 (main_env): New global variable.
17888 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
17890 (grub_machine_fini): New function.
17891 (main): Call grub_halt_init and grub_reboot_init before
17892 grub_main, and grub_reboot_fini and grub_halt_fini after it.
17893 Call setjmp with MAIN_ENV to go back afterwards.
17894 Call grub_machine_fini right before return.
17896 * include/grub/util/misc.h: Include setjmp.h.
17897 (main_env): New prototype.
17899 * include/grub/kernel.h (grub_machine_fini): New prototype.
17900 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
17901 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
17903 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
17904 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
17905 * term/i386/pc/console.c (grub_console_fini): Likewise.
17907 * util/i386/pc/misc.c: New file.
17909 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17910 util/i386/pc/misc.c, commands/i386/pc/halt.c and
17911 commands/i386/pc/reboot.c.
17913 2005-02-14 Guillem Jover <guillem@hadrons.org>
17915 * include/grub/dl.h (grub_dl_check_header): New prototype.
17916 (grub_arch_dl_check_header): Change return type to grub_err_t,
17917 remove size parameter and export function. Update all callers.
17918 * kern/dl.c (grub_dl_check_header): New function.
17919 (grub_dl_load_core): Use `grub_dl_check_header' instead of
17920 `grub_arch_dl_check_header'. Check ELF type. Check if sections
17921 are inside the core.
17922 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
17923 independent ELF header checks.
17924 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17925 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
17926 `grub_dl_check_header' instead of explicit checks. Check for the
17928 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
17929 `grub_dl_check_header' instead of explicit checks. Remove arch
17930 specific ELF header checks.
17932 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
17935 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
17937 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
17938 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
17940 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
17942 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
17943 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
17944 (part_map_iterate): Clear `grub_errno' and return 0 if
17945 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
17946 * partmap/amiga.c (amiga_partition_map_iterate): Return
17947 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
17948 * partmap/apple.c (apple_partition_map_iterate): Likewise.
17950 2005-02-01 Guillem Jover <guillem@hadrons.org>
17952 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
17955 2005-01-31 Marco Gerards <metgerards@student.han.nl>
17957 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
17959 (grub_rescue_cmd_linux): New prototype.
17960 (grub_rescue_cmd_initrd): Likewise.
17961 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
17963 (grub_linux_release_mem): Release the memory for the initrd.
17964 (grub_load_linux): Renamed from this...
17965 (grub_rescue_cmd_linux): ...To this. Changed all callers.
17966 Changed `entry' not to be static. Loop over memory regions to
17967 find another one when the default fails.
17968 (grub_rescue_cmd_initrd): New function.
17969 (grub_linux_init): Remove function.
17970 (grub_linux_fini): Likewise.
17971 (GRUB_MOD_INIT): Register `initrd'.
17972 (GRUB_MOD_FINI): Unregister `initrd'.
17973 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
17975 (grub_linux_normal_fini): Likewise.
17976 (GRUB_MOD_INIT): Register `initrd'.
17977 (GRUB_MOD_FINI): Unregister `initrd'.
17979 2005-01-31 Marco Gerards <metgerards@student.han.nl>
17981 * commands/help.c: New file.
17982 * normal/arg.c (show_help): Renamed to...
17983 (grub_arg_show_help): ... this.
17984 * commands/i386/pc/halt.c: New file.
17985 * commands/i386/pc/reboot.c: Likewise.
17986 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
17987 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
17988 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
17989 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
17991 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17993 (pkgdata_MODULES): Add `help.mod'.
17994 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
17995 * grub/i386/pc/init.h (grub_reboot): New prototype.
17996 (grub_halt): Likewise.
17997 * include/grub/normal.h (grub_arg_show_help): New prototype.
17998 (grub_help_init): Likewise.
17999 (grub_help_fini): Likewise.
18000 * util/grub-emu.c (main): Initialize and deinitialize the help
18003 * normal/cmdline.c (grub_cmdline_get): Doc fix.
18005 * normal/command.c (grub_command_init): Fixed the description of
18006 the `set' and `unset' commands.
18008 2005-01-31 Marco Gerards <metgerards@student.han.nl>
18010 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
18012 * commands/ieee1275/halt.c: New file.
18013 * commands/ieee1275/reboot.c: Likewise.
18014 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
18015 `__attribute__ ((unused))'. Some GCS related fixed.
18016 (grub_suspend_init) [GRUB_UTIL]: Function removed.
18017 (grub_suspend_fini): Likewise.
18018 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
18020 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
18021 (halt_mod_CFLAGS): New variables.
18022 * include/grub/powerpc/ieee1275/ieee1275.h
18023 (grub_ieee1275_interpret): New prototype.
18025 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
18027 * include/grub/misc.h (memmove): New prototype.
18028 (memcpy): Likewise.
18030 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
18032 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
18033 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
18035 2005-01-22 Marco Gerards <metgerards@student.han.nl>
18037 * kern/misc.c (grub_strndup): Function rewritten.
18039 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
18041 * normal/menu.c (TERM_WIDTH): Macro redefined.
18042 (TERM_TOP_BORDER_Y): Likewise.
18043 (draw_border): Replaced while-loop by a for-loop. Make the number
18044 of lines consistent with the number of lines displayed in
18045 print_entries. Added a margin below the rectangle.
18046 (print_entry): Make the entry fit in the rectangle.
18047 (print_entries): Display the scroll arrows next to the right
18050 2005-01-21 Marco Gerards <metgerards@student.han.nl>
18052 * fs/minix.c (grub_minix_find_file): Reserve more space for
18053 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
18054 `grub_strncpy' to copy `path' into it.
18056 2005-01-21 Marco Gerards <metgerards@student.han.nl>
18058 Add the loopback device, a device via which files can be accessed
18061 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
18062 (pkgdata_MODULES): Add loopback.mod.
18063 (loopback_mod_SOURCES): New variable.
18064 (loopback_mod_CFLAGS): Likewise.
18065 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
18067 (pkgdata_MODULES): Add loopback.mod.
18068 (loopback_mod_SOURCES): New variable.
18069 (loopback_mod_CFLAGS): Likewise.
18070 * disk/loopback.c: new file.
18071 * include/grub/normal.h (grub_loop_init): New prototype.
18072 (grub_loop_fini): New prototype.
18073 * util/grub-emu.c (main): Initialize and de-initialize loopback
18075 * include/grub/disk.h (grub_disk_dev_id): Add
18076 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
18078 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
18080 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
18082 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
18083 (suspend_mod_SOURCES): New variable.
18084 (suspend_mod_CFLAGS): Likewise.
18085 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
18087 * commands/ieee1275/suspend.c: New file.
18089 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
18091 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
18092 ((unused))' to `__attribute__ ((used))'.
18093 (GRUB_MOD_FINI): Likewise.
18094 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
18095 * genmk.rb (PModule): Assign space to common symbols when linking
18098 2005-01-20 Marco Gerards <metgerards@student.han.nl>
18100 * include/grub/mm.h (grub_mm_init_region): Change the type of the
18101 `unsigned' arguments to `grub_size_t'.
18102 (grub_malloc): Likewise.
18103 (grub_realloc): Likewise.
18104 (grub_memalign): Likewise.
18105 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
18106 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
18107 * util/misc.c (grub_malloc): Likewise.
18108 (grub_realloc): Likewise.
18109 * kern/mm.c (get_header_from_pointer): Change the casts to
18110 `unsigned' into a cast to `grub_size_t'.
18112 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
18113 point to `currnode' when `currnode' is changed.
18115 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
18116 Schottelius <nico-linux@schottelius.org>.
18118 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
18120 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
18121 (note_path): Remove variable.
18122 (GRUB_IEEE1275_NOTE_NAME): New macro.
18123 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
18124 (grub_ieee1275_note_hdr): New structure.
18125 (grub_ieee1275_note_desc): Likewise.
18126 (grub_ieee1275_note): Likewise.
18127 (load_note): Remove `dir' argument. All callers updated. Remove
18128 `note_img' and `path'. Do not load a file from `note_path'.
18129 Initialize a struct grub_ieee1275_note and write that to `out'.
18130 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
18132 2005-01-05 Marco Gerards <metgerards@student.han.nl>
18134 * util/misc.c (grub_util_read_image): Revert last change. It
18135 called `grub_util_read_at', which seeks from the beginning of the
18138 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
18140 * TODO: Add note about endianness in grub-mkimage.
18141 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
18143 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
18144 (grub_mkimage_SOURCES): New target.
18145 * include/grub/kernel.h (grub_start_addr): Remove variable.
18146 (grub_end_addr): Likewise.
18147 (grub_total_module_size): Likewise.
18148 (grub_kernel_image_size): Likewise.
18149 (GRUB_MODULE_MAGIC): New constant.
18150 (grub_module_info): New structure.
18151 (grub_arch_modules_addr): New prototype.
18152 (grub_get_end_addr): Remove prototype.
18153 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
18154 * include/grub/powerpc/ieee1275/kernel.h: New file.
18155 * include/grub/util/misc.h (grub_util_get_fp_size): New
18157 (grub_util_read_at): Likewise.
18158 (grub_util_write_image_at): Likewise.
18159 * kern/main.c (grub_get_end_addr): Remove function.
18160 (grub_load_modules): Call grub_arch_modules_addr instead of using
18161 grub_end_addr. Look for a grub_module_info struct in memory. Use
18162 the grub_module_info fields instead of calling grub_get_end_addr
18163 as loop conditions. Move grub_add_unused_region code here.
18164 (grub_add_unused_region): Remove function.
18165 * kern/i386/pc/init.c: Include grub/cache.h.
18166 (grub_machine_init): Remove call to grub_get_end_addr. Remove
18167 one call to add_mem_region.
18168 (grub_arch_modules_addr): New function.
18169 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
18170 (grub_total_module_size): Likewise.
18171 Include grub/machine/kernel.h.
18172 (grub_arch_modules_addr): New function.
18173 * util/grub-emu.c (grub_end_addr): Remove variable.
18174 (grub_total_module_size): Likewise.
18175 (grub_arch_modules_addr): New function.
18176 * util/misc.c: Include unistd.h.
18177 (grub_util_get_fp_size): New function.
18178 (grub_util_read_at): Likewise.
18179 (grub_util_write_image_at): Likewise.
18180 (grub_util_read_image): Call grub_util_read_at.
18181 (grub_util_write_image): Call grub_util_write_image_at.
18182 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
18183 additional memory in kernel_img for a struct grub_module_info.
18184 Fill in that grub_module_info.
18185 * util/powerpc/ieee1275/grub-mkimage.c: New file.
18187 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
18189 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
18191 * include/grub/powerpc/ieee1275/ieee1275.h
18192 (grub_ieee1275_milliseconds): New prototype.
18193 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
18195 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
18196 grub_ieee1275_milliseconds.
18198 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
18200 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
18202 (find_options): New function.
18203 (cmain): Call find_options.
18204 * include/grub/powerpc/ieee1275/ieee1275.h
18205 (grub_ieee1275_realmode): New extern variable.
18206 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
18207 grub_map if grub_ieee1275_realmode is false.
18209 2004-12-29 Marco Gerards <metgerards@student.han.nl>
18211 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
18212 lines are inserted and make it work like readline. Reported by
18213 Vincent Pelletier <subdino2004@yahoo.fr>.
18215 2004-12-28 Marco Gerards <metgerards@student.han.nl>
18217 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
18219 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
18220 `kern/powerpc/cache.S'.
18222 2004-12-27 Marco Gerards <metgerards@student.han.nl>
18224 * genmk.rb: Handle the `Program' class in the main loop. Written
18225 by Johan Rydberg <jrydberg@gnu.org>.
18226 (Program): New class.
18227 (programs): New variable.
18228 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
18229 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
18230 instead of "grub/kernel.h". Include <grub/machine/init.h>.
18231 (help_arch): Function removed.
18232 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
18233 `powerpc/libgcc.h' and `loader.h'.
18234 (pkgdata_PROGRAMS): New variable.
18235 (sbin_UTILITIES): Variable removed.
18236 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
18237 (grubof_SOURCES): Variable re-defined so it only includes the
18238 core functionality.
18239 (grubof_CFLAGS): Remove `-DGRUBOF'.
18240 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
18241 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
18242 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
18243 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
18244 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
18245 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
18246 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
18247 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
18248 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
18249 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
18250 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
18251 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
18252 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
18253 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
18254 (pc_mod_CFLAGS): New variables.
18255 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
18256 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
18257 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
18258 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
18260 * include/grub/i386/pc/init.h (grub_os_area_addr)
18261 (rub_os_area_size): ... to here.
18262 * include/grub/powerpc/ieee1275/ieee1275.h
18263 (grub_ieee1275_entry_fn): Export symbol.
18264 * include/grub/powerpc/ieee1275/init.h: New file.
18265 * include/grub/powerpc/libgcc.h: Likewise.
18266 * include/grub/cache.h: Likewise.
18267 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
18268 <hollis@penguinppc.org>.
18269 * kern/dl.c: Include <grub/cache.h>.
18270 (grub_dl_flush_cache): New function.
18271 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
18273 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
18274 (grub_console_init): Removed prototypes.
18275 (grub_machine_init): Don't initialize the modules anymore.
18276 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
18278 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
18279 Macro undef removed.
18280 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
18281 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
18282 relocation `R_PPC_REL32'. Return an error when the relocation is
18284 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
18285 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
18286 * util/misc.c (grub_arch_sync_caches): Likewise.
18288 2004-12-19 Marco Gerards <metgerards@student.han.nl>
18290 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
18291 `symlist.c', add `grubof_symlist.c'.
18292 (symlist.c): Variable removed.
18293 (grubof_HEADERS): Variable added.
18294 (grubof_symlist.c): New target.
18295 (kernel_syms.lst): Use `grubof_HEADERS' instead of
18296 `kernel_img_HEADERS'.
18297 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
18298 * kern/powerpc/dl.c: New file.
18299 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
18301 (grub_arch_dl_relocate_symbols): Likewise.
18302 (grub_register_exported_symbols): Likewise.
18304 2004-12-13 Marco Gerards <metgerards@student.han.nl>
18306 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
18307 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
18308 to fail instead. Reported by Vincent Pelletier
18309 <subdino2004@yahoo.fr>.
18311 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
18312 it is not allocated. Reported by Vincent Pelletier
18313 <subdino2004@yahoo.fr>.
18315 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
18316 output so the output looks better.
18318 2004-12-04 Marco Gerards <metgerards@student.han.nl>
18320 Modulize the partition map support and add support for the amiga
18323 * commands/ls.c: Include <grub/partition.h> instead of
18324 <grub/machine/partition.h>.
18325 * kern/disk.c: Likewise.
18326 * kern/rescue.c: Likewise.
18327 * loader/i386/pc/chainloader.c: Likewise.
18328 * normal/cmdline.c: Likewise.
18329 * kern/powerpc/ieee1275/init.c: Likewise.
18330 (grub_machine_init): Call `grub_pc_partition_map_init',
18331 `grub_amiga_partition_map_init' and
18332 `grub_apple_partition_map_init'.
18333 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
18334 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
18335 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
18336 `partition.h' and `pc_partition.h'.
18337 (grub_setup_SOURCES): Remove
18338 `disk/i386/pc/partition.c'. Add `kern/partition.c',
18339 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18340 (grub_emu_SOURCES): Likewise.
18341 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
18342 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
18343 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
18344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18345 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
18346 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
18347 (grubof_SOURCES): Likewise.
18348 * disk/i386/pc/partition.c: File removed.
18349 * disk/powerpc/ieee1275/partition.c: Likewise.
18350 * include/grub/powerpc/ieee1275/partition.h: Likewise.
18351 * include/grub/i386/pc/partition.h: Likewise.
18352 * kern/partition.c: New file.
18353 * partmap/amiga.c: Likewise.
18354 * partmap/apple.c: Likewise.
18355 * partmap/pc.c: Likewise.
18356 * include/grub/partition.h: Likewise..
18357 * include/grub/pc_partition.h: Likewise.
18358 * util/grub-emu.c: Include <grub/partition.h> instead of
18359 <grub/machine/partition.h>.
18360 (main): Call `grub_pc_partition_map_init',
18361 `grub_amiga_partition_map_init' and
18362 `grub_apple_partition_map_init' and deinitialize afterwards.
18363 * util/i386/pc/biosdisk.c: Include `#include
18364 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18365 `<grub/machine/partition.h>'.
18366 * util/i386/pc/grub-setup.c: Likewise.
18367 * util/i386/pc/biosdisk.c: Likewise.
18368 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
18369 partition information in case of a PC partition.
18370 * util/i386/pc/grub-setup.c: Include `#include
18371 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
18372 `<grub/machine/partition.h>'.
18373 (setup): Only access the PC specific partition information in case
18376 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
18378 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
18379 (grub_longjmp): Likewise.
18380 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
18382 * normal/powerpc/setjmp.S: New file.
18383 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18384 `normal/powerpc/setjmp.S'.
18385 (grubof_CFLAGS): Add `-DGRUBOF'.
18386 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
18387 [GRUB_UTIL && !GRUBOF].
18389 2004-11-16 Marco Gerards <metgerards@student.han.nl>
18391 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
18392 property named `name'. Correctly handle the error returned by
18393 `grub_ieee1275_finddevice' if a device can not be opened.
18395 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
18397 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
18398 `actual' for negativity.
18399 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
18402 2004-11-01 Marco Gerards <metgerards@student.han.nl>
18404 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
18405 (PAGE_OFFSET): New macro.
18406 (CRTC_ADDR_PORT): Likewise.
18407 (CRTC_DATA_PORT): Likewise.
18408 (START_ADDR_HIGH_REGISTER): Likewise.
18409 (START_ADDR_LOW_REGISTER): Likewise.
18410 (GRAPHICS_ADDR_PORT): Likewise.
18411 (GRAPHICS_DATA_PORT): Likewise.
18412 (READ_MAP_REGISTER): Likewise.
18413 (INPUT_STATUS1_REGISTER): Likewise.
18414 (INPUT_STATUS1_VERTR_BIT): Likewise.
18415 (page): New variable.
18416 (wait_vretrace): New function.
18417 (set_read_map): Likewise.
18418 (set_start_address): Likewise.
18419 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
18421 (check_vga_mem): Take the page into account.
18422 (write_char): Likewise.
18423 (write_cursor): Likewise.
18424 (scroll_up): Likewise. Copy the page to the page that is not
18425 shown and switch between both pages.
18426 (grub_vga_putchar): Fix off by one error.
18427 (grub_vga_cls): Wait for the vertical retrace. Take the page into
18430 2004-11-01 Marco Gerards <metgerards@student.han.nl>
18432 Add support for iso9660 (including rockridge).
18434 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18435 (iso9660_mod_SOURCES): New variable.
18436 (iso9660_mod_CFLAGS): Likewise.
18437 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
18438 * include/grub/fs.h (grub_iso9660_init): New prototype.
18439 * util/grub-emu.c (main): Call `grub_iso9660_init'.
18440 * fs/iso9660.c: New file.
18442 * include/grub/misc.h (grub_strncat): New prototype.
18443 * kern/misc.c (grub_strncat): New function.
18445 * fs/hfs.c (grub_hfs_mount): Translate the error
18446 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
18447 * fs/jfs.c (grub_jfs_mount): Likewise.
18448 * fs/ufs.c (grub_ufs_mount): Likewise.
18450 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
18452 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
18453 which initialized BAT registers.
18454 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
18455 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18457 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
18458 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
18460 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
18461 (grub_mapclaim): Likewise.
18462 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
18463 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
18466 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
18468 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
18469 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
18470 -ffreestanding and -msoft-float.
18472 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
18474 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
18475 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
18476 set in grub_ieee1275_flags.
18478 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
18480 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
18482 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
18483 grub_console_init first.
18484 Change the memory range used for grub_ieee1275_claim and
18485 grub_mm_init_region.
18486 Print an error message if the claim fails.
18487 Include <grub/misc.h>.
18489 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
18491 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
18492 Call grub_children_iterate for device nodes of type `scsi',
18494 (grub_ofdisk_open): Remove manual device alias resolution.
18495 Fix memory leak when device cannot be opened.
18496 * include/grub/powerpc/ieee1275/ieee1275.h
18497 (grub_children_iterate): New prototype.
18498 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
18500 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18501 Return -1 if args.size was -1.
18503 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
18505 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
18506 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
18507 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
18508 Open Firmware's memory for it; claim memory from _start to _end.
18509 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
18510 (_end): New extern.
18511 (_start): Zero BSS from __bss_start to _end.
18512 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
18514 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
18516 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
18518 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
18519 -1 if args.base was -1.
18521 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
18523 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
18524 escape sequence instead of a literal ^L. Also call
18525 grub_ofconsole_gotoxy.
18527 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
18529 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
18530 void * arguments to grub_addr_t. All callers updated. Also make
18531 the `result' argument optional.
18532 (grub_ieee1275_release): change void * arguments to grub_addr_t.
18533 All callers updated.
18535 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
18537 * commands/ls.c (grub_ls_list_files): Use the string following the
18538 initial ')', if present, as the filesystem path.
18539 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
18541 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
18543 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
18545 Make the source code of the menu interface more readable.
18547 * normal/menu.c: Include grub/mm.h.
18548 (TERM_WIDTH): New macro.
18549 (TERM_HEIGHT): Likewise.
18550 (TERM_INFO_HEIGHT): Likewise.
18551 (TERM_MARGIN): Likewise.
18552 (TERM_SCROLL_WIDTH): Likewise.
18553 (TERM_TOP_BORDER_Y): Likewise.
18554 (TERM_LEFT_BORDER_X): Likewise.
18555 (TERM_BORDER_WIDTH): Likewise.
18556 (TERM_MESSAGE_HEIGHT): Likewise.
18557 (TERM_BORDER_HEIGHT): Likewise.
18558 (TERM_NUM_ENTRIES): Likewise.
18559 (TERM_FIRST_ENTRY_Y): Likewise.
18560 (TERM_ENTRY_WIDTH): Likewise.
18561 (TERM_CURSOR_X): Likewise.
18562 (draw_border): Use macros instead of magic numbers.
18563 (print_entry): Likewise.
18564 (print_entries): Likewise.
18565 (run_menu): Likewise. Also, handle the key 'e'.
18566 (run_menu_entry): Ignore empty command lines.
18567 (print_message): Added a new argument EDIT. If EDIT is true,
18568 print a different message.
18569 (init_page): Likewise.
18570 (edit_menu_entry): New function. Not implemented yet.
18572 2004-09-17 Marco Gerards <metgerards@student.han.nl>
18574 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
18575 can be loaded from normal mode.
18577 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
18579 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
18580 (multiboot_mod_CFLAGS): New variables.
18581 * loader/i386/pc/linux_normal.c: New file.
18582 * loader/i386/pc/multiboot_normal.c: Likewise.
18584 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
18585 attribute `unused'.
18587 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
18588 `fdiro' to read the mode information from instead of `diro'.
18590 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
18591 looking up a symlink.
18593 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
18595 * normal/command.c (grub_command_execute): Don't parse the
18596 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
18597 flags of the command.
18599 * normal/menu.c (grub_menu_run): Fix typo.
18601 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
18603 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
18605 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
18606 `y + 1' instead of `y - 1'.
18608 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
18610 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
18612 From Hollis Blanchard <hollis@penguinppc.org>:
18613 * kern/misc.c (memmove): New alias for grub_memmove.
18614 (memcmp): New alias for grub_memcmp.
18615 (memset): New alias for grub_memset.
18616 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
18617 Change "int handle" to "grub_ieee1275_phandle_t handle".
18618 * include/grub/powerpc/ieee1275/ieee1275.h
18619 (grub_ieee1275_get_property): Likewise.
18621 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
18623 Added normal mode command `chainloader' as module chain.mod, which
18624 depends on normal.mod and _chain.mod.
18626 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
18627 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
18628 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
18630 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
18631 but arguments parsing moved to ...
18632 (grub_chainloader_cmd): ... here. New function.
18633 * include/grub/i386/pc/chainloader.h: New file.
18634 * loader/i386/pc/chainloader_normal.c: Likewise.
18636 2004-09-11 Marco Gerards <metgerards@student.han.nl>
18638 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
18639 (grub_mkimage_LDFLAGS): Likewise.
18640 (grub_emu_SOURCES): Likewise.
18641 (kernel_img_HEADERS): Added fshelp.h.
18642 * fs/ext2.c: Include <grub/fshelp.h>.
18643 (FILETYPE_REG): New macro.
18644 (FILETYPE_INO_REG): Likewise.
18645 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
18647 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
18649 (grub_fshelp_node): New struct.
18650 (grub_ext2_data): Added member `diropen'. Changed member `inode'
18652 (grub_ext2_get_file_block): Removed function.
18653 (grub_ext2_read_block): New function.
18654 (grub_ext2_read_file): Replaced parameter `data' by `node'.
18655 This function was written.
18656 (grub_ext2_mount): Read the root inode. Create a diropen struct.
18657 (grub_ext2_find_file): Removed function.
18658 (grub_ext2_read_symlink): New function.
18659 (grub_ext2_iterate_dir): Likewise.
18660 (grub_ext2_open): Rewritten.
18661 (grub_ext2_dir): Rewritten.
18662 * include/grub/fshelp.h: New file.
18663 * fs/fshelp.c: Likewise.
18665 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
18667 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
18668 (print_message): Add a missing newline.
18669 (run_menu): Added timeout support.
18670 (run_menu_entry): New local function.
18671 (grub_menu_run): Added support for booting.
18673 * kern/loader.c (grub_loader_is_loaded): New function.
18675 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
18676 (grub_get_rtc): Exported.
18678 * include/grub/i386/pc/time.h: Include grub/symbol.h.
18679 (grub_get_rtc): Exported.
18681 * include/grub/normal.h (struct grub_command_list): Remove
18682 constant from the member `command'.
18684 * include/grub/loader.h (grub_loader_is_loaded): Declared.
18686 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
18688 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
18690 2004-08-28 Marco Gerards <metgerards@student.han.nl>
18692 Add support for the JFS filesystem.
18694 * fs/jfs.c: New file.
18695 * include/grub/fs.h (grub_jfs_init): New prototype.
18696 (grub_jfs_fini): New prototype.
18697 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
18698 (grub_emu_SOURCES): Likewise.
18699 (pkgdata_MODULES): Add jfs.mod.
18700 (jfs_mod_SOURCES): New variable.
18701 (jfs_mod_CFLAGS): Likewise.
18702 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
18703 (grubof_SOURCES): Likewise.
18704 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
18706 * fs/fat.c (grub_fat_find_dir): Convert the filename little
18707 endian to the host endian.
18708 (grub_fat_utf16_to_utf8): Move function from there...
18709 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
18710 the endianness of the source string anymore.
18711 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
18713 2004-08-24 Marco Gerards <metgerards@student.han.nl>
18715 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
18716 (grub_boot_fini) [GRUB_UTIL]: Likewise.
18717 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
18718 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
18720 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
18721 (grub_hfs_iterate_dir): Make the function static. Add prototypes
18722 for `node_found' and `it_dir'.
18723 (grub_hfs_dir): Add prototype for `dir_hook'.
18725 * fs/minix.c (grub_minix_get_file_block): Add prototype for
18726 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
18727 and `indir32' to silence a gcc warning.
18729 * include/grub/fs.h (grub_hfs_init): New prototype.
18730 (grub_hfs_fini): Likewise.
18733 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
18735 Each disk device has its own id now. This is useful to make use
18736 of multiple disk devices.
18738 * include/grub/disk.h (grub_disk_dev_id): New enum.
18739 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
18740 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
18742 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
18743 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18745 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
18746 GRUB_DISK_DEVICE_OFDISK_ID as an id.
18748 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
18749 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18751 * include/grub/disk.h (struct grub_disk_dev): Added a new member
18752 "id" which is used by the cache manager.
18754 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
18757 2004-08-18 Marco Gerards <metgerards@student.han.nl>
18759 * fs/hfs.c: New file.
18760 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
18761 (grub_emu_SOURCES): Likewise.
18762 (pkgdata_MODULES): Add hfs.mod.
18763 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
18764 (grubof_SOURCES): Likewise.
18765 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
18767 * include/grub/misc.h (grub_strncasecmp): Add prototype.
18768 * kern/misc.c (grub_strncasecmp): Add function.
18770 2004-08-14 Marco Gerards <metgerards@student.han.nl>
18772 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
18775 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
18776 (grub_ext2_dir): In case the directory entry type is unknown, read
18779 2004-08-02 Peter Bruin <pjbruin@dds.nl>
18781 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
18782 grub_load_linux instead of grub_rescue_cmd_linux as second
18783 argument of grub_rescue_register_command.
18785 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
18787 2004-07-27 Marco Gerards <metgerards@student.han.nl>
18789 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
18791 * commands/boot.c: Remove the check for `GRUB_UTIL'.
18792 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18793 `loader/powerpc/ieee1275/linux.c',
18794 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
18795 * include/grub/powerpc/ieee1275/ieee1275.h
18796 (grub_ieee1275_release): New prototype.
18797 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
18798 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
18799 normal, boot, linux and linux_normal.
18800 * loader/powerpc/ieee1275/linux.c: New file.
18801 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
18803 2004-07-12 Marco Gerards <metgerards@student.han.nl>
18805 * normal/arg.c (grub_arg_parse): Correct error handling after
18806 reallocating the argumentlist (check if `argl' is not null instead
18807 of checking if `args' is not null).
18808 * kern/mm.c (grub_realloc): Return the same pointer when using the
18809 same region, instead of returning the header address.
18811 2004-07-11 Marco Gerards <metgerards@student.han.nl>
18813 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
18814 one block instead of two when looking for the initial partition.
18815 (grub_partition_probe): Initialize the local variable `p' with 0.
18816 Use base 10 for the grub_strtoul call.
18817 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
18818 need for one local variable.
18819 (grub_strtoul): Don't add the new value to `num', instead of that
18822 2004-07-11 Marco Gerards <metgerards@student.han.nl>
18824 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
18825 (pxeboot_img_SOURCES): New variable.
18826 (pxeboot_img_ASFLAGS): Likewise.
18827 (pxeboot_img_LDFLAGS): Likewise.
18828 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
18829 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
18830 <lode_leroy@hotmail.com>.
18832 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
18834 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
18835 there was no input.
18837 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
18839 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
18840 the history buffer logic.
18842 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
18844 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
18845 (FILETYPE_INO_SYMLINK): New macros.
18846 (grub_ext2_find_file): Check if the node is a directory using the
18847 inode stat information instead of using the filetype in the
18848 dirent. Exclude the first character of an absolute symlink.
18849 (grub_ext2_dir): Mask out the filetype part of the mode member of
18852 2004-05-24 Marco Gerards <metgerards@student.han.nl>
18854 Add support for UFS version 1 and 2. Add support for the minix
18855 filesystem version 1 and 2, both the variants with 14 and 30 long
18858 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
18860 (grub_emu_SOURCES): Likewise.
18861 (pkgdata_MODULES): Add ufs.mod and minix.mod.
18862 (ufs_mod_SOURCES): New variable.
18863 (ufs_mod_CFLAGS): Likewise.
18864 (minix_mod_SOURCES): Likewise.
18865 (minix_mod_CFLAGS): Likewise.
18866 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
18868 (grubof_SOURCES): Likewise.
18869 * fs/ufs.c: New file.
18870 * fs/minix.c: New file.
18871 * include/grub/fs.h (grub_ufs_init): New prototype.
18872 (grub_ufs_fini): Likewise.
18873 (grub_minix_init): Likewise.
18874 (grub_minix_fini): Likewise.
18875 * util/grub-emu.c (main): Initialize and deinitialize UFS and
18878 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
18880 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
18881 commands/ls.c, commands/terminal.c, commands/boot.c,
18882 commands/cmp.c and commands/cat.c.
18883 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
18885 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
18888 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
18890 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
18891 and grub_, respectively. Because the conversion is trivial and
18892 mechanical, I omit the details here. Please refer to the CVS
18893 if you need more information.
18895 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
18897 * include/pupa: Renamed to ...
18898 * include/grub: ... this.
18899 * util/i386/pc/pupa-mkimage.c: Renamed to ...
18900 * util/i386/pc/grub-mkimage.c: ... this.
18901 * util/i386/pc/pupa-setup.c: Renamed to ...
18902 * util/i386/pc/grub-setup.c: ... this.
18903 * util/pupa-emu.c: Renamed to ...
18904 * util/grub-emu.c: ... this.
18906 2004-03-29 Marco Gerards <metgerards@student.han.nl>
18908 Add support for the newworld apple macintosh (PPC). This has been
18909 tested on the powerbook 2000 only. It only adds support for
18910 generic ieee1275 functions, console and disk support. This should
18911 be easy to port to other architectures with support for Open
18914 * configure.ac: Accept the powerpc as host_cpu. In the case of
18915 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
18916 specific tests are only executed while building for the i386.
18917 Inverse test for crosscompile.
18918 * genmk.rb (Utility): Allow assembler files.
18919 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
18920 * conf/powerpc-ieee1275.rmk: New file.
18921 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
18922 * disk/powerpc/ieee1275/partition.c: Likewise.
18923 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
18924 * include/pupa/powerpc/ieee1275/console.h: Likewise.
18925 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
18926 * include/pupa/powerpc/ieee1275/time.h: Likewise.
18927 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
18928 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
18929 * include/pupa/powerpc/ieee1275/loader.h
18930 * include/pupa/powerpc/setjmp.h: Likewise.
18931 * include/pupa/powerpc/types.h: Likewise.
18932 * kern/powerpc/ieee1275/init.c: Likewise.
18933 * kern/powerpc/ieee1275/openfw.c: Likewise.
18934 * term/powerpc/ieee1275/ofconsole.c: Likewise.
18936 These files were written by Johan Rydberg
18937 (jrydberg@night.trouble.net) and I only modified them slightly.
18939 * boot/powerpc/ieee1275/cmain.c: New file.
18940 * boot/powerpc/ieee1275/crt0.S: Likewise.
18941 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
18942 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
18944 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
18946 * Makefile.in: Update copyright.
18947 * genmodsrc.sh: Likewise.
18948 * gensymlist.sh: Likewise.
18949 * term/i386/pc/vga.c: Indent correctly.
18951 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
18952 bugreporting address.
18953 * util/i386/pc/pupa-setup.c (usage): Likewise,
18954 (main): Call pupa_ext2_init and pupa_ext2_fini.
18956 * fs/fat.c (log2): Renamed to ...
18957 (fat_log2): ... this.
18958 All callers changed.
18959 * kern/misc.c (memcpy): Alias to pupa_memmove.
18960 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
18962 * util/console.c (pupa_ncurses_fini): Return 0.
18964 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
18965 Move fail label here.
18966 [__GNU__]: Don't warn when using stat.
18967 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
18968 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
18969 long int. Use strtol instead of strtoul.
18971 2004-03-14 Marco Gerards <metgerards@student.han.nl>
18973 * commands/boot.c: New file.
18974 * commands/cat.c: Likewise.
18975 * commands/cmp.c: Likewise.
18976 * commands/ls.c: Likewise.
18977 * commands/terminal.c: Likewise.
18978 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
18979 (pupa_register_command): Changed interface to match the new
18981 (pupa_command_execute): Changed (almost rewritten) so it uses
18982 pupa_split_command. Added support for setting variables using the
18984 (rescue_command): Changed to work with the new argument parser.
18985 (terminal_command): Moved from here to commands/terminal.c.
18986 (set_command): New function.
18987 (unset_command): New function.
18988 (insmod_command): New function.
18989 (rmmod_command): New function.
18990 (lsmod_command): New function.
18991 (pupa_command_init): Don't initialize the command terminal
18992 anymore. Initialize the commands set, unset, insmod, rmmod and
18994 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
18995 (kernel_img_HEADERS): Add arg.h and env.h.
18996 (pupa_mkimage_LDFLAGS): Add kern/env.c.
18997 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
18998 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
19000 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
19002 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
19003 (boot_mod_SOURCES): New variable.
19004 (terminal_mod_SOURCES): Likewise.
19005 (ls_mod_SOURCES): Likewise.
19006 (cmp_mod_SOURCES): Likewise.
19007 (cat_mod_SOURCES): Likewise.
19009 * normal/arg.c: New file.
19010 * kern/env.c: Likewise.
19011 * include/pupa/arg.h: Likewise.
19012 * include/pupa/env.h: Likewise.
19013 * font/manager.c (font_command): Changed to match argument parsing
19015 (PUPA_MOD_INIT): Likewise.
19016 * hello/hello.c (pupa_cmd_hello): Likewise.
19017 (PUPA_MOD_INIT): Likewise.
19018 * include/pupa/disk.h: Include <pupa/device.h>.
19019 (pupa_print_partinfo): New prototype.
19020 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
19021 (pupa_dl_get_prefix): Likewise.
19022 * include/pupa/misc.h: Include <pupa/err.h>.
19023 (pupa_isgraph): New prototype.
19024 (pupa_isdigit): Likewise.
19025 (pupa_split_cmdline): Likewise.
19026 * include/pupa/normal.h: Include <pupa/arg.h>.
19027 (pupa_command): Changed the prototype of the member `func' to
19028 match the argument parsing interface. Added member `options'.
19029 (pupa_register_command): Updated to match function.
19030 (pupa_arg_parse): New prototype.
19031 (pupa_hello_init) [PUPA_UTIL]: New prototype.
19032 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
19033 (pupa_ls_init) [PUPA_UTIL]: Likewise.
19034 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
19035 (pupa_cat_init) [PUPA_UTIL]: Likewise.
19036 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
19037 (pupa_boot_init) [PUPA_UTIL]: Likewise.
19038 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
19039 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
19040 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
19041 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
19042 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
19043 * kern/disk.c: Include <pupa/file.h>.
19044 (pupa_print_partinfo): New function.
19045 * kern/dl.c: Include <pupa/env.h>.
19046 (pupa_dl_dir): Variable removed.
19047 (pupa_dl_load): Use the environment variable `prefix' instead of
19048 the variable pupa_dl_dir.
19049 (pupa_dl_set_prefix): Function removed.
19050 (pupa_dl_get_prefix): Likewise.
19051 * kern/i386/pc/init.c: Include <pupa/env.h>.
19052 (pupa_machine_init): Use the environment variable `prefix' instead of
19053 using pupa_dl_set_prefix to set the prefix.
19054 * kern/main.c: Include <pupa/env.h>.
19055 (pupa_set_root_dev): Use the environment variable `prefix' instead of
19056 using pupa_dl_get_prefix to get the prefix.
19057 * kern/misc.c: Include <pupa/env.h>.
19058 (pupa_isdigit): New function.
19059 (pupa_isgraph): Likewise.
19060 (pupa_ftoa): Likewise.
19061 (pupa_vsprintf): Added support for printing values of the type
19062 `double'. Make it possible to format variable output when using
19063 formatting like `%1.2%f'.
19064 (pupa_split_cmdline): New function.
19065 * kern/rescue.c: Include <pupa/env.h>.
19066 (next_word): Removed function.
19067 (pupa_rescue_cmd_prefix): Likewise.
19068 (pupa_rescue_cmd_set): New function.
19069 (pupa_rescue_cmd_unset): New function.
19070 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
19071 split the command line instead of splitting it here. Added
19072 support for setting variables using the syntax `foo=bar'. Don't
19073 initialize the prefix command anymore. Initialized the set and
19075 * normal/cmdline.c: Include <pupa/env.h>.
19076 (pupa_tab_complete): Added prototypes for print_simple_completion,
19077 print_partition_completion, add_completion, iterate_commands,
19078 iterate_dev, iterate_part and iterate_dir. Moved code to print
19079 partition information from here to kern/disk.c.
19080 (pupa_cmdline_run): Don't check if the function exists anymore.
19081 * normal/main.c: Include <pupa/env.h>.
19082 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
19083 instead of using pupa_dl_get_prefix to get the prefix.
19084 * term/i386/pc/vga.c: Include <pupa/arg.h>.
19085 (check_vga_mem): Cast pointers to `void *' to silence a gcc
19087 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
19088 (pupa_vga_setcolor): Declare unused variables with `__attribute__
19089 ((unused))' to silence a gcc warning.
19090 (pupa_vga_setcolor): Likewise.
19091 (debug_command): Changed to match argument parsing
19093 * util/pupa-emu.c: Include <pupa/env.h>.
19094 (options): Added 0's for unused fields to silence a gcc warning.
19096 (main): Use the environment variable `prefix' instead of using
19097 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
19098 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
19101 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
19102 * util/misc.c: Include <malloc.h>.
19103 (pupa_malloc): Rewritten so errors are correctly reported.
19104 (pupa_realloc): Likewise.
19105 (pupa_memalign): Likewise.
19106 (pupa_mm_init_region): Declare unused variables with
19107 `__attribute__ ((unused))' to silence a gcc warning.
19108 * normal/i386/setjmp.S: Remove tab at the end of the file to
19109 silence a gcc warning.
19110 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
19111 variables with `__attribute__ ((unused))' to silence a gcc
19113 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
19114 local variable i unsigned to silence a gcc warning.
19116 * kern/term.c: Include <pupa/misc.h>.
19117 (pupa_more_lines): New variable.
19118 (pupa_more): Likewise.
19119 (pupa_putcode): When the pager is active pause at the end of every
19121 (pupa_set_more): New function.
19122 * include/pupa/term.h (pupa_set_more): New prototype.
19125 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
19127 Now this project is GRUB 2 rather than PUPA. The location of
19128 the CVS repository was moved to GRUB's.
19130 * configure.ac: Use bug-grub as the reporting address.
19131 Use GRUB instead of PUPA.
19132 Change the version number to 1.90.
19134 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
19136 * genkernsyms.sh: Updated copyright information.
19137 * genmk.rb: Likewise.
19138 * genmodsrc.sh: Likewise.
19139 * gensymlist.sh: Likewise.
19140 * boot/i386/pc/boot.S: Likewise.
19141 * boot/i386/pc/diskboot.S: Likewise.
19142 * disk/i386/pc/biosdisk.c: Likewise.
19143 * disk/i386/pc/partition.c: Likewise.
19144 * font/manager.c: Likewise.
19145 * fs/ext2.c: Likewise.
19146 * fs/fat.c: Likewise.
19147 * include/pupa/boot.h: Likewise.
19148 * include/pupa/device.h: Likewise.
19149 * include/pupa/disk.h: Likewise.
19150 * include/pupa/dl.h: Likewise.
19151 * include/pupa/elf.h: Likewise.
19152 * include/pupa/err.h: Likewise.
19153 * include/pupa/file.h: Likewise.
19154 * include/pupa/font.h: Likewise.
19155 * include/pupa/fs.h: Likewise.
19156 * include/pupa/kernel.h: Likewise.
19157 * include/pupa/loader.h: Likewise.
19158 * include/pupa/misc.h: Likewise.
19159 * include/pupa/mm.h: Likewise.
19160 * include/pupa/net.h: Likewise.
19161 * include/pupa/normal.h: Likewise.
19162 * include/pupa/rescue.h: Likewise.
19163 * include/pupa/setjmp.h: Likewise.
19164 * include/pupa/symbol.h: Likewise.
19165 * include/pupa/term.h: Likewise.
19166 * include/pupa/types.h: Likewise.
19167 * include/pupa/i386/setjmp.h: Likewise.
19168 * include/pupa/i386/types.h: Likewise.
19169 * include/pupa/i386/pc/biosdisk.h: Likewise.
19170 * include/pupa/i386/pc/boot.h: Likewise.
19171 * include/pupa/i386/pc/console.h: Likewise.
19172 * include/pupa/i386/pc/init.h: Likewise.
19173 * include/pupa/i386/pc/kernel.h: Likewise.
19174 * include/pupa/i386/pc/linux.h: Likewise.
19175 * include/pupa/i386/pc/loader.h: Likewise.
19176 * include/pupa/i386/pc/memory.h: Likewise.
19177 * include/pupa/i386/pc/multiboot.h: Likewise.
19178 * include/pupa/i386/pc/partition.h: Likewise.
19179 * include/pupa/i386/pc/time.h: Likewise.
19180 * include/pupa/i386/pc/vga.h: Likewise.
19181 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
19182 * include/pupa/util/getroot.h: Likewise.
19183 * include/pupa/util/misc.h: Likewise.
19184 * include/pupa/util/resolve.h: Likewise.
19185 * kern/device.c: Likewise.
19186 * kern/disk.c: Likewise.
19187 * kern/dl.c: Likewise.
19188 * kern/err.c: Likewise.
19189 * kern/file.c: Likewise.
19190 * kern/fs.c: Likewise.
19191 * kern/loader.c: Likewise.
19192 * kern/main.c: Likewise.
19193 * kern/misc.c: Likewise.
19194 * kern/mm.c: Likewise.
19195 * kern/rescue.c: Likewise.
19196 * kern/term.c: Likewise.
19197 * kern/i386/dl.c: Likewise.
19198 * kern/i386/pc/init.c: Likewise.
19199 * kern/i386/pc/lzo1x.S: Likewise.
19200 * kern/i386/pc/startup.S: Likewise.
19201 * loader/i386/pc/chainloader.c: Likewise.
19202 * loader/i386/pc/linux.c: Likewise.
19203 * loader/i386/pc/multiboot.c: Likewise.
19204 * normal/cmdline.c: Likewise.
19205 * normal/command.c: Likewise.
19206 * normal/main.c: Likewise.
19207 * normal/menu.c: Likewise.
19208 * normal/i386/setjmp.S: Likewise.
19209 * term/i386/pc/console.c: Likewise.
19210 * term/i386/pc/vga.c: Likewise.
19211 * util/console.c: Likewise.
19212 * util/genmoddep.c: Likewise.
19213 * util/misc.c: Likewise.
19214 * util/pupa-emu.c: Likewise.
19215 * util/resolve.c: Likewise.
19216 * util/unifont2pff.rb: Likewise.
19217 * util/i386/pc/biosdisk.c: Likewise.
19218 * util/i386/pc/getroot.c: Likewise.
19219 * util/i386/pc/pupa-mkimage.c: Likewise.
19220 * util/i386/pc/pupa-setup.c: Likewise.
19222 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
19224 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
19225 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
19226 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
19227 reading and reset it after reading.
19228 (pupa_ext2_close): Return PUPA_ERR_NONE.
19230 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
19232 (struct linux_kernel_header): Add kernel_version and
19234 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
19235 pupa_file_read succeeds.
19236 (pupa_rescue_cmd_initrd): Implement.
19238 2003-12-03 Marco Gerards <metgerards@student.han.nl>
19240 * fs/ext2.c (pupa_ext2_label): New function.
19241 (pupa_ext2_fs): Added label.
19242 * fs/fat.c (pupa_fat_label): New function.
19243 (pupa_fat_fs): Added label.
19244 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
19246 * kern/misc.c (pupa_strndup): New function.
19247 * include/pupa/misc.h (pupa_strndup): New prototype.
19249 * include/pupa/normal.h: Include <pupa/err.h>.
19250 (pupa_set_history): New prototype.
19251 (pupa_iterate_commands): New prototype.
19252 * normal/cmdline.c: Include <pupa/machine/partition.h>,
19253 <pupa/disk.h>, <pupa/file.h>.
19254 (hist_size): New variable.
19255 (hist_lines): Likewise.
19256 (hist_end): Likewise.
19257 (hist_used): Likewise.
19258 (pupa_set_history): New function.
19259 (pupa_history_get): Likewise.
19260 (pupa_history_add): Likewise.
19261 (pupa_history_replace): Likewise.
19262 (pupa_tab_complete): Likewise.
19263 (pupa_cmdline_run): Added tab completion and history buffer. Tab
19264 completion shows partitionnames while completing partitions, this
19265 feature was suggested by Jeff Bailey.
19266 * normal/command.c (pupa_iterate_commands): New function.
19267 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
19268 (pupa_normal_init): Initialize history buffer.
19269 (PUPA_MOD_INIT): Likewise.
19270 (pupa_normal_fini): Free the history buffer.
19271 (PUPA_MOD_FINI): Likewise.
19273 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
19276 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
19277 * configure.ac [i386]: Check for regparam bug.
19278 (NESTED_FUNC_ATTR) [! i386]: Defined.
19280 2003-11-17 Marco Gerards <metgerards@student.han.nl>
19282 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
19283 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
19284 (pupa_emu_SOURCES): New variable.
19285 (pupa_emu_LDFLAGS): Likewise.
19286 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
19287 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
19288 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
19289 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19290 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
19291 (pupa_jmp_buf): New typedef.
19292 (pupa_setjmp) [PUPA_UTIL]: New macro.
19293 (pupa_longjmp) [PUPA_UTIL]: Likewise.
19294 * include/pupa/term.h (struct pupa_term): New member `refresh'.
19295 (pupa_refresh): New prototype.
19296 * include/pupa/util/getroot.h: New file.
19297 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
19299 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
19300 (pupa_rescue_cmd_cat): Likewise.
19301 (pupa_rescue_cmd_ls): Likewise.
19302 (pupa_rescue_cmd_testload): Likewise.
19303 (pupa_rescue_cmd_lsmod): Likewise.
19304 * normal/cmdline.c (pupa_cmdline_get): Likewise.
19305 * normal/menu.c (run_menu): Likewise.
19306 * kern/term.c (pupa_cls): Likewise.
19307 (pupa_refresh): New function.
19308 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
19309 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
19310 * util/console.c: New file.
19312 * util/i386/pc/getroot.c: New file.
19313 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
19314 (pupa_putchar): New function.
19315 (pupa_refresh): Likewise.
19316 (xgetcwd): Function moved to ...
19317 (strip_extra_slashes): Likewise.
19318 (get_prefix): Likewise.
19319 * util/i386/pc/getroot.c: ... here.
19320 (find_root_device): Function moved and renamed to...
19321 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
19322 Changed all callers.
19323 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
19325 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
19326 Changed all callers.
19327 * util/misc.c (pupa_memalign): New function.
19328 (pupa_mm_init_region): Likewise.
19329 (pupa_register_exported_symbols): Likewise.
19330 (pupa_putchar): Function removed.
19331 * util/pupa-emu.c: New file.
19333 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
19335 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
19336 (_multiboot_mod_SOURCES): New variable.
19337 (_multiboot_mod_CFLAGS): Likewise.
19338 * loader/i386/pc/multiboot.c: New file.
19339 * include/pupa/i386/pc/multiboot.h: Likewise.
19340 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
19341 (pupa_multiboot_real_boot): New function.
19342 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
19343 (pupa_multiboot_real_boot): New prototype.
19344 (pupa_rescue_cmd_multiboot): Likewise
19345 (pupa_rescue_cmd_module): Likewise.
19347 * kern/loader.c (pupa_loader_set): Continue when
19348 pupa_loader_unload_func() fails.
19349 (pupa_loader_unset): New function.
19350 * include/pupa/loader.h (pupa_loader_unset): New prototype.
19352 * kern/misc.c (pupa_stpcpy): New function.
19353 * include/pupa/misc.h (pupa_stpcpy): New prototype.
19355 2003-11-12 Marco Gerards <metgerards@student.han.nl>
19357 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
19358 for available extensions.
19360 * include/pupa/i386/pc/time.h: New file.
19361 * kern/disk.c: Include <pupa/machine/time.h>.
19362 (PUPA_CACHE_TIMEOUT): New macro.
19363 (pupa_last_time): New variable.
19364 (pupa_disk_open): Flush the cache when there was a timeout.
19365 (pupa_disk_close): Reset the timer.
19366 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
19368 * util/misc.c: Include <sys/times.h>
19369 (pupa_get_rtc): New function.
19371 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
19373 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
19375 (pupa_ext2_get_file_block): Use blocks member.
19377 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
19378 first block. Return -1 instead of pupa_errno on error.
19380 2003-10-27 Marco Gerards <metgerards@student.han.nl>
19382 * README: In the pupa-mkimage example use _chain instead of chain
19383 and ext2 instead of fat.
19384 * TODO: Replace ext2fs with jfs as an example. Add an item for
19385 adding journal playback for ext2fs.
19386 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
19387 (pkgdata_MODULES): Added ext2.mod.
19388 (ext2_mod_SOURCES): New variable.
19389 (ext2_mod_CFLAGS): Likewise.
19390 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
19391 * include/pupa/misc.h (pupa_strncpy): New prototype.
19392 (pupa_strcat): Likewise.
19393 (pupa_strncmp): Likewise.
19394 * kern/misc.c (pupa_strcat): Enable function.
19395 (pupa_strncpy): New function.
19396 (pupa_strncmp): Likewise.
19397 * fs/ext2.c: New file.
19399 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
19400 when the read failed before retrying.
19401 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
19402 (_FILE_OFFSET_BITS): Likewise.
19403 * configure.ac: Added AC_SYS_LARGEFILE.
19405 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
19407 * genmk.rb (PModule#rule): Make sure to get only symbol names
19408 from the output of nm.
19409 Reported by Robert Millan <zeratul2@wanadoo.es>.
19411 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
19413 I forgot to check in these changes for a long time. This adds
19414 incomplete support for VGA console, and this is still very
19415 buggy. Also, a lot of consideration is required for I18N,
19416 UNICODE, and VGA font issues. Therefore, assume that this is
19417 such that "better than nothing".
19419 * font/manager.c: New file.
19420 * include/pupa/font.h: Likewise.
19421 * include/pupa/i386/pc/vga.h: Likewise.
19422 * term/i386/pc/vga.c: Likewise.
19423 * util/unifont2pff.rb: Likewise.
19425 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
19426 (pkgdata_MODULES): Added vga.mod and font.mod.
19427 (vga_mod_SOURCES): New variables.
19428 (vga_mod_CFLAGS): Likewise.
19429 (font_mod_SOURCES): Likewise.
19430 (font_mod_CFLAGS): Likewise.
19432 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
19434 * include/pupa/term.h: Include pupa/err.h.
19435 (struct pupa_term): Added init and fini.
19436 Changed the argument of putchar to pupa_uint32_t.
19438 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
19439 (pupa_console_real_putchar): New prototype.
19440 (pupa_console_putchar): Removed.
19441 (pupa_console_checkkey): Exported.
19442 (pupa_console_getkey): Likewise.
19444 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
19447 * kern/term.c (pupa_term_set_current): Rewritten.
19448 (pupa_putchar): Likewise.
19449 (pupa_putcode): New function.
19451 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
19452 (pupa_console_real_putchar): ... this.
19453 (pupa_vga_set_mode): New function.
19454 (pupa_vga_get_font): Likewise.
19456 * normal/command.c: Include pupa/term.h.
19457 (terminal_command): New function.
19458 (pupa_command_init): Register the command "terminal".
19460 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
19461 (DISP_UP): Likewise.
19462 (DISP_RIGHT): Likewise.
19463 (DISP_DOWN): Likewise.
19464 (DISP_HLINE): Likewise.
19465 (DISP_VLINE): Likewise.
19466 (DISP_UL): Likewise.
19467 (DISP_UR): Likewise.
19468 (DISP_LL): Likewise.
19469 (DISP_LR): Likewise.
19471 * term/i386/pc/console.c (pupa_console_putchar): New function.
19473 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
19475 * util/resolve.c (pupa_util_resolve_dependencies): BUG
19476 FIX. Reverse the path_list.
19478 * include/pupa/normal.h: Export pupa_register_command and
19479 pupa_unregister_command.
19481 * hello/hello.c (pupa_cmd_hello): New module.
19482 * conf/i386-pc.rmk: Added hello.mod.
19484 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
19486 * kern/i386/pc/lzo1x.S: New file.
19488 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
19489 (compress_kernel): New variable.
19490 (generate_image): Heavily modified to support compressing a
19491 large part of the core image.
19493 * util/misc.c (pupa_util_read_image): Fix a file descriptor
19495 (pupa_util_load_image): New function.
19497 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
19498 (pupa_compressed_size): New variable.
19499 (codestart): Enable Gate A20 here.
19500 Decompress the compressed part of the core image.
19501 Rearrange the code to put functions and variables which are
19502 required for initialization in the non-compressed part.
19505 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
19508 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
19510 * include/pupa/i386/pc/kernel.h
19511 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
19512 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
19513 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19514 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19515 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
19517 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
19519 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
19520 (Utility#rule): Likewise.
19522 * configure.ac: Check if LZO is available.
19524 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
19526 * include/pupa/normal.h: New file.
19527 * include/pupa/setjmp.h: Likewise.
19528 * include/pupa/i386/setjmp.h: Likewise.
19529 * normal/cmdline.c: Likewise.
19530 * normal/command.c: Likewise.
19531 * normal/main.c: Likewise.
19532 * normal/menu.c: Likewise.
19533 * normal/i386/setjmp.S: Likewise.
19535 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
19536 (pupa_rescue_cmd_initrd): Likewise.
19538 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
19541 * kern/i386/pc/startup.S (translation_table): New variable.
19542 (translate_keycode): New function.
19543 (pupa_console_getkey): Call translate_keycode.
19545 * kern/rescue.c (attempt_normal_mode): New function.
19546 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
19547 it failed, print a message.
19549 * kern/mm.c (pupa_real_malloc): Print more information when a
19550 free magic is broken.
19551 (pupa_free): If the first free header is not free actually, set
19554 * kern/main.c (pupa_load_normal_mode): Just load the module
19556 (pupa_main): Don't print the message
19557 "Entering into rescue mode..." here.
19559 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
19561 (pupa_rescue_cmd_initrd): Likewise.
19562 (pupa_rescue_cmd_initrd): Likewise.
19564 * include/pupa/symbol.h (FUNCTION): Specify the type.
19565 (VARIABLE): Likewise.
19567 * include/pupa/err.h (pupa_err_t): Added
19568 PUPA_ERR_UNKNOWN_COMMAND.
19570 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
19571 (pupa_dl_get_prefix): Likewise.
19573 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
19574 Added _chain.mod and _linux.mod instead of chain.mod and
19576 (chain_mod_SOURCES): Renamed to ...
19577 (_chain_mod_SOURCES): ... this.
19578 (chain_mod_CFLAGS): Renamed to ...
19579 (_chain_mod_CFLAGS): ... this.
19580 (linux_mod_SOURCES): Renamed to ...
19581 (_linux_mod_SOURCES): ... this.
19582 (linux_mod_CFLAGS): Renamed to ...
19583 (_linux_mod_CFLAGS): ... this.
19584 (normal_mod_SOURCES): New variable.
19585 (normal_mod_CFLAGS): Likewise.
19586 (normal_mod_ASFLAGS): Likewise.
19588 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
19590 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
19593 * kern/dl.c (pupa_dl_ref): Refer depending modules
19595 (pupa_dl_unref): Unrefer depending modules recursively.
19596 Don't call pupa_dl_unload implicitly, because PUPA can crash if
19597 a module is unloaded before one depending on that module is
19599 (pupa_dl_unload): Unload depending modules explicitly,
19602 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
19604 * include/pupa/i386/pc/linux.h: New file.
19605 * loader/i386/pc/linux.c: Likewise.
19607 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
19609 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
19610 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
19611 of PUPA_CHAINLOADER_BOOT_SECTOR.
19613 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
19614 (pupa_linux_prot_size): New variable.
19615 (pupa_linux_tmp_addr): Likewise.
19616 (pupa_linux_real_addr): Likewise.
19617 (pupa_linux_boot_zimage): New function.
19618 (pupa_linux_boot_bzimage): Likewise.
19620 * kern/i386/pc/init.c (struct mem_region): New structure.
19621 (MAX_REGIONS): New macro.
19622 (mem_regions): New variable.
19623 (num_regions): Likewise.
19624 (pupa_os_area_addr): Likewise.
19625 (pupa_os_area_size): Likewise.
19626 (pupa_lower_mem): Likewise.
19627 (pupa_upper_mem): Likewise.
19628 (add_mem_region): New function.
19629 (compact_mem_regions): Likewise.
19630 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
19631 the size of the conventional memory and that of so-called upper
19632 memory (before the first memory hole).
19633 Instead of adding each found region to free memory, use
19634 add_mem_region and add them after removing overlaps.
19635 Also, add only 1/4 of the upper memory to free memory. The rest
19636 is used for loading OS images. Maybe this is ad hoc, but this
19637 makes it much easier to relocate OS images when booting.
19639 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
19640 (pupa_enter_rescue_mode): Don't register initrd and module.
19642 * kern/mm.c: Include pupa/dl.h.
19644 * kern/main.c: Include pupa/file.h and pupa/device.h.
19646 * kern/loader.c (pupa_loader_load_module_func): Removed.
19647 (pupa_loader_load_module): Likewise.
19649 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
19652 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
19653 (pupa_linux_tmp_addr): Likewise.
19654 (pupa_linux_real_addr): Likewise.
19655 (pupa_linux_boot_zimage): Likewise.
19656 (pupa_linux_boot_bzimage): Likewise.
19658 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
19659 (pupa_upper_mem): Likewise.
19660 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
19661 module is too dangerous.
19663 * include/pupa/loader.h (pupa_os_area_addr): Declared.
19664 (pupa_os_area_size): Likewise.
19665 (pupa_loader_set): Remove the first argument. Loader doesn't
19666 manage modules or initrd any longer.
19667 (pupa_loader_load_module): Removed.
19669 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
19670 (linux_mod_SOURCES): New variable.
19671 (linux_mod_CFLAGS): Likewise.
19673 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
19675 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
19676 the length of a blocklist correctly.
19678 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
19679 Use ioctl only if the OS file is a block device.
19680 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
19681 not very useful for normal files.
19683 * kern/main.c (pupa_set_root_dev): New function.
19684 (pupa_load_normal_mode): Likewise.
19685 (pupa_main): Call those above.
19687 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
19690 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
19692 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
19694 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
19695 (setup): Configure the installed partition information and the
19698 * loader/i386/pc/chainloader.c (my_mod): New variable.
19699 (pupa_chainloader_unload): New function.
19700 (pupa_rescue_cmd_chainloader): Refer itself.
19701 (PUPA_MOD_INIT): Save its own module in MY_MOD.
19703 * kern/i386/pc/startup.S (install_partition): Removed.
19704 (version_string): Likewise.
19705 (config_file): Likewise.
19706 (pupa_install_dos_part): New variable.
19707 (pupa_install_bsd_part): Likewise.
19708 (pupa_prefix): Likewise.
19709 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
19711 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
19713 (make_install_device): New function.
19714 (pupa_machine_init): Set the dl prefix.
19716 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
19717 (buf): Renamed to ...
19718 (linebuf): ... this.
19719 (pupa_rescue_cmd_prefix): New function.
19720 (pupa_rescue_cmd_insmod): Likewise.
19721 (pupa_rescue_cmd_rmmod): Likewise.
19722 (pupa_rescue_cmd_lsmod): Likewise.
19723 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
19726 * kern/mm.c (pupa_memalign): If failed even after invalidating
19727 disk caches, unload unneeded modules and retry.
19729 * kern/misc.c (pupa_memmove): New function.
19730 (pupa_memcpy): Removed.
19731 (pupa_strcpy): New function.
19732 (pupa_itoa): Made static.
19734 * kern/dl.c (pupa_dl_iterate): New function.
19735 (pupa_dl_ref): Likewise.
19736 (pupa_dl_unref): Likewise.
19737 (pupa_dl_unload): Return if succeeded or not.
19738 (pupa_dl_unload_unneeded): New function.
19739 (pupa_dl_unload_all): Likewise.
19740 (pupa_dl_init): Renamed to ...
19741 (pupa_dl_set_prefix): ... this.
19742 (pupa_dl_get_prefix): New function.
19744 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
19745 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
19746 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19747 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19748 (pupa_install_dos_part): Declared.
19749 (pupa_install_bsd_part): Likewise.
19750 (pupa_prefix): Likewise.
19751 (pupa_boot_drive): Likewise.
19753 * include/pupa/types.h: Fix a typo.
19755 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
19757 (pupa_memmove): Declared.
19758 (pupa_strcpy): Likewise.
19760 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
19761 pupa_mod_init takes one argument, its own module.
19762 (pupa_dl_unload_unneeded): Declared.
19763 (pupa_dl_unload_all): Likewise.
19764 (pupa_dl_ref): Likewise.
19765 (pupa_dl_unref): Likewise.
19766 (pupa_dl_iterate): Likewise.
19767 (pupa_dl_init): Renamed to ...
19768 (pupa_dl_set_prefix): ... this.
19769 (pupa_dl_get_prefix): Declared.
19771 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
19772 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
19774 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
19775 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
19777 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
19778 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
19780 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
19782 * util/i386/pc/pupa-setup.c (setup): Define the internal
19783 function find_first_partition_start at the top level, because GCC
19784 3.0.x cannot compile internal functions in deeper scopes
19786 (find_root_device): Use lstat instead of stat.
19787 Don't follow symbolic links.
19788 Fix the path-constructing code.
19790 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
19791 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
19792 by a BLKGETSIZE ioctl first, because block devices don't fill
19793 the member st_mode of the structure stat on Linux.
19794 [__linux__] (linux_find_partition): Use a temporary buffer
19795 REAL_DEV for the working space. Copy it to DEV before returning.
19796 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
19797 buffer cache consistent.
19798 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
19799 strncmp. The previous value was merely wrong.
19800 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
19802 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
19803 FAT size is 12. The previous value was merely wrong.
19805 * kern/main.c (pupa_main): Don't split the starting message from
19808 * kern/term.c (pupa_putchar): Put CR after LF instead of before
19809 LF, because BIOS goes crazy about character attributes in this
19812 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
19814 * include/i386/pc/util/biosdisk.h: New file.
19815 * util/i386/pc/biosdisk.c: Likewise.
19816 * util/i386/pc/pupa-setup.c: Likewise.
19818 * Makefile.in (INCLUDE_DISTFILES): Added
19819 include/pupa/i386/pc/util/biosdisk.h.
19820 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
19821 directory util/i386/pc.
19822 (install-local): Added a rule for sbin_UTILITIES.
19823 (uninstall): Likewise.
19825 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
19827 * util/misc.c (xrealloc): New function.
19828 (pupa_malloc): Likewise.
19829 (pupa_free): Likewise.
19830 (pupa_realloc): Likewise.
19831 (pupa_stop): Likewise.
19832 (pupa_putchar): Likewise.
19834 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
19836 * include/pupa/util/misc.h (xrealloc): Declared.
19838 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
19840 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
19841 (PUPA_BOOT_MACHINE_BPB_END): ... this.
19843 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
19844 [PUPA_UTIL] (pupa_fat_fini): Likewise.
19846 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
19847 way should be implemented.
19848 [PUPA_UTIL] (pupa_fat_fini): Likewise.
19850 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
19851 the size of NAME for safety.
19852 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
19855 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
19856 (pupa_setup_SOURCES): Likewise.
19858 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
19860 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
19862 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
19863 bunch of pushl's from pusha, because this destroys the return
19866 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
19868 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
19869 This means that any missing prototypes could be fatal. Also, you
19870 must take care when writing assembly code. See the comments at
19871 the beginning of startup.S, for more details.
19873 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
19874 compilation mechanism.
19875 (pupa_chainloader_real_boot): Likewise.
19876 (pupa_biosdisk_rw_int13_extensions): Likewise.
19877 (pupa_biosdisk_rw_standard): Likewise.
19878 (pupa_biosdisk_check_int13_extensions): Likewise.
19879 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
19880 (pupa_biosdisk_get_diskinfo_standard): Likewise.
19881 (pupa_get_memsize): Likewise.
19882 (pupa_get_mmap_entry): Likewise.
19883 (pupa_console_putchar): Likewise.
19884 (pupa_console_setcursor): Likewise.
19885 (pupa_getrtsecs): Use pushl instead of push.
19887 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
19888 memory instead of the stack for a mmap entry, because some
19889 BIOSes may ignore the maximum size and overflow.
19891 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
19893 * genmk.rb (PModule#rule): Compile automatically generated
19894 sources with module-specific CFLAGS as well as other sources.
19896 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
19898 * configure.ac: Check ld.
19899 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
19900 respectively, before checking endianness and sizes.
19902 * Makefile.in (LD): New variable.
19904 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
19906 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
19908 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
19910 * Changelog: New file.