1 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
3 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
4 * kern/i386/realmode.S (real_to_prot): ... to here.
6 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
8 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
10 (kernel_elf_SOURCES): Rename to ...
11 (kernel_img_SOURCES): ... this.
12 (kernel_elf_HEADERS): Rename to ...
13 (kernel_img_HEADERS): ... this. Update all users.
14 (kernel_elf_ASFLAGS): Rename to ...
15 (kernel_img_ASFLAGS): ... this.
16 (kernel_elf_CFLAGS): Rename to ...
17 (kernel_img_CFLAGS): ... this.
18 (kernel_elf_LDFLAGS): Rename to ...
19 (kernel_img_LDFLAGS): ... this.
20 * conf/i386-coreboot.rmk: Likewise.
21 * conf/powerpc-ieee1275.rmk: Likewise.
23 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
26 2009-06-21 Pavel Roskin <proski@gnu.org>
28 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
29 to match nested functions.
30 * loader/sparc64/ieee1275/linux.c: Likewise.
32 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
34 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
36 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
39 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
41 Fix asm file handling on ELF, and remove workarounds.
43 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
44 and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
45 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
46 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
48 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
52 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
53 and loader/i386/bsd64.c
54 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
55 (FREEBSD_MODTYPE_ELF_MODULE): New definition
56 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
57 (grub_freebsd_load_elfmodule32): New declaration
58 (grub_freebsd_load_elfmoduleobj64): Likewise
59 (grub_freebsd_load_elf_meta32): Likewise
60 (grub_freebsd_load_elf_meta64): Likewise
61 (grub_freebsd_add_meta): Likewise
62 (grub_freebsd_add_meta_module): Likewise
63 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
64 (grub_freebsd_add_meta_module): Likewise and move module-specific
65 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
66 (grub_cmd_freebsd): Add elf-kernel specific parts
67 based on grub_freebsd_add_meta_module
68 (grub_cmd_freebsd_module): Add type parsing moved from
69 grub_freebsd_add_meta_module
70 (grub_cmd_freebsd_module_elf): New function
71 (cmd_freebsd_module_elf): New variable
72 (GRUB_MOD_INIT): Register freebsd_module_elf
73 * loader/i386/bsd32.c: New file
74 * loader/i386/bsd64.c: Likewise
75 * loader/i386/bsdXX.c: Likewise
76 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
77 (grub_elf64_load): Likewise
78 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
80 (grub_elf64_load_hook_t): Likewise
82 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
84 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
86 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
87 don't write a menu entry for recovery mode.
89 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
91 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
92 after it's no longer needed.
94 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
96 * include/grub/i386/loader.h (grub_linux_prot_size)
97 (grub_linux_tmp_addr, grub_linux_real_addr)
98 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
100 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
101 common grub_util_info() call to ...
102 (generate_image): ... here.
103 Fix use of uninitialized memory, comparison of signed with
104 unsigned integers and memory leak.
105 Remove bogus module address message.
107 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
109 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
111 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
113 2009-06-19 Pavel Roskin <proski@gnu.org>
115 * configure.ac: Remove stray AC_MSG_CHECKING.
117 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
119 * disk/scsi.c (grub_scsi_open): use continue instead of big if
121 2009-06-18 Pavel Roskin <proski@gnu.org>
123 * conf/common.rmk: Add fs_file.mod.
124 * disk/fs_file.c: New file.
125 * include/grub/disk.h (enum grub_disk_dev_id): Add
126 GRUB_DISK_DEVICE_FILE_ID.
128 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
130 Fix build with Apple's toolchain. Part 2
132 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
135 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
137 Fix build with Apple's toolchain. Part 1
139 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
141 * configure.ac: remove a leftover AC_MSG_RESULT
142 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
145 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
149 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
150 (decomp_block): initialize ch
151 use grub_memcpy instead of memcpy
153 2009-06-17 Pavel Roskin <proski@gnu.org>
155 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
156 version, use declarations needed to use vga_text as the startup
159 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
160 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
162 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
163 and grub_at_keyboard_fini(), it's done on module load and
166 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
168 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
170 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
172 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
176 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
177 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
178 (grub_script_yylex): don't segfault on unterminated script
179 newline terminates command and variable
181 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
183 avoid double grub_adjust_range call. Bug reported by David Simner
185 * kern/disk.c (grub_disk_write): change to raw disk access before
188 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
190 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
191 spaces, for the benefit of help2man.
192 * util/i386/efi/grub-mkimage.c (usage): Likewise.
194 2009-06-16 Pavel Roskin <proski@gnu.org>
196 * kern/i386/halt.c: Include grub/machine/init.h.
197 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
199 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
201 * util/grub.d/30_os-prober.in: Use ${root} in the generated
204 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
206 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
209 2009-06-16 Pavel Roskin <proski@gnu.org>
211 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
212 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
213 save %dx, we only need %dl and we never change it.
214 * boot/i386/pc/cdboot.S: Don't set the root drive.
215 * boot/i386/pc/pxeboot.S: Likewise.
216 * include/grub/i386/pc/boot.h: Remove
217 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
218 GRUB_BOOT_MACHINE_DRIVE_CHECK.
219 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
220 * kern/i386/pc/init.c (make_install_device): Remove references
222 * kern/i386/pc/startup.S: Likewise.
223 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
225 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
229 * commands/xnu_uuid.c: new file
230 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
231 (xnu_uuid_mod_SOURCES): new variable
232 (xnu_uuid_mod_CFLAGS): likewise
233 (xnu_uuid_mod_LDFLAGS): likewise
234 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
235 * conf/i386-ieee1275.rmk: likewise
236 * conf/i386-pc.rmk: likewise
237 * conf/powerpc-ieee1275.rmk: likewise
238 * conf/sparc64-ieee1275.rmk: likewise
239 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
241 2009-06-16 Pavel Roskin <proski@gnu.org>
243 * configure.ac: Avoid '==' in test command, it's not portable.
245 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
249 * commands/probe.c: new file
250 * conf/common.rmk (pkglib_MODULES): add probe.mod
251 (probe_mod_SOURCES): new variable
252 (probe_mod_CFLAGS): likewise
253 (probe_mod_LDFLAGS): likewise
254 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
255 * conf/i386-ieee1275.rmk: likewise
256 * conf/i386-pc.rmk: likewise
257 * conf/powerpc-ieee1275.rmk: likewise
258 * conf/sparc64-ieee1275.rmk: likewise
260 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
262 Fix handling of string like \"hello\" and "a
265 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
266 (grub_script_yylex): fix parsing of quoting, escaping and newline
268 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
270 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
273 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
275 * util/grub-mkconfig.in: Fix parsing of --output option.
277 2009-06-12 Pavel Roskin <proski@gnu.org>
279 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
280 genmk.rb don't need to be generated or installed.
282 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
284 * commands/i386/pc/drivemap_int13h.S: add more comments
286 2009-06-11 Pavel Roskin <proski@gnu.org>
288 * Makefile.in (uninstall): Uninstall manuals.
290 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
291 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
292 and update-grub_lib in two places.
293 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
295 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
298 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
299 `entry_lo' to fix variable shadowing.
301 2009-06-11 Christian Franke <franke@computer.org>
303 * kern/misc.c (__enable_execute_stack): Add missing return type
304 to prevent gcc warning.
306 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
308 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
310 2009-06-11 Pavel Roskin <proski@gnu.org>
312 * Makefile.in: Don't rely on any scripts being executable.
313 Always use $(SHELL) to run shell scripts.
315 * configure.ac: Always define ___main if using -nostdlib. This
316 fixes tests on Cygwin.
318 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
322 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
323 is in bytes and not in blocks
325 2009-06-11 Pavel Roskin <proski@gnu.org>
327 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
330 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
332 * util/grub.d/30_os-prober.in: Fix a comment. Source
333 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
334 to set the root device. Place drivemap command in the generated
337 2009-06-11 Pavel Roskin <proski@gnu.org>
339 * configure.ac: Remove host_m32. Issues with 64-bit utilities
340 have long been resolved.
342 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
344 * util/grub.d/10_linux.in: Capitalise "Linux".
346 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
348 2009-06-11 Pavel Roskin <proski@gnu.org>
350 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
351 fix a gcc warning and ensure that the function won't ever exit.
353 * kern/i386/ieee1275/init.c: Add missing prototype for
356 * loader/ieee1275/multiboot2.c [__i386__]: Include
357 grub/cpu/multiboot.h.
359 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
360 casts to short - they are not portable and cause warnings. Fix
361 use of uninitialized values in input_buf. Use ARRAY_SIZE.
363 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
367 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
369 (grub_get_root_biosnumber_saved): new variable
370 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
371 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
372 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
373 %dx after the call if necessary
374 * conf/common.rmk (pkglib_MODULES): remove boot.mod
375 (boot_mod_SOURCES): remove
376 (boot_mod_CFLAGS): remove
377 (boot_mod_LDFLAGS): remove
378 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
379 (boot_mod_SOURCES): new variable
380 (boot_mod_CFLAGS): likewise
381 (boot_mod_LDFLAGS): likewise
382 * conf/i386-efi.rmk: likewise
383 * conf/i386-ieee1275.rmk: likewise
384 * conf/i386-pc.rmk: likewise
385 * conf/powerpc-ieee1275.rmk: likewise
386 * conf/sparc64-ieee1275.rmk: likewise
387 * conf/x86_64-efi.rmk: likewise
388 * include/grub/i386/pc/biosnum.h: new file
389 * lib/i386/pc/biosnum.c: likewise
390 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
391 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
392 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
394 2009-06-10 Pavel Roskin <proski@gnu.org>
396 * io/gzio.c (test_header): Don't reuse one buffer for all data.
397 Use separate variables. Read only the file size at the end, but
398 not the checksum that we don't use.
400 * kern/file.c (grub_file_read): Use void pointer for the buffer.
403 * kern/ieee1275/openfw.c: Remove libc includes.
404 * kern/ieee1275/cmain.c: Likewise.
405 * include/grub/ieee1275/ieee1275.h: Likewise.
407 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
410 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
412 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
413 `genparttoollist.sh'.
414 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
415 Add `*.sh' to the list find searches for and change `mdate.sh'
418 2009-06-10 Pavel Roskin <proski@gnu.org>
420 * include/grub/multiboot2.h: Provide compatibility defines for
422 * include/multiboot2.h: Include stdint.h only if needed, using
424 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
426 * loader/ieee1275/multiboot2.c: Likewise.
427 * loader/multiboot2.c: Likewise.
428 * loader/multiboot_loader.c: Likewise.
430 * configure.ac: Use -nostdlib when probing for the target. It
431 should not be required to have libc for the target.
433 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
434 they fail without libc headers for the target.
435 * include/grub/powerpc/libgcc.h: Use weak attribute for all
437 * include/grub/sparc64/libgcc.h: Likewise. Don't use
438 preprocessor conditionals.
440 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
441 build system doesn't need to be aware of the tar.c internals.
443 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
445 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
447 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
449 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
450 disk limit to 26 for IDE, Virtio, Xen and SCSI.
452 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
454 * util/i386/pc/grub-install.in: Change the error message if UUIDs
455 aren't available if ata.mod gets used.
457 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
459 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
460 initialising controller.
461 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
463 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
465 * util/i386/pc/grub-install.in: Add a parameter --disk-module
466 to choose between ata and biosdisk module on i386-pc.
468 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
470 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
471 Subclass and Programming Interface fields in terms of the 3 byte
473 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
475 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
476 interface is OHCI. Add grub_dprintf for symmetry with
478 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
479 interface is UHCI. Add interf variable for programming
480 interface. Print interface with class/subclass.
482 * bus/usb/ohci.c: Set interf with correct field.
484 * bus/usb/uhci.c: Remove unneeded doubled lines.
485 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
486 Remove whitespace inside comment.
488 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
490 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
491 as fallback an equivalent option without depth.
493 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
495 Not fail if unable to retrieve C/H/S on LBA disks
497 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
498 if unable to retrieve C/H/S on LBA disks
500 2009-06-08 Pavel Roskin <proski@gnu.org>
502 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
505 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
507 * Makefile.in (uninstall): Remove all $lib_DATA files.
509 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
511 Bugfix: install on partitionless device
513 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
516 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
518 * Makefile.in (uninstall): Remove all $include_DATA files.
520 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
522 * commands/true.c: New file. Implement the true and false commands.
523 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
524 (true_mod_SOURCES): New variable.
525 (true_mod_CFLAGS): Likewise.
526 (true_mod_LDFLAGS): Likewise.
528 2009-06-05 Colin D Bennett <colin@gibibit.com>
530 Optimized font character lookup using binary search instead of linear
531 search. Fonts now are required to have the character index ordered by
534 * font/font.c (load_font_index): Verify that fonts have ordered
536 (find_glyph): Use binary search instead of linear search to find a
539 2009-06-05 Michael Scherer <misc@mandriva.org>
541 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
542 uses case sensitive btree.
543 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
544 only for case insensitive filesystems.
546 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
548 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
549 * conf/common.rmk (search_mod_CFLAGS): likewise
551 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
553 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
554 compensate a compiler bug
556 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
558 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
561 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
563 Definitions for creating asm symbols with Apple's CC
565 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
566 [APPLE_CC] (VARIABLE): likewise
568 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
570 Disable lnxboot.img when compiled
573 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
574 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
575 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
576 [! APPLE_CC] (CODE_LENG): skip
577 [! APPLE_CC] (setup_sects): likewise
578 [! APPLE_CC]: skip filling
580 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
582 Address in trampolines based on 32-bit registers when compiled
585 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
587 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
589 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
591 Avoid aliases when compiling with Apple's CC for PCBIOS machine
593 * kern/misc.c [APPLE_CC] (memcpy): new function
594 [APPLE_CC] (memmove): likewise
595 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
596 (memcpy): define alias conditionally on !APPLE_CC
599 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
601 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
602 (grub_assert_fail): make prototype conditional
604 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
606 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
608 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
610 (CLEANFILES): add grub-macho2img
611 (grub_macho2img_SOURCES): new variable
612 * kern/i386/pc/startup.S (bss_start): new variable
614 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
615 * util/grub-macho2img.c: new file
617 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
619 Use objconv when compiling with Apple's CC
621 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
622 (efiemu64.o): likewise
623 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
624 when compiling with Apple's CC
625 (efiemu64_s.o): likewise
626 * configure.ac: check for objconv when compiling with Apple's CC
627 * genmk.rb: use objconv for modules when compiled with Apple's CC
629 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
631 Define segment as well as section when compiling with
634 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
635 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
636 (efiemu_convert_pointer): likewise
637 (efiemu_set_virtual_address_map): likewise
638 (efiemu_convert_pointer): likewise
639 (efiemu_getcrc32): likewise
640 (init_crc32_table): likewise
642 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
643 (GRUB_MOD_DEP): likewise
645 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
647 Allow a compilation without -mcmodel=large
649 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
650 when compiled without -mcmodel=large
651 (filter_memory_map): remove memory post 4 GiB when compiled
652 without -mcmodel=large
653 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
654 TARGET_CFLAGS when -mcmodel=large isn't supported
656 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
658 Remove nested functions in efiemu core
660 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
662 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
664 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
666 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
668 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
670 (grub_cpu_is_tsc_supported): likewise
671 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
673 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
675 Absolute addressing through constant with Apple's cc
677 * kern/i386/pc/startup.S: Define necessary constants
678 and address through it when using ABS with Apple's CC
679 * boot/i386/pc/diskboot.S: likewise
680 * boot/i386/pc/boot.S: likewise
681 * boot/i386/pc/lnxboot.S: likewise
682 * boot/i386/pc/cdboot.S: likewise
683 * mmap/i386/pc/mmap_helper.S: likewise
684 * commands/i386/pc/drivemap_int13h.S: likewise
686 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
688 Check if compiler is apple cc
690 * Makefile.in (ASFLAGS): new variable
691 (TARGET_ASFLAGS): likewise
692 (TARGET_MODULE_FORMAT): likewise
693 (TARGET_APPLE_CC): likewise
695 (TARGET_IMG_CFLAGS): likewise
696 (TARGET_CPPFLAGS): add includedir
697 * configure.ac: call grub_apple_cc and grub_apple_target_cc
698 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
699 Check for linker script only if compiler isn't Apple's CC
700 (TARGET_MODULE_FORMAT): set
701 (TARGET_APPLE_CC): likewise
702 (TARGET_ASFLAGS): likewise
704 Check for objcopy only if compiler isn't Apple's CC
705 Check for BSS symbol only if compiler isn't Apple's CC
706 * genmk.rb: adapt nm options if we use Apple's utils
707 * aclocal.m4 (grub_apple_cc): new test
708 (grub_apple_target_cc): likewise
710 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
712 Simplify sed expressions and improve awk
714 * Makefile.in (install-local): simplify sed expression
715 * gencmdlist.sh: likewise
716 * genmoddep.awk: avoid adding module as a dependency of itself
718 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
720 Add missing start symbols
722 * boot/i386/pc/boot.S: add start
723 * boot/i386/pc/pxeboot.S: likewise
725 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
727 Fix wrong assumptions with grub-mkimage on EFI
729 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
730 (relocate_addresses): consider both r_addend and value at offset
731 (make_mods_section): zerofill modinfo and header
732 (convert_elf): write prefix here
734 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
736 Use .asciz instead of .string
738 * i386/pc/diskboot.S: use .asciz instead of .string
739 * i386/pc/boot.S: likewise
740 * include/grub/dl.h (GRUB_MOD_DEP): likewise
741 (GRUB_MOD_NAME): likewise
743 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
747 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
748 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
749 (grub_video_setup): remove
750 (grub_video_set_mode): new prototype
751 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
753 (linux_vesafb_res): compile only on PCBIOS
754 (grub_linux_boot): support gfxpayload
755 * loader/i386/pc/xnu.c (video_hook): new function
756 (grub_xnu_set_video): support gfxpayload
757 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
758 (DEFAULT_VIDEO_HEIGHT): likewise
759 (DEFAULT_VIDEO_FLAGS): likewise
760 (DEFAULT_VIDEO_MODE): new definition
761 (video_hook): new function
762 (grub_gfxterm_init): use grub_video_set_mode
763 * util/grub.d/30_os-prober.in: remove explicit modesetting before
765 * video/video.c (grub_video_setup): removed
766 (grub_video_set_mode): new function based on grub_gfxterm_init and
769 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
771 Avoid calling biosdisk in drivemap
773 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
774 (revparse_biosdisk): likewise
775 (list_mappings): derive name from id directly
776 (grub_cmd_drivemap): use tryparse_diskstring
778 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
782 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
783 (grub_lexer_param): add tokenonhold
784 (grub_script_create_cmdline): remove cmdline. All callers updated
785 (grub_script_function_create): make functionname
786 grub_script_arg. All callers updated
787 (grub_script_execute_argument_to_string): new prototype
788 * kern/parser.c (state_transitions): reorder
789 (grub_parser_cmdline_state): fix a bug and make more compact
790 * script/sh/execute.c (grub_script_execute_argument_to_string):
792 (grub_script_execute_cmdline): use new format
793 * script/sh/function.c (grub_script_function_create): make functionname
794 grub_script_arg. All callers updated
795 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
796 (grub_script_yylex): remove
797 (grub_script_yylex2): renamed to ...
798 (grub_script_yylex): ...renamed
799 parse the expressions like a${b}c
800 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
801 (GRUB_PARSER_TOKEN_VAR): remove
802 (GRUB_PARSER_TOKEN_NAME): likewise
803 ("if"): declare as typeless
805 ("function"): likewise
811 (script): accept empty scripts and make exit on error
812 (arguments): use GRUB_PARSER_TOKEN_ARG
814 (command): move error handling to script
815 (menuentry): move grub_script_lexer_ref before
816 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
817 argument. All callers updated
819 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
821 Prevent GRUB from probing floppies during boot.
823 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
824 * commands/search.c (options): Add --no-floppy.
825 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
826 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
827 --no-floppy when searching for UUIDs.
829 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
831 Simplify the code duplication in commands/search.c.
833 * commands/search.c (search_label, search_fs_uuid): Merge into ...
834 (search_fs): ... this. Update all users.
836 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
838 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
840 2009-05-28 Pavel Roskin <proski@gnu.org>
842 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
843 Remove the original symlink explicitly.
845 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
846 just one slash. That's how grub_fshelp_find_file() does it.
848 2009-05-26 Pavel Roskin <proski@gnu.org>
850 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
853 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
856 2009-05-25 Christian Franke <franke@computer.org>
858 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
860 (grub_atapi_identify): Add wait after drive select.
861 (grub_ata_identify): Do more strict status register check before
862 calling grub_atapi_identify (). Suppress error message if status
863 register is 0x00 after command failure. Add status register
864 check after PIO read to avoid bogus identify due to stuck DRQ.
865 Thanks to Pavel Roskin for testing.
866 (grub_device_initialize): Remove unsafe status register check.
867 Thanks to 'phcoder' for problem report and patch.
868 Prevent sign extension in debug message.
870 2009-05-23 Colin D Bennett <colin@gibibit.com>
872 Cleaned up `include/grub/normal.h'. Grouped prototypes by
873 definition file, and functions defined in `normal/menu.c' have had
874 their prototypes moved to `include/grub/menu.h' for consistency.
876 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
878 (grub_menu_get_entry): Likewise.
879 (grub_menu_get_timeout): Likewise.
880 (grub_menu_set_timeout): Likewise.
881 (grub_menu_execute_entry): Likewise.
882 (grub_menu_execute_with_fallback): Likewise.
883 (grub_menu_entry_run): Likewise.
885 * include/grub/normal.h: Re-ordered and grouped function
886 prototypes by file that the function is defined in.
887 (grub_menu_execute_callback): Removed; moved to menu.h.
888 (grub_menu_get_entry): Likewise.
889 (grub_menu_get_timeout): Likewise.
890 (grub_menu_set_timeout): Likewise.
891 (grub_menu_execute_entry): Likewise.
892 (grub_menu_execute_with_fallback): Likewise.
893 (grub_menu_entry_run): Likewise.
894 (grub_menu_addentry): Renamed from this ...
895 (grub_normal_add_menu_entry): ... to this.
897 * normal/main.c (grub_menu_addentry): Renamed from this ...
898 (grub_normal_add_menu_entry): ... to this.
900 * script/sh/execute.c (grub_script_execute_menuentry): Update
901 reference to renamed grub_menu_addentry function.
903 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
905 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
907 2009-05-22 Pavel Roskin <proski@gnu.org>
909 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
910 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
911 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
912 compiling for the i386 targets, but not for the utilities.
914 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
916 (grub_root_drive): Likewise.
917 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
919 (grub_root_drive): Change size to byte.
920 (grub_start_addr): Remove.
921 (grub_end_addr): Likewise.
922 (grub_apm_bios_info): Likewise.
924 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
926 * normal/i386: Remove.
927 * normal/powerpc: Likewise.
928 * normal/sparc64: Likewise.
929 * normal/x86_64: Likewise.
931 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
933 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
934 * loader/i386/linux_trampoline.S: Fix indentation
935 * loader/i386/xnu_helper.S: Likewise
937 2009-05-18 Colin D Bennett <colin@gibibit.com>
939 Display error messages when parsing a Lua statement fails.
940 Previously, executing a syntactically invalid statement like
941 ")foo" or "bar;" would silently fail.
943 * script/lua/grub_main.c (handle_lua_error): New function.
944 (grub_lua_parse_line): Improved reporting of Lua parser and
947 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
949 Remove -Werror which causes build to fail on some systems
951 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
952 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
953 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
955 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
957 trampoline for linux on 64-bit platform
959 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
960 loader/i386/efi/linux_trampoline.S
961 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
963 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
965 * loader/i386/linux_trampoline.S: moved here
966 * loader/i386/efi/linux.c (allocate_pages): reserve space for
968 (jumpvector): removed
969 (grub_linux_trampoline_start): new declaration
970 (grub_linux_trampoline_end): likewise
971 (grub_linux_boot): use trampoline when on 64-bit platform
972 * loader/i386/linux.c: likewise
974 2009-05-16 Pavel Roskin <proski@gnu.org>
976 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
977 const to avoid a warning.
978 (grub_lua_setenv): Likewise.
979 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
980 lmsg to fix a warning.
982 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
984 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
985 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
986 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
987 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
988 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
989 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
990 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
991 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
993 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
995 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
997 2009-05-16 Bean <bean123ch@gmail.com>
999 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1000 (lua_mod_SOURCES): New variable.
1001 (lua_mod_CFLAGS): Likewise.
1002 (lua_mod_LDFLAGS): Likewise.
1004 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1005 (setjmp_mod_SOURCES): New variable.
1006 (setjmp_mod_CFLAGS): Likewise.
1007 (setjmp_LDFLAGS): Likewise.
1009 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1010 (setjmp_mod_SOURCES): New variable.
1011 (setjmp_mod_CFLAGS): Likewise.
1012 (setjmp_LDFLAGS): Likewise.
1014 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1015 (setjmp_mod_SOURCES): New variable.
1016 (setjmp_mod_CFLAGS): Likewise.
1017 (setjmp_LDFLAGS): Likewise.
1019 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1020 (setjmp_mod_SOURCES): New variable.
1021 (setjmp_mod_CFLAGS): Likewise.
1022 (setjmp_LDFLAGS): Likewise.
1024 * normal/i386/setjmp.S: Moved from here ...
1025 * lib/i386/setjmp.S: ... Moved here
1026 * normal/x86_64/setjmp.S: Moved from here ...
1027 * lib/x86_64/setjmp.S: ... Moved here
1028 * normal/powerpc/setjmp.S: Moved from here ...
1029 * lib/powerpc/setjmp.S: ... Moved here
1030 * normal/sparc64/setjmp.S: Moved from here ...
1031 * lib/sparc64/setjmp.S: ... Moved here
1033 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1034 returns_twice in mingw.
1036 * script/lua/grub_lib.c: New file.
1037 * script/lua/grub_lib.h: Likewise.
1038 * script/lua/grub_lua.h: Likewise.
1039 * script/lua/grub_main.c: Likewise.
1040 * script/lua/lapi.c: Likewise.
1041 * script/lua/lapi.h: Likewise.
1042 * script/lua/lauxlib.c: Likewise.
1043 * script/lua/lauxlib.h: Likewise.
1044 * script/lua/lbaselib.c: Likewise.
1045 * script/lua/lcode.c: Likewise.
1046 * script/lua/lcode.h: Likewise.
1047 * script/lua/ldblib.c: Likewise.
1048 * script/lua/ldebug.c: Likewise.
1049 * script/lua/ldebug.h: Likewise.
1050 * script/lua/ldo.c: Likewise.
1051 * script/lua/ldo.h: Likewise.
1052 * script/lua/ldump.c: Likewise.
1053 * script/lua/lfunc.c: Likewise.
1054 * script/lua/lfunc.h: Likewise.
1055 * script/lua/lgc.c: Likewise.
1056 * script/lua/lgc.h: Likewise.
1057 * script/lua/linit.c: Likewise.
1058 * script/lua/liolib.c: Likewise.
1059 * script/lua/llex.c: Likewise.
1060 * script/lua/llex.h: Likewise.
1061 * script/lua/llimits.h: Likewise.
1062 * script/lua/lmathlib.c: Likewise.
1063 * script/lua/lmem.c: Likewise.
1064 * script/lua/lmem.h: Likewise.
1065 * script/lua/loadlib.c: Likewise.
1066 * script/lua/lobject.c: Likewise.
1067 * script/lua/lobject.h: Likewise.
1068 * script/lua/lopcodes.c: Likewise.
1069 * script/lua/lopcodes.h: Likewise.
1070 * script/lua/loslib.c: Likewise.
1071 * script/lua/lparser.c: Likewise.
1072 * script/lua/lparser.h: Likewise.
1073 * script/lua/lstate.c: Likewise.
1074 * script/lua/lstate.h: Likewise.
1075 * script/lua/lstring.c: Likewise.
1076 * script/lua/lstring.h: Likewise.
1077 * script/lua/lstrlib.c: Likewise.
1078 * script/lua/ltable.c: Likewise.
1079 * script/lua/ltable.h: Likewise.
1080 * script/lua/ltablib.c: Likewise.
1081 * script/lua/ltm.c: Likewise.
1082 * script/lua/ltm.h: Likewise.
1083 * script/lua/lua.h: Likewise.
1084 * script/lua/luaconf.h: Likewise.
1085 * script/lua/lualib.h: Likewise.
1086 * script/lua/lundump.c: Likewise.
1087 * script/lua/lundump.h: Likewise.
1088 * script/lua/lvm.c: Likewise.
1089 * script/lua/lvm.h: Likewise.
1090 * script/lua/lzio.c: Likewise.
1091 * script/lua/lzio.h: Likewise.
1093 2009-05-16 Bean <bean123ch@gmail.com>
1095 * include/grub/kernel.h (grub_module_header_types): Add type
1098 * kern/main.c (grub_load_config): New function.
1099 (grub_main): Call grub_load_config to read boot config.
1101 * grub-mkimage (generate_image): New parameter config_path.
1102 (options): New option --config.
1103 (main): Parse --config option, and pass it to generate_image.
1105 2009-05-14 Christian Franke <franke@computer.org>
1107 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1108 This fixes build on Cygwin.
1110 2009-05-14 Pavel Roskin <proski@gnu.org>
1112 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1113 jump. This saves two bytes, so the typical case of 2 swapped
1114 drives would fit 32 bytes.
1116 2009-05-13 Pavel Roskin <proski@gnu.org>
1118 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1119 grub_uint32_t to avoid a warning.
1121 * loader/i386/linux.c (allocate_pages): When assigning
1122 real_mode_mem, cast through grub_size_t to fix a warning. The
1123 code already makes sure that the value would fit a pointer.
1124 (grub_linux_setup_video): Cast render_target->data to
1125 grub_size_t to fix a warning.
1127 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
1129 * commands/i386/pc/drivemap.c: New file - implement drivemap
1131 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1132 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1134 2009-05-13 Pavel Roskin <proski@gnu.org>
1136 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1137 embedding_area_exists.
1139 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1141 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1142 it easier to understand / work with.
1143 Improve warning messages for cases where there's no embedding area,
1144 or when it is too small (or core.img too large).
1146 2009-05-13 Pavel Roskin <proski@gnu.org>
1148 * loader/i386/pc/multiboot2.c: Add necessary includes for
1149 grub_multiboot2_real_boot().
1151 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1152 PX record is always little-endian. We only need the lower 2
1155 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1156 facilitate code reuse.
1157 (grub_cpio_mount): Use "struct head", not a char buffer. This
1158 fixes a warning reported by gcc 4.4.
1160 * kernel/disk.c (grub_disk_read): Use void pointer for the
1162 (grub_disk_write): Use const void pointer for the buffer.
1163 Adjust all callers. Remove unnecessary casts.
1165 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1167 * util/i386/pc/grub-install.in: Update copyright year.
1169 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1173 * commands/gptsync.c: new file
1174 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1175 (gptsync_mod_SOURCES): new variable
1176 (gptsync_mod_CFLAGS): likewise
1177 (gptsync_mod_LDFLAGS): likewise
1178 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1180 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1181 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1182 * conf/i386-ieee1275.rmk: likewise
1183 * conf/i386-pc.rmk: likewise
1184 * conf/powerpc-ieee1275.rmk: likewise
1186 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1190 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1191 (grub_dl_ref): likewise
1193 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1195 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1196 split in two functions (one for msdos and one for gpt).
1198 2009-05-08 Pavel Roskin <proski@gnu.org>
1200 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1203 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1204 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1205 Initialize them with -1. Add sanity check for bad1. Eliminate
1208 2009-05-08 David S. Miller <davem@davemloft.net>
1210 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1212 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1214 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1217 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
1219 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1220 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1222 2009-05-05 David S. Miller <davem@davemloft.net>
1224 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1226 2009-05-05 Pavel Roskin <proski@gnu.org>
1228 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1229 of grub_dl_ref() and grub_dl_unref().
1230 * commands/parttool.c: Remove preprocessor conditionals around
1231 grub_dl_ref() and grub_dl_unref().
1232 * fs/affs.c: Likewise.
1233 * fs/afs.c: Likewise.
1234 * fs/cpio.c: Likewise.
1235 * fs/ext2.c: Likewise.
1236 * fs/fat.c: Likewise.
1237 * fs/hfs.c: Likewise.
1238 * fs/hfsplus.c: Likewise.
1239 * fs/iso9660.c: Likewise.
1240 * fs/jfs.c: Likewise.
1241 * fs/minix.c: Likewise.
1242 * fs/ntfs.c: Likewise.
1243 * fs/reiserfs.c: Likewise.
1244 * fs/sfs.c: Likewise.
1245 * fs/udf.c: Likewise.
1246 * fs/ufs.c: Likewise.
1247 * fs/xfs.c: Likewise.
1248 * include/grub/dl.h: Likewise.
1249 * loader/xnu.c: Likewise.
1251 2009-05-04 Pavel Roskin <proski@gnu.org>
1253 * commands/acpi.c: Remove unused variable my_mod.
1254 * partmap/amiga.c: Likewise.
1255 * partmap/apple.c: Likewise.
1256 * partmap/gpt.c: Likewise.
1257 * partmap/pc.c: Likewise.
1258 * partmap/sun.c: Likewise.
1259 * term/gfxterm.c: Likewise.
1260 * term/i386/pc/vesafb.c: Likewise.
1261 * term/i386/pc/vga.c: Likewise.
1263 2009-05-04 David S. Miller <davem@davemloft.net>
1265 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1266 pointer args to grub_ieee1275_get_property().
1268 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1270 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1271 devices, and do not traverse down under controller nodes.
1273 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1274 (grub_ofdisk_open): Use it to un-escape "," characters.
1275 * kern/disk.c (find_part_sep): New.
1276 (grub_disk_open): Use it to find the first non-escaped ','
1277 character in the disk name.
1278 * util/ieee1275/devicemap.c (escape_of_path): New.
1279 (grub_util_emit_devicemap_entry): Use it.
1280 * util/sparc64/ieee1275/grub-install.in: Update script to
1281 strip partition specifiers properly by not triggering on
1282 '\' escaped ',' characters.
1284 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1286 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1288 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1290 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1291 on documentation from Wikipedia).
1293 2009-05-04 Pavel Roskin <proski@gnu.org>
1295 * disk/ata.c: Spelling fixes.
1296 * disk/raid.c: Likewise.
1297 * disk/usbms.c: Likewise.
1298 * disk/dmraid_nvidia.c: Likewise.
1299 * kern/ieee1275/openfw.c: Likewise.
1300 * kern/ieee1275/init.c: Likewise.
1301 * kern/ieee1275/cmain.c: Likewise.
1302 * boot/i386/pc/cdboot.S: Likewise.
1303 * video/readers/png.c: Likewise.
1304 * video/i386/pc/vbe.c: Likewise.
1305 * fs/udf.c: Likewise.
1306 * fs/hfs.c: Likewise.
1307 * fs/reiserfs.c: Likewise.
1308 * efiemu/runtime/efiemu.c: Likewise.
1309 * efiemu/main.c: Likewise.
1310 * efiemu/mm.c: Likewise.
1311 * include/grub/elf.h: Likewise.
1312 * include/grub/xnu.h: Likewise.
1313 * include/grub/usbdesc.h: Likewise.
1314 * include/grub/usb.h: Likewise.
1315 * include/grub/script_sh.h: Likewise.
1316 * include/grub/lib/LzmaEnc.h: Likewise.
1317 * include/grub/efiemu/efiemu.h: Likewise.
1318 * include/grub/command.h: Likewise.
1319 * normal/menu.c: Likewise.
1320 * normal/main.c: Likewise.
1321 * normal/datetime.c: Likewise.
1322 * bus/usb/uhci.c: Likewise.
1323 * mmap/i386/uppermem.c: Likewise.
1324 * mmap/mmap.c: Likewise.
1325 * commands/acpi.c: Likewise.
1326 * commands/test.c: Likewise.
1327 * partmap/apple.c: Likewise.
1328 * font/font.c: Likewise.
1329 * loader/sparc64/ieee1275/linux.c: Likewise.
1330 * loader/macho.c: Likewise.
1331 * loader/i386/bsd_trampoline.S: Likewise.
1332 * loader/i386/bsd.c: Likewise.
1333 * loader/xnu.c: Likewise.
1334 * term/i386/pc/vesafb.c: Likewise.
1335 * term/usb_keyboard.c: Likewise.
1336 * util/resolve.c: Likewise.
1337 * util/getroot.c: Likewise.
1339 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1341 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1343 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1345 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1348 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1350 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1351 parameter only available on BIOS.
1353 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1355 Removed wrong semicolon in declaration
1357 * grub/misc.h (grub_dprintf): remove semicolon
1359 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1361 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1362 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1363 is done by grub_cmd_linux() now).
1364 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1365 restore video to text mode.
1366 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1367 indicates lack of "vga=" parameter. "vga=0" is mapped to
1368 `GRUB_LINUX_VID_MODE_NORMAL'.
1370 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1372 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1373 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1374 and `normal/script.c'. Add `kern/rescue_reader.c',
1375 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1376 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1377 `grub_script.tab.c'.
1379 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1380 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1381 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1382 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1383 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1385 * Makefile.in: Remove duplicated 2008 in Copyright line.
1387 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1389 * util/misc.c (grub_util_warn): New function. Emits a warning
1391 * include/grub/util/misc.h (grub_util_warn): New declaration.
1393 * util/i386/pc/grub-install.in: Understand --force and pass it down
1396 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1398 (setup): Improve error messages and add warnings when requested to
1399 install in odd layouts. Refuse to install using blocklists unless
1402 2009-05-04 martin f. krafft <madduck@madduck.net>
1404 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1406 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1408 Updated copyright year
1410 * fs/hfsplus.c: updated copyright year
1412 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1416 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1417 in the space previously used by unused3
1418 (grub_hfsplus_uuid): new function
1419 (grub_hfsplus_fs): added uuid field
1421 2009-05-03 Pavel Roskin <proski@gnu.org>
1423 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1424 suppress warnings. It's no longer needed.
1425 * disk/host.c: Likewise.
1426 * disk/ata_pthru.c: Likewise.
1427 * disk/loopback.c: Likewise.
1428 * hook/datehook.c: Likewise.
1429 * parttool/pcpart.c: Likewise.
1430 * fs/i386/pc/pxe.c: Likewise.
1431 * fs/ntfscomp.c: Likewise.
1432 * efiemu/main.c: Likewise.
1433 * mmap/mmap.c: Likewise.
1434 * commands/crc.c: Likewise.
1435 * commands/hexdump.c: Likewise.
1436 * commands/hdparm.c: Likewise.
1437 * commands/acpi.c: Likewise.
1438 * commands/echo.c: Likewise.
1439 * commands/minicmd.c: Likewise.
1440 * commands/blocklist.c: Likewise.
1441 * commands/memrw.c: Likewise.
1442 * commands/loadenv.c: Likewise.
1443 * commands/usbtest.c: Likewise.
1444 * commands/lsmmap.c: Likewise.
1445 * commands/boot.c: Likewise.
1446 * commands/parttool.c: Likewise.
1447 * commands/configfile.c: Likewise.
1448 * commands/search.c: Likewise.
1449 * commands/ieee1275/suspend.c: Likewise.
1450 * commands/cat.c: Likewise.
1451 * commands/i386/pc/pxecmd.c: Likewise.
1452 * commands/i386/pc/play.c: Likewise.
1453 * commands/i386/pc/halt.c: Likewise.
1454 * commands/i386/pc/vbeinfo.c: Likewise.
1455 * commands/i386/pc/vbetest.c: Likewise.
1456 * commands/lspci.c: Likewise.
1457 * commands/date.c: Likewise.
1458 * commands/handler.c: Likewise.
1459 * commands/ls.c: Likewise.
1460 * commands/test.c: Likewise.
1461 * commands/cmp.c: Likewise.
1462 * commands/efi/loadbios.c: Likewise.
1463 * commands/efi/fixvideo.c: Likewise.
1464 * commands/halt.c: Likewise.
1465 * commands/help.c: Likewise.
1466 * commands/reboot.c: Likewise.
1467 * hello/hello.c: Likewise.
1468 * script/sh/main.c: Likewise.
1469 * loader/xnu.c: Likewise.
1470 * term/terminfo.c: Likewise.
1471 * term/i386/pc/serial.c: Likewise.
1472 * term/usb_keyboard.c: Likewise.
1474 2009-05-03 David S. Miller <davem@davemloft.net>
1476 * normal/menu.c: Include grub/parser.h
1478 2009-05-03 Pavel Roskin <proski@gnu.org>
1480 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1482 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1483 Suggested by Javier MartÃn <lordhabbit@gmail.com>
1485 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1486 efiemu??.o doesn't exist.
1487 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1490 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
1492 FreeBSD 64-bit support
1494 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1495 and loader/i386/bsd_trampoline.S
1496 (bsd_mod_ASFLAGS): new variable
1497 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1498 (FREEBSD_MODTYPE_KERNEL64): likewise
1499 (grub_bsd64_trampoline_start): likewise
1500 (grub_bsd64_trampoline_end): likewise
1501 (grub_bsd64_trampoline_selfjump): likewise
1502 (grub_bsd64_trampoline_gdt): likewise
1503 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1504 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1505 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1506 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1507 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1509 * loader/i386/bsd_pagetable.c: new file
1510 * loader/i386/bsd_trampoline.S: likewise
1511 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1512 (ALIGN_VAR): likewise
1513 (entry_hi): new variable
1514 (kern_end_mdofs): likewise
1515 (is_64bit): likewise
1516 (grub_freebsd_add_meta): use ALIGN_VAR
1517 (grub_e820_mmap): new declaration
1518 (grub_freebsd_add_mmap): new function
1519 (grub_freebsd_add_meta_module): support 64 bit kernels
1520 (grub_freebsd_list_modules): use ALIGN_VAR
1521 (gdt_descriptor): new declaration
1522 (grub_freebsd_boot): support 64 bit kernels
1523 (grub_bsd_elf64_hook): new function
1524 (grub_bsd_load_elf): support elf64
1526 2009-05-03 Bean <bean123ch@gmail.com>
1528 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1529 after we get the result of if statement.
1531 2009-05-03 Bean <bean123ch@gmail.com>
1533 * Makefile.in (enable_efiemu): New variable.
1535 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1537 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1539 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1540 path, add -mno-red-zone option.
1541 (efiemu64_s.o): Likewise.
1542 (efiemu64.o): Use macro $^ for source file.
1544 * configure.ac (--enable-efiemu): New option.
1546 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1550 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1551 (pkglib_MODULES): add xnu.mod
1552 (xnu_mod_SOURCES): new variable
1553 (xnu_mod_CFLAGS): likewise
1554 (xnu_mod_LDFLAGS): likewise
1555 (xnu_mod_ASFLAGS): likewise
1556 * conf/i386-pc.rmk: likewise
1557 * conf/x86_64-efi.rmk: likewise
1558 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1560 * include/grub/i386/macho.h: new file
1561 * include/grub/i386/xnu.h: likewise
1562 * include/grub/macho.h: likewise
1563 * include/grub/machoload.h: likewise
1564 * include/grub/x86_64/macho.h: likewise
1565 * include/grub/x86_64/xnu.h: likewise
1566 * include/grub/xnu.h: likewise
1567 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1568 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1569 * loader/i386/efi/xnu.c: new file
1570 * loader/i386/pc/xnu.c: likewise
1571 * loader/i386/xnu.c: likewise
1572 * loader/i386/xnu_helper.S: likewise
1573 * loader/macho.c: likewise
1574 * loader/xnu.c: likewise
1575 * loader/xnu_resume.c: likewise
1576 * util/grub-dumpdevtree: likewise
1577 * include/grub/i386/pit.h: include grub/err.h
1578 (grub_pit_wait): export
1579 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1581 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1585 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1586 _linux_efi, linux_efi.
1587 new files in grub-emu
1588 new targets efiemu32.o and efiemu64.o
1589 * loader/linux_normal_efiemu.c: likewise
1590 * loader/i386/efi/linux.c: added preliminary efiemu support
1591 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1593 * include/grub/autoefi.h: new file
1594 * include/grub/i386/efiemu.h: likewise
1595 * include/grub/i386/pc/efiemu.h: likewise
1596 * include/grub/efi/api.h: add LL suffix when necessary
1597 new definitions relating to tables
1598 * include/grub/efiemu/efiemu.h: new file
1599 * include/grub/efiemu/runtime.h: likewise
1600 * efiemu/prepare.c: likewise
1601 * efiemu/loadcore_common.c: likewise
1602 * efiemu/loadcore64.c: likewise
1603 * efiemu/runtime/efiemu.sh: likewise
1604 * efiemu/runtime/efiemu.S: likewise
1605 * efiemu/runtime/efiemu.c: likewise
1606 * efiemu/runtime/config.h: likewise
1607 * efiemu/prepare32.c: likewise
1608 * efiemu/main.c: likewise
1609 * efiemu/modules/pnvram.c: likewise
1610 * efiemu/modules/i386: likewise
1611 * efiemu/modules/i386/pc: likewise
1612 * efiemu/modules/acpi.c: likewise
1613 * efiemu/i386/pc/cfgtables.c: likewise
1614 * efiemu/i386/loadcore64.c: likewise
1615 * efiemu/i386/loadcore32.c: likewise
1616 * efiemu/prepare64.c: likewise
1617 * efiemu/loadcore.c: likewise
1618 * efiemu/symbols.c: likewise
1619 * efiemu/mm.c: likewise
1620 * efiemu/loadcore32.c: likewise
1622 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1626 * commands/acpi.c: new file
1627 * commands/i386/pc/acpi.c: likewise
1628 * commands/efi/acpi.c: likewise
1629 * include/grub/acpi.h: likewise
1630 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1631 (acpi_mod_SOURCES): new variable
1632 (acpi_mod_CFLAGS): likewise
1633 (acpi_mod_LDFLAGS): likewise
1634 * conf/i386-efi.rmk: likewise
1635 * conf/x86_64-efi.rmk: likewise
1637 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1639 Missing part from mmap patch
1641 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1642 (grub_mmap_unregister)
1643 (grub_mmap_free_and_unregister): use grub_mmap_register
1645 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1649 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1650 * loader/i386/linux.c (find_mmap_size): likewise
1651 (allocate_pages): likewise
1652 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1653 (grub_fill_multiboot_mmap): likewise
1654 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1655 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1656 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1657 (OPENBSD_MMAP_RESERVED): likewise
1658 * include/grub/i386/pc/memory.h: include grub/memory.h
1659 (grub_lower_mem): removed
1660 (grub_upper_mem): likewise
1661 (GRUB_MACHINE_MEMORY_ACPI): new definition
1662 (GRUB_MACHINE_MEMORY_NVS): likewise
1663 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1664 (GRUB_MACHINE_MEMORY_HOLE): likewise
1665 (grub_machine_mmap_register): likewise
1666 (grub_machine_mmap_unregister): likewise
1667 (grub_machine_get_upper): likewise
1668 (grub_machine_get_lower): likewise
1669 (grub_machine_get_post64): likewise
1670 * include/grub/i386/efi/memory.h: new file
1671 * include/grub/x86_64/efi/memory.h: likewise
1672 * include/grub/efi/memory.h: likewise
1673 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1674 (mmap_mod_SOURCES): new variable
1675 (mmap_mod_LDFLAGS): likewise
1676 (mmap_mod_ASFLAGS): likewise
1677 * conf/i386-coreboot.rmk: likewise
1678 * conf/i386-ieee1275.rmk: likewise
1679 * conf/i386-efi.rmk: likewise
1680 * conf/x86_64-efi.rmk: likewise
1681 * include/grub/types.h (UINT_TO_PTR): new macro
1682 (PTR_TO_UINT32): likewise
1683 (PTR_TO_UINT64): likewise
1684 * include/grub/memory.h: new file
1685 * mmap/i386/pc/mmap.c: likewise
1686 * mmap/i386/pc/mmap_helper.S: likewise
1687 * mmap/i386/uppermem.c: likewise
1688 * mmap/mmap.c: likewise
1689 * mmap/efi/mmap.c: likewise
1690 * kern/i386/coreboot/init.c (grub_machine_init): don't use
1692 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1693 (grub_upper_mem): likewise
1694 (grub_machine_init): don't use grub_upper_mem,
1695 make grub_lower_mem local
1696 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1697 grub_mmap_iterate and grub_mmap_get_upper
1698 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1700 2009-05-02 Bean <bean123ch@gmail.com>
1702 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1704 (pkglib_MODULES): Add normal.mod and sh.mod.
1705 (normal_SOURCES): New variable.
1706 (normal_mod_CFLAGS): Likewise.
1707 (normal_mod_LDFLAGS): Likewise.
1708 (sh_mod_SOURCES): Likewise.
1709 (sh_mod_CFLAGS): Likewise.
1710 (sh_mod_LDFLAGS): Likewise.
1712 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1713 script/sh/lexer.c_DEPENDENCIES.
1714 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1715 kern/rescue_reader.c and kern/rescue_parser.c.
1716 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1717 (grub_emu_SOURCES): Change source files.
1718 (pkglib_MODULES): Remove normal.mod.
1719 (normal_SOURCES): Removed.
1720 (normal_mod_CFLAGS): Likewise.
1721 (normal_mod_LDFLAGS): Likewise.
1722 * conf/i386-coreboot.rmk: Likewise.
1723 * conf/i386-efi.rmk: Likewise.
1724 * conf/i386-ieee1276.rmk: Likewise.
1725 * conf/powerpc-ieee1275.rmk: Likewise.
1726 * conf/sparc64-ieee1275.rmk: Likewise.
1727 * conf/x86_64-efi.rmk: Likewise.
1729 * include/grub/command.h (grub_command_execute): New inline function.
1731 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1733 * include/grub/normal.h: Remove <grub/setjmp.h>.
1734 (grub_fs_module_list): Moved to normal/autofs.c.
1735 (grub_exit_env): Removed.
1736 (grub_command_execute): Likewise.
1737 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1739 (read_command_list): New function declaration.
1740 (read_fs_list): Likewise.
1742 * include/parser.h: Include <grub/reader.h>.
1743 (grub_parser_split_cmdline): Change type of getline parameter.
1744 (grub_parser): New structure.
1745 (grub_parser_class): New variable.
1746 (grub_parser_execute): New function declaration.
1747 (grub_register_rescue_parser): Likewise.
1748 (grub_parser_register): New inline function.
1749 (grub_parser_unregister): Likewise.
1750 (grub_parser_get_current): Likewise.
1751 (grub_parser_set_current): Likewise.
1753 * include/grub/reader.h: New file.
1754 * kern/reader.c: Likewise.
1755 * kern/rescue_parser.c: Likewise.
1756 * kern/rescue_reader.c: Likewise.
1757 * normal/autofs.c: Likewise.
1758 * normal/dyncmd.c: Likewise.
1760 * include/grub/rescue.h: Removed.
1761 * normal/command.h: Likewise.
1763 * include/grub/script.h: Moved to ...
1764 * include/grub/script_sh.h: ... Moved here.
1765 * normal/execute.c: Moved to ...
1766 * script/sh/execute.c: ... Moved here.
1767 * normal/function.c: Moved to ...
1768 * script/sh/function.c: ... Moved here.
1769 * normal/lexer.c: Moved to ...
1770 * script/sh/lexer.c: ... Moved here.
1771 * normal/parser.y: Moved to ...
1772 * script/sh/parser.y: ... Moved here.
1773 * normal/script.c: Moved to ...
1774 * script/sh/script.c: ... Moved here.
1776 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1778 (grub_exit_env): Removed.
1779 (fs_module_list): Moved to normal/autofs.c.
1780 (grub_file_getline): Don't handle comment here.
1781 (free_menu): Skip removed field entry->commands.
1782 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1784 (read_config_file): Removed nested parameter, change getline function.
1785 (grub_enter_normal_mode): Removed.
1786 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1787 (read_command_list): Likewise.
1788 (autoload_fs_module): Moved to normal/autofs.c.
1789 (read_fs_list): Likewise.
1790 (reader_nested): New variable.
1791 (grub_normal_execute): Run parser.sh to switch to sh parser.
1792 (grub_cmd_rescue): Removed.
1793 (cmd_normal): Removed.
1794 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1796 (grub_cmdline_run): New function.
1797 (grub_normal_reader_init): Likewise.
1798 (grub_normal_read_line): Likewise.
1799 (grub_env_write_pager): Likewise.
1800 (cmdline): New variable.
1801 (grub_normal_reader): Likewise.
1802 (GRUB_MOD_INIT): Register normal reader and set as current, register
1803 pager hook, register normal command with grub_register_command_prio,
1804 so that it won't show up in command.lst.
1805 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1806 grub_fs_autoload_hook.
1808 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1809 (grub_menu_execute_entry): Replace grub_script_execute with
1810 grub_parser_execute, change parameter to grub_command_execute.
1812 * normal/menu_text.c: Remove <grub/script.h>.
1814 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1815 and <grub/parser.h>.
1816 (run): Change editor_getline to use new parser interface. Change
1817 parameter to grub_command_execute.
1819 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1820 <grub/reader.h> and <grub/parser.h>.
1821 (grub_load_normal_mode): Execute normal command.
1822 (grub_main): Call grub_register_core_commands,
1823 grub_register_rescue_parser and grub_register_rescue_reader, use
1824 grub_reader_loop to enter input loop.
1826 * kern/parser.c (grub_parser_split_cmdline): Change type of
1828 (grub_parser_class): New variable.
1829 (grub_parser_execute): New function.
1831 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1832 * loader/multiboot2.c: Likewise.
1833 * loader/sparc64/ieee1275/linux.c: Likewise.
1835 * util/grub-emu.c (read_command_list): New dummy function.
1837 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1839 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1840 count to 16 for CCISS and IDA.
1842 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1844 * normal/menu_text.c (grub_wait_after_message): Print a newline
1845 after waiting for user input.
1847 * loader/i386/linux.c: Include `<grub/normal.h>'.
1848 (grub_cmd_linux): Improve the error message about `ask' mode, by
1849 waiting for user input so it's not missed (we can do this, since
1850 user requested interaction).
1852 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1854 Added missing lst to grub-mkrescue
1856 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1857 and ${input_dir}/parttool.lst
1859 2009-04-30 David S. Miller <davem@davemloft.net>
1861 * util/hostdisk.c (device_is_wholedisk): New function.
1862 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1863 zero only if device_is_wholedisk() returns true.
1865 * util/hostdisk.c (convert_system_partition_to_system_disk):
1866 Handle virtual disk devices named /dev/vdiskX as found on sparc
1869 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1870 lettered partition specifier is found, convert to numbered.
1872 2009-04-29 David S. Miller <davem@davemloft.net>
1874 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1875 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1877 * normal/command.c: Add missing newline at end of file.
1879 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1881 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1882 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1883 grub_ofdisk_read): Likewise, and deal similarly with the fact that
1884 ihandles have a 32-bit type but need to be stored in a "void *".
1886 2009-04-28 Pavel Roskin <proski@gnu.org>
1888 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1889 not disk. Adjust all dependencies.
1890 (grub_fs_uuid_close): Use grub_device_close(), not
1893 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1894 parent's partition, don't copy it by reference, as it gets freed
1897 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1899 Preboot hooks support
1901 * commands/boot.c (struct grub_preboot_t): new declaration
1902 (preboots_head): new variable
1903 (preboots_tail): likewise
1904 (grub_loader_register_preboot_hook): new function
1905 (grub_loader_unregister_preboot_hook): likewise
1906 (grub_loader_set): launch preboot hooks
1907 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1908 (grub_loader_register_preboot_hook): new declaration
1909 (grub_loader_unregister_preboot_hook): likewise
1911 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1915 * disk/scsi.c (grub_scsi_open): added missing cast when
1916 calling grub_dprintf
1918 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1920 Bug and warning fixes
1922 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1924 * commands/test.c (test_parse): fixed bug with file tests and corrected
1925 declaration of find_file
1927 2009-04-26 Pavel Roskin <proski@gnu.org>
1929 * Makefile.in: Don't install empty manual pages if help2man is
1930 missing. Use help2man option for output, not shell redirection.
1932 2009-04-26 David S. Miller <davem@davemloft.net>
1934 * util/grub-mkdevicemap.c (make_device_map): Add missing
1935 NESTED_FUNC_ATTR to process_device().
1937 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1941 * commands/test.c: rewritten to use bash-like test
1943 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1945 Parttool autoloading and improvements
1947 * Makefile.in (pkglib_DATA): add parttool.lst
1948 (parttool.lst): new target
1949 * genmk.rb: generate parttool-*
1950 (CLEANFILES): add #{parttool}
1951 (PARTTOOLFILES): new variable
1952 * genparttoollist.sh: new file
1953 * parttool/pcpart.c (grub_pcpart_boot): more feedback
1954 (grub_pcpart_type): likewise
1955 * commands/parttool.c (helpmsg): new variable
1956 (grub_cmd_parttool): output help if not enough arguments are supplied
1958 (GRUB_MOD_INIT(parttool)): use helpmsg
1960 2009-04-24 David S. Miller <davem@davemloft.net>
1962 Avoiding opening same device multiple times in device iterator.
1964 * kern/device.c: (grub_device_iterate): Define struct part_ent,
1965 and use it to build a list of partitions in iterate_disk() and
1966 iterate_partition().
1968 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1971 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1972 grub_devalias_iterate() result instead of unconditional 0.
1973 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1974 Also, capture hook return value, either directly or via
1975 grub_children_iterate(), and propagate to caller.
1976 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1977 grub_children_iterate): Return value is now 'int' instead of
1979 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1980 like a proper iterator, stopping when hooks return non-zero.
1981 (grub_devalias_iterate): Likewise.
1983 2009-04-23 David S. Miller <davem@davemloft.net>
1985 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1987 2009-04-22 David S. Miller <davem@davemloft.net>
1989 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1990 is larger than address_cells, use that value for address_cells too.
1992 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1993 IEEE1275_MAX_PATH_LEN): Define.
1994 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1995 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1996 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1997 'devtype'. Explicitly NULL terminate devalias expansion.
1999 * util/sparc64/ieee1275/misc.c: New file.
2000 * util/sparc64/ieee1275/grub-setup.c: New file.
2001 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2002 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2003 * util/sparc64/ieee1275/grub-install.in: New file.
2004 * util/ieee1275/ofpath.c: New file.
2005 * util/ieee1275/devicemap.c: New file.
2006 * util/devicemap.c: New file.
2007 * util/deviceiter.c: New file.
2008 * kern/sparc64/ieee1275/init.c: New file.
2009 * include/grub/util/ofpath.h: New file.
2010 * include/grub/util/deviceiter.h: New file.
2011 * util/grub-mkdevicemap.c: Include deviceiter.h.
2012 Implement using grub_util_emit_devicemap_entry and
2013 grub_util_iterate_devices.
2014 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2015 util/devicemap.c into grub-mkdevicemap
2016 * conf/i386-efi.rmk: Likewise.
2017 * conf/i386-ieee1275.rmk: Likewise.
2018 * conf/i386-pc.rmk: Likewise.
2019 * conf/powerpc-ieee1275.rmk: Likewise.
2020 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2021 images and installation utilities. Build kernel as image
2022 instead of as elf binary. Use common rules as much as possible.
2024 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
2026 Correct GPT definition
2028 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2031 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
2033 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2035 2009-04-19 David S. Miller <davem@davemloft.net>
2037 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2038 (grub_rescue_cmd_linux): Rename to...
2039 (grub_cmd_linux): and fix prototype.
2040 (grub_rescue_cmd_initrd): Rename to...
2041 (grub_cmd_initrd): and fix prototype.
2042 (cmd_linux, cmd_initrd): New.
2043 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2044 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2046 2009-04-17 Pavel Roskin <proski@gnu.org>
2048 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2050 (grub_ohci_transfer): Likewise.
2052 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2054 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2055 return without a value. Fix inconsistent indentation.
2057 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2058 match struct grub_fs.
2060 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2061 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2062 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2063 * commands/lspci.c (grub_lspci_iter): Likewise.
2065 2009-04-16 Bean <bean123ch@gmail.com>
2067 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2070 2009-04-15 Pavel Roskin <proski@gnu.org>
2072 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2073 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2074 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2077 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2079 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2080 that no multiple data or metadata areas are supported and `Unknown
2083 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2085 Move loader out of the kernel
2087 * kern/loader.c: moved to ...
2088 * commands/boot.c: ... moved here
2089 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2090 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2091 * include/grub/kernel.h (grub_machine_fini): export
2092 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2093 (grub_loader_set): likewise
2094 (grub_loader_unset): likewise
2095 (grub_loader_boot): likewise
2096 * conf/common.rmk: new module boot.mod
2097 (pkglib_MODULES): add boot.mod
2098 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2099 (grub_emu_SOURCES): likewise
2100 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2101 (grub_emu_SOURCES): likewise
2102 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2103 (grub_emu_SOURCES): likewise
2104 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2105 (grub_emu_SOURCES): likewise
2106 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2107 (grub_emu_SOURCES): likewise
2108 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2109 (grub_emu_SOURCES): likewise
2110 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2111 (grub_emu_SOURCES): likewise
2113 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2115 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2117 * kern/misc.c (grub_itoa): Removed function
2118 (grub_ltoa): likewise
2119 (grub_vsprintf): use grub_lltoa
2121 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2125 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2126 * conf/i386-coreboot.rmk: likewise
2127 * conf/i386-ieee1275.rmk: likewise
2128 * conf/powerpc-ieee1275.rmk: likewise
2130 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2132 * INSTALL: Add that `./autogen.sh' needs to be run before
2135 2009-04-14 Bean <bean123ch@gmail.com>
2137 * Makefile.in (pkglib_DATA): Add handler.lst.
2138 (handler.lst): New rule.
2140 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2141 * conf/i386-coreboot.rmk: Likewise.
2142 * conf/i386-ieee1275.rmk: Likewise.
2143 * conf/i386-efi.rmk: Likewise.
2144 * conf/x86_64-efi.rmk: Likewise.
2145 * conf/powerpc-ieee1275.rmk: Likewise.
2146 * conf/sparc64-ieee1275.rmk: Likewise.
2148 * genhandlerlist.sh: New file.
2150 * genmk.rb: Add rules to generate handler.lst.
2152 * include/grub/normal.h (grub_file_getline): New function definition.
2153 (read_handler_list): Likewise.
2154 (free_handler_list): Likewise.
2156 * include/grub/term.h (grub_term_register_input): Add name parameter
2157 for auto generation of handler.lst.
2158 (grub_term_register_output): Likewise.
2160 * normal/handler.c: New file.
2162 * normal/main.c (get_line): Renamed to grub_file_getline.
2163 (read_config_file): Use the newly renamed grub_file_getline.
2164 (read_command_list): Likewise.
2165 (read_fs_list): Likewise.
2166 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2167 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2169 * term/efi/console.c (grub_console_init): Add name parameter for auto
2170 generation of handler.lst.
2171 * term/gfxterm.c: Likewise.
2172 * term/i386/pc/at_keyboard.c: Likewise.
2173 * term/i386/pc/console.c: Likewise.
2174 * term/i386/pc/serial.c: Likewise.
2175 * term/i386/pc/vesafb.c: Likewise.
2176 * term/i386/pc/vga.c: Likewise.
2177 * term/i386/pc/vga_text.c: Likewise.
2178 * term/ieee1275/ofconsole.c: Likewise.
2179 * term/usb_keyboard.c: Likewise.
2181 2009-04-14 Bean <bean123ch@gmail.com>
2183 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2184 properly with null character.
2186 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2188 * configure: Remove.
2189 * config.h.in: Likewise.
2190 * stamp-h.in: Likewise.
2191 * DISTLIST: Likewise.
2192 * conf/common.mk: Likewise.
2193 * conf/i386-coreboot.mk: Likewise.
2194 * conf/i386-efi.mk: Likewise.
2195 * conf/i386-ieee1275.mk: Likewise.
2196 * conf/i386.mk: Likewise.
2197 * conf/i386-pc.mk: Likewise.
2198 * conf/powerpc-ieee1275.mk: Likewise.
2199 * conf/sparc64-ieee1275.mk: Likewise.
2200 * conf/x86_64-efi.mk: Likewise.
2202 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2205 2009-04-14 John Stanley <jpsinthemix@verizon.net>
2206 David S. Miller <davem@davemloft.net>
2208 * util/hostdisk.c (make_device_name): Fix buffer length
2211 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2213 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2214 <sys/param.h> and <sys/sysctl.h>.
2215 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2216 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2217 opening the device and reset them afterwards.
2219 2009-04-13 Pavel Roskin <proski@gnu.org>
2221 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2222 Reported by John Stanley <jpsinthemix@verizon.net>
2224 2009-04-13 Robert Millan <rmh@aybabtu.com>
2226 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2227 that name for menuentries when appropriate.
2229 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2231 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2233 2009-04-13 Robert Millan <rmh@aybabtu.com>
2235 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2236 to Linux, simply abort telling the user it's no longer supported.
2238 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2240 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2241 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
2242 `freebsd_loadenv' only when devices.hints exist.
2244 2009-04-13 Pavel Roskin <proski@gnu.org>
2246 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2248 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2250 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2252 (grub_drive): Likewise.
2254 2009-04-13 David S. Miller <davem@davemloft.net>
2256 * kern/sparc64/ieee1275/ieee1275.c: New file.
2257 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2258 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2259 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2260 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2261 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2262 grub_ieee1275_alloc_physmem): Declare new exported functions.
2264 * include/grub/sparc64/ieee1275/loader.h: New file.
2265 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2266 * include/grub/sparc64/kernel.h: Likewise.
2267 * loader/sparc64/ieee1275/linux.c: Likewise.
2269 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2270 (grub_fstest_SOURCES): Likewise.
2272 * util/hostdisk.c (make_device_name): Do not make any assumptions
2273 about the length of drive names.
2275 * kern/dl.c (grub_dl_load_file): Close file immediately when
2276 we are done using it.
2278 2009-04-12 David S. Miller <davem@davemloft.net>
2280 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2281 values. Noticed by Pavel Roskin.
2283 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2286 * genmk.rb: Add more flexible image type specification, also
2287 pass --strip-unneeded to objcopy.
2288 * conf/i386-pc.rmk: Use *_FORMAT.
2289 * conf/i386-pc.mk: Rebuilt.
2291 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2292 (OFDISK_HASH_SZ): Define.
2293 (ofdisk_hash): New hash table.
2294 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2295 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2296 instead of device phandle which is not unique.
2298 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2299 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2300 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2301 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2302 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2303 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2304 GRUB_KERNEL_MACHINE_DATA_END): Define.
2305 (grub_kernel_image_size, grub_total_module_size): Declare.
2307 2009-04-12 Pavel Roskin <proski@gnu.org>
2309 * configure.ac: Change the logic when we check for target tools.
2310 Do it when the target is specified and it's different from the
2311 specified value of the host.
2313 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
2315 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2316 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2317 GNU/kFreeBSD. Check if a device is a character device. Use
2318 DIOCGMEDIASIZE to get the size.
2319 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2320 support for GNU/kFreeBSD.
2321 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2322 is a character device instead of a block device. Add support for
2323 FreeBSD device names.
2325 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2326 is a character device instead of a block device.
2328 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2329 is a character device instead of a block device.
2331 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2333 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2334 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2335 FreeBSD. Check if a device is a character device. Use
2336 DIOCGMEDIASIZE to get the size.
2337 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2338 support for FreeBSD.
2339 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2340 is a character device instead of a block device. Add support for
2341 FreeBSD device names.
2343 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2344 a character device instead of a block device.
2345 (grub_util_check_char_device): New function.
2347 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2348 a character device instead of a block device.
2350 * include/grub/util/getroot.h (grub_util_check_char_device): New
2353 2009-04-11 David S. Miller <davem@davemloft.net>
2355 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2357 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2358 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2359 function, if present.
2360 (__bswapdi2): Likewise.
2362 * include/grub/sparc64/ieee1275/boot.h: New file.
2363 * boot/sparc64/ieee1275/boot.S: Likewise.
2364 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2366 * kern/misc.c (grub_ltoa): New function.
2367 (grub_vsprintf): Use it to format 'long' integers.
2369 2009-04-10 David S. Miller <davem@davemloft.net>
2371 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2372 slots are of type grub_ieee1275_cell_t.
2373 (grub_nand_read): Likewise.
2374 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2375 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2376 macros are used to compare values in arg/ret block of the call.
2377 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2378 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2379 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2380 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2381 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2382 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2383 grub_ieee1275_close, grub_ieee1275_set_property,
2384 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2385 grub_ieee1275_cell_t.
2386 * kern/ieee1275/openfw.c (grub_map): Likewise.
2387 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2388 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2390 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2391 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2392 (grub_devalias_iterate): Likewise.
2394 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
2398 * fs/ufs.c (INODE_NBLOCKS): new definition
2399 (struct grub_ufs_dirent): added fields for non-BSD dirents
2400 (grub_ufs_get_file_block): fixed double indirect handling
2401 (grub_ufs_lookup_symlink): use more robust way to determine whether
2403 (grub_ufs_find_file): support for non-BSD dirents
2404 (grub_ufs_dir): support for non-BSD dirents
2406 2009-04-10 Bean <bean123ch@gnail.com>
2408 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2409 attribute, otherwise the size would be wrong for i386 platform.
2411 * include/grub/pci.h (grub_pci_read_word): New inline function.
2412 (grub_pci_read_byte): Likewise.
2413 (grub_pci_write): Likewise.
2414 (grub_pci_write_word): Likewise.
2415 (grub_pci_write_byte): Likewise.
2417 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2419 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2420 (find_framebuf): Scan pci to locate the frame buffer address.
2422 * commands/efi/fixvideo.c: New file.
2424 * commands/efi/loadbios.c: Likewise.
2426 * commands/memrw.c: Likewise.
2428 * util/grub-dumpbios.in: Likewise.
2430 * conf/common.rmk (grub-dumpbios): New utility.
2431 (pkglib_MODULES): New module memrw.mod.
2432 (memrw_mod_SOURCE): New macro.
2433 (memrw_mod_CFLAGS): Likewise.
2434 (memrw_mod_LDFLAGS): Likewise.
2436 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2438 (loadbios_mod_SOURCE): New macro.
2439 (loadbios_mod_CFLAGS): Likewise.
2440 (loadbios_mod_LDFLAGS): Likewise.
2441 (fixvideo_mod_SOURCE): Likewise.
2442 (fixvideo_mod_CFLAGS): Likewise.
2443 (fixvideo_mod_LDFLAGS): Likewise.
2445 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2447 (loadbios_mod_SOURCE): New macro.
2448 (loadbios_mod_CFLAGS): Likewise.
2449 (loadbios_mod_LDFLAGS): Likewise.
2450 (fixvideo_mod_SOURCE): Likewise.
2451 (fixvideo_mod_CFLAGS): Likewise.
2452 (fixvideo_mod_LDFLAGS): Likewise.
2454 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
2456 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2458 2009-04-07 David S. Miller <davem@davemloft.net>
2460 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2461 support for R_SPARC_OLO10 relocations. Fix compile warning for
2462 R_SPARC_WDISP30 case.
2463 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2465 2009-04-06 Pavel Roskin <proski@gnu.org>
2467 * include/grub/misc.h (ARRAY_SIZE): New macro.
2468 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2470 * loader/i386/linux.c (allocate_pages): Use free_pages().
2471 (grub_linux_unload): Don't use free_pages().
2472 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2473 wrong index. Treat all other modes as text modes.
2474 (grub_cmd_linux): Initialize vid_mode unconditionally to
2475 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2477 * commands/help.c (print_command_help): Use cmd->prio, not
2478 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2480 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
2484 * parttool/pcpart.c: new file
2485 * commands/parttool.c: likewise
2486 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2487 (parttool_mod_SOURCES): new variable
2488 (parttool_mod_CFLAGS): likewise
2489 (parttool_mod_LDFLAGS): likewise
2490 (pcpart_mod_SOURCES): likewise
2491 (pcpart_mod_CFLAGS): likewise
2492 (pcpart_mod_LDFLAGS): likewise
2493 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2494 and parttool/pcpart.c
2495 * conf/i386-efi.rmk: likewise
2496 * conf/i386-ieee1275.rmk: likewise
2497 * conf/i386-pc.rmk: likewise
2498 * conf/powerpc-ieee1275.rmk: likewise
2499 * conf/sparc64-ieee1275.rmk: likewise
2500 * conf/x86_64-ieee1275.rmk: likewise
2502 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2504 Support for mtime and further expandability of dir command
2506 * include/grub/lib/datetime.h: moved to ...
2507 * include/grub/datetime.h: ... moved here and added
2508 declaration of grub_unixtime2datetime. All users updated
2509 * include/grub/fs.h: new syntax for dir and mtime functions in
2511 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2512 and GRUB_FSHELP_FLAGS_MASK
2513 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2514 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2515 (grub_ext2_mtime): new function
2516 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2517 (grub_hfsplus_mtime): new function
2518 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2519 (GRUB_UFS_ATTR_FILE): likewise
2520 (GRUB_UFS_ATTR_LNK): likewise
2521 (struct grub_ufs_sblock): new fields mtime
2522 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2524 (grub_ufs_dir): mtime support
2525 (grub_ufs_mtime): new function
2526 * fs/affs.c (grub_affs_dir): use new dir syntax
2527 * fs/afs.c (grub_afs_dir): likewise
2528 * fs/cpio.c (grub_cpio_dir): likewise
2529 * fs/fat.c (grub_fat_find_dir): likewise
2530 * fs/hfs.c (grub_hfs_dir): likewise
2531 * fs/iso9660.c (grub_iso9660_dir): likewise
2532 * fs/jfs.c (grub_jfs_dir): likewise
2533 * fs/minix.c (grub_minix_dir): likewise
2534 * fs/ntfs.c (grub_ntfs_dir): likewise
2535 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2536 * fs/sfs.c (grub_sfs_dir): likewise
2537 * fs/xfs.c (grub_xfs_dir): likewise
2538 * util/hostfs.c (grub_hostfs_dir): likewise
2539 * lib/datetime.c: moved to ...
2540 * normal/datetime.c: ... moved here
2541 (grub_unixtime2datetime): new function
2542 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2543 * normal/completion.c (iterate_dir): use new dir syntax
2544 * normal/misc.c (grub_normal_print_device_info): tell the
2545 last modification time of a volume
2546 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2547 * conf/common.rmk: added lib/datetime.c to ls.mod
2548 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2549 (normal_mod_SOURCES): likewise
2550 (datetime_mod_SOURCES): Removed lib/datetime.c
2551 * conf/i386-efi.rmk: likewise
2552 * conf/i386-ieee1275.rmk: likewise
2553 * conf/i386-pc.rmk: likewise
2554 * conf/powerpc-ieee1275.rmk: likewise
2555 * conf/sparc64-ieee1275.rmk: likewise
2556 * conf/x86_64-efi.rmk: likewise
2558 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2560 Trim trailing spaces in FAT label and support mtools-like labels
2562 * fs/fat.c (grub_fat_iterate_dir): New function based
2563 on grub_fat_find_dir
2564 (grub_fat_find_dir): use grub_fat_iterate_dir
2565 (grub_fat_label): likewise
2567 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2569 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2571 remove extraneous kernel_elf_HEADERS
2573 2009-04-04 Bean <bean123ch@gnail.com>
2575 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2577 * util/misc.c: Likewise.
2579 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2581 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2582 instead of grub_printf.
2584 2009-04-03 Robert Millan <rmh@aybabtu.com>
2586 * loader/i386/linux.c (grub_linux_setup_video): Fill
2587 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2588 values from `mode info' structure instead of hardcoded
2591 2009-04-01 Pavel Roskin <proski@gnu.org>
2593 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2595 * genmk.rb: Likewise.
2596 * configure.ac: Likewise.
2598 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2600 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2601 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2603 2009-04-01 David S. Miller <davem@davemloft.net>
2605 * normal/sparc64/setjmp.S: Fix setjmp implementation.
2606 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2607 (grub_setjmp): Mark with 'returns_twice' attribute.
2608 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2609 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2610 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2612 2009-04-01 Robert Millan <rmh@aybabtu.com>
2614 Reapply fix from 2008-07-28 which was accidentally reverted; also
2615 perform the same fix to a similar check in same function.
2617 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2618 with the same number are found, just use issue a warning with
2619 grub_dprintf(), as this error has been reported to be non-fatal.
2621 2009-03-31 Pavel Roskin <proski@gnu.org>
2623 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2624 for cross-compilation.
2626 2009-03-30 Robert Millan <rmh@aybabtu.com>
2628 Fix i386-ieee1275 build.
2630 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2633 2009-03-30 Pavel Roskin <proski@gnu.org>
2635 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2636 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2637 zero-terminated, rely only on the strlen value. Fix comparison
2638 of strings differing in length.
2640 2009-03-30 Robert Millan <rmh@aybabtu.com>
2642 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2643 checking for abi version. Improve error messages on BIOS to notify
2644 user about `linux16' command.
2646 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2650 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2651 in case of collision
2652 * disk/scsi.c (grub_scsi_open): free scsi in case of error
2654 2009-03-29 Robert Millan <rmh@aybabtu.com>
2656 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2657 set `vid_mode' accordingly.
2658 (grub_linux_boot): Process `vid_mode' and set video mode.
2660 2009-03-29 Robert Millan <rmh@aybabtu.com>
2662 * util/grub.d/10_linux.in (linux_entry): New function.
2663 Factorize generation of Linux boot entries.
2665 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2667 Make the format of Environment Block plain text. The boot loader
2668 part is not tested well yet.
2670 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2673 (usage): Remove "info" and "clear". Add "unset". Update the
2674 description of "set", as this does not delete variables any
2676 (create_envblk_file): Complete rewrite.
2677 (open_envblk_file): Likewise.
2678 (cmd_info): Removed.
2679 (cmd_list): Likewise.
2680 (cmd_set): Likewise.
2681 (cmd_clear): Likewise.
2682 (list_variables): New function.
2683 (write_envblk): Likewise.
2684 (set_variables): Likewise.
2685 (unset_variables): Likewise.
2686 (main): Complete rewrite.
2688 * commands/loadenv.c (buffer): Removed.
2690 (open_envblk_file): New function.
2691 (read_envblk_file): Complete rewrite.
2692 (grub_cmd_load_env): Likewise.
2693 (grub_cmd_list_env): Likewise.
2694 (struct blocklist): New struct.
2695 (free_blocklists): New function.
2696 (check_blocklists): Likewise.
2697 (write_blocklists): Likewise.
2698 (grub_cmd_save_env): Complete rewrite.
2700 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2701 a plain text signature.
2702 (GRUB_ENVBLK_MAXLEN): Removed.
2703 (struct grub_envblk): Complete rewrite.
2704 (grub_envblk_find): Removed.
2705 (grub_envblk_insert): Likewise.
2706 (grub_envblk_open): New prototype.
2707 (grub_envblk_set): Likewise.
2708 (grub_envblk_delete): Put const to VALUE.
2709 (grub_envblk_iterate): Put const to NAME and VALUE.
2710 (grub_envblk_close): New prototype.
2711 (grub_envblk_buffer): New inline function.
2712 (grub_envblk_size): Likewise.
2714 * lib/envblk.c: Include grub/mm.h.
2715 (grub_env_find): Removed.
2716 (grub_envblk_open): New function.
2717 (grub_envblk_close): Likewise.
2718 (escaped_value_len): Likewise.
2719 (find_next_line): Likewise.
2720 (grub_envblk_insert): Removed.
2721 (grub_envblk_set): New function.
2722 (grub_envblk_delete): Complete rewrite.
2723 (grub_envblk_iterate): Likewise.
2725 2009-03-28 Robert Millan <rmh@aybabtu.com>
2727 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2728 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2729 variables. Use 16-bit loader.
2730 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2732 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2733 (grub_linux16_boot): ... this. Update all users.
2734 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2735 (grub_linux_boot): ... this. Update all users.
2737 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2738 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2739 commands to `linux16' and `initrd16'.
2740 (GRUB_MOD_FINI(linux)): Rename to ...
2741 (GRUB_MOD_FINI(linux16)): ... this.
2743 2009-03-24 Pavel Roskin <proski@gnu.org>
2745 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2746 not just for compilation.
2748 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2750 Move multiboot helper out of kernel
2752 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2753 `loader/i386/multiboot_helper.S'.
2754 * conf/i386-coreboot.rmk: Likewise
2755 * conf/i386-ieee1275.rmk: Likewise
2757 * kern/i386/loader.S: Move multiboot helpers from here...
2758 * loader/i386/multiboot_helper.S: ...moved here
2759 * include/grub/i386/loader.h: Move declarations of multiboot
2760 helpers from here...
2761 * include/grub/i386/multiboot.h: ...moved here
2762 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2764 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2766 * kern/env.c (grub_env_context_open): Added an argument to specify
2767 whether a new context inherits exported variables from current
2768 one. This is useful when making a sandbox to interpret a config
2770 All callers updated.
2772 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2774 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2776 * kern/env.c (grub_env_context_close): Fix memory leaks.
2778 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2780 * normal/main.c (grub_normal_execute): Added an argument
2781 BATCH to specify if an interactive interface should be provided
2782 after reading a config file.
2783 All callers updated.
2784 (read_command_list): Prevent being executed twice.
2785 (read_fs_list): Likewise.
2787 * include/grub/normal.h (grub_normal_execute): Updated the
2790 2009-03-22 Pavel Roskin <proski@gno.org>
2792 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2794 * kern/i386/pc/startup.S: Likewise.
2795 * kern/i386/efi/startup.S: Likewise.
2796 * kern/i386/ieee1275/startup.S: Likewise.
2797 * kern/i386/coreboot/startup.S: Likewise.
2798 * kern/x86_64/efi/startup.S: Likewise.
2800 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2801 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2802 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2804 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2806 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2808 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2810 Use vaddr of correct segment for entry_point.
2812 2009-03-21 Bean <bean123ch@gmail.com>
2814 * commands/blocklist.c: Add include file <grub/command.h>, remove
2815 <grub/normal.h> and <grub/arg.h>.
2816 (grub_cmd_blocklist): Use the new command interface.
2817 (GRUB_MOD_INIT): Likewise.
2818 (GRUB_MOD_FINI): Likewise.
2819 * commands/boot.c: Likewise.
2820 * commands/cat.c: Likewise.
2821 * commands/cmp.c: Likewise.
2822 * commands/configfile.c: Likewise.
2823 * commands/crc.c: Likewise.
2824 * commands/echo.c: Likewise.
2825 * commands/halt.c: Likewise.
2826 * commands/handler.c: Likewise.
2827 * commands/hdparm.c: Likewise.
2828 * commands/help.c: Likewise.
2829 * commands/hexdump.c: Likewise.
2830 * commands/loadenv.c: Likewise.
2831 * commands/ls.c: Likewise.
2832 * commands/lsmmap.c: Likewise.
2833 * commands/lspci.c: Likewise.
2834 * commands/loadenv.c: Likewise.
2835 * commands/read.c: Likewise.
2836 * commands/reboot.c: Likewise.
2837 * commands/search.c: Likewise.
2838 * commands/sleep.c: Likewise.
2839 * commands/test.c: Likewise.
2840 * commands/usbtest.c: Likewise.
2841 * commands/videotest.c: Likewise.
2842 * commands/i386/cpuid.c: Likewise.
2843 * commands/i386/pc/halt.c: Likewise.
2844 * commands/i386/pc/play.c: Likewise.
2845 * commands/i386/pc/pxecmd.c: Likewise.
2846 * commands/i386/pc/vbeinfo.c: Likewise.
2847 * commands/i386/pc/vbetest.c: Likewise.
2848 * commands/ieee1275/suspend.c: Likewise.
2849 * disk/loopback.c: Likewise.
2850 * font/font_cmd.c: Likewise.
2851 * hello/hello.c: Likewise.
2852 * loader/efi/appleloader.c: Likewise.
2853 * loader/efi/chainloader.c: Likewise.
2854 * loader/i386/bsd.c: Likewise.
2855 * loader/i386/efi/linux.c: Likewise.
2856 * loader/i386/ieee1275/linux.c: Likewise.
2857 * loader/i386/linux.c: Likewise.
2858 * loader/i386/pc/chainloader.c: Likewise.
2859 * loader/i386/pc/linux.c: Likewise.
2860 * loader/powerpc/ieee1275/linux.c: Likewise.
2861 * loader/multiboot_loader.c: Likewise.
2862 * term/gfxterm.c: Likewise.
2863 * term/i386/pc/serial.c: Likewise.
2864 * term/terminfo.c: Likewise.
2866 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2867 * term/i386/pc/vga.c: Likewise.
2868 * video/readers/jpeg.c: Likewise.
2869 * video/readers/png.c: Likewise.
2870 * video/readers/tga.c: Likewise.
2872 * util/grub-fstest (cmd_loopback): Removed.
2873 (cmd_blocklist): Likewise.
2875 (grub_register_command): Likewise.
2876 (grub_unregister_command): Likewise.
2877 (execute_command): Use grub_command_find to locate command and execute
2880 * include/grub/efi/chainloader.h: Removed.
2881 * loader/efi/chainloader_normal.c: Likewise.
2882 * loader/i386/bsd_normal.c: Likewise.
2883 * loader/i386/pc/chainloader_normal.c: Likewise.
2884 * loader/i386/pc/multiboot_normal.c: Likewise.
2885 * loader/linux_normal.c: Likewise.
2886 * loader/multiboot_loader_normal.c: Likewise.
2887 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2889 * gencmdlist.sh: Scan new registration command grub_register_extcmd
2890 and grub_register_command_p1.
2892 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2893 kern/command.c, lib/arg.c and commands/extcmd.c.
2894 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2895 (minicmd_mod_SOURCES): New variable.
2896 (minicmd_mod_CFLAGS): Likewise.
2897 (minicmd_mod_LDFLAGS): Likewise.
2898 (extcmd_mod_SOURCES): Likewise.
2899 (extcmd_mod_CFLAGS): Likewise.
2900 (extcmd_mod_LDFLAGS): Likewise.
2901 (boot_mod_SOURCES): Removed.
2902 (boot_mod_CFLAGS): Likewise.
2903 (boot_mod_LDFLAGS): Likewise.
2905 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2907 (kernel_img_HEADERS): Add command.h.
2908 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2909 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2911 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2912 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2913 remove the corresponding normal mode command.
2914 (normal_mod_SOURCES): Remove normal/arg.c.
2915 * conf/i386-coreboot.rmk: Likewise.
2916 * conf/i386-efi.rmk: Likewise.
2917 * conf/i386-ieee1275.rmk: Likewise.
2918 * conf/powerpc-ieee1275.rmk: Likewise.
2919 * conf/x86_64-efi.rmk: Likewise.
2921 * include/grub/arg.h: Move from here ...
2922 * include/grub/lib/arg.h: ... to here.
2924 * normal/arg.c: Move from here ...
2925 * lib/arg.c: ... to here.
2927 * commands/extcmd.c: New file.
2928 * commands/minicmd.c: Likewise.
2929 * include/grub/command.h: Likewise.
2930 * include/grub/extcmd.h: Likewise.
2931 * kern/command.c: Likewise.
2932 * kern/corecmd.c: Likewise.
2934 * kern/list.c (grub_list_iterate): Return int instead of void.
2935 (grub_list_insert): New function.
2936 (grub_prio_list_insert): Likewise.
2938 * kern/rescue.c (grub_rescue_command): Removed.
2939 (grub_rescue_command_list): Likewise.
2940 (grub_rescue_register_command): Likewise.
2941 (grub_rescue_unregister_command): Likewise.
2942 (grub_rescue_cmd_boot): Move to minicmd.c
2943 (grub_rescue_cmd_help): Likewise.
2944 (grub_rescue_cmd_info): Likewise.
2945 (grub_rescue_cmd_boot): Likewise.
2946 (grub_rescue_cmd_testload): Likewise.
2947 (grub_rescue_cmd_dump): Likewise.
2948 (grub_rescue_cmd_rmmod): Likewise.
2949 (grub_rescue_cmd_lsmod): Likewise.
2950 (grub_rescue_cmd_exit): Likewise.
2951 (grub_rescue_print_devices): Moved to corecmd.c.
2952 (grub_rescue_print_files): Likewise.
2953 (grub_rescue_cmd_ls): Likewise.
2954 (grub_rescue_cmd_insmod): Likewise.
2955 (grub_rescue_cmd_set): Likewise.
2956 (grub_rescue_cmd_unset): Likewise.
2957 (attempt_normal_mode): Use grub_command_find to get normal module.
2958 (grub_enter_rescue_mode): Use grub_register_core_commands to register
2959 commands, remove grub_rescue_register_command calls.
2961 * normal/command.c (grub_register_command): Removed.
2962 (grub_unregister_command): Likewise.
2963 (grub_command_find): Likewise.
2964 (grub_iterate_commands): Likewise.
2965 (rescue_command): Likewise.
2966 (export_command): Moved to corecmd.c.
2967 (set_command): Removed.
2968 (unset_command): Likewise.
2969 (insmod_command): Likewise.
2970 (rmmod_command): Likewise.
2971 (lsmod_command): Likewise.
2972 (grub_command_init): Likewise.
2974 * normal/completion.c (iterate_command): Use cmd->prio to check for
2976 (complete_arguments): Use grub_extcmd_t structure to find options.
2977 (grub_normal_do_completion): Change function grub_iterate_commands to
2978 grub_command_iterate.
2980 * normal/execute.c (grub_script_execute_cmd): No need to parse
2983 * normal/main.c (grub_dyncmd_dispatcher): New function.
2984 (read_command_list): Register unload commands as dyncmd.
2985 (grub_cmd_normal): Use new command interface, register rescue,
2986 unregister normal at entry, register normal, unregister rescue at exit.
2988 * include/grub/list.h (grub_list_test_t): New type.
2989 (grub_list_iterate): Return int instead of void.
2990 (grub_list_insert): New function.
2991 (GRUB_AS_NAMED_LIST_P): New macro.
2992 (GRUB_AS_PRIO_LIST): Likewise.
2993 (GRUB_AS_PRIO_LIST_P): Likewise.
2994 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2995 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2996 (grub_prio_list): New structure.
2997 (grub_prio_list_insert): New function.
2998 (grub_prio_list_remove): New inline function.
3000 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3001 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3002 (GRUB_COMMAND_FLAG_MENU): Likewise.
3003 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3004 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3005 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3006 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3007 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3008 (grub_command): Likewise.
3009 (grub_register_command): Likewise.
3010 (grub_command_find): Likewise.
3011 (grub_iterate_commands): Likewise.
3012 (grub_command_init): Likewise.
3013 (grub_arg_parse): Likewise.
3014 (grub_arg_show_help): Likewise.
3016 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3017 (grub_rescue_unregister_command): Likewise.
3019 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3020 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3021 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3023 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3024 grub_rescue_cmd_initrd.
3025 * include/grub/i386/loader.h: Likewise.
3026 * include/grub/x86_64/loader.h: Likewise.
3028 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3030 2009-03-21 Bean <bean123ch@gmail.com>
3032 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3033 instead of stat in mingw environment.
3035 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3037 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3039 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3042 2009-03-21 Bean <bean123ch@gmail.com>
3044 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3047 2009-03-18 Michel Dänzer <michel@daenzer.net>
3049 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3050 checking inode flags for EXT4_EXTENTS_FLAG.
3052 2009-03-18 Robert Millan <rmh@aybabtu.com>
3054 * loader/i386/linux.c: Include `<grub/video.h>' and
3055 `<grub/i386/pc/vbe.h>'..
3056 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3057 (grub_linux32_boot): Attempt to configure video settings with
3058 grub_linux_setup_video().
3059 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3060 to avoid grub_console_fini() which would step out of graphical mode
3063 2009-03-14 Robert Millan <rmh@aybabtu.com>
3065 Fix build on powerpc.
3066 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3068 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3070 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3071 background image command.
3073 2009-03-12 Colin D Bennett <colin@gibibit.com>
3075 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3076 (grub_gfxterm_putchar): Extract pairs of identical calls to
3077 draw_cursor out of conditional blocks.
3079 2009-03-11 Pavel Roskin <proski@gnu.org>
3081 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3082 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3084 2009-03-11 Robert Millan <rmh@aybabtu.com>
3086 * loader/i386/multiboot_elfxx.c
3087 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3089 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
3091 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3094 2009-03-11 Robert Millan <rmh@aybabtu.com>
3096 * loader/i386/multiboot.c (code_size): New variable.
3097 (grub_multiboot): Define offsets by adding to `code_size' rather
3098 than subtracting from `grub_multiboot_payload_size'. Provide
3099 4-byte alignment to MBI and others by increasing
3100 `boot_loader_name_length' appropriately.
3102 * loader/i386/multiboot_elfxx.c
3103 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3105 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
3107 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3110 2009-03-08 Robert Millan <rmh@aybabtu.com>
3112 Make loader/i386/linux.c usable on i386-pc again.
3114 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3116 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3119 2009-03-07 Bean <bean123ch@gmail.com>
3121 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3124 2009-03-06 Robert Millan <rmh@aybabtu.com>
3126 Fix display issue on terminals with screen size other than 80x25
3127 (e.g. gfxterm with resolution higher than 640x480).
3129 * normal/main.c (grub_normal_init_page): Display title text in a
3130 position relative to the center of the terminal instead of relying
3131 on a hardcoded offset.
3133 2009-03-04 Robert Millan <rmh@aybabtu.com>
3135 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3138 * Makefile.in (host_kernel): New variable.
3139 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3140 scripts instead of just the windows one.
3141 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3143 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3145 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3147 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3148 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3149 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3150 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3151 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3152 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3154 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3156 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3157 or if there's no space for the disk label and print the partition number on a
3160 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3162 * util/misc.c: Include <time.h>.
3163 (grub_millisleep): New function.
3165 2009-03-04 Bean <bean123ch@gmail.com>
3167 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3168 another option -mno-red-zone.
3170 * commands/handler.c: Change module description.
3172 * kern/handler.c: Add missing space at the end of description line.
3174 * kern/list.c: Likewise.
3176 2009-03-03 Robert Millan <rmh@aybabtu.com>
3178 Move more components to the relocation area, and fix mbi pointer
3179 handling to use the destination rather than the origin (thanks to
3180 Vladimir Serbinenko for spotting).
3182 * loader/i386/multiboot.c (mbi_dest): New variable.
3183 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3184 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3187 2009-03-01 Bean <bean123ch@gmail.com>
3189 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3190 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3191 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3192 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3194 * loader/i386/efi/linux.c (acpi_guid): New variable.
3195 (acpi_guid): Likewise.
3196 (EBDA_SEG_ADDR): New constant.
3197 (LOW_MEM_ADDR): Likewise.
3198 (FAKE_EBDA_SEG): Likewise.
3199 (fake_bios_data): New function.
3200 (grub_linux_boot): Call fake_bios_data.
3202 2009-03-01 Bean <bean123ch@gmail.com>
3204 * commands/terminal.c: Removed.
3206 * commands/handler.c: New file.
3208 * include/grub/list.h: Likewise.
3210 * include/grub/handler.h: Likewise.
3212 * kern/list.c: Likewise.
3214 * kern/handler.c: Likewise.
3216 * kern/term.h: Include header file <grub/handler.h>.
3217 (grub_term_input): Move next field to the beginning.
3218 (grub_term_output): Likewise.
3219 (grub_term_input_class): New variable.
3220 (grub_term_output_class): Likewise.
3221 (grub_term_register_input): Changed to inline function.
3222 (grub_term_register_output): Likewise.
3223 (grub_term_unregister_input): Likewise.
3224 (grub_term_unregister_output): Likewise.
3225 (grub_term_set_current_input): Likewise.
3226 (grub_term_set_current_output): Likewise.
3227 (grub_term_get_current_input): Likewise.
3228 (grub_term_get_current_output): Likewise.
3229 (grub_term_iterate_input): Removed.
3230 (grub_term_iterate_output): Likewise.
3232 * kern/term.c (grub_term_list_input): Removed.
3233 (grub_term_list_output): Likewise.
3234 (grub_term_input_class): New variable.
3235 (grub_term_output_class): Likewise.
3236 (grub_cur_term_input): Change variable as macro.
3237 (grub_cur_term_output): Likewise.
3238 (grub_term_register_input): Removed.
3239 (grub_term_register_output): Likewise.
3240 (grub_term_unregister_input): Likewise.
3241 (grub_term_unregister_output): Likewise.
3242 (grub_term_set_current_input): Likewise.
3243 (grub_term_set_current_output): Likewise.
3244 (grub_term_iterate_input): Likewise.
3245 (grub_term_iterate_output): Likewise.
3246 (grub_term_get_current_input): Likewise.
3247 (grub_term_get_current_output): Likewise.
3249 * util/grub-editenv.c: Include header file <grub/handler.h>.
3250 (grub_term_get_current_input): Removed.
3251 (grub_term_get_current_output): Likewise.
3252 (grub_term_input_class): New variable.
3253 (grub_term_output_class): Likewise.
3255 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3256 (grub_term_get_current_output): Likewise.
3257 (grub_term_input_class): New variable.
3258 (grub_term_output_class): Likewise.
3260 * util/grub-probe.c (grub_term_get_current_input): Removed.
3261 (grub_term_get_current_output): Likewise.
3262 (grub_term_input_class): New variable.
3263 (grub_term_output_class): Likewise.
3265 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3266 (grub_term_get_current_output): Likewise.
3267 (grub_term_input_class): New variable.
3268 (grub_term_output_class): Likewise.
3270 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3271 (terminal_mod_SOURCES): Likewise.
3272 (terminal_mod_CFLAGS): Likewise.
3273 (terminal_mod_LDFLAGS): Likewise.
3275 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3277 (kernel_img_SOURCES): Add list.c and handler.c.
3278 (kernel_img_HEADERS): Add list.h and handler.h.
3280 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3282 (kernel_mod_SOURCES): Add list.c and handler.c.
3283 (kernel_mod_HEADERS): Add list.h and handler.h.
3285 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3287 (kernel_elf_SOURCES): Add list.c and handler.c.
3288 (kernel_elf_HEADERS): Add list.h and handler.h.
3290 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3292 (kernel_elf_SOURCES): Add list.c and handler.c.
3293 (kernel_elf_HEADERS): Add list.h and handler.h.
3295 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3297 (kernel_mod_SOURCES): Add list.c and handler.c.
3298 (kernel_mod_HEADERS): Add list.h and handler.h.
3300 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3302 (kernel_elf_SOURCES): Add list.c and handler.c.
3303 (kernel_elf_HEADERS): Add list.h and handler.h.
3305 2009-02-27 Robert Millan <rmh@aybabtu.com>
3307 Factorize elf32 / elf64 code in Multiboot loader. This will
3308 prevent it from getting out of sync again.
3310 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3311 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3312 grub_multiboot_load_elf64): Move from here ...
3313 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3314 grub_multiboot_load_elf): ... to here (new file).
3316 2009-02-27 Robert Millan <rmh@aybabtu.com>
3318 * util/grub.d/10_linux.in: Rename "single-user mode" to
3321 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3323 Don't leak in SCSI code.
3324 * disk/scsi.c (grub_scsi_close): free `scsi'.
3326 2009-02-27 Robert Millan <rmh@aybabtu.com>
3328 * loader/i386/pc/multiboot.c: Move from here ...
3329 * loader/i386/multiboot.c: ... to here. Update all users.
3331 2009-02-27 Robert Millan <rmh@aybabtu.com>
3333 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3334 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3336 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
3338 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3341 2009-02-27 Robert Millan <rmh@aybabtu.com>
3343 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3344 `0x' qualifier as 0 when base is specified as parameter).
3346 2009-02-24 Bean <bean123ch@gmail.com>
3348 * configure.ac: Check for -mcmodel=large in x86_64 target.
3350 * include/grub/efi/api.h (efi_call_10): New macro.
3351 (efi_wrap_10): New function.
3353 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3354 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3355 (GRUB_PE32_REL_BASED_LOW): Likewise.
3356 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3357 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3358 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3359 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3360 (GRUB_PE32_REL_BASED_REL): Likewise.
3361 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3362 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3363 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3365 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3368 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3369 (efi_wrap_10): New function.
3371 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3373 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3374 MB/MBP model (NV chipset).
3375 (devdata_devs): Add devpath_5 to the list.
3377 * load/i386/efi/linux.c (video_base): Remove variable.
3378 (RGB_MASK): New macro.
3379 (RGB_MAGIC): Likewise.
3380 (LINE_MIN): Likewise.
3381 (LINE_MAX): Likewise.
3382 (FBTEST_STEP): Likewise.
3383 (FBTEST_COUNT): Likewise.
3384 (fb_list): New variable.
3385 (grub_find_video_card): Remove function.
3386 (find_framebuf): New function.
3387 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3390 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3393 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3395 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3397 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3400 2009-02-22 Robert Millan <rmh@aybabtu.com>
3402 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3403 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3404 in our relocation, instead of using it directly from heap. Also
3405 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3407 2009-02-21 Robert Millan <rmh@aybabtu.com>
3409 Implement USB keyboard support (based on patch by Marco Gerards)
3411 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3412 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3413 (usb_keyboard_mod_LDFLAGS): New variables.
3415 * term/usb_keyboard.c: New file.
3417 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3419 Corrected wrong declaration
3421 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3423 2009-02-14 Christian Franke <franke@computer.org>
3425 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3426 (grub_lspci_iter): Print class code and programming interface byte.
3428 2009-02-14 Christian Franke <franke@computer.org>
3430 * gendistlist.sh: Ignore `.svn' directories.
3432 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
3434 * fs/fat.c: Add 2009 to Copyright line.
3436 2009-02-14 Christian Franke <franke@computer.org>
3438 * commands/hdparm.c: New file. Provides `hdparm' command
3439 which sends ATA commands via grub_disk_ata_pass_through ().
3441 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3443 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3444 and <grub/cpu/io.h> to include/grub/ata.h.
3445 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3446 (GRUB_CDROM_SECTOR_SIZE): Remove.
3447 (GRUB_ATA_*): Move to include/grub/ata.h.
3448 (GRUB_ATAPI_*): Likewise.
3449 (enum grub_ata_commands): Likewise.
3450 (enum grub_ata_timeout_milliseconds): Likewise.
3451 (struct grub_ata_device): Likewise.
3452 (grub_ata_regset): Likewise.
3453 (grub_ata_regget): Likewise.
3454 (grub_ata_regset2): Likewise.
3455 (grub_ata_regget2): Likewise.
3456 (grub_ata_check_ready): Likewise.
3457 (grub_ata_wait_not_busy): Remove static, exported in
3459 (grub_ata_wait_drq): Likewise.
3460 (grub_ata_pio_read): Likewise.
3462 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3463 function for hdparm.mod.
3465 * include/grub/ata.h: New file, contains declarations from
3467 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3469 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3470 (grub_disk_ata_pass_through): New exported variable.
3472 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3474 2009-02-13 Colin D Bennett <colin@gibibit.com>
3476 Support multiple fallback entries, and provide an API to support
3477 executing default+fallback menu entries. Renamed the `terminal' menu
3480 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3481 variable declaration.
3482 (grub_menu_execute_callback): New structure declaration.
3483 (grub_menu_execute_callback_t): New typedef.
3484 (grub_menu_execute_with_fallback): New function declaration.
3485 (grub_menu_get_entry): Likewise.
3486 (grub_menu_get_timeout): Likewise.
3487 (grub_menu_set_timeout): Likewise.
3489 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3491 * normal/menu.c (grub_wait_after_message): Moved to
3492 `normal/menu_text.c'.
3493 (draw_border): Likewise.
3494 (print_message): Likewise.
3495 (print_entry): Likewise.
3496 (print_entries): Likewise.
3497 (grub_menu_init_page): Likewise.
3498 (get_entry_number): Likewise.
3499 (print_timeout): Likewise.
3500 (run_menu): Likewise.
3501 (grub_menu_execute_entry): Likewise.
3502 (show_text_menu): Likewise.
3503 (get_and_remove_first_entry_number): New function.
3504 (grub_menu_execute_with_fallback): Likewise.
3505 (get_entry): Renamed to ...
3506 (grub_menu_get_entry): .. this and made it global.
3507 (get_timeout): Renamed to ...
3508 (grub_menu_get_timeout): ... this and made it global.
3509 (set_timeout): Renamed to ...
3510 (grub_menu_set_timeout): ... this and made it global.
3511 (grub_normal_terminal_menu_viewer): Renamed to ...
3512 (grub_normal_text_menu_viewer): ... this.
3514 * normal/menu_text.c: New file. Extracted text-menu-specific code
3517 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3518 (normal_mod_SOURCES): Likewise.
3520 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3521 (normal_mod_SOURCES): Likewise.
3523 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3524 (normal_mod_SOURCES): Likewise.
3526 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3527 (normal_mod_SOURCES): Likewise.
3529 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3530 (normal_mod_SOURCES): Likewise.
3532 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3533 (normal_mod_SOURCES): Likewise.
3535 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3536 (normal_mod_SOURCES): Likewise.
3538 2009-02-11 Robert Millan <rmh@aybabtu.com>
3540 * util/grub.d/00_header.in: Update old reference to `font' command.
3542 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
3544 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3546 Based on patch from Javier MartÃn.
3548 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3550 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3551 to avoid false positives with FAT.
3552 (grub_fstest_SOURCES): Likewise.
3553 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3554 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3555 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3556 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3557 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3558 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3560 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3562 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3563 bpb.version_specific.fat12_or_fat16.fstype and
3564 bpb.version_specific.fat32.fstype.
3566 2009-02-08 Robert Millan <rmh@aybabtu.com>
3568 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3570 2009-02-08 Robert Millan <rmh@aybabtu.com>
3572 * Makefile.in (host_os, host_cpu): New variables.
3573 (target_os): Remove. Update all users.
3575 2009-02-08 Marco Gerards <marco@gnu.org>
3577 * Makefile.in (enable_grub_emu_usb): New variable.
3578 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3579 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3580 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3581 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3582 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3583 `usbtest.mod' and `usbms.mod'.
3584 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3585 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3586 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3587 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3588 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3591 * disk/usbms.c: New file.
3593 * include/grub/usb.h: Likewise.
3595 * include/grub/usbtrans.h: Likewise.
3597 * include/grub/usbdesc.h: Likewise.
3599 * bus/usb/usbtrans.c: Likewise.
3601 * bus/usb/ohci.c: Likewise.
3603 * bus/usb/uhci.c: Likewise.
3605 * bus/usb/usbhub.c: Likewise.
3607 * bus/usb/usb.c: Likewise.
3609 * commands/usbtest.c: Likewise.
3611 * util/usb.c: Likewise.
3613 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3615 * configure.ac: Test for libusb presence.
3617 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3619 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3621 * kern/mm.c: Add more comments.
3623 2009-02-08 Robert Millan <rmh@aybabtu.com>
3625 Patch from Javier MartÃn.
3626 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3627 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3629 2009-02-08 Robert Millan <rmh@aybabtu.com>
3631 * fs/cpio.c: Split tar functionality to ...
3632 * fs/tar.c: ... here (new file). Update all users.
3634 2009-02-07 Robert Millan <rmh@aybabtu.com>
3636 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3637 backward-incompatible features.
3639 Based on patch from Javier MartÃn, with some adjustments.
3641 2009-02-07 Michael Scherer <misc@mandriva.org>
3643 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3645 2009-02-07 Robert Millan <rmh@aybabtu.com>
3647 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3648 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3649 after the RAID stuff.
3651 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3653 Fixes problem when running vbetest command as reported by
3654 Vladimir Serbinenko <phcoder@gmail.com>.
3656 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3658 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
3660 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3661 /dev/md/NpN style mdraid devices.
3663 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3665 * util/unifont2pff.rb: Remove.
3667 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3669 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3672 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3674 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3675 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3676 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3677 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3678 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3679 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3680 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3682 2009-02-02 Christian Franke <franke@computer.org>
3684 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3686 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
3688 * INSTALL: Note that we now require at least autoconf 2.59 and
3689 that LZO is optional.
3691 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3693 Base on patch on bug #24154 created by Tomas Tintera
3696 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3698 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3700 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3701 <bero@arklinux.org>.
3703 * normal/parser.y (script_init): Add missing semicolon.
3705 2009-01-31 Colin D Bennett <colin@gibibit.com>
3707 * normal/main.c: Add include to grub/menu_viewer.h.
3708 (free_menu_entry_classes): Added.
3709 (grub_normal_menu_addentry): Added class property handling.
3710 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3711 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3713 * normal/menu_viewer.c: New file.
3715 * normal/menu.c (run_menu_entry): Renamed to ...
3716 (grub_menu_execute_entry): ... this and made it as global.
3717 (grub_menu_run): Renamed to ...
3718 (show_text_menu): ... this and made it local.
3719 (show_text_menu): Adapt to new function names.
3720 (grub_normal_terminal_menu_viewer): New global variable.
3722 * include/grub/menu.h: New file.
3724 * include/grub/menu_viewer.h: New file.
3726 * include/grub/normal.h: Added include to grub/menu.h.
3727 (grub_menu_entry): Moved to include/grub/menu.h.
3728 (grub_menu_entry_t): Likewise.
3729 (grub_menu): Likewise.
3730 (grub_menu_t): Likewise.
3731 (grub_normal_terminal_menu_viewer): Added.
3732 (grub_menu_execute_entry): Likewise.
3733 (grub_menu_run): Removed.
3735 * DISTLIST: Added include/grub/menu.h.
3736 Added include/grub/menu_viewer.h.
3737 Added normal/menu_viewer.c.
3739 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3741 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3742 arglist for menutitle arguments.
3744 * normal/main.c (grub_normal_menu_addentry): Likewise.
3746 * normal/parser.y (menuentry): Likewise.
3748 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3750 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3751 (grub_script_create_cmdmenu): Likewise.
3753 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3755 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3758 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3760 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3762 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3764 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3766 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3768 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3770 2009-01-30 Christian Franke <franke@computer.org>
3772 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3773 in option help text.
3775 2009-01-27 Pavel Roskin <proski@gnu.org>
3777 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3779 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3781 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3783 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3785 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3786 unregister function.
3788 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3790 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3792 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3794 * util/grub-mkfont.c (usage): Fix typo.
3796 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3798 2009-01-26 Daniel Mierswa <impulze@impulze.org>
3800 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3802 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3804 * kern/misc.c (grub_strcasecmp): New function.
3805 (grub_strcasecmp): Use grub_size_t instead of int for length.
3807 * include/grub/misc.h: Update function prototypes.
3809 2009-01-26 Robert Millan <rmh@aybabtu.com>
3811 * configure.ac: Fix cross-compilation check.
3813 2009-01-22 Christian Franke <franke@computer.org>
3815 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3816 (precision) digit string. Allow `.format2' without `format1' (width).
3817 Limit input chars for `%s' output to `format2' if specified. This is
3818 compatible with standard printf ().
3820 2009-01-22 Christian Franke <franke@computer.org>
3822 * disk/ata.c (grub_ata_wait_status): Replace by ...
3823 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3824 other status bits may be invalid while BSY is asserted.
3825 (grub_ata_check_ready): New function.
3826 (grub_ata_cmd): Removed.
3827 (grub_ata_wait_drq): New function.
3828 (grub_ata_strncpy): Remove inline.
3829 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3830 and error check now done by grub_ata_wait_drq ().
3831 (grub_ata_pio_write): Likewise.
3832 (grub_atapi_identify): Set DEV before check for !BSY. Use
3833 grub_ata_wait_drq () to wait for data.
3834 (grub_ata_device_initialize): Add status register check to
3835 detect missing SATA slave devices. Add debug messages.
3836 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3837 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3838 transfer loop by grub_ata_pio_write ().
3839 (grub_ata_identify): Set DEV before check for !BSY. Use
3840 grub_ata_wait_drq () to wait for data.
3841 (grub_ata_setaddress): Set DEV before check for !BSY.
3842 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3843 read/write in one loop. Fix invalid command on write. Fix incomplete
3844 command on (size % batch) == 0. Add missing error check after write of
3845 last block. Add debug messages.
3846 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
3848 2009-01-19 Christian Franke <franke@computer.org>
3850 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3851 (GRUB_ATAPI_IREASON_*): Likewise.
3852 (grub_ata_pio_write): Fix timeout error return.
3853 (grub_atapi_identify): Add grub_ata_wait () after cmd.
3854 (grub_atapi_wait_drq): New function.
3855 (grub_atapi_packet): New parameter `size'.
3856 Use grub_atapi_wait_drq () and direct write instead of
3857 grub_ata_pio_write ().
3858 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3859 reads the number of bytes requested by the device for each DRQ
3861 (grub_atapi_write): Remove old implementation, return not
3862 implemented instead.
3864 2009-01-19 Christian Franke <franke@computer.org>
3866 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3867 of 512 to calculate data size.
3868 (grub_scsi_read12): Likewise.
3869 (grub_scsi_write10): Likewise.
3870 (grub_scsi_write12): Likewise.
3871 (grub_scsi_read): Adjust size according to blocksize.
3872 Add checks for invalid blocksize and unaligned transfer.
3874 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
3876 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3878 * term/gfxterm.c (write_char): Fix background rendering for wide
3881 2009-01-19 Robert Millan <rmh@aybabtu.com>
3883 * config.guess: Update to latest version from config git.
3884 * config.sub: Likewise.
3886 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
3888 * Makefile.in: Change font compilation to use new grub-mkfont instead
3891 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3892 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3893 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3894 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3895 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3896 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3897 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3898 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3899 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3901 2009-01-16 Christian Franke <franke@computer.org>
3903 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3904 (enum grub_ata_timeout_milliseconds): New enum.
3905 (grub_ata_wait_status): Add parameter milliseconds.
3906 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3907 recovery from timed-out commands.
3908 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3909 return grub_errno instead of REG_ERROR.
3910 (grub_ata_pio_write): Add parameter milliseconds.
3911 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3912 Pass milliseconds to grub_ata_wait_status () and
3913 grub_ata_pio_read ().
3914 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3915 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3916 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3917 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3918 It is not suitable for device detection, because DEV bit is ignored,
3919 the command may run too long, and not all devices set the signature
3921 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3922 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3923 Fix device selection, DEV bit must be set first to address the registers
3924 of the correct device.
3925 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3926 grub_ata_pio_read/write ().
3927 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3928 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3930 2009-01-13 Carles Pina i Estany <carles@pina.cat>
3932 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3934 2009-01-13 Bean <bean123ch@gmail.com>
3936 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3938 2009-01-13 Bean <bean123ch@gmail.com>
3940 * Makefile.in: (enable_grub_mkfont): New variable.
3941 (freetype_cflags): Likewise.
3942 (freetype_libs): Likewise.
3944 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3945 (grub_mkfont_SOURCES): New variable.
3946 (grub_mkfont_CFLAGS): Likewise.
3947 (grub_mkfont_LDFLAGS): Likewise.
3949 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3950 library if `--enable-grub-mkfont' is requested.
3951 (enable_grub_mkfont): New variable.
3952 (freetype_cflags): Likewise.
3953 (freetype_libs): Likewise.
3955 * util/grub-mkfont.c: New file.
3957 2009-01-12 Christian Franke <franke@computer.org>
3959 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3960 mode check. Fix setting of compat_use[].
3962 2009-01-10 Robert Millan <rmh@aybabtu.com>
3964 Update a few copyright years which we forgot to do in 2008 (only for
3965 files whose changes made in 2008 were copyright-significant)
3967 * Makefile.in: Add 2008 to Copyright line.
3968 * disk/ieee1275/ofdisk.c: Likewise.
3969 * disk/efi/efidisk.c: Likewise.
3970 * kern/dl.c: Likewise.
3971 * kern/sparc64/ieee1275/init.c: Likewise.
3972 * kern/mm.c: Likewise.
3973 * kern/efi/mm.c: Likewise.
3974 * boot/i386/pc/boot.S: Likewise.
3975 * genfslist.sh: Likewise.
3976 * fs/iso9660.c: Likewise.
3977 * fs/hfs.c: Likewise.
3978 * fs/jfs.c: Likewise.
3979 * fs/minix.c: Likewise.
3980 * fs/ufs.c: Likewise.
3981 * gensymlist.sh.in: Likewise.
3982 * genkernsyms.sh.in: Likewise.
3983 * include/grub/misc.h: Likewise.
3984 * include/grub/types.h: Likewise.
3985 * include/grub/symbol.h: Likewise.
3986 * include/grub/elf.h: Likewise.
3987 * include/grub/kernel.h: Likewise.
3988 * include/grub/disk.h: Likewise.
3989 * include/grub/dl.h: Likewise.
3990 * include/grub/i386/linux.h: Likewise.
3991 * include/grub/i386/pc/biosdisk.h: Likewise.
3992 * include/grub/efi/api.h: Likewise.
3993 * include/grub/efi/pe32.h: Likewise.
3994 * include/grub/util/misc.h: Likewise.
3995 * normal/execute.c: Likewise.
3996 * normal/arg.c: Likewise.
3997 * normal/completion.c: Likewise.
3998 * normal/lexer.c: Likewise.
3999 * normal/parser.y: Likewise.
4000 * normal/misc.c: Likewise.
4001 * commands/i386/pc/vbeinfo.c: Likewise.
4002 * commands/hexdump.c: Likewise.
4003 * commands/terminal.c: Likewise.
4004 * commands/ls.c: Likewise.
4005 * commands/help.c: Likewise.
4006 * partmap/pc.c: Likewise.
4007 * loader/efi/chainloader.c: Likewise.
4008 * loader/multiboot_loader.c: Likewise.
4009 * loader/i386/pc/multiboot2.c: Likewise.
4010 * term/efi/console.c: Likewise.
4011 * term/i386/pc/serial.c: Likewise.
4012 * util/lvm.c: Likewise.
4013 * util/console.c: Likewise.
4014 * util/i386/efi/grub-mkimage.c: Likewise.
4015 * util/raid.c: Likewise.
4017 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4019 * commands/videotest.c: Removed include to grub/machine/memory.h.
4021 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4022 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4023 (video_mod_SOURCES): Removed.
4024 (video_mod_CFLAGS): Likewise.
4025 (video_mod_LDFLAGS): Likewise.
4026 (gfxterm_mod_SOURCES): Likewise.
4027 (gfxterm_mod_CFLAGS): Likewise.
4028 (gfxterm_mod_LDFLAGS): Likewise.
4029 (videotest_mod_SOURCES): Likewise.
4030 (videotest_mod_CFLAGS): Likewise.
4031 (videotest_mod_LDFLAGS): Likewise.
4032 (bitmap_mod_SOURCES): Likewise.
4033 (bitmap_mod_CFLAGS): Likewise.
4034 (bitmap_mod_LDFLAGS): Likewise.
4035 (tga_mod_SOURCES): Likewise.
4036 (tga_mod_CFLAGS): Likewise.
4037 (tga_mod_LDFLAGS): Likewise.
4038 (jpeg_mod_SOURCES): Likewise.
4039 (jpeg_mod_CFLAGS): Likewise.
4040 (jpeg_mod_LDFLAGS): Likewise.
4041 (png_mod_SOURCES): Likewise.
4042 (png_mod_CFLAGS): Likewise.
4043 (png_mod_LDFLAGS): Likewise.
4045 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4046 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4047 (video_mod_SOURCES): Added.
4048 (video_mod_CFLAGS): Likewise.
4049 (video_mod_LDFLAGS): Likewise.
4050 (videotest_mod_SOURCES): Likewise.
4051 (videotest_mod_CFLAGS): Likewise.
4052 (videotest_mod_LDFLAGS): Likewise.
4053 (bitmap_mod_SOURCES): Likewise.
4054 (bitmap_mod_CFLAGS): Likewise.
4055 (bitmap_mod_LDFLAGS): Likewise.
4056 (tga_mod_SOURCES): Likewise.
4057 (tga_mod_CFLAGS): Likewise.
4058 (tga_mod_LDFLAGS): Likewise.
4059 (jpeg_mod_SOURCES): Likewise.
4060 (jpeg_mod_CFLAGS): Likewise.
4061 (jpeg_mod_LDFLAGS): Likewise.
4062 (png_mod_SOURCES): Likewise.
4063 (png_mod_CFLAGS): Likewise.
4064 (png_mod_LDFLAGS): Likewise.
4065 (gfxterm_mod_SOURCES): Likewise.
4066 (gfxterm_mod_CFLAGS): Likewise.
4067 (gfxterm_mod_LDFLAGS): Likewise.
4069 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4070 grub/machine/console.h.
4072 2009-01-04 Jerone Young <jerone@gmail.com>
4074 Make on screen instructions clearer
4076 Based on patch created by Jidanni <jidanni@jidanni.org>
4078 * normal/menu.c: print clearer instructions on the screen
4080 2009-01-02 Colin D Bennett <colin@gibibit.com>
4084 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4085 build system and fixed gfxterm.c to work with different sized fonts.
4087 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4089 * configure: Re-generated.
4091 * DISTLIST: Removed font/manager.c.
4093 Added font/font_cmd.c.
4095 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4098 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
4100 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4102 * kern/term.c: Changed users of grub_utf8_to_ucs4.
4104 * normal/menu.c: Likewise.
4106 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4107 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4109 * include/grub/font.h: Replaced with new file.
4111 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4112 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4113 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4114 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4115 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4116 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4117 fg_red, fg_green, fg_blue, fg_alpha.
4118 (grub_video_adapter): Removed blit_glyph.
4119 (grub_video_blit_glyph): Removed.
4121 * font/manager.c: Removed file.
4123 * font/font.c: New file.
4125 * font/font_cmd.c: Likewise.
4127 * video/video.c (grub_video_blit_glyph): Removed.
4129 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4130 (grub_video_vbe_map_rgba): Likewise.
4131 (grub_video_vbe_unmap_color_int): Likewise.
4132 (grub_video_vbe_blit_glyph): Removed.
4133 (grub_video_vbe_adapter): Removed blit_glyph.
4135 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4136 (get_pixel): Likewise.
4137 (set_pixel): Likewise.
4139 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4141 * term/gfxterm.c: Adapted to new font engine.
4143 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
4145 * term/i386/pc/vga.c: Likewise.
4147 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4149 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4151 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4153 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4155 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4157 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4159 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4161 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4163 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4165 * util/grub.d/00_header.in: Changed to use new loadfont command.
4167 * util/grub-mkconfig_lib.in: Changed font extension.
4169 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
4171 * util/getroot.c (grub_util_get_grub_dev): Add support for
4172 /dev/md/dNNpNN style partitionable mdraid devices.
4174 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
4176 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4177 at a time limit of the PXE TFTP API correctly.
4178 (grub_pxefs_close): Likewise.
4180 2008-11-29 Robert Millan <rmh@aybabtu.com>
4182 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4183 grub_ata_device_initialize() calls.
4185 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
4187 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4189 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4191 2008-11-28 Robert Millan <rmh@aybabtu.com>
4193 Fix build on powerpc-ieee1275. Based on patch created by
4194 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4195 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4196 `kern/ieee1275/mmap.c'.
4197 * include/grub/powerpc/ieee1275/memory.h: New file.
4199 Provide grub-install on coreboot.
4200 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4201 (grub_install_SOURCES): New variable.
4202 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4205 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
4207 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4208 to `grub_term_input_t'.
4209 (grub_term_get_current_output): Change return type to
4210 `grub_term_output_t'.
4212 2008-11-22 Robert Millan <rmh@aybabtu.com>
4214 Fix breakage on coreboot due to declaration mismatch.
4215 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4216 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4217 grub_vga_text_cls().
4219 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4220 comments. Avoid copying one more byte than necessary (just in case).
4222 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4223 to 0x200000 (avoids trouble with some OFW implementations, and matches
4224 with the one in Yaboot).
4225 Reported by Manoel Abranches
4227 2008-11-20 Robert Millan <rmh@aybabtu.com>
4229 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4230 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4232 * util/grub-mkconfig_lib.in (grub_warn): New function.
4233 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4234 warnings, to obtain consistent formatting.
4235 * util/grub.d/00_header.in: Likewise.
4236 * util/update-grub_lib.in: Likewise.
4238 * loader/i386/linux.c (allocate_pages): Fix a warning.
4239 Move comment text to `#error' stanza.
4241 Harmonize ieee1275's grub_available_iterate() with the generic
4242 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4243 build problem on i386-ieee1275):
4244 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4245 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4246 parameter `type'. Update all users of this function.
4247 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4248 `kern/ieee1275/mmap.c'.
4249 * kern/ieee1275/init.c
4250 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4252 (grub_machine_mmap_iterate): ... this.
4253 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4254 return type to `grub_err_t'. Update all implementations of this
4256 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4259 Add `lsmmap' command (lists firmware-provided memory map):
4260 * commands/lsmmap.c: New file.
4261 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4262 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4264 * conf/powerpc-ieee1275.rmk: Likewise.
4265 * conf/i386-coreboot.rmk: Likewise.
4266 * conf/i386-ieee1275.rmk: Likewise.
4268 2008-11-19 Robert Millan <rmh@aybabtu.com>
4270 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4271 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4272 constraints to initrd allocation (based on code from
4273 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4274 for Linux to find it.
4276 2008-11-14 Robert Millan <rmh@aybabtu.com>
4278 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4279 order to cope with duplicate slashes.
4281 2008-11-14 Robert Millan <rmh@aybabtu.com>
4283 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4284 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4285 don't want to mess with lower memory, because it is used in the Linux
4288 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4289 an appropriate place in lower memory, between 0x10000 and 0x90000,
4290 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4291 is in our heap (probably as a result of it being corrupted during
4292 decompression). Add #error instance with comment to explain why this
4293 loader isn't currently usable on PC/BIOS.
4295 2008-11-14 Robert Millan <rmh@aybabtu.com>
4297 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4298 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4300 2008-11-12 Robert Millan <rmh@aybabtu.com>
4302 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4304 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4305 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4307 * include/grub/i386/pc/memory.h: ... to here.
4309 2008-11-12 Robert Millan <rmh@aybabtu.com>
4311 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4314 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4315 (grub_console_cur_color, grub_console_real_putchar)
4316 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4317 (grub_console_setcolorstate, grub_console_setcolor)
4318 (grub_console_getcolor): Move from here ...
4319 * include/grub/i386/vga_common.h: ... to here (new file).
4321 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4322 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4324 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4325 `<grub/i386/vga_common.h>'.
4327 2008-11-12 Robert Millan <rmh@aybabtu.com>
4329 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4330 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4331 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4333 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4334 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4336 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4337 grub_console_init() with call to grub_vga_text_init().
4338 (grub_machine_fini): Replace call to
4339 grub_console_fini() with call to grub_vga_text_fini() and
4340 grub_at_keyboard_fini().
4342 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4343 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4344 (grub_console_setcolorstate, grub_console_setcolor)
4345 (grub_console_getcolor): New function prototypes.
4347 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4348 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4349 (grub_vga_text_setcursor): Static-ize.
4350 (grub_vga_text_term): New structure.
4351 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4353 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4354 (grub_console_cur_color, grub_console_standard_color)
4355 (grub_console_normal_color, grub_console_highlight_color)
4356 (map_char, grub_console_putchar, grub_console_getcharwidth)
4357 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4358 (grub_console_getcolor): Move from here ...
4359 * term/i386/vga_common.c: ... to here (same function names).
4361 2008-11-12 Robert Millan <rmh@aybabtu.com>
4363 Use newly-added Multiboot support in coreboot.
4365 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4366 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4368 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4369 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4370 (codestart): Store the MBI in `startup_multiboot_info' when we're
4371 being loaded using Multiboot.
4373 * kern/i386/coreboot/init.c (grub_machine_init): Move
4374 grub_at_keyboard_init() call to beginning of function (useful for
4375 debugging). Call grub_machine_mmap_init() before attempting to use
4376 grub_machine_mmap_iterate().
4377 (grub_lower_mem, grub_upper_mem): Move from here ...
4378 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4381 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4384 2008-11-12 Robert Millan <rmh@aybabtu.com>
4386 Fix a regression introduced by the at_keyboard.mod split. Because
4387 some terminals are default on some platforms and non-default on
4388 others, the first terminal being registered determines which is
4389 going to be default.
4391 * kern/term.c (grub_term_register_input): If this is the first
4392 terminal being registered, set it as the current one.
4393 (grub_term_register_output): Likewise.
4395 * term/efi/console.c (grub_console_init): Do not call
4396 grub_term_set_current_output() or grub_term_set_current_input().
4397 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4398 * term/i386/pc/console.c (grub_console_init): Likewise.
4399 (grub_console_fini): Do not call grub_term_set_current_input()
4400 (but leave grub_term_set_current_output() to restore text mode).
4402 2008-11-10 Robert Millan <rmh@aybabtu.com>
4404 * util/grub.d/00_header.in: Add backward compatibility check for
4405 versions of terminal.mod that don't understand `terminal_input' or
4408 2008-11-09 Robert Millan <rmh@aybabtu.com>
4410 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4411 `terminal_input' / `terminal_output', not `terminal'.
4413 2008-11-08 Robert Millan <rmh@aybabtu.com>
4415 * Makefile.in (include_DATA): Fix srcdir=. assumption.
4416 (DISTCLEANFILES): Add `build_env.mk'.
4418 2008-11-08 Robert Millan <rmh@aybabtu.com>
4420 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4421 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4422 members. Update all users.
4423 * util/console.c (grub_ncurses_term): Split in ...
4424 (grub_ncurses_term_input): ... this, and ...
4425 (grub_ncurses_term_output): ... this. Update all users.
4426 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4428 2008-11-08 Robert Millan <rmh@aybabtu.com>
4430 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4431 (PKGDATA): Add $(pkgdata_SRCDIR).
4432 (pkglib_BUILDDIR): New variable.
4433 (pkgdata_SRCDIR): New variable.
4434 (build_env.mk): New target.
4435 (include_DATA): New variable.
4436 (install-local): Install $(include_DATA) files in $(includedir).
4438 2008-11-07 Pavel Roskin <proski@gnu.org>
4440 * gendistlist.sh: Use C locale for sorting to ensure consistent
4441 output on all systems.
4443 * util/grub.d/00_header.in: Remove incorrect space before
4446 2008-11-07 Robert Millan <rmh@aybabtu.com>
4448 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4450 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4451 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4452 (based on find_multi_boot1_header).
4453 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4454 using find_multi_boot2_header(), and abort if neither Multiboot or
4455 Multiboot headers were found.
4457 2008-11-07 Robert Millan <rmh@aybabtu.com>
4459 Modularize at_keyboard.mod:
4461 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4462 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4463 (at_keyboard_mod_LDFLAGS): New variables.
4465 Actual terminal split:
4467 * include/grub/term.h (struct grub_term): Split in ...
4468 (struct grub_term_input): ... this, and ...
4469 (struct grub_term_output): ... this. Update all users.
4470 (grub_term_set_current): Split in ...
4471 (grub_term_set_current_input): ... this, and ...
4472 (grub_term_set_current_output): ... this.
4473 (grub_term_get_current): Split in ...
4474 (grub_term_get_current_input): ... this, and ...
4475 (grub_term_get_current_output): ... this.
4476 (grub_term_register): Split in ...
4477 (grub_term_register_input): ... this, and ...
4478 (grub_term_register_output): ... this.
4479 (grub_term_unregister): Split in ...
4480 (grub_term_unregister_input): ... this, and ...
4481 (grub_term_unregister_output): ... this.
4482 (grub_term_iterate): Split in ...
4483 (grub_term_iterate_input): ... this, and ...
4484 (grub_term_iterate_output): ... this.
4486 * kern/term.c (grub_term_list): Split in ...
4487 (grub_term_list_input): ... this, and ...
4488 (grub_term_list_output): ... this. Update all users.
4489 (grub_cur_term): Split in ...
4490 (grub_cur_term_input): ... this, and ...
4491 (grub_cur_term_output): ... this. Update all users.
4492 (grub_term_set_current): Split in ...
4493 (grub_term_set_current_input): ... this, and ...
4494 (grub_term_set_current_output): ... this.
4495 (grub_term_get_current): Split in ...
4496 (grub_term_get_current_input): ... this, and ...
4497 (grub_term_get_current_output): ... this.
4498 (grub_term_register): Split in ...
4499 (grub_term_register_input): ... this, and ...
4500 (grub_term_register_output): ... this.
4501 (grub_term_unregister): Split in ...
4502 (grub_term_unregister_input): ... this, and ...
4503 (grub_term_unregister_output): ... this.
4504 (grub_term_iterate): Split in ...
4505 (grub_term_iterate_input): ... this, and ...
4506 (grub_term_iterate_output): ... this.
4508 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4509 a check for input and one for output (and only attempt to get keys
4510 from user when input works).
4512 * util/grub-probe.c (grub_term_get_current): Split in ...
4513 (grub_term_get_current_input): ... this, and ...
4514 (grub_term_get_current_output): ... this.
4515 * util/grub-fstest.c: Likewise.
4516 * util/i386/pc/grub-setup.c: Likewise.
4517 * util/grub-editenv.c: Likewise.
4519 Portability adjustments:
4521 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4522 `term/i386/pc/at_keyboard.c'.
4523 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4524 grub_keyboard_controller_init() (now handled by terminal .init).
4525 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4526 grub_at_keyboard_init().
4527 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4528 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4529 at_keyboard.mod via input terminal interface).
4530 * include/grub/i386/coreboot/console.h: Convert into a stub for
4531 `<grub/i386/pc/console.h>'.
4533 Migrate full terminals to new API:
4535 * term/efi/console.c (grub_console_term): Split into ...
4536 (grub_console_term_input): ... this, and ...
4537 (grub_console_term_output): ... this. Update all users.
4538 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4539 (grub_ofconsole_init): Split into ...
4540 (grub_ofconsole_init_input): ... this, and ...
4541 (grub_ofconsole_init_output): ... this.
4542 (grub_ofconsole_term): Split into ...
4543 (grub_ofconsole_term_input): ... this, and ...
4544 (grub_ofconsole_term_output): ... this. Update all users.
4545 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4546 (grub_serial_term_input): ... this, and ...
4547 (grub_serial_term_output): ... this. Update all users.
4548 * term/i386/pc/console.c (grub_console_term): Split into ...
4549 (grub_console_term_input): ... this, and ...
4550 (grub_console_term_output): ... this. Update all users.
4551 (grub_console_term_input): Only enable it on PC/BIOS platform.
4552 (grub_console_init): Remove grub_keyboard_controller_init() call.
4554 Migrate input terminals to new API:
4556 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4557 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4558 i386-specific anyway).
4559 (grub_console_checkkey): Rename to ...
4560 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4562 (grub_keyboard_controller_orig): New variable.
4563 (grub_console_getkey): Rename to ...
4564 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4566 (grub_keyboard_controller_init): Static-ize. Save original
4567 controller value so that it can be restored ...
4568 (grub_keyboard_controller_fini): ... here (new function).
4569 (grub_at_keyboard_term): New structure.
4570 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4573 Migrate output terminals to new API:
4575 * term/i386/pc/vga.c (grub_vga_term): Change type to
4576 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4577 members. Update all users.
4578 * term/gfxterm.c (grub_video_term): Change type to
4579 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4580 members. Update all users.
4581 * include/grub/i386/pc/console.h (grub_console_checkkey)
4582 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4585 Migrate `terminal' command and userland tools to new API:
4587 * commands/terminal.c (grub_cmd_terminal): Split into ...
4588 (grub_cmd_terminal_input): ... this, and ...
4589 (grub_cmd_terminal_output): ... this.
4590 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4591 `terminal_input' and `terminal_output'.
4592 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4593 `terminal_input' / `terminal_output' API.
4594 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4595 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4596 provided ${GRUB_TERMINAL}, convert it).
4598 2008-11-04 Robert Millan <rmh@aybabtu.com>
4600 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4602 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4604 2008-11-03 Bean <bean123ch@gmail.com>
4606 * kern/elf.c (grub_elf32_load): Revert to previous code.
4607 (grub_elf64_load): Likewise.
4609 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4611 2008-11-01 Robert Millan <rmh@aybabtu.com>
4613 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4614 (TARGET_CPPFLAGS): Likewise.
4615 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4617 2008-11-01 Carles Pina i Estany <carles@pina.cat>
4619 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4621 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4623 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4624 addition of objects until the code is not going to be able to fail.
4626 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4628 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4629 (add a missing NULL check, and correct them by moving the pointer
4630 operations after the actual check).
4632 2008-10-29 Robert Millan <rmh@aybabtu.com>
4634 * util/i386/pc/grub-install.in: Handle empty string as output from
4635 make_system_path_relative_to_its_root().
4637 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4639 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4640 circular metadata worst case scenario. If the metadata is circular
4641 then copy the wrap in place.
4642 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4643 project lib/format_text/layout.h
4644 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4646 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4648 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4650 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4652 * util/update-grub_lib.in: Mention filename in warning message.
4654 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4656 * NEWS: Update for rename of update-grub to grub-mkconfig.
4658 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4660 * util/update-grub_lib.in: Copy to ...
4661 * util/grub-mkconfig_lib.in: ... this. Update all users.
4662 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4663 * util/update-grub.in: Rename to ...
4664 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4665 option. Add `--output' option to allow users to specify the generated
4666 configuration file. Default to stdout.
4667 (update_grub_dir): Rename to ...
4668 (grub_mkconfig_dir): ... this.
4669 (grub_cfg): Default to an empty string.
4670 * conf/common.rmk (update-grub): Rename to ...
4671 (grub-mkconfig): ... this.
4672 (update-grub_lib): Copy to ...
4673 (grub-mkconfig_lib): ... this.
4674 (update-grub_SCRIPTS): Copy to ...
4675 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4676 (update-grub_DATA): Rename to ...
4677 (grub-mkconfig_DATA): ... this.
4679 2008-09-28 Robert Millan <rmh@aybabtu.com>
4681 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4682 to `modified'. Add the real `created' field.
4683 (grub_iso9660_uuid): Use `modified' rather than `created' for
4684 constructing the UUID.
4686 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
4688 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4689 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4691 2008-09-28 Bean <bean123ch@gmail.com>
4693 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4694 Thanks to Christian Franke for finding this bug.
4696 2008-09-25 Robert Millan <rmh@aybabtu.com>
4698 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4699 instances of grub_util_get_disk_name() (see previous commit).
4701 2008-09-25 Robert Millan <rmh@aybabtu.com>
4703 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4704 `util/i386/get_disk_name.c'.
4705 * conf/i386-efi.rmk: Likewise.
4706 * conf/x86_64-efi.rmk: Likewise.
4707 * conf/i386-coreboot.rmk: Likewise.
4708 * conf/i386-ieee1275.rmk: Likewise.
4709 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4710 `util/ieee1275/get_disk_name.c'.
4711 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4712 * util/ieee1275/get_disk_name.c: Remove file.
4713 * util/i386/get_disk_name.c: Remove file.
4714 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4715 "hd%d" for device.map entries, rather than using
4716 grub_util_get_disk_name().
4718 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4720 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4722 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4724 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4726 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4728 (GRUB_TERM_PPAGE): Changed to 0x4900.
4730 2008-09-24 Robert Millan <rmh@aybabtu.com>
4732 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4733 macros (they were i386-pc specific).
4734 * include/grub/sparc64/ieee1275/console.h: Likewise.
4735 * include/grub/efi/console.h: Likewise.
4737 2008-09-22 Bean <bean123ch@gmail.com>
4739 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4740 resident and in attribute list.
4742 * include/grub/ntfs.h (BMP_LEN): Removed.
4744 2008-09-22 Bean <bean123ch@gmail.com>
4746 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4747 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4749 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4750 error occurs, as grub_disk_open will call grub_disk_close, which will
4751 call p->close (scsi).
4753 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4755 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4756 (AC_PREREQ): Bumped to 2.59.
4757 (AC_TRY_COMPILE): Replace obsolete macro with ...
4758 (AC_COMPILE_IFELSE): ... this.
4759 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4760 (AC_LINK_IFELSE): ... this.
4762 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4764 * autogen.sh: Add a call to `gendistlist.sh'.
4766 2008-09-19 Christian Franke <franke@computer.org>
4768 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4769 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4770 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4771 Export __enable_execute_stack() to modules.
4772 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4775 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4777 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4780 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4782 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4783 #include <grub/util/hostdisk.h>.
4785 2008-09-08 Robert Millan <rmh@aybabtu.com>
4787 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4788 segments when their filesz is zero (grub_file_read() interprets
4789 zero-size as "read until EOF", which results in memory corruption).
4790 Use `lowest_segment' rather than 0 for calculating the current
4791 segment load address.
4793 2008-09-08 Robert Millan <rmh@aybabtu.com>
4795 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4796 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4797 clobbered useful information.
4799 2008-09-08 Robert Millan <rmh@aybabtu.com>
4801 * include/grub/util/biosdisk.h: Move to ...
4802 * include/grub/util/hostdisk.h: ... here. Update all users.
4803 * util/biosdisk.c: Move to ...
4804 * util/hostdisk.c: ... here. Update all users.
4806 2008-09-07 Robert Millan <rmh@aybabtu.com>
4808 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4810 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4811 and length can be stored directly in the `mbi->mmap_addr' and
4812 `mbi->mmap_length' struct fields.
4814 2008-09-07 Robert Millan <rmh@aybabtu.com>
4816 * conf/i386.rmk: New file. Provides declaration for building
4818 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4819 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4821 Include `conf/i386.mk'.
4822 * conf/i386-efi.rmk: Likewise.
4823 * conf/x86_64-efi.rmk: Likewise.
4824 * conf/i386-coreboot.rmk: Likewise.
4825 * conf/i386-ieee1275.rmk: Likewise.
4827 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4829 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4830 Adds optimization support for BGR based modes.
4832 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4833 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4834 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4835 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4836 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4837 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4838 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4839 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4840 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4841 (grub_video_i386_vbeblit_index_index): Likewise.
4842 (grub_video_i386_vbeblit_replace_directN): Added.
4843 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4844 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4845 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4846 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4847 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4848 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4849 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4850 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4851 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4852 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4853 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4854 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4855 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4857 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4858 (grub_video_i386_vbefill_R8G8B8): Likewise.
4859 (grub_video_i386_vbefill_index): Likewise.
4860 (grub_video_i386_vbefill_direct32): Added.
4861 (grub_video_i386_vbefill_direct24): Likewise.
4862 (grub_video_i386_vbefill_direct16): Likewise.
4863 (grub_video_i386_vbefill_direct8): Likewise.
4865 * include/grub/video.h (grub_video_blit_format): Removed
4866 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4867 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4868 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4869 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4870 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4872 * video/video.c (grub_video_get_blit_format): Updated to use new
4873 blit formats. Added handling for 16 bit color modes.
4875 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4877 (common_blitter): Updated to use new blitters.
4879 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4881 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4882 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4883 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4884 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4885 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4886 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4887 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4888 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4889 (grub_video_i386_vbeblit_index_index): Likewise.
4890 (grub_video_i386_vbeblit_replace_directN): Added.
4891 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4892 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4893 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4894 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4895 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4896 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4897 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4898 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4899 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4900 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4901 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4902 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4903 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4905 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4906 (grub_video_i386_vbefill_R8G8B8): Likewise.
4907 (grub_video_i386_vbefill_index): Likewise.
4908 (grub_video_i386_vbefill_direct32): Added.
4909 (grub_video_i386_vbefill_direct24): Likewise.
4910 (grub_video_i386_vbefill_direct16): Likewise.
4911 (grub_video_i386_vbefill_direct8): Likewise.
4913 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4916 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4919 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4922 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4925 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4927 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4930 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4932 * fs/iso9660.c (grub_iso9660_date): New structure.
4933 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4934 (grub_iso9660_uuid): New function.
4936 2008-09-05 Bean <bean123ch@gmail.com>
4938 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4940 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4941 insensitive bit for names in Win32 and Win32 & DOS namespace.
4943 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4945 * include/grub/types.h (LONG_MAX): Likewise.
4947 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4949 * util/getroot.c: Include <config.h>.
4950 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4951 add support for /dev/md/N devices and handle LVM double dash escaping.
4953 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4955 * config.guess: Update to latest version from config git.
4956 * config.sub: Likewise.
4958 2008-09-03 Robert Millan <rmh@aybabtu.com>
4960 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4961 `disk->total_sectors'.
4963 2008-09-01 Colin D Bennett <colin@gibibit.com>
4965 * include/grub/normal.h: Fixed incorrect comment for
4966 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4968 2008-09-01 Colin D Bennett <colin@gibibit.com>
4970 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4971 values with defines.
4973 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4974 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4975 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4976 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4977 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4978 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4979 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4980 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4981 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4982 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4983 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4984 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4985 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4986 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4987 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4988 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4989 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4990 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4991 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4993 2008-08-31 Robert Millan <rmh@aybabtu.com>
4995 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4997 (grub_multiboot): Fix a few warnings.
4999 2008-08-31 Robert Millan <rmh@aybabtu.com>
5001 * loader/i386/pc/multiboot.c: Update comment not to say that
5002 boot_device support is unimplemented.
5004 2008-08-31 Robert Millan <rmh@aybabtu.com>
5006 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5007 or memory map support are unimplemented.
5009 2008-08-31 Colin D Bennett <colin@gibibit.com>
5011 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5013 2008-08-31 Colin D Bennett <colin@gibibit.com>
5015 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5016 total video memory in 'vbeinfo' output; show color format details for
5019 2008-08-30 Pavel Roskin <proski@gnu.org>
5021 * util/genmoddep.c: Remove for real this time.
5022 * DISTLIST: Remove util/genmoddep.c.
5024 2008-08-30 Robert Millan <rmh@aybabtu.com>
5026 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5027 as required by Multiboot spec (it was already 4-byte aligned, but
5030 2008-08-29 Pavel Roskin <proski@gnu.org>
5032 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5033 * kern/powerpc/ieee1275/startup.S: ... this.
5034 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5035 * DISTLIST: Likewise.
5037 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5038 grub/cpu/kernel.h. Add start label for consistency with other
5039 platforms. Add grub_prefix immediately after start. Add jump
5040 to the code after grub_prefix.
5041 * include/grub/powerpc/kernel.h: Provide valid values for
5042 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5044 2008-08-29 Bean <bean123ch@gmail.com>
5046 * configure.ac: Change host_os to cygwin for mingw.
5047 (asprintf): New check for function.
5049 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5050 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5052 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5053 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5054 sync, sleep and grub_util_get_disk_size for mingw.
5056 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5057 to get size in mingw.
5058 (open_device): Use flag O_BINARY if it's defined.
5059 (find_root_device): Add dummy code for mingw.
5061 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5062 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5063 (get_scsi_disk_name): Return 0 for mingw.
5065 * util/hostfs.c: #include <grub/util/misc.h>.
5066 (grub_hostfs_open): Use "rb" flag to open file, use
5067 grub_util_get_disk_size to get disk size for mingw.
5069 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5070 (asprintf): New function if HAVE_ASPRINTF is not set.
5071 (sync): New function for mingw.
5073 (grub_util_get_disk_size): Likewise.
5075 2008-08-28 Pavel Roskin <proski@gnu.org>
5077 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5080 2008-08-28 Robert Millan <rmh@aybabtu.com>
5082 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5084 2008-08-28 Robert Millan <rmh@aybabtu.com>
5086 Change find_grub_drive() syntax so it doesn't prevent it from
5087 detecting NULL names as errors.
5089 * util/biosdisk.c (find_grub_drive): Move free slot search code
5091 (find_free_slot): ... to here.
5092 (read_device_map): Use find_free_slot() to search for free slots.
5094 2008-08-27 Marco Gerards <marco@gnu.org>
5096 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5097 (scsi_mod_SOURCES): New variable.
5098 (scsi_mod_CFLAGS): Likewise
5099 (scsi_mod_LDFLAGS): Likewise.
5101 * disk/scsi.c: New file.
5103 * include/grub/scsi.h: Likewise.
5105 * include/grub/scsicmd.h: Likewise.
5107 * disk/ata.c: Include <grub/scsi.h>.
5108 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5110 (grub_ata_iterate): Skip ATAPI devices.
5111 (grub_ata_open): Only handle ATAPI devices.
5112 (struct grub_atapi_read): Removed.
5113 (grub_atapi_readsector): Likewise.
5114 (grub_ata_read): No longer handle ATAPI devices.
5115 (grub_ata_write): Likewise.
5116 (grub_atapi_iterate): New function.
5117 (grub_atapi_read): Likewise.
5118 (grub_atapi_write): Likewise.
5119 (grub_atapi_open): Likewise.
5120 (grub_atapi_close): Likewise.
5121 (grub_atapi_dev): New variable.
5122 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5123 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5125 * include/grub/disk.h (enum grub_disk_dev_id): Add
5126 `GRUB_DISK_DEVICE_SCSI_ID'.
5128 2008-08-26 Robert Millan <rmh@aybabtu.com>
5130 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5131 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5134 2008-08-23 Bean <bean123ch@gmail.com>
5136 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5137 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5138 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5139 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5141 (raid5rec_mod_SOURCES): New macro.
5142 (raid5rec_mod_CFLAGS): Likewise.
5143 (raid5rec_mod_LDFLAGS): Likewise.
5144 (raid6rec_mod_SOURCES): Likewise.
5145 (raid6rec_mod_CFLAGS): Likewise.
5146 (raid6rec_mod_LDFLAGS): Likewise.
5147 (mdraid_mod_SOURCES): Likewise.
5148 (mdraid_mod_CFLAGS): Likewise.
5149 (mdraid_mod_LDFLAGS): Likewise.
5150 (dm_nv_mod_SOURCES): Likewise.
5151 (dm_nv_mod_CFLAGS): Likewise.
5152 (dm_nv_mod_LDFLAGS): Likewise.
5154 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5155 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5156 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5158 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5159 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5161 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5163 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5165 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5167 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5169 * disk/raid5_recover.c: New file.
5171 * disk/raid6_recover.c: Likewise.
5173 * disk/mdraid_linux.c: Likewise.
5175 * disk/dmraid_nvidia.c: Likewise.
5177 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5180 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5181 calculate the size of raid device.
5182 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5183 different layout of raid5.
5184 (grub_raid_scan_device): Remove code specific to mdraid.
5185 (grub_raid_list): New variable.
5186 (free_array): New function.
5187 (grub_raid_register): Likewise.
5188 (grub_raid_unregister): Likewise.
5189 (grub_raid_rescan): Likewise.
5190 (GRUB_MOD_INIT): Don't iterate device here.
5191 (GRUB_MOD_FINI): Use free_array to release resource.
5193 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5194 (grub_raid5_recover_func_t): New function variable type.
5195 (grub_raid6_recover_func_t): Likewise.
5196 (grub_raid5_recover_func): New variable.
5197 (grub_raid6_recover_func): Likewise.
5198 (grub_raid_register): New function.
5199 (grub_raid_unregister): Likewise.
5200 (grub_raid_rescan): Likewise.
5201 (grub_raid_block_xor): Likewise.
5203 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5204 (CMD_CRC): New macro.
5206 (read_file): Handle device as well as file.
5207 (cmd_crc): New function.
5208 (fstest): Handle multiple disks.
5209 (options): Remove part, raw and long, add root and diskcount.
5210 (usage): Add crc, remove -p, -r, -l, add -r and -c.
5211 (main): Find the first non option entry and ignore subsequent options,
5212 add handling for the new options, support multiple disks.
5214 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5216 2008-08-23 Bean <bean123ch@gmail.com>
5218 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5220 * genfslist.sh: Ignore kernel.mod.
5222 * genpartmaplist.sh: Likewise.
5224 2008-08-23 Robert Millan <rmh@aybabtu.com>
5226 * util/getroot.c (find_root_device): Skip anything that starts with
5227 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5229 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
5231 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5232 * util/grub.d/00_header.in: Allow the administrator to change default
5233 gfxmode via ${GRUB_GFXMODE}.
5235 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
5237 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5239 2008-08-21 Robert Millan <rmh@aybabtu.com>
5241 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5243 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5244 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5246 2008-08-20 Carles Pina i Estany <carles@pina.cat>
5248 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5249 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5251 2008-08-19 Robert Millan <rmh@aybabtu.com>
5253 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5254 (struct grub_virtual_screen): Remove `cursor_color'.
5255 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5257 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5259 2008-08-18 Robert Millan <rmh@aybabtu.com>
5261 Unify (identical) linux_normal.c files.
5262 * loader/i386/efi/linux_normal.c: Move from here ...
5263 * loader/linux_normal.c: ... to here. Update all users.
5264 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5265 * loader/i386/ieee1275/linux_normal.c: Likewise.
5267 2008-08-18 Robert Millan <rmh@aybabtu.com>
5269 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5270 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5271 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5272 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5273 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5275 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5276 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5277 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5278 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5279 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5280 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5281 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5282 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5283 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5284 portably using grub_getxy().
5285 Replace `-EFI' with `-bzImage' in boot message.
5287 2008-08-17 Robert Millan <rmh@aybabtu.com>
5289 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5291 2008-08-17 Robert Millan <rmh@aybabtu.com>
5293 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5295 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5296 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5297 (grub_machine_mmap_iterate): New function declaration.
5298 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5300 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5303 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5304 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5305 Move e820 parsing from here ...
5306 * kern/i386/pc/mmap.c: New file.
5307 (grub_machine_mmap_iterate): ... to here.
5309 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5310 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5311 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5312 (grub_available_iterate): Redeclare to return `void', and redeclare
5313 its hook to use grub_uint64_t as addr and size parameters, and rename
5315 (grub_machine_mmap_iterate): ... this. Update all users.
5317 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5318 to make it more readable. Rename to ...
5319 (grub_machine_mmap_iterate): ... this.
5321 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5322 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5323 (grub_multiboot): Allocate an extra region after the payload, and fill
5324 it with a Multiboot memory map. Adjust a.out loader to calculate size
5325 with the extra space.
5326 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5327 with the extra space.
5329 2008-08-17 Carles Pina i Estany <carles@pina.cat>
5331 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5333 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
5335 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5336 mdate-sh to the list `find' searches for.
5337 * DISTLIST: Regenerated.
5339 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
5341 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5342 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5343 genmoddep.awk, gensymlist.sh.in.
5344 (DISTDIRS): Add bus, docs, hook, lib.
5345 * DISTLIST: Regenerated.
5346 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5348 2008-08-16 Robert Millan <rmh@aybabtu.com>
5350 * disk/raid.c (grub_raid_init): Handle/report errors set by
5351 grub_device_iterate().
5352 * disk/lvm.c (grub_lvm_init): Likewise.
5354 2008-08-15 Bean <bean123ch@gmail.com>
5356 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5358 (datetime_mod_SOURCES): New macro.
5359 (datetime_mod_CFLAGS): Likewise.
5360 (datetime_mod_LDFLAGS): Likewise.
5361 (date_mod_SOURCES): Likewise.
5362 (date_mod_CFLAGS): Likewise.
5363 (date_mod_LDFLAGS): Likewise.
5364 (datehook_mod_SOURCES): Likewise.
5365 (datehook_mod_CFLAGS): Likewise.
5366 (datehook_mod_LDFLAGS): Likewise.
5368 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5370 (datetime_mod_SOURCES): New macro.
5371 (datetime_mod_CFLAGS): Likewise.
5372 (datetime_mod_LDFLAGS): Likewise.
5373 (date_mod_SOURCES): Likewise.
5374 (date_mod_CFLAGS): Likewise.
5375 (date_mod_LDFLAGS): Likewise.
5376 (datehook_mod_SOURCES): Likewise.
5377 (datehook_mod_CFLAGS): Likewise.
5378 (datehook_mod_LDFLAGS): Likewise.
5380 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5382 (datetime_mod_SOURCES): New macro.
5383 (datetime_mod_CFLAGS): Likewise.
5384 (datetime_mod_LDFLAGS): Likewise.
5385 (date_mod_SOURCES): Likewise.
5386 (date_mod_CFLAGS): Likewise.
5387 (date_mod_LDFLAGS): Likewise.
5388 (datehook_mod_SOURCES): Likewise.
5389 (datehook_mod_CFLAGS): Likewise.
5390 (datehook_mod_LDFLAGS): Likewise.
5392 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5394 (datetime_mod_SOURCES): New macro.
5395 (datetime_mod_CFLAGS): Likewise.
5396 (datetime_mod_LDFLAGS): Likewise.
5397 (date_mod_SOURCES): Likewise.
5398 (date_mod_CFLAGS): Likewise.
5399 (date_mod_LDFLAGS): Likewise.
5400 (datehook_mod_SOURCES): Likewise.
5401 (datehook_mod_CFLAGS): Likewise.
5402 (datehook_mod_LDFLAGS): Likewise.
5404 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5406 (datetime_mod_SOURCES): New macro.
5407 (datetime_mod_CFLAGS): Likewise.
5408 (datetime_mod_LDFLAGS): Likewise.
5409 (date_mod_SOURCES): Likewise.
5410 (date_mod_CFLAGS): Likewise.
5411 (date_mod_LDFLAGS): Likewise.
5412 (datehook_mod_SOURCES): Likewise.
5413 (datehook_mod_CFLAGS): Likewise.
5414 (datehook_mod_LDFLAGS): Likewise.
5416 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5418 * commands/date.c: New file.
5420 * hook/datehook.c: Likewise.
5422 * include/grub/lib/datetime.h: Likewise.
5424 * include/grub/i386/cmos.h: Likewise.
5426 * lib/datetime.c: Likewise.
5428 * lib/i386/datetime.c: Likewise.
5430 * lib/efi/datetime.c: Likewise.
5432 2008-08-14 Robert Millan <rmh@aybabtu.com>
5434 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5435 (grub_mkelfimage_SOURCES): New variable.
5436 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5438 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5439 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5440 * conf/powerpc-ieee1275.rmk: Likewise.
5441 * conf/i386-ieee1275.rmk: Likewise.
5443 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5444 * kern/i386/coreboot/init.c: Likewise.
5446 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5447 with `<grub/cpu/kernel.h>'.
5448 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5450 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5451 * kern/i386/coreboot/startup.S: Likewise.
5453 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5454 (GRUB_MOD_GAP): Remove.
5455 * include/grub/powerpc/kernel.h: New file.
5456 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5457 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5458 * include/grub/i386/kernel.h: New file.
5459 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5460 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5461 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5463 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5465 Use --directory when invoking grub_mkimage.
5467 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5468 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5469 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5470 and GRUB_KERNEL_CPU_PREFIX.
5472 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
5474 * include/grub/err.h (grub_err_printf): New function prototype.
5475 * util/misc.c (grub_err_printf): New function.
5476 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5478 * kern/err.c (grub_print_error): Use grub_err_printf.
5480 2008-08-13 Robert Millan <rmh@aybabtu.com>
5482 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5484 2008-08-13 Robert Millan <rmh@aybabtu.com>
5486 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5489 2008-08-12 Robert Millan <rmh@aybabtu.com>
5491 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5492 of the relocation code from here ...
5493 (grub_multiboot): ... to here.
5494 (forward_relocator, backward_relocator): Move from here ...
5495 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5496 (grub_multiboot_backward_relocator): ... to here.
5497 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5498 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5499 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5500 (grub_multiboot_forward_relocator_end)
5501 (grub_multiboot_backward_relocator)
5502 (grub_multiboot_backward_relocator_end): New variables.
5504 2008-08-12 Bean <bean123ch@gmail.com>
5506 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5508 2008-08-11 Robert Millan <rmh@aybabtu.com>
5510 * kern/i386/linuxbios/startup.S: Move from here ...
5511 * kern/i386/coreboot/startup.S: ... to here.
5513 * kern/i386/linuxbios/init.c: Move from here ...
5514 * kern/i386/coreboot/init.c: ... to here.
5516 * kern/i386/linuxbios/table.c: Move from here ...
5517 * kern/i386/coreboot/mmap.c: ... to here.
5519 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5521 2008-08-11 Robert Millan <rmh@aybabtu.com>
5523 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5524 errors. Leave it to the upper layer to handle them.
5526 2008-08-09 Christian Franke <franke@computer.org>
5528 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5529 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5530 Install `grub.d/10_windows' only on Cygwin.
5531 * configure.ac: Add subst of `target_os'.
5532 Check `target_os' also before setting TARGET_OBJ2ELF.
5533 Add `--enable-grub-pe2elf'.
5535 2008-08-08 Robert Millan <rmh@aybabtu.com>
5537 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5538 (grub_last_time): Change type to grub_uint64_t.
5539 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5540 (grub_disk_close): Likewise.
5542 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5543 (run_menu): Migrate code from to using grub_get_time_ms().
5545 * util/misc.c (grub_get_time_ms): New function.
5547 2008-08-08 Marco Gerards <marco@gnu.org>
5549 * disk/ata.c (grub_ata_regget): Change return type to
5551 (grub_ata_regget2): Likewise.
5552 (grub_ata_wait_status): New function.
5553 (grub_ata_wait_busy): Removed function, updated all users to use
5554 `grub_ata_wait_status'.
5555 (grub_ata_wait_drq): Likewise.
5556 (grub_ata_cmd): New function.
5557 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5559 (grub_ata_pio_write): Add error handling.
5560 (grub_atapi_identify): Likewise.
5561 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5563 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5564 handling. Actually use the detected registers. Reorder the
5565 detection logic such that it is easier to read.
5566 (grub_ata_pciinit): Do not assign the same ID to each controller.
5567 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5569 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5571 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5573 2008-08-08 Marco Gerards <marco@gnu.org>
5577 2008-08-07 Bean <bean123ch@gmail.com>
5579 * include/grub/x86_64/pci.h: New file.
5581 2008-08-07 Christian Franke <franke@computer.org>
5583 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5584 (TIMER2_GATE): Likewise.
5585 (grub_pit_wait): Add enable/disable of the timer2 gate
5586 bit of port 0x61. This fixes a possible infinite loop.
5588 2008-08-07 Bean <bean123ch@gmail.com>
5590 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5591 kern/i386/tsc.c and kern/i386/pit.c.
5593 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5596 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5599 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5601 2008-08-07 Bean <bean123ch@gmail.com>
5603 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5605 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5607 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5608 multiple inclusion. Add #include <grub/types.h>.
5610 2008-08-06 Christian Franke <franke@computer.org>
5612 * conf/common.rmk: Build and install `10_windows'.
5613 * util/grub.d/10_windows.in: New script.
5615 2008-08-06 Pavel Roskin <proski@gnu.org>
5617 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5619 2008-08-06 Robert Millan <rmh@aybabtu.com>
5621 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5622 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5624 2008-08-06 Bean <bean123ch@gmail.com>
5626 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5627 (grub_pxefs_fs_int): Remove dummy definition.
5628 (grub_pxefs_open): Use data->block_size to store the current block
5630 (grub_pxefs_read): Use block size stored in data->block_size. As the
5631 value of grub_pxe_blksize can be changed after the file is opened.
5633 2008-08-06 Bean <bean123ch@gmail.com>
5635 * fs/i386/pc/pxe.c (curr_file): new variable.
5636 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5637 require the dummy internal file system anymore.
5638 (grub_pxefs_read): Removed.
5639 (grub_pxefs_close): Likewise.
5640 (grub_pxefs_fs_int): Likewise.
5641 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5642 connection when we switch file.
5643 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5645 2008-08-06 Robert Millan <rmh@aybabtu.com>
5647 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5649 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5650 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5652 * kern/i386/halt.c: New file.
5653 * kern/i386/reboot.c: Likewise.
5654 * include/grub/i386/reboot.h: Likewise.
5655 * include/grub/i386/halt.h: Likewise.
5657 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5658 Include `<grub/cpu/halt.h>'.
5659 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5660 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5662 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5663 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5664 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5665 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5666 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5667 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5669 * include/grub/i386/at_keyboard.h: ... to here.
5671 2008-08-05 Robert Millan <rmh@aybabtu.com>
5673 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5674 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5675 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5676 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5677 `kern/generic/millisleep.c'.
5679 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5680 instead of grub_get_rtc().
5681 (grub_tsc_init): Initialize `tsc_boot_time'.
5683 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5684 (grub_machine_init): Use grub_tsc_init() rather than
5685 installing an RTC-based handler via grub_install_get_time_ms().
5687 * kern/i386/pit.c: New file.
5688 * include/grub/i386/pit.h: Likewise.
5690 2008-08-05 Bean <bean123ch@gmail.com>
5692 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5694 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5695 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5696 (pxe_mod_SOURCES): New macro.
5697 (pxe_mod_CFLAGS): Likewise.
5698 (pxe_mod_LDFLAGS): Likewise.
5699 (pxecmd_mod_SOURCES): Likewise.
5700 (pxecmd_mod_CFLAGS): Likewise.
5701 (pxecmd_mod_LDFLAGS): Likewise.
5703 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5704 (grub_pxe_call): Likewise.
5706 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5708 * commands/i386/pc/pxecmd.c: New file.
5710 * fs/i386/pc/pxe.c: Likewise.
5712 * include/grub/i386/pc/pxe.h: Likewise.
5714 2008-08-05 Bean <bean123ch@gmail.com>
5716 * util/console.c (grub_console_cur_color): New variable.
5717 (grub_console_standard_color): Likewise.
5718 (grub_console_normal_color): Likewise.
5719 (grub_console_highlight_color): Likewise.
5720 (color_map): Likewise.
5721 (use_color): Likewise.
5722 (NUM_COLORS): New macro.
5723 (grub_ncurses_setcolorstate): Handle color properly.
5724 (grub_ncurses_setcolor): Don't change color here, just remember the
5725 settings, color will be set in grub_ncurses_setcolorstate.
5726 (grub_ncurses_getcolor): New function.
5727 (grub_ncurses_init): Initialize color pairs.
5728 (grub_ncurses_term): New member grub_ncurses_getcolor.
5730 2008-08-05 Colin D Bennett <colin@gibibit.com>
5732 High resolution timer support. Implemented for x86 CPUs using TSC.
5733 Extracted generic grub_millisleep() so it's linked in only as needed.
5734 This requires a Pentium compatible CPU; if the RDTSC instruction is
5735 not supported, then it falls back on the generic grub_get_time_ms()
5736 implementation that uses the machine's RTC.
5738 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5739 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5740 `kern/generic/millisleep.c'.
5742 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5743 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5745 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5746 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5748 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5750 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5751 `kern/generic/millisleep.c'.
5753 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5755 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5757 * kern/generic/rtc_get_time_ms.c: New file.
5759 * kern/generic/millisleep.c: New file.
5761 * kern/misc.c: Don't include
5762 <kern/time.h> anymore.
5763 (grub_millisleep_generic): Removed.
5765 * commands/sleep.c (grub_interruptible_millisleep): Uses
5766 grub_get_time_ms() instead of grub_get_rtc().
5768 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5770 (grub_cpu_is_cpuid_supported): New inline function.
5771 (grub_cpu_is_tsc_supported): New inline function.
5772 (grub_tsc_init): New function prototype.
5773 (grub_tsc_get_time_ms): New function prototype.
5775 * kern/i386/tsc.c (grub_get_time_ms): New file.
5777 * include/grub/time.h: Include <grub/types.h.
5778 (grub_millisleep_generic): Removed.
5779 (grub_get_time_ms): New prototype.
5780 (grub_install_get_time_ms): New prototype.
5781 (grub_rtc_get_time_ms): New prototype.
5783 * kern/time.c (grub_get_time_ms): New function.
5784 (grub_install_get_time_ms): New function.
5786 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5787 <grub/time.h> anymore.
5788 (grub_millisleep): Removed.
5789 (grub_machine_init): Call grub_tsc_init.
5791 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5792 get_time_ms() implementation.
5794 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5795 (ieee1275_get_time_ms): New function.
5796 (grub_machine_init): Install get_time_ms() implementation.
5798 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5799 (grub_machine_init): Call grub_tsc_init().
5800 (grub_millisleep): Removed.
5802 * kern/ieee1275/init.c (grub_millisleep): Removed.
5803 (grub_machine_init): Install ieee1275_get_time_ms()
5805 (ieee1275_get_time_ms): New function.
5806 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5809 2008-08-05 Marco Gerards <marco@gnu.org>
5811 * disk/ata.c: Include <grub/pci.h>.
5812 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5813 (grub_ata_initialize): Rewritten.
5814 (grub_ata_device_initialize): New function.
5816 2008-08-04 Pavel Roskin <proski@gnu.org>
5818 * kern/main.c: Include grub/mm.h.
5820 2008-08-04 Robert Millan <rmh@aybabtu.com>
5822 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5823 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5824 corruption problem).
5826 2008-08-04 Robert Millan <rmh@aybabtu.com>
5828 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5829 warnings introduced in my last commit.
5831 2008-08-03 Robert Millan <rmh@aybabtu.com>
5833 Make PCI available on all i386 architectures.
5835 * include/grub/i386/pc/pci.h: Move from here ...
5836 * include/grub/i386/pci.h: ... to here.
5838 * include/grub/i386/pc/pci.h: Remove.
5839 * include/grub/i386/efi/pci.h: Remove.
5840 * include/grub/x86_64/efi/pci.h: Remove.
5842 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5845 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5846 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5847 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5849 * conf/i386-ieee1275.rmk: Likewise.
5851 2008-08-03 Robert Millan <rmh@aybabtu.com>
5853 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5854 (grub_console_setcursor): Make it possible to set cursor off.
5856 2008-08-03 Robert Millan <rmh@aybabtu.com>
5858 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
5859 of modules instead of assuming which platform provides what.
5860 * util/update-grub.in: Likewise.
5862 2008-08-03 Robert Millan <rmh@aybabtu.com>
5864 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5865 instead of `grub_install_dos_part' to determine whether a drive needs
5866 to be prepended to prefix (`grub_install_dos_part' is not reliable,
5867 because it can be overridden when loading GRUB via Multiboot).
5869 2008-08-02 Robert Millan <rmh@aybabtu.com>
5871 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5873 2008-08-02 Robert Millan <rmh@aybabtu.com>
5875 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5876 of informational grub_dprintf() calls.
5878 2008-08-02 Robert Millan <rmh@aybabtu.com>
5880 * disk/memdisk.c (memdisk_size): Don't initialize.
5881 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5883 * include/grub/i386/pc/kernel.h
5884 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5885 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5886 (grub_memdisk_image_size, grub_arch_memdisk_addr)
5887 (grub_arch_memdisk_size): Remove.
5889 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5890 field (was only used to transfer a constant). Add `type' field to
5891 support multiple module types.
5892 (grub_module_iterate): New function.
5894 * kern/device.c (grub_device_open): Do not hide error messages
5895 when grub_disk_open() fails. Use grub_print_error() instead.
5897 * kern/i386/pc/init.c (grub_arch_modules_addr)
5898 (grub_arch_memdisk_size): Remove functions.
5899 (grub_arch_modules_addr): Return the module address in high memory
5900 (now that it isn't copied anymore).
5902 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5903 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5904 decompression routine (grub_total_module_size already includes that
5905 now). Don't copy modules back to low memory.
5907 * kern/main.c: Include `<grub/mm.h>'.
5908 (grub_load_modules): Split out (and use) ...
5909 (grub_module_iterate): ... this function, which iterates through
5910 module objects and runs a hook.
5911 Comment out grub_mm_init_region() call, as it would cause non-ELF
5912 modules to be overwritten.
5914 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5915 the memdisk image in its own region, make it part of the module list.
5916 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5917 (main): Parse --memdisk|-m option, and pass user-provided path as
5918 parameter to generate_image().
5919 (add_segments): Pass `memdisk_path' down to load_modules().
5920 (load_modules): Embed memdisk image in module section when requested.
5921 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5922 `header.type' instead of `header.offset'.
5924 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5925 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5926 (memdisk_mod_LDFLAGS): New variables.
5927 * conf/i386-coreboot.rmk: Likewise.
5928 * conf/i386-ieee1275.rmk: Likewise.
5930 2008-08-02 Robert Millan <rmh@aybabtu.com>
5932 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5933 (backward_relocator): New variables. Used to allocate and relocate
5934 the payload, respectively.
5935 (grub_multiboot_load_elf32): Load into heap instead of requested
5936 address, install the appropriate relocator code in each bound of
5937 the payload, and set the entry point such that
5938 grub_multiboot_real_boot() will jump to one of them.
5940 * kern/i386/loader.S (grub_multiboot_payload_size)
5941 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5942 (grub_multiboot_payload_entry_offset): New variables.
5943 (grub_multiboot_real_boot): Set cpu context to what the relocator
5944 expects, and jump to the relocator instead of the payload.
5946 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5947 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5948 (grub_multiboot_payload_entry_offset): Export.
5950 2008-08-01 Bean <bean123ch@gmail.com>
5952 * normal/menu_entry.c (editor_getline): Don't return the original
5953 string as result, as it will be released by lexer once it has done
5956 2008-08-01 Robert Millan <rmh@aybabtu.com>
5958 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5959 within menuentries, not before them.
5960 util/grub.d/10_hurd.in: Likewise.
5962 2008-08-01 Bean <bean123ch@gmail.com>
5964 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5965 (bufio_mod_SOURCES): New macro.
5966 (bufio_mod_CFLAGS): Likewise.
5967 (bufio_mod_LDFLAGS): Likewise.
5969 * include/grub/bufio.h: New file.
5971 * io/bufio.c: Likewise.
5973 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5974 (grub_video_reader_png): Use grub_buffile_open to open file.
5976 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5977 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5979 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5980 (grub_video_reader_tga): Use grub_buffile_open to open file.
5982 * font/manager.c: Include <grub/bufio.h>.
5983 (add_font): Use grub_buffile_open to open file.
5985 2008-07-31 Robert Millan <rmh@aybabtu.com>
5987 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5988 ELF segments, use a macro for arbitrarily accessing any of them instead
5989 of preparing a pointer that allows access to one at a time.
5990 (grub_multiboot_load_elf64): Likewise.
5992 2008-07-31 Bean <bean123ch@gmail.com>
5994 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5995 GRUB_KERNEL_MACHINE_DATA_END.
5997 2008-07-30 Robert Millan <rmh@aybabtu.com>
5999 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6000 Increase from 0x50 to 0x60.
6001 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6002 use UUIDs to identify the root drive for them. If that's not
6004 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6005 check, for cross-disk installs.
6007 2008-07-30 Robert Millan <rmh@aybabtu.com>
6009 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6010 is non-empty, use it to set the `prefix' environment variable instead
6011 of the usual approach.
6012 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6013 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6014 environment variable instead of dummy make_install_device().
6016 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6017 (start): Insert a data section, with `grub_prefix' variable.
6018 * kern/i386/linuxbios/startup.S: Likewise.
6020 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6021 New variable reference.
6022 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6023 New macro. Defines offset of `grub_prefix' within startup.S (relative
6025 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6026 section within startup.S (relative to `start').
6027 * include/grub/i386/coreboot/kernel.h: Likewise.
6029 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6030 Overwrite grub_prefix with its contents, at the beginning of the
6032 (main): Understand -p|--prefix.
6034 2008-07-30 Robert Millan <rmh@aybabtu.com>
6036 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6038 2008-07-30 Robert Millan <rmh@aybabtu.com>
6040 * term/i386/pc/vga_text.c (grub_console_cls): Use
6041 grub_console_gotoxy() to go back to beginning of the screen.
6042 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6044 2008-07-29 Christian Franke <franke@computer.org>
6046 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6047 Add conversion of emulated mount points on Cygwin.
6049 2008-07-29 Christian Franke <franke@computer.org>
6051 * util/update-grub.in: Add a check for admin
6053 Remove old `grub.cfg.new' before creation.
6054 Add `-f' to `mv' to handle the different filesystem
6055 semantics of Windows.
6057 2008-07-29 Bean <bean123ch@gmail.com>
6059 * normal/main.c (get_line): Fix buffer overflow bug.
6061 2008-07-28 Robert Millan <rmh@aybabtu.com>
6063 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6064 (struct grub_apple_header): New struct. Describes the layout of
6066 (apple_partition_map_iterate): Check the header magic as well as the
6067 partition magic (which was already being checked).
6069 2008-07-28 Pavel Roskin <proski@gnu.org>
6071 * genmk.rb: Add a warning to the beginning of the output that
6072 it's a generated file and should not be edited.
6074 2008-07-28 Robert Millan <rmh@aybabtu.com>
6076 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6077 with the same number are found, just use issue a warning with
6078 grub_dprintf(), as this error has been reported to be non-fatal.
6080 2008-07-27 Robert Millan <rmh@aybabtu.com>
6082 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6085 2008-07-27 Bean <bean123ch@gmail.com>
6087 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6088 (grub_fat_find_dir): Ignore case when comparing filename.
6090 2008-07-27 Bean <bean123ch@gmail.com>
6092 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6093 smallino, as it's more descriptive, and i8count can be confused with
6094 the other field count.
6095 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6098 2008-07-27 Bean <bean123ch@gmail.com>
6100 * commands/crc.c: New file.
6102 * lib/crc.c: Likewise.
6104 * include/grub/lib/crc.h: Likewise.
6106 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6108 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6109 (hexdump): Move this function to ...
6111 * lib/hexdump.c: ... here.
6113 * include/grub/hexdump.h: Renamed to ...
6115 * include/grub/lib/hexdump.h: ... this.
6117 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6119 * util/grub-editenv.c: Likewise.
6121 * include/envblk.h: Renamed to ...
6123 * include/lib/envblk.h: ... this.
6125 * util/envblk.c: Renamed to ...
6127 * lib/envblk.c: ... this.
6129 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6131 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6132 (pkglib_MODULES): Add crc.mod.
6133 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6134 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6135 (crc_mod_SOURCES): New macro.
6136 (crc_mod_CFLAGS): Likewise.
6137 (crc_mod_LDFLAGS): Likewise.
6139 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6141 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6143 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6145 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6147 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6149 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
6151 * commands/help.c: Include <grub/term.h>.
6152 (TERM_WIDTH): Removed. Updated all users.
6154 2008-07-27 Pavel Roskin <proski@gnu.org>
6156 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6157 spurious warnings about a comment within a comment.
6159 2008-07-25 Robert Millan <rmh@aybabtu.com>
6161 * util/getroot.c (find_root_device): Skip devices that match
6162 /dev/dm-[0-9]. This lets the real device be found for any type of
6163 abstraction (LVM, EVMS, RAID..).
6164 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6165 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6166 device is found first, find_root_device() will now skip it.
6168 2008-07-24 Pavel Roskin <proski@gnu.org>
6170 * include/grub/types.h: Use __builtin_bswap32() and
6171 __builtin_bswap64() with gcc 4.3 and newer.
6173 2008-07-24 Christian Franke <franke@computer.org>
6175 * util/i386/pc/grub-install.in: If `--debug' is specified,
6176 pass `--verbose' to grub-setup.
6177 Abort script if make_system_path_relative_to_its_root() fails.
6179 2008-07-24 Bean <bean123ch@gmail.com>
6181 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6182 variable `target_platform' should be `platform'.
6184 2008-07-24 Bean <bean123ch@gmail.com>
6186 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6187 (grub_png_init_fixed_block): New function.
6188 (grub_png_decode_image_data): Handle fixed huffman code compression.
6190 2008-07-24 Bean <bean123ch@gmail.com>
6192 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6193 (grub_pe2elf_SOURCES): New macro.
6194 (CLEANFILES): Add grub-pe2elf.
6196 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6197 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6198 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6199 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6200 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6201 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6202 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6203 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6204 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6205 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6206 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6207 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6208 (GRUB_PE32_DT_FUNCTION): Likewise.
6209 (GRUB_PE32_REL_I386_DIR32): Likewise.
6210 (GRUB_PE32_REL_I386_REL32): Likewise.
6211 (grub_pe32_symbol): New structure.
6212 (grub_pe32_reloc): Likewise.
6214 * util/grub-pe2elf.c: New file.
6216 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6217 start symbol in non pc platform.
6219 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6221 The following patches are from Christian Franke.
6223 * include/grub/dl.h: Remove .previous, gas supports this only
6226 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6227 Remove .type, gas supports this only for ELF format.
6229 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6230 nullbytes in symbol table. This fixes an infinite loop if table is
6233 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6234 TARGET_IMG_LDFLAGS and EXEEXT.
6236 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6237 TARGET_IMG_LDFLAGS_AC.
6238 (grub_CHECK_STACK_ARG_PROBE): New function.
6240 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6242 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6244 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6245 to set TARGET_IMG_LD* accordingly.
6246 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6247 Add call to grub_CHECK_STACK_ARG_PROBE.
6248 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6250 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6252 * genmk.rb: Add EXEEXT to CLEANFILES.
6254 2008-07-23 Robert Millan <rmh@aybabtu.com>
6256 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6257 define the codes for arrows and lines used for the menu).
6258 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6261 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6262 fonts, because the latter are too slow.
6264 2008-07-21 Bean <bean123ch@gmail.com>
6266 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6267 a20. Run keyboard test last, as it will cause macbook to halt.
6269 2008-07-18 Pavel Roskin <proski@gnu.org>
6271 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6272 load foreign architecture modules correctly anyway. Keep
6273 support for loading host architecture modules, whether we
6274 compile them or not.
6276 2008-07-17 Pavel Roskin <proski@gnu.org>
6278 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6279 change target_cpu. The compiler default can mismatch target_cpu
6282 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6283 * kern/efi/efi.c: Likewise.
6285 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6286 target compiler is functional.
6287 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6290 * configure.ac: Default to efi platform for x86_64-apple. Allow
6291 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6292 adjustments from the rest, only do them if target is not
6293 explicitly given. Merge other adjustments with the final sanity
6294 check. Remove an extraneous check for supported CPU. Be
6295 specific which CPU and which platform is not supported.
6297 * configure.ac: Default to pc platform for x86_64.
6299 2008-07-17 Robert Millan <rmh@aybabtu.com>
6301 Partial LinuxBIOS -> Coreboot rename.
6303 * conf/i386-linuxbios.rmk: Renamed to ...
6304 * conf/i386-coreboot.rmk: ... this.
6305 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6306 * configure.ac: Accept "coreboot" as input platform (but maintain
6307 compatibility with "linuxbios").
6308 * include/grub/i386/linuxbios: Renamed to ...
6309 * include/grub/i386/coreboot: ... this.
6311 2008-07-17 Bean <bean123ch@gmail.com>
6313 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6314 (appleldr_mod_SOURCE): New variable.
6315 (appleldr_mod_CFLAGS): Likewise.
6316 (appleldr_mod_LDFLAGS): Likewise.
6317 (pci_mod_SOURCES): Likewise.
6318 (pci_mod_CFLAGS): Likewise.
6319 (pci_mod_LDFLAGS): Likewise.
6320 (lspci_mod_SOURCES): Likewise.
6321 (lspci_mod_CFLAGS): Likewise.
6322 (lspci_mod_LDFLAGS): Likewise.
6324 * conf/x86_64-efi.rmk: New file.
6326 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6328 (grub_efidisk_write): Likewise.
6330 * include/efi/api.h (efi_call_0): New macro.
6331 (efi_call_1): Likewise.
6332 (efi_call_2): Likewise.
6333 (efi_call_3): Likewise.
6334 (efi_call_4): Likewise.
6335 (efi_call_5): Likewise.
6336 (efi_call_6): Likewise.
6338 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6339 grub_rescue_cmd_chainloader.
6341 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6342 (grub_pe32_optional_header): Change some fields based on i386 or
6344 (GRUB_PE32_PE32_MAGIC): Likewise.
6346 * include/grub/efi/uga_draw.h: New file.
6348 * include/grub/elf.h (STN_ABS): New constant.
6349 (R_X86_64_NONE): Relocation constant for x86_64.
6350 (R_X86_64_64): Likewise.
6351 (R_X86_64_PC32): Likewise.
6352 (R_X86_64_GOT32): Likewise.
6353 (R_X86_64_PLT32): Likewise.
6354 (R_X86_64_COPY): Likewise.
6355 (R_X86_64_GLOB_DAT): Likewise.
6356 (R_X86_64_JUMP_SLOT): Likewise.
6357 (R_X86_64_RELATIVE): Likewise.
6358 (R_X86_64_GOTPCREL): Likewise.
6359 (R_X86_64_32): Likewise.
6360 (R_X86_64_32S): Likewise.
6361 (R_X86_64_16): Likewise.
6362 (R_X86_64_PC16): Likewise.
6363 (R_X86_64_8): Likewise.
6364 (R_X86_64_PC8): Likewise.
6366 * include/grub/i386/efi/pci.h: New file.
6368 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6369 Change it value based on platform.
6370 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6371 (GRUB_E820_RAM): Likewise.
6372 (GRUB_E820_RESERVED): Likewise.
6373 (GRUB_E820_ACPI): Likewise.
6374 (GRUB_E820_NVS): Likewise.
6375 (GRUB_E820_EXEC_CODE): Likewise.
6376 (GRUB_E820_MAX_ENTRY): Likewise.
6377 (grub_e820_mmap): New structure.
6378 (linux_kernel_header): Change the efi field according to different
6379 kernel version, also field from linux_kernel_header.
6381 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6383 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6384 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6385 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6386 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6387 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6388 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6389 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6390 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6391 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6392 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6394 * include/grub/x86_64/efi/kernel.h: New file.
6396 * include/grub/x86_64/efi/loader.h: Likewise.
6398 * include/grub/x86_64/efi/machine.h: Likewise.
6400 * include/grub/x86_64/efi/pci.h: Likewise.
6402 * include/grub/x86_64/efi/time.h: Likewise.
6404 * include/grub/x86_64/linux.h: Likewise.
6406 * include/grub/x86_64/setjmp.h: Likewise.
6408 * include/grub/x86_64/time.h: Likewise.
6410 * include/grub/x86_64/types.h: Likewise.
6412 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6413 GRUB_TARGET_SIZEOF_VOID_P.
6415 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6416 (grub_efi_locate_handle): Likewise.
6417 (grub_efi_open_protocol): Likewise.
6418 (grub_efi_set_text_mode): Likewise.
6419 (grub_efi_stall): Likewise.
6420 (grub_exit): Likewise.
6421 (grub_reboot): Likewise.
6422 (grub_halt): Likewise.
6423 (grub_efi_exit_boot_services): Likewise.
6424 (grub_get_rtc): Likewise.
6426 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6427 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6428 (grub_efi_allocate_pages): Wrap efi calls.
6429 (grub_efi_free_pages): Wrap efi calls.
6430 (grub_efi_get_memory_map): Wrap efi calls.
6432 * kern/x86_64/dl.c: New file.
6434 * kern/x86_64/efi/callwrap.S: Likewise.
6436 * kern/x86_64/efi/startup.S: Likewise.
6438 * loader/efi/appleloader.c: Likewise.
6440 * loader/efi/chainloader.c (cmdline): New variable.
6441 (grub_chainloader_unload): Wrap efi calls.
6442 (grub_chainloader_boot): Likewise.
6443 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6446 * loader/efi/chainloader_normal.c (chainloader_command):
6447 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6450 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6452 (grub_e820_add_region): New function.
6453 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6455 (grub_find_video_card): New function.
6456 (grub_linux_setup_video): New function.
6457 (grub_rescue_cmd_linux): Probe for video information.
6459 * normal/x86_64/setjmp.S: New file.
6461 * term/efi/console.c (map_char): New function.
6462 (grub_console_putchar): Map unicode char.
6463 (grub_console_checkkey): Wrap efi calls.
6464 (grub_console_getkey): Likewise.
6465 (grub_console_getwh): Likewise.
6466 (grub_console_gotoxy): Likewise.
6467 (grub_console_cls): Likewise.
6468 (grub_console_setcolorstate): Likewise.
6469 (grub_console_setcursor): Likewise.
6471 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6473 2008-07-16 Pavel Roskin <proski@gnu.org>
6475 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6478 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6479 pointer, not an integer. This fixes a warning and prevents
6480 precision loss on 64-bit systems.
6481 (relocate_addresses): Remove unneeded cast.
6483 2008-07-15 Pavel Roskin <proski@gnu.org>
6485 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6487 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6489 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6490 Fix comparison between signed and unsigned.
6492 * include/grub/i386/ieee1275/console.h: Declare
6493 grub_console_init() and grub_console_fini().
6495 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6496 It's empty and unused.
6498 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6499 beginning to avoid warnings with some compilers.
6501 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6502 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6504 2008-07-14 Pavel Roskin <proski@gnu.org>
6506 * kern/env.c (grub_register_variable_hook): Don't copy empty
6507 string, it leaks memory. Pass "" to grub_env_set(), it should
6508 handle constant strings.
6510 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6511 * commands/cmp.c (grub_cmd_cmp): Likewise.
6512 * kern/dl.c (grub_dl_flush_cache): Likewise.
6513 (grub_dl_load_core): Likewise.
6514 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6515 (grub_elf64_load_phdrs): Likewise.
6517 2008-07-13 Pavel Roskin <proski@gnu.org>
6519 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6520 between signed and unsigned.
6521 (LzmaEnc_Finish): Fix warning about an unused parameter.
6523 2008-07-13 Bean <bean123ch@gmail.com>
6525 * Makefile.in (enable_lzo): New rule.
6527 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6529 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6531 * boot/i386/pc/lnxboot.S: #include <config.h>.
6533 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6534 its value according to the compression algorithm used, lzo or lzma.
6536 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6537 compression algorithm according to configure macro.
6539 * kern/i386/pc/startup.S (codestart): Likewise.
6541 * kern/i386/pc/lzma_decode.S: New file.
6543 * include/grub/lib/LzFind.h: Likewise.
6545 * include/grub/lib/LzHash.h: Likewise.
6547 * include/grub/lib/LzmaDec.h: Likewise.
6549 * include/grub/lib/LzmaEnc.h: Likewise.
6551 * include/grub/lib/LzmaTypes.h: Likewise.
6553 * lib/LzFind.c: Likewise.
6555 * lib/LzmaDec.c: Likewise.
6557 * lib/LzmaEnc.c: Likewise.
6559 2008-07-13 Bean <bean123ch@gmail.com>
6561 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6562 (grub_ext4_extent_header): New structure.
6563 (grub_ext4_extent): Likewise.
6564 (grub_ext4_extent_idx): Likewise.
6565 (grub_ext4_find_leaf): New function.
6566 (grub_ext2_read_block): Handle extents.
6568 2008-07-12 Robert Millan <rmh@aybabtu.com>
6570 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6572 2008-07-11 Robert Millan <rmh@aybabtu.com>
6574 * util/grub.d/40_custom.in: New file. Example on how to add custom
6575 entries to /etc/grub.d.
6576 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6577 40_custom (implicitly, by merging all the grub.d rules).
6579 2008-07-11 Pavel Roskin <proski@gnu.org>
6581 * commands/read.c (grub_getline): Fix invalid memory access.
6582 Don't add newline to the variable value.
6584 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6585 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6586 (serial_hw_get_port): Check validity of the port number.
6587 (grub_cmd_serial): Check return value of serial_hw_get_port().
6589 2008-07-07 Pavel Roskin <proski@gnu.org>
6591 * boot/i386/pc/diskboot.S (notification_string): Replace
6592 "Loading kernel" with just "loading". This is shorter, less
6593 confusing and saves a few bytes for possible future changes.
6595 2008-07-05 Pavel Roskin <proski@gnu.org>
6597 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6598 size for ATAPI devices, they are undefined. Output sector
6599 number in decimal form.
6601 * disk/ata.c: Use named constants for status bits.
6603 2008-07-04 Pavel Roskin <proski@gnu.org>
6605 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6606 grub_addr_t before casting it to the void pointer to fix a
6607 warning. Non-addressable regions are discarded earlier.
6608 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6609 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6610 (check_signature): Don't shadow table_header.
6611 (grub_linuxbios_table_iterate): Cast numeric constants to
6612 grub_linuxbios_table_header_t.
6613 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6616 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6619 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6620 pointer, which can cause warnings. Support 64-bit addresses.
6622 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6623 of sizeof(long). This fixes PowerPC image generation on x86_64.
6625 2008-07-04 Robert Millan <rmh@aybabtu.com>
6627 This fixes a performance issue when pc & gpt partmap iterators
6628 didn't abort iteration even after our hook found what it was
6629 looking for (often causing expensive probes of non-existent drives).
6631 Some callers relied on previous buggy behaviour, since they would
6632 raise an error when their own hooks caused early abortion of its
6635 * kern/device.c (grub_device_open): Improve error message.
6636 * disk/lvm.c (grub_lvm_open): Likewise.
6637 * disk/raid.c (grub_raid_open): Likewise.
6639 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6640 when hook requests it, independently of grub_errno.
6641 (pc_partition_map_probe): Do not fail when find_func() caused
6642 early abortion of pc_partition_map_iterate().
6644 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6645 when hook requests it, independently of grub_errno.
6646 (gpt_partition_map_probe): Do not fail when find_func() caused
6647 early abortion of gpt_partition_map_iterate().
6649 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6650 when hook requests it, independently of grub_errno. Do not fail when
6651 part_map_iterate_hook() caused early abortion of p->iterate().
6653 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6654 when grub_partition_iterate() returned with non-zero.
6656 2008-07-03 Pavel Roskin <proski@gnu.org>
6658 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6659 like we do in grub_ata_pio_read().
6660 (grub_ata_readwrite): Always write individual sectors. Fix the
6661 sector count for the remainder.
6662 (grub_ata_write): Enable writing to ATA devices. Correctly
6663 report error for ATAPI devices.
6665 2008-07-02 Pavel Roskin <proski@gnu.org>
6667 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6670 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6671 for every read sector, we already increment it for the whole
6672 batch. This fixes reading more than 256 sectors at once.
6674 * util/grub-editenv.c (cmd_info): Cast argument to long
6675 explicitly. ptrdiff_t reduces to int on i386.
6677 * util/grub-editenv.c (main): Be specific which parameter is
6680 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6681 (memdisk): Make memdisk_orig_addr a pointer.
6683 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6684 for file offsets, use grub_off_t instead. Fix printf format
6687 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6688 there. Real unexpected warnings should not drown in the noise
6689 about known problems.
6691 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6692 grub_disk_addr_t for memory addresses.
6694 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6695 explicitly to fix a warning.
6697 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6699 * Makefile.in (MODULE_LDFLAGS): New variable.
6700 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6701 the linker accepts --build-id=none.
6702 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6704 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6706 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6707 those in Linux XFS code. Provide a way to access 64-bit parent
6709 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6710 the end of struct grub_xfs_dir_header.
6712 2008-07-02 Bean <bean123ch@gmail.com>
6714 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6715 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6716 and GRUB_IEEE1275_FLAG_NO_ANSI.
6718 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6719 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6720 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6722 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6723 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6725 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6726 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6728 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6729 esc sequence on non ANSI terminal.
6730 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6732 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6735 2008-07-02 Bean <bean123ch@gmail.com>
6737 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6738 (grub_editenv_SOURCES): New variable.
6739 (pkglib_MODULES): Add loadenv.mod.
6740 (loadenv_mod_SOURCES): New variable.
6741 (loadenv_mod_CFLAGS): Likewise.
6742 (loadenv_mod_LDFLAGS): Likewise.
6744 * include/grub/envblk.h: New file.
6746 * util/envblk.c: New file.
6748 * util/grub-editenv.c: New file.
6750 * commands/loadenv.c: New file.
6752 2008-07-01 Pavel Roskin <proski@gnu.org>
6754 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6755 not unsigned char. This fixes warnings and is consistent with
6758 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6760 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6762 * term/tparm.c (analyze): Always set *popcount.
6764 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6765 cast to fix a warning.
6767 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6768 cast to suppress a warning.
6770 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6771 grub_fshelp_read_file() expects.
6773 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6774 write uuid as a 32-bit value in CPU byte order, so declare and
6777 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6778 long if the format specifier expects it.
6779 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6780 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6781 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6782 long to fix a warning.
6783 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6784 grub_dprintf() arguments to fix warnings.
6786 2008-06-30 Pavel Roskin <proski@gnu.org>
6788 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6789 install_bsd_part immediately before core.img is embedded or
6790 modified on disk. This fixes core.img verification if core.img
6793 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6794 core_path to calculate the blocklist.
6795 Patch from Javier MartÃn <lordhabbit@gmail.com>
6797 2008-06-29 Robert Millan <rmh@aybabtu.com>
6799 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6800 block to disk block.
6801 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6802 Patch from Niels Böhm <bitbucket@arcor.de>
6804 2008-06-29 Robert Millan <rmh@aybabtu.com>
6806 * util/update-grub_lib.in (font_path): Search for fonts in
6807 /boot/grub first, which is more likely to be readable (we aren't
6808 deciding where fonts live, just looking for them).
6810 2008-06-26 Pavel Roskin <proski@gnu.org>
6812 * util/biosdisk.c (read_device_map): Don't leave dead map
6813 entries for devices failing stat() check.
6815 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6816 core_path_dev for the core.img path on the target device.
6818 2008-06-26 Robert Millan <rmh@aybabtu.com>
6820 * disk/fs_uuid.c: New file.
6821 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6822 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6823 (fs_uuid_mod_LDFLAGS): New variables.
6824 * include/grub/disk.h (grub_disk_dev_id): Add
6825 `GRUB_DISK_DEVICE_UUID_ID'.
6826 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6827 implement iterate().
6829 2008-06-26 Robert Millan <rmh@aybabtu.com>
6831 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6832 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6833 Linux image includes no initrd.
6835 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
6837 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6838 call to resolve the core image location that effectively appended the
6841 2008-06-21 Robert Millan <rmh@aybabtu.com>
6843 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6846 * util/grub.d/10_hurd.in: ... to here ...
6847 * util/grub.d/10_linux.in: ... and here.
6849 2008-06-19 Robert Millan <rmh@aybabtu.com>
6851 * kern/main.c (grub_main): Export `prefix' variable immediately
6852 after it has been set by grub_machine_set_prefix().
6854 2008-06-19 Robert Millan <rmh@aybabtu.com>
6856 * commands/search.c (search_label, search_fs_uuid, search_file): Print
6857 search result when not saving to variable, not the other way around.
6858 When saving to variable, abort iteration as soon as a match is found.
6860 2008-06-19 Robert Millan <rmh@aybabtu.com>
6862 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6863 check for partition that provides /boot/grub. Its logic is flawed,
6864 as it prevents prepare_grub_to_access_device() from being called
6867 2008-06-19 Robert Millan <rmh@aybabtu.com>
6869 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6870 "insmod" command directly when abstraction modules are needed,
6871 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6872 since it had already been processed).
6874 2008-06-19 Pavel Roskin <proski@gnu.org>
6876 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6877 changed. This is needed in case GRUB_LIBDIR changes.
6878 * conf/i386-ieee1275.rmk: Likewise.
6879 * conf/i386-linuxbios.rmk: Likewise.
6880 * conf/i386-pc.rmk: Likewise.
6881 * conf/powerpc-ieee1275.rmk: Likewise.
6883 2008-06-18 Pavel Roskin <proski@gnu.org>
6885 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6886 kernel_elf_symlist.c to symlist.c for consistency with other
6887 architectures. Update all users.
6888 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6890 2008-06-18 Robert Millan <rmh@aybabtu.com>
6892 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6895 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
6896 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
6897 a RAID device, run setup() for all members independently on whether
6898 LVM abstraction is being used.
6899 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6900 If grub-mkimage has set `*install_dos_part == -2', don't override this
6902 Perform *install_dos_part adjustments independently on whether
6903 we're embedding or not.
6904 Clarify error message when image is too big for embedding.
6905 Remove duplicate *install_dos_part stanza.
6907 2008-06-17 Robert Millan <rmh@aybabtu.com>
6909 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6910 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6912 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6913 values in grub_ofconsole_normal_color and
6914 grub_ofconsole_highlight_color (they're not directly related to
6915 background and foreground).
6916 (grub_ofconsole_setcolorstate): Extract background and foreground
6917 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6919 2008-06-17 Robert Millan <rmh@aybabtu.com>
6921 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6922 /boot/grub for the check in last commit, not /boot (they could be
6923 different partitions).
6925 2008-06-16 Robert Millan <rmh@aybabtu.com>
6927 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6928 asked to setup access for the same partition that provides /boot,
6929 don't bother using UUIDs since our root already has the value we
6932 2008-06-16 Robert Millan <rmh@aybabtu.com>
6934 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6936 Patch from Sven Mueller <sven@debian.org>.
6938 2008-06-16 Robert Millan <rmh@aybabtu.com>
6940 * util/update-grub.in: Check for $EUID instead of $UID.
6941 Reported by Vincent Zweije.
6943 2008-06-16 Bean <bean123ch@gmail.com>
6945 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6946 (grub_ext2_read_block): Likewise.
6947 (grub_ext2_read_inode): Likewise.
6948 (grub_ext2_mount): Likewise.
6949 (grub_ext2_close): Likewise.
6950 (grub_ext3_get_journal): Removed.
6952 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6953 (grub_reiserfs_read_symlink): Likewise.
6954 (grub_reiserfs_mount): Likewise.
6955 (grub_reiserfs_open): Likewise.
6956 (grub_reiserfs_read): Likewise.
6957 (grub_reiserfs_close): Likewise.
6958 (grub_reiserfs_get_journal): Removed.
6960 * fs/fshelp.c (grub_fshelp_read): Removed.
6961 (grub_fshelp_map_block): Likewise.
6963 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6964 (grub_fshelp_journal): Likewise.
6965 (grub_fshelp_read): Likewise.
6966 (grub_fshelp_map_block): Likewise.
6968 2008-06-16 Pavel Roskin <proski@gnu.org>
6970 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6971 floating point anymore.
6972 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6974 2008-06-15 Pavel Roskin <proski@gnu.org>
6976 * commands/ls.c (grub_ls_list_files): Use integer calculations
6977 for human readable format, avoid floating point use.
6978 * kern/misc.c (grub_ftoa): Remove.
6979 (grub_vsprintf): Remove floating point support.
6981 2008-06-15 Robert Millan <rmh@aybabtu.com>
6983 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6985 Reported by Max Vozeler.
6987 2008-06-15 Robert Millan <rmh@aybabtu.com>
6989 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6990 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6992 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6993 the beginning of the prefix.
6995 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6996 It is assumed that if we have a memdisk, grub-mkimage has set
6997 grub_prefix to include the "(memdisk)" drive in it.
6999 2008-06-15 Robert Millan <rmh@aybabtu.com>
7001 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7002 Initialize keyboard controller after registering the terminal, so that
7003 grub_printf() can be called from grub_keyboard_controller_init().
7005 2008-06-15 Robert Millan <rmh@aybabtu.com>
7007 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7008 extent-btree which is written as big endian on disk.
7009 Reported by Alain Greppin <al@chilibi.org>.
7011 2008-06-14 Robert Millan <rmh@aybabtu.com>
7013 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7014 * util/i386/pc/grub-install.in (modules): Likewise.
7016 2008-06-13 Pavel Roskin <proski@gnu.org>
7018 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7020 2008-06-13 Bean <bean123ch@gmail.com>
7022 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7024 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7026 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7027 to indicate sparse block.
7029 2008-06-12 Pavel Roskin <proski@gnu.org>
7031 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7032 number, grub_fshelp_read() does it for us.
7034 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7035 linear disk read with journal translation.
7036 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7037 * include/grub/fshelp.h: Declare grub_fshelp_read().
7039 2008-06-09 Pavel Roskin <proski@gnu.org>
7041 * fs/minix.c (grub_minix_mount): Handle error reading
7044 2008-06-08 Robert Millan <rmh@aybabtu.com>
7046 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7047 don't append the RAID prefix afterwards.
7048 Reported by Clint Adams.
7050 2008-06-08 Robert Millan <rmh@aybabtu.com>
7052 Based on description from Pavel:
7053 * kern/disk.c (grub_disk_check_range): Rename to ...
7054 (grub_disk_adjust_range): ... this. Add a comment explaining the
7055 tasks performed by this function.
7057 2008-06-08 Robert Millan <rmh@aybabtu.com>
7059 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7060 `num_serial' (for consistency with other variables).
7061 (struct grub_ntfs_data): Add `uuid' member.
7062 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7063 (grub_ntfs_uuid): New function.
7064 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7066 2008-06-07 Pavel Roskin <proski@gnu.org>
7068 * util/biosdisk.c (open_device): Revert last change to the
7069 function, it broke installation. The sector needs to be
7070 different dependent on which device is opened.
7072 2008-06-06 Robert Millan <rmh@aybabtu.com>
7074 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7075 rest of GRUB, and breakage doesn't happen if its value were modified.
7077 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7078 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7079 a constant (same value).
7080 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7081 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7083 2008-06-06 Robert Millan <rmh@aybabtu.com>
7085 * util/biosdisk.c (open_device): Do not modify sector offset when
7086 accessing a partition. kern/disk.c already handles this for us.
7088 2008-06-06 Robert Millan <rmh@aybabtu.com>
7090 * util/grub-emu.c (grub_machine_init): Move code in this function from
7092 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7093 segfault in case grub_printf() is called).
7095 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7096 grub_probe. Update all users not to explicitly add it again.
7097 (grub_device): New variable; contains corresponding device for grubdir.
7098 (fs_module, partmap_module, devabstraction_module): Pass
7099 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7102 2008-06-05 Robert Millan <rmh@aybabtu.com>
7104 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7105 is found, print it (same layout as with labels).
7107 2008-06-04 Robert Millan <rmh@aybabtu.com>
7109 * util/biosdisk.c (get_drive): Rename to ...
7110 (find_grub_drive): ... this. Update all users.
7112 (get_os_disk): Rename to ...
7113 (convert_system_partition_to_system_disk): ... this. Update all users.
7115 (find_drive): Rename to ...
7116 (find_system_device): ... this. Update all users.
7118 2008-06-04 Robert Millan <rmh@aybabtu.com>
7120 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7121 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7122 (make_device_map): Likewise.
7124 2008-06-01 Robert Millan <rmh@aybabtu.com>
7126 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7127 before dereferencing it.
7129 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7130 union with fat12/fat16-specific ones. Add some new fields, including
7131 `num_serial' for both versions.
7132 (struct grub_fat_data): Add `uuid' member.
7133 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7134 names. Initialize `data->uuid' using `num_serial'.
7135 (grub_fat_uuid): New function.
7136 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7138 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7139 (grub_reiserfs_uuid): New function.
7140 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7143 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7144 (grub_xfs_uuid): New function.
7145 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7147 2008-06-01 Robert Millan <rmh@aybabtu.com>
7149 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7150 code that is backward compatible with pre-uuid search command.
7152 2008-05-31 Robert Millan <rmh@aybabtu.com>
7154 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7155 floppies after everything else, to ensure floppy drive isn't accessed
7156 unnecessarily (patch from Bean).
7158 2008-05-31 Robert Millan <rmh@aybabtu.com>
7160 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7161 not print device names when we were asked to set a variable.
7163 2008-05-31 Robert Millan <rmh@aybabtu.com>
7165 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7166 using "cursor-on" and "cursor-off" commands (understood at least by
7167 the Open Firmware flavour on OLPC).
7169 2008-05-31 Michael Gorven <michael@gorven.za.net>
7171 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7172 on and off sequences.
7174 2008-05-31 Robert Millan <rmh@aybabtu.com>
7176 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7177 * util/update-grub.in: Likewise.
7179 2008-05-30 Pavel Roskin <proski@gnu.org>
7181 * util/biosdisk.c (linux_find_partition): Simplify logic and
7182 make the code more universal. Keep special processing for
7183 devfs, but use a simple rule for all other devices. If the
7184 device ends with a number, append 'p' and the partition number.
7185 Otherwise, append only the partition number.
7187 2008-05-30 Robert Millan <rmh@aybabtu.com>
7189 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7190 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7191 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7192 the `root' parameter to Linux.
7194 2008-05-30 Robert Millan <rmh@aybabtu.com>
7196 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7197 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7198 --fs_uuid with --fs-uuid.
7199 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7200 all filesystems support them).
7202 2008-05-30 Robert Millan <rmh@aybabtu.com>
7204 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7205 grub_printf() flags, since we're printing in units of 2 bytes.
7207 2008-05-30 Robert Millan <rmh@aybabtu.com>
7209 * util/grub.d/00_header.in: Remove obsolete comment referencing
7210 convert_system_path_to_grub_path().
7211 * util/update-grub.in: Likewise.
7212 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7213 (convert_system_path_to_grub_path): Add a warning message explaining
7214 that this function is deprecated. Rely on is_path_readable_by_grub()
7215 for the readability checks.
7216 (font_path): Use is_path_readable_by_grub() for the readability
7217 check rather than convert_system_path_to_grub_path().
7219 2008-05-30 Robert Millan <rmh@aybabtu.com>
7221 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7222 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7223 converting it first.
7224 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7225 grub.cfg for access to font file, and afterwards call it again to set
7228 2008-05-30 Robert Millan <rmh@aybabtu.com>
7230 * commands/search.c (options): Add --fs_uuid option.
7231 (search_fs_uuid): New function.
7232 (grub_cmd_search): Fix --set argument passing.
7233 Use search_fs_uuid() when requested via --fs_uuid.
7234 (grub_search_init): Update help message.
7235 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7236 and redeclare it as an array of 16-bit words.
7237 (grub_ext2_uuid): New function.
7238 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7239 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7240 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7241 (GRUB_DEVICE_BOOT_UUID): New variables.
7242 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7243 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7245 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7246 just assume `root' variable has the right value.
7247 * util/grub.d/10_linux.in: Likewise.
7248 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7250 (main): Recognise `-t fs_uuid' argument.
7252 2008-05-30 Robert Millan <rmh@aybabtu.com>
7254 * util/biosdisk.c (map): Redefine structure to hold information
7255 about GRUB drive name.
7256 (get_drive): Reimplement without assuming (and verifying) BIOS-like
7258 (call_hook): Remove.
7259 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7260 member. Assume drive has partitions.
7261 (grub_util_biosdisk_open): Access device names via `.device' struct
7263 (open_device): Likewise.
7264 (find_drive): Likewise.
7265 (read_device_map): Adjust map[] usage to match the new struct
7266 definition. Don't check for duplicates (still possible, but not cheap
7268 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7269 (make_device_name): Remove assumption of BIOS-like drive names.
7271 2008-05-30 Pavel Roskin <proski@gnu.org>
7273 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7274 compiling execute.c doesn't need grub_script.tab.h anymore.
7275 (normal/command.c_DEPENDENCIES): Likewise.
7276 (normal/function.c_DEPENDENCIES): Likewise.
7277 * conf/i386-ieee1275.rmk: Likewise.
7278 * conf/i386-linuxbios.rmk: Likewise.
7279 * conf/i386-pc.rmk: Likewise.
7280 * conf/powerpc-ieee1275.rmk: Likewise.
7281 * conf/sparc64-ieee1275.rmk: Likewise.
7283 2008-05-29 Pavel Roskin <proski@gnu.org>
7285 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7286 when scanning metadata for volume group name.
7288 * include/grub/script.h: Don't include grub_script.tab.h. It's
7289 a generated file, which may only be included from the files with
7290 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7291 use union YYSTYPE, as the later allows forward declaration.
7292 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7294 2008-05-29 Robert Millan <rmh@aybabtu.com>
7296 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7297 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7298 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7299 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7302 2008-05-29 Robert Millan <rmh@aybabtu.com>
7304 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7305 control key combinations.
7307 2008-05-29 Robert Millan <rmh@aybabtu.com>
7309 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7310 * util/ieee1275/grub-install.in: ... to here.
7311 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7312 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7313 (grub_install_SOURCES): Likewise.
7315 2008-05-29 Robert Millan <rmh@aybabtu.com>
7317 * fs/affs.c: Update copyright year.
7318 * fs/ext2.c: Likewise.
7319 * fs/fshelp.c: Likewise.
7320 * fs/hfsplus.c: Likewise.
7321 * fs/ntfs.c: Likewise.
7322 * fs/xfs.c: Likewise.
7323 * include/grub/fshelp.h: Likewise.
7324 * util/grub-mkdevicemap.c: Likewise.
7326 2008-05-28 Robert Millan <rmh@aybabtu.com>
7328 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7329 might need to be fatfs to support some firmware implementations
7332 2008-05-28 Robert Millan <rmh@aybabtu.com>
7334 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7336 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7337 (make_device_map): Likewise.
7339 2008-05-20 Bean <bean123ch@gmail.com>
7341 * fs/fshelp.c (grub_fshelp_map_block): New function.
7342 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7343 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7345 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7346 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7347 (grub_fshelp_journal): New structure.
7348 (grub_fshelp_map_block): New function prototype.
7349 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7350 (grub_fshelp_map_block): Likewise.
7352 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7353 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7354 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7355 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7356 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7357 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7358 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7359 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7360 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7361 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7362 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7363 (grub_ext2_sblock): New members for journal support.
7364 (grub_ext3_journal_header): New structure.
7365 (grub_ext3_journal_revoke_header): Likewise.
7366 (grub_ext3_journal_block_tag): Likewise.
7367 (grub_ext3_journal_sblock): Likewise.
7368 (grub_fshelp_node): New members logfile and journal.
7369 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7370 grub_fshelp_map_block to get real block number.
7371 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7373 (grub_ext2_read_inode): Likewise.
7374 (grub_ext3_get_journal): New function.
7375 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7376 (grub_ext2_close): Release memory used by journal.
7378 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7379 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7380 (grub_reiserfs_transaction_header): Renamed to
7381 grub_reiserfs_description_block, replace field data with real_blocks.
7382 (grub_reiserfs_commit_block): New structure.
7383 (grub_reiserfs_data): New member journal.
7384 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7386 (grub_reiserfs_read_symlink): Likewise.
7387 (grub_reiserfs_iterate_dir): Likewise.
7388 (grub_reiserfs_open): Likewise.
7389 (grub_reiserfs_read): Likewise.
7390 (grub_reiserfs_get_journal): New function.
7391 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7392 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7393 using grub_reiserfs_get_journal.
7394 (grub_reiserfs_close): Release memory used by journal.
7396 * fs/affs.c (grub_affs_read_block): Change block type to
7397 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7399 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7401 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7403 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7405 * fs/udf.c (grub_udf_read_block): Change block type to
7406 grub_disk_addr_t. Use type cast to avoid warning.
7408 * fs/xfs.c (grub_xfs_read_block): Likewise.
7410 2008-05-16 Christian Franke <franke@computer.org>
7412 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7413 to ensure that break with ESC will always work.
7414 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7415 Remove ESC from keyboard queue.
7417 2008-05-16 Christian Franke <franke@computer.org>
7419 * util/biosdisk.c: [__CYGWIN__] Add includes.
7420 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7421 (get_os_disk): Move variable declarations to OS specific
7422 parts to avoid warning.
7423 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7424 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7425 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7427 * util/getroot.c: [__CYGWIN__] Add includes.
7428 (strip_extra_slashes): Fix "/" case.
7429 [__CYGWIN__] (get_win32_path): New function.
7430 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7431 [__CYGWIN__] (find_root_device): Disable.
7432 [__CYGWIN__] (get_bootsec_serial): New function.
7433 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7434 [__linux__] (grub_guess_root_device): Add early returns to simplify
7436 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7437 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7438 check for Linux only.
7440 2008-05-15 Bean <bean123ch@gmail.com>
7442 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7443 keyboard hang problem in apple's intel mac.
7445 2008-05-09 Robert Millan <rmh@aybabtu.com>
7447 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7449 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7450 (make_device_map): Likewise.
7451 Reported by Aurelien Jarno <aurel32@debian.org>
7453 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
7455 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7456 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7457 (make_device_map): Output entries for xvd type disks.
7459 2008-05-07 Robert Millan <rmh@aybabtu.com>
7461 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7463 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7464 (make_device_map): Likewise.
7465 Reported by Roland Dreier <rdreier@cisco.com>
7467 2008-05-07 Robert Millan <rmh@aybabtu.com>
7469 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7470 grub_strstr() call. Correct a few mistakes in failure path handling.
7472 2008-05-06 Robert Millan <rmh@aybabtu.com>
7474 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7475 Do not print a trailing slash (therefore, the root directory is an
7477 (convert_system_path_to_grub_path): Do not remove trailing slash
7478 from make_system_path_relative_to_its_root() output.
7480 * util/i386/pc/grub-install.in: Add trailing slash to output from
7481 make_system_path_relative_to_its_root().
7483 2008-05-06 Robert Millan <rmh@aybabtu.com>
7485 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7486 ensures that output lines aren't intermangled with those sent to
7487 stderr (via grub_util_info()).
7488 * util/grub-probe.c (grub_refresh): Likewise.
7489 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7491 2008-05-05 Christian Franke <franke@computer.org>
7493 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7494 Add Cygwin device names.
7495 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7496 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7497 (check_device): Return error instead of success on empty name.
7498 (make_device_map): Move label inside linux specific code to
7499 prevent compiler warning.
7501 2008-04-30 Robert Millan <rmh@aybabtu.com>
7503 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7504 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7506 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7508 2008-04-29 Robert Millan <rmh@aybabtu.com>
7510 * docs/grub.cfg: New file (example GRUB configuration).
7512 2008-04-26 Robert Millan <rmh@aybabtu.com>
7514 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7515 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7516 and `disk/ieee1275/nand.c'.
7518 2008-04-25 Bean <bean123ch@gmail.com>
7520 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7523 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7524 change the buffer size to 4096 for cdrom device.
7526 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7528 (_linux_mod_SOURCES): New variable.
7529 (_linux_mod_CFLAGS): Likewise.
7530 (_linux_mod_LDFLAGS): Likewise.
7531 (linux_mod_SOURCES): Likewise.
7532 (linux_mod_CFLAGS): Likewise.
7533 (linux_mod_LDFLAGS): Likewise.
7534 (nand_mod_SOURCES): Likewise.
7535 (nand_mod_CFLAGS): Likewise.
7536 (nand_mod_LDFLAGS): Likewise.
7538 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7539 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7540 type property. (nand device in olpc don't have this property)
7542 * include/grub/disk.h (grub_disk_dev_id): New macro
7543 GRUB_DISK_DEVICE_NAND_ID.
7545 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7547 (grub_rescue_cmd_initrd): Likewise.
7549 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7550 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7551 ofw_cif_handler and ofw_idt, adjust padding number.
7553 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7554 GRUB_MACHINE_IEEE1275 is defined.
7556 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7557 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7559 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7560 on nested function heap_init.
7561 (grub_upper_mem): New variable for i386-ieee1275.
7562 (grub_get_extended_memory): New function for i386-ieee1275.
7563 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7565 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7566 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7569 * loader/i386/ieee1275/linux.c: New file.
7571 * loader/i386/ieee1275/linux_normal.c: New file.
7573 * disk/ieee1275/nand.c: New file.
7575 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7577 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7579 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7581 2008-04-18 Robert Millan <rmh@aybabtu.com>
7583 Restructures early code path on ieee1275 to unify grub_main() as
7584 the first C function that is executed in every platform.
7586 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7587 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7589 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7590 * kern/ieee1275/cmain.c (cmain): Rename to ...
7591 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7592 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7595 2008-04-18 Robert Millan <rmh@aybabtu.com>
7597 * util/update-grub.in: Fix syntax error when setting
7598 `GRUB_PRELOAD_MODULES'.
7599 Reported by Stephane Chazelas <stephane@artesyncp.com>
7601 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7603 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7604 section into account, newer toolchains generate unique build ids
7605 * configure.ac: remove the test for --build-id=none acceptance,
7606 we want build ids to be preserved
7607 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7608 far from other sections don't cause the raw binary images grow
7611 2008-04-15 Robert Millan <rmh@aybabtu.com>
7613 * disk/lvm.c: Update copyright year.
7614 * kern/misc.c: Likewise.
7616 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7618 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7619 there is no memory left for physical volume name.
7621 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7623 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7624 volume name mapping to support bigger than 9 character names properly.
7626 2008-04-13 Robert Millan <rmh@aybabtu.com>
7628 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7629 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7631 2008-04-13 Christian Franke <franke@computer.org>
7633 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7634 to create a floppy emulation boot CD when non emulation mode
7636 Enable Joliet CD filesystem extension.
7638 2008-04-13 Robert Millan <rmh@aybabtu.com>
7640 * kern/misc.c (grub_strncat): Fix off-by-one error.
7641 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7643 * kern/env.c (grub_env_context_close): Clear current context, not
7645 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7647 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7649 2008-04-13 Robert Millan <rmh@aybabtu.com>
7651 Improve robustness when handling LVM.
7653 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7654 (and leave `*p' unmodified).
7655 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7657 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7658 iterating through it.
7659 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7661 (grub_lvm_scan_device): Check the return value (and fail gracefully
7662 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7663 Don't assume `vg->pvs != NULL' when iterating through it.
7665 2008-04-13 Robert Millan <rmh@aybabtu.com>
7667 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7668 * genmk.rb (partmap): New variable.
7669 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7670 (#{partmap}): New target rule.
7671 * genpartmaplist.sh: New file.
7672 * Makefile.in (pkglib_DATA): Add partmap.lst.
7673 (partmap.lst): New target rule.
7674 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7675 modules (including all partition maps), instead of preloading them.
7677 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7679 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7680 `linux-boot-prober' (if installed) to detect other operating
7681 systems which are installed on the computer and add them to
7683 * conf/common.rmk: Build and install 30_os-prober.
7685 2008-04-12 Robert Millan <rmh@aybabtu.com>
7687 * kern/powerpc/ieee1275/init.c: Move from here ...
7688 * kern/ieee1275/init.c: ... to here. Update all users.
7690 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7691 * kern/ieee1275/cmain.c: ... to here. Update all users.
7693 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7694 * kern/ieee1275/openfw.c: ... to here. Update all users.
7696 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7697 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7699 2008-04-10 Pavel Roskin <proski@gnu.org>
7701 * configure.ac: Always use "_cv_" in cache variables for
7702 compatibility with Autoconf 2.62.
7704 2008-04-07 Robert Millan <rmh@aybabtu.com>
7706 Revert grub/machine/init.h addition by Pavel (since it breaks on
7707 i386-ieee1275 and others):
7708 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7709 * util/powerpc/ieee1275/misc.c: Likewise.
7711 2008-04-07 Robert Millan <rmh@aybabtu.com>
7713 * util/grub-probe.c (probe): Improve error message.
7715 2008-04-07 Robert Millan <rmh@aybabtu.com>
7717 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7718 (this prevents the presence of a bogus entry from ruining the whole
7721 2008-04-06 Pavel Roskin <proski@gnu.org>
7723 * util/biosdisk.c: Include grub/util/biosdisk.h.
7724 * util/grub-fstest.c (execute_command): Make static.
7725 * util/grub-mkdevicemap.c (check_device): Likewise.
7726 * util/i386/pc/misc.c: Include grub/machine/init.h.
7727 * util/powerpc/ieee1275/misc.c: Likewise.
7728 * util/lvm.c: Include grub/util/lvm.h.
7729 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7731 * util/raid.c: Include grub/util/raid.h.
7732 (grub_util_getdiskname): Make static.
7734 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7735 grub_hostfs_fini(), as they are called from grub_init_all() and
7736 grub_fini_all() respectively. This fixes an infinite loop in
7737 grub-fstest due to double registration of hostfs.
7738 Reported by Christian Franke <Christian.Franke@t-online.de>
7740 2008-04-05 Pavel Roskin <proski@gnu.org>
7742 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7743 all 8 functions. Otherwise, probe function 0 only.
7745 2008-04-04 Pavel Roskin <proski@gnu.org>
7747 * commands/lspci.c (grub_lspci_iter): Print the bus number
7750 * commands/lspci.c (grub_pci_classes): Fix typos.
7751 (grub_lspci_iter): Don't print func twice. Print vendor ID
7752 before device ID, as it's normally done.
7754 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7755 Fix signedness warnings.
7756 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7758 * util/ieee1275/get_disk_name.c: Include config.h so that
7759 _GNU_SOURCE is defined and getline() is declared. Mark an
7760 unused argument as such. Fix a signedness warning.
7762 2008-04-02 Pavel Roskin <proski@gnu.org>
7764 * genkernsyms.sh.in: Use more robust assignments for CC and
7765 srcdir. Quote srcdir.
7766 * gensymlist.sh.in: Likewise. Assert at the compile time that
7767 the symbol table is not empty.
7769 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7770 * fs/cpio.c (grub_cpio_read): Likewise.
7772 2008-04-01 Pavel Roskin <proski@gnu.org>
7774 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7775 * disk/host.c (grub_host_open): Likewise.
7776 * disk/loopback.c (grub_loopback_open): Likewise.
7777 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7778 disk->id as in disk/host.c, not a multi-character constant.
7780 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7781 later is obsolete, potentially dangerous and sets a bad example.
7782 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7783 * util/misc.c (grub_util_get_image_size): Likewise.
7785 * disk/loopback.c (options): Improve help for "--partitions".
7787 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7788 options to align them with the short options, e.g. "echo -e".
7790 2008-03-31 Bean <bean123ch@gmail.com>
7792 * video/reader/png.c (grub_png_data): New member is_16bit and
7794 (grub_png_decode_image_header): Detect 16 bit png image.
7795 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7796 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7797 (grub_video_reader_png): Release memory occupied by image_data.
7799 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7801 (grub_nfs_mount): Skip the test for sector per cluster.
7803 * include/grub/ntfs.h (MAX_SPC): Removed.
7805 2008-03-31 Bean <bean123ch@gmail.com>
7807 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7808 (grub_probe_SOURCES): Add fs/afs.c.
7809 (grub_fstest_SOURCES): Likewise.
7810 (afs_mod_SOURCES): New variable.
7811 (afs_mod_CFLAGS): Likewise.
7812 (afs_mod_LDFLAGS): Likewise.
7814 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7815 (grub_emu_SOURCES): Likewise.
7817 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7819 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7821 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7823 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7825 * fs/afs.c: New file.
7827 2008-03-30 Pavel Roskin <proski@gnu.org>
7829 * disk/host.c: Include grub/misc.h to fix a warning.
7830 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7831 warnings about implicit declarations.
7833 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7835 * include/grub/i386/loader.h: Change declaration of
7836 grub_linux_boot() to match what grub_loader_set() expects.
7837 * util/getroot.c (grub_guess_root_device): Return const char* to
7839 * util/grub-probe.c (probe): Fix a warning about uninitialized
7840 abstraction_name variable.
7841 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7842 second argument as unused to fix a warning.
7844 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7845 missing grub_error() call.
7847 * util/update-grub_lib.in: Define datarootdir, since Autoconf
7848 2.60 and newer uses it to define datadir.
7850 * commands/sleep.c: Fix warning about implicit declaration.
7851 * disk/memdisk.c: Likewise.
7852 * loader/aout.c: Likewise.
7853 * loader/i386/bsd_normal.c: Likewise.
7854 * util/grub-probe.c: Likewise.
7856 * commands/i386/cpuid.c (has_longmode): Make static.
7857 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7858 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7860 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7861 GDT. This is more robust, as %ds can change.
7862 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7863 calling real_to_prot().
7864 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7866 2008-03-28 Pavel Roskin <proski@gnu.org>
7868 * kern/i386/pc/startup.S: Assert that uncompressed functions
7869 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7870 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7871 code, as they push parts of the code (error handlers) beyond
7872 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
7873 code as correctness and size.
7875 2008-03-28 Pavel Roskin <proski@gnu.org>
7877 * kern/i386/pc/startup.S
7878 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7879 data block address to the real mode, keep offset minimal. This
7880 works around a bug in AWARD BIOS on old Athlon systems, which
7881 makes CD detection hang.
7883 2008-03-26 Pavel Roskin <proski@gnu.org>
7885 * normal/color.c (grub_parse_color_name_pair): Make `name' a
7887 * include/grub/normal.h: Add grub_parse_color_name_pair()
7890 2008-03-24 Bean <bean123ch@gmail.com>
7892 * disk/i386/pc/biosdisk.c (cd_start): Removed.
7893 (cd_count): Removed.
7894 (cd_drive): New variable.
7895 (grub_biosdisk_get_drive): Don't check for (cdN) device.
7896 (grub_biosdisk_call_hook): Likewise.
7897 (grub_biosdisk_iterate): Change cdrom detection method.
7898 (grub_biosdisk_open): Replace cd_start with cd_drive.
7899 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7900 detect cdrom device.
7902 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7904 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7905 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7906 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7907 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7908 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7909 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7910 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7911 (grub_biosdisk_cdrp): New structure.
7912 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7914 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7916 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7919 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7922 2008-03-20 Robert Millan <rmh@aybabtu.com>
7924 Remove 2 TiB limit in ata.mod.
7925 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7926 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7927 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7928 grub_uint64_t instead of grub_uint32_t.
7930 2008-03-05 Bean <bean123ch@gmail.com>
7932 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7933 (grub_multiboot): Set boot device.
7935 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7937 2008-03-02 Bean <bean123ch@gmail.com>
7939 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7942 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7944 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7947 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7950 * docs/fdl.texi: New file.
7952 * docs/mdate-sh: New file. Copied from gnulib.
7953 * docs/texinfo.tex: Likewise.
7955 * config.guess: Updated from gnulib.
7956 * install-sh: Likewise.
7958 2008-02-28 Robert Millan <rmh@aybabtu.com>
7960 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7961 (aout_mod_SOURCES): New variable.
7962 (aout_mod_CFLAGS): Likewise.
7963 (aout_mod_LDFLAGS): Likewise.
7965 * conf/i386-ieee1275.rmk: Likewise.
7967 2008-02-28 Robert Millan <rmh@aybabtu.com>
7969 * util/update-grub.in: Reorganise terminal validity check. Accept
7970 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7971 Based on suggestion by Franklin PIAT.
7973 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7975 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7977 * util/getroot.c (grub_util_check_block_device): New function that
7978 returns the given argument if it is a block device and returns NULL else.
7979 * util/grub-probe.c (argument_is_device): New variable.
7980 (probe): Promote device_name from a variable to an argument. Receive
7981 device_name from grub_util_check_block_device() if path is NULL and from
7982 grub_guess_root_device() else. Do not free() device_name anymore.
7983 (options): Introduce new parameter '-d, --device'.
7984 (main): Add description of the new parameter to the help screen.
7985 Rename path variable to argument. Set argument_is_device if the '-d'
7986 option is given. Pass argument to probe() depending on
7989 2008-02-24 Bean <bean123ch@gmail.com>
7991 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7992 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7993 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7994 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7995 (GRUB_ISO9660_VOLDESC_END): Likewise.
7996 (grub_iso9660_primary_voldesc): New member escape.
7997 (grub_iso9660_data): New member joliet.
7998 (grub_iso9660_convert_string): New function.
7999 (grub_iso9660_mount): Detect joliet extension.
8000 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8001 (grub_iso9660_iso9660_label): Likewise.
8003 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8004 (grub_setup_SOURCES): Add fs/udf.c.
8005 (grub_fstest_SOURCES): Likewise.
8006 (udf_mod_SOURCES): New variable.
8007 (udf_mod_CFLAGS): Likewise.
8008 (udf_mod_LDFLAGS): Likewise.
8010 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8011 (grub_emu_SOURCES): Likewise.
8013 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8015 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8017 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8019 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8021 * fs/udf.c: New file.
8023 2008-02-24 Robert Millan <rmh@aybabtu.com>
8025 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8026 (normal/lexer.c_DEPENDENCIES): New variables.
8027 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8028 (normal/lexer.c_DEPENDENCIES): Likewise.
8029 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8030 (normal/lexer.c_DEPENDENCIES): Likewise.
8031 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8032 (normal/lexer.c_DEPENDENCIES): Likewise.
8033 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8034 (normal/lexer.c_DEPENDENCIES): Likewise.
8035 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8036 (normal/lexer.c_DEPENDENCIES): Likewise.
8038 2008-02-23 Robert Millan <rmh@aybabtu.com>
8040 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8041 since they were intended to be in hex. This didn't break previously
8042 because of a bug in gpt_partition_map_iterate() (see below).
8044 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8045 when checking the validity of GPT header.
8046 Remove `partno', since it always provides the same information as `i'.
8048 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8050 * include/grub/efi/time.h: Fix a wrong comment.
8052 2008-02-19 Pavel Roskin <proski@gnu.org>
8054 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8057 2008-02-19 Bean <bean123ch@gmail.com>
8059 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8060 (aout_mod_SOURCES): New variable.
8061 (aout_mod_CFLAGS): Likewise.
8062 (aout_mod_LDFLAGS): Likewise.
8063 (_bsd_mod_SOURCES): New variable.
8064 (_bsd_mod_CFLAGS): Likewise.
8065 (_bsd_mod_LDFLAGS): Likewise.
8066 (bsd_mod_SOURCES): New variable.
8067 (bsd_mod_CFLAGS): Likewise.
8068 (bsd_mod_LDFLAGS): Likewise.
8070 * include/grub/aout.h: New file.
8072 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8074 * include/grub/i386/bsd.h: New file.
8076 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8079 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8080 function is called, so that it's possible to change it inside the hook.
8081 (grub_elf64_load): Likewise.
8082 (grub_elf_file): Don't close the file if elf header is not found.
8083 (grub_elf_close): Close the file if grub_elf_file fails (The new
8084 grub_elf_file won't close it).
8085 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8086 (grub_elf64_size): Likewise.
8088 * kern/i386/loader.S (grub_unix_real_boot): New function.
8090 * loader/aout.c: New file.
8092 * loader/i386/bsd.c: New file.
8094 * loader/i386/bsd_normal.c: New file.
8096 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8098 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8099 can test other formats.
8101 2008-02-19 Robert Millan <rmh@aybabtu.com>
8103 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8104 (grub_gpt_partition_type_empty): Redefine with macro from
8105 `<grub/gpt_partition.h>'.
8106 (gpt_partition_map_iterate): Adjust partition type comparison.
8108 Export `entry' as partmap-specific `part.data' struct.
8109 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8111 * include/grub/gpt_partition.h (grub_gpt_header)
8112 (grub_gpt_partentry): ... to here (new file).
8114 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8116 (grub_gpt_partition_type_bios_boot): New const variable, defined
8117 with macro from `<grub/gpt_partition.h>'.
8119 (setup): Replace `first_start' with `embed_region', which keeps
8120 track of the embed region (and is partmap-agnostic).
8122 Replace find_first_partition_start() with find_usable_region(),
8123 which finds a usable region for embedding using partmap-specific
8124 knowledge (supports PC/MSDOS and GPT).
8126 Fix all assumptions that the embed region start at sector 1, using
8127 `embed_region.start' from now on. Similarly, use `embed_region.end'
8128 rather than `first_start' to calculate available size.
8130 In grub_util_info() message, replace "into after the MBR" with an
8131 indication of the specific sector our embed region starts at.
8133 2008-02-19 Robert Millan <rmh@aybabtu.com>
8135 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8136 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8137 `commands/reboot.c'.
8138 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8139 (halt_mod_SOURCES): Likewise.
8140 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8141 (halt_mod_SOURCES): Likewise.
8143 2008-02-17 Christian Franke <franke@computer.org>
8145 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8147 2008-02-17 Robert Millan <rmh@aybabtu.com>
8149 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8150 set `first_start' to 0 for non-PC/MSDOS partition maps.
8152 2008-02-16 Robert Millan <rmh@aybabtu.com>
8154 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8155 do not assume partition map is PC/MSDOS before performing checks that
8156 are specific to that layout.
8158 2008-02-13 Robert Millan <rmh@aybabtu.com>
8160 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8161 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8162 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8164 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8166 * configure.ac: Only a cosmetic change on the handling of
8167 -fno-stack-protector.
8169 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
8171 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8172 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8174 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8175 (halt_mod_SOURCES): New variable.
8176 (halt_mod_CFLAGS): Likewise.
8177 (halt_mod_LDFLAGS): Likewise.
8178 (reboot_mod_SOURCES): Likewise.
8179 (reboot_mod_CFLAGS): Likewise.
8180 (reboot_mod_LDFLAGS): Likewise.
8182 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8183 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8185 (halt_mod_SOURCES): Likewise.
8186 (reboot_mod_SOURCES): Likewise.
8188 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8189 commands/i386/pc/reboot.c by commands/reboot.c.
8190 (reboot_mod_SOURCES): Likewise.
8192 * commands/i386/pc/reboot.c: merge this file ...
8194 * commands/ieee1275/reboot.c: ... and this file ...
8196 * commands/reboot.c: ... to this file.
8197 Add some precompiler directive to include the correct header for
8200 * commands/ieee1275/halt.c: move this file ...
8202 * commands/halt.c: ... to here.
8203 Add some precompiler directive to include the correct header for
8206 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8207 (grub_halt): Likewise.
8209 * kern/efi/efi.c (grub_reboot): New function.
8210 (grub_halt): Likewise.
8212 2008-02-12 Robert Millan <rmh@aybabtu.com>
8214 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8215 /dev (like it is done for /dev/mapper). This doesn't provide support
8216 for EVMS, but at least it is now easy to identify the problem when it
8219 2008-02-11 Robert Millan <rmh@aybabtu.com>
8221 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8222 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8223 comparing it with -1, not 0.
8225 2008-02-10 Robert Millan <rmh@aybabtu.com>
8227 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8230 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8232 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8233 `disk/lvm.c' to the end of the list.
8234 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8235 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8237 2008-02-10 Robert Millan <rmh@aybabtu.com>
8239 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8240 grub_print_error() instead. This will let user know why we're entering
8242 Based on suggestions from Sam Morris.
8244 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
8246 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8247 on remaining N args, instead of "--" arg N times.
8249 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8251 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8252 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8253 pattern for unknown glyphs.
8255 2008-02-09 Robert Millan <rmh@aybabtu.com>
8257 * configure.ac: Probe for `help2man'.
8258 * Makefile.in (builddir): New variable.
8259 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8260 or otherwise add a few flags/options to it.
8261 (install-local): For every executable utility or script that is
8262 installed, invoke $(HELP2MAN) to install a manpage based on --help
8265 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8266 that it doesn't prevent --help from working in build tree.
8268 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8269 with `bug-grub@gnu.org'.
8270 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8271 * util/update-grub.in (usage): New function.
8272 Implement proper argument check, with support for --help and --version
8273 (as well as existing -y).
8275 2008-02-09 Christian Franke <franke@computer.org>
8277 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8278 avoid overwriting previous output.
8279 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8281 2008-02-09 Robert Millan <rmh@aybabtu.com>
8283 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8286 2008-02-09 Robert Millan <rmh@aybabtu.com>
8288 * commands/sleep.c: New file.
8289 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8290 (sleep_mod_SOURCES): New variable.
8291 (sleep_mod_CFLAGS): Likewise.
8292 (sleep_mod_LDFLAGS): Likewise.
8294 2008-02-09 Robert Millan <rmh@aybabtu.com>
8296 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8297 situations in which we can deduce the RAID size and the superblock
8300 2008-02-09 Robert Millan <rmh@aybabtu.com>
8302 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8303 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8304 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8306 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8307 and return a grub_diskmemberlist_t composed of physical array members.
8308 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8310 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8312 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8313 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8314 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8316 * util/grub-probe.c (probe): Move partmap probing code from here ...
8317 (probe_partmap): ... to here.
8318 (probe): Use probe_partmap() once for the disk we're probing, and
8319 additionally, when such disk contains a memberlist() struct member,
8320 once for each disk that is contained in the structure returned by
8323 2008-02-09 Robert Millan <rmh@aybabtu.com>
8325 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8326 environment variable to 'all' in order to obtain debug output from
8328 * util/i386/pc/grub-setup.c (main): Likewise.
8330 2008-02-08 Robert Millan <rmh@aybabtu.com>
8332 * disk/raid.c (grub_raid_scan_device): Check for
8333 `array->device[sb.this_disk.number]' rather than for
8334 `array->device[sb.this_disk.number]->name', since the latter is not
8335 guaranteed to be accessible.
8337 2008-02-08 Robert Millan <rmh@aybabtu.com>
8339 * disk/raid.c: Update copyright.
8340 * fs/cpio.c: Likewise.
8341 * include/grub/raid.h: Likewise.
8342 * loader/i386/pc/multiboot.c: Likewise.
8343 * util/hostfs.c: Likewise.
8345 2008-02-08 Robert Millan <rmh@aybabtu.com>
8347 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8348 to a grub_disk_t array.
8349 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8351 (grub_raid_scan_device): Replace `device[x].name' accesses with
8352 `device[x]->name'. Simplify initialization of `array->device[x]'.
8354 2008-02-08 Robert Millan <rmh@aybabtu.com>
8356 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8357 grub_dprintf() calls.
8358 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8361 2008-02-07 Christian Franke <franke@computer.org>
8363 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8364 instead of fseek and ftell to support large files.
8365 (grub_hostfs_read): Likewise.
8367 2008-02-07 Robert Millan <rmh@aybabtu.com>
8369 Patch from Jeroen Dekkers.
8370 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8371 failure, since successfully reading all array members might not be
8374 2008-02-06 Robert Millan <rmh@aybabtu.com>
8376 * util/grub-probe.c (probe): Simplify partmap probing (with the
8377 assumption that the first word up to the underscore equals to
8380 2008-02-06 Christian Franke <franke@computer.org>
8382 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8383 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8384 last block of a cpio or tar stream.
8385 Check for "TRAILER!!!" instead of any empty data
8386 block to detect last block of a cpio stream.
8387 (grub_cpio_dir): Fix constness of variable np.
8388 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8389 cpio or tar trailer is detected. This fixes a crash
8390 on open of a non existing file.
8392 2008-02-05 Bean <bean123ch@gmail.com>
8394 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8396 (grub_multiboot_load_elf64): Likewise.
8397 (grub_multiboot): Initialize mbi structure.
8399 * util/grub-fstest.c: Don't include unused header file script.h.
8401 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8403 (grub_fstest_SOURCES): Likewise.
8405 2008-02-05 Robert Millan <rmh@aybabtu.com>
8407 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8408 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8409 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8410 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8412 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8413 (translation_table): Replace hardcoded values with macros
8414 provided by `<grub/term.h>'.
8416 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8417 (keyboard_map): Correct/add a few values, with macros provided
8419 (keyboard_map_shift): Zero values that don't differ from their
8420 `keyboard_map' equivalents.
8421 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8422 Discard the second scan code that is always sent by Caps lock.
8423 Only use `keyboard_map_shift' when it provides a non-zero value,
8424 otherwise fallback to `keyboard_map'.
8426 2008-02-04 Bean <bean123ch@gmail.com>
8428 * Makefile.in (enable_grub_fstest): New variable.
8430 * conf/common.rmk (grub_fstest_init.lst): New rule.
8431 (grub_fstest_init.h): Likewise.
8432 (grub_fstest_init.c): Likewise.
8433 (util/grub-fstest.c_DEPENDENCIES): New variable.
8434 (grub_fstest_SOURCES): Likewise.
8436 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8438 * util/grub-fstest.c: New file.
8440 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8442 Make grub-setup handle a separate root device.
8444 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8445 so that the root device can be compared with the destination
8447 When embedding the core image, if the root and destination devices
8448 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8450 When not embedding, set ROOT_DRIVE to 0xFF.
8452 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8454 Add support for having a grub directory in a different drive. This
8455 is still only the data handling part.
8457 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8458 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8459 (grub_root_drive): New variable.
8461 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8462 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8463 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8466 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8468 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8470 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8472 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8473 is bogus, because PXE booting does not specify any drive
8476 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8477 am not sure if this is really correct.
8479 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8480 is always identical to the boot drive when booting from a CD.
8482 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8484 (root_drive): New variable.
8485 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8486 (setup_sectors): Push %dx right after popping it, because %dh will
8488 (copy_buffer): Restore %dx.
8490 2008-02-03 Robert Millan <rmh@aybabtu.com>
8492 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8493 use `cdboot.img' for cdrom images.
8495 2008-02-03 Robert Millan <rmh@aybabtu.com>
8497 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8498 only setup gfxterm when `font' command has succeeded.
8500 2008-02-03 Robert Millan <rmh@aybabtu.com>
8502 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8503 (grub_rescue_cmd_multiboot_loader)
8504 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8506 2008-02-03 Pavel Roskin <proski@gnu.org>
8508 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8509 %edx and %esi from stack only after grub_gate_a20() is called.
8510 grub_gate_a20() clobbers %edx.
8512 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8514 * configure.ac (AC_INIT): Bumped to 1.96.
8516 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8517 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8518 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8519 video/readers/png.c.
8521 2008-02-03 Bean <bean123ch@gmail.com>
8523 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8524 (cdboot_img_SOURCES): New variable.
8525 (cdboot_img_ASFLAGS): New variable.
8526 (cdboot_img_LDFLAGS): New variable.
8528 * boot/i386/pc/cdboot.S: New file.
8530 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8531 (cd_count): Likewise.
8532 (grub_biosdisk_get_drive): Add support for cd device.
8533 (grub_biosdisk_call_hook): Likewise.
8534 (grub_biosdisk_iterate): Likewise.
8535 (grub_biosdisk_open): Likewise.
8536 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8537 (grub_biosdisk_rw): Support reading from cd device.
8538 (GRUB_MOD_INIT): Iterate cd devices.
8540 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8541 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8542 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8544 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8546 2008-02-02 Robert Millan <rmh@aybabtu.com>
8548 * commands/read.c: New file.
8549 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8550 (read_mod_SOURCES): New variable.
8551 (read_mod_CFLAGS): Likewise.
8552 (read_mod_LDFLAGS): Likewise.
8554 2008-02-02 Robert Millan <rmh@aybabtu.com>
8556 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8557 determining whether menu has to be displayed.
8559 2008-02-02 Marco Gerards <marco@gnu.org>
8561 * bus/pci.c: New file.
8563 * include/grub/pci.h: Likewise.
8565 * include/grub/i386/pc/pci.h: Likewise.
8567 * commands/lspci.c: Likewise.
8569 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8571 (pci_mod_SOURCES): New variable.
8572 (pci_mod_CFLAGS): Likewise.
8573 (pci_mod_LDFLAGS): Likewise.
8574 (lspci_mod_SOURCES): Likewise.
8575 (lspci_mod_CFLAGS): Likewise.
8576 (lspci_mod_LDFLAGS): Likewise.
8578 2008-02-02 Bean <bean123ch@gmail.com>
8580 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8581 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8583 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8584 (grub_xfs_btree_node): New structure.
8585 (grub_xfs_btree_root): New structure.
8586 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8587 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8588 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8589 (GRUB_XFS_EXTENT_SIZE): Likewise.
8590 (grub_xfs_read_block): Support btree format type.
8591 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8592 Use directory block as basic unit.
8594 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8596 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8597 __attribute__ ((__regparm__ (1))).
8599 2008-02-01 Robert Millan <rmh@aybabtu.com>
8601 Correct a mistake in previous commit.
8603 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8605 (normal/command.c_DEPENDENCIES): New variable.
8607 2008-02-01 Robert Millan <rmh@aybabtu.com>
8609 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8611 (normal/command.c_DEPENDENCIES): New variable.
8612 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8613 * conf/i386-ieee1275.rmk: Likewise.
8614 * conf/i386-linuxbios.rmk: Likewise.
8615 * conf/i386-pc.rmk: Likewise.
8616 * conf/sparc64-ieee1275.rmk: Likewise.
8617 * conf/powerpc-ieee1275.rmk: Likewise.
8618 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8620 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8622 2008-02-01 Robert Millan <rmh@aybabtu.com>
8624 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8625 call at beginning of function.
8627 2008-01-31 Pavel Roskin <proski@gnu.org>
8629 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8630 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8631 (grub_mkrescue_SOURCES): Likewise.
8632 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8634 2008-01-30 Robert Millan <rmh@aybabtu.com>
8636 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8637 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8638 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8639 (grub_probe_SOURCES): ... to here.
8641 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8642 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8643 * conf/i386-ieee1275.rmk: Likewise.
8644 * conf/i386-linuxbios.rmk: Likewise.
8645 * conf/powerpc-ieee1275.rmk: Likewise.
8647 2008-01-30 Tristan Gingold <gingold@free.fr>
8649 * kern/rescue.c: Silently accept empty lines.
8651 2008-01-29 Bean <bean123ch@gmail.com>
8653 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8654 (real_code_2): Code cleanup and change comment style.
8655 (move_memory): Avoid using 32-bit address mode.
8657 2008-01-29 Bean <bean123ch@gmail.com>
8659 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8660 (png_mod_SOURCES): New variable.
8661 (png_mod_CFLAGS): Likewise.
8662 (png_mod_LDFLAGS): Likewise.
8664 * video/readers/png.c: New file.
8666 2008-01-28 Robert Millan <rmh@aybabtu.com>
8668 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8669 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8670 `ifndef GRUB_MOD_GAP' hack.
8671 * util/elf/grub-mkimage.c (add_segments): Likewise.
8673 2008-01-27 Robert Millan <rmh@aybabtu.com>
8675 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8676 `GRUB_MOD_GAP' for platforms in which it's not defined.
8677 * util/elf/grub-mkimage.c (add_segments): Likewise.
8679 2008-01-27 Robert Millan <rmh@aybabtu.com>
8681 Get grub-emu to build again (including parallel builds).
8683 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8685 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8686 (normal/execute.c_DEPENDENCIES): ... this, ...
8687 (grub-emu_DEPENDENCIES): ... and this.
8689 * conf/i386-efi.rmk: Likewise.
8690 * conf/i386-linuxbios.rmk: Likewise.
8691 * conf/i386-ieee1275.rmk: Likewise.
8692 * conf/powerpc-ieee1275.rmk: Likewise.
8693 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8695 2008-01-27 Robert Millan <rmh@aybabtu.com>
8697 * NEWS: Add a few items.
8699 2008-01-27 Robert Millan <rmh@aybabtu.com>
8701 Fix parallel builds with grub-emu. Based on earlier commit for
8702 grub-probe and grub-setup.
8704 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8705 (util/grub-emu.c_DEPENDENCIES): ... this.
8706 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8707 (util/grub-emu.c_DEPENDENCIES): ... this.
8708 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8709 (util/grub-emu.c_DEPENDENCIES): ... this.
8710 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8711 (util/grub-emu.c_DEPENDENCIES): ... this.
8712 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8713 (util/grub-emu.c_DEPENDENCIES): ... this.
8715 2008-01-27 Pavel Roskin <proski@gnu.org>
8717 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8718 to create a gap between _end and the modules added to the image
8719 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8720 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8721 * util/elf/grub-mkimage.c (add_segments): Likewise.
8723 2008-01-26 Pavel Roskin <proski@gnu.org>
8725 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8726 just return an error.
8728 2008-01-26 Bean <bean123ch@gmail.com>
8730 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8731 (grub_reiserfs_get_item): Save offset of the next item.
8732 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8734 2008-01-25 Robert Millan <rmh@aybabtu.com>
8736 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8737 make all filesystem sources appear together (possibly fixing omissions
8739 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8740 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8741 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8742 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8744 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8746 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8747 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8748 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8749 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8751 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8752 (probe): Add a sanity check to make sure of our ability to read
8753 requested files when probing for filesystem type.
8755 * genmk.rb: Update copyright year (2007).
8757 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8758 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8759 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8760 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8761 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8762 : Remove function prototypes.
8764 2008-01-25 Robert Millan <rmh@aybabtu.com>
8766 Revert my previous commits (based on wrong assumption of how grub_errno
8769 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8770 * kern/file.c (grub_file_open): Likewise.
8772 2008-01-24 Pavel Roskin <proski@gnu.org>
8774 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8775 that hang if GRUB tries to setup colors.
8776 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8777 colors for firmwares that don't support it.
8778 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8779 Recognize Open Hack'Ware, set flags to work around its
8782 2008-01-24 Robert Millan <rmh@aybabtu.com>
8784 * kern/file.c (grub_file_open): Do not account previous failures of
8785 unrelated functions when grub_errno is checked for.
8786 Reported by Oleg Strikov.
8788 2008-01-24 Bean <bean123ch@gmail.com>
8790 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8791 (grub_ufs_sblock): New member volume name.
8792 (grub_ufs_find_file): Fix string copy bug.
8793 (grub_ufs_label): Implement this function properly.
8795 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8796 (grub_hfs_iterate_records): Use the correct file number for extents
8797 and catalog file. Fix problem in next index calculation.
8798 (grub_hfs_find_node): Replace recursive function call with loop.
8799 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8801 2008-01-23 Robert Millan <rmh@aybabtu.com>
8803 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8804 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8805 (grub_multiboot2_real_boot): New function prototype.
8807 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8808 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8810 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8811 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8813 2008-01-23 Robert Millan <rmh@aybabtu.com>
8815 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8816 #ifdef'ed out grub_printf().
8818 2008-01-23 Robert Millan <rmh@aybabtu.com>
8820 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8821 grub_dprintf calls, since they make "debug=all" mode unusable.
8822 (grub_console_checkkey): Likewise.
8824 2008-01-23 Robert Millan <rmh@aybabtu.com>
8826 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8827 `term/i386/pc/at_keyboard.c'.
8828 (pkglib_MODULES): Add `serial.mod'.
8829 (serial_mod_SOURCES): New variable.
8830 (serial_mod_CFLAGS): Likewise.
8831 (serial_mod_LDFLAGS): Likewise.
8833 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8834 `<grub/powerpc/ieee1275/console.h>'.
8835 (grub_keyboard_controller_init): New function prototype.
8836 (grub_console_checkkey): Likewise.
8837 (grub_console_getkey): Likewise.
8839 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8842 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8843 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8845 2008-01-23 Robert Millan <rmh@aybabtu.com>
8847 * kern/i386/pc/init.c (make_install_device): When memdisk image is
8848 present, "(memdisk)/boot/grub" becomes the default prefix.
8850 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8851 a memdisk tarball with all the modules. Add --overlay=DIR option that
8852 allows users to overlay additional files into the image.
8854 2008-01-23 Robert Millan <rmh@aybabtu.com>
8856 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8857 and `machine/memory.h'.
8858 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8859 (_multiboot_mod_SOURCES): New variable.
8860 (_multiboot_mod_CFLAGS): Likewise.
8861 (_multiboot_mod_LDFLAGS): Likewise.
8862 (multiboot_mod_SOURCES): Likewise.
8863 (multiboot_mod_CFLAGS): Likewise.
8864 (multiboot_mod_LDFLAGS): Likewise.
8866 * include/grub/i386/ieee1275/loader.h: New file.
8868 * include/grub/i386/ieee1275/machine.h: Likewise.
8870 * include/grub/i386/ieee1275/memory.h: Likewise.
8872 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8873 variable declaration.
8874 (grub_os_area_size): Likewise.
8876 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8877 (grub_lower_mem, grub_upper_mem): New variables.
8878 (grub_stop_floppy): New function (just to make
8879 grub_multiboot2_real_boot() happy).
8881 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8882 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8883 (grub_stop): New function.
8884 Include `"../realmode.S"' and `"../loader.S"'.
8886 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8887 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8889 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8890 rely on grub_multiboot2_real_boot() for final boot.
8892 2008-01-22 Robert Millan <rmh@aybabtu.com>
8894 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8895 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8896 device that doesn't look like an SD card.
8897 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8898 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8899 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8900 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8903 2008-01-22 Robert Millan <rmh@aybabtu.com>
8905 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8906 avoid claiming over our own code.
8908 2008-01-22 Bean <bean123ch@gmail.com>
8910 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8911 (jpeg_mod_SOURCES): New variable.
8912 (jpeg_mod_CFLAGS): Likewise.
8913 (jpeg_mod_LDFLAGS): Likewise.
8915 * video/readers/jpeg.c : New file.
8917 2008-01-22 Bean <bean123ch@gmail.com>
8919 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8920 there are no more items.
8922 2008-01-21 Robert Millan <rmh@aybabtu.com>
8924 * kern/mm.c (grub_mm_init_region): Improve debug message.
8926 2008-01-21 Robert Millan <rmh@aybabtu.com>
8928 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8929 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8931 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8933 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8934 Indicates start of upper memory.
8935 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8936 (generate_image): Abort when image size is big enough to corrupt
8939 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8940 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8941 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8942 instead of hardcoding 0xA0000.
8943 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8944 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8945 instead of hardcoding 0xA0000.
8947 2008-01-21 Robert Millan <rmh@aybabtu.com>
8949 * disk/memdisk.c (memdisk_size): New variable.
8950 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8952 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8953 image to dynamic memory.
8954 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8955 `memdisk_size'. Free memdisk block.
8957 2008-01-21 Robert Millan <rmh@aybabtu.com>
8959 Fix detection of very small filesystems (like tar).
8961 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8962 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8963 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8964 a problem with this disk).
8966 2008-01-21 Robert Millan <rmh@aybabtu.com>
8968 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8969 on grub_biosdisk_rw_standard() error.
8971 2008-01-21 Robert Millan <rmh@aybabtu.com>
8973 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8975 * kern/elf.c: Likewise.
8976 * kern/ieee1275/ieee1275.c: Likewise.
8977 * kern/powerpc/ieee1275/openfw.c: Likewise.
8978 * term/ieee1275/ofconsole.c: Likewise.
8980 2008-01-21 Robert Millan <rmh@aybabtu.com>
8982 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8984 * include/grub/kernel.h (grub_arch_memdisk_addr)
8985 (grub_arch_memdisk_size): Moved from here ...
8987 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8988 (grub_arch_memdisk_size): ... to here.
8990 2008-01-21 Robert Millan <rmh@aybabtu.com>
8992 Mostly based on bugfix from Bean.
8994 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8995 attribute with hook() parameter.
8996 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8998 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8999 attribute with hook() parameter.
9000 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9003 2008-01-21 Robert Millan <rmh@aybabtu.com>
9005 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9006 (pkglib_MODULES): Add `memdisk.mod'.
9007 (memdisk_mod_SOURCES): New variable.
9008 (memdisk_mod_CFLAGS): Likewise.
9009 (memdisk_mod_LDFLAGS): Likewise.
9011 * disk/memdisk.c: New file.
9013 * include/grub/disk.h (grub_disk_dev_id): Add
9014 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9016 * include/grub/i386/pc/kernel.h
9017 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9018 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9019 (grub_kernel_image_size): New variable declaration.
9020 (grub_total_module_size): Likewise.
9021 (grub_memdisk_image_size): Likewise.
9023 * include/grub/i386/pc/memory.h
9024 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9026 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9027 (grub_arch_memdisk_addr): New variable declaration.
9028 (grub_arch_memdisk_size): Likewise.
9030 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9031 (grub_arch_memdisk_size): Likewise.
9033 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9034 (codestart): Replace hardcoded `0x100000' with
9035 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9037 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9038 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9039 not NULL, append the contents of the file it refers to, at the end of
9040 the compressed kernel image. Initialize `grub_memdisk_image_size'
9041 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9042 (options): Add "memdisk"|'m' option.
9043 (main): Parse --memdisk|-m option, and pass user-provided path as
9044 parameter to generate_image().
9046 2008-01-20 Robert Millan <rmh@aybabtu.com>
9048 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9049 grub_dprintf() calls from here ...
9050 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9052 2008-01-20 Robert Millan <rmh@aybabtu.com>
9054 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9056 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9058 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9059 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9060 `GRUB_IEEE1275_FLAG_REAL_MODE'.
9061 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9063 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9064 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9066 2008-01-19 Robert Millan <rmh@aybabtu.com>
9068 Get rid of confusing function (superseded by
9069 `grub_ieee1275_get_integer_property')
9070 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9072 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9074 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9075 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9076 in native endianness from grub_ieee1275_get_integer_property().
9078 2008-01-19 Robert Millan <rmh@aybabtu.com>
9080 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9081 command after "shut-down", since implementations differ on which
9082 the command for halt is.
9084 2008-01-19 Robert Millan <rmh@aybabtu.com>
9086 * include/grub/i386/linuxbios/console.h: Add header protection.
9087 (grub_keyboard_controller_init): New function prototype.
9088 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9089 (KEYBOARD_COMMAND_READ): Likewise.
9090 (KEYBOARD_COMMAND_WRITE): Likewise.
9091 (KEYBOARD_SCANCODE_SET1): Likewise.
9092 (grub_keyboard_controller_write): New function.
9093 (grub_keyboard_controller_read): Likewise.
9094 (grub_keyboard_controller_init): Likewise.
9096 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9097 (grub_console_init): On coreboot/LinuxBIOS, call
9098 grub_keyboard_controller_init().
9100 2008-01-19 Robert Millan <rmh@aybabtu.com>
9102 PowerPC changes provided by Pavel Roskin.
9104 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9105 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9106 don't rely on cmain() doing it.
9107 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9108 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9110 2008-01-16 Robert Millan <rmh@aybabtu.com>
9112 * include/grub/i386/linuxbios/memory.h
9113 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9114 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9115 receive `table_header' as argument. Instead, probe for it in the
9116 known memory ranges where it can be present.
9117 (grub_available_iterate): Do not pass a fixed `table_header' address
9118 to grub_linuxbios_table_iterate().
9120 2008-01-15 Robert Millan <rmh@aybabtu.com>
9122 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9123 * conf/i386-ieee1275.rmk: New file.
9124 * include/grub/i386/ieee1275/console.h: Likewise.
9125 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9126 * include/grub/i386/ieee1275/kernel.h: Likewise.
9127 * include/grub/i386/ieee1275/time.h: Likewise.
9128 * kern/i386/ieee1275/init.c: Likewise.
9129 * kern/i386/ieee1275/startup.S: Likewise.
9131 2008-01-15 Robert Millan <rmh@aybabtu.com>
9133 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9134 when pointers are 32-bit (but still do set it to one when they are
9137 2008-01-15 Robert Millan <rmh@aybabtu.com>
9139 * include/grub/ieee1275/ieee1275.h
9140 (grub_ieee1275_get_integer_property): New function prototype.
9142 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9143 (grub_ieee1275_get_integer_property): New function. Wraps around
9144 grub_ieee1275_get_property() to handle endianness.
9146 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9147 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9149 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9150 (grub_map): Likewise.
9151 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9153 2008-01-15 Bean <bean123ch@gmail.com>
9155 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9156 (grub_script_execute_cmdline): Reset grub_errno.
9158 * normal/main.c (read_config_file): Reset grub_errno.
9160 * normal/parse.y (script_init): New.
9161 (script): Move function and menuentry here.
9163 (command): Add delimiter at the end of command.
9164 (commands): Adjust to match the new command.
9165 (commandblock): Remove grub_script_lexer_record_start.
9166 (menuentry): Add grub_script_lexer_record_start, use the new commands.
9167 (if): Use the new commands.
9169 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9171 2008-01-15 Robert Millan <rmh@aybabtu.com>
9173 * normal/menu.c (run_menu): Move timeout message from here ...
9174 (print_timeout): ... to here.
9175 (run_menu): Use print_timeout() once during initial draw to print
9176 the whole message, and again in every clock tick to update only
9177 the number of seconds.
9179 2008-01-15 Robert Millan <rmh@aybabtu.com>
9181 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9182 actual size of `available' from grub_ieee1275_get_property(), and
9183 restrict parsing to that bound.
9185 2008-01-15 Christian Franke <franke@computer.org>
9187 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9188 (argp_program_version): Remove variable.
9189 (argp_program_bug_address): Likewise.
9190 (options): Convert from struct argp_option to struct option.
9191 (struct arguments): Remove.
9192 (parse_opt): Remove.
9193 (usage): New function.
9194 (main): Replace struct args members by simple variables.
9195 Replace argp_parse() by getopt_long().
9196 Add switch to evaluate options.
9197 Add missing "(...)" around root_dev in prefix string.
9199 2008-01-14 Robert Millan <rmh@aybabtu.com>
9201 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9202 for grub_ieee1275_exit(), in order to improve portability.
9204 2008-01-14 Robert Millan <rmh@aybabtu.com>
9206 * util/grub.d/10_linux.in (prefix): Define.
9207 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9209 2008-01-13 Pavel Roskin <proski@gnu.org>
9211 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9212 grub_errno if no errors have been detected.
9214 2008-01-12 Robert Millan <rmh@aybabtu.com>
9216 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9217 (grub_util_get_dev_abstraction): New function prototype.
9219 * util/getroot.c: Include `<grub/util/getroot.h>'
9220 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9221 (grub_util_get_dev_abstraction): ... here (new function).
9223 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9224 `PRINT_ABSTRACTION'.
9225 (probe): Probe for abstraction type when requested.
9226 (main): Understand `--target=abstraction'.
9228 * util/i386/efi/grub-install.in: Add abstraction module to core
9229 image when it is found to be necessary.
9230 * util/i386/pc/grub-install.in: Likewise.
9231 * util/powerpc/ieee1275/grub-install.in: Likewise.
9233 * util/update-grub_lib.in (font_path): Return system path without
9234 converting to GRUB path.
9235 * util/update-grub.in: Convert system path returned by font_path()
9236 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9237 abstraction module is needed for loading fonts (if any). Export
9238 that as `GRUB_PRELOAD_MODULES'.
9239 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9242 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9244 Remove some unused code from reiserfs.
9246 * fs/reiserfs.c (struct grub_reiserfs_key)
9247 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9248 (struct grub_reiserfs_node_body): Removed.
9249 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9251 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9253 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9255 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9257 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9259 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9261 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9262 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9263 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9265 2008-01-10 Robert Millan <rmh@aybabtu.com>
9267 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9268 Determines if a file is garbage left by packaging systems, etc.
9269 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9270 for processing /etc/grub.d scripts.
9271 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9272 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9273 as a condition for processing Linux images.
9275 2008-01-10 Pavel Roskin <proski@gnu.org>
9277 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9278 to compile reiserfs.c on PowerPC.
9280 2008-01-10 Robert Millan <rmh@aybabtu.com>
9282 * kern/device.c (grub_device_iterate): Do not abort device iteration
9283 when one of the devices cannot be opened.
9284 * kern/disk.c (grub_disk_open): Do not account previous failures of
9285 unrelated functions when grub_errno is checked for.
9287 2008-01-08 Robert Millan <rmh@aybabtu.com>
9289 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9290 `! grub_linux_is_bzimage', change order of address comparison to make
9291 it more intuitive, and improve "too big zImage" error message.
9293 2008-01-08 Robert Millan <rmh@aybabtu.com>
9295 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9296 `$(update-grub_DATA)'.
9297 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9300 2008-01-07 Robert Millan <rmh@aybabtu.com>
9302 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9303 which instruction is modified by grub-setup during installation
9304 (since it wasn't obvious by only looking at this file).
9306 2008-01-07 Robert Millan <rmh@aybabtu.com>
9308 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9309 listing actual TODO items.
9311 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9313 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9315 (grub_reiserfs_get_key_offset): Likewise.
9316 (grub_reiserfs_set_key_offset): Likewise.
9317 (grub_reiserfs_set_key_type): Likewise.
9318 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9320 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9321 better to remove the bitfield version completely.
9323 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9325 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9326 allocated from the heap, due to the fshelp implementation.
9327 (grub_reiserfs_dir): Free NODE, due to the same reason.
9329 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9331 Mostly from Vincent Pelletier:
9333 * fs/reiserfs.c: New file.
9335 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9336 (reiserfs_mod_SOURCES): New variable.
9337 (reiserfs_mod_CFLAGS): Likewise.
9338 (reiserfs_mod_LDFLAGS): Likewise.
9340 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9341 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9342 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9345 2008-01-06 Robert Millan <rmh@aybabtu.com>
9347 * normal/color.c: Remove `<grub/env.h>'.
9349 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9351 * include/grub/normal.h: Include <grub/env.h>.
9353 2008-01-05 Robert Millan <rmh@aybabtu.com>
9355 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9356 usage example with `(hd0,1)'.
9357 Reported by Samuel Thibault.
9359 2008-01-05 Robert Millan <rmh@aybabtu.com>
9361 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9362 (grub_linux_boot_zimage): Rename to ...
9363 (grub_linux_boot): ... this.
9364 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9365 (grub_linux_boot_zimage): Conditionalize zImage copy.
9367 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9368 (grub_linux_boot_bzimage): Remove prototype.
9369 (grub_linux_boot_zimage): Rename to ...
9370 (grub_linux_boot): ... this.
9372 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9373 (grub_linux_boot): Remove function.
9375 2008-01-05 Robert Millan <rmh@aybabtu.com>
9377 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9378 (grub_env_write_color_highlight): Likewise.
9379 (grub_wait_after_message): Likewise.
9381 * normal/color.c: New file.
9383 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9384 (normal_mod_DEPENDENCIES): Likewise.
9386 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9387 (normal_mod_DEPENDENCIES): Likewise.
9389 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9390 (normal_mod_DEPENDENCIES): Likewise.
9392 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9393 (normal_mod_DEPENDENCIES): Likewise.
9395 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9396 for waiting after a message is printed.
9397 * normal/main.c (read_config_file): Likewise.
9398 (grub_normal_init): Register grub_env_write_color_normal() and
9399 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9400 `color_highlight' variables as global.
9402 * normal/menu.c (grub_wait_after_message): New function.
9403 (grub_color_menu_normal): New variable. Replaces ...
9404 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9405 (grub_color_menu_highlight): New variable. Replaces ...
9406 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9407 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9408 `GRUB_TERM_COLOR_STANDARD'.
9409 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9410 `normal_code' and `highlight_code' to `old_color_normal' and
9411 `old_color_highlight', respectively.
9412 (grub_menu_init_page): Update colors when drawing the menu, based on
9413 `menu_color_normal' and `menu_color_highlight' variables.
9414 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9415 a message is printed.
9417 2008-01-05 Robert Millan <rmh@aybabtu.com>
9419 * kern/env.c (grub_env_context_open): Propagate hooks for global
9420 variables to new context.
9422 * kern/main.c (grub_set_root_dev): Export `root' variable.
9424 2008-01-05 Robert Millan <rmh@aybabtu.com>
9426 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9427 discs unconditionally, since udev and others have options to provide
9430 2008-01-05 Robert Millan <rmh@aybabtu.com>
9432 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9434 2008-01-04 Christian Franke <franke@computer.org>
9436 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9439 2008-01-03 Pavel Roskin <proski@gnu.org>
9441 * kern/i386/linuxbios/init.c: Put "void" to all function
9442 declarations with no arguments.
9443 * kern/powerpc/ieee1275/init.c: Likewise.
9444 * term/i386/pc/at_keyboard.c: Likewise.
9445 * term/i386/pc/vga_text.c: Likewise.
9446 * util/grub-mkdevicemap.c: Likewise.
9448 2008-01-02 Robert Millan <rmh@aybabtu.com>
9450 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9451 message when loaded image is out of bounds.
9452 (grub_multiboot_load_elf64): Likewise.
9454 2008-01-02 Pavel Roskin <proski@gnu.org>
9456 * util/grub.d/10_linux.in: Try version without ".old" when
9457 looking for initrd. It's better to use initrd from the newer
9458 kernel of the same version than no initrd at all.
9460 2008-01-01 Robert Millan <rmh@aybabtu.com>
9462 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9464 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9466 * include/grub/video.h: Added grub_video_unmap_color and
9467 grub_video_get_active_render_target.
9468 (grub_video_adapter): Added unmap_color and get_active_render_target.
9470 * video/video.c: Added grub_video_unmap_color and
9471 grub_video_get_active_render_target.
9472 (grub_video_get_info): Changed method to accept NULL pointer as an
9473 argument to allow detection of active video adapter.
9475 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9476 grub_video_vbe_unmap_color_int.
9477 Added grub_video_vbe_unmap_color and
9478 grub_video_vbe_get_active_render_target.
9479 (grub_video_vbe_adapter): Added unmap_color and
9480 get_active_render_target.
9482 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9483 with grub_video_vbe_unmap_color_int.
9485 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9486 (DEFAULT_NORMAL_COLOR): Likewise.
9487 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9488 (DEFAULT_FG_COLOR): Removed.
9489 (DEFAULT_BG_COLOR): Likewise.
9490 (DEFAULT_CURSOR_COLOR): Changed value.
9491 (grub_virtual_screen): Added standard_color_setting,
9492 normal_color_setting, highlight_color_setting and term_color.
9493 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9494 (bitmap_width): Added.
9495 (bitmap_height): Likewise.
9497 (set_term_color): Likewise.
9498 (grub_virtual_screen_setup): Changed to use new terminal coloring
9500 (grub_gfxterm_init): Added init for bitmap.
9501 (grub_gfxterm_fini): Added destroy for bitmap.
9502 (redraw_screen_rect): Updated to use background bitmap and new
9504 (scroll_up): Added optimization for case when there is no bitmap.
9505 (grub_gfxterm_cls): Fixed to use correct background color.
9506 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9508 (grub_virtual_screen_setcolor): Likewise.
9509 (grub_virtual_screen_getcolor): Added.
9510 (grub_gfxterm_background_image_cmd): Likewise.
9511 (grub_video_term): Added setcolor and getcolor.
9512 (MOD_INIT): Added registration of background_image command.
9513 (MOD_TERM): Added unregistration for background_image command.
9515 2007-12-30 Pavel Roskin <proski@gnu.org>
9517 * loader/multiboot_loader.c: Fix multiboot command
9518 unregistration. Fix all typos in the word "multiboot".
9520 2007-12-29 Pavel Roskin <proski@gnu.org>
9522 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9523 support for initrd names used in Fedora.
9525 2007-12-26 Bean <bean123ch@gmail.com>
9527 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9528 (cpio_mod_SOURCES): New variable.
9529 (cpio_mod_CFLAGS): Likewise.
9530 (cpio_mod_LDFLAGS): Likewise.
9532 * fs/cpio.c: New file.
9534 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9536 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9538 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9540 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9542 2007-12-25 Robert Millan <rmh@aybabtu.com>
9544 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9545 (grub_getcolor): New function.
9547 * kern/term.c (grub_getcolor): New function.
9548 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9549 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9550 (print_entry): Set normal and highlight colors to
9551 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9552 respectively, before printing and restore them to old
9554 (grub_menu_init_page): Likewise. Fill an additional colored space
9555 that would otherwise be left blank.
9557 * term/efi/console.c (grub_console_getcolor): New function.
9558 (struct grub_console_term.getcolor): New variable.
9559 * term/i386/pc/console.c (grub_console_getcolor): New function.
9560 (struct grub_console_term.getcolor): New variable.
9561 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9562 (struct grub_console_term.getcolor): New variable.
9564 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9565 (struct grub_console_term.setcolor): Remove variable.
9566 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9567 (struct grub_console_term.setcolor): Remove variable.
9568 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9569 (struct grub_console_term.setcolor): Remove variable.
9570 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9571 (struct grub_console_term.setcolor): Remove variable.
9573 2007-12-25 Robert Millan <rmh@aybabtu.com>
9575 * configure.ac: Search for possible unifont.hex locations, and
9576 define UNIFONT_HEX if found.
9578 * Makefile.in (UNIFONT_HEX): Define variable.
9579 (DATA): Rename to ...
9580 (PKGLIB): ... this. Update all users.
9581 (PKGDATA): New variable.
9582 (pkgdata_IMAGES): Rename to ...
9583 (pkglib_IMAGES): ... this. Update all users.
9584 (pkgdata_MODULES): Rename to ...
9585 (pkglib_MODULES): ... this. Update all users.
9586 (pkgdata_PROGRAMS): Rename to ...
9587 (pkglib_PROGRAMS): ... this. Update all users.
9588 (pkgdata_DATA): Rename to ...
9589 (pkglib_DATA): ... this. Update all users.
9590 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9591 (unicode.pff, ascii.pff): New rules.
9592 (all-local): Add `$(PKGDATA)' dependency.
9593 (install-local): Process `$(PKGDATA)'.
9595 * util/update-grub_lib.in (font_path): Search for *.pff files in
9596 a few more locations, including `${pkgdata}'.
9598 2007-12-23 Robert Millan <rmh@aybabtu.com>
9600 Patch from Bean <bean123ch@gmail.com>:
9601 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9604 2007-12-21 Bean <bean123ch@gmail.com>
9606 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9607 (ntfscomp_mod_SOURCES): New variable.
9608 (ntfscomp_mod_CFLAGS): Likewise.
9609 (ntfscomp_mod_LDFLAGS): Likewise.
9611 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9612 (grub_probe_SOURCES): Likewise.
9613 (grub_emu_SOURCES): Likewise.
9615 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9616 (grub_emu_SOURCES): Likewise.
9618 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9619 (grub_emu_SOURCES): Likewise.
9621 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9622 (grub_emu_SOURCES): Likewise.
9624 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9625 (read_run_list): Renamed to grub_ntfs_read_run_list.
9626 (decomp_nextvcn): Moved to ntfscomp.c.
9627 (decomp_getch): Likewise.
9628 (decomp_get16): Likewise.
9629 (decomp_block): Likewise.
9630 (read_block): Likewise.
9631 (read_data): Partially moved to ntfscomp.c.
9632 (fixup): Change unsigned to grub_uint16_t.
9633 (read_mft): Change unsigned long to grub_uint32_t.
9634 (read_attr): Likewise.
9635 (read_data): Likewise.
9636 (read_run_data): Likewise.
9637 (read_run_list): Likewise.
9638 (read_mft): Likewise.
9640 * fs/ntfscomp.c: New file.
9642 * include/grub/ntfs.h: New file.
9644 2007-12-16 Robert Millan <rmh@aybabtu.com>
9646 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9647 IDE disk check, since Linux is known to support 20 IDE disks.
9648 Reported by Colin Watson.
9650 2007-12-15 Bean <bean123ch@gmail.com>
9652 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9653 (lnxboot_img_SOURCES): New variable.
9654 (lnxboot_img_ASFLAGS): Likewise.
9655 (lnxboot_img_LDFLAGS): Likewise.
9657 * boot/i386/pc/lnxboot.S: New file.
9659 2007-11-24 Pavel Roskin <proski@gnu.org>
9661 * configure.ac: Test if '--build-id=none' is supported by the
9662 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9663 objcopy to generate incorrect binary files (binutils
9664 2.17.50.0.18-1 as shipped by Fedora 8).
9665 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9666 linking, so that build ID doesn't break the test.
9668 2007-11-24 Pavel Roskin <proski@gnu.org>
9670 * include/grub/i386/time.h: use "void" in the argument list
9672 * include/grub/powerpc/time.h: Likewise.
9673 * include/grub/sparc64/time.h: Likewise.
9675 2007-11-18 Christian Franke <franke@computer.org>
9677 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9678 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9679 This fixes the problem that function keys did not work in grub-emu.
9681 2007-11-18 Christian Franke <franke@computer.org>
9683 * disk/host.c (grub_host_open): Remove attribute unused from
9684 name parameter. Add check for "host". This fixes the problem
9685 that grub-emu does not find partitions.
9687 2007-11-18 Christian Franke <franke@computer.org>
9689 * util/hostfs.c (is_dir): New function.
9690 (grub_hostfs_dir): Handle missing dirent.d_type case.
9691 (grub_hostfs_read): Add missing fseek().
9692 (grub_hostfs_label): Clear label pointer. This fixes a crash
9693 of grub-emu on "ls (host)".
9695 2007-11-18 Christian Franke <franke@computer.org>
9697 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9698 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9699 to 64 bit boundary by default.
9701 2007-11-18 Bean <bean123ch@gmail.com>
9703 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9704 (hexdump_mod_SOURCES): New variable.
9705 (hexdump_mod_CFLAGS): Likewise.
9706 (hexdump_mod_LDFLAGS): Likewise.
9708 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9710 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9712 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9714 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9716 * include/grub/hexdump.h: New file.
9718 * commands/hexdump.c: New file.
9720 2007-11-10 Robert Millan <rmh@aybabtu.com>
9722 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9723 in grub_outb() calls.
9724 (beep_on): Likewise.
9726 2007-11-10 Christian Franke <franke@computer.org>
9728 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9729 (grub_menu_run): Likewise.
9731 2007-11-10 Robert Millan <rmh@aybabtu.com>
9733 * include/grub/i386/efi/machine.h: New file.
9734 * include/grub/i386/linuxbios/machine.h: Likewise.
9735 * include/grub/i386/pc/machine.h: Likewise.
9736 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9737 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9739 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9740 (serial_hw_io_addr): New variable.
9741 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9742 instead of `(unsigned short *) 0x400'.
9744 2007-11-10 Bean <bean123ch@gmail.com>
9746 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9748 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9750 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9751 (vga_mod_SOURCES): Added.
9752 (vga_mod_CFLAGS): Likewise.
9753 (vga_mod_LDFLAGS): Likewise.
9755 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9757 (set_map_mask): Likewise.
9758 (set_read_map): Likewise.
9759 (set_read_address): Likewise.
9760 (vga_font): Removed variable.
9761 (get_vga_glyph): Removed function.
9762 (invalidate_char): Likewise.
9763 (write_char): Changed to use grub_font_get_glyph() for font
9765 (grub_vga_putchar): Likewise.
9766 (grub_vga_getcharwidth): Likewise.
9768 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9770 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9772 (pxeboot_img_LDFLAGS): Likewise.
9773 (diskboot_img_LDFLAGS): Likewise.
9774 (kernel_img_LDFLAGS): Likewise.
9776 2007-11-06 Robert Millan <rmh@aybabtu.com>
9778 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9779 in grub_outb() calls.
9780 (serial_hw_init): Likewise.
9782 2007-11-05 Robert Millan <rmh@aybabtu.com>
9784 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9785 spaces. Skip non-regular files.
9787 2007-11-05 Robert Millan <rmh@aybabtu.com>
9789 * kern/disk.c (grub_disk_firmware_fini)
9790 (grub_disk_firmware_is_tainted): New variables.
9792 * include/grub/disk.h (grub_disk_firmware_fini)
9793 (grub_disk_firmware_is_tainted): Likewise.
9795 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9796 (grub_disk_biosdisk_fini): ... to here.
9797 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9798 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9799 is set. Register grub_disk_biosdisk_fini() in
9800 `grub_disk_firmware_fini'.
9802 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9803 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9804 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9805 to finish existing firmware disk interface.
9807 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9808 (ata_mod_SOURCES): New variable.
9809 (ata_mod_CFLAGS): Likewise.
9810 (ata_mod_LDFLAGS): Likewise.
9812 2007-11-05 Robert Millan <rmh@aybabtu.com>
9814 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9815 (grub_ata_wait): Reimplement using grub_millisleep().
9817 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9818 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9820 2007-11-03 Marco Gerards <marco@gnu.org>
9822 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9823 (CRTC_ADDR_PORT): New macro.
9824 (CRTC_DATA_PORT): Likewise.
9825 (CRTC_CURSOR): Likewise.
9826 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9827 (CRTC_CURSOR_ADDR_LOW): Likewise.
9828 (update_cursor): New function.
9829 (grub_console_real_putchar): Call `update_cursor'.
9830 (grub_console_gotoxy): Likewise.
9831 (grub_console_cls): Set the default color when clearing the
9833 (grub_console_setcursor): Implemented.
9835 2007-11-03 Marco Gerards <marco@gnu.org>
9837 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9839 (grub_ata_pio_write): Likewise.
9841 (grub_atapi_identify): Wait after issuing an ATA command.
9842 (grub_atapi_packet): Likewise.
9843 (grub_ata_identify): Likewise.
9844 (grub_ata_readwrite): Likewise.
9846 2007-11-03 Marco Gerards <marco@gnu.org>
9848 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9849 (grub_ata_pio_write): Likewise.
9850 (grub_ata_readwrite): Use `grub_error', instead of
9851 returning `grub_errno'.
9853 2007-11-03 Marco Gerards <marco@gnu.org>
9855 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9856 grub_ata_pio_write once for every single sector, instead of for
9859 2007-10-31 Robert Millan <rmh@aybabtu.com>
9861 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9863 * conf/i386-linuxbios.rmk: New file.
9865 * kern/i386/pc/hardware.c: Likewise.
9866 * term/i386/pc/at_keyboard.c: Likewise.
9867 * term/i386/pc/vga_text.c: Likewise.
9869 * include/grub/i386/linuxbios/boot.h: Likewise.
9870 * include/grub/i386/linuxbios/console.h: Likewise.
9871 * include/grub/i386/linuxbios/init.h: Likewise.
9872 * include/grub/i386/linuxbios/kernel.h: Likewise.
9873 * include/grub/i386/linuxbios/loader.h: Likewise.
9874 * include/grub/i386/linuxbios/memory.h: Likewise.
9875 * include/grub/i386/linuxbios/serial.h: Likewise.
9876 * include/grub/i386/linuxbios/time.h: Likewise.
9878 * kern/i386/linuxbios/init.c: Likewise.
9879 * kern/i386/linuxbios/startup.S: Likewise.
9880 * kern/i386/linuxbios/table.c: Likewise.
9882 2007-10-31 Marco Gerards <marco@gnu.org>
9884 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9885 (ata_mod_SOURCES): New variable.
9886 (ata_mod_CFLAGS): Likewise.
9887 (ata_mod_LDFLAGS): Likewise.
9889 * disk/ata.c: New file.
9891 * include/grub/disk.h (grub_disk_dev_id): Add
9892 `GRUB_DISK_DEV_ATA_ID'.
9894 2007-10-31 Robert Millan <rmh@aybabtu.com>
9896 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9897 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9899 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9900 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9902 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9905 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9907 2007-10-27 Robert Millan <rmh@aybabtu.com>
9909 * include/grub/types.h (ULONG_MAX): Define macro.
9911 2007-10-22 Robert Millan <rmh@aybabtu.com>
9913 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9915 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9917 2007-10-22 Robert Millan <rmh@aybabtu.com>
9919 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9920 (pkgdata_MODULES): Add `biosdisk.mod'.
9921 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9924 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9925 (grub_biosdisk_init): Replace with ...
9926 (GRUB_MOD_INIT(biosdisk)): ... this.
9927 (grub_biosdisk_fini): Replace with ...
9928 (GRUB_MOD_FINI(biosdisk)): ... this.
9930 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9931 (grub_machine_init): Remove call to grub_biosdisk_init().
9932 (grub_machine_fini): Remove call to grub_machine_fini().
9934 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9936 2007-10-22 Robert Millan <rmh@aybabtu.com>
9938 * include/grub/time.h: New file.
9939 * include/grub/i386/time.h: Likewise.
9940 * include/grub/powerpc/time.h: Likewise.
9941 * include/grub/sparc64/time.h: Likewise.
9943 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9945 (KERNEL_MACHINE_TIME_HEADER): ... this.
9946 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9948 (KERNEL_MACHINE_TIME_HEADER): ... this.
9949 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9951 (KERNEL_MACHINE_TIME_HEADER): ... this.
9953 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9954 (grub_millisleep): New function.
9955 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9956 (grub_millisleep): New function.
9957 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9958 Remove `grub/machine/time.h' include.
9959 (grub_millisleep): New function.
9960 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9961 Remove `grub/machine/time.h' include.
9962 (grub_millisleep): New function.
9964 * include/grub/misc.h (grub_div_roundup): New function.
9966 * kern/misc.c: Include `<grub/time.h>'.
9967 (grub_millisleep_generic): New function.
9969 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9971 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9973 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9974 `machine/time.h'. Add `time.h'.
9975 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9977 2007-10-21 Robert Millan <rmh@aybabtu.com>
9979 * include/grub/misc.h (grub_max): New function.
9981 2007-10-21 Robert Millan <rmh@aybabtu.com>
9983 * util/misc.c (grub_util_info): Call fflush() before returning.
9985 2007-10-20 Robert Millan <rmh@aybabtu.com>
9987 * genmk.rb (Image): Copy `extra_flags' from here ...
9988 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9990 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9991 to `argc' and `args' arguments.
9993 2007-10-17 Robert Millan <rmh@aybabtu.com>
9995 * kern/i386/loader.S: New file.
9997 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9998 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9999 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10000 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10001 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10002 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10003 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10004 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10005 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10006 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10007 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10008 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10009 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10010 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10012 * kern/i386/realmode.S: New file.
10014 * kern/i386/pc/startup.S (protstack): Moved from here ...
10015 * kern/i386/realmode.S (protstack)... to here.
10016 * kern/i386/pc/startup.S (gdt): Moved from here ...
10017 * kern/i386/realmode.S (gdt)... to here.
10018 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10019 * kern/i386/realmode.S (prot_to_real)... to here.
10021 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10022 `kern/i386/realmode.S'.
10024 2007-10-17 Robert Millan <rmh@aybabtu.com>
10026 * include/grub/i386/loader.h: New file.
10028 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10029 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10030 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10031 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10032 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10033 * include/grub/i386/loader.h (grub_linux_prot_size)
10034 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10035 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10036 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10037 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10039 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10041 2007-10-15 Robert Millan <rmh@aybabtu.com>
10043 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10044 filesystem when dev->disk is unset.
10045 Do probe for filesystem even when dev->disk->has_partitions is set.
10046 In case a filesystem is found, always report it.
10047 In case it isn't, if dev->disk->has_partitions is set, report that
10048 a partition table was found instead of reporting that no filesystem
10049 could be identified.
10051 2007-10-12 Robert Millan <rmh@aybabtu.com>
10053 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10054 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10056 * include/grub/types.h (grub_host_to_target16): New macro.
10057 (grub_host_to_target32): Likewise.
10058 (grub_host_to_target64): Likewise.
10059 (grub_target_to_host16): Likewise.
10060 (grub_target_to_host32): Likewise.
10061 (grub_target_to_host64): Likewise.
10063 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10064 Renamed from to ...
10065 (GRUB_MOD_ALIGN): ...this. Update all users.
10067 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10068 grub_host_to_target32.
10069 Replace grub_be_to_cpu32 with grub_target_to_host32.
10070 (load_modules): Likewise.
10071 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10072 Replace grub_be_to_cpu32 with grub_target_to_host32.
10073 Replace grub_cpu_to_be16 with grub_host_to_target16.
10074 Replace grub_cpu_to_be32 grub_host_to_target32.
10076 2007-10-12 Robert Millan <rmh@aybabtu.com>
10078 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10079 * util/elf/grub-mkimage.c: ... here.
10081 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10082 `util/powerpc/ieee1275/grub-mkimage.c'.
10084 2007-10-07 Robert Millan <rmh@aybabtu.com>
10086 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10087 and make it easier to figure out.
10088 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10089 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10090 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10091 leave us with less than HEAP_MIN_SIZE total heap.
10092 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10094 2007-10-03 Robert Millan <rmh@aybabtu.com>
10096 * include/grub/i386/io.h: New file.
10097 * commands/i386/pc/play.c (inb): Removed.
10099 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10101 * term/i386/pc/serial.c (inb): Removed.
10103 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10105 * term/i386/pc/vga.c (inb): Removed.
10107 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10110 2007-10-02 Robert Millan <rmh@aybabtu.com>
10112 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10113 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10114 Reported by Marcin Kurek.
10116 2007-09-07 Robert Millan <rmh@aybabtu.com>
10118 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10119 SmartFirmware version updates (as released by Sven Luther), and avoid
10120 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10121 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10124 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10126 From Hitoshi Ozeki:
10127 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10128 when merging two regions.
10130 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10132 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10133 * normal/completion.c (grub_normal_do_completion): Likewise.
10134 Reported by Hitoshi Ozeki.
10136 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10138 Do not use devices at boot in chainloading.
10140 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10141 (boot_part_addr): Likewise.
10142 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10143 with BOOT_DRIVE and BOOT_PART_ADDR.
10144 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10145 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10147 2007-08-29 Robert Millan <rmh@aybabtu.com>
10149 Patch from Simon Peter <dn.tlp@gmx.net>:
10150 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10151 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10152 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10153 util/i386/pc/grub-setup.c_DEPENDENCIES.
10154 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10155 util/grub-probe.c_DEPENDENCIES.
10156 * conf/powerpc-ieee1275.rmk: Likewise.
10158 2007-08-28 Robert Millan <rmh@aybabtu.com>
10160 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10161 to tell grub-mkdevicemap how to name devices.
10162 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10165 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10166 util/i386/get_disk_name.c.
10167 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10168 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10169 util/ieee1275/get_disk_name.c.
10171 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10173 * DISTLIST: Add util/i386/get_disk_name.c and
10174 util/ieee1275/get_disk_name.c.
10176 * util/grub-mkdevicemap.c: Replace device naming logic with
10177 grub_util_get_disk_name() calls.
10179 2007-08-20 Robert Millan <rmh@aybabtu.com>
10181 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10182 (so that it works for both plural and singular quantities).
10184 2007-08-05 Robert Millan <rmh@aybabtu.com>
10186 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10187 so that [xz] isn't taken into account when determining order.
10189 2007-08-02 Marco Gerards <marco@gnu.org>
10191 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10192 `include/multiboot2.h', `include/grub/elfload.h',
10193 `include/multiboot.h', `include/grub/multiboot.h',
10194 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10195 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10196 `kern/elf.c', `loader/multiboot_loader.c',
10197 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10198 `loader/i386/pc/multiboot2.c',
10199 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10200 `util/i386/pc/grub-mkrescue.in'. Remove
10201 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10202 `include/grub/i386/pc/util/biosdisk.h' and
10203 `include/grub/powerpc/ieee1275/multiboot.h'.
10205 2007-08-02 Bean <bean123ch@gmail.com>
10207 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10208 (ntfs_mod_SOURCES): New variable.
10209 (ntfs_mod_CFLAGS): Likewise.
10210 (ntfs_mod_LDFLAGS): Likewise.
10212 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10213 (grub_probe_SOURCES): Likewise.
10214 (grub_emu_SOURCES): Likewise.
10216 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10217 (grub_emu_SOURCES): Likewise.
10219 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10220 (grub_emu_SOURCES): Likewise.
10222 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10224 * fs/ntfs.c: New file.
10226 2007-08-02 Bean <bean123ch@gmail.com>
10228 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10230 * file.h (grub_file): Likewise.
10232 * fshelp.h (grub_fshelp_read_file): Likewise.
10234 * util/i386/pc/grub-setup.c (setup): Likewise.
10235 (save_first_sector): Likewise.
10236 (save_blocklists): Likewise.
10238 * fs/affs.c (grub_affs_read_file): Likewise.
10240 * fs/ext2.c (grub_ext2_read_file): Likewise.
10242 * fs/fat.c (grub_fat_read_data): Likewise.
10244 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10246 * fs/hfs.c (grub_hfs_read_file): Likewise.
10248 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10250 * fs/jfs.c (grub_jfs_read_file): Likewise.
10252 * fs/minix.c (grub_minix_read_file): Likewise.
10254 * fs/sfs.c (grub_sfs_read_file): Likewise.
10256 * fs/ufs.c (grub_ufs_read_file): Likewise.
10258 * fs/xfs.c (grub_xfs_read_file): Likewise.
10260 * command/blocklist.c (read_blocklist): Likewise.
10261 (print_blocklist): Likewise.
10263 2007-08-02 Marco Gerards <marco@gnu.org>
10265 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10268 * disk/host.c: New file.
10270 * util/hostfs.c: Likewise.
10272 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10273 return `GRUB_ERR_BAD_FS'.
10274 * fs/sfs.c (grub_sfs_mount): Likewise.
10275 * fs/xfs.c (grub_xfs_mount): Likewise.
10277 * include/grub/disk.h (enum grub_disk_dev_id): Add
10278 `GRUB_DISK_DEVICE_HOST_ID'.
10280 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10282 2007-07-24 Jerone Young <jerone@gmail.com>
10284 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10285 modules for compilation.
10286 * conf/powerpc-ieee1275.rmk: Likewise.
10288 * include/multiboot.h: Move multiboot definitions to one file. Rename
10289 many definitions to not get grub specific.
10290 * include/multiboot2.h: Create header with multiboot 2 definitions.
10291 * include/grub/multiboot.h: Header for grub specific function
10292 prototypes and definitions.
10293 * include/grub/multiboot2.h: Likewise.
10294 * include/grub/multiboot_loader.h: Likewise.
10295 * include/grub/i386/pc/multiboot.h: Removed.
10296 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10298 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10299 and 2 to allow for one multiboot and module commands.
10300 * loader/multiboot2.c: Add multiboot2 functionality.
10301 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10302 and definition names.
10303 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10305 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10306 ieee1275 specific multiboot2 code.
10308 * kern/i386/pc/startup.S: Change headers and definition names for
10309 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10311 2007-07-22 Robert Millan <rmh@aybabtu.com>
10313 * geninitheader.sh: Process file specified in first parameter rather
10314 than hardcoding grub_modules_init.lst.
10315 * geninit.sh: Likewise. Also, construct header name dynamically rather
10316 than hardcoding grub_modules_init.h.
10318 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10319 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10320 grub_probe_init.[ch] and grub_setup_init.[ch].
10322 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10323 grub_modules_init.h with grub_emu_init.h.
10324 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10325 grub_probe_init.[ch] files.
10326 * conf/i386-efi.rmk: Likewise.
10327 * conf/i386-pc.rmk: Likewise.
10328 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10329 grub_setup_init.[ch] files.
10331 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10332 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10333 to initialize modules rather than a list of hardcoded functions.
10334 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10335 grub_init_all() to initialize modules rather than a list of hardcoded
10338 2007-07-22 Robert Millan <rmh@aybabtu.com>
10340 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10341 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10343 2007-07-22 Robert Millan <rmh@aybabtu.com>
10345 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10346 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10347 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10348 flag when running on SmartFirmware.
10349 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10350 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10353 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10354 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10355 rather than decreasing it.
10357 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10358 there's not enough space to do it, fail in the same way as when it
10359 can't be done because there are no partitions.
10361 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10362 when nvsetenv failed.
10364 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10366 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10367 because this rule is automatically generated.
10368 (grub-mkrescue): Removed for the same reason as above.
10370 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10372 Migrate to GNU General Public License Version 3.
10374 * COPYING: Replaced with the plain text version of GPLv3.
10376 * config.guess: Updated from gnulib.
10377 * config.sub: Likewise.
10379 * geninit.sh: Output a GPLv3 copyright notice.
10380 * geninitheader.sh: Likewise.
10381 * genmodsrc.sh: Likewise.
10382 * gensymlist.sh.in: Likewise.
10384 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10385 * boot/i386/pc/diskboot.S: Likewise.
10386 * boot/i386/pc/pxeboot.S: Likewise.
10387 * commands/blocklist.c: Likewise.
10388 * commands/boot.c: Likewise.
10389 * commands/cat.c: Likewise.
10390 * commands/cmp.c: Likewise.
10391 * commands/configfile.c: Likewise.
10392 * commands/echo.c: Likewise.
10393 * commands/help.c: Likewise.
10394 * commands/ls.c: Likewise.
10395 * commands/search.c: Likewise.
10396 * commands/terminal.c: Likewise.
10397 * commands/test.c: Likewise.
10398 * commands/videotest.c: Likewise.
10399 * commands/i386/cpuid.c: Likewise.
10400 * commands/i386/pc/halt.c: Likewise.
10401 * commands/i386/pc/play.c: Likewise.
10402 * commands/i386/pc/reboot.c: Likewise.
10403 * commands/i386/pc/vbeinfo.c: Likewise.
10404 * commands/i386/pc/vbetest.c: Likewise.
10405 * commands/ieee1275/halt.c: Likewise.
10406 * commands/ieee1275/reboot.c: Likewise.
10407 * commands/ieee1275/suspend.c: Likewise.
10408 * disk/loopback.c: Likewise.
10409 * disk/lvm.c: Likewise.
10410 * disk/raid.c: Likewise.
10411 * disk/efi/efidisk.c: Likewise.
10412 * disk/i386/pc/biosdisk.c: Likewise.
10413 * disk/ieee1275/ofdisk.c: Likewise.
10414 * font/manager.c: Likewise.
10415 * fs/affs.c: Likewise.
10416 * fs/ext2.c: Likewise.
10417 * fs/fat.c: Likewise.
10418 * fs/fshelp.c: Likewise.
10419 * fs/hfs.c: Likewise.
10420 * fs/hfsplus.c: Likewise.
10421 * fs/iso9660.c: Likewise.
10422 * fs/jfs.c: Likewise.
10423 * fs/minix.c: Likewise.
10424 * fs/sfs.c: Likewise.
10425 * fs/ufs.c: Likewise.
10426 * fs/xfs.c: Likewise.
10427 * hello/hello.c: Likewise.
10428 * include/grub/acorn_filecore.h: Likewise.
10429 * include/grub/arg.h: Likewise.
10430 * include/grub/bitmap.h: Likewise.
10431 * include/grub/boot.h: Likewise.
10432 * include/grub/cache.h: Likewise.
10433 * include/grub/device.h: Likewise.
10434 * include/grub/disk.h: Likewise.
10435 * include/grub/dl.h: Likewise.
10436 * include/grub/elfload.h: Likewise.
10437 * include/grub/env.h: Likewise.
10438 * include/grub/err.h: Likewise.
10439 * include/grub/file.h: Likewise.
10440 * include/grub/font.h: Likewise.
10441 * include/grub/fs.h: Likewise.
10442 * include/grub/fshelp.h: Likewise.
10443 * include/grub/gzio.h: Likewise.
10444 * include/grub/hfs.h: Likewise.
10445 * include/grub/kernel.h: Likewise.
10446 * include/grub/loader.h: Likewise.
10447 * include/grub/lvm.h: Likewise.
10448 * include/grub/misc.h: Likewise.
10449 * include/grub/mm.h: Likewise.
10450 * include/grub/net.h: Likewise.
10451 * include/grub/normal.h: Likewise.
10452 * include/grub/parser.h: Likewise.
10453 * include/grub/partition.h: Likewise.
10454 * include/grub/pc_partition.h: Likewise.
10455 * include/grub/raid.h: Likewise.
10456 * include/grub/rescue.h: Likewise.
10457 * include/grub/script.h: Likewise.
10458 * include/grub/setjmp.h: Likewise.
10459 * include/grub/symbol.h: Likewise.
10460 * include/grub/term.h: Likewise.
10461 * include/grub/terminfo.h: Likewise.
10462 * include/grub/tparm.h: Likewise.
10463 * include/grub/types.h: Likewise.
10464 * include/grub/video.h: Likewise.
10465 * include/grub/efi/api.h: Likewise.
10466 * include/grub/efi/chainloader.h: Likewise.
10467 * include/grub/efi/console.h: Likewise.
10468 * include/grub/efi/console_control.h: Likewise.
10469 * include/grub/efi/disk.h: Likewise.
10470 * include/grub/efi/efi.h: Likewise.
10471 * include/grub/efi/pe32.h: Likewise.
10472 * include/grub/efi/time.h: Likewise.
10473 * include/grub/i386/linux.h: Likewise.
10474 * include/grub/i386/setjmp.h: Likewise.
10475 * include/grub/i386/types.h: Likewise.
10476 * include/grub/i386/efi/kernel.h: Likewise.
10477 * include/grub/i386/efi/loader.h: Likewise.
10478 * include/grub/i386/efi/time.h: Likewise.
10479 * include/grub/i386/pc/biosdisk.h: Likewise.
10480 * include/grub/i386/pc/boot.h: Likewise.
10481 * include/grub/i386/pc/chainloader.h: Likewise.
10482 * include/grub/i386/pc/console.h: Likewise.
10483 * include/grub/i386/pc/init.h: Likewise.
10484 * include/grub/i386/pc/kernel.h: Likewise.
10485 * include/grub/i386/pc/loader.h: Likewise.
10486 * include/grub/i386/pc/memory.h: Likewise.
10487 * include/grub/i386/pc/multiboot.h: Likewise.
10488 * include/grub/i386/pc/serial.h: Likewise.
10489 * include/grub/i386/pc/time.h: Likewise.
10490 * include/grub/i386/pc/vbe.h: Likewise.
10491 * include/grub/i386/pc/vbeblit.h: Likewise.
10492 * include/grub/i386/pc/vbefill.h: Likewise.
10493 * include/grub/i386/pc/vbeutil.h: Likewise.
10494 * include/grub/i386/pc/vga.h: Likewise.
10495 * include/grub/ieee1275/ieee1275.h: Likewise.
10496 * include/grub/ieee1275/ofdisk.h: Likewise.
10497 * include/grub/powerpc/libgcc.h: Likewise.
10498 * include/grub/powerpc/setjmp.h: Likewise.
10499 * include/grub/powerpc/types.h: Likewise.
10500 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10501 * include/grub/powerpc/ieee1275/console.h: Likewise.
10502 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10503 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10504 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10505 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10506 * include/grub/powerpc/ieee1275/time.h: Likewise.
10507 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10508 * include/grub/sparc64/libgcc.h: Likewise.
10509 * include/grub/sparc64/setjmp.h: Likewise.
10510 * include/grub/sparc64/types.h: Likewise.
10511 * include/grub/sparc64/ieee1275/console.h: Likewise.
10512 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10513 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10514 * include/grub/sparc64/ieee1275/time.h: Likewise.
10515 * include/grub/util/biosdisk.h: Likewise.
10516 * include/grub/util/getroot.h: Likewise.
10517 * include/grub/util/lvm.h: Likewise.
10518 * include/grub/util/misc.h: Likewise.
10519 * include/grub/util/raid.h: Likewise.
10520 * include/grub/util/resolve.h: Likewise.
10521 * io/gzio.c: Likewise.
10522 * kern/device.c: Likewise.
10523 * kern/disk.c: Likewise.
10524 * kern/dl.c: Likewise.
10525 * kern/elf.c: Likewise.
10526 * kern/env.c: Likewise.
10527 * kern/err.c: Likewise.
10528 * kern/file.c: Likewise.
10529 * kern/fs.c: Likewise.
10530 * kern/loader.c: Likewise.
10531 * kern/main.c: Likewise.
10532 * kern/misc.c: Likewise.
10533 * kern/mm.c: Likewise.
10534 * kern/parser.c: Likewise.
10535 * kern/partition.c: Likewise.
10536 * kern/rescue.c: Likewise.
10537 * kern/term.c: Likewise.
10538 * kern/efi/efi.c: Likewise.
10539 * kern/efi/init.c: Likewise.
10540 * kern/efi/mm.c: Likewise.
10541 * kern/i386/dl.c: Likewise.
10542 * kern/i386/efi/init.c: Likewise.
10543 * kern/i386/efi/startup.S: Likewise.
10544 * kern/i386/pc/init.c: Likewise.
10545 * kern/i386/pc/lzo1x.S: Likewise.
10546 * kern/i386/pc/startup.S: Likewise.
10547 * kern/ieee1275/ieee1275.c: Likewise.
10548 * kern/powerpc/cache.S: Likewise.
10549 * kern/powerpc/dl.c: Likewise.
10550 * kern/powerpc/ieee1275/cmain.c: Likewise.
10551 * kern/powerpc/ieee1275/crt0.S: Likewise.
10552 * kern/powerpc/ieee1275/init.c: Likewise.
10553 * kern/powerpc/ieee1275/openfw.c: Likewise.
10554 * kern/sparc64/cache.S: Likewise.
10555 * kern/sparc64/dl.c: Likewise.
10556 * kern/sparc64/ieee1275/init.c: Likewise.
10557 * kern/sparc64/ieee1275/openfw.c: Likewise.
10558 * loader/efi/chainloader.c: Likewise.
10559 * loader/efi/chainloader_normal.c: Likewise.
10560 * loader/i386/efi/linux.c: Likewise.
10561 * loader/i386/efi/linux_normal.c: Likewise.
10562 * loader/i386/pc/chainloader.c: Likewise.
10563 * loader/i386/pc/chainloader_normal.c: Likewise.
10564 * loader/i386/pc/linux.c: Likewise.
10565 * loader/i386/pc/linux_normal.c: Likewise.
10566 * loader/i386/pc/multiboot.c: Likewise.
10567 * loader/i386/pc/multiboot_normal.c: Likewise.
10568 * loader/powerpc/ieee1275/linux.c: Likewise.
10569 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10570 * normal/arg.c: Likewise.
10571 * normal/cmdline.c: Likewise.
10572 * normal/command.c: Likewise.
10573 * normal/completion.c: Likewise.
10574 * normal/execute.c: Likewise.
10575 * normal/function.c: Likewise.
10576 * normal/lexer.c: Likewise.
10577 * normal/main.c: Likewise.
10578 * normal/menu.c: Likewise.
10579 * normal/menu_entry.c: Likewise.
10580 * normal/misc.c: Likewise.
10581 * normal/parser.y: Likewise.
10582 * normal/script.c: Likewise.
10583 * normal/i386/setjmp.S: Likewise.
10584 * normal/powerpc/setjmp.S: Likewise.
10585 * normal/sparc64/setjmp.S: Likewise.
10586 * partmap/acorn.c: Likewise.
10587 * partmap/amiga.c: Likewise.
10588 * partmap/apple.c: Likewise.
10589 * partmap/gpt.c: Likewise.
10590 * partmap/pc.c: Likewise.
10591 * partmap/sun.c: Likewise.
10592 * term/gfxterm.c: Likewise.
10593 * term/terminfo.c: Likewise.
10594 * term/efi/console.c: Likewise.
10595 * term/i386/pc/console.c: Likewise.
10596 * term/i386/pc/serial.c: Likewise.
10597 * term/i386/pc/vesafb.c: Likewise.
10598 * term/i386/pc/vga.c: Likewise.
10599 * term/ieee1275/ofconsole.c: Likewise.
10600 * util/biosdisk.c: Likewise.
10601 * util/console.c: Likewise.
10602 * util/genmoddep.c: Likewise.
10603 * util/getroot.c: Likewise.
10604 * util/grub-emu.c: Likewise.
10605 * util/grub-mkdevicemap.c: Likewise.
10606 * util/grub-probe.c: Likewise.
10607 * util/lvm.c: Likewise.
10608 * util/misc.c: Likewise.
10609 * util/raid.c: Likewise.
10610 * util/resolve.c: Likewise.
10611 * util/update-grub.in: Likewise.
10612 * util/update-grub_lib.in: Likewise.
10613 * util/grub.d/00_header.in: Likewise.
10614 * util/grub.d/10_hurd.in: Likewise.
10615 * util/grub.d/10_linux.in: Likewise.
10616 * util/i386/efi/grub-install.in: Likewise.
10617 * util/i386/efi/grub-mkimage.c: Likewise.
10618 * util/i386/pc/grub-install.in: Likewise.
10619 * util/i386/pc/grub-mkimage.c: Likewise.
10620 * util/i386/pc/grub-mkrescue.in: Likewise.
10621 * util/i386/pc/grub-setup.c: Likewise.
10622 * util/i386/pc/misc.c: Likewise.
10623 * util/powerpc/ieee1275/grub-install.in: Likewise.
10624 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10625 * util/powerpc/ieee1275/misc.c: Likewise.
10626 * video/bitmap.c: Likewise.
10627 * video/video.c: Likewise.
10628 * video/i386/pc/vbe.c: Likewise.
10629 * video/i386/pc/vbeblit.c: Likewise.
10630 * video/i386/pc/vbefill.c: Likewise.
10631 * video/i386/pc/vbeutil.c: Likewise.
10632 * video/readers/tga.c: Likewise.
10634 2007-07-02 Robert Millan <rmh@aybabtu.com>
10636 * conf/i386-efi.rmk: Replace obsolete reference to
10637 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10638 with util/getroot.c.
10639 * conf/powerpc-ieee1275.rmk: Likewise.
10640 * conf/sparc64-ieee1275.rmk: Likewise.
10642 * util/grub-emu.c (main): Fix unchecked pointer handling.
10644 2007-07-02 Robert Millan <rmh@aybabtu.com>
10646 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10647 invocation to fail, in order to support partition-less media.
10649 * util/i386/pc/grub-install.in: Likewise.
10651 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10652 which fs or partmap modules are needed (akin to its sister scripts).
10654 Also use grub-probe to get rid of unportable /proc/mounts check.
10656 Print the same informational message that the other scripts do, before
10659 2007-06-23 Robert Millan <rmh@aybabtu.com>
10661 * util/update-grub_lib.in (font_path): New function. Determine whether
10662 a font file can be found and, if so, echo the GRUB path to it.
10664 * util/update-grub.in: Handle multiple terminals depending on user
10665 input, platform availability and font file presence. Propagate
10666 variables of our findings to /etc/grub.d/ children.
10668 * util/grub.d/00_header.in: Handle multiple terminals, based on
10669 environment setup by update-grub.
10671 2007-06-23 Robert Millan <rmh@aybabtu.com>
10673 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10675 2007-06-21 Robert Millan <rmh@aybabtu.com>
10677 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10678 indicate end of data section in kernel image.
10679 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10680 GRUB_KERNEL_MACHINE_DATA_END.
10682 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10684 * kern/i386/efi/startup.S: Likewise.
10686 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10687 during image generation. Implement --prefix option to override this
10689 * util/i386/efi/grub-mkimage.c: Likewise.
10691 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10692 code to make path relative to its root into a separate function.
10694 * util/i386/pc/grub-install.in: Use newly provided
10695 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10696 pass the result to grub-install --prefix.
10698 2007-06-13 Robert Millan <rmh@aybabtu.com>
10700 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10701 DEFAULT_DEVICE_MAP.
10702 * util/grub-emu.c: Use above definitions from misc.h instead of
10704 * util/grub-mkdevicemap.c: Likewise.
10705 * util/i386/pc/grub-setup.c: Likewise.
10706 * util/grub-probe.c: Likewise.
10707 (probe): Abort with grub_util_error() when either
10708 grub_guess_root_device or grub_util_get_grub_dev fails.
10710 2007-06-12 Robert Millan <rmh@aybabtu.com>
10712 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10713 "pager" assignment.
10714 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10716 * util/grub-probe.c (probe): Likewise for "drive_name".
10718 2007-06-11 Robert Millan <rmh@aybabtu.com>
10720 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10721 not just the cdrom one.
10723 2007-06-11 Robert Millan <rmh@aybabtu.com>
10725 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10726 Add --pkglibdir=DIR option to override pkglibdir.
10727 Mention --image-type=TYPE in help output.
10728 Fix --grub-mkimage (it was a no-op).
10729 Abort gracefully when no parameter is given.
10731 2007-06-11 Robert Millan <rmh@aybabtu.com>
10733 * util/i386/pc/grub-mkrescue.in: New file.
10734 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10735 * Makefile.in: Handle bin_SCRIPTS.
10737 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10739 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10740 list of video modes.
10742 2007-06-06 Robert Millan <rmh@aybabtu.com>
10744 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10745 file doesn't exist, or if it is in a filesystem grub can't read.
10747 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10748 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10749 header comment to fit in 80 columns when the variables are resolved.
10751 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10752 could be identified by update-grub. Remove redundant check for
10753 unifont.pff existence (since convert_system_path_to_grub_path now
10756 2007-06-04 Robert Millan <rmh@aybabtu.com>
10758 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10760 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10762 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10764 2007-06-04 Robert Millan <rmh@aybabtu.com>
10766 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10768 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10769 grub_apple_partition_map_fini.
10772 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10773 to access >2 TiB disks).
10775 Print disk->total_sectors with %llu instead of %lu, since this
10776 variable is always 64-bit (prevents wrong disk size from being displayed
10777 on either >2 TiB disk or big-endian CPU).
10779 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10780 into a generic case that supports all (sane) partition maps.
10782 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10785 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10786 and grub_apple_partition_map_fini() after that.
10788 2007-06-01 Robert Millan <rmh@aybabtu.com>
10790 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10792 * util/grub.d/00_header.in: Only enable gfxterm when
10793 convert_system_path_to_grub_path() succeeds.
10795 2007-05-20 Robert Millan <rmh@aybabtu.com>
10797 * util/update-grub_lib.in: New file.
10798 * DISTLIST: Add update-grub_lib.in.
10799 * conf/common.rmk: Generate update-grub_lib and install it in
10801 * Makefile.in: Add install routine for $(lib_DATA).
10803 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10804 function provided by update-grub_lib to support arbitrary paths of
10806 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10807 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10809 2007-05-19 Robert Millan <rmh@aybabtu.com>
10811 * commands/i386/cpuid.c: New module.
10812 * DISTLIST: Add it.
10813 * conf/i386-efi.rmk: Enable cpuid.mod.
10814 * conf/i386-pc.rmk: Likewise.
10816 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10818 * kern/disk.c (grub_disk_read): Check return value of
10821 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10823 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10825 * disk/raid.c (grub_raid_open): Likewise.
10827 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10829 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10830 stack instead of on the heap.
10832 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10833 before doing a read on it.
10835 * configure.ac: Only use -fno-stack-protector for the target
10838 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10840 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10841 __attribute_ ((unused)) to mode_type argument.
10843 * util/getroot.c (grub_guess_root_device): Fix #endif.
10845 * kern/misc.c (memcmp): Fix prototype.
10847 * include/grub/partition.h [GRUB_UTIL]
10848 (grub_gpt_partition_map_init): Add prototype.
10849 (grub_gpt_partition_map_fini): Likewise.
10851 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10852 at the right place.
10854 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10855 (grub_fat_read_data): Likewise.
10856 (grub_fat_find_dir): Likewise.
10858 * font/manager.c (find_glyph): Make table a const.
10859 (grub_font_get_glyph): Remove bitmap from if statement.
10861 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
10863 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10864 code, first search for device in /dev/mapper, then in /dev.
10865 (grub_util_get_grub_dev): New function.
10866 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10868 * util/grub-probe.c (probe): Remove check for RAID, call
10869 grub_util_get_grub_dev() instead of
10870 grub_util_biosdisk_get_grub_dev().
10871 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10872 grub_util_biosdisk_get_grub_dev().
10873 * util/i386/pc/grub-setup.c (main): Likewise.
10875 2007-05-16 Robert Millan <rmh@aybabtu.com>
10877 * DISTLIST: Update for the latest changes.
10878 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10879 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10880 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10881 grub/util/biosdisk.h.
10882 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10883 grub/util/biosdisk.h.
10885 2007-05-16 Robert Millan <rmh@aybabtu.com>
10887 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10889 2007-05-16 Robert Millan <rmh@aybabtu.com>
10891 * util/i386/efi/grub-install.in: New.
10892 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10893 newly added grub-install.
10894 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10896 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10897 grub/util/biosdisk.h.
10898 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10899 grub/util/biosdisk.h.
10901 2007-05-16 Robert Millan <rmh@aybabtu.com>
10903 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10904 * include/grub/util/biosdisk.h: ... here.
10905 * util/i386/pc/biosdisk.c: Moved to ...
10906 * util/biosdisk.c: ... here.
10907 * util/i386/pc/getroot.c: Moved to ...
10908 * util/getroot.c: ... here.
10909 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10910 * util/grub-mkdevicemap.c: ... here.
10911 * util/i386/pc/grub-probe.c: Moved to ...
10912 * util/grub-probe.c: ... here.
10914 2007-05-15 Robert Millan <rmh@aybabtu.com>
10916 * util/update-grub.in: Remove duplicated line in grub.cfg header
10919 2007-05-13 Robert Millan <rmh@aybabtu.com>
10921 * util/update-grub.in: Fix a few assumptions about the devices holding
10922 /, /boot and /boot/grub being the same.
10923 * util/grub.d/00_header.in: Likewise.
10924 * util/grub.d/10_hurd.in: Likewise.
10925 * util/grub.d/10_linux.in: Likewise.
10927 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10928 patterns. Use that to define the `.old' suffix as older than `'.
10930 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10932 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10933 the grub.cfg header message.
10935 2007-05-11 Robert Millan <rmh@aybabtu.com>
10937 * util/update-grub.in: Create device.map if it doesn't already exist,
10938 before attempting to run grub-probe.
10939 Check for grub-probe and grub-mkdevicemap with the same code
10940 grub-install is using.
10943 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10945 * Makefile.in: Add the datarootdir autoconf variable.
10947 2007-05-09 Robert Millan <rmh@aybabtu.com>
10949 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10950 fail gracefully if dev->disk->partition == NULL.
10952 2007-05-07 Robert Millan <rmh@aybabtu.com>
10954 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10955 determine partition map module.
10956 * util/i386/pc/grub-install.in: Use this feature to decide which
10957 partition module to load, instead of hardcoding pc and gpt.
10959 2007-05-07 Robert Millan <rmh@aybabtu.com>
10961 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10962 source directory differs from build directory.
10964 2007-05-05 Robert Millan <rmh@aybabtu.com>
10966 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10969 2007-05-05 Robert Millan <rmh@aybabtu.com>
10971 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10973 2007-05-05 Robert Millan <rmh@aybabtu.com>
10975 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10976 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10978 2007-05-05 Robert Millan <rmh@aybabtu.com>
10980 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10981 (grub_probe_SOURCES): Likewise.
10982 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10983 GPT and initialize dos_part and bsd_part accordingly.
10984 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10986 (main): Activate gpt module for use during partition identification,
10987 and deactivate it afterwards.
10988 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10989 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10990 partition identification, and deactivate it afterwards.
10992 2007-05-05 Robert Millan <rmh@aybabtu.com>
10994 * term/i386/pc/console.c (grub_console_fini): Call
10995 grub_term_set_current() before grub_term_unregister().
10997 2007-05-04 Robert Millan <rmh@aybabtu.com>
10999 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11000 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11001 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11002 and update-grub_DATA.
11003 * conf/common.rmk: Build and install update-grub components.
11004 * conf/common.mk: Regenerate.
11005 * util/update-grub.in: New. Core of update-grub.
11006 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11007 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11008 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11009 * util/grub.d/README: New. Document grub.d directory layout.
11011 2007-05-01 Robert Millan <rmh@aybabtu.com>
11013 * util/grub-emu.c: Move initialization functions
11014 grub_util_biosdisk_init() and grub_init_all() before
11015 grub_util_biosdisk_get_grub_dev(), which relies on them.
11017 2007-04-19 Robert Millan <rmh@aybabtu.com>
11019 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11022 2007-04-18 Jerone Young <jerone@gmail.com>
11024 * kernel/elf.c: Add missing parenthesis for conditional statement
11027 2007-04-10 Jerone Young <jerone@gmail.com>
11029 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11030 continue on and look for device node with real device name.
11032 2007-04-10 Jerone Young <jerone@gmail.com>
11034 * configure.ac: Add argument for autoconf to use transformation
11036 * Makefile.in: Add autoconf package transformation code.
11037 * util/i386/pc/grub-install.in: Likewise.
11038 * util/powerpc/ieee1275/grub-install.in: Likewise.
11040 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11042 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11043 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11044 (EXT2_REVISION): Likewise.
11045 (EXT2_INODE_SIZE): Likewise.
11046 (struct grub_ext2_block_group): Added a missing member
11048 (grub_ext2_read_inode): Divide by the inode size in a superblock
11049 instead of 128 to obtain INODES_PER_BLOCK.
11050 Use the macro EXT2_INODE_SIZE instead of directly using
11051 SBLOCK->INODE_SIZE.
11053 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11055 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11056 superblock instead of the structure size to compute an
11057 offset. This fixes the problem that GRUB could not read a
11058 filesystem when inode size is different from 128-byte.
11060 2007-03-05 Marco Gerards <marco@gnu.org>
11062 * normal/main.c (read_config_file): When "menu" is not set, create
11063 an initial context.
11065 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11067 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11068 (HEAP_LIMIT): New macro.
11069 (grub_claim_heap): Claim memory up to `heaplimit'.
11071 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11073 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11074 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11075 (_start): Likewise.
11076 (grub_arch_modules_addr): Return address after `_end'.
11077 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11078 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11079 (add_segments): Calculate `_end' from phdr size and location.
11080 (ALIGN_UP): Moved to ...
11081 * include/grub/misc.h: here.
11082 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11084 (GRUB_IEEE1275_MODULE_BASE): Removed.
11086 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11088 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11091 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11093 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11095 (grub_elf64_load_hook_t): Likewise.
11096 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11099 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11101 * kern/mm.c: Update copyright.
11102 (grub_mm_debug): Correct syntax error.
11103 (grub_mm_dump_free): New function.
11104 (grub_debug_free): Call `grub_free'.
11105 * include/grub/mm.h: Update copyright.
11106 (grub_mm_dump_free): Add declaration.
11108 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11110 * include/grub/ieee1275/ieee1275.h: Update copyright.
11111 * kern/powerpc/ieee1275/init.c: Likewise.
11112 * kern/powerpc/ieee1275/openfw.c: Likewise.
11114 * loader/powerpc/ieee1275/linux.c: Likewise.
11115 * include/grub/elfload.h: Likewise.
11116 * kern/elf.c: Likewise.
11117 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11119 (grub_elf64_load): Likewise.
11120 (grub_elf32_load_segment): Move to a nested function.
11121 (grub_elf64_load_segment): Likewise.
11123 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11125 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11127 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11128 (grub_heap_len): Likewise.
11129 (HEAP_SIZE): New macro.
11130 (grub_claim_heap): New function.
11131 (grub_machine_init): Don't claim heap directly. Call
11133 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11134 (grub_available_iterate): New function.
11136 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11138 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11139 * configure.ac: Use it for testing the HOST and TARGET compilers.
11141 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11143 * Makefile.in (enable_grub_emu): New variable.
11144 * configure.ac (--enable-grub-emu): New option.
11145 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11146 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11147 * conf/i386-pc.rmk: Likewise.
11148 * conf/powerpc-ieee1275.rmk: Likewise.
11149 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11151 2006-12-12 Marco Gerards <marco@gnu.org>
11153 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11155 * kern/env.c (grub_env_unset): Don't free the member `value' when
11156 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11159 * normal/main.c (current_menu): Removed.
11160 (free_menu): Unset the `menu' environment variable.
11161 (grub_normal_menu_addentry): Make use of the environment variable
11162 `menu', instead of using the global `current_menu'. Allocate
11163 memory for the sourcecode of this entry.
11164 (read_config_file): New argument `nested', changed all callers.
11165 Only in the case of a new context, initialize a new menu. Set the
11166 `menu' environment variable.
11167 (grub_normal_execute): Don't set and unset the environment
11168 variable `menu' here anymore. Only free the menu when leaving the
11171 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11174 2006-12-11 Marco Gerards <marco@gnu.org>
11176 * normal/menu_entry.c (run): Fix off by one bug so the last line
11177 is executed. Move the loader check to outside the loop.
11179 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11181 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11183 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11185 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11186 the number of sectors. Reported by Andrey Shuvikov
11187 <mr_hyro@yahoo.com>.
11189 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11191 * kern/disk.c (grub_disk_read): When there is a read error, always
11192 try to read only the necessary data.
11194 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11196 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11198 [GRUB_UTIL] (grub_raid_fini): Likewise.
11199 [GRUB_UTIL] (grub_lvm_init): Likewise.
11200 [GRUB_UTIL] (grub_lvm_fini): Likewise.
11201 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11202 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11203 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11204 and grub_raid_fini().
11206 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11208 * include/grub/types.h (__unused): Rename to UNUSED.
11209 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11210 (grub_elf64_size): Likewise.
11212 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11214 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11215 grub_error_push and grub_error_pop in the error-handling path.
11216 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11219 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11221 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11222 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11223 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11224 (kernel_elf_SOURCES): Likewise.
11225 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11226 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11227 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11228 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11229 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11230 (elf_mod_SOURCES): New variable.
11231 (elf_mod_CFLAGS): Likewise.
11232 (elf_mod_LDFLAGS): Likewise.
11233 * include/grub/types.h (__unused): New macro.
11234 * include/grub/elfload.h: New file.
11235 * kern/elf.c: Likewise.
11236 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11237 (ELF32_LOADMASK): New macro.
11238 (ELF64_LOADMASK): Likewise.
11239 (vmlinux): Removed.
11240 (grub_linux_load32): New function.
11241 (grub_linux_load64): Likewise.
11242 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11243 Use grub_elf_t instead of grub_file_t.
11245 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11247 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11248 `catch_result' to struct set_color_args.
11250 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11252 * normal/menu.c: Include grub/script.h.
11253 * normal/menu_entry.c: Likewise.
11254 * include/grub/normal.h: Do not include grub/script.h.
11256 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11258 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11260 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11262 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11264 (grub_disk_close): Print debug messages when closing a disk.
11265 (grub_disk_read): Print debug messages when disk read fails.
11266 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11268 * kern/partition.c: Include misc.h.
11269 (grub_partition_iterate): Print debug messages when detecting
11272 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11274 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11276 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11278 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11280 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11281 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11283 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11285 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11286 instead of sizeof(lv). Patch by Michael Guntsche.
11288 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11290 * disk/lvm.c: Rename VGS to VG_LIST.
11291 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11292 (grub_lvm_open): Likewise.
11293 Thanks to Michael Guntsche for finding this bug.
11295 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11297 * configure.ac (AC_INIT): Bumped to 1.95.
11299 2006-10-14 Robert Millan <rmh@aybabtu.com>
11301 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11302 with "/dev/.static/dev/md".
11304 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11306 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11307 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11308 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11309 DRIVE_NAME are always freed.
11311 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11312 DOS_PART, as a DOS partition is counted from one instead of zero
11313 now. Reported by Robert Millan.
11315 2006-10-14 Robert Millan <rmh@aybabtu.com>
11317 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11318 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11319 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11320 string returned by grub_guess_root_device.
11321 * util/i386/pc/grub-setup.c: Likewise.
11322 * util/i386/pc/grub-probefs.c: Likewise.
11324 * util/i386/pc/grub-probefs.c: Rename to ...
11325 * util/i386/pc/grub-probe.c: ... this.
11326 * DISTLIST: Remove grub-probefs, add grub-probe.
11327 * conf/i386-efi.rmk: Likewise.
11328 * conf/i386-pc.rmk: Likewise.
11329 * util/i386/pc/grub-install.in: Likewise.
11331 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11332 choose which information we want to print.
11334 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11336 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11337 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11338 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11339 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11340 video/readers/tga.c and video/i386/pc/vbeutil.c.
11342 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11344 Added support for RAID and LVM.
11346 * disk/lvm.c: New file.
11347 * disk/raid.c: Likewise.
11348 * include/grub/lvm.h: Likewise.
11349 * include/grub/raid.h: Likewise.
11350 * include/grub/util/lvm.h: Likewise.
11351 * include/grub/util/raid.h: Likewise.
11352 * util/lvm.c: Likewise.
11353 * util/raid.c: Likewise.
11355 * include/grub/disk.h (grub_disk_dev_id): Add
11356 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11357 (grub_disk_get_size): New prototype.
11358 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11359 returns a partition.
11360 (grub_disk_get_size): New function.
11362 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11363 verbatim if grub_install_dos_part is -2.
11365 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11368 * util/i386/pc/grub-setup.c (setup): New argument
11369 MUST_EMBED. Force embedding of GRUB when the argument is
11370 true. Close FILE before returning.
11371 (main): Add support for RAID and LVM.
11373 * conf/common.rmk: Add RAID and LVM modules.
11374 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11376 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11378 * kern/misc.c (grub_strstr): New function.
11379 * include/grub/misc.h (grub_strstr): New prototype.
11381 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11383 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11385 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11387 * kern/misc.c (grub_strtoull): Guess the base only if not
11390 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11392 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11395 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11397 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11399 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11400 Remove `flags' argument. All callers changed.
11401 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11402 (IEEE1275_IHANDLE_INVALID): New variable.
11403 (IEEE1275_CELL_INVALID): New variable.
11404 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11405 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11406 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11407 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11408 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11409 codes from Open Firmware. All callers updated.
11410 (grub_ieee1275_next_property): Directly return Open Firmware return
11412 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11413 Standardize error checking from `grub_ieee1275_get_property'.
11414 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11415 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11417 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11419 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11420 `instance_to_package_args' to `instance_to_path_args'.
11422 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11423 `grub_ieee1275_chosen'.
11425 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11426 `grub_ieee1275_interpret'.
11428 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11430 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11432 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11434 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11435 (__cmpdi): Likewise.
11437 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11438 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11441 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11443 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11444 to type `grub_ssize_t'.
11445 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11447 2006-09-22 Marco Gerards <marco@gnu.org>
11449 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11452 2006-09-22 Marco Gerards <marco@gnu.org>
11454 * commands/echo.c: New file.
11456 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11458 * conf/common.rmk (echo_mod_SOURCES): New variable.
11459 (echo_mod_CFLAGS): Likewise.
11460 (echo_mod_LDFLAGS): Likewise.
11462 2006-09-22 Marco Gerards <marco@gnu.org>
11464 * normal/main.c (get_line): Malloc memory instead of using
11465 preallocated memory. Removed the arguments `cmdline' and
11466 `max_len'. Updated all callers.
11468 2006-09-22 Marco Gerards <marco@gnu.org>
11470 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11471 (normal_mod_DEPENDENCIES): Likewise.
11473 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11474 (normal_mod_DEPENDENCIES): Likewise.
11476 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11478 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
11480 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11482 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11483 (normal_mod_DEPENDENCIES): Likewise.
11484 * conf/i386-pc.mk: Regenerate.
11485 * conf/i386-efi.mk: Likewise
11486 * conf/common.mk: Likewise.
11487 * conf/powerpc-ieee1275.mk: Likewise.
11488 * conf/sparc64-ieee1275.mk: Likewise.
11490 2006-09-22 Robert Millan <rmh@aybabtu.com>
11492 Sync with i386 version.
11493 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11494 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11496 2006-09-21 Robert Millan <rmh@aybabtu.com>
11498 Import from GRUB Legacy (lib/device.c):
11499 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11500 (init_device_map) [__linux__]: Add support for I2O devices.
11502 2006-09-14 Marco Gerards <marco@gnu.org>
11504 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11507 2006-09-14 Robert Millan <rmh@aybabtu.com>
11509 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11512 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11514 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11515 before adding it to device.map.
11517 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
11519 * genmk.rb: Let GCC generate dependencies the first time it
11520 compiles a file; using the -MD option.
11521 * conf/common.mk: Regenerate.
11522 * conf/i386-pc.mk: Likewise.
11523 * conf/i386-efi.mk: Likewise.
11524 * conf/powerpc-ieee1275.mk: Likewise.
11525 * conf/sparc64-ieee1275.mk: Likewise.
11527 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11529 Move the prototypes of grub_setjmp and grub_longjmp to
11530 cpu/setjmp.h, so that each architecture may specify different
11533 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11534 (grub_longjmp): Likewise.
11535 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11536 (grub_longjmp): Likewise.
11537 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11538 (grub_longjmp): Likewise.
11540 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11541 [!GRUB_UTIL] (grub_longjmp): Removed.
11543 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11545 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11546 "color!" method does not return any value.
11548 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11550 * include/grub/bitmap.h: New file.
11552 * include/grub/i386/pc/vbeutil.h: Likewise.
11554 * video/bitmap.c: Likewise.
11556 * video/readers/tga.c: Likewise.
11558 * video/i386/pc/vbeutil.c: Likewise.
11560 * commands/videotest.c: Code cleanup and updated to reflect to new
11563 * term/gfxterm.c: Likewise.
11565 * video/video.c: Likewise.
11567 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11568 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11569 (bitmap_mod_SOURCES): New entry.
11570 (bitmap_mod_CFLAGS): Likewise.
11571 (bitmap_mod_LDFLAGS): Likewise.
11572 (tga_mod_SOURCES): Likewise.
11573 (tga_mod_CFLAGS): Likewise.
11574 (tga_mod_LDFLAGS): Likewise.
11576 * include/grub/video.h (grub_video_blit_operators): New enum type.
11577 (grub_video_render_target): Changed as forward declaration and moved
11578 actual definition to be video driver specific.
11579 (grub_video_adapter.blit_bitmap): Added blitting operator.
11580 (grub_video_adapter.blit_render_target): Likewise.
11581 (grub_video_blit_bitmap): Likewise.
11582 (grub_video_blit_render_target): Likewise.
11584 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11585 driver specific render target definition.
11586 (grub_video_vbe_map_rgba): Added driver internal helper.
11587 (grub_video_vbe_unmap_color): Updated to use
11588 grub_video_i386_vbeblit_info.
11589 (grub_video_vbe_get_video_ptr): Likewise.
11591 * include/grub/i386/pc/vbeblit.h
11592 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11593 grub_video_i386_vbeblit_info.
11594 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11595 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11596 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11597 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11598 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11599 (grub_video_i386_vbeblit_index_index): Likewise.
11600 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11601 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11602 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11603 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11605 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11608 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11609 include/grub/i386/pc/vbeblit.h.
11611 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11612 Updated to use grub_video_i386_vbeblit_info.
11613 (grub_video_i386_vbefill_R8G8B8): Likewise.
11614 (grub_video_i386_vbefill_index): Likewise.
11615 (grub_video_i386_vbefill): Added generic filler.
11617 * video/i386/pc/vbefill.c: Updated to reflect changes on
11618 include/grub/i386/pc/vbefill.h.
11620 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11621 grub_video_i386_vbeblit_info.
11622 (grub_video_vbe_unmap_color): Likewise.
11623 (grub_video_vbe_blit_glyph): Likewise.
11624 (grub_video_vbe_scroll): Likewise.
11625 (grub_video_vbe_draw_pixel): Removed function.
11626 (grub_video_vbe_get_pixel): Likewise.
11627 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11628 updated code to use it.
11629 (common_blitter): Added common blitter for render target and bitmap.
11630 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11631 (grub_video_vbe_blit_render_target): Likewise.
11633 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
11635 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11636 is in text mode if there is no console control protocol instance
11639 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11641 * include/grub/video.h: Code cleanup.
11643 * include/grub/i386/pc/vbe.h: Likewise.
11645 * video/i386/pc/vbe.c: Likewise.
11647 * video/i386/pc/vbeblit.c: Likewise.
11649 * video/i386/pc/vbefill.c: Likewise.
11651 * video/video.c: Likewise. Also added more comments.
11653 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11655 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11656 (struct grub_biosdisk_dap): Likewise.
11658 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11659 linkage settings for all functions.
11661 2006-07-12 Marco Gerards <marco@gnu.org>
11663 * configure.ac (--enable-mm-debug): Fix typo.
11665 * genkernsyms.sh.in: Use proper quoting for `CC'.
11667 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11669 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11670 (normal_mod_ASFLAGS): Remove "-m32".
11672 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11674 * util/misc.c: Include config.h.
11675 [!HAVE_MEMALIGN]: Do not include malloc.h.
11676 (grub_memalign): Use posix_memalign, if present. Then, use
11677 memalign, if present. Otherwise, emit an error.
11679 * util/grub-emu.c: Do not include malloc.h.
11681 * include/grub/util/misc.h: Include unistd.h. This is required for
11682 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11683 D. Eades III <hde@foobar-qux.org>.
11685 * configure.ac (AC_GNU_SOURCE): Added.
11686 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11689 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11691 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11692 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11694 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11696 * include/grub/types.h (grub_host_addr_t): Rename to
11697 grub_target_addr_t.
11698 (grub_host_off_t): Rename to grub_target_off_t.
11699 (grub_host_size_t): Rename to grub_target_size_t.
11700 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11701 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11703 * include/grub/kernel.h (struct grub_module_header): Change type
11704 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11705 (grub_module_info): Likewise.
11707 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11709 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11710 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11711 Velazquez <jesus.velazquez@gmail.com>.
11713 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11715 Count partitions from 1 instead of 0 in the string representation
11716 of partitions. Still use 0-based internally.
11718 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11719 (sun_partition_map_iterate): Use grub_partition_t instead of
11720 struct grub_partition *. Cast DESC->START_CYLINDER to
11721 grub_uint64_t after converting the endian.
11722 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11723 (sun_partition_map_get_name): Add 1 to P->INDEX.
11725 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11727 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11729 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11730 zero instead of one.
11731 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11732 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11734 * partmap/apple.c (apple_partition_map_iterate): Change the type
11735 of POS to unsigned.
11736 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11737 (apple_partition_map_get_name): Add 1 into P->INDEX.
11739 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11740 of POS to unsigned.
11741 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11742 calculate the offset of a partition.
11743 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11744 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11746 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11747 SECTOR to grub_disk_addr_t.
11748 (acorn_partition_map_iterate): Likewise.
11749 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11750 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11752 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11754 * kern/i386/pc/init.c (make_install_device): Add 1 into
11755 GRUB_INSTALL_DOS_PART.
11757 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11760 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11762 Clean up the code to support 64-bit addressing in disks and
11763 files. This change is not enough for filesystems yet.
11765 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11766 type of "start" to grub_uint64_t.
11767 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11768 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11769 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11772 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11773 to grub_disk_addr_t.
11775 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11778 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11780 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11783 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11785 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11787 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11789 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11790 to grub_off_t, to detect an error from grub_file_seek.
11791 (grub_multiboot_load_elf32): Likewise.
11793 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11794 maximum unsigned long value when an overflow is detected.
11795 (grub_strtoull): New function.
11796 (grub_divmod64): Likewise.
11797 (grub_lltoa): use grub_divmod64.
11799 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11801 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11802 the pointer to next character. Use grub_strtoull instead of
11804 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11805 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11808 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11809 return value is signed.
11810 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11811 test if OFFSET is less than zero, as OFFSET is unsigned now.
11813 * kern/disk.c (struct grub_disk_cache): Change the type of
11814 "sector" to grub_disk_addr_t.
11815 (grub_disk_cache_get_index): Change the type of SECTOR to
11816 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11817 unsigned after shifting.
11818 (grub_disk_cache_invalidate): Change the type of SECTOR to
11820 (grub_disk_cache_unlock): Likewise.
11821 (grub_disk_cache_store): Likewise.
11822 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11823 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11824 grub_disk_addr_t and grub_uint64_t, respectively.
11825 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11826 body, as the value of OFFSET is tweaked by
11827 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11828 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11830 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11831 body, as the value of OFFSET is tweaked by
11832 grub_disk_check_range. Change the types of LEN and N to
11835 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11836 and "saved_offset" to grub_off_t.
11837 (test_header): Cast BUF to char *.
11838 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11840 (grub_gzio_read): Change the types of OFFSET and SIZE to
11841 grub_off_t and grub_size_t, respectively.
11843 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11845 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11846 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11847 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11848 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11849 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11851 * include/grub/types.h (grub_off_t): Unconditionally set to
11853 (grub_disk_addr_t): Changed to grub_uint64_t.
11855 * include/grub/partition.h (struct grub_partition): Change the
11856 types of "start", "len" and "offset" to grub_disk_addr_t,
11857 grub_uint64_t and grub_disk_addr_t, respectively.
11858 (grub_partition_get_start): Return grub_disk_addr_t.
11859 (grub_partition_get_len): Return grub_uint64_t.
11861 * include/grub/misc.h (grub_strtoull): New prototype.
11862 (grub_divmod64): Likewise.
11864 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11865 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11866 grub_off_t, respectively.
11867 All callers and references changed.
11869 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11870 grub_size_t in "read".
11871 All callers and references changed.
11873 * include/grub/file.h (struct grub_file): Change the types of
11874 "offset" and "size" to grub_off_t and grub_off_t,
11875 respectively. Change the type of SECTOR to grub_disk_addr_t in
11877 (grub_file_read): Change the type of LEN to grub_size_t.
11878 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11880 (grub_file_size): Return grub_off_t.
11881 (grub_file_tell): Likewise.
11882 All callers and references changed.
11884 * include/grub/disk.h (struct grub_disk_dev): Change the types of
11885 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11887 (struct grub_disk): Change the type of "total_sectors" to
11888 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11890 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11891 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11892 (grub_disk_write): Likewise.
11893 All callers and references changed.
11895 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11896 char * for grub_strncmp to silence gcc.
11897 (grub_iso9660_mount): Likewise.
11898 (grub_iso9660_mount): Likewise.
11899 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11901 (grub_iso9660_iterate_dir): Likewise.
11902 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11904 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11905 LEN to grub_disk_addr_t and grub_size_t, respectively.
11907 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11909 * fs/jfs.c (grub_jfs_read_file): Likewise.
11911 * fs/minix.c (grub_jfs_read_file): Likewise.
11913 * fs/sfs.c (grub_jfs_read_file): Likewise.
11915 * fs/ufs.c (grub_jfs_read_file): Likewise.
11917 * fs/xfs.c (grub_jfs_read_file): Likewise.
11919 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11920 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11923 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11924 BLKNR to -1 instead of returning GRUB_ERRNO.
11925 (grub_ext2_read_file): Change the types of SECTOR and
11926 LEN to grub_disk_addr_t and grub_size_t, respectively.
11928 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11929 LEN to grub_disk_addr_t and grub_size_t, respectively.
11931 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11934 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11935 string. Do not cast SECTOR explicitly.
11937 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11938 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11939 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11940 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11941 over 2TB and LBA mode is not supported, raise an error.
11942 (get_safe_sectors): New function.
11943 (grub_biosdisk_read): Use get_safe_sectors.
11944 (grub_biosdisk_write): Likewise.
11946 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11947 (grub_efidisk_write): Likewise.
11949 * disk/loopback.c (delete_loopback): Cosmetic changes.
11950 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11952 (grub_loopback_open): Likewise.
11953 (grub_loopback_read): Likewise. Also, change the type of POS to
11954 grub_off_t, and fix the usage of grub_memset.
11956 * commands/i386/pc/play.c: Include grub/machine/time.h.
11958 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11961 * commands/configfile.c: Include grub/env.h.
11963 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11964 GRUB_ERRNO directly instead. Change the type of POS to
11965 grub_off_t. Follow the coding standard.
11967 * commands/blocklist.c: Include grub/partition.h.
11968 (grub_cmd_blocklist): Return an error if the underlying device is
11969 not a disk. Take the starting sector of a partition into account,
11970 if a partition is used.
11972 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11974 (lba_mode): Support 64-bit addresses.
11975 (chs_mode): Likewise.
11976 (copy_buffer): Adapted to the new offsets of a length field and a
11978 (blocklist_default_start): Allocate 64-bit space.
11980 * boot/i386/pc/boot.S (force_lba): Removed.
11981 (boot_drive): Moved to under KERNEL_SECTOR.
11982 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11984 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11986 (lba_mode): Refactored to support a 64-bit address. More size
11988 (setup_sectors): Likewise.
11990 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11992 * DISTLIST: Added include/grub/i386/linux.h. Removed
11993 include/grub/i386/pc/linux.h
11995 * configure.ac (AC_INIT): Bumped to 1.94.
11997 * config.guess: Updated from gnulib.
11998 * config.sub: Likewise.
11999 * install-sh: Likewise.
12000 * mkinstalldirs: Likewise.
12002 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12004 * conf/common.rmk (grub_modules_init.lst): Depended on
12005 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12008 * genmk.rb (PModule::rule): Reverted the previous change.
12010 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12012 * conf/common.rmk (grub_modules_init.lst): Depends on
12013 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12014 that the target does not exist before producing.
12015 (grub_modules_init.h): Remove the target before generating.
12016 (grub_emu_init.c): Likewise.
12018 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12020 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12022 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12023 for the target-specific tests. Make sure that we also have the
12024 up-to-date target variables for those tests.
12026 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12028 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12029 (PModule::rule): Likewise.
12031 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12033 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12034 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12035 target-specific flags should be prefixed.
12036 (PModule::rule): Likewise.
12038 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12040 * configure.ac (CMP): Check if cmp is available explicitly.
12042 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12044 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12045 (target_cpu): New variable.
12046 (pkglibdir): Use target_cpu instead of host_cpu.
12048 * util/i386/pc/grub-install.in (host_cpu): Removed.
12049 (target_cpu): New variable.
12050 (pkglibdir): Use target_cpu instead of host_cpu.
12052 * util/genmoddep.c: Removed.
12054 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12055 instead of GRUB_HOST_SIZEOF_VOID_P.
12056 * kern/dl.c: Likewise.
12058 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12060 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12061 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12062 (GRUB_TARGET_SIZEOF_LONG): ... this.
12063 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12064 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12065 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12067 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12068 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12069 (GRUB_TARGET_SIZEOF_LONG): ... this.
12070 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12071 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12072 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12074 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12075 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12076 (GRUB_TARGET_SIZEOF_LONG): ... this.
12077 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12078 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12080 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12081 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12082 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12083 instead of GRUB_HOST_SIZEOF_LONG.
12084 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12085 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12086 GRUB_CPU_WORDS_BIGENDIAN.
12087 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12088 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12091 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12092 (genmoddep_SOURCES): Likewise.
12093 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12094 (genmoddep_SOURCES): Likewise.
12095 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12096 (genmoddep_SOURCES): Likewise.
12097 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12099 (genmoddep_SOURCES): Likewise.
12101 * genmoddep.awk: New file.
12103 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12104 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12105 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12106 (PModule::rule): Likewise.
12107 (Program::rule): Likewise.
12108 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12109 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12112 * configure.ac: Rewritten intensively to use host and target
12113 instead of build and host, respectively.
12115 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12116 (host_cpu): Removed.
12117 (target_cpu): New variable.
12118 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12119 (BUILD_CC): Removed.
12120 (BUILD_CFLAGS): Likewise.
12121 (BUILD_CPPFLAGS): Likewise.
12122 (TARGET_CC): New variable.
12123 (TARGET_CFLAGS): Likewise.
12124 (TARGET_CPPFLAGS): Likewise.
12125 (TARGET_LDFLAGS): Likewise.
12127 (include): Use target_cpu instead of host_cpu.
12128 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12130 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12132 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12134 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12135 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12136 field 'false' to 'exec_on_false'.
12137 (grub_script_create_cmdif): Renamed argument names to reflect above
12140 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12142 * normal/script.c (grub_script_create_cmdif): Likewise.
12144 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12146 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12148 (grub_hfsplus_btree_recptr): Likewise.
12149 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12150 FILEBLOCK both to pass a block number and store next block
12152 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12153 overflow file correctly. Specify errors appropriately, because
12154 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12155 grub_hfsplus_btree_recptr to get the pointer to a found key.
12156 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12159 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12161 (_linux_mod_SOURCES): New variable.
12162 (_linux_mod_CFLAGS): Likewise.
12163 (_linux_mod_LDFLAGS): Likewise.
12164 (linux_mod_SOURCES): Likewise.
12165 (linux_mod_CFLAGS): Likewise.
12166 (linux_mod_LDFLAGS): Likewise.
12168 * DISTLIST: Added loader/i386/efi/linux.c,
12169 loader/i386/efi/linux_normal.c and
12170 include/grub/i386/efi/loader.h.
12172 * loader/i386/efi/linux.c: New file.
12173 * loader/i386/efi/linux_normal.c: Likewise.
12174 * include/grub/i386/efi/loader.h: Likewise.
12176 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12178 * commands/blocklist.c: New file.
12180 * DISTLIST: Added commands/blocklist.c.
12182 * term/efi/console.c (grub_console_highlight_color): Use a lighter
12183 color for the background, and a darker color for the foreground.
12184 (grub_console_checkkey): Return READ_KEY.
12185 (grub_console_cls): Set the background to
12186 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12188 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12190 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12191 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12193 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12196 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12197 BG. The spec is wrong again.
12199 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12201 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12203 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12204 commands/blocklist.c.
12205 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12207 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12208 (blocklist_mod_SOURCES): New variable.
12209 (blocklist_mod_CFLAGS): Likewise.
12210 (blocklist_mod_LDFLAGS): Likewise.
12212 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12214 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12216 (lba_mode): Use %eax more intensively to reduce the code size.
12218 2006-05-20 Marco Gerards <marco@gnu.org>
12220 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12222 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12224 (script): Accept leading newlines.
12225 (newlines): New rule to describe 0 or more newlines.
12226 (commands): Accept `command' with trailing newline. Fixed the
12227 order in which arguments were passed to `grub_script_add_cmd'.
12228 Accept commands separated by newlines.
12229 (function): Changed to accept newlines.
12230 (menuentry) Rewritten.
12232 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12233 front of the list, instead of to the end.
12235 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12237 * util/i386/pc/grub-install.in (bindir): New variable.
12238 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12239 Shaver <lbgwjl@gmail.com>.
12241 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12243 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12244 grub/machine/linux.h
12245 * loader/i386/pc/linux.c: Likewise.
12247 * include/grub/i386/pc/linux.h: Moved to ...
12248 * include/grub/i386/linux.h: ... here.
12250 * include/grub/i386/linux.h (struct linux_kernel_params): New
12253 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12255 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12257 (grub_video_vbe_blit_glyph): Likewise.
12258 (grub_video_vbe_blit_bitmap): Likewise.
12259 (grub_video_vbe_blit_render_target): Likewise.
12261 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12263 * configure.ac (--with-platform): Properly quote the square
12266 2006-05-08 Marco Gerards <marco@gnu.org>
12268 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12270 (kernel_elf_HEADERS): ...to this. Updated all users.
12271 (grubof_symlist.c): Renamed from this...
12272 (kernel_elf_symlist.c): ...to this. Updated all users.
12273 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12274 (grubof_SOURCES): Renamed from this...
12275 (kernel_elf_SOURCES): ...to this.
12276 (grubof_HEADERS): Renamed from this...
12277 (kernel_elf_HEADERS): ...to this.
12278 (grubof_CFLAGS): Renamed from this...
12279 (kernel_elf_CFLAGS): ...to this.
12280 (grubof_ASFLAGS): Renamed from this...
12281 (kernel_elf_ASFLAGS): ...to this.
12282 (grubof_LDFLAGS): Renamed from this...
12283 (kernel_elf_LDFLAGS): ...to this.
12285 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12287 (kernel_elf_HEADERS): ...to this. Updated all users.
12288 (grubof_symlist.c): Renamed from this...
12289 (kernel_elf_symlist.c): ...to this. Updated all users.
12290 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12291 (grubof_SOURCES): Renamed from this...
12292 (kernel_elf_SOURCES): ...to this.
12293 (grubof_HEADERS): Renamed from this...
12294 (kernel_elf_HEADERS): ...to this.
12295 (grubof_CFLAGS): Renamed from this...
12296 (kernel_elf_CFLAGS): ...to this.
12297 (grubof_ASFLAGS): Renamed from this...
12298 (kernel_elf_ASFLAGS): ...to this.
12299 (grubof_LDFLAGS): Renamed from this...
12300 (kernel_elf_LDFLAGS): ...to this.
12302 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12303 `kernel.elf' instead of `grubof'.
12305 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12307 Add --with-platform to configure. Use pkglibdir instead of
12308 pkgdatadir. This is reported by Roger Leigh.
12310 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12311 (host_vendor): Likewise.
12312 (host_os): Likewise.
12313 (pkgdatadir): Likewise.
12314 (platform): New variable.
12315 (pkglibdir): Likewise.
12316 Use PKGLIBDIR instead of PKGDATADIR.
12318 * util/i386/pc/grub-install.in (datadir): Removed.
12319 (host_vendor): Likewise.
12320 (host_os): Likewise.
12321 (pkgdatadir): Likewise.
12322 (platform): New variable.
12323 (pkglibdir): Likewise.
12324 Use PKGLIBDIR instead of PKGDATADIR.
12326 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12327 instead of GRUB_DATADIR.
12329 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12331 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12334 * configure.ac (--with-platform): New option.
12335 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12337 * Makefile.in: Include a makefile based on PLATFORM instead of
12339 (pkgdatadir): Not appended by the machine type.
12340 (pkglibdir): Appended by the machine type.
12341 (host_vendor): Removed.
12342 (platform): New variable.
12343 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12344 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12345 (uninstall): Likewise.
12347 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12349 Use the environment context in the menu. Remove the commands
12350 "default" and "timeout", and use variables instead.
12352 * normal/menu.c: Include grub/env.h.
12353 (print_entry): Cast TITLE to silence gcc.
12354 (get_timeout): New function.
12355 (set_timeout): Likewise.
12356 (get_entry_number): Likewise.
12357 (run_menu): Use a default entry, a fallback entry and a timeout
12358 in the environment variables "default", "fallback" and
12359 "timeout". Also, tweak the default entry if it is not within the
12360 current menu entries.
12361 (grub_menu_run): Use a fallback entry in the environment variable
12364 * normal/main.c (read_config_file): Do not initialize
12365 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12367 (grub_normal_execute): Use a data slot to store the menu.
12369 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12370 fallback_entry and timeout.
12371 (struct grub_menu_list): Removed.
12372 (grub_menu_list_t): Likewise.
12373 (struct grub_context): Likewise.
12374 (grub_context_t): Likewise.
12375 (grub_context_get): Likewise.
12376 (grub_context_get_current_menu): Likewise.
12377 (grub_context_push_menu): Likewise.
12378 (grub_context_pop_menu): Likewise.
12379 (grub_default_init): Likewise.
12380 (grub_default_fini): Likewise.
12381 (grub_timeout_init): Likewise.
12382 (grub_timeout_fini): Likewise.
12384 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12386 (normal_mod_SOURCES): Removed normal/context.c.
12388 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12389 commands/default.c, commands/timeout.c and normal/context.c.
12390 (normal_mod_SOURCES): Removed normal/context.c.
12392 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12393 commands/timeout.c and normal/context.c.
12394 (normal_mod_SOURCES): Removed normal/context.c.
12396 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12397 commands/default.c, commands/timeout.c and normal/context.c.
12398 (normal_mod_SOURCES): Removed normal/context.c.
12400 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12402 (default_mod_SOURCES): Removed.
12403 (default_mod_CFLAGS): Likewise.
12404 (default_mod_LDFLAGS): Likewise.
12405 (timeout_mod_SOURCES): Removed.
12406 (timeout_mod_CFLAGS): Likewise.
12407 (timeout_mod_LDFLAGS): Likewise.
12409 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12412 * commands/default.c: Removed.
12413 * commands/timeout.c: Likewise.
12414 * normal/context.c: Likewise.
12416 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12418 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12420 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12422 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12423 "next" to "prev" for readability.
12424 (struct grub_env_sorted_var): New struct.
12425 (grub_env_context): Renamed to ...
12426 (initial_context): ... this.
12427 (grub_env_var_context): Renamed to ...
12428 (current_context): ... this.
12429 (grub_env_find): Look only at CURRENT_CONTEXT.
12430 (grub_env_context_open): Rewritten to copy exported variables from
12432 (grub_env_context_close): Rewritten according to the new
12433 scheme. Also, add an assertion to prevent the initial context from
12435 (grub_env_insert): Removed the code for the sorted list.
12436 (grub_env_remove): Likewise.
12437 (grub_env_export): Simply mark the variable with
12438 GRUB_ENV_VAR_GLOBAL.
12439 (grub_env_set): A cosmetic change for naming consistency.
12440 (grub_env_get): Likewise.
12441 (grub_env_unset): Likewise.
12442 (grub_env_iterate): Rewritten to sort variables within this
12444 (grub_register_variable_hook): Fixed for naming consistency. Call
12445 grub_env_find again, only if NAME is not found at the first time.
12446 (mangle_data_slot_name): New function.
12447 (grub_env_set_data_slot): Likewise.
12448 (grub_env_get_data_slot): Likewise.
12449 (grub_env_unset_data_slot): Likewise.
12451 * include/grub/env.h (grub_env_var_type): New enum.
12452 (GRUB_ENV_VAR_LOCAL): New constant.
12453 (GRUB_ENV_VAR_GLOBAL): Likewise.
12454 (GRUB_ENV_VAR_DATA): Likewise.
12455 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12457 (grub_env_set): Replace VAR with NAME for consistency.
12458 (grub_register_variable_hook): Likewise.
12459 (grub_env_export): Specify the name of the argument.
12460 (grub_env_set_data_slot): New prototype.
12461 (grub_env_get_data_slot): Likewise.
12462 (grub_env_unset_data_slot): Likewise.
12464 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12466 Extend the loader so that GRUB can accept a loader which comes
12467 back to GRUB when a loaded image exits. Also, this change adds
12468 support for a chainloader on EFI.
12470 * term/efi/console.c: Include grub/misc.h.
12471 (grub_console_checkkey): Display a scan code on the top for
12472 debugging. This will be removed once the EFI port gets stable.
12473 Correct the scan code mapping.
12475 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12476 allocate memory from larger regions, in order to reduce the number
12477 of allocated regions. Otherwise, the MacOSX loader panics.
12478 (filter_memory_map): Avoid less than 1MB for compatibility with
12480 (add_memory_regions): Allocate from the tail of a region, if
12481 possible, to avoid allocating a region near to 1MB, for the MacOSX
12484 * kern/efi/init.c (grub_efi_set_prefix): Specify
12485 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12487 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12488 argument IMAGE_HANDLE and specify it to get a loaded image.
12489 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12490 grub_efi_get_loaded_image.
12491 (grub_efi_get_filename): Divide the length by the size of
12493 (grub_efi_get_device_path): New function.
12494 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12495 the length by the size of grub_efi_char16_t for a file path device
12498 * kern/loader.c (grub_loader_noreturn): New variable.
12499 (grub_loader_set): Accept a new argument NORETURN. Set
12500 GRUB_LOADER_NORETURN to NORETURN.
12501 All callers changed.
12502 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12505 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12507 (grub_efi_get_loaded_image): Take an argument to specify an image
12510 * include/grub/loader.h (grub_loader_set): Added one more argument
12513 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12514 instead of grub_efi_open_protocol.
12515 (grub_efidisk_get_device_name): Likewise.
12516 (grub_efidisk_close): Print a newline.
12517 (grub_efidisk_get_device_handle): Fixed to use
12518 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12519 GRUB_EFI_DEVICE_PATH_TYPE.
12521 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12522 * kern/efi/efi.c (device_path_guid): ... here.
12524 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12526 (kernel_mod_HEADERS): Added efi/disk.h.
12527 (_chain_mod_SOURCES): New variable.
12528 (_chain_mod_CFLAGS): Likewise.
12529 (_chain_mod_LDFLAGS): Likewise.
12530 (chain_mod_SOURCES): Likewise.
12531 (chain_mod_CFLAGS): Likewise.
12532 (chain_mod_LDFLAGS): Likewise.
12534 * DISTLIST: Added include/grub/efi/chainloader.h,
12535 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12537 * include/grub/efi/chainloader.h: New file.
12538 * loader/efi/chainloader.c: Likewise.
12539 * loader/efi/chainloader_normal.c: Likewise.
12541 2006-04-30 Marco Gerards <marco@gnu.org>
12543 * commands/configfile.c (grub_cmd_source): New function.
12544 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12545 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12547 2006-04-30 Marco Gerards <marco@gnu.org>
12549 * normal/execute.c (grub_script_execute_cmd): Change the return
12550 type to `grub_err_t'. Correctly return the error.
12551 (grub_script_execute_cmdline): In case a command line is not a
12552 command or a function, try to interpret it as an assignment.
12554 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12556 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12557 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12558 skip a node whose name is obviously invalid as UTF-16,
12559 i.e. contains a NUL character. Stop the iteration when the last
12560 directory entry is found. Instead of using the return value of
12561 grub_hfsplus_btree_iterate_node, store the value in RET and use
12562 it, because the iterator can be stopped by the last directory
12565 2006-04-30 Marco Gerards <marco@gnu.org>
12567 * include/grub/env.h (grub_env_export): New prototype. Reported
12568 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12570 2006-04-30 Marco Gerards <marco@gnu.org>
12572 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12573 size of the extents in a catalog file record.
12575 2006-04-29 Marco Gerards <marco@gnu.org>
12577 * commands/configfile.c (grub_cmd_configfile): Execute the
12578 configfile within its own context.
12580 * include/grub/env.h (grub_env_context_open): New prototype.
12581 (grub_env_context_close): Likewise.
12583 * kern/env.c (grub_env): Removed.
12584 (grub_env_sorted): Likewise.
12585 (grub_env_context): New variable.
12586 (grub_env_var_context): Likewise.
12587 (grub_env_find): Search both the active context and the global
12589 (grub_env_context_open): New function.
12590 (grub_env_context_close): Likewise.
12591 (grub_env_insert): Likewise.
12592 (grub_env_remove): Likewise.
12593 (grub_env_export): Likewise.
12594 (grub_env_set): Changed to use helper functions to avoid code
12596 (grub_env_iterate): Rewritten so both the current context and the
12597 global context are being used.
12599 * normal/command.c (export_command): New function.
12600 (grub_command_init): Register the `export' function.
12602 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12604 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12605 explicitly to suppress gcc's warnings.
12606 * fs/fat.c (grub_fat_find_dir): Likewise.
12607 (grub_fat_label): Likewise.
12608 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12609 (grub_xfs_mount): Likewise.
12610 (grub_xfs_label): Likewise.
12611 * fs/affs.c (grub_affs_mount): Likewise.
12612 (grub_affs_label): Likewise.
12613 (grub_affs_iterate_dir): Likewise.
12614 * fs/sfs.c (grub_sfs_mount): Likewise.
12615 (grub_sfs_iterate_dir): Likewise.
12616 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12617 * fs/hfs.c (grub_hfs_mount): Likewise.
12618 (grub_hfs_cmp_catkeys): Likewise.
12619 (grub_hfs_find_dir): Likewise.
12620 (grub_hfs_dir): Likewise.
12621 (grub_hfs_label): Likewise.
12622 * fs/jfs.c (grub_jfs_mount): Likewise.
12623 (grub_jfs_opendir): Likewise.
12624 (grub_jfs_getent): Likewise.
12625 (grub_jfs_lookup_symlink): Likewise.
12626 (grub_jfs_label): Likewise.
12627 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12628 (grub_hfsplus_iterate_dir): Likewise.
12629 (grub_hfsplus_btree_iterate_node): Made static.
12631 * util/grub-emu.c (prefix): New variable.
12632 (grub_machine_set_prefix): New function.
12633 (main): Do not set the environment variable "prefix" here. Only
12634 set PREFIX, which is used later by grub_machine_set_prefix.
12636 * include/grub/video.h: Do not include grub/symbol.h.
12637 (grub_video_register): Not exported. This symbol is not defined in
12639 (grub_video_unregister): Likewise.
12640 (grub_video_iterate): Likewise.
12641 (grub_video_setup): Likewise.
12642 (grub_video_restore): Likewise.
12643 (grub_video_get_info): Likewise.
12644 (grub_video_get_blit_format): Likewise.
12645 (grub_video_set_palette): Likewise.
12646 (grub_video_get_palette): Likewise.
12647 (grub_video_set_viewport): Likewise.
12648 (grub_video_get_viewport): Likewise.
12649 (grub_video_map_color): Likewise.
12650 (grub_video_map_rgb): Likewise.
12651 (grub_video_map_rgba): Likewise.
12652 (grub_video_fill_rect): Likewise.
12653 (grub_video_blit_glyph): Likewise.
12654 (grub_video_blit_bitmap): Likewise.
12655 (grub_video_blit_render_target): Likewise.
12656 (grub_video_scroll): Likewise.
12657 (grub_video_swap_buffers): Likewise.
12658 (grub_video_create_render_target): Likewise.
12659 (grub_video_delete_render_target): Likewise.
12660 (grub_video_set_active_render_target): Likewise.
12662 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12664 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12666 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12667 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12668 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12669 instead of $(srcdir)/genkernsyms.sh.
12671 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12672 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12673 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12674 instead of $(srcdir)/genkernsyms.sh.
12676 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12677 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12678 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12679 instead of $(srcdir)/genkernsyms.sh.
12681 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12682 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12683 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12684 instead of $(srcdir)/genkernsyms.sh.
12686 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12689 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12691 (gensymlist.sh): New target.
12692 (genkernsyms.sh): Likewise.
12694 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12695 genkernsyms.sh.in and gensymlist.sh.in.
12697 * genkernsyms.sh: Removed.
12698 * gensymlist.sh: Likewise.
12700 * genkernsyms.sh.in: New file.
12701 * gensymlist.sh.in: Likewise.
12703 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12705 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12706 clobber "prefix", since we may have already set it manually.
12708 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12710 * kern/misc.c (abort): New alias for grub_abort.
12712 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12714 A new machine-specific function "grub_machine_set_prefix" is
12715 defined. This is called after loading modules, so that a prefix
12716 initialization can use modules. Also, this change adds an
12717 intensive debugging feature for the memory manager via the
12718 configure option "--enable-mm-debug".
12720 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12723 * kern/sparc64/ieee1275/init.c (abort): Removed.
12724 (grub_stop): Likewise.
12725 (grub_exit): New function.
12726 (grub_set_prefix): Renamed to ...
12727 (grub_machine_set_prefix): ... this.
12728 (grub_machine_init): Do not call grub_set_prefix.
12730 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12731 (grub_machine_set_prefix): ... this.
12732 (grub_machine_init): Do not call grub_set_prefix.
12734 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12735 (grub_machine_init): Do not set the prefix here.
12737 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12739 * kern/efi/init.c: Include grub/mm.h.
12740 (grub_efi_set_prefix): New function.
12742 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12743 (grub_efi_get_filename): New function.
12744 (grub_print_device_path): Renamed to ...
12745 (grub_efi_print_device_path): ... this.
12747 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12748 [MM_DEBUG] (grub_realloc): Likewise.
12749 [MM_DEBUG] (grub_free): Likewise.
12750 [MM_DEBUG] (grub_memalign): Likewise.
12751 [MM_DEBUG] (grub_mm_debug): New variable.
12752 [MM_DEBUG] (grub_debug_malloc): New function.
12753 [MM_DEBUG] (grub_debug_free): New function.
12754 [MM_DEBUG] (grub_debug_realloc): New function.
12755 [MM_DEBUG] (grub_debug_memalign): New function.
12757 * kern/misc.c (grub_abort): Print a newline to distinguish
12760 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12761 grub_set_root_dev after loading modules. This is necessary when
12762 setting a prefix depends on modules.
12764 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12765 (grub_efi_print_device_path): ... this.
12766 (grub_efi_get_filename): New prototype.
12767 (grub_efi_set_prefix): Likewise.
12769 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12771 (grub_efidisk_get_device_handle): New prototype.
12772 (grub_efidisk_get_device_name): Likewise.
12774 * include/grub/mm.h: Include config.h.
12775 (MM_DEBUG): Removed.
12776 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12777 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12778 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12779 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12780 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12781 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12782 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12783 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12784 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12786 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12788 * disk/efi/efidisk.c: Include grub/partition.h.
12789 (iterate_child_devices): New function.
12790 (add_device): First, compare only last device path nodes, so that
12791 devices are sorted by the types.
12792 (grub_efidisk_get_device_handle): New function.
12793 (grub_efidisk_get_device_name): Likewise.
12795 * configure.ac (--enable-mm-debug): New option to enable the
12796 memory manager debugging feature. This makes the binary much
12797 bigger, so is disabled by default.
12799 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12801 Use grub_abort instead of grub_stop, and grub_exit must be
12802 define in each architecture now. Also, this change adds support
12805 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12806 (grub_getkey): New function.
12807 (grub_term_get_current): Likewise.
12809 * util/i386/pc/grub-setup.c: Include grub/term.h.
12810 (grub_getkey): New function.
12811 (grub_term_get_current): Likewise.
12813 * util/misc.c (grub_stop): Renamed to ...
12814 (grub_exit): ... this.
12816 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12817 (grub_exit): ... this.
12818 (grub_machine_init): Use grub_abort instead of abort.
12819 (grub_stop): Removed.
12821 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12824 * kern/i386/pc/startup.S (grub_exit): New function.
12825 (cold_reboot): New label.
12827 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12828 (grub_efi_init): Call grub_efidisk_init.
12829 (grub_efi_fini): Call grub_efidisk_fini.
12831 * kern/efi/efi.c: Include grub/mm.h.
12832 (grub_efi_console_control_guid): Renamed to ...
12833 (console_control_guid): ... this.
12834 (grub_efi_loaded_image_guid): Renamed to ...
12835 (loaded_image_guid): ... this.
12836 (grub_efi_locate_handle): New function.
12837 (grub_efi_open_protocol): Likewise.
12838 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12839 GRUB_EFI_CONSOLE_CONTROL_GUID.
12840 (grub_efi_exit): Removed.
12841 (grub_stop): Likewise.
12842 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12843 (grub_exit): New function.
12844 (grub_print_device_path): Likewise.
12846 * kern/rescue.c (grub_rescue_cmd_exit): New function.
12847 (grub_enter_rescue_mode): Register "exit".
12849 * kern/misc.c (grub_real_dprintf): A cosmetic change.
12850 (grub_abort): New function.
12852 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12854 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12856 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12858 * include/grub/efi/efi.h (grub_efi_exit): Removed.
12859 (grub_print_device_path): New prototype.
12860 (grub_efi_locate_handle): Likewise.
12861 (grub_efi_open_protocol): Likewise.
12863 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12864 * disk/efi/efidisk.c: Likewise.
12866 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12868 * include/grub/efi/console_control.h
12869 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12871 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12872 last 8 bytes as an array.
12873 (GRUB_EFI_DISK_IO_GUID): New macro.
12874 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12875 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12876 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12878 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12879 (struct grub_efi_device_path): Rename the member "sub_type" to
12881 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12882 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12883 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12884 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12885 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12886 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12887 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12888 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12889 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12890 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12891 (struct grub_efi_pci_device_path): New structure.
12892 (grub_efi_pci_device_path_t): New type.
12893 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12894 (struct grub_efi_pccard_device_path): New structure.
12895 (grub_efi_pccard_device_path_t): New type.
12896 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12897 (struct grub_efi_memory_mapped_device_path): New structure.
12898 (grub_efi_memory_mapped_device_path_t): New type.
12899 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12900 (struct grub_efi_vendor_device_path): New structure.
12901 (grub_efi_vendor_device_path_t): New type.
12902 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12903 (struct grub_efi_controller_device_path): New structure.
12904 (grub_efi_controller_device_path_t): New type.
12905 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12906 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12907 (struct grub_efi_acpi_device_path): New structure.
12908 (grub_efi_acpi_device_path_t): New type.
12909 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12910 (struct grub_efi_expanded_acpi_device_path): New structure.
12911 (grub_efi_expanded_acpi_device_path_t): New type.
12912 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12913 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12914 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12915 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12916 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12917 (struct grub_efi_atapi_device_path): New structure.
12918 (grub_efi_atapi_device_path_t): New type.
12919 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12920 (struct grub_efi_fibre_channel_device_path): New structure.
12921 (grub_efi_fibre_channel_device_path_t): New type.
12922 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12923 (struct grub_efi_1394_device_path): New structure.
12924 (grub_efi_1394_device_path_t): New type.
12925 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12926 (struct grub_efi_usb_device_path): New structure.
12927 (grub_efi_usb_device_path_t): New type.
12928 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12929 (struct grub_efi_usb_class_device_path): New structure.
12930 (grub_efi_usb_class_device_path_t): New type.
12931 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12932 (struct grub_efi_i2o_device_path): New structure.
12933 (grub_efi_i2o_device_path_t): New type.
12934 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12935 (struct grub_efi_mac_address_device_path): New structure.
12936 (grub_efi_mac_address_device_path_t): New type.
12937 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12938 (struct grub_efi_ipv4_device_path): New structure.
12939 (grub_efi_ipv4_device_path_t): New type.
12940 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12941 (struct grub_efi_ipv6_device_path): New structure.
12942 (grub_efi_ipv6_device_path_t): New type.
12943 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12944 (struct grub_efi_infiniband_device_path): New structure.
12945 (grub_efi_infiniband_device_path_t): New type.
12946 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12947 (struct grub_efi_uart_device_path): New structure.
12948 (grub_efi_uart_device_path_t): New type.
12949 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12950 (struct grub_efi_vendor_messaging_device_path): New structure.
12951 (grub_efi_vendor_messaging_device_path_t): New type.
12952 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12953 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12954 (struct grub_efi_hard_drive_device_path): New structure.
12955 (grub_efi_hard_drive_device_path_t): New type.
12956 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12957 (struct grub_efi_cdrom_device_path): New structure.
12958 (grub_efi_cdrom_device_path_t): New type.
12959 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12960 (struct grub_efi_vendor_media_device_path): New structure.
12961 (grub_efi_vendor_media_device_path_t): New type.
12962 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12963 (struct grub_efi_file_path_device_path): New structure.
12964 (grub_efi_file_path_device_path_t): New type.
12965 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12966 (struct grub_efi_protocol_device_path): New structure.
12967 (grub_efi_protocol_device_path_t): New type.
12968 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12969 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12970 (struct grub_efi_bios_device_path): New structure.
12971 (grub_efi_bios_device_path_t): New type.
12972 (struct grub_efi_disk_io): New structure.
12973 (grub_efi_disk_io_t): New type.
12974 (struct grub_efi_block_io_media): New structure.
12975 (grub_efi_block_io_media_t): New type.
12976 (struct grub_efi_block_io): New structure.
12977 (grub_efi_block_io_t): New type.
12979 * include/grub/misc.h (grub_stop): Removed.
12980 (grub_exit): New prototype.
12981 (grub_abort): Likewise.
12983 * include/grub/disk.h (enum grub_disk_dev_id): Added
12984 GRUB_DISK_DEVICE_EFIDISK_ID.
12986 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12987 disk/efi/efidisk.c.
12988 (kernel_syms.lst): Remove the target if an error occurs.
12990 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12992 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12993 as it was simply too buggy.
12995 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12997 * kern/misc.c (grub_lltoa): New function.
12998 (grub_vsprintf): Added support for the long long suffix,
13001 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13003 * Makefile.in (LDFLAGS): Add variable.
13004 (LD): Remove variable.
13005 * configure.ac: Add -m32 to LDFLAGS.
13006 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13007 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13008 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13009 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13010 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13012 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13013 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13014 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13016 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13018 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13019 length for unknown glyph.
13021 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13023 Add support for pre-loaded modules into the EFI port.
13025 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13026 completely. Accept one more argument DIR. The caller has changed.
13028 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13030 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13031 (grub_efi_loaded_image_guid): New variable.
13032 (grub_efi_get_loaded_image): New function.
13033 (grub_arch_modules_addr): Likewise.
13035 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13038 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13039 (struct grub_efi_loaded_image): New structure.
13040 (grub_efi_loaded_image_t): New type.
13042 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13044 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13045 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13046 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13048 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13050 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13052 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13054 * DISTLIST: Added include/grub/efi/console.h,
13055 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13056 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13058 * include/grub/efi/console.h: New file.
13059 * include/grub/efi/time.h: Likewise.
13060 * include/grub/i386/efi/kernel.h: Likewise.
13061 * kern/efi/init.c: Likewise.
13062 * kern/efi/mm.c: Likewise.
13063 * term/efi/console.c: Likewise.
13065 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13066 (grub_stop): Removed.
13067 (grub_get_rtc): Likewise.
13068 (grub_machine_init): Simply call grub_efi_init.
13069 (grub_machine_fini): Call grub_efi_fini.
13071 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13072 (grub_efi_output_string): Removed.
13073 (grub_efi_stall): New function.
13074 (grub_stop): Likewise.
13075 (grub_get_rtc): Likewise.
13077 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13078 (grub_efi_stall): New prototype.
13079 (grub_efi_allocate_pages): Likewise.
13080 (grub_efi_free_pages): Likewise.
13081 (grub_efi_get_memory_map): Likewise.
13082 (grub_efi_mm_init): Likewise.
13083 (grub_efi_mm_fini): Likewise.
13084 (grub_efi_init): Likewise.
13085 (grub_efi_fini): Likewise.
13087 * include/grub/i386/efi/time.h: Do not include
13088 grub/symbol.h. Include grub/efi/time.h.
13089 (GRUB_TICKS_PER_SECOND): Removed.
13090 (grub_get_rtc): Likewise.
13092 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13093 Added padding. The EFI spec is buggy.
13094 (GRUB_EFI_BLACK): New macro.
13095 (GRUB_EFI_BLUE): Likewise.
13096 (GRUB_EFI_GREEN): Likewise.
13097 (GRUB_EFI_CYAN): Likewise.
13098 (GRUB_EFI_RED): Likewise.
13099 (GRUB_EFI_MAGENTA): Likewise.
13100 (GRUB_EFI_BROWN): Likewise.
13101 (GRUB_EFI_LIGHTGRAY): Likewise.
13102 (GRUB_EFI_BRIGHT): Likewise.
13103 (GRUB_EFI_DARKGRAY): Likewise.
13104 (GRUB_EFI_LIGHTBLUE): Likewise.
13105 (GRUB_EFI_LIGHTGREEN): Likewise.
13106 (GRUB_EFI_LIGHTCYAN): Likewise.
13107 (GRUB_EFI_LIGHTRED): Likewise.
13108 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13109 (GRUB_EFI_YELLOW): Likewise.
13110 (GRUB_EFI_WHITE): Likewise.
13111 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13112 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13113 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13114 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13115 (GRUB_EFI_BACKGROUND_RED): Likewise.
13116 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13117 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13118 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13119 (GRUB_EFI_TEXT_ATTR): Likewise.
13121 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13122 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13123 (kernel_mod_HEADERS): Added efi/time.h.
13125 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13127 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13128 include/grub/efi/api.h, include/grub/efi/console_control.h,
13129 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13130 include/grub/i386/efi/time.h, kern/efi/efi.c,
13131 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13132 and util/i386/efi/grub-mkimage.c.
13134 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13136 * genmk.rb (PModule#rule): Do not export symbols if
13137 #{prefix}_EXPORTS is set to "no".
13139 * conf/i386-efi.mk: New file.
13140 * conf/i386-efi.rmk: Likewise.
13141 * include/grub/efi/api.h: Likewise.
13142 * include/grub/efi/console_control.h: Likewise.
13143 * include/grub/efi/efi.h: Likewise.
13144 * include/grub/efi/pe32.h: Likewise.
13145 * include/grub/i386/efi/time.h: Likewise.
13146 * kern/efi/efi.c: Likewise.
13147 * kern/i386/efi/init.c: Likewise.
13148 * kern/i386/efi/startup.S: Likewise.
13149 * util/i386/efi/grub-mkimage.c: Likewise.
13151 2006-04-17 Marco Gerards <marco@gnu.org>
13153 * include/grub/script.h: Include <grub/parser.h> and
13154 "grub_script.tab.h".
13155 (struct grub_lexer_param): New struct.
13156 (struct grub_parser_param): Likewise.
13157 (grub_script_create_arglist): Pass the state in an argument.
13158 (grub_script_add_arglist): Likewise.
13159 (grub_script_create_cmdline): Likewise.
13160 (grub_script_create_cmdblock): Likewise.
13161 (grub_script_create_cmdif): Likewise.
13162 (grub_script_create_cmdmenu): Likewise.
13163 (grub_script_add_cmd): Likewise.
13164 (grub_script_arg_add): Likewise.
13165 (grub_script_lexer_ref): Likewise.
13166 (grub_script_lexer_deref): Likewise.
13167 (grub_script_lexer_record_start): Likewise.
13168 (grub_script_lexer_record_stop): Likewise.
13169 (grub_script_mem_record): Likewise.
13170 (grub_script_mem_record_stop): Likewise.
13171 (grub_script_malloc): Likewise.
13172 (grub_script_yylex): Likewise.
13173 (grub_script_yyparse): Likewise.
13174 (grub_script_yyerror): Likewise.
13175 (grub_script_yylex): Likewise.
13176 (grub_script_lexer_init): Return the state.
13178 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13179 (grub_script_lexer_done): Likewise.
13180 (grub_script_lexer_getline): Likewise.
13181 (grub_script_lexer_refs): Likewise.
13182 (script): Likewise.
13183 (newscript): Likewise.
13184 (record): Likewise.
13185 (recording): Likewise.
13186 (recordpos): Likewise.
13187 (recordlen): Likewise.
13188 (grub_script_lexer_init): Return the state instead of setting
13190 (grub_script_lexer_ref): Use the newly added argument for state
13191 instead of globals.
13192 (grub_script_lexer_deref): Likewise.
13193 (grub_script_lexer_record_start): Likewise.
13194 (grub_script_lexer_record_stop): Likewise.
13195 (recordchar): Likewise.
13196 (nextchar): Likewise.
13197 (grub_script_yylex2): Likewise.
13198 (grub_script_yylex): Likewise.
13199 (grub_script_yyerror): Likewise.
13201 * normal/parser.y (func_mem): Removed variable.
13202 (menu_entry): Likewise.
13204 (%lex-param): New parser option.
13205 (%parse-param): Likewise.
13206 (script): Always return the AST.
13207 (argument): Pass the state around.
13208 (arguments): Likewise.
13209 (grubcmd): Likewise.
13210 (commands): Likewise.
13211 (function): Likewise.
13212 (menuentry): Likewise.
13213 (if_statement): Likewise.
13216 * normal/script.c (grub_script_memused): Removed variable.
13217 (grub_script_parsed): Likewise.
13218 (grub_script_malloc): Added a state argument. Use that instead of
13220 (grub_script_mem_record): Likewise.
13221 (grub_script_mem_record_stop): Likewise.
13222 (grub_script_arg_add): Likewise.
13223 (grub_script_add_arglist): Likewise.
13224 (grub_script_create_cmdline): Likewise.
13225 (grub_script_create_cmdif): Likewise.
13226 (grub_script_create_cmdmenu): Likewise.
13227 (grub_script_add_cmd): Likewise.
13228 (grub_script_parse): Setup the state before calling the parser.
13230 2006-04-16 Marco Gerards <marco@gnu.org>
13232 * normal/command.c (grub_command_init): Remove the title command.
13234 * normal/lexer.c (grub_script_yylex): Renamed from this...
13235 (grub_script_yylex2): ... to this.
13236 (grub_script_yylex): New function. Temporary
13237 introduced to filter some tokens.
13238 (grub_script_yyerror): Print a newline.
13240 * normal/main.c (read_config_file): Output information about the
13241 lines that contain errors. Wait for a key after all lines have
13242 been processed. Don't return an empty menu.
13244 * normal/parser.y (func_mem): Don't initialize.
13245 (menu_entry): Likewise.
13246 (err): New variable.
13247 (script): Don't return anything when an error was encountered.
13248 (ws, returns): Removed rules.
13249 (argument): Disabled concatenated variable support.
13250 (arguments): Remove explicit separators.
13251 (grubcmd): Likewise.
13252 (function): Likewise.
13253 (menuentry): Likewise.
13255 (commands): Likewise. Add error handling.
13257 * normal/script.c (grub_script_create_cmdline): If
13258 `grub_script_parsed' is 0, assume the parser encountered an error.
13260 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13262 * configure.ac: Add support for EFI. Fix the typo
13263 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13265 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13267 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13268 foreign multibyte characters should be shown correctly.
13270 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13272 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13274 (read_config_file): Made it to close file before returning.
13276 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13278 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13279 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13280 video/i386/pc/vbefill.c.
13282 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13283 video/i386/pc/vbefill.c.
13285 * include/grub/video.h (grub_video_blit_format): New enum.
13286 (grub_video_mode_info): Added new member blit_format.
13287 (grub_video_get_blit_format): New function prototype.
13289 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13290 function prototype.
13291 (grub_video_vbe_map_rgb): Likewise.
13292 (grub_video_vbe_unmap_color): Likewise.
13294 * include/grub/i386/pc/vbeblit.h: New file.
13296 * include/grub/i386/pc/vbefill.h: New file.
13298 * video/video.c (grub_video_get_blit_format): New function.
13299 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13300 (grub_video_vbe_map_rgb): Likewise.
13301 (grub_video_vbe_unmap_color): Likewise.
13303 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13305 (grub_video_vbe_blit_render_target): Changed to use more optimized
13307 (grub_video_vbe_setup): Added detection for optimized settings.
13308 (grub_video_vbe_create_render_target): Likewise.
13310 * video/i386/pc/vbeblit.c: New file.
13312 * video/i386/pc/vbefill.c: New file.
13314 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13316 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13319 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13320 parsing to support both hex and dec ranges. If filename was missing
13321 show usage information.
13323 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13325 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13326 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13328 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13329 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13330 (video_mod_SOURCES): Added.
13331 (video_mod_CFLAGS): Likewise.
13332 (video_mod_LDFLAGS): Likewise.
13333 (gfxterm_mod_SOURCES): Likewise.
13334 (gfxterm_mod_CFLAGS): Likewise.
13335 (gfxterm_mod_LDFLAGS): Likewise.
13336 (videotest_mod_SOURCES): Likewise.
13337 (videotest_mod_CFLAGS): Likewise.
13338 (videotest_mod_LDFLAGS): Likewise.
13339 (vesafb_mod_SOURCES): Removed.
13340 (vesafb_mod_CFLAGS): Likewise.
13341 (vesafb_mod_LDFLAGS): Likewise.
13342 (vga_mod_SOURCES): Likewise.
13343 (vga_mod_CFLAGS): Likewise.
13344 (vga_mod_LDFLAGS): Likewise.
13346 * commands/videotest.c: New file.
13348 * font/manager.c (fill_with_default_glyph): Modified to use
13350 (grub_font_get_glyph): Likewise.
13351 (fontmanager): Renamed from this...
13352 (font_manager): ... to this.
13354 * include/grub/font.h (grub_font_glyph): Added new structure.
13355 (grub_font_get_glyph): Modified to use grub_font_glyph.
13357 * include/grub/misc.h (grub_abs): Added as inline function.
13359 * include/grub/video.h: New file.
13361 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13362 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13363 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13364 (grub_vbe_get_controller_info): Renamed from this...
13365 (grub_vbe_bios_get_controller_info): ... to this.
13366 (grub_vbe_get_mode_info): Renamed from this...
13367 (grub_vbe_bios_get_mode_info): ... to this.
13368 (grub_vbe_set_mode): Renamed from this...
13369 (grub_vbe_bios_set_mode): ... to this.
13370 (grub_vbe_get_mode): Renamed from this...
13371 (grub_vbe_bios_get_mode): ... to this.
13372 (grub_vbe_set_memory_window): Renamed from this...
13373 (grub_vbe_bios_set_memory_window): ... to this.
13374 (grub_vbe_get_memory_window): Renamed from this...
13375 (grub_vbe_bios_get_memory_window): ... to this.
13376 (grub_vbe_set_scanline_length): Renamed from this...
13377 (grub_vbe_set_scanline_length): ... to this.
13378 (grub_vbe_get_scanline_length): Renamed from this...
13379 (grub_vbe_bios_get_scanline_length): ... to this.
13380 (grub_vbe_set_display_start): Renamed from this...
13381 (grub_vbe_bios_set_display_start): ... to this.
13382 (grub_vbe_get_display_start): Renamed from this...
13383 (grub_vbe_bios_get_display_start): ... to this.
13384 (grub_vbe_set_palette_data): Renamed from this...
13385 (grub_vbe_bios_set_palette_data): ... to this.
13386 (grub_vbe_set_pixel_rgb): Removed.
13387 (grub_vbe_set_pixel_index): Likewise.
13389 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13391 (grub_vbe_bios_get_controller_info): ... to this.
13392 (grub_vbe_get_mode_info): Renamed from this...
13393 (grub_vbe_bios_get_mode_info): ... to this.
13394 (grub_vbe_set_mode): Renamed from this...
13395 (grub_vbe_bios_set_mode): ... to this.
13396 (grub_vbe_get_mode): Renamed from this...
13397 (grub_vbe_bios_get_mode): ... to this.
13398 (grub_vbe_set_memory_window): Renamed from this...
13399 (grub_vbe_bios_set_memory_window): ... to this.
13400 (grub_vbe_get_memory_window): Renamed from this...
13401 (grub_vbe_bios_get_memory_window): ... to this.
13402 (grub_vbe_set_scanline_length): Renamed from this...
13403 (grub_vbe_set_scanline_length): ... to this.
13404 (grub_vbe_get_scanline_length): Renamed from this...
13405 (grub_vbe_bios_get_scanline_length): ... to this.
13406 (grub_vbe_set_display_start): Renamed from this...
13407 (grub_vbe_bios_set_display_start): ... to this.
13408 (grub_vbe_get_display_start): Renamed from this...
13409 (grub_vbe_bios_get_display_start): ... to this.
13410 (grub_vbe_set_palette_data): Renamed from this...
13411 (grub_vbe_bios_set_palette_data): ... to this.
13412 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13413 getting corrupted after calling it. Added more pushes and pops.
13414 (grub_vbe_bios_set_mode): Likewise.
13415 (grub_vbe_bios_get_mode): Likewise.
13416 (grub_vbe_bios_get_memory_window): Likewise.
13417 (grub_vbe_bios_set_scanline_length): Likewise.
13418 (grub_vbe_bios_get_scanline_length): Likewise.
13419 (grub_vbe_bios_get_display_start): Likewise.
13420 (grub_vbe_bios_set_palette_data): Likewise.
13422 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13423 (cl_insert): Likewise.
13424 (cl_delete): Likewise.
13426 * term/gfxterm.c: New file.
13428 * term/i386/pc/vesafb.c: Removed file.
13430 * video/video.c: New file.
13432 * video/i386/pc/vbe.c (real2pm): Added new function.
13433 (grub_video_vbe_draw_pixel): Likewise.
13434 (grub_video_vbe_get_video_ptr): Likewise.
13435 (grub_video_vbe_get_pixel): Likewise
13436 (grub_video_vbe_init): Likewise.
13437 (grub_video_vbe_fini): Likewise.
13438 (grub_video_vbe_setup): Likewise.
13439 (grub_video_vbe_get_info): Likewise.
13440 (grub_video_vbe_set_palette): Likewise.
13441 (grub_video_vbe_get_palette): Likewise.
13442 (grub_video_vbe_set_viewport): Likewise.
13443 (grub_video_vbe_get_viewport): Likewise.
13444 (grub_video_vbe_map_color): Likewise.
13445 (grub_video_vbe_map_rgb): Likewise.
13446 (grub_video_vbe_map_rgba): Likewise.
13447 (grub_video_vbe_unmap_color): Likewise.
13448 (grub_video_vbe_fill_rect): Likewise.
13449 (grub_video_vbe_blit_glyph): Likewise.
13450 (grub_video_vbe_blit_bitmap): Likewise.
13451 (grub_video_vbe_blit_render_target): Likewise.
13452 (grub_video_vbe_scroll): Likewise.
13453 (grub_video_vbe_swap_buffers): Likewise.
13454 (grub_video_vbe_create_render_target): Likewise.
13455 (grub_video_vbe_delete_render_target): Likewise.
13456 (grub_video_vbe_set_active_render_target): Likewise.
13457 (grub_vbe_set_pixel_rgb): Remove function.
13458 (grub_vbe_set_pixel_index): Likewise.
13459 (index_color_mode): Remove static variable.
13460 (active_mode): Likewise.
13461 (framebuffer): Likewise.
13462 (bytes_per_scan_line): Likewise.
13463 (grub_video_vbe_adapter): Added new static variable.
13464 (framebuffer): Likewise.
13465 (render_target): Likewise.
13466 (initial_mode): Likewise.
13467 (mode_in_use): Likewise.
13468 (mode_list): Likewise.
13470 2006-03-10 Marco Gerards <marco@gnu.org>
13472 * configure.ac (AC_INIT): Bumped to 1.93.
13474 * DISTLIST: Added `include/grub/hfs.h'.
13476 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13478 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13479 18H, which might help the BIOS falling back to next boot media.
13481 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13483 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13484 Poe Chen <poe.poechen@gmail.com>.
13486 2006-01-17 Marco Gerards <marco@gnu.org>
13488 * include/grub/normal.h: Include <grub/script.h>.
13489 (grub_command_list): Removed struct.
13490 (grub_command_list_t): Removed type.
13491 (grub_menu_entry): Remove members `num' and `command_list'. Add
13492 members `commands' and `sourcecode'.
13493 * include/grub/script.h: Add inclusion guards.
13494 (grub_script_cmd_menuentry): New struct.
13495 (grub_script_execute_menuentry): New prototype.
13496 (grub_script_lexer_record_start): Likewise.
13497 (grub_script_lexer_record_stop): Likewise.
13498 * normal/execute.c (grub_script_execute_menuentry): New function.
13499 * normal/lexer.c (record, recording, recordpos, recordlen): New
13501 (grub_script_lexer_record_start): New function.
13502 (grub_script_lexer_record_stop): Likewise.
13503 (recordchar): Likewise.
13504 (nextchar): Likewise.
13505 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13506 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13507 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13508 (current_menu): New variable.
13509 (free_menu): Mainly rewritten.
13510 (grub_normal_menu_addentry): New function.
13511 (read_config_file): Rewritten.
13512 * normal/menu.c (run_menu_entry): Mainly rewritten.
13513 * normal/menu_entry.c (make_screen): Rewritten the code to insert
13515 (run): Mainly rewritten.
13516 * normal/parser.y (menu_entry): New variable.
13517 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13518 (menuentry): New rule.
13519 (command): Add `menuentry'.
13520 (if_statement): Allow additional returns before `fi'.
13521 * normal/script.c (grub_script_create_cmdmenu): New function.
13523 2006-01-03 Marco Gerards <marco@gnu.org>
13525 * INSTALL: GNU Bison is required.
13526 * configure.ac: Rewritten the test to detect Bison.
13527 * Makefile.in (YACC): New variable. Reported by Xun Sun
13528 <xun.sun.cn@gmail.com>.
13530 2006-01-03 Marco Gerards <marco@gnu.org>
13532 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13533 the HFS+ filesystem to filesystem blocks.
13534 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13535 GCC warning is silenced.
13537 2006-01-03 Marco Gerards <marco@gnu.org>
13539 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13540 read from disk from big endian to host byte order.
13542 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13544 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13546 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13547 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13548 embedded HFS+ filesystem.
13549 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13550 (grub_hfs_sblock): Move from here...
13551 * include/grub/hfs.h: To here... New file.
13552 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13554 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13556 (grub_hfsplus_volheader): Change type of member `magic' to
13558 (grub_hfsplus_data): Add new member `embedded_offset'.
13559 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13561 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13562 Calculate the offset.
13564 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13566 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13568 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13570 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13572 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13573 ENV->NAME is NULL after allocating ENV->VALUE.
13575 2005-12-25 Marco Gerards <marco@gnu.org>
13577 * kern/env.c (grub_env_set): Rewritten the error handling code.
13579 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13581 * geninit.sh: Made more robust, and more portable.
13583 2005-12-25 Marco Gerards <marco@gnu.org>
13585 Add support for Apple HFS+ filesystems.
13587 * fs/hfsplus.c: New file.
13589 * DISTLIST: Added `fs/hfsplus.c'.
13591 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13592 (hfsplus_mod_SOURCES): New variable.
13593 (hfsplus_mod_CFLAGS): Likewise.
13594 (hfsplus_mod_LDFLAGS): Likewise.
13595 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13596 (grub_setup_SOURCES): Likewise.
13597 (grub_mkdevicemap_SOURCES): Likewise.
13598 (grub_emu_SOURCES): Likewise.
13599 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13601 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13603 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13605 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13607 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13608 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13609 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13610 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13611 normal/lexer.c, normal/parser.y, normal/script.c, and
13613 Removed kern/sparc64/cache.c.
13615 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13616 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13619 * configure.ac (AC_INIT): Bumped to 1.92.
13621 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13623 * kern/err.c (grub_error_push): Added new function to support error
13625 (grub_error_pop): Likewise.
13626 (grub_error_stack_items): New local variable to support error stacks.
13627 (grub_error_stack_pos): Likewise.
13628 (grub_error_stack_assert): Likewise.
13629 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13631 (grub_print_error): Added support to print errors from error stack.
13633 * include/grub/err.h (grub_error_push): Added function prototype.
13634 (grub_error_pop): Likewise.
13636 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13638 * configure.ac: Accept `powerpc64' as host_cpu.
13639 (amd64): Rename to `biarch32'.
13641 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13642 non-cacheline-aligned addresses.
13644 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13645 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13646 if `size' is non-zero.
13648 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
13650 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13651 and `cd' to make sure the filename is not prefixed with a
13653 (pkgdata_MODULES): Add `gpt.mod'.
13654 (gpt_mod_SOURCES): New variable.
13655 (gpt_mod_CFLAGS): Likewise.
13656 (gpt_mod_LDFLAGS): Likewise.
13658 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13660 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13663 * partmap/gpt.c: New file.
13665 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13666 GPT partition map is detected.
13668 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13670 * commands/i386/pc/play.c: New file.
13671 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13672 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13675 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
13677 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13678 ((unused))' to silence gcc warning.
13680 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13682 * configure.ac: Correct `AC_PROG_YACC' test.
13684 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13686 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13687 check before installing files.
13689 2005-11-22 Mike Small <smallm@panix.com>
13691 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13692 number regex so multidigit numbers are recognized correctly.
13694 2005-11-22 Mike Small <smallm@panix.com>
13696 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13697 debugging message before attempting to claim memory.
13698 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13699 multiple addresses in case of failure.
13701 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13703 * term/tparm.c (get_space): Remove empty `if' statement.
13705 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13707 * kern/parser.c (check_varstate): Rename `state' to 's'.
13709 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13711 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13712 variable definitions to the beginning of each function. Sort stack
13714 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13715 `buf' argument to `char *'.
13717 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13719 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13720 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13721 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13722 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13723 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13724 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13725 configfile.mod, search.mod, gzio.mod and test.mod.
13726 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13727 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13728 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13729 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13730 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13731 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13732 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13733 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13734 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13735 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13736 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13737 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13738 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13739 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13740 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13741 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13742 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13743 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13744 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13745 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13746 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13747 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13748 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13750 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13752 (pkgdata_MODULES): Add test.mod.
13754 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13756 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13757 appending to variables with "+=".
13758 (PModule): Use full pathname to generate *.lst filenames.
13760 * Makefile.in: Fixed list rules moved from genmk.rb.
13761 (.DELETE_ON_ERROR): New special target.
13762 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13764 * conf/i386-pc.rmk: Include conf/common.mk.
13765 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13766 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13767 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13768 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13769 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13770 configfile.mod, search.mod, gzio.mod and test.mod.
13771 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13772 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13773 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13774 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13775 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13776 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13777 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13778 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13779 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13780 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13781 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13782 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13783 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13784 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13785 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13786 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13787 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13788 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13789 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13790 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13791 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13792 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13793 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13795 * conf/common.rmk: ... to here. New file.
13797 * conf/common.mk: New file.
13799 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13801 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13802 (grub_script.tab.c): ... here.
13804 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13805 (grub_script.tab.c): ... here.
13807 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13808 (grub_script.tab.c): ... here.
13810 * normal/command.c (grub_command_find): Fixed a memory leak of
13811 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13813 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13815 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13816 "@" which marks the start of a comment on ARM.
13817 (VARIABLE): Likewise.
13819 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13821 Add support for Linux/ADFS partition tables.
13823 * partmap/acorn.c: New file.
13825 * include/grub/acorn_filecore.h: Likewise.
13827 * DISTLIST: Added `partmap/acorn.c' and
13828 `include/grub/acorn_filecore.h'.
13830 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13832 (pkgdata_MODULES): Add `acorn.mod'.
13833 (acorn_mod_SOURCES): New variable.
13834 (acorn_mod_CFLAGS): Likewise.
13836 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13838 (pkgdata_MODULES): Add `acorn.mod'.
13839 (acorn_mod_SOURCES): New variable.
13840 (acorn_mod_CFLAGS): Likewise.
13842 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13843 (pkgdata_MODULES): Add `acorn.mod'.
13844 (acorn_mod_SOURCES): New variable.
13845 (acorn_mod_CFLAGS): Likewise.
13846 (acorn_mod_LDFLAGS): Likewise.
13848 * include/types.h (grub_disk_addr_t): New typedef.
13850 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
13852 * geninit.sh: New file.
13854 * geninitheader.sh: Likewise.
13856 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13857 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13858 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13859 * commands/configfile.c (grub_configfile_init)
13860 (grub_configfile_fini): Likewise.
13861 * commands/default.c (grub_default_init, grub_default_fini):
13863 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13864 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13865 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13866 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13868 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13869 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13871 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13872 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13874 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13876 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13878 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13879 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13880 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13881 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13882 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13883 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13884 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13885 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13886 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13887 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13888 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13889 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13890 * partmap/amiga.c (grub_amiga_partition_map_init)
13891 (grub_amiga_partition_map_fini): Likewise.
13892 * partmap/apple.c (grub_apple_partition_map_init)
13893 (grub_apple_partition_map_fini): Likewise.
13894 * partmap/pc.c (grub_pc_partition_map_init)
13895 (grub_pc_partition_map_fini): Likewise.
13896 * partmap/sun.c (grub_sun_partition_map_init,
13897 grub_sun_partition_map_fini): Likewise.
13898 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13901 * util/grub-emu.c: Include <grub_modules_init.h>.
13902 (main): Don't initialize and de-initialize any modules directly,
13903 use `grub_init_all' and `grub_fini_all' instead.
13905 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13906 `grub_vesafb_mod_init'.
13907 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13909 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13910 `grub_vga_mod_init'. Updated all users.
13911 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13913 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13914 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13917 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13918 Generate a function to initialize the module in utilities.
13919 Updated all callers.
13920 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13921 initialize the module in utilities. Updated all callers.
13923 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13925 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13926 escape sequence and a literal ^L to clear the screen.
13928 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13929 when returning from Open Firmware.
13931 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13933 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13934 (grub_ofconsole_height): Likewise.
13935 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13936 manually insert a '\n'.
13937 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13938 `grub_ofconsole_height'. Return early if these are already set.
13940 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13942 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13943 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13944 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13945 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13946 and `normal/script.c'.
13947 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13948 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13949 (test_mod_SOURCES): New variable.
13950 (test_mod_CFLAGS): Likewise.
13951 (test_mod_LDFLAGS): Likewise.
13952 (pkgdata_MODULES): Add `test.mod'.
13953 (grub_script.tab.c): New rule.
13954 (grub_script.tab.h): Likewise.
13956 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
13958 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13959 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13960 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13961 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13962 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13963 (test_mod_SOURCES): New variable.
13964 (test_mod_CFLAGS): Likewise.
13965 (pkgdata_MODULES): Add `test.mod'.
13966 (grub_script.tab.c): New rule.
13967 (grub_script.tab.h): Likewise.
13969 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
13971 Add initial scripting support.
13973 * commands/test.c: New file.
13974 * include/grub/script.h: Likewise.
13975 * normal/execute.c: Likewise.
13976 * normal/function.c: Likewise.
13977 * normal/lexer.c: Likewise.
13978 * normal/parser.y: Likewise.
13979 * normal/script.c: Likewise.
13981 * configure.ac: Add `AC_PROG_YACC' test.
13983 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13984 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13985 `normal/function.c' and `normal/script.c'.
13986 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13987 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13988 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13990 (pkgdata_MODULES): Add `test.mod'.
13991 (grub_script.tab.c): New rule.
13992 (grub_script.tab.h): Likewise.
13994 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13996 * include/grub/normal.h (grub_test_init): New prototype.
13997 (grub_test_fini): Likewise.
13999 * normal/command.c: Include <grub/script.h>.
14000 (grub_command_execute): Rewritten.
14002 * util/grub-emu.c (main): Call `grub_test_init' and
14005 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14007 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14009 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14010 there are no pending characters.
14012 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14014 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14015 `grub_strndup' to drop device arguments. Replace unnecessary
14016 `grub_strndup' with `grub_strdup'.
14018 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14020 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14021 `debug' environment variable has been set.
14023 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
14025 * Makefile.in (install-local): Use $(DATA).
14026 (uninstall): Likewise.
14027 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14028 (sbin_UTILITIES): ... to here.
14029 (sbin_SCRIPTS): New variable.
14030 (grub_install_SOURCES): New variable.
14031 * util/powerpc/ieee1275/grub-install.in: New file.
14032 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14034 (add_segments): Call `grub_util_get_path'.
14036 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14038 From Timothy Baldwin:
14039 * commands/ls.c (grub_ls_list_files): Close FILE with
14041 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14043 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
14045 * include/grub/parser.h: New file.
14047 * kern/parser.c: Likewise.
14049 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14050 (grub_setup_SOURCES): Likewise.
14051 (grub_probefs_SOURCES): Likewise.
14052 (grub_emu_SOURCES): Likewise.
14053 (kernel_img_HEADERS): Add `parser.h'.
14055 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14056 (grub_emu_SOURCES): Add `kern/parser.c'.
14057 (grubof_SOURCES): Likewise.
14059 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14060 (grubof_SOURCES): Add `kern/parser.c'.
14062 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14064 * kern/misc.c (grub_split_cmdline): Removed function.
14066 * kern/rescue.c: Include <grub/parser.h>.
14067 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14068 of `grub_split_cmdline'.
14070 * normal/command.c: Include <grub/parser.h>.
14071 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14072 of `grub_split_cmdline'.
14074 * normal/completion.c: Include <grub/parser.h>.
14075 (cmdline_state): New variable.
14076 (iterate_dir): End the filename with a quote depending on the
14077 command line state.
14078 (get_state): new function.
14079 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14080 split the arguments and determine the current argument. When the
14081 argument string is not quoted, escape all spaces.
14083 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14085 * normal/sparc64/setjmp.S: New file.
14087 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14089 * include/grub/sparc64/libgcc.h: New file.
14090 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14091 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14092 normal/sparc64/setjmp.c.
14094 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14096 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14097 * kern/sparc64/cache.S: New file.
14098 * kern/sparc64/cache.c: Removed.
14099 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14100 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14102 (COMMON_LDFLAGS): Add -melf64_sparc.
14103 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14104 (grubof_SOURCES): Use cache.S instead of cache.c.
14105 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14106 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14107 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14109 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14110 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14111 (linux_mod_CFLAGS): Commented out.
14112 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14113 out because module isn't built.
14114 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14115 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14116 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14117 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14118 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14119 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14120 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14121 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14122 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14123 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14124 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14125 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14126 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14127 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14129 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14131 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14132 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14133 longer, because HFS should not be used on PC.
14135 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14137 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14138 consistently within the loop.
14140 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
14142 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14143 directory can not be read.
14145 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14147 * configure.ac (AC_INIT): Increase the version number to 1.91.
14149 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14150 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14151 term/i386/pc/serial.c.
14153 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14155 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14156 file size must be permitted.
14158 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14159 between %ah and %al.
14161 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14163 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14165 Call the hook with a NUL-terminated filename.
14166 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14169 * kern/term.c (cursor_state): New variable.
14170 (grub_term_set_current): Reset the cursor state on a new
14172 (grub_setcursor): Rewritten to use CURSOR_STATE.
14173 (grub_getcursor): New function.
14175 * include/grub/term.h (grub_getcursor): New prototype.
14177 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14178 integers on ARM. Reported by Timothy Baldwin
14179 <T.E.Baldwin99@members.leeds.ac.uk>.
14181 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
14183 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14185 (grub_sfs_dir): Likewise.
14187 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
14189 Add support for the SFS filesystem.
14191 * fs/sfs.c: New file.
14193 * DISTLIST: Added `fs/sfs.c'.
14195 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14196 (grub_probefs_SOURCES): Likewise.
14197 (grub_emu_SOURCES): Likewise.
14198 (pkgdata_MODULES): Add `sfs.mod'.
14199 (sfs_mod_SOURCES): New variable.
14200 (sfs_mod_CFLAGS): Likewise.
14201 (sfs_mod_LDFLAGS): Likewise.
14203 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14204 (pkgdata_MODULES): Add `sfs.mod'.
14205 (sfs_mod_SOURCES): New variable.
14206 (sfs_mod_CFLAGS): Likewise.
14208 * util/grub-emu.c (main): Call `grub_sfs_init' and
14211 * include/grub/fs.h (grub_sfs_init): New prototype.
14212 (grub_sfs_fini): Likewise.
14214 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
14216 Add support for the AFFS filesystem.
14218 * fs/affs.c: New file.
14220 * DISTLIST: Added `fs/affs.c'.
14222 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14223 (grub_probefs_SOURCES): Likewise.
14224 (grub_emu_SOURCES): Likewise.
14225 (pkgdata_MODULES): Add `affs.mod'.
14226 (affs_mod_SOURCES): New variable.
14227 (affs_mod_CFLAGS): Likewise.
14228 (affs_mod_LDFLAGS): Likewise.
14230 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14231 (pkgdata_MODULES): Add `affs.mod'.
14232 (affs_mod_SOURCES): New variable.
14233 (affs_mod_CFLAGS): Likewise.
14235 * util/grub-emu.c (main): Call `grub_affs_init' and
14238 * include/grub/fs.h (grub_affs_init): New prototype.
14239 (grub_affs_fini): Likewise.
14241 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14243 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14245 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14247 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14250 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14253 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14254 (COMMON_LDFLAGS): New variable.
14255 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14256 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14257 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14258 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14259 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14260 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14261 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14262 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14263 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14264 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14265 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14266 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14267 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14268 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14269 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14271 (normal_mod_ASFLAGS): Add `-m32'.
14273 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14274 (grub_host_size_t, grub_host_ssize_t): New types.
14275 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14276 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14277 `GRUB_HOST_SIZEOF_VOID_P'.
14279 * include/grub/kernel.h (struct grub_module_header): Type of
14280 member offset changed to `grub_host_off_t'. Type of member size
14281 changed to `grub_host_size_t'.
14282 (struct grub_module_info): Type of member offset changed to
14283 `grub_host_off_t'. Type of member size changed to
14284 `grub_host_size_t'.
14286 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14288 Make GRUB's kernel compliant to Multiboot Specification.
14290 * kern/i386/pc/startup.S (multiboot_header): New label.
14291 (multiboot_entry): Likewise.
14292 (multiboot_trampoline): Likewise.
14294 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14295 Increased to 0x4A0.
14297 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14298 put parentheses after a question mark.
14299 [!GRUB_UTIL] (my_mod): New variable.
14301 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14303 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
14305 Adds support for the XFS filesystem. Btrees are not supported
14308 * fs/xfs.c: New file.
14310 * DISTLIST: Added `fs/xfs.c'.
14312 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14313 (grub_probefs_SOURCES): Likewise.
14314 (grub_emu_SOURCES): Likewise.
14315 (pkgdata_MODULES): Add `xfs.mod'.
14316 (xfs_mod_SOURCES): New variable.
14317 (xfs_mod_CFLAGS): Likewise.
14319 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14320 (pkgdata_MODULES): Add `xfs.mod'.
14321 (xfs_mod_SOURCES): New variable.
14322 (xfs_mod_CFLAGS): Likewise.
14324 * util/grub-emu.c (main): Call `grub_xfs_init' and
14327 * include/grub/fs.h (grub_xfs_init): New prototype.
14328 (grub_xfs_fini): Likewise.
14331 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14333 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14334 color modes, allow greater than 16 colors to be configured as
14337 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14339 * normal/completion.c (complete_arguments): Add the qualifier
14340 const into OPTIONS.
14342 From Omniflux <omniflux+lists@omniflux.com>:
14343 * include/grub/terminfo.h: New file.
14344 * include/grub/tparm.h: Likewise.
14345 * include/grub/i386/pc/serial.h: Likewise.
14346 * term/terminfo.c: Likewise.
14347 * term/tparm.c: Likewise.
14348 * term/i386/pc/serial.c: Likewise.
14349 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14351 (terminfo_mod_SOURCES): New variable.
14352 (terminfo_mod_CFLAGS): Likewise.
14353 (serial_mod_SOURCES): Likewise.
14354 (serial_mod_CFLAGS): Likewise.
14356 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14358 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14359 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14360 and kern/powerpc/ieee1275/cmain.c, respectively.
14362 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14363 * kern/powerpc/ieee1275/crt0.S: ... here.
14365 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14366 * kern/powerpc/ieee1275/cmain.c: ... here.
14368 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14369 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14370 instead of boot/powerpc/ieee1275/crt0.S and
14371 boot/powerpc/ieee1275/cmain.c, respectively.
14373 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14374 sectors. It was not used anyway.
14376 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14378 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14379 `unused parameter' warning.
14381 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14383 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14385 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14388 2005-08-28 Marco Gerards <metgerards@student.han.nl>
14390 * include/grub/normal.h (enum grub_completion_type): Added
14391 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14393 * normal/cmdline.c (print_completion): Handle
14394 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14395 * normal/menu_entry.c (store_completion): Likewise.
14397 * normal/completion.c (complete_arguments): New function.
14398 (grub_normal_do_completion): Call `complete_arguments' when the
14399 current words start with a dash.
14401 2005-08-27 Marco Gerards <metgerards@student.han.nl>
14403 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14404 `gzio.mod' instead of `io.mod').
14406 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14408 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14409 (DISTDIRS): Added io and video.
14410 Rewrite the search routine to make an output consistently.
14412 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14413 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14414 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14415 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14416 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14417 util/powerpc/ieee1275/misc.c.
14419 * include/grub/gzio.h: New file.
14420 * io/gzio.c: Likewise.
14422 * kern/file.c (grub_file_close): Call grub_device_close only if
14423 FILE->DEVICE is not NULL.
14425 * include/grub/mm.h [!NULL] (NULL): New macro.
14427 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14429 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14430 (pkgdata_MODULES): Added gzio.mod.
14431 (gzio_mod_SOURCES): New variable.
14432 (gzio_mod_CFLAGS): Likewise.
14434 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14435 (pkgdata_MODULES): Added gzio.mod.
14436 (gzio_mod_SOURCES): New variable.
14437 (gzio_mod_CFLAGS): Likewise.
14439 * commands/cat.c: Include grub/gzio.h.
14440 (grub_cmd_cat): Use grub_gzfile_open instead of
14443 * commands/cmp.c: Include grub/gzio.h.
14444 (grub_cmd_cmp): Use grub_gzfile_open instead of
14447 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14448 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14450 (grub_rescue_cmd_module): Likewise.
14452 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14454 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14455 kern/sparc64/ieee1275/init.c because it contains _start.
14456 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14458 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14460 * configure.ac: Add support for sparc64 host with ieee1275
14462 * configure: Generated from configure.ac.
14463 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14465 (grub_ofdisk_read): Likewise.
14466 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14467 pointers as (void *) to remove a warning.
14468 (grub_ofdisk_close): Likewise.
14469 (grub_ofdisk_read): Likewise.
14470 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14471 returns, so make it return void to remove a warning.
14472 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14473 Corresponding prototype change.
14474 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14475 values, and cast the pointers as (void *) to remove a warning.
14476 (grub_mm_dump): Likewise.
14477 * conf/sparc64-ieee1275.mk: New file.
14478 * conf/sparc64-ieee1275.rmk: Likewise.
14479 * include/grub/sparc64/setjmp.h: Likewise.
14480 * include/grub/sparc64/types.h: Likewise.
14481 * include/grub/sparc64/ieee1275/console.h: Likewise.
14482 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14483 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14484 * include/grub/sparc64/ieee1275/time.h: Likewise.
14485 * kern/sparc64/cache.c: Likewise.
14486 * kern/sparc64/dl.c: Likewise.
14487 * kern/sparc64/ieee1275/init.c: Likewise.
14488 * kern/sparc64/ieee1275/openfw.c: Likewise.
14490 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14492 * util/console.c (grub_ncurses_putchar): If C is greater than
14493 0x7f, set C to a question mark.
14494 (grub_ncurses_getcharwidth): New function.
14495 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14498 * normal/menu.c (print_entry): Made aware of Unicode. First,
14499 convert TITLE to UCS-4, and predict the cursor position by
14502 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14504 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14506 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14508 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14509 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14512 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14513 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14514 grub_strcpy and grub_strlen. Take it into account that a space
14515 character is inserted as a delimiter.
14517 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14519 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14520 invalid magic in the error.
14522 * commands/search.c: New file.
14524 * util/grub-emu.c (main): Call grub_search_init and
14527 * kern/rescue.c (grub_rescue_print_disks): Removed.
14528 (grub_rescue_print_devices): New function.
14529 (grub_rescue_cmd_ls): Use grub_device_iterate with
14530 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14531 grub_rescue_print_disks.
14533 * kern/partition.c (grub_partition_iterate): Return the result of
14534 PARTMAP->ITERATE instead of GRUB_ERRNO.
14536 * kern/device.c: Include grub/partition.h.
14537 (grub_device_iterate): New function.
14539 * include/grub/partition.h (grub_partition_iterate): Return int
14540 instead of grub_err_t.
14542 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14544 [GRUB_UTIL] (grub_search_fini): Likewise.
14546 * include/grub/device.h (grub_device_iterate): New prototype.
14548 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14550 (pkgdata_MODULES): Added search.mod.
14551 (search_mod_SOURCES): New variable.
14552 (search_mod_CFLAGS): Likewise.
14554 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14555 (pkgdata_MODULES): Added search.mod.
14556 (search_mod_SOURCES): New variable.
14557 (search_mod_CFLAGS): Likewise.
14559 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14560 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14561 All callers changed.
14563 * DISTLIST: Added commands/search.c.
14565 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14567 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14569 (grub_getcharwidth): New function.
14571 * kern/misc.c (grub_utf8_to_ucs4): New function.
14573 * include/grub/term.h (struct grub_term): Added a new member
14575 (grub_getcharwidth): New prototype.
14577 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14579 * term/i386/pc/console.c (map_char): New function. Segregated from
14580 grub_console_putchar.
14581 (grub_console_putchar): Use map_char.
14582 (grub_console_getcharwidth): New function.
14583 (grub_console_term): Specified grub_console_getcharwidth as
14586 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14587 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14589 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14591 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14592 on grub_strtoul completely.
14593 (write_char): Declare local variables in the beginning of the
14595 (grub_vesafb_getcharwidth): New function.
14596 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14599 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14601 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14602 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14603 commands/i386/pc/vbetest.c.
14605 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14606 call grub_vbe_get_controller_info again, because the returned
14607 information is volatile.
14608 (grub_vbe_set_video_mode): Mostly rewritten.
14609 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14610 grub_vbe_status_t correctly.
14611 (grub_vbe_get_video_mode_info): Likewise.
14612 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14613 several if statements.
14615 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14616 * commands/i386/pc/vbeinfo.c: ... this.
14618 * commands/i386/pc/vbe_test.c: Renamed to ...
14619 * commands/i386/pc/vbetest.c: ... this.
14621 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14623 (grub_cmd_vbeinfo): ... this. Save video modes before
14624 iterating. Skip a video mode, if it is not available, not enough
14625 information is given or it is monochrome. Show the memory
14626 model. Leave the interpretation of MODEVAR to grub_strtoul
14628 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14629 (GRUB_MOD_FINI): Likewise.
14631 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14632 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14633 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14634 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14635 grub_strtoul completely.
14636 (real2pm): Removed.
14637 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14638 (GRUB_MOD_FINI): Likewise.
14640 * normal/misc.c: Include grub/mm.h.
14642 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14643 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14644 (vbe_list_modes_mod_SOURCES): Removed.
14645 (vbe_list_modes_mod_CFLAGS): Likewise.
14646 (vbe_test_mod_SOURCES): Likewise.
14647 (vbe_test_mod_CFLAGS): Likewise.
14648 (vbeinfo_mod_SOURCES): New variable.
14649 (vbeinfo_mod_CFLAGS): Likewise.
14650 (vbetest_mod_SOURCES): Likewise.
14651 (vbetest_mod_CFLAGS): Likewise.
14653 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14655 * normal/misc.c: New file.
14657 * DISTLIST: Added normal/misc.c.
14659 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14660 DISK to HOOK. Call HOOK with DISK.
14661 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14662 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14663 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14665 * normal/menu_entry.c (struct screen): Added a new member
14666 "completion_shown".
14667 (completion_buffer): New global variable.
14668 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14669 (store_completion): New function.
14670 (complete): Likewise.
14671 (clear_completions): Likewise.
14672 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14673 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14674 a tab, call complete.
14676 * normal/completion.c (disk_dev): Removed.
14677 (print_simple_completion): Likewise.
14678 (print_partition_completion): Likewise.
14679 (print_func): New global variable.
14680 (add_completion): Do not take the arguments WHAT or PRINT any
14681 longer. Added a new argument TYPE. Instead of printing directly,
14682 call PRINT_FUNC if not NULL.
14683 All callers changed.
14684 (complete_device): Use a local variable DEV instead of
14685 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14686 (grub_normal_do_completion): Take a new argument HOOK. Do not
14687 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14688 empty string, return NULL instead.
14689 All callers changed.
14691 * normal/cmdline.c (print_completion): New function.
14693 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14695 All callers changed.
14697 * kern/disk.c (grub_print_partinfo): Removed.
14699 * include/grub/partition.h (struct grub_partition_map): Add a new
14700 argument DISK into HOOK of ITERATE.
14701 (grub_partition_iterate): Add a new argument DISK to HOOK.
14703 * include/grub/normal.h (enum grub_completion_type): New enum.
14704 (grub_completion_type_t): New type.
14705 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14706 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14707 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14708 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14709 (grub_normal_do_completion): Added a new argument HOOK.
14710 (grub_normal_print_device_info): New prototype.
14712 * include/grub/disk.h (grub_print_partinfo): Removed.
14714 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14715 (normal_mod_SOURCES): Likewise.
14716 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14717 (normal_mod_SOURCES): Likewise.
14719 * commands/ls.c (grub_ls_list_disks): Use
14720 grub_normal_print_device_info instead of grub_print_partinfo. Free
14722 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14723 duplicating the code.
14725 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14727 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14728 follow GCS more precisely.
14729 * commands/i386/pc/vbe_test.c: Likewise.
14730 * include/grub/i386/pc/vbe.h: Likewise.
14731 * term/i386/pc/vesafb.c: Likewise.
14732 * video/i386/pc/vbe.c: Likewise.
14734 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14736 * DISTLIST: Added term/i386/pc/vesafb.c
14737 DISTLIST: Added video/i386/pc/vbe.c
14738 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14739 DISTLIST: Added commands/i386/pc/vbe_test.c.
14740 * commands/i386/pc/vbe_list_modes.c: New file.
14741 * commands/i386/pc/vbe_test.c: Likewise.
14742 * term/i386/pc/vesafb.c: Likewise.
14743 * video/i386/pc/vbe.c: Likewise.
14744 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14745 (grub_vbe_probe) Added prototype.
14746 (grub_vbe_set_video_mode) Likewise.
14747 (grub_vbe_get_video_mode) Likewise.
14748 (grub_vbe_get_video_mode_info) Likewise.
14749 (grub_vbe_set_pixel_rgb) Likewise.
14750 (grub_vbe_set_pixel_index) Likewise.
14751 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14752 (pkgdata_MODULES): Added vesafb.mod.
14753 (pkgdata_MODULES): Added vbe_list_modes.mod.
14754 (pkgdata_MODULES): Added vbe_test.mod.
14755 (vbe_mod_SOURCES): Added.
14756 (vbe_mod_CFLAGS): Likewise.
14757 (vesafb_mod_SOURCES): Likewise.
14758 (vesafb_mod_CFLAGS): Likewise.
14759 (vbe_list_modes_mod_SOURCES): Likewise.
14760 (vbe_list_modes_mod_CFLAGS): Likewise.
14761 (vbe_test_mod_SOURCES): Likewise.
14762 (vbe_test_mod_CFLAGS): Likewise.
14764 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14766 * normal/command.c (grub_command_execute): If INTERACTIVE is
14767 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14768 CMDLINE. Disable the pager if INTERACTIVE is true.
14769 All callers are changed.
14771 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14772 before reading a config file.
14773 * normal/main.c (read_config_file): Even if a command is not
14774 found, register it if it is within an entry.
14776 * util/grub-emu.c: Include sys/types.h and unistd.h.
14777 (options): Added --hold.
14778 (struct arguments): Added a new member "hold".
14779 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14781 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14782 cleared by a debugger, if it is not zero.
14784 * include/grub/normal.h (grub_command_execute): Add an argument
14787 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14789 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14791 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14793 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14794 program with another one, because the old one didn't detect a bug
14795 in gcc-3.4. Always use regparm 2, because the new test is still
14796 not enough for gcc-4.0. Someone must investigate a simple test
14797 case which detects a bug in gcc-4.0.
14799 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14801 * DISTLIST: Added normal/completion.c.
14803 * normal/completion.c: New file.
14805 * term/i386/pc/console.c (grub_console_getwh): New function.
14806 (grub_console_term): Assign grub_console_getwh to getwh.
14808 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14809 function is defined in normal/completion.c as
14810 grub_normal_do_completion.
14811 (grub_cmdline_get): Use grub_normal_do_completion instead of
14814 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14815 returns non-zero, otherwise return 0.
14816 (grub_partition_iterate): First, probe the partition map. Then,
14817 call ITERATE only for this partition map.
14819 * kern/misc.c (grub_strncmp): Rewritten.
14821 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14822 returns non-zero. Otherwise return 0.
14824 * include/grub/partition.h (grub_partition_map_iterate): Return
14825 int instead of void.
14827 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14829 * include/grub/misc.h (grub_strncmp): Change the type of N to
14832 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14835 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14836 unsigned explicitly before comparing it with I.
14838 * kern/main.c (grub_env_write_root): Add the attribute unused into
14841 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14842 normal/completion.c.
14843 (normal_mod_SOURCES): Likewise.
14844 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14845 (normal_mod_SOURCES): Likewise.
14847 * normal/command.c (grub_iterate_commands): If ITERATE returns
14848 non-zero, return one immediately.
14850 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
14852 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14853 * kern/i386/pc/startup.S: Updated Global Descriptor table's
14855 (grub_vbe_get_controller_info): New function.
14856 (grub_vbe_get_mode_info): Likewise.
14857 (grub_vbe_set_mode): Likewise.
14858 (grub_vbe_get_mode): Likewise.
14859 (grub_vbe_set_memory_window): Likewise.
14860 (grub_vbe_get_memory_window): Likewise.
14861 (grub_vbe_set_scanline_length): Likewise.
14862 (grub_vbe_get_scanline_length): Likewise.
14863 (grub_vbe_set_display_start): Likewise.
14864 (grub_vbe_get_display_start): Likewise.
14865 (grub_vbe_set_palette_data): Likewise.
14866 * include/grub/i386/pc/vbe.h: New file.
14868 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14870 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14871 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14872 * DISTLIST: Likewise.
14873 * kern/ieee1275/of.c: Moved to ...
14874 * kern/ieee1275/ieee1275.c: ... here.
14876 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14878 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14879 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14880 Pass 0 as `end' parameter to grub_strtoul().
14882 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14884 * include/grub/powerpc/ieee1275/console.h: Do not include
14885 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
14887 (grub_console_cur_color): Remove i386-specific prototype.
14888 (grub_console_real_putchar): Likewise.
14889 (grub_console_checkkey): Likewise.
14890 (grub_console_getkey): Likewise.
14891 (grub_console_getxy): Likewise.
14892 (grub_console_gotoxy): Likewise.
14893 (grub_console_cls): Likewise.
14894 (grub_console_setcursor): Likewise.
14895 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14896 Include <grub/machine/console.h>.
14897 * term/ieee1275/ofconsole.c: Likewise.
14899 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
14901 * Makefile.in (LIBLZO): New variable.
14903 * configure.ac: Check for LZO version 2.
14905 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14906 lzo/lzo1x.h instead of lzo1x.h.
14908 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14911 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14912 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14914 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14915 copying the data from PARTITION to P.
14917 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14919 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14920 negative, unload the module.
14922 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14923 map is "pc_partition_map" but not "pc".
14924 (usage): Fix the description. The options are --boot-image and
14925 --core-image but not --boot-file or --core-file.
14926 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14927 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14930 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14931 --core-file. Specify INSTALL_DEVICE as an argument.
14933 * util/console.c: Include config.h.
14934 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14935 [HAVE_NCURSES_H]: Include ncurses.h.
14936 [HAVE_CURSES_H]: Include curses.h.
14937 [!A_NORMAL] (A_NORMAL): Defined as zero.
14938 [!A_STANDOUT] (A_STANDOUT): Likewise.
14940 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14942 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14944 * configure.ac: Check for curses libraries and headers.
14946 * Makefile.in (LIBCURSES): New variable.
14948 * genmk.rb (Script::rule): Set the executable bits.
14950 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14951 name of the PC partition map is "pc_partition_map" but not "pc".
14953 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14955 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14956 (modules): Likewise.
14957 (usage): Added descriptions for --modules and --grub-probefs.
14958 Handle --modules and --grub-probefs. Save the arguments in MODULES
14959 and GRUB_PROBEFS, respectively.
14960 Auto-detect a filesystem module against GRUBDIR. If the result is
14961 empty and modules are not specified explicitly, abort the
14962 installation. Add the result to MODULES.
14964 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14965 disk/powerpc/ieee1275/ofdisk.c,
14966 include/grub/powerpc/ieee1275/init.h and
14967 term/powerpc/ieee1275/ofconsole.c.
14968 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14969 term/ieee1275/ofconsole.c.
14971 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14973 * COPYING: Upgraded to the latest version. Only the address of the
14974 FSF office has changed.
14976 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14978 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14979 kern/ieee1275.c with kern/ieee1275/of.c.
14981 * kern/ieee1275.c: Moved to ...
14982 * kern/ieee1275/of.c: ... here.
14984 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14986 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14989 * config.guess: Updated to the latest version from gnulib.
14990 * config.sub: Likewise.
14991 * install.sh: Likewise.
14992 * mkinstalldirs: Likewise.
14994 * include/grub/console.h: Removed. This file is arch-specific. Do
14995 not put this in include/grub.
14997 * include/grub/i386/pc/console.h: Resurrected.
14999 * util/console.c: Include grub/machine/console.h instead of
15001 * util/grub-emu.c: Likewise.
15003 2005-08-04 Marco Gerards <metgerards@student.han.nl>
15005 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15008 From Vincent Pelletier <subdino2004@yahoo.fr>
15009 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15010 Redefined to use grub_getwh.
15011 (grub_term): New member named getwh.
15012 (grub_getwh): New prototype.
15013 * kern/term.c (grub_getwh): New function.
15014 * term/i386/pc/console.c (grub_console_getwh): New function.
15015 (grub_console_term): New member `getwh'.
15016 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15017 (grub_vga_term): New member `getwh'.
15018 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15020 (grub_ofconsole_getw): New function.
15021 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15022 (grub_ofconsole_term): New field named getwh and new initial
15025 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15027 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15028 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15029 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15030 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15031 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15032 of <grub/machine/ieee1275.h>.
15033 * commands/ieee1275/reboot.c: Likewise.
15034 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15035 * kern/ieee1275.c: ... to here. All users updated. Change all
15036 parameter structs to use new type `grub_ieee1275_cell_t'.
15037 * term/powerpc/ieee1275/ofconsole.c: Move ...
15038 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15039 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15040 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15041 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15043 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15044 Remove unused prototypes. All users updated.
15045 * include/grub/powerpc/ieee1275/console.h: Removed.
15046 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15047 `grub_ieee1275_cell_t'.
15048 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15049 Cast comparisons with -1 to the correct type.
15050 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15051 type to match `grub_ieee1275_entry_fn'.
15053 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15055 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15057 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15058 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15060 (grub_probefs_SOURCES): New variable.
15062 * util/i386/pc/grub-probefs.c: New file.
15064 * util/i386/pc/grub-setup.c (main): Call
15065 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15066 grub_hfs_init and grub_jfs_init to initialize the system. Call
15067 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15068 grub_pc_partition_map_fini to finish the system.
15070 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15072 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15074 (grub_multiboot_load_elf32): Likewise.
15075 (grub_multiboot_is_elf64): Likewise.
15076 (grub_multiboot_load_elf64): Likewise.
15077 (grub_multiboot_load_elf): Likewise.
15078 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15079 an ELF32 or ELF64 file.
15080 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15082 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15083 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15084 NULL before calling FS->LABEL.
15085 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15086 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15087 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15088 before calling FS->LABEL.
15090 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15092 * util/i386/pc/grub-install.in (datadir): New variable.
15094 (pkgdatadir): New variable.
15095 (pkglibdir): Removed.
15097 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15099 * DISTLIST: Added util/i386/pc/grub-install.in.
15101 * util/i386/pc/grub-install.in: New file.
15103 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15104 (grub_install_SOURCES): Likewise.
15106 * genmk.rb: Added support for scripts.
15107 (Script): New class.
15108 (scripts): New variable.
15110 * Makefile.in (install-local): Install sbin_SCRIPTS by
15112 (uninstall): Remove sbin_SCRIPTS.
15114 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15115 device, try to get a GRUB device by
15116 grub_util_biosdisk_get_grub_dev.
15119 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15120 description for --device-map.
15122 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15124 Change the semantics of variable hooks. They now return strings
15125 instead of error values.
15127 * util/i386/pc/grub-setup.c: Include grub/env.h.
15128 (setup): Use grub_device_set_root instead of grub_env_set.
15130 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15131 grub_env_get instead of grub_device_set_root and
15132 grub_device_get_root, respectively.
15134 * kern/main.c (grub_env_write_root): New function.
15135 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15136 grub_env_set instead of grub_device_set_root.
15138 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15140 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15141 rather than calling ENV->WRITE_HOOK afterwards.
15142 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15143 passing a pointer of a pointer.
15144 (grub_register_variable_hook): Change the types of "read_hook" and
15145 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15147 Allocate the default empty string on the heap, because this string
15148 may be freed later.
15150 * kern/device.c: Include grub/env.h.
15151 (grub_device_set_root): Removed.
15152 (grub_device_get_root): Likewise.
15153 (grub_device_open): Use grub_env_get instead of
15154 grub_device_get_root.
15156 * include/grub/env.h (grub_env_read_hook_t): New type.
15157 (grub_env_write_hook_t): Likewise.
15158 (grub_env_var): Change the types of "read_hook" and "write_hook"
15159 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15160 (grub_register_variable_hook): Likewise.
15162 * include/grub/device.h (grub_device_set_root): Removed.
15163 (grub_device_set_root): Likewise.
15165 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15166 make sure that DIRNAME terminates with '/', so that
15167 grub_fat_find_dir will fail if PATH is not a directory.
15169 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15171 Use the qualifier auto for print_files and print_files_long.
15172 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15174 Put a newline only if there is no error.
15175 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15178 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15180 * kern/partition.c (grub_partition_probe): Initialize PART to
15181 NULL. Otherwise, when no partition map is registered, this returns
15184 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15186 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15187 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15190 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15192 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15193 information on each device, if it does not have partitions. Print
15194 "Device" instead of "Disk", because this function is not specific
15197 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15198 static to ensure that it is put on the memory rather than a
15201 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15203 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15204 (grub_cat_init): Likewise.
15205 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15206 (options): Likewise.
15207 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15208 (grub_configfile_init): Likewise.
15209 * font/manager.c (GRUB_MOD_INIT): Likewise.
15210 * commands/help.c (GRUB_MOD_INIT): Likewise.
15211 (grub_help_init): Likewise.
15212 * normal/command.c (grub_command_init): Likewise.
15213 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15214 * disk/loopback.c (grub_loop_init): Likewise.
15215 (GRUB_MOD_INIT): Likewise.
15216 * commands/ls.c (grub_ls_init): Likewise.
15217 (GRUB_MOD_INIT): Likewise.
15218 (options): Likewise.
15219 * commands/boot.c (grub_boot_init): Likewise.
15220 (GRUB_MOD_INIT): Likewise.
15221 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15222 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15223 (GRUB_MOD_INIT): Likewise.
15224 * commands/cmp.c (grub_cmp_init): Likewise.
15225 (GRUB_MOD_INIT): Likewise.
15227 * normal/arg.c: Use <> instead of "" to include header files.
15228 (SHORT_ARG_HELP): New macro.
15229 (SHORT_ARG_USAGE): Likewise.
15230 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15231 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15233 (find_short): Check if C is 'h' or 'u' explicitly.
15234 (grub_arg_show_help): Use space characters instead of tabs. Treat
15235 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15236 are shown with --help and --usage only if they are not used for
15237 the command itself.
15238 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15241 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15242 const into "longarg". Change the type of "shortarg" to int.
15244 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15246 * boot/i386/pc/boot.S (boot_drive_check): New label.
15248 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15251 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15252 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15254 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15256 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15257 When turning off Gate A20, skip the check and return immediately,
15258 because this is not fatal usually.
15260 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15262 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15263 be 0x7C00 instead of 0x8000.
15265 * boot/i386/pc/pxeboot.S: Rewritten.
15267 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15269 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15272 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15274 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15275 robustness. This routine now supports a BIOS call and System
15276 Control Port A to modify the gate A20.
15278 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15279 Increased to 0x440.
15281 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15283 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15284 device path and resulting ihandle.
15285 (grub_ofdisk_close): dprintf the ihandle being closed.
15286 (grub_ofdisk_read): dprintf function parameters.
15287 * kern/mm.c (grub_mm_init_region): Likewise.
15288 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15289 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15290 size, and boot arguments.
15291 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15292 before loading into memory.
15293 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15294 before loading into memory.
15296 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15298 * kern/mm.c: Added much documentation.
15299 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15300 8, set to 5 instead of 8.
15302 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15304 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15306 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15307 (grub_mkdevicemap_SOURCES): New variable.
15309 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15310 lib/device.c of GRUB Legacy.
15312 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15314 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15315 instead of PATH is NULL.
15317 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15319 * commands/cmp.c (BUFFER_SIZE): New macro.
15320 (grub_cmd_cmp): Close the right file at the right time. Compare
15321 only data just read. Don't report files of different size as
15322 identical. Dynamically allocate buffers. Move variable
15323 declarations at the beginning of function.
15325 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
15327 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15330 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15332 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15333 when backspace is pressed at beginning of line.
15335 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
15337 * DISTLIST: Added genfslist.sh.
15339 * normal/main.c (fs_module_list): New variable.
15340 (autoload_fs_module): New function.
15341 (read_fs_list): Likewise.
15342 (grub_normal_execute): Call read_fs_list.
15344 * kern/fs.c (grub_fs_autoload_hook): New variable.
15345 (grub_fs_probe): Added support for auto-loading.
15347 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15348 (grub_fs_module_list_t): New type.
15350 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15351 (grub_fs_autoload_hook): New prototype.
15353 * genfslist.sh: New file.
15355 * genmk.rb: Added a rule to generate a filesystem list.
15357 2005-06-30 Marco Gerards <metgerards@student.han.nl>
15359 * configure.ac: Fix the test for cross-compiling.
15361 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15362 define GRUB_UTIL anymore.
15364 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15365 so this function works on other systems than just big endian.
15366 (load_modules): Likewise.
15367 (add_segments): Likewise.
15369 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15371 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15372 contains `l' modifier, get a long from va_arg().
15374 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15376 * kern/mm.c (grub_free): If the next free block which is being
15377 merged is the first free block, set the first block to the block
15379 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15381 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15383 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15384 `grub_ieee1275_chosen'.
15386 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15388 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15389 (grub_ieee1275_chosen): New variable.
15390 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15392 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15393 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15394 Rename first argument to `phandle' for consistency.
15395 (grub_ieee1275_get_property_length): Likewise.
15396 (grub_ieee1275_next_property): Likewise. Change type of first argument
15397 to grub_ieee1275_phandle_t.
15398 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15399 Move export next to declaration.
15400 (grub_ieee1275_chosen): New variable.
15401 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15402 Correct cosmetic typo.
15403 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15404 `grub_ieee1275_chosen'.
15405 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15406 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15407 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15408 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15409 `grub_ieee1275_chosen'.
15411 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15413 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15415 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15416 /chosen/bootargs as "variable=value" pairs.
15418 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15420 * include/grub/misc.h (grub_dprintf): New macro.
15421 (grub_real_dprintf): New prototype.
15422 (grub_strword): Likewise.
15423 (grub_iswordseparator): Likewise.
15424 * kern/misc.c (grub_real_dprintf): New function.
15425 (grub_strword): Likewise.
15426 (grub_iswordseparator): Likewise.
15428 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15430 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15431 (roundup): Remove macro.
15432 (grub_ieee1275_flags): Make static.
15433 (grub_ieee1275_realmode): Remove.
15434 (grub_ieee1275_test_flag): New function.
15435 (grub_ieee1275_set_flag): Likewise.
15436 (find_options): Rename to `grub_ieee1275_find_options'; update
15437 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15438 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15439 (cmain): New prototype.
15440 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15441 `grub_ieee1275_flags' directly.
15442 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15443 machine/biosdisk.h.
15444 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15445 Don't include grub/machine/init.h.
15446 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15447 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15449 (grub_ieee1275_realmode): Likewise.
15450 (grub_ieee1275_flag): New enum.
15451 (grub_ieee1275_test_flag): New prototype.
15452 (grub_ieee1275_set_flag): New prototype.
15453 * include/grub/powerpc/ieee1275/init.h: Remove file.
15454 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15455 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15456 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15457 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15459 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15460 `grub_ieee1275_test_flag'.
15461 (grub_ieee1275_encode_devname): Likewise.
15463 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15465 * include/grub/powerpc/ieee1275/ieee1275.h
15466 (grub_ieee1275_encode_devname): New prototype.
15467 (grub_ieee1275_get_filename): Likewise.
15468 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15470 (grub_set_prefix): Likewise.
15471 (grub_machine_init): Call grub_set_prefix.
15472 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15473 (grub_parse_type): New enum.
15474 (grub_ieee1275_get_devargs): New function.
15475 (grub_ieee1275_get_devname): Likewise.
15476 (grub_ieee1275_parse_args): Likewise.
15477 (grub_ieee1275_get_filename): Likewise.
15478 (grub_ieee1275_encode_devname): Likewise.
15480 2005-03-30 Marco Gerards <metgerards@student.han.nl>
15482 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15483 `grub_loader_unset'.
15485 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15487 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15488 instead of grub_ieee1275_interpret.
15489 (grub_halt_init): New function.
15490 (grub_halt_fini): Likewise.
15491 (GRUB_MOD_INIT): Correct message grammar.
15492 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15493 instead of grub_ieee1275_interpret.
15494 (grub_reboot_init): New function.
15495 (grub_reboot_fini): Likewise.
15496 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15497 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15498 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15499 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15500 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15502 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15504 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15506 (grub_halt): Likewise.
15507 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15508 (cmain): Remove __attribute__((unused)).
15509 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15510 (grub_heap_len): Likewise.
15511 (grub_machine_fini): New function.
15512 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15513 (grub_halt): Likewise.
15514 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15516 * util/powerpc/ieee1275/misc.c: New file.
15518 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15520 * DISTLIST: New file.
15521 * gendistlist.sh: Likewise.
15523 * Makefile.in (COMMON_DISTFILES): Removed.
15524 (BOOT_DISTFILES): Likewise.
15525 (CONF_DISTFILES): Likewise.
15526 (DISK_DISTFILES): Likewise.
15527 (FS_DISTFILES): Likewise.
15528 (INCLUDE_DISTFILES): Likewise.
15529 (KERN_DISTFILES): Likewise.
15530 (LOADER_DISTFILES): Likewise.
15531 (TERM_DISTFILES): Likewise.
15532 (UTIL_DISTFILES): Likewise.
15533 (DISTFILES): Likewise.
15534 (uninstall): Uninstall files in $(pkgdata_DATA).
15535 (DISTLIST): New target.
15536 (distdir): Use the contents of the file DISTLIST to get a list of
15539 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15541 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15542 descriptor. This is ported from GRUB Legacy.
15544 * gencmdlist.sh: Added an extra semicolon to make it work with
15545 old sed versions. Reported by Robert Bihlmeyer
15546 <robbe@orcus.priv.at>.
15548 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
15550 Automatic loading of commands is supported.
15552 * normal/main.c (read_command_list): New function.
15553 (grub_normal_execute): Call read_command_list.
15555 * normal/command.c (grub_register_command): Return zero or CMD.
15556 Allocate CMD->NAME from the heap.
15557 Initialize CMD->MODULE_NAME to zero.
15558 Find the same name as well. If the same command is found and it is
15559 a dummy command, overwrite members. If it is not a dummy command,
15561 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15562 (grub_command_find): If a dummy command is found, load a module
15563 and retry to find a command only once.
15565 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15566 make sure that each command is loaded.
15568 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15570 (struct grub_command): Remove const from the member `name'.
15571 Add a new member `module_name'.
15572 (grub_register_command): Return grub_command_t.
15574 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15575 sure that each command is loaded.
15577 * genmk.rb (PModule::rule): Specify a module name without the
15578 suffix ".mod" to gencmdlist.sh.
15580 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15582 * gencmdlist.sh: New file.
15584 * genmk.rb (PModule::rule): Generate a rule for a command list.
15586 Generate command.lst from $(COMMANDFILES).
15588 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15589 (DATA): Added $(pkgdata_DATA).
15590 (install-local): Install files in $(pkgdata_DATA).
15592 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15594 * term/i386/pc/vga.c (debug_command): Removed.
15595 (GRUB_MOD_INIT): Do not register the command "debug".
15597 From Hollis Blanchard:
15598 * commands/configfile.c: New file.
15599 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15600 commands/configfile.c.
15601 (pkgdata_MODULES): Added configfile.mod.
15602 (configfile_mod_SOURCES): New variable.
15603 (configfile_mod_CFLAGS): Likewise.
15604 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15605 commands/configfile.c.
15606 (pkgdata_MODULES): Added configfile.mod.
15607 (configfile_mod_SOURCES): New variable.
15608 (configfile_mod_CFLAGS): Likewise.
15609 * util/grub-emu.c (main): Call grub_configfile_init and
15610 grub_configfile_fini.
15611 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15613 [GRUB_UTIL] (grub_configfile_fini): Likewise.
15615 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15617 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15620 * commands/help.c (grub_cmd_help): Do not print newlines after
15621 the last command in print_command_help.
15623 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15625 * commands/default.h: New file.
15626 * commands/timeout.h: Likewise.
15627 * normal/context.c: Likewise.
15629 * util/misc.c: Do not include sys/times.h.
15630 Include sys/time.h and grub/machine/time.h.
15631 (grub_get_rtc): Rewritten with gettimeofday.
15633 * util/grub-emu.c (main): Call grub_default_init and
15634 grub_timeout_init before grub_normal_init, and call
15635 grub_timeout_fini and grub_default_fini after grub_main.
15637 * util/console.c (grub_ncurses_checkkey): Return the read
15640 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15643 * normal/main.c (read_config_file): Push MENU. If this fails,
15644 print an error and wait for a user input.
15645 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15646 If a menu is empty or an error occurs, pop MENU.
15647 (grub_normal_execute): Pop and free MENU after grub_menu_run
15650 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15652 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15654 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15656 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15658 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15661 * include/grub/normal.h (struct grub_menu_list): New struct.
15662 (grub_menu_list_t): New type.
15663 (struct grub_context): New struct.
15664 (grub_context_t): New type.
15665 (grub_register_command): Got rid of EXPORT_FUNC.
15666 (grub_unregister_command): Likewise.
15667 (grub_context_get): New prototype.
15668 (grub_context_get_current_menu): Likewise.
15669 (grub_context_push_menu): Likewise.
15670 (grub_context_pop_menu): Likewise.
15671 [GRUB_UTIL] (grub_default_init): Likewise.
15672 [GRUB_UTIL] (grub_default_fini): Likewise.
15673 [GRUB_UTIL] (grub_timeout_init): Likewise.
15674 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15676 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15677 commands/timeout.c and normal/context.c.
15678 (pkgdata_MODULES): Added default.mod and timeout.mod.
15679 (normal_mod_SOURCES): Added normal/context.c.
15680 (default_mod_SOURCES): New variable.
15681 (default_mod_CFLAGS): Likewise.
15682 (timeout_mod_SOURCES): Likewise.
15683 (timeout_mod_CFLAGS): Likewise.
15684 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15686 (pkgdata_MODULES): Added default.mod and timeout.mod.
15687 (normal_mod_SOURCES): Added normal/context.c.
15688 (default_mod_SOURCES): New variable.
15689 (default_mod_CFLAGS): Likewise.
15690 (timeout_mod_SOURCES): Likewise.
15691 (timeout_mod_CFLAGS): Likewise.
15693 * Makefile.in (all-local): Added $(MKFILES).
15695 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15697 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15698 (grub_emu_SOURCES): Likewise.
15699 (pkgdata_MODULES): Add `sun.mod'.
15700 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15701 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15703 (pkgdata_MODULES): Add `sun.mod'.
15704 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15705 * include/grub/partition.h (grub_sun_partition_map_init): New
15707 (grub_sun_partition_map_fini): Likewise.
15708 * partmap/sun.c: New file.
15709 * util/grub-emu.c (main): Initialize and de-initialize the sun
15710 partitionmap support.
15712 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15714 This implements an Emacs-like menu entry editor.
15716 * normal/menu_entry.c: New file.
15718 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15719 characters to ASCII.
15720 (saved_char): New variable.
15721 (grub_ncurses_checkkey): Rewritten completely.
15722 (grub_ncurses_getkey): Likewise.
15723 (grub_ncurses_init): Call raw instead of cbreak.
15725 * normal/menu.c (print_entry): Do not put a space.
15726 (init_page): Renamed to ...
15727 (grub_menu_init_page): ... this. All callers changed.
15728 (edit_menu_entry): Removed.
15729 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15731 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15733 * kern/misc.c (grub_vprintf): Call grub_refresh.
15735 * normal/menu.c (DISP_LEFT): Renamed to ...
15736 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15737 * normal/menu.c (DISP_UP): Renamed to ...
15738 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15739 * normal/menu.c (DISP_RIGHT): Renamed to ...
15740 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15741 * normal/menu.c (DISP_DOWN): Renamed to ...
15742 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15743 * normal/menu.c (DISP_HLINE): Renamed to ...
15744 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15745 * normal/menu.c (DISP_VLINE): Renamed to ...
15746 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15747 * normal/menu.c (DISP_UL): Renamed to ...
15748 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15749 * normal/menu.c (DISP_UR): Renamed to ...
15750 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15751 * normal/menu.c (DISP_LL): Renamed to ...
15752 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15753 * normal/menu.c (DISP_LR): Renamed to ...
15754 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15755 * normal/menu.c (TERM_WIDTH): Renamed to ...
15756 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15757 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15758 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15759 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15760 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15761 * normal/menu.c (TERM_MARGIN): Renamed to ...
15762 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15763 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15764 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15765 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15766 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15767 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15768 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15769 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15770 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15771 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15772 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15773 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15774 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15775 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15776 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15777 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15778 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15779 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15780 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15781 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15782 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15783 All callers changed.
15785 * include/grub/normal.h: New prototype.
15787 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15788 normal/menu_entry.c.
15789 (normal_mod_SOURCES): Likewise.
15790 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15791 (normal_mod_SOURCES): Likewise.
15793 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15795 * include/grub/normal.h (grub_halt_init): New prototype.
15796 (grub_halt_fini): Likewise.
15797 (grub_reboot_init): Likewise.
15798 (grub_reboot_fini): Likewise.
15800 * util/grub-emu.c: Include signal.h.
15801 (main_env): New global variable.
15802 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15804 (grub_machine_fini): New function.
15805 (main): Call grub_halt_init and grub_reboot_init before
15806 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15807 Call setjmp with MAIN_ENV to go back afterwards.
15808 Call grub_machine_fini right before return.
15810 * include/grub/util/misc.h: Include setjmp.h.
15811 (main_env): New prototype.
15813 * include/grub/kernel.h (grub_machine_fini): New prototype.
15814 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15815 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15817 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15818 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15819 * term/i386/pc/console.c (grub_console_fini): Likewise.
15821 * util/i386/pc/misc.c: New file.
15823 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15824 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15825 commands/i386/pc/reboot.c.
15827 2005-02-14 Guillem Jover <guillem@hadrons.org>
15829 * include/grub/dl.h (grub_dl_check_header): New prototype.
15830 (grub_arch_dl_check_header): Change return type to grub_err_t,
15831 remove size parameter and export function. Update all callers.
15832 * kern/dl.c (grub_dl_check_header): New function.
15833 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15834 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15835 are inside the core.
15836 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15837 independent ELF header checks.
15838 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15839 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15840 `grub_dl_check_header' instead of explicit checks. Check for the
15842 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15843 `grub_dl_check_header' instead of explicit checks. Remove arch
15844 specific ELF header checks.
15846 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15849 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
15851 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15852 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15854 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
15856 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15857 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15858 (part_map_iterate): Clear `grub_errno' and return 0 if
15859 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15860 * partmap/amiga.c (amiga_partition_map_iterate): Return
15861 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15862 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15864 2005-02-01 Guillem Jover <guillem@hadrons.org>
15866 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15869 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15871 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15873 (grub_rescue_cmd_linux): New prototype.
15874 (grub_rescue_cmd_initrd): Likewise.
15875 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15877 (grub_linux_release_mem): Release the memory for the initrd.
15878 (grub_load_linux): Renamed from this...
15879 (grub_rescue_cmd_linux): ...To this. Changed all callers.
15880 Changed `entry' not to be static. Loop over memory regions to
15881 find another one when the default fails.
15882 (grub_rescue_cmd_initrd): New function.
15883 (grub_linux_init): Remove function.
15884 (grub_linux_fini): Likewise.
15885 (GRUB_MOD_INIT): Register `initrd'.
15886 (GRUB_MOD_FINI): Unregister `initrd'.
15887 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15889 (grub_linux_normal_fini): Likewise.
15890 (GRUB_MOD_INIT): Register `initrd'.
15891 (GRUB_MOD_FINI): Unregister `initrd'.
15893 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15895 * commands/help.c: New file.
15896 * normal/arg.c (show_help): Renamed to...
15897 (grub_arg_show_help): ... this.
15898 * commands/i386/pc/halt.c: New file.
15899 * commands/i386/pc/reboot.c: Likewise.
15900 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15901 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15902 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15903 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15905 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15907 (pkgdata_MODULES): Add `help.mod'.
15908 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15909 * grub/i386/pc/init.h (grub_reboot): New prototype.
15910 (grub_halt): Likewise.
15911 * include/grub/normal.h (grub_arg_show_help): New prototype.
15912 (grub_help_init): Likewise.
15913 (grub_help_fini): Likewise.
15914 * util/grub-emu.c (main): Initialize and deinitialize the help
15917 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15919 * normal/command.c (grub_command_init): Fixed the description of
15920 the `set' and `unset' commands.
15922 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15924 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15926 * commands/ieee1275/halt.c: New file.
15927 * commands/ieee1275/reboot.c: Likewise.
15928 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15929 `__attribute__ ((unused))'. Some GCS related fixed.
15930 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15931 (grub_suspend_fini): Likewise.
15932 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15934 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15935 (halt_mod_CFLAGS): New variables.
15936 * include/grub/powerpc/ieee1275/ieee1275.h
15937 (grub_ieee1275_interpret): New prototype.
15939 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15941 * include/grub/misc.h (memmove): New prototype.
15942 (memcpy): Likewise.
15944 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15946 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15947 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15949 2005-01-22 Marco Gerards <metgerards@student.han.nl>
15951 * kern/misc.c (grub_strndup): Function rewritten.
15953 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15955 * normal/menu.c (TERM_WIDTH): Macro redefined.
15956 (TERM_TOP_BORDER_Y): Likewise.
15957 (draw_border): Replaced while-loop by a for-loop. Make the number
15958 of lines consistent with the number of lines displayed in
15959 print_entries. Added a margin below the rectangle.
15960 (print_entry): Make the entry fit in the rectangle.
15961 (print_entries): Display the scroll arrows next to the right
15964 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15966 * fs/minix.c (grub_minix_find_file): Reserve more space for
15967 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15968 `grub_strncpy' to copy `path' into it.
15970 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15972 Add the loopback device, a device via which files can be accessed
15975 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15976 (pkgdata_MODULES): Add loopback.mod.
15977 (loopback_mod_SOURCES): New variable.
15978 (loopback_mod_CFLAGS): Likewise.
15979 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15981 (pkgdata_MODULES): Add loopback.mod.
15982 (loopback_mod_SOURCES): New variable.
15983 (loopback_mod_CFLAGS): Likewise.
15984 * disk/loopback.c: new file.
15985 * include/grub/normal.h (grub_loop_init): New prototype.
15986 (grub_loop_fini): New prototype.
15987 * util/grub-emu.c (main): Initialize and de-initialize loopback
15989 * include/grub/disk.h (grub_disk_dev_id): Add
15990 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15992 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15994 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15996 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15997 (suspend_mod_SOURCES): New variable.
15998 (suspend_mod_CFLAGS): Likewise.
15999 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16001 * commands/ieee1275/suspend.c: New file.
16003 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16005 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16006 ((unused))' to `__attribute__ ((used))'.
16007 (GRUB_MOD_FINI): Likewise.
16008 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16009 * genmk.rb (PModule): Assign space to common symbols when linking
16012 2005-01-20 Marco Gerards <metgerards@student.han.nl>
16014 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16015 `unsigned' arguments to `grub_size_t'.
16016 (grub_malloc): Likewise.
16017 (grub_realloc): Likewise.
16018 (grub_memalign): Likewise.
16019 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16020 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16021 * util/misc.c (grub_malloc): Likewise.
16022 (grub_realloc): Likewise.
16023 * kern/mm.c (get_header_from_pointer): Change the casts to
16024 `unsigned' into a cast to `grub_size_t'.
16026 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16027 point to `currnode' when `currnode' is changed.
16029 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16030 Schottelius <nico-linux@schottelius.org>.
16032 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16034 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16035 (note_path): Remove variable.
16036 (GRUB_IEEE1275_NOTE_NAME): New macro.
16037 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16038 (grub_ieee1275_note_hdr): New structure.
16039 (grub_ieee1275_note_desc): Likewise.
16040 (grub_ieee1275_note): Likewise.
16041 (load_note): Remove `dir' argument. All callers updated. Remove
16042 `note_img' and `path'. Do not load a file from `note_path'.
16043 Initialize a struct grub_ieee1275_note and write that to `out'.
16044 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16046 2005-01-05 Marco Gerards <metgerards@student.han.nl>
16048 * util/misc.c (grub_util_read_image): Revert last change. It
16049 called `grub_util_read_at', which seeks from the beginning of the
16052 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16054 * TODO: Add note about endianness in grub-mkimage.
16055 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16057 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16058 (grub_mkimage_SOURCES): New target.
16059 * include/grub/kernel.h (grub_start_addr): Remove variable.
16060 (grub_end_addr): Likewise.
16061 (grub_total_module_size): Likewise.
16062 (grub_kernel_image_size): Likewise.
16063 (GRUB_MODULE_MAGIC): New constant.
16064 (grub_module_info): New structure.
16065 (grub_arch_modules_addr): New prototype.
16066 (grub_get_end_addr): Remove prototype.
16067 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16068 * include/grub/powerpc/ieee1275/kernel.h: New file.
16069 * include/grub/util/misc.h (grub_util_get_fp_size): New
16071 (grub_util_read_at): Likewise.
16072 (grub_util_write_image_at): Likewise.
16073 * kern/main.c (grub_get_end_addr): Remove function.
16074 (grub_load_modules): Call grub_arch_modules_addr instead of using
16075 grub_end_addr. Look for a grub_module_info struct in memory. Use
16076 the grub_module_info fields instead of calling grub_get_end_addr
16077 as loop conditions. Move grub_add_unused_region code here.
16078 (grub_add_unused_region): Remove function.
16079 * kern/i386/pc/init.c: Include grub/cache.h.
16080 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16081 one call to add_mem_region.
16082 (grub_arch_modules_addr): New function.
16083 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16084 (grub_total_module_size): Likewise.
16085 Include grub/machine/kernel.h.
16086 (grub_arch_modules_addr): New function.
16087 * util/grub-emu.c (grub_end_addr): Remove variable.
16088 (grub_total_module_size): Likewise.
16089 (grub_arch_modules_addr): New function.
16090 * util/misc.c: Include unistd.h.
16091 (grub_util_get_fp_size): New function.
16092 (grub_util_read_at): Likewise.
16093 (grub_util_write_image_at): Likewise.
16094 (grub_util_read_image): Call grub_util_read_at.
16095 (grub_util_write_image): Call grub_util_write_image_at.
16096 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16097 additional memory in kernel_img for a struct grub_module_info.
16098 Fill in that grub_module_info.
16099 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16101 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16103 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16105 * include/grub/powerpc/ieee1275/ieee1275.h
16106 (grub_ieee1275_milliseconds): New prototype.
16107 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16109 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16110 grub_ieee1275_milliseconds.
16112 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16114 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16116 (find_options): New function.
16117 (cmain): Call find_options.
16118 * include/grub/powerpc/ieee1275/ieee1275.h
16119 (grub_ieee1275_realmode): New extern variable.
16120 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16121 grub_map if grub_ieee1275_realmode is false.
16123 2004-12-29 Marco Gerards <metgerards@student.han.nl>
16125 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16126 lines are inserted and make it work like readline. Reported by
16127 Vincent Pelletier <subdino2004@yahoo.fr>.
16129 2004-12-28 Marco Gerards <metgerards@student.han.nl>
16131 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16133 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16134 `kern/powerpc/cache.S'.
16136 2004-12-27 Marco Gerards <metgerards@student.han.nl>
16138 * genmk.rb: Handle the `Program' class in the main loop. Written
16139 by Johan Rydberg <jrydberg@gnu.org>.
16140 (Program): New class.
16141 (programs): New variable.
16142 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16143 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16144 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16145 (help_arch): Function removed.
16146 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16147 `powerpc/libgcc.h' and `loader.h'.
16148 (pkgdata_PROGRAMS): New variable.
16149 (sbin_UTILITIES): Variable removed.
16150 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16151 (grubof_SOURCES): Variable re-defined so it only includes the
16152 core functionality.
16153 (grubof_CFLAGS): Remove `-DGRUBOF'.
16154 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16155 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16156 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16157 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16158 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16159 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16160 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16161 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16162 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16163 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16164 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16165 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16166 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16167 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16168 (pc_mod_CFLAGS): New variables.
16169 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16170 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16171 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16172 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16174 * include/grub/i386/pc/init.h (grub_os_area_addr)
16175 (rub_os_area_size): ... to here.
16176 * include/grub/powerpc/ieee1275/ieee1275.h
16177 (grub_ieee1275_entry_fn): Export symbol.
16178 * include/grub/powerpc/ieee1275/init.h: New file.
16179 * include/grub/powerpc/libgcc.h: Likewise.
16180 * include/grub/cache.h: Likewise.
16181 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16182 <hollis@penguinppc.org>.
16183 * kern/dl.c: Include <grub/cache.h>.
16184 (grub_dl_flush_cache): New function.
16185 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16187 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16188 (grub_console_init): Removed prototypes.
16189 (grub_machine_init): Don't initialize the modules anymore.
16190 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16192 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16193 Macro undef removed.
16194 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16195 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16196 relocation `R_PPC_REL32'. Return an error when the relocation is
16198 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16199 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16200 * util/misc.c (grub_arch_sync_caches): Likewise.
16202 2004-12-19 Marco Gerards <metgerards@student.han.nl>
16204 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16205 `symlist.c', add `grubof_symlist.c'.
16206 (symlist.c): Variable removed.
16207 (grubof_HEADERS): Variable added.
16208 (grubof_symlist.c): New target.
16209 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16210 `kernel_img_HEADERS'.
16211 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16212 * kern/powerpc/dl.c: New file.
16213 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16215 (grub_arch_dl_relocate_symbols): Likewise.
16216 (grub_register_exported_symbols): Likewise.
16218 2004-12-13 Marco Gerards <metgerards@student.han.nl>
16220 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16221 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16222 to fail instead. Reported by Vincent Pelletier
16223 <subdino2004@yahoo.fr>.
16225 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16226 it is not allocated. Reported by Vincent Pelletier
16227 <subdino2004@yahoo.fr>.
16229 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16230 output so the output looks better.
16232 2004-12-04 Marco Gerards <metgerards@student.han.nl>
16234 Modulize the partition map support and add support for the amiga
16237 * commands/ls.c: Include <grub/partition.h> instead of
16238 <grub/machine/partition.h>.
16239 * kern/disk.c: Likewise.
16240 * kern/rescue.c: Likewise.
16241 * loader/i386/pc/chainloader.c: Likewise.
16242 * normal/cmdline.c: Likewise.
16243 * kern/powerpc/ieee1275/init.c: Likewise.
16244 (grub_machine_init): Call `grub_pc_partition_map_init',
16245 `grub_amiga_partition_map_init' and
16246 `grub_apple_partition_map_init'.
16247 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16248 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16249 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16250 `partition.h' and `pc_partition.h'.
16251 (grub_setup_SOURCES): Remove
16252 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16253 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16254 (grub_emu_SOURCES): Likewise.
16255 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16256 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16257 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16258 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16259 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16260 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16261 (grubof_SOURCES): Likewise.
16262 * disk/i386/pc/partition.c: File removed.
16263 * disk/powerpc/ieee1275/partition.c: Likewise.
16264 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16265 * include/grub/i386/pc/partition.h: Likewise.
16266 * kern/partition.c: New file.
16267 * partmap/amiga.c: Likewise.
16268 * partmap/apple.c: Likewise.
16269 * partmap/pc.c: Likewise.
16270 * include/grub/partition.h: Likewise..
16271 * include/grub/pc_partition.h: Likewise.
16272 * util/grub-emu.c: Include <grub/partition.h> instead of
16273 <grub/machine/partition.h>.
16274 (main): Call `grub_pc_partition_map_init',
16275 `grub_amiga_partition_map_init' and
16276 `grub_apple_partition_map_init' and deinitialize afterwards.
16277 * util/i386/pc/biosdisk.c: Include `#include
16278 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16279 `<grub/machine/partition.h>'.
16280 * util/i386/pc/grub-setup.c: Likewise.
16281 * util/i386/pc/biosdisk.c: Likewise.
16282 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16283 partition information in case of a PC partition.
16284 * util/i386/pc/grub-setup.c: Include `#include
16285 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16286 `<grub/machine/partition.h>'.
16287 (setup): Only access the PC specific partition information in case
16290 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
16292 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16293 (grub_longjmp): Likewise.
16294 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16296 * normal/powerpc/setjmp.S: New file.
16297 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16298 `normal/powerpc/setjmp.S'.
16299 (grubof_CFLAGS): Add `-DGRUBOF'.
16300 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16301 [GRUB_UTIL && !GRUBOF].
16303 2004-11-16 Marco Gerards <metgerards@student.han.nl>
16305 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16306 property named `name'. Correctly handle the error returned by
16307 `grub_ieee1275_finddevice' if a device can not be opened.
16309 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16311 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16312 `actual' for negativity.
16313 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16316 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16318 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16319 (PAGE_OFFSET): New macro.
16320 (CRTC_ADDR_PORT): Likewise.
16321 (CRTC_DATA_PORT): Likewise.
16322 (START_ADDR_HIGH_REGISTER): Likewise.
16323 (START_ADDR_LOW_REGISTER): Likewise.
16324 (GRAPHICS_ADDR_PORT): Likewise.
16325 (GRAPHICS_DATA_PORT): Likewise.
16326 (READ_MAP_REGISTER): Likewise.
16327 (INPUT_STATUS1_REGISTER): Likewise.
16328 (INPUT_STATUS1_VERTR_BIT): Likewise.
16329 (page): New variable.
16330 (wait_vretrace): New function.
16331 (set_read_map): Likewise.
16332 (set_start_address): Likewise.
16333 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16335 (check_vga_mem): Take the page into account.
16336 (write_char): Likewise.
16337 (write_cursor): Likewise.
16338 (scroll_up): Likewise. Copy the page to the page that is not
16339 shown and switch between both pages.
16340 (grub_vga_putchar): Fix off by one error.
16341 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16344 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16346 Add support for iso9660 (including rockridge).
16348 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16349 (iso9660_mod_SOURCES): New variable.
16350 (iso9660_mod_CFLAGS): Likewise.
16351 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16352 * include/grub/fs.h (grub_iso9660_init): New prototype.
16353 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16354 * fs/iso9660.c: New file.
16356 * include/grub/misc.h (grub_strncat): New prototype.
16357 * kern/misc.c (grub_strncat): New function.
16359 * fs/hfs.c (grub_hfs_mount): Translate the error
16360 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16361 * fs/jfs.c (grub_jfs_mount): Likewise.
16362 * fs/ufs.c (grub_ufs_mount): Likewise.
16364 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16366 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16367 which initialized BAT registers.
16368 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16369 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16371 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16372 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16374 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16375 (grub_mapclaim): Likewise.
16376 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16377 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16380 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16382 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16383 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16384 -ffreestanding and -msoft-float.
16386 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16388 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16389 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16390 set in grub_ieee1275_flags.
16392 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16394 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16396 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16397 grub_console_init first.
16398 Change the memory range used for grub_ieee1275_claim and
16399 grub_mm_init_region.
16400 Print an error message if the claim fails.
16401 Include <grub/misc.h>.
16403 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16405 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16406 Call grub_children_iterate for device nodes of type `scsi',
16408 (grub_ofdisk_open): Remove manual device alias resolution.
16409 Fix memory leak when device cannot be opened.
16410 * include/grub/powerpc/ieee1275/ieee1275.h
16411 (grub_children_iterate): New prototype.
16412 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16414 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16415 Return -1 if args.size was -1.
16417 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16419 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16420 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16421 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16422 Open Firmware's memory for it; claim memory from _start to _end.
16423 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16424 (_end): New extern.
16425 (_start): Zero BSS from __bss_start to _end.
16426 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16428 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16430 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16432 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16433 -1 if args.base was -1.
16435 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16437 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16438 escape sequence instead of a literal ^L. Also call
16439 grub_ofconsole_gotoxy.
16441 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16443 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16444 void * arguments to grub_addr_t. All callers updated. Also make
16445 the `result' argument optional.
16446 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16447 All callers updated.
16449 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16451 * commands/ls.c (grub_ls_list_files): Use the string following the
16452 initial ')', if present, as the filesystem path.
16453 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16455 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16457 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16459 Make the source code of the menu interface more readable.
16461 * normal/menu.c: Include grub/mm.h.
16462 (TERM_WIDTH): New macro.
16463 (TERM_HEIGHT): Likewise.
16464 (TERM_INFO_HEIGHT): Likewise.
16465 (TERM_MARGIN): Likewise.
16466 (TERM_SCROLL_WIDTH): Likewise.
16467 (TERM_TOP_BORDER_Y): Likewise.
16468 (TERM_LEFT_BORDER_X): Likewise.
16469 (TERM_BORDER_WIDTH): Likewise.
16470 (TERM_MESSAGE_HEIGHT): Likewise.
16471 (TERM_BORDER_HEIGHT): Likewise.
16472 (TERM_NUM_ENTRIES): Likewise.
16473 (TERM_FIRST_ENTRY_Y): Likewise.
16474 (TERM_ENTRY_WIDTH): Likewise.
16475 (TERM_CURSOR_X): Likewise.
16476 (draw_border): Use macros instead of magic numbers.
16477 (print_entry): Likewise.
16478 (print_entries): Likewise.
16479 (run_menu): Likewise. Also, handle the key 'e'.
16480 (run_menu_entry): Ignore empty command lines.
16481 (print_message): Added a new argument EDIT. If EDIT is true,
16482 print a different message.
16483 (init_page): Likewise.
16484 (edit_menu_entry): New function. Not implemented yet.
16486 2004-09-17 Marco Gerards <metgerards@student.han.nl>
16488 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16489 can be loaded from normal mode.
16491 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16493 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16494 (multiboot_mod_CFLAGS): New variables.
16495 * loader/i386/pc/linux_normal.c: New file.
16496 * loader/i386/pc/multiboot_normal.c: Likewise.
16498 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16499 attribute `unused'.
16501 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16502 `fdiro' to read the mode information from instead of `diro'.
16504 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16505 looking up a symlink.
16507 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16509 * normal/command.c (grub_command_execute): Don't parse the
16510 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16511 flags of the command.
16513 * normal/menu.c (grub_menu_run): Fix typo.
16515 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16517 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16519 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16520 `y + 1' instead of `y - 1'.
16522 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16524 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16526 From Hollis Blanchard <hollis@penguinppc.org>:
16527 * kern/misc.c (memmove): New alias for grub_memmove.
16528 (memcmp): New alias for grub_memcmp.
16529 (memset): New alias for grub_memset.
16530 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16531 Change "int handle" to "grub_ieee1275_phandle_t handle".
16532 * include/grub/powerpc/ieee1275/ieee1275.h
16533 (grub_ieee1275_get_property): Likewise.
16535 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16537 Added normal mode command `chainloader' as module chain.mod, which
16538 depends on normal.mod and _chain.mod.
16540 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16541 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16542 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16544 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16545 but arguments parsing moved to ...
16546 (grub_chainloader_cmd): ... here. New function.
16547 * include/grub/i386/pc/chainloader.h: New file.
16548 * loader/i386/pc/chainloader_normal.c: Likewise.
16550 2004-09-11 Marco Gerards <metgerards@student.han.nl>
16552 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16553 (grub_mkimage_LDFLAGS): Likewise.
16554 (grub_emu_SOURCES): Likewise.
16555 (kernel_img_HEADERS): Added fshelp.h.
16556 * fs/ext2.c: Include <grub/fshelp.h>.
16557 (FILETYPE_REG): New macro.
16558 (FILETYPE_INO_REG): Likewise.
16559 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16561 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16563 (grub_fshelp_node): New struct.
16564 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16566 (grub_ext2_get_file_block): Removed function.
16567 (grub_ext2_read_block): New function.
16568 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16569 This function was written.
16570 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16571 (grub_ext2_find_file): Removed function.
16572 (grub_ext2_read_symlink): New function.
16573 (grub_ext2_iterate_dir): Likewise.
16574 (grub_ext2_open): Rewritten.
16575 (grub_ext2_dir): Rewritten.
16576 * include/grub/fshelp.h: New file.
16577 * fs/fshelp.c: Likewise.
16579 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16581 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16582 (print_message): Add a missing newline.
16583 (run_menu): Added timeout support.
16584 (run_menu_entry): New local function.
16585 (grub_menu_run): Added support for booting.
16587 * kern/loader.c (grub_loader_is_loaded): New function.
16589 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16590 (grub_get_rtc): Exported.
16592 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16593 (grub_get_rtc): Exported.
16595 * include/grub/normal.h (struct grub_command_list): Remove
16596 constant from the member `command'.
16598 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16600 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16602 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16604 2004-08-28 Marco Gerards <metgerards@student.han.nl>
16606 Add support for the JFS filesystem.
16608 * fs/jfs.c: New file.
16609 * include/grub/fs.h (grub_jfs_init): New prototype.
16610 (grub_jfs_fini): New prototype.
16611 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16612 (grub_emu_SOURCES): Likewise.
16613 (pkgdata_MODULES): Add jfs.mod.
16614 (jfs_mod_SOURCES): New variable.
16615 (jfs_mod_CFLAGS): Likewise.
16616 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16617 (grubof_SOURCES): Likewise.
16618 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16620 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16621 endian to the host endian.
16622 (grub_fat_utf16_to_utf8): Move function from there...
16623 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
16624 the endianness of the source string anymore.
16625 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16627 2004-08-24 Marco Gerards <metgerards@student.han.nl>
16629 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16630 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16631 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16632 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16634 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16635 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16636 for `node_found' and `it_dir'.
16637 (grub_hfs_dir): Add prototype for `dir_hook'.
16639 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16640 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16641 and `indir32' to silence a gcc warning.
16643 * include/grub/fs.h (grub_hfs_init): New prototype.
16644 (grub_hfs_fini): Likewise.
16647 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16649 Each disk device has its own id now. This is useful to make use
16650 of multiple disk devices.
16652 * include/grub/disk.h (grub_disk_dev_id): New enum.
16653 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16654 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16656 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16657 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16659 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16660 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16662 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16663 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16665 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16666 "id" which is used by the cache manager.
16668 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16671 2004-08-18 Marco Gerards <metgerards@student.han.nl>
16673 * fs/hfs.c: New file.
16674 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16675 (grub_emu_SOURCES): Likewise.
16676 (pkgdata_MODULES): Add hfs.mod.
16677 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16678 (grubof_SOURCES): Likewise.
16679 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16681 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16682 * kern/misc.c (grub_strncasecmp): Add function.
16684 2004-08-14 Marco Gerards <metgerards@student.han.nl>
16686 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16689 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16690 (grub_ext2_dir): In case the directory entry type is unknown, read
16693 2004-08-02 Peter Bruin <pjbruin@dds.nl>
16695 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16696 grub_load_linux instead of grub_rescue_cmd_linux as second
16697 argument of grub_rescue_register_command.
16699 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16701 2004-07-27 Marco Gerards <metgerards@student.han.nl>
16703 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16705 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16706 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16707 `loader/powerpc/ieee1275/linux.c',
16708 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16709 * include/grub/powerpc/ieee1275/ieee1275.h
16710 (grub_ieee1275_release): New prototype.
16711 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16712 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16713 normal, boot, linux and linux_normal.
16714 * loader/powerpc/ieee1275/linux.c: New file.
16715 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16717 2004-07-12 Marco Gerards <metgerards@student.han.nl>
16719 * normal/arg.c (grub_arg_parse): Correct error handling after
16720 reallocating the argumentlist (check if `argl' is not null instead
16721 of checking if `args' is not null).
16722 * kern/mm.c (grub_realloc): Return the same pointer when using the
16723 same region, instead of returning the header address.
16725 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16727 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16728 one block instead of two when looking for the initial partition.
16729 (grub_partition_probe): Initialize the local variable `p' with 0.
16730 Use base 10 for the grub_strtoul call.
16731 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16732 need for one local variable.
16733 (grub_strtoul): Don't add the new value to `num', instead of that
16736 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16738 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16739 (pxeboot_img_SOURCES): New variable.
16740 (pxeboot_img_ASFLAGS): Likewise.
16741 (pxeboot_img_LDFLAGS): Likewise.
16742 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16743 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16744 <lode_leroy@hotmail.com>.
16746 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16748 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16749 there was no input.
16751 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16753 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16754 the history buffer logic.
16756 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16758 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16759 (FILETYPE_INO_SYMLINK): New macros.
16760 (grub_ext2_find_file): Check if the node is a directory using the
16761 inode stat information instead of using the filetype in the
16762 dirent. Exclude the first character of an absolute symlink.
16763 (grub_ext2_dir): Mask out the filetype part of the mode member of
16766 2004-05-24 Marco Gerards <metgerards@student.han.nl>
16768 Add support for UFS version 1 and 2. Add support for the minix
16769 filesystem version 1 and 2, both the variants with 14 and 30 long
16772 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16774 (grub_emu_SOURCES): Likewise.
16775 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16776 (ufs_mod_SOURCES): New variable.
16777 (ufs_mod_CFLAGS): Likewise.
16778 (minix_mod_SOURCES): Likewise.
16779 (minix_mod_CFLAGS): Likewise.
16780 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16782 (grubof_SOURCES): Likewise.
16783 * fs/ufs.c: New file.
16784 * fs/minix.c: New file.
16785 * include/grub/fs.h (grub_ufs_init): New prototype.
16786 (grub_ufs_fini): Likewise.
16787 (grub_minix_init): Likewise.
16788 (grub_minix_fini): Likewise.
16789 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16792 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16794 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16795 commands/ls.c, commands/terminal.c, commands/boot.c,
16796 commands/cmp.c and commands/cat.c.
16797 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16799 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16802 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16804 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16805 and grub_, respectively. Because the conversion is trivial and
16806 mechanical, I omit the details here. Please refer to the CVS
16807 if you need more information.
16809 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16811 * include/pupa: Renamed to ...
16812 * include/grub: ... this.
16813 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16814 * util/i386/pc/grub-mkimage.c: ... this.
16815 * util/i386/pc/pupa-setup.c: Renamed to ...
16816 * util/i386/pc/grub-setup.c: ... this.
16817 * util/pupa-emu.c: Renamed to ...
16818 * util/grub-emu.c: ... this.
16820 2004-03-29 Marco Gerards <metgerards@student.han.nl>
16822 Add support for the newworld apple macintosh (PPC). This has been
16823 tested on the powerbook 2000 only. It only adds support for
16824 generic ieee1275 functions, console and disk support. This should
16825 be easy to port to other architectures with support for Open
16828 * configure.ac: Accept the powerpc as host_cpu. In the case of
16829 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16830 specific tests are only executed while building for the i386.
16831 Inverse test for crosscompile.
16832 * genmk.rb (Utility): Allow assembler files.
16833 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16834 * conf/powerpc-ieee1275.rmk: New file.
16835 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16836 * disk/powerpc/ieee1275/partition.c: Likewise.
16837 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16838 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16839 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16840 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16841 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16842 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16843 * include/pupa/powerpc/ieee1275/loader.h
16844 * include/pupa/powerpc/setjmp.h: Likewise.
16845 * include/pupa/powerpc/types.h: Likewise.
16846 * kern/powerpc/ieee1275/init.c: Likewise.
16847 * kern/powerpc/ieee1275/openfw.c: Likewise.
16848 * term/powerpc/ieee1275/ofconsole.c: Likewise.
16850 These files were written by Johan Rydberg
16851 (jrydberg@night.trouble.net) and I only modified them slightly.
16853 * boot/powerpc/ieee1275/cmain.c: New file.
16854 * boot/powerpc/ieee1275/crt0.S: Likewise.
16855 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16856 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16858 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
16860 * Makefile.in: Update copyright.
16861 * genmodsrc.sh: Likewise.
16862 * gensymlist.sh: Likewise.
16863 * term/i386/pc/vga.c: Indent correctly.
16865 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16866 bugreporting address.
16867 * util/i386/pc/pupa-setup.c (usage): Likewise,
16868 (main): Call pupa_ext2_init and pupa_ext2_fini.
16870 * fs/fat.c (log2): Renamed to ...
16871 (fat_log2): ... this.
16872 All callers changed.
16873 * kern/misc.c (memcpy): Alias to pupa_memmove.
16874 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16876 * util/console.c (pupa_ncurses_fini): Return 0.
16878 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16879 Move fail label here.
16880 [__GNU__]: Don't warn when using stat.
16881 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16882 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16883 long int. Use strtol instead of strtoul.
16885 2004-03-14 Marco Gerards <metgerards@student.han.nl>
16887 * commands/boot.c: New file.
16888 * commands/cat.c: Likewise.
16889 * commands/cmp.c: Likewise.
16890 * commands/ls.c: Likewise.
16891 * commands/terminal.c: Likewise.
16892 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16893 (pupa_register_command): Changed interface to match the new
16895 (pupa_command_execute): Changed (almost rewritten) so it uses
16896 pupa_split_command. Added support for setting variables using the
16898 (rescue_command): Changed to work with the new argument parser.
16899 (terminal_command): Moved from here to commands/terminal.c.
16900 (set_command): New function.
16901 (unset_command): New function.
16902 (insmod_command): New function.
16903 (rmmod_command): New function.
16904 (lsmod_command): New function.
16905 (pupa_command_init): Don't initialize the command terminal
16906 anymore. Initialize the commands set, unset, insmod, rmmod and
16908 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16909 (kernel_img_HEADERS): Add arg.h and env.h.
16910 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16911 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16912 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16914 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16916 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16917 (boot_mod_SOURCES): New variable.
16918 (terminal_mod_SOURCES): Likewise.
16919 (ls_mod_SOURCES): Likewise.
16920 (cmp_mod_SOURCES): Likewise.
16921 (cat_mod_SOURCES): Likewise.
16923 * normal/arg.c: New file.
16924 * kern/env.c: Likewise.
16925 * include/pupa/arg.h: Likewise.
16926 * include/pupa/env.h: Likewise.
16927 * font/manager.c (font_command): Changed to match argument parsing
16929 (PUPA_MOD_INIT): Likewise.
16930 * hello/hello.c (pupa_cmd_hello): Likewise.
16931 (PUPA_MOD_INIT): Likewise.
16932 * include/pupa/disk.h: Include <pupa/device.h>.
16933 (pupa_print_partinfo): New prototype.
16934 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16935 (pupa_dl_get_prefix): Likewise.
16936 * include/pupa/misc.h: Include <pupa/err.h>.
16937 (pupa_isgraph): New prototype.
16938 (pupa_isdigit): Likewise.
16939 (pupa_split_cmdline): Likewise.
16940 * include/pupa/normal.h: Include <pupa/arg.h>.
16941 (pupa_command): Changed the prototype of the member `func' to
16942 match the argument parsing interface. Added member `options'.
16943 (pupa_register_command): Updated to match function.
16944 (pupa_arg_parse): New prototype.
16945 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16946 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16947 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16948 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16949 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16950 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16951 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16952 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16953 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16954 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16955 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16956 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16957 * kern/disk.c: Include <pupa/file.h>.
16958 (pupa_print_partinfo): New function.
16959 * kern/dl.c: Include <pupa/env.h>.
16960 (pupa_dl_dir): Variable removed.
16961 (pupa_dl_load): Use the environment variable `prefix' instead of
16962 the variable pupa_dl_dir.
16963 (pupa_dl_set_prefix): Function removed.
16964 (pupa_dl_get_prefix): Likewise.
16965 * kern/i386/pc/init.c: Include <pupa/env.h>.
16966 (pupa_machine_init): Use the environment variable `prefix' instead of
16967 using pupa_dl_set_prefix to set the prefix.
16968 * kern/main.c: Include <pupa/env.h>.
16969 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16970 using pupa_dl_get_prefix to get the prefix.
16971 * kern/misc.c: Include <pupa/env.h>.
16972 (pupa_isdigit): New function.
16973 (pupa_isgraph): Likewise.
16974 (pupa_ftoa): Likewise.
16975 (pupa_vsprintf): Added support for printing values of the type
16976 `double'. Make it possible to format variable output when using
16977 formatting like `%1.2%f'.
16978 (pupa_split_cmdline): New function.
16979 * kern/rescue.c: Include <pupa/env.h>.
16980 (next_word): Removed function.
16981 (pupa_rescue_cmd_prefix): Likewise.
16982 (pupa_rescue_cmd_set): New function.
16983 (pupa_rescue_cmd_unset): New function.
16984 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16985 split the command line instead of splitting it here. Added
16986 support for setting variables using the syntax `foo=bar'. Don't
16987 initialize the prefix command anymore. Initialized the set and
16989 * normal/cmdline.c: Include <pupa/env.h>.
16990 (pupa_tab_complete): Added prototypes for print_simple_completion,
16991 print_partition_completion, add_completion, iterate_commands,
16992 iterate_dev, iterate_part and iterate_dir. Moved code to print
16993 partition information from here to kern/disk.c.
16994 (pupa_cmdline_run): Don't check if the function exists anymore.
16995 * normal/main.c: Include <pupa/env.h>.
16996 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16997 instead of using pupa_dl_get_prefix to get the prefix.
16998 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16999 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17001 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17002 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17003 ((unused))' to silence a gcc warning.
17004 (pupa_vga_setcolor): Likewise.
17005 (debug_command): Changed to match argument parsing
17007 * util/pupa-emu.c: Include <pupa/env.h>.
17008 (options): Added 0's for unused fields to silence a gcc warning.
17010 (main): Use the environment variable `prefix' instead of using
17011 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17012 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17015 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17016 * util/misc.c: Include <malloc.h>.
17017 (pupa_malloc): Rewritten so errors are correctly reported.
17018 (pupa_realloc): Likewise.
17019 (pupa_memalign): Likewise.
17020 (pupa_mm_init_region): Declare unused variables with
17021 `__attribute__ ((unused))' to silence a gcc warning.
17022 * normal/i386/setjmp.S: Remove tab at the end of the file to
17023 silence a gcc warning.
17024 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17025 variables with `__attribute__ ((unused))' to silence a gcc
17027 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17028 local variable i unsigned to silence a gcc warning.
17030 * kern/term.c: Include <pupa/misc.h>.
17031 (pupa_more_lines): New variable.
17032 (pupa_more): Likewise.
17033 (pupa_putcode): When the pager is active pause at the end of every
17035 (pupa_set_more): New function.
17036 * include/pupa/term.h (pupa_set_more): New prototype.
17039 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17041 Now this project is GRUB 2 rather than PUPA. The location of
17042 the CVS repository was moved to GRUB's.
17044 * configure.ac: Use bug-grub as the reporting address.
17045 Use GRUB instead of PUPA.
17046 Change the version number to 1.90.
17048 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17050 * genkernsyms.sh: Updated copyright information.
17051 * genmk.rb: Likewise.
17052 * genmodsrc.sh: Likewise.
17053 * gensymlist.sh: Likewise.
17054 * boot/i386/pc/boot.S: Likewise.
17055 * boot/i386/pc/diskboot.S: Likewise.
17056 * disk/i386/pc/biosdisk.c: Likewise.
17057 * disk/i386/pc/partition.c: Likewise.
17058 * font/manager.c: Likewise.
17059 * fs/ext2.c: Likewise.
17060 * fs/fat.c: Likewise.
17061 * include/pupa/boot.h: Likewise.
17062 * include/pupa/device.h: Likewise.
17063 * include/pupa/disk.h: Likewise.
17064 * include/pupa/dl.h: Likewise.
17065 * include/pupa/elf.h: Likewise.
17066 * include/pupa/err.h: Likewise.
17067 * include/pupa/file.h: Likewise.
17068 * include/pupa/font.h: Likewise.
17069 * include/pupa/fs.h: Likewise.
17070 * include/pupa/kernel.h: Likewise.
17071 * include/pupa/loader.h: Likewise.
17072 * include/pupa/misc.h: Likewise.
17073 * include/pupa/mm.h: Likewise.
17074 * include/pupa/net.h: Likewise.
17075 * include/pupa/normal.h: Likewise.
17076 * include/pupa/rescue.h: Likewise.
17077 * include/pupa/setjmp.h: Likewise.
17078 * include/pupa/symbol.h: Likewise.
17079 * include/pupa/term.h: Likewise.
17080 * include/pupa/types.h: Likewise.
17081 * include/pupa/i386/setjmp.h: Likewise.
17082 * include/pupa/i386/types.h: Likewise.
17083 * include/pupa/i386/pc/biosdisk.h: Likewise.
17084 * include/pupa/i386/pc/boot.h: Likewise.
17085 * include/pupa/i386/pc/console.h: Likewise.
17086 * include/pupa/i386/pc/init.h: Likewise.
17087 * include/pupa/i386/pc/kernel.h: Likewise.
17088 * include/pupa/i386/pc/linux.h: Likewise.
17089 * include/pupa/i386/pc/loader.h: Likewise.
17090 * include/pupa/i386/pc/memory.h: Likewise.
17091 * include/pupa/i386/pc/multiboot.h: Likewise.
17092 * include/pupa/i386/pc/partition.h: Likewise.
17093 * include/pupa/i386/pc/time.h: Likewise.
17094 * include/pupa/i386/pc/vga.h: Likewise.
17095 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17096 * include/pupa/util/getroot.h: Likewise.
17097 * include/pupa/util/misc.h: Likewise.
17098 * include/pupa/util/resolve.h: Likewise.
17099 * kern/device.c: Likewise.
17100 * kern/disk.c: Likewise.
17101 * kern/dl.c: Likewise.
17102 * kern/err.c: Likewise.
17103 * kern/file.c: Likewise.
17104 * kern/fs.c: Likewise.
17105 * kern/loader.c: Likewise.
17106 * kern/main.c: Likewise.
17107 * kern/misc.c: Likewise.
17108 * kern/mm.c: Likewise.
17109 * kern/rescue.c: Likewise.
17110 * kern/term.c: Likewise.
17111 * kern/i386/dl.c: Likewise.
17112 * kern/i386/pc/init.c: Likewise.
17113 * kern/i386/pc/lzo1x.S: Likewise.
17114 * kern/i386/pc/startup.S: Likewise.
17115 * loader/i386/pc/chainloader.c: Likewise.
17116 * loader/i386/pc/linux.c: Likewise.
17117 * loader/i386/pc/multiboot.c: Likewise.
17118 * normal/cmdline.c: Likewise.
17119 * normal/command.c: Likewise.
17120 * normal/main.c: Likewise.
17121 * normal/menu.c: Likewise.
17122 * normal/i386/setjmp.S: Likewise.
17123 * term/i386/pc/console.c: Likewise.
17124 * term/i386/pc/vga.c: Likewise.
17125 * util/console.c: Likewise.
17126 * util/genmoddep.c: Likewise.
17127 * util/misc.c: Likewise.
17128 * util/pupa-emu.c: Likewise.
17129 * util/resolve.c: Likewise.
17130 * util/unifont2pff.rb: Likewise.
17131 * util/i386/pc/biosdisk.c: Likewise.
17132 * util/i386/pc/getroot.c: Likewise.
17133 * util/i386/pc/pupa-mkimage.c: Likewise.
17134 * util/i386/pc/pupa-setup.c: Likewise.
17136 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17138 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17139 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17140 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17141 reading and reset it after reading.
17142 (pupa_ext2_close): Return PUPA_ERR_NONE.
17144 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17146 (struct linux_kernel_header): Add kernel_version and
17148 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17149 pupa_file_read succeeds.
17150 (pupa_rescue_cmd_initrd): Implement.
17152 2003-12-03 Marco Gerards <metgerards@student.han.nl>
17154 * fs/ext2.c (pupa_ext2_label): New function.
17155 (pupa_ext2_fs): Added label.
17156 * fs/fat.c (pupa_fat_label): New function.
17157 (pupa_fat_fs): Added label.
17158 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17160 * kern/misc.c (pupa_strndup): New function.
17161 * include/pupa/misc.h (pupa_strndup): New prototype.
17163 * include/pupa/normal.h: Include <pupa/err.h>.
17164 (pupa_set_history): New prototype.
17165 (pupa_iterate_commands): New prototype.
17166 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17167 <pupa/disk.h>, <pupa/file.h>.
17168 (hist_size): New variable.
17169 (hist_lines): Likewise.
17170 (hist_end): Likewise.
17171 (hist_used): Likewise.
17172 (pupa_set_history): New function.
17173 (pupa_history_get): Likewise.
17174 (pupa_history_add): Likewise.
17175 (pupa_history_replace): Likewise.
17176 (pupa_tab_complete): Likewise.
17177 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17178 completion shows partitionnames while completing partitions, this
17179 feature was suggested by Jeff Bailey.
17180 * normal/command.c (pupa_iterate_commands): New function.
17181 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17182 (pupa_normal_init): Initialize history buffer.
17183 (PUPA_MOD_INIT): Likewise.
17184 (pupa_normal_fini): Free the history buffer.
17185 (PUPA_MOD_FINI): Likewise.
17187 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17190 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17191 * configure.ac [i386]: Check for regparam bug.
17192 (NESTED_FUNC_ATTR) [! i386]: Defined.
17194 2003-11-17 Marco Gerards <metgerards@student.han.nl>
17196 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17197 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17198 (pupa_emu_SOURCES): New variable.
17199 (pupa_emu_LDFLAGS): Likewise.
17200 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17201 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17202 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17203 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17204 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17205 (pupa_jmp_buf): New typedef.
17206 (pupa_setjmp) [PUPA_UTIL]: New macro.
17207 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17208 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17209 (pupa_refresh): New prototype.
17210 * include/pupa/util/getroot.h: New file.
17211 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17213 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17214 (pupa_rescue_cmd_cat): Likewise.
17215 (pupa_rescue_cmd_ls): Likewise.
17216 (pupa_rescue_cmd_testload): Likewise.
17217 (pupa_rescue_cmd_lsmod): Likewise.
17218 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17219 * normal/menu.c (run_menu): Likewise.
17220 * kern/term.c (pupa_cls): Likewise.
17221 (pupa_refresh): New function.
17222 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17223 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17224 * util/console.c: New file.
17226 * util/i386/pc/getroot.c: New file.
17227 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17228 (pupa_putchar): New function.
17229 (pupa_refresh): Likewise.
17230 (xgetcwd): Function moved to ...
17231 (strip_extra_slashes): Likewise.
17232 (get_prefix): Likewise.
17233 * util/i386/pc/getroot.c: ... here.
17234 (find_root_device): Function moved and renamed to...
17235 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17236 Changed all callers.
17237 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17239 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17240 Changed all callers.
17241 * util/misc.c (pupa_memalign): New function.
17242 (pupa_mm_init_region): Likewise.
17243 (pupa_register_exported_symbols): Likewise.
17244 (pupa_putchar): Function removed.
17245 * util/pupa-emu.c: New file.
17247 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17249 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17250 (_multiboot_mod_SOURCES): New variable.
17251 (_multiboot_mod_CFLAGS): Likewise.
17252 * loader/i386/pc/multiboot.c: New file.
17253 * include/pupa/i386/pc/multiboot.h: Likewise.
17254 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17255 (pupa_multiboot_real_boot): New function.
17256 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17257 (pupa_multiboot_real_boot): New prototype.
17258 (pupa_rescue_cmd_multiboot): Likewise
17259 (pupa_rescue_cmd_module): Likewise.
17261 * kern/loader.c (pupa_loader_set): Continue when
17262 pupa_loader_unload_func() fails.
17263 (pupa_loader_unset): New function.
17264 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17266 * kern/misc.c (pupa_stpcpy): New function.
17267 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17269 2003-11-12 Marco Gerards <metgerards@student.han.nl>
17271 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17272 for available extensions.
17274 * include/pupa/i386/pc/time.h: New file.
17275 * kern/disk.c: Include <pupa/machine/time.h>.
17276 (PUPA_CACHE_TIMEOUT): New macro.
17277 (pupa_last_time): New variable.
17278 (pupa_disk_open): Flush the cache when there was a timeout.
17279 (pupa_disk_close): Reset the timer.
17280 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17282 * util/misc.c: Include <sys/times.h>
17283 (pupa_get_rtc): New function.
17285 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17287 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17289 (pupa_ext2_get_file_block): Use blocks member.
17291 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17292 first block. Return -1 instead of pupa_errno on error.
17294 2003-10-27 Marco Gerards <metgerards@student.han.nl>
17296 * README: In the pupa-mkimage example use _chain instead of chain
17297 and ext2 instead of fat.
17298 * TODO: Replace ext2fs with jfs as an example. Add an item for
17299 adding journal playback for ext2fs.
17300 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17301 (pkgdata_MODULES): Added ext2.mod.
17302 (ext2_mod_SOURCES): New variable.
17303 (ext2_mod_CFLAGS): Likewise.
17304 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17305 * include/pupa/misc.h (pupa_strncpy): New prototype.
17306 (pupa_strcat): Likewise.
17307 (pupa_strncmp): Likewise.
17308 * kern/misc.c (pupa_strcat): Enable function.
17309 (pupa_strncpy): New function.
17310 (pupa_strncmp): Likewise.
17311 * fs/ext2.c: New file.
17313 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17314 when the read failed before retrying.
17315 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17316 (_FILE_OFFSET_BITS): Likewise.
17317 * configure.ac: Added AC_SYS_LARGEFILE.
17319 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17321 * genmk.rb (PModule#rule): Make sure to get only symbol names
17322 from the output of nm.
17323 Reported by Robert Millan <zeratul2@wanadoo.es>.
17325 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17327 I forgot to check in these changes for a long time. This adds
17328 incomplete support for VGA console, and this is still very
17329 buggy. Also, a lot of consideration is required for I18N,
17330 UNICODE, and VGA font issues. Therefore, assume that this is
17331 such that "better than nothing".
17333 * font/manager.c: New file.
17334 * include/pupa/font.h: Likewise.
17335 * include/pupa/i386/pc/vga.h: Likewise.
17336 * term/i386/pc/vga.c: Likewise.
17337 * util/unifont2pff.rb: Likewise.
17339 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17340 (pkgdata_MODULES): Added vga.mod and font.mod.
17341 (vga_mod_SOURCES): New variables.
17342 (vga_mod_CFLAGS): Likewise.
17343 (font_mod_SOURCES): Likewise.
17344 (font_mod_CFLAGS): Likewise.
17346 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17348 * include/pupa/term.h: Include pupa/err.h.
17349 (struct pupa_term): Added init and fini.
17350 Changed the argument of putchar to pupa_uint32_t.
17352 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17353 (pupa_console_real_putchar): New prototype.
17354 (pupa_console_putchar): Removed.
17355 (pupa_console_checkkey): Exported.
17356 (pupa_console_getkey): Likewise.
17358 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17361 * kern/term.c (pupa_term_set_current): Rewritten.
17362 (pupa_putchar): Likewise.
17363 (pupa_putcode): New function.
17365 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17366 (pupa_console_real_putchar): ... this.
17367 (pupa_vga_set_mode): New function.
17368 (pupa_vga_get_font): Likewise.
17370 * normal/command.c: Include pupa/term.h.
17371 (terminal_command): New function.
17372 (pupa_command_init): Register the command "terminal".
17374 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17375 (DISP_UP): Likewise.
17376 (DISP_RIGHT): Likewise.
17377 (DISP_DOWN): Likewise.
17378 (DISP_HLINE): Likewise.
17379 (DISP_VLINE): Likewise.
17380 (DISP_UL): Likewise.
17381 (DISP_UR): Likewise.
17382 (DISP_LL): Likewise.
17383 (DISP_LR): Likewise.
17385 * term/i386/pc/console.c (pupa_console_putchar): New function.
17387 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17389 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17390 FIX. Reverse the path_list.
17392 * include/pupa/normal.h: Export pupa_register_command and
17393 pupa_unregister_command.
17395 * hello/hello.c (pupa_cmd_hello): New module.
17396 * conf/i386-pc.rmk: Added hello.mod.
17398 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17400 * kern/i386/pc/lzo1x.S: New file.
17402 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17403 (compress_kernel): New variable.
17404 (generate_image): Heavily modified to support compressing a
17405 large part of the core image.
17407 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17409 (pupa_util_load_image): New function.
17411 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17412 (pupa_compressed_size): New variable.
17413 (codestart): Enable Gate A20 here.
17414 Decompress the compressed part of the core image.
17415 Rearrange the code to put functions and variables which are
17416 required for initialization in the non-compressed part.
17419 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17422 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17424 * include/pupa/i386/pc/kernel.h
17425 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17426 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17427 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17428 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17429 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17431 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17433 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17434 (Utility#rule): Likewise.
17436 * configure.ac: Check if LZO is available.
17438 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17440 * include/pupa/normal.h: New file.
17441 * include/pupa/setjmp.h: Likewise.
17442 * include/pupa/i386/setjmp.h: Likewise.
17443 * normal/cmdline.c: Likewise.
17444 * normal/command.c: Likewise.
17445 * normal/main.c: Likewise.
17446 * normal/menu.c: Likewise.
17447 * normal/i386/setjmp.S: Likewise.
17449 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17450 (pupa_rescue_cmd_initrd): Likewise.
17452 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17455 * kern/i386/pc/startup.S (translation_table): New variable.
17456 (translate_keycode): New function.
17457 (pupa_console_getkey): Call translate_keycode.
17459 * kern/rescue.c (attempt_normal_mode): New function.
17460 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17461 it failed, print a message.
17463 * kern/mm.c (pupa_real_malloc): Print more information when a
17464 free magic is broken.
17465 (pupa_free): If the first free header is not free actually, set
17468 * kern/main.c (pupa_load_normal_mode): Just load the module
17470 (pupa_main): Don't print the message
17471 "Entering into rescue mode..." here.
17473 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17475 (pupa_rescue_cmd_initrd): Likewise.
17476 (pupa_rescue_cmd_initrd): Likewise.
17478 * include/pupa/symbol.h (FUNCTION): Specify the type.
17479 (VARIABLE): Likewise.
17481 * include/pupa/err.h (pupa_err_t): Added
17482 PUPA_ERR_UNKNOWN_COMMAND.
17484 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17485 (pupa_dl_get_prefix): Likewise.
17487 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17488 Added _chain.mod and _linux.mod instead of chain.mod and
17490 (chain_mod_SOURCES): Renamed to ...
17491 (_chain_mod_SOURCES): ... this.
17492 (chain_mod_CFLAGS): Renamed to ...
17493 (_chain_mod_CFLAGS): ... this.
17494 (linux_mod_SOURCES): Renamed to ...
17495 (_linux_mod_SOURCES): ... this.
17496 (linux_mod_CFLAGS): Renamed to ...
17497 (_linux_mod_CFLAGS): ... this.
17498 (normal_mod_SOURCES): New variable.
17499 (normal_mod_CFLAGS): Likewise.
17500 (normal_mod_ASFLAGS): Likewise.
17502 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17504 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17507 * kern/dl.c (pupa_dl_ref): Refer depending modules
17509 (pupa_dl_unref): Unrefer depending modules recursively.
17510 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17511 a module is unloaded before one depending on that module is
17513 (pupa_dl_unload): Unload depending modules explicitly,
17516 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17518 * include/pupa/i386/pc/linux.h: New file.
17519 * loader/i386/pc/linux.c: Likewise.
17521 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17523 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17524 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17525 of PUPA_CHAINLOADER_BOOT_SECTOR.
17527 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17528 (pupa_linux_prot_size): New variable.
17529 (pupa_linux_tmp_addr): Likewise.
17530 (pupa_linux_real_addr): Likewise.
17531 (pupa_linux_boot_zimage): New function.
17532 (pupa_linux_boot_bzimage): Likewise.
17534 * kern/i386/pc/init.c (struct mem_region): New structure.
17535 (MAX_REGIONS): New macro.
17536 (mem_regions): New variable.
17537 (num_regions): Likewise.
17538 (pupa_os_area_addr): Likewise.
17539 (pupa_os_area_size): Likewise.
17540 (pupa_lower_mem): Likewise.
17541 (pupa_upper_mem): Likewise.
17542 (add_mem_region): New function.
17543 (compact_mem_regions): Likewise.
17544 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17545 the size of the conventional memory and that of so-called upper
17546 memory (before the first memory hole).
17547 Instead of adding each found region to free memory, use
17548 add_mem_region and add them after removing overlaps.
17549 Also, add only 1/4 of the upper memory to free memory. The rest
17550 is used for loading OS images. Maybe this is ad hoc, but this
17551 makes it much easier to relocate OS images when booting.
17553 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17554 (pupa_enter_rescue_mode): Don't register initrd and module.
17556 * kern/mm.c: Include pupa/dl.h.
17558 * kern/main.c: Include pupa/file.h and pupa/device.h.
17560 * kern/loader.c (pupa_loader_load_module_func): Removed.
17561 (pupa_loader_load_module): Likewise.
17563 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17566 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17567 (pupa_linux_tmp_addr): Likewise.
17568 (pupa_linux_real_addr): Likewise.
17569 (pupa_linux_boot_zimage): Likewise.
17570 (pupa_linux_boot_bzimage): Likewise.
17572 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17573 (pupa_upper_mem): Likewise.
17574 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17575 module is too dangerous.
17577 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17578 (pupa_os_area_size): Likewise.
17579 (pupa_loader_set): Remove the first argument. Loader doesn't
17580 manage modules or initrd any longer.
17581 (pupa_loader_load_module): Removed.
17583 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17584 (linux_mod_SOURCES): New variable.
17585 (linux_mod_CFLAGS): Likewise.
17587 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17589 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17590 the length of a blocklist correctly.
17592 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17593 Use ioctl only if the OS file is a block device.
17594 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17595 not very useful for normal files.
17597 * kern/main.c (pupa_set_root_dev): New function.
17598 (pupa_load_normal_mode): Likewise.
17599 (pupa_main): Call those above.
17601 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17604 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17606 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17608 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17609 (setup): Configure the installed partition information and the
17612 * loader/i386/pc/chainloader.c (my_mod): New variable.
17613 (pupa_chainloader_unload): New function.
17614 (pupa_rescue_cmd_chainloader): Refer itself.
17615 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17617 * kern/i386/pc/startup.S (install_partition): Removed.
17618 (version_string): Likewise.
17619 (config_file): Likewise.
17620 (pupa_install_dos_part): New variable.
17621 (pupa_install_bsd_part): Likewise.
17622 (pupa_prefix): Likewise.
17623 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17625 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17627 (make_install_device): New function.
17628 (pupa_machine_init): Set the dl prefix.
17630 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17631 (buf): Renamed to ...
17632 (linebuf): ... this.
17633 (pupa_rescue_cmd_prefix): New function.
17634 (pupa_rescue_cmd_insmod): Likewise.
17635 (pupa_rescue_cmd_rmmod): Likewise.
17636 (pupa_rescue_cmd_lsmod): Likewise.
17637 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17640 * kern/mm.c (pupa_memalign): If failed even after invalidating
17641 disk caches, unload unneeded modules and retry.
17643 * kern/misc.c (pupa_memmove): New function.
17644 (pupa_memcpy): Removed.
17645 (pupa_strcpy): New function.
17646 (pupa_itoa): Made static.
17648 * kern/dl.c (pupa_dl_iterate): New function.
17649 (pupa_dl_ref): Likewise.
17650 (pupa_dl_unref): Likewise.
17651 (pupa_dl_unload): Return if succeeded or not.
17652 (pupa_dl_unload_unneeded): New function.
17653 (pupa_dl_unload_all): Likewise.
17654 (pupa_dl_init): Renamed to ...
17655 (pupa_dl_set_prefix): ... this.
17656 (pupa_dl_get_prefix): New function.
17658 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17659 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17660 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17661 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17662 (pupa_install_dos_part): Declared.
17663 (pupa_install_bsd_part): Likewise.
17664 (pupa_prefix): Likewise.
17665 (pupa_boot_drive): Likewise.
17667 * include/pupa/types.h: Fix a typo.
17669 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17671 (pupa_memmove): Declared.
17672 (pupa_strcpy): Likewise.
17674 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17675 pupa_mod_init takes one argument, its own module.
17676 (pupa_dl_unload_unneeded): Declared.
17677 (pupa_dl_unload_all): Likewise.
17678 (pupa_dl_ref): Likewise.
17679 (pupa_dl_unref): Likewise.
17680 (pupa_dl_iterate): Likewise.
17681 (pupa_dl_init): Renamed to ...
17682 (pupa_dl_set_prefix): ... this.
17683 (pupa_dl_get_prefix): Declared.
17685 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17686 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17688 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17689 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17691 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17692 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17694 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17696 * util/i386/pc/pupa-setup.c (setup): Define the internal
17697 function find_first_partition_start at the top level, because GCC
17698 3.0.x cannot compile internal functions in deeper scopes
17700 (find_root_device): Use lstat instead of stat.
17701 Don't follow symbolic links.
17702 Fix the path-constructing code.
17704 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17705 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17706 by a BLKGETSIZE ioctl first, because block devices don't fill
17707 the member st_mode of the structure stat on Linux.
17708 [__linux__] (linux_find_partition): Use a temporary buffer
17709 REAL_DEV for the working space. Copy it to DEV before returning.
17710 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17711 buffer cache consistent.
17712 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17713 strncmp. The previous value was merely wrong.
17714 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17716 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17717 FAT size is 12. The previous value was merely wrong.
17719 * kern/main.c (pupa_main): Don't split the starting message from
17722 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17723 LF, because BIOS goes crazy about character attributes in this
17726 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17728 * include/i386/pc/util/biosdisk.h: New file.
17729 * util/i386/pc/biosdisk.c: Likewise.
17730 * util/i386/pc/pupa-setup.c: Likewise.
17732 * Makefile.in (INCLUDE_DISTFILES): Added
17733 include/pupa/i386/pc/util/biosdisk.h.
17734 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17735 directory util/i386/pc.
17736 (install-local): Added a rule for sbin_UTILITIES.
17737 (uninstall): Likewise.
17739 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17741 * util/misc.c (xrealloc): New function.
17742 (pupa_malloc): Likewise.
17743 (pupa_free): Likewise.
17744 (pupa_realloc): Likewise.
17745 (pupa_stop): Likewise.
17746 (pupa_putchar): Likewise.
17748 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17750 * include/pupa/util/misc.h (xrealloc): Declared.
17752 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17754 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17755 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17757 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17758 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17760 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17761 way should be implemented.
17762 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17764 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17765 the size of NAME for safety.
17766 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17769 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17770 (pupa_setup_SOURCES): Likewise.
17772 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17774 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17776 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17777 bunch of pushl's from pusha, because this destroys the return
17780 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17782 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17783 This means that any missing prototypes could be fatal. Also, you
17784 must take care when writing assembly code. See the comments at
17785 the beginning of startup.S, for more details.
17787 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17788 compilation mechanism.
17789 (pupa_chainloader_real_boot): Likewise.
17790 (pupa_biosdisk_rw_int13_extensions): Likewise.
17791 (pupa_biosdisk_rw_standard): Likewise.
17792 (pupa_biosdisk_check_int13_extensions): Likewise.
17793 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17794 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17795 (pupa_get_memsize): Likewise.
17796 (pupa_get_mmap_entry): Likewise.
17797 (pupa_console_putchar): Likewise.
17798 (pupa_console_setcursor): Likewise.
17799 (pupa_getrtsecs): Use pushl instead of push.
17801 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17802 memory instead of the stack for a mmap entry, because some
17803 BIOSes may ignore the maximum size and overflow.
17805 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17807 * genmk.rb (PModule#rule): Compile automatically generated
17808 sources with module-specific CFLAGS as well as other sources.
17810 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17812 * configure.ac: Check ld.
17813 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17814 respectively, before checking endianness and sizes.
17816 * Makefile.in (LD): New variable.
17818 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17820 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17822 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17824 * Changelog: New file.