1 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
3 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
5 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
7 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
11 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
12 * script/sh/lexer.c (grub_script_lexer_init): initilaise was_newline
13 (grub_script_yylex): don't segfault on unterminated script
14 newline terminates command and variable
16 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
18 avoid double grub_adjust_range call. Bug reported by David Simner
20 * kern/disk.c (grub_disk_write): change to raw disk access before
23 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
25 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
26 spaces, for the benefit of help2man.
27 * util/i386/efi/grub-mkimage.c (usage): Likewise.
29 2009-06-16 Pavel Roskin <proski@gnu.org>
31 * kern/i386/halt.c: Include grub/machine/init.h.
32 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
34 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
36 * util/grub.d/30_os-prober.in: Use ${root} in the generated
39 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
41 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
44 2009-06-16 Pavel Roskin <proski@gnu.org>
46 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
47 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
48 save %dx, we only need %dl and we never change it.
49 * boot/i386/pc/cdboot.S: Don't set the root drive.
50 * boot/i386/pc/pxeboot.S: Likewise.
51 * include/grub/i386/pc/boot.h: Remove
52 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
53 GRUB_BOOT_MACHINE_DRIVE_CHECK.
54 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
55 * kern/i386/pc/init.c (make_install_device): Remove references
57 * kern/i386/pc/startup.S: Likewise.
58 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
60 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
64 * commands/xnu_uuid.c: new file
65 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
66 (xnu_uuid_mod_SOURCES): new variable
67 (xnu_uuid_mod_CFLAGS): likewise
68 (xnu_uuid_mod_LDFLAGS): likewise
69 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
70 * conf/i386-ieee1275.rmk: likewise
71 * conf/i386-pc.rmk: likewise
72 * conf/powerpc-ieee1275.rmk: likewise
73 * conf/sparc64-ieee1275.rmk: likewise
74 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
76 2009-06-16 Pavel Roskin <proski@gnu.org>
78 * configure.ac: Avoid '==' in test command, it's not portable.
80 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
84 * commands/probe.c: new file
85 * conf/common.rmk (pkglib_MODULES): add probe.mod
86 (probe_mod_SOURCES): new variable
87 (probe_mod_CFLAGS): likewise
88 (probe_mod_LDFLAGS): likewise
89 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
90 * conf/i386-ieee1275.rmk: likewise
91 * conf/i386-pc.rmk: likewise
92 * conf/powerpc-ieee1275.rmk: likewise
93 * conf/sparc64-ieee1275.rmk: likewise
95 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
97 Fix handling of string like \"hello\" and "a
100 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
101 (grub_script_yylex): fix parsing of quoting, escaping and newline
103 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
105 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
108 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
110 * util/grub-mkconfig.in: Fix parsing of --output option.
112 2009-06-12 Pavel Roskin <proski@gnu.org>
114 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
115 genmk.rb don't need to be generated or installed.
117 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
119 * commands/i386/pc/drivemap_int13h.S: add more comments
121 2009-06-11 Pavel Roskin <proski@gnu.org>
123 * Makefile.in (uninstall): Uninstall manuals.
125 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
126 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
127 and update-grub_lib in two places.
128 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
130 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
133 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
134 `entry_lo' to fix variable shadowing.
136 2009-06-11 Christian Franke <franke@computer.org>
138 * kern/misc.c (__enable_execute_stack): Add missing return type
139 to prevent gcc warning.
141 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
143 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
145 2009-06-11 Pavel Roskin <proski@gnu.org>
147 * Makefile.in: Don't rely on any scripts being executable.
148 Always use $(SHELL) to run shell scripts.
150 * configure.ac: Always define ___main if using -nostdlib. This
151 fixes tests on Cygwin.
153 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
157 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
158 is in bytes and not in blocks
160 2009-06-11 Pavel Roskin <proski@gnu.org>
162 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
165 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
167 * util/grub.d/30_os-prober.in: Fix a comment. Source
168 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
169 to set the root device. Place drivemap command in the generated
172 2009-06-11 Pavel Roskin <proski@gnu.org>
174 * configure.ac: Remove host_m32. Issues with 64-bit utilities
175 have long been resolved.
177 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
179 * util/grub.d/10_linux.in: Capitalise "Linux".
181 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
183 2009-06-11 Pavel Roskin <proski@gnu.org>
185 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
186 fix a gcc warning and ensure that the function won't ever exit.
188 * kern/i386/ieee1275/init.c: Add missing prototype for
191 * loader/ieee1275/multiboot2.c [__i386__]: Include
192 grub/cpu/multiboot.h.
194 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
195 casts to short - they are not portable and cause warnings. Fix
196 use of uninitialized values in input_buf. Use ARRAY_SIZE.
198 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
202 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
204 (grub_get_root_biosnumber_saved): new variable
205 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
206 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
207 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
208 %dx after the call if necessary
209 * conf/common.rmk (pkglib_MODULES): remove boot.mod
210 (boot_mod_SOURCES): remove
211 (boot_mod_CFLAGS): remove
212 (boot_mod_LDFLAGS): remove
213 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
214 (boot_mod_SOURCES): new variable
215 (boot_mod_CFLAGS): likewise
216 (boot_mod_LDFLAGS): likewise
217 * conf/i386-efi.rmk: likewise
218 * conf/i386-ieee1275.rmk: likewise
219 * conf/i386-pc.rmk: likewise
220 * conf/powerpc-ieee1275.rmk: likewise
221 * conf/sparc64-ieee1275.rmk: likewise
222 * conf/x86_64-efi.rmk: likewise
223 * include/grub/i386/pc/biosnum.h: new file
224 * lib/i386/pc/biosnum.c: likewise
225 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
226 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
227 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
229 2009-06-10 Pavel Roskin <proski@gnu.org>
231 * io/gzio.c (test_header): Don't reuse one buffer for all data.
232 Use separate variables. Read only the file size at the end, but
233 not the checksum that we don't use.
235 * kern/file.c (grub_file_read): Use void pointer for the buffer.
238 * kern/ieee1275/openfw.c: Remove libc includes.
239 * kern/ieee1275/cmain.c: Likewise.
240 * include/grub/ieee1275/ieee1275.h: Likewise.
242 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
245 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
247 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
248 `genparttoollist.sh'.
249 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
250 Add `*.sh' to the list find searches for and change `mdate.sh'
253 2009-06-10 Pavel Roskin <proski@gnu.org>
255 * include/grub/multiboot2.h: Provide compatibility defines for
257 * include/multiboot2.h: Include stdint.h only if needed, using
259 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
261 * loader/ieee1275/multiboot2.c: Likewise.
262 * loader/multiboot2.c: Likewise.
263 * loader/multiboot_loader.c: Likewise.
265 * configure.ac: Use -nostdlib when probing for the target. It
266 should not be required to have libc for the target.
268 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
269 they fail without libc headers for the target.
270 * include/grub/powerpc/libgcc.h: Use weak attribute for all
272 * include/grub/sparc64/libgcc.h: Likewise. Don't use
273 preprocessor conditionals.
275 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
276 build system doesn't need to be aware of the tar.c internals.
278 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
280 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
282 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
284 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
285 disk limit to 26 for IDE, Virtio, Xen and SCSI.
287 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
289 * util/i386/pc/grub-install.in: Change the error message if UUIDs
290 aren't available if ata.mod gets used.
292 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
294 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
295 initialising controller.
296 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
298 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
300 * util/i386/pc/grub-install.in: Add a parameter --disk-module
301 to choose between ata and biosdisk module on i386-pc.
303 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
305 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
306 Subclass and Programming Interface fields in terms of the 3 byte
308 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
310 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
311 interface is OHCI. Add grub_dprintf for symmetry with
313 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
314 interface is UHCI. Add interf variable for programming
315 interface. Print interface with class/subclass.
317 * bus/usb/ohci.c: Set interf with correct field.
319 * bus/usb/uhci.c: Remove unneeded doubled lines.
320 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
321 Remove whitespace inside comment.
323 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
325 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
326 as fallback an equivalent option without depth.
328 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
330 Not fail if unable to retrieve C/H/S on LBA disks
332 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
333 if unable to retrieve C/H/S on LBA disks
335 2009-06-08 Pavel Roskin <proski@gnu.org>
337 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
340 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
342 * Makefile.in (uninstall): Remove all $lib_DATA files.
344 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
346 Bugfix: install on partitionless device
348 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
351 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
353 * Makefile.in (uninstall): Remove all $include_DATA files.
355 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
357 * commands/true.c: New file. Implement the true and false commands.
358 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
359 (true_mod_SOURCES): New variable.
360 (true_mod_CFLAGS): Likewise.
361 (true_mod_LDFLAGS): Likewise.
363 2009-06-05 Colin D Bennett <colin@gibibit.com>
365 Optimized font character lookup using binary search instead of linear
366 search. Fonts now are required to have the character index ordered by
369 * font/font.c (load_font_index): Verify that fonts have ordered
371 (find_glyph): Use binary search instead of linear search to find a
374 2009-06-05 Michael Scherer <misc@mandriva.org>
376 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
377 uses case sensitive btree.
378 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
379 only for case insensitive filesystems.
381 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
383 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
384 * conf/common.rmk (search_mod_CFLAGS): likewise
386 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
388 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
389 compensate a compiler bug
391 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
393 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
396 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
398 Definitions for creating asm symbols with Apple's CC
400 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
401 [APPLE_CC] (VARIABLE): likewise
403 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
405 Disable lnxboot.img when compiled
408 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
409 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
410 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
411 [! APPLE_CC] (CODE_LENG): skip
412 [! APPLE_CC] (setup_sects): likewise
413 [! APPLE_CC]: skip filling
415 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
417 Address in trampolines based on 32-bit registers when compiled
420 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
422 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
424 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
426 Avoid aliases when compiling with Apple's CC for PCBIOS machine
428 * kern/misc.c [APPLE_CC] (memcpy): new function
429 [APPLE_CC] (memmove): likewise
430 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
431 (memcpy): define alias conditionally on !APPLE_CC
434 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
436 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
437 (grub_assert_fail): make prototype conditional
439 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
441 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
443 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
445 (CLEANFILES): add grub-macho2img
446 (grub_macho2img_SOURCES): new variable
447 * kern/i386/pc/startup.S (bss_start): new variable
449 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
450 * util/grub-macho2img.c: new file
452 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
454 Use objconv when compiling with Apple's CC
456 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
457 (efiemu64.o): likewise
458 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
459 when compiling with Apple's CC
460 (efiemu64_s.o): likewise
461 * configure.ac: check for objconv when compiling with Apple's CC
462 * genmk.rb: use objconv for modules when compiled with Apple's CC
464 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
466 Define segment as well as section when compiling with
469 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
470 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
471 (efiemu_convert_pointer): likewise
472 (efiemu_set_virtual_address_map): likewise
473 (efiemu_convert_pointer): likewise
474 (efiemu_getcrc32): likewise
475 (init_crc32_table): likewise
477 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
478 (GRUB_MOD_DEP): likewise
480 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
482 Allow a compilation without -mcmodel=large
484 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
485 when compiled without -mcmodel=large
486 (filter_memory_map): remove memory post 4 GiB when compiled
487 without -mcmodel=large
488 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
489 TARGET_CFLAGS when -mcmodel=large isn't supported
491 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
493 Remove nested functions in efiemu core
495 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
497 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
499 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
501 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
503 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
505 (grub_cpu_is_tsc_supported): likewise
506 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
508 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
510 Absolute addressing through constant with Apple's cc
512 * kern/i386/pc/startup.S: Define necessary constants
513 and address through it when using ABS with Apple's CC
514 * boot/i386/pc/diskboot.S: likewise
515 * boot/i386/pc/boot.S: likewise
516 * boot/i386/pc/lnxboot.S: likewise
517 * boot/i386/pc/cdboot.S: likewise
518 * mmap/i386/pc/mmap_helper.S: likewise
519 * commands/i386/pc/drivemap_int13h.S: likewise
521 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
523 Check if compiler is apple cc
525 * Makefile.in (ASFLAGS): new variable
526 (TARGET_ASFLAGS): likewise
527 (TARGET_MODULE_FORMAT): likewise
528 (TARGET_APPLE_CC): likewise
530 (TARGET_IMG_CFLAGS): likewise
531 (TARGET_CPPFLAGS): add includedir
532 * configure.ac: call grub_apple_cc and grub_apple_target_cc
533 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
534 Check for linker script only if compiler isn't Apple's CC
535 (TARGET_MODULE_FORMAT): set
536 (TARGET_APPLE_CC): likewise
537 (TARGET_ASFLAGS): likewise
539 Check for objcopy only if compiler isn't Apple's CC
540 Check for BSS symbol only if compiler isn't Apple's CC
541 * genmk.rb: adapt nm options if we use Apple's utils
542 * aclocal.m4 (grub_apple_cc): new test
543 (grub_apple_target_cc): likewise
545 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
547 Simplify sed expressions and improve awk
549 * Makefile.in (install-local): simplify sed expression
550 * gencmdlist.sh: likewise
551 * genmoddep.awk: avoid adding module as a dependency of itself
553 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
555 Add missing start symbols
557 * boot/i386/pc/boot.S: add start
558 * boot/i386/pc/pxeboot.S: likewise
560 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
562 Fix wrong assumptions with grub-mkimage on EFI
564 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
565 (relocate_addresses): consider both r_addend and value at offset
566 (make_mods_section): zerofill modinfo and header
567 (convert_elf): write prefix here
569 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
571 Use .asciz instead of .string
573 * i386/pc/diskboot.S: use .asciz instead of .string
574 * i386/pc/boot.S: likewise
575 * include/grub/dl.h (GRUB_MOD_DEP): likewise
576 (GRUB_MOD_NAME): likewise
578 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
582 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
583 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
584 (grub_video_setup): remove
585 (grub_video_set_mode): new prototype
586 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
588 (linux_vesafb_res): compile only on PCBIOS
589 (grub_linux_boot): support gfxpayload
590 * loader/i386/pc/xnu.c (video_hook): new function
591 (grub_xnu_set_video): support gfxpayload
592 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
593 (DEFAULT_VIDEO_HEIGHT): likewise
594 (DEFAULT_VIDEO_FLAGS): likewise
595 (DEFAULT_VIDEO_MODE): new definition
596 (video_hook): new function
597 (grub_gfxterm_init): use grub_video_set_mode
598 * util/grub.d/30_os-prober.in: remove explicit modesetting before
600 * video/video.c (grub_video_setup): removed
601 (grub_video_set_mode): new function based on grub_gfxterm_init and
604 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
606 Avoid calling biosdisk in drivemap
608 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
609 (revparse_biosdisk): likewise
610 (list_mappings): derive name from id directly
611 (grub_cmd_drivemap): use tryparse_diskstring
613 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
617 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
618 (grub_lexer_param): add tokenonhold
619 (grub_script_create_cmdline): remove cmdline. All callers updated
620 (grub_script_function_create): make functionname
621 grub_script_arg. All callers updated
622 (grub_script_execute_argument_to_string): new prototype
623 * kern/parser.c (state_transitions): reorder
624 (grub_parser_cmdline_state): fix a bug and make more compact
625 * script/sh/execute.c (grub_script_execute_argument_to_string):
627 (grub_script_execute_cmdline): use new format
628 * script/sh/function.c (grub_script_function_create): make functionname
629 grub_script_arg. All callers updated
630 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
631 (grub_script_yylex): remove
632 (grub_script_yylex2): renamed to ...
633 (grub_script_yylex): ...renamed
634 parse the expressions like a${b}c
635 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
636 (GRUB_PARSER_TOKEN_VAR): remove
637 (GRUB_PARSER_TOKEN_NAME): likewise
638 ("if"): declare as typeless
640 ("function"): likewise
646 (script): accept empty scripts and make exit on error
647 (arguments): use GRUB_PARSER_TOKEN_ARG
649 (command): move error handling to script
650 (menuentry): move grub_script_lexer_ref before
651 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
652 argument. All callers updated
654 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
656 Prevent GRUB from probing floppies during boot.
658 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
659 * commands/search.c (options): Add --no-floppy.
660 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
661 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
662 --no-floppy when searching for UUIDs.
664 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
666 Simplify the code duplication in commands/search.c.
668 * commands/search.c (search_label, search_fs_uuid): Merge into ...
669 (search_fs): ... this. Update all users.
671 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
673 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
675 2009-05-28 Pavel Roskin <proski@gnu.org>
677 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
678 Remove the original symlink explicitly.
680 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
681 just one slash. That's how grub_fshelp_find_file() does it.
683 2009-05-26 Pavel Roskin <proski@gnu.org>
685 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
688 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
691 2009-05-25 Christian Franke <franke@computer.org>
693 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
695 (grub_atapi_identify): Add wait after drive select.
696 (grub_ata_identify): Do more strict status register check before
697 calling grub_atapi_identify (). Suppress error message if status
698 register is 0x00 after command failure. Add status register
699 check after PIO read to avoid bogus identify due to stuck DRQ.
700 Thanks to Pavel Roskin for testing.
701 (grub_device_initialize): Remove unsafe status register check.
702 Thanks to 'phcoder' for problem report and patch.
703 Prevent sign extension in debug message.
705 2009-05-23 Colin D Bennett <colin@gibibit.com>
707 Cleaned up `include/grub/normal.h'. Grouped prototypes by
708 definition file, and functions defined in `normal/menu.c' have had
709 their prototypes moved to `include/grub/menu.h' for consistency.
711 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
713 (grub_menu_get_entry): Likewise.
714 (grub_menu_get_timeout): Likewise.
715 (grub_menu_set_timeout): Likewise.
716 (grub_menu_execute_entry): Likewise.
717 (grub_menu_execute_with_fallback): Likewise.
718 (grub_menu_entry_run): Likewise.
720 * include/grub/normal.h: Re-ordered and grouped function
721 prototypes by file that the function is defined in.
722 (grub_menu_execute_callback): Removed; moved to menu.h.
723 (grub_menu_get_entry): Likewise.
724 (grub_menu_get_timeout): Likewise.
725 (grub_menu_set_timeout): Likewise.
726 (grub_menu_execute_entry): Likewise.
727 (grub_menu_execute_with_fallback): Likewise.
728 (grub_menu_entry_run): Likewise.
729 (grub_menu_addentry): Renamed from this ...
730 (grub_normal_add_menu_entry): ... to this.
732 * normal/main.c (grub_menu_addentry): Renamed from this ...
733 (grub_normal_add_menu_entry): ... to this.
735 * script/sh/execute.c (grub_script_execute_menuentry): Update
736 reference to renamed grub_menu_addentry function.
738 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
740 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
742 2009-05-22 Pavel Roskin <proski@gnu.org>
744 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
745 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
746 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
747 compiling for the i386 targets, but not for the utilities.
749 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
751 (grub_root_drive): Likewise.
752 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
754 (grub_root_drive): Change size to byte.
755 (grub_start_addr): Remove.
756 (grub_end_addr): Likewise.
757 (grub_apm_bios_info): Likewise.
759 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
761 * normal/i386: Remove.
762 * normal/powerpc: Likewise.
763 * normal/sparc64: Likewise.
764 * normal/x86_64: Likewise.
766 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
768 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
769 * loader/i386/linux_trampoline.S: Fix indentation
770 * loader/i386/xnu_helper.S: Likewise
772 2009-05-18 Colin D Bennett <colin@gibibit.com>
774 Display error messages when parsing a Lua statement fails.
775 Previously, executing a syntactically invalid statement like
776 ")foo" or "bar;" would silently fail.
778 * script/lua/grub_main.c (handle_lua_error): New function.
779 (grub_lua_parse_line): Improved reporting of Lua parser and
782 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
784 Remove -Werror which causes build to fail on some systems
786 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
787 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
788 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
790 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
792 trampoline for linux on 64-bit platform
794 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
795 loader/i386/efi/linux_trampoline.S
796 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
798 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
800 * loader/i386/linux_trampoline.S: moved here
801 * loader/i386/efi/linux.c (allocate_pages): reserve space for
803 (jumpvector): removed
804 (grub_linux_trampoline_start): new declaration
805 (grub_linux_trampoline_end): likewise
806 (grub_linux_boot): use trampoline when on 64-bit platform
807 * loader/i386/linux.c: likewise
809 2009-05-16 Pavel Roskin <proski@gnu.org>
811 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
812 const to avoid a warning.
813 (grub_lua_setenv): Likewise.
814 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
815 lmsg to fix a warning.
817 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
819 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
820 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
821 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
822 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
823 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
824 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
825 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
826 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
828 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
830 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
832 2009-05-16 Bean <bean123ch@gmail.com>
834 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
835 (lua_mod_SOURCES): New variable.
836 (lua_mod_CFLAGS): Likewise.
837 (lua_mod_LDFLAGS): Likewise.
839 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
840 (setjmp_mod_SOURCES): New variable.
841 (setjmp_mod_CFLAGS): Likewise.
842 (setjmp_LDFLAGS): Likewise.
844 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
845 (setjmp_mod_SOURCES): New variable.
846 (setjmp_mod_CFLAGS): Likewise.
847 (setjmp_LDFLAGS): Likewise.
849 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
850 (setjmp_mod_SOURCES): New variable.
851 (setjmp_mod_CFLAGS): Likewise.
852 (setjmp_LDFLAGS): Likewise.
854 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
855 (setjmp_mod_SOURCES): New variable.
856 (setjmp_mod_CFLAGS): Likewise.
857 (setjmp_LDFLAGS): Likewise.
859 * normal/i386/setjmp.S: Moved from here ...
860 * lib/i386/setjmp.S: ... Moved here
861 * normal/x86_64/setjmp.S: Moved from here ...
862 * lib/x86_64/setjmp.S: ... Moved here
863 * normal/powerpc/setjmp.S: Moved from here ...
864 * lib/powerpc/setjmp.S: ... Moved here
865 * normal/sparc64/setjmp.S: Moved from here ...
866 * lib/sparc64/setjmp.S: ... Moved here
868 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
869 returns_twice in mingw.
871 * script/lua/grub_lib.c: New file.
872 * script/lua/grub_lib.h: Likewise.
873 * script/lua/grub_lua.h: Likewise.
874 * script/lua/grub_main.c: Likewise.
875 * script/lua/lapi.c: Likewise.
876 * script/lua/lapi.h: Likewise.
877 * script/lua/lauxlib.c: Likewise.
878 * script/lua/lauxlib.h: Likewise.
879 * script/lua/lbaselib.c: Likewise.
880 * script/lua/lcode.c: Likewise.
881 * script/lua/lcode.h: Likewise.
882 * script/lua/ldblib.c: Likewise.
883 * script/lua/ldebug.c: Likewise.
884 * script/lua/ldebug.h: Likewise.
885 * script/lua/ldo.c: Likewise.
886 * script/lua/ldo.h: Likewise.
887 * script/lua/ldump.c: Likewise.
888 * script/lua/lfunc.c: Likewise.
889 * script/lua/lfunc.h: Likewise.
890 * script/lua/lgc.c: Likewise.
891 * script/lua/lgc.h: Likewise.
892 * script/lua/linit.c: Likewise.
893 * script/lua/liolib.c: Likewise.
894 * script/lua/llex.c: Likewise.
895 * script/lua/llex.h: Likewise.
896 * script/lua/llimits.h: Likewise.
897 * script/lua/lmathlib.c: Likewise.
898 * script/lua/lmem.c: Likewise.
899 * script/lua/lmem.h: Likewise.
900 * script/lua/loadlib.c: Likewise.
901 * script/lua/lobject.c: Likewise.
902 * script/lua/lobject.h: Likewise.
903 * script/lua/lopcodes.c: Likewise.
904 * script/lua/lopcodes.h: Likewise.
905 * script/lua/loslib.c: Likewise.
906 * script/lua/lparser.c: Likewise.
907 * script/lua/lparser.h: Likewise.
908 * script/lua/lstate.c: Likewise.
909 * script/lua/lstate.h: Likewise.
910 * script/lua/lstring.c: Likewise.
911 * script/lua/lstring.h: Likewise.
912 * script/lua/lstrlib.c: Likewise.
913 * script/lua/ltable.c: Likewise.
914 * script/lua/ltable.h: Likewise.
915 * script/lua/ltablib.c: Likewise.
916 * script/lua/ltm.c: Likewise.
917 * script/lua/ltm.h: Likewise.
918 * script/lua/lua.h: Likewise.
919 * script/lua/luaconf.h: Likewise.
920 * script/lua/lualib.h: Likewise.
921 * script/lua/lundump.c: Likewise.
922 * script/lua/lundump.h: Likewise.
923 * script/lua/lvm.c: Likewise.
924 * script/lua/lvm.h: Likewise.
925 * script/lua/lzio.c: Likewise.
926 * script/lua/lzio.h: Likewise.
928 2009-05-16 Bean <bean123ch@gmail.com>
930 * include/grub/kernel.h (grub_module_header_types): Add type
933 * kern/main.c (grub_load_config): New function.
934 (grub_main): Call grub_load_config to read boot config.
936 * grub-mkimage (generate_image): New parameter config_path.
937 (options): New option --config.
938 (main): Parse --config option, and pass it to generate_image.
940 2009-05-14 Christian Franke <franke@computer.org>
942 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
943 This fixes build on Cygwin.
945 2009-05-14 Pavel Roskin <proski@gnu.org>
947 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
948 jump. This saves two bytes, so the typical case of 2 swapped
949 drives would fit 32 bytes.
951 2009-05-13 Pavel Roskin <proski@gnu.org>
953 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
954 grub_uint32_t to avoid a warning.
956 * loader/i386/linux.c (allocate_pages): When assigning
957 real_mode_mem, cast through grub_size_t to fix a warning. The
958 code already makes sure that the value would fit a pointer.
959 (grub_linux_setup_video): Cast render_target->data to
960 grub_size_t to fix a warning.
962 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
964 * commands/i386/pc/drivemap.c: New file - implement drivemap
966 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
967 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
969 2009-05-13 Pavel Roskin <proski@gnu.org>
971 * util/i386/pc/grub-setup.c (setup): Remove unused variable
972 embedding_area_exists.
974 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
976 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
977 it easier to understand / work with.
978 Improve warning messages for cases where there's no embedding area,
979 or when it is too small (or core.img too large).
981 2009-05-13 Pavel Roskin <proski@gnu.org>
983 * loader/i386/pc/multiboot2.c: Add necessary includes for
984 grub_multiboot2_real_boot().
986 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
987 PX record is always little-endian. We only need the lower 2
990 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
991 facilitate code reuse.
992 (grub_cpio_mount): Use "struct head", not a char buffer. This
993 fixes a warning reported by gcc 4.4.
995 * kernel/disk.c (grub_disk_read): Use void pointer for the
997 (grub_disk_write): Use const void pointer for the buffer.
998 Adjust all callers. Remove unnecessary casts.
1000 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1002 * util/i386/pc/grub-install.in: Update copyright year.
1004 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1008 * commands/gptsync.c: new file
1009 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1010 (gptsync_mod_SOURCES): new variable
1011 (gptsync_mod_CFLAGS): likewise
1012 (gptsync_mod_LDFLAGS): likewise
1013 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1015 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1016 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1017 * conf/i386-ieee1275.rmk: likewise
1018 * conf/i386-pc.rmk: likewise
1019 * conf/powerpc-ieee1275.rmk: likewise
1021 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1025 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1026 (grub_dl_ref): likewise
1028 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1030 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1031 split in two functions (one for msdos and one for gpt).
1033 2009-05-08 Pavel Roskin <proski@gnu.org>
1035 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1038 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1039 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1040 Initialize them with -1. Add sanity check for bad1. Eliminate
1043 2009-05-08 David S. Miller <davem@davemloft.net>
1045 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1047 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1049 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1052 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
1054 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1055 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1057 2009-05-05 David S. Miller <davem@davemloft.net>
1059 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1061 2009-05-05 Pavel Roskin <proski@gnu.org>
1063 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1064 of grub_dl_ref() and grub_dl_unref().
1065 * commands/parttool.c: Remove preprocessor conditionals around
1066 grub_dl_ref() and grub_dl_unref().
1067 * fs/affs.c: Likewise.
1068 * fs/afs.c: Likewise.
1069 * fs/cpio.c: Likewise.
1070 * fs/ext2.c: Likewise.
1071 * fs/fat.c: Likewise.
1072 * fs/hfs.c: Likewise.
1073 * fs/hfsplus.c: Likewise.
1074 * fs/iso9660.c: Likewise.
1075 * fs/jfs.c: Likewise.
1076 * fs/minix.c: Likewise.
1077 * fs/ntfs.c: Likewise.
1078 * fs/reiserfs.c: Likewise.
1079 * fs/sfs.c: Likewise.
1080 * fs/udf.c: Likewise.
1081 * fs/ufs.c: Likewise.
1082 * fs/xfs.c: Likewise.
1083 * include/grub/dl.h: Likewise.
1084 * loader/xnu.c: Likewise.
1086 2009-05-04 Pavel Roskin <proski@gnu.org>
1088 * commands/acpi.c: Remove unused variable my_mod.
1089 * partmap/amiga.c: Likewise.
1090 * partmap/apple.c: Likewise.
1091 * partmap/gpt.c: Likewise.
1092 * partmap/pc.c: Likewise.
1093 * partmap/sun.c: Likewise.
1094 * term/gfxterm.c: Likewise.
1095 * term/i386/pc/vesafb.c: Likewise.
1096 * term/i386/pc/vga.c: Likewise.
1098 2009-05-04 David S. Miller <davem@davemloft.net>
1100 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1101 pointer args to grub_ieee1275_get_property().
1103 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1105 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1106 devices, and do not traverse down under controller nodes.
1108 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1109 (grub_ofdisk_open): Use it to un-escape "," characters.
1110 * kern/disk.c (find_part_sep): New.
1111 (grub_disk_open): Use it to find the first non-escaped ','
1112 character in the disk name.
1113 * util/ieee1275/devicemap.c (escape_of_path): New.
1114 (grub_util_emit_devicemap_entry): Use it.
1115 * util/sparc64/ieee1275/grub-install.in: Update script to
1116 strip partition specifiers properly by not triggering on
1117 '\' escaped ',' characters.
1119 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1121 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1123 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1125 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1126 on documentation from Wikipedia).
1128 2009-05-04 Pavel Roskin <proski@gnu.org>
1130 * disk/ata.c: Spelling fixes.
1131 * disk/raid.c: Likewise.
1132 * disk/usbms.c: Likewise.
1133 * disk/dmraid_nvidia.c: Likewise.
1134 * kern/ieee1275/openfw.c: Likewise.
1135 * kern/ieee1275/init.c: Likewise.
1136 * kern/ieee1275/cmain.c: Likewise.
1137 * boot/i386/pc/cdboot.S: Likewise.
1138 * video/readers/png.c: Likewise.
1139 * video/i386/pc/vbe.c: Likewise.
1140 * fs/udf.c: Likewise.
1141 * fs/hfs.c: Likewise.
1142 * fs/reiserfs.c: Likewise.
1143 * efiemu/runtime/efiemu.c: Likewise.
1144 * efiemu/main.c: Likewise.
1145 * efiemu/mm.c: Likewise.
1146 * include/grub/elf.h: Likewise.
1147 * include/grub/xnu.h: Likewise.
1148 * include/grub/usbdesc.h: Likewise.
1149 * include/grub/usb.h: Likewise.
1150 * include/grub/script_sh.h: Likewise.
1151 * include/grub/lib/LzmaEnc.h: Likewise.
1152 * include/grub/efiemu/efiemu.h: Likewise.
1153 * include/grub/command.h: Likewise.
1154 * normal/menu.c: Likewise.
1155 * normal/main.c: Likewise.
1156 * normal/datetime.c: Likewise.
1157 * bus/usb/uhci.c: Likewise.
1158 * mmap/i386/uppermem.c: Likewise.
1159 * mmap/mmap.c: Likewise.
1160 * commands/acpi.c: Likewise.
1161 * commands/test.c: Likewise.
1162 * partmap/apple.c: Likewise.
1163 * font/font.c: Likewise.
1164 * loader/sparc64/ieee1275/linux.c: Likewise.
1165 * loader/macho.c: Likewise.
1166 * loader/i386/bsd_trampoline.S: Likewise.
1167 * loader/i386/bsd.c: Likewise.
1168 * loader/xnu.c: Likewise.
1169 * term/i386/pc/vesafb.c: Likewise.
1170 * term/usb_keyboard.c: Likewise.
1171 * util/resolve.c: Likewise.
1172 * util/getroot.c: Likewise.
1174 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1176 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1178 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1180 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1183 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1185 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1186 parameter only available on BIOS.
1188 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1190 Removed wrong semicolon in declaration
1192 * grub/misc.h (grub_dprintf): remove semicolon
1194 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1196 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1197 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1198 is done by grub_cmd_linux() now).
1199 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1200 restore video to text mode.
1201 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1202 indicates lack of "vga=" parameter. "vga=0" is mapped to
1203 `GRUB_LINUX_VID_MODE_NORMAL'.
1205 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1207 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1208 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1209 and `normal/script.c'. Add `kern/rescue_reader.c',
1210 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1211 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1212 `grub_script.tab.c'.
1214 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1215 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1216 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1217 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1218 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1220 * Makefile.in: Remove duplicated 2008 in Copyright line.
1222 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1224 * util/misc.c (grub_util_warn): New function. Emits a warning
1226 * include/grub/util/misc.h (grub_util_warn): New declaration.
1228 * util/i386/pc/grub-install.in: Understand --force and pass it down
1231 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1233 (setup): Improve error messages and add warnings when requested to
1234 install in odd layouts. Refuse to install using blocklists unless
1237 2009-05-04 martin f. krafft <madduck@madduck.net>
1239 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1241 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1243 Updated copyright year
1245 * fs/hfsplus.c: updated copyright year
1247 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1251 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1252 in the space previously used by unused3
1253 (grub_hfsplus_uuid): new function
1254 (grub_hfsplus_fs): added uuid field
1256 2009-05-03 Pavel Roskin <proski@gnu.org>
1258 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1259 suppress warnings. It's no longer needed.
1260 * disk/host.c: Likewise.
1261 * disk/ata_pthru.c: Likewise.
1262 * disk/loopback.c: Likewise.
1263 * hook/datehook.c: Likewise.
1264 * parttool/pcpart.c: Likewise.
1265 * fs/i386/pc/pxe.c: Likewise.
1266 * fs/ntfscomp.c: Likewise.
1267 * efiemu/main.c: Likewise.
1268 * mmap/mmap.c: Likewise.
1269 * commands/crc.c: Likewise.
1270 * commands/hexdump.c: Likewise.
1271 * commands/hdparm.c: Likewise.
1272 * commands/acpi.c: Likewise.
1273 * commands/echo.c: Likewise.
1274 * commands/minicmd.c: Likewise.
1275 * commands/blocklist.c: Likewise.
1276 * commands/memrw.c: Likewise.
1277 * commands/loadenv.c: Likewise.
1278 * commands/usbtest.c: Likewise.
1279 * commands/lsmmap.c: Likewise.
1280 * commands/boot.c: Likewise.
1281 * commands/parttool.c: Likewise.
1282 * commands/configfile.c: Likewise.
1283 * commands/search.c: Likewise.
1284 * commands/ieee1275/suspend.c: Likewise.
1285 * commands/cat.c: Likewise.
1286 * commands/i386/pc/pxecmd.c: Likewise.
1287 * commands/i386/pc/play.c: Likewise.
1288 * commands/i386/pc/halt.c: Likewise.
1289 * commands/i386/pc/vbeinfo.c: Likewise.
1290 * commands/i386/pc/vbetest.c: Likewise.
1291 * commands/lspci.c: Likewise.
1292 * commands/date.c: Likewise.
1293 * commands/handler.c: Likewise.
1294 * commands/ls.c: Likewise.
1295 * commands/test.c: Likewise.
1296 * commands/cmp.c: Likewise.
1297 * commands/efi/loadbios.c: Likewise.
1298 * commands/efi/fixvideo.c: Likewise.
1299 * commands/halt.c: Likewise.
1300 * commands/help.c: Likewise.
1301 * commands/reboot.c: Likewise.
1302 * hello/hello.c: Likewise.
1303 * script/sh/main.c: Likewise.
1304 * loader/xnu.c: Likewise.
1305 * term/terminfo.c: Likewise.
1306 * term/i386/pc/serial.c: Likewise.
1307 * term/usb_keyboard.c: Likewise.
1309 2009-05-03 David S. Miller <davem@davemloft.net>
1311 * normal/menu.c: Include grub/parser.h
1313 2009-05-03 Pavel Roskin <proski@gnu.org>
1315 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1317 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1318 Suggested by Javier MartÃn <lordhabbit@gmail.com>
1320 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1321 efiemu??.o doesn't exist.
1322 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1325 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
1327 FreeBSD 64-bit support
1329 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1330 and loader/i386/bsd_trampoline.S
1331 (bsd_mod_ASFLAGS): new variable
1332 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1333 (FREEBSD_MODTYPE_KERNEL64): likewise
1334 (grub_bsd64_trampoline_start): likewise
1335 (grub_bsd64_trampoline_end): likewise
1336 (grub_bsd64_trampoline_selfjump): likewise
1337 (grub_bsd64_trampoline_gdt): likewise
1338 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1339 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1340 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1341 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1342 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1344 * loader/i386/bsd_pagetable.c: new file
1345 * loader/i386/bsd_trampoline.S: likewise
1346 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1347 (ALIGN_VAR): likewise
1348 (entry_hi): new variable
1349 (kern_end_mdofs): likewise
1350 (is_64bit): likewise
1351 (grub_freebsd_add_meta): use ALIGN_VAR
1352 (grub_e820_mmap): new declaration
1353 (grub_freebsd_add_mmap): new function
1354 (grub_freebsd_add_meta_module): support 64 bit kernels
1355 (grub_freebsd_list_modules): use ALIGN_VAR
1356 (gdt_descriptor): new declaration
1357 (grub_freebsd_boot): support 64 bit kernels
1358 (grub_bsd_elf64_hook): new function
1359 (grub_bsd_load_elf): support elf64
1361 2009-05-03 Bean <bean123ch@gmail.com>
1363 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1364 after we get the result of if statement.
1366 2009-05-03 Bean <bean123ch@gmail.com>
1368 * Makefile.in (enable_efiemu): New variable.
1370 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1372 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1374 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1375 path, add -mno-red-zone option.
1376 (efiemu64_s.o): Likewise.
1377 (efiemu64.o): Use macro $^ for source file.
1379 * configure.ac (--enable-efiemu): New option.
1381 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1385 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1386 (pkglib_MODULES): add xnu.mod
1387 (xnu_mod_SOURCES): new variable
1388 (xnu_mod_CFLAGS): likewise
1389 (xnu_mod_LDFLAGS): likewise
1390 (xnu_mod_ASFLAGS): likewise
1391 * conf/i386-pc.rmk: likewise
1392 * conf/x86_64-efi.rmk: likewise
1393 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1395 * include/grub/i386/macho.h: new file
1396 * include/grub/i386/xnu.h: likewise
1397 * include/grub/macho.h: likewise
1398 * include/grub/machoload.h: likewise
1399 * include/grub/x86_64/macho.h: likewise
1400 * include/grub/x86_64/xnu.h: likewise
1401 * include/grub/xnu.h: likewise
1402 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1403 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1404 * loader/i386/efi/xnu.c: new file
1405 * loader/i386/pc/xnu.c: likewise
1406 * loader/i386/xnu.c: likewise
1407 * loader/i386/xnu_helper.S: likewise
1408 * loader/macho.c: likewise
1409 * loader/xnu.c: likewise
1410 * loader/xnu_resume.c: likewise
1411 * util/grub-dumpdevtree: likewise
1412 * include/grub/i386/pit.h: include grub/err.h
1413 (grub_pit_wait): export
1414 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1416 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1420 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1421 _linux_efi, linux_efi.
1422 new files in grub-emu
1423 new targets efiemu32.o and efiemu64.o
1424 * loader/linux_normal_efiemu.c: likewise
1425 * loader/i386/efi/linux.c: added preliminary efiemu support
1426 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1428 * include/grub/autoefi.h: new file
1429 * include/grub/i386/efiemu.h: likewise
1430 * include/grub/i386/pc/efiemu.h: likewise
1431 * include/grub/efi/api.h: add LL suffix when necessary
1432 new definitions relating to tables
1433 * include/grub/efiemu/efiemu.h: new file
1434 * include/grub/efiemu/runtime.h: likewise
1435 * efiemu/prepare.c: likewise
1436 * efiemu/loadcore_common.c: likewise
1437 * efiemu/loadcore64.c: likewise
1438 * efiemu/runtime/efiemu.sh: likewise
1439 * efiemu/runtime/efiemu.S: likewise
1440 * efiemu/runtime/efiemu.c: likewise
1441 * efiemu/runtime/config.h: likewise
1442 * efiemu/prepare32.c: likewise
1443 * efiemu/main.c: likewise
1444 * efiemu/modules/pnvram.c: likewise
1445 * efiemu/modules/i386: likewise
1446 * efiemu/modules/i386/pc: likewise
1447 * efiemu/modules/acpi.c: likewise
1448 * efiemu/i386/pc/cfgtables.c: likewise
1449 * efiemu/i386/loadcore64.c: likewise
1450 * efiemu/i386/loadcore32.c: likewise
1451 * efiemu/prepare64.c: likewise
1452 * efiemu/loadcore.c: likewise
1453 * efiemu/symbols.c: likewise
1454 * efiemu/mm.c: likewise
1455 * efiemu/loadcore32.c: likewise
1457 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1461 * commands/acpi.c: new file
1462 * commands/i386/pc/acpi.c: likewise
1463 * commands/efi/acpi.c: likewise
1464 * include/grub/acpi.h: likewise
1465 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1466 (acpi_mod_SOURCES): new variable
1467 (acpi_mod_CFLAGS): likewise
1468 (acpi_mod_LDFLAGS): likewise
1469 * conf/i386-efi.rmk: likewise
1470 * conf/x86_64-efi.rmk: likewise
1472 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1474 Missing part from mmap patch
1476 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1477 (grub_mmap_unregister)
1478 (grub_mmap_free_and_unregister): use grub_mmap_register
1480 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1484 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1485 * loader/i386/linux.c (find_mmap_size): likewise
1486 (allocate_pages): likewise
1487 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1488 (grub_fill_multiboot_mmap): likewise
1489 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1490 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1491 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1492 (OPENBSD_MMAP_RESERVED): likewise
1493 * include/grub/i386/pc/memory.h: include grub/memory.h
1494 (grub_lower_mem): removed
1495 (grub_upper_mem): likewise
1496 (GRUB_MACHINE_MEMORY_ACPI): new definition
1497 (GRUB_MACHINE_MEMORY_NVS): likewise
1498 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1499 (GRUB_MACHINE_MEMORY_HOLE): likewise
1500 (grub_machine_mmap_register): likewise
1501 (grub_machine_mmap_unregister): likewise
1502 (grub_machine_get_upper): likewise
1503 (grub_machine_get_lower): likewise
1504 (grub_machine_get_post64): likewise
1505 * include/grub/i386/efi/memory.h: new file
1506 * include/grub/x86_64/efi/memory.h: likewise
1507 * include/grub/efi/memory.h: likewise
1508 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1509 (mmap_mod_SOURCES): new variable
1510 (mmap_mod_LDFLAGS): likewise
1511 (mmap_mod_ASFLAGS): likewise
1512 * conf/i386-coreboot.rmk: likewise
1513 * conf/i386-ieee1275.rmk: likewise
1514 * conf/i386-efi.rmk: likewise
1515 * conf/x86_64-efi.rmk: likewise
1516 * include/grub/types.h (UINT_TO_PTR): new macro
1517 (PTR_TO_UINT32): likewise
1518 (PTR_TO_UINT64): likewise
1519 * include/grub/memory.h: new file
1520 * mmap/i386/pc/mmap.c: likewise
1521 * mmap/i386/pc/mmap_helper.S: likewise
1522 * mmap/i386/uppermem.c: likewise
1523 * mmap/mmap.c: likewise
1524 * mmap/efi/mmap.c: likewise
1525 * kern/i386/coreboot/init.c (grub_machine_init): don't use
1527 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1528 (grub_upper_mem): likewise
1529 (grub_machine_init): don't use grub_upper_mem,
1530 make grub_lower_mem local
1531 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1532 grub_mmap_iterate and grub_mmap_get_upper
1533 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1535 2009-05-02 Bean <bean123ch@gmail.com>
1537 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1539 (pkglib_MODULES): Add normal.mod and sh.mod.
1540 (normal_SOURCES): New variable.
1541 (normal_mod_CFLAGS): Likewise.
1542 (normal_mod_LDFLAGS): Likewise.
1543 (sh_mod_SOURCES): Likewise.
1544 (sh_mod_CFLAGS): Likewise.
1545 (sh_mod_LDFLAGS): Likewise.
1547 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1548 script/sh/lexer.c_DEPENDENCIES.
1549 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1550 kern/rescue_reader.c and kern/rescue_parser.c.
1551 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1552 (grub_emu_SOURCES): Change source files.
1553 (pkglib_MODULES): Remove normal.mod.
1554 (normal_SOURCES): Removed.
1555 (normal_mod_CFLAGS): Likewise.
1556 (normal_mod_LDFLAGS): Likewise.
1557 * conf/i386-coreboot.rmk: Likewise.
1558 * conf/i386-efi.rmk: Likewise.
1559 * conf/i386-ieee1276.rmk: Likewise.
1560 * conf/powerpc-ieee1275.rmk: Likewise.
1561 * conf/sparc64-ieee1275.rmk: Likewise.
1562 * conf/x86_64-efi.rmk: Likewise.
1564 * include/grub/command.h (grub_command_execute): New inline function.
1566 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1568 * include/grub/normal.h: Remove <grub/setjmp.h>.
1569 (grub_fs_module_list): Moved to normal/autofs.c.
1570 (grub_exit_env): Removed.
1571 (grub_command_execute): Likewise.
1572 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1574 (read_command_list): New function declaration.
1575 (read_fs_list): Likewise.
1577 * include/parser.h: Include <grub/reader.h>.
1578 (grub_parser_split_cmdline): Change type of getline parameter.
1579 (grub_parser): New structure.
1580 (grub_parser_class): New variable.
1581 (grub_parser_execute): New function declaration.
1582 (grub_register_rescue_parser): Likewise.
1583 (grub_parser_register): New inline function.
1584 (grub_parser_unregister): Likewise.
1585 (grub_parser_get_current): Likewise.
1586 (grub_parser_set_current): Likewise.
1588 * include/grub/reader.h: New file.
1589 * kern/reader.c: Likewise.
1590 * kern/rescue_parser.c: Likewise.
1591 * kern/rescue_reader.c: Likewise.
1592 * normal/autofs.c: Likewise.
1593 * normal/dyncmd.c: Likewise.
1595 * include/grub/rescue.h: Removed.
1596 * normal/command.h: Likewise.
1598 * include/grub/script.h: Moved to ...
1599 * include/grub/script_sh.h: ... Moved here.
1600 * normal/execute.c: Moved to ...
1601 * script/sh/execute.c: ... Moved here.
1602 * normal/function.c: Moved to ...
1603 * script/sh/function.c: ... Moved here.
1604 * normal/lexer.c: Moved to ...
1605 * script/sh/lexer.c: ... Moved here.
1606 * normal/parser.y: Moved to ...
1607 * script/sh/parser.y: ... Moved here.
1608 * normal/script.c: Moved to ...
1609 * script/sh/script.c: ... Moved here.
1611 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1613 (grub_exit_env): Removed.
1614 (fs_module_list): Moved to normal/autofs.c.
1615 (grub_file_getline): Don't handle comment here.
1616 (free_menu): Skip removed field entry->commands.
1617 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1619 (read_config_file): Removed nested parameter, change getline function.
1620 (grub_enter_normal_mode): Removed.
1621 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1622 (read_command_list): Likewise.
1623 (autoload_fs_module): Moved to normal/autofs.c.
1624 (read_fs_list): Likewise.
1625 (reader_nested): New variable.
1626 (grub_normal_execute): Run parser.sh to switch to sh parser.
1627 (grub_cmd_rescue): Removed.
1628 (cmd_normal): Removed.
1629 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1631 (grub_cmdline_run): New function.
1632 (grub_normal_reader_init): Likewise.
1633 (grub_normal_read_line): Likewise.
1634 (grub_env_write_pager): Likewise.
1635 (cmdline): New variable.
1636 (grub_normal_reader): Likewise.
1637 (GRUB_MOD_INIT): Register normal reader and set as current, register
1638 pager hook, register normal command with grub_register_command_prio,
1639 so that it won't show up in command.lst.
1640 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1641 grub_fs_autoload_hook.
1643 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1644 (grub_menu_execute_entry): Replace grub_script_execute with
1645 grub_parser_execute, change parameter to grub_command_execute.
1647 * normal/menu_text.c: Remove <grub/script.h>.
1649 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1650 and <grub/parser.h>.
1651 (run): Change editor_getline to use new parser interface. Change
1652 parameter to grub_command_execute.
1654 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1655 <grub/reader.h> and <grub/parser.h>.
1656 (grub_load_normal_mode): Execute normal command.
1657 (grub_main): Call grub_register_core_commands,
1658 grub_register_rescue_parser and grub_register_rescue_reader, use
1659 grub_reader_loop to enter input loop.
1661 * kern/parser.c (grub_parser_split_cmdline): Change type of
1663 (grub_parser_class): New variable.
1664 (grub_parser_execute): New function.
1666 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1667 * loader/multiboot2.c: Likewise.
1668 * loader/sparc64/ieee1275/linux.c: Likewise.
1670 * util/grub-emu.c (read_command_list): New dummy function.
1672 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1674 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1675 count to 16 for CCISS and IDA.
1677 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1679 * normal/menu_text.c (grub_wait_after_message): Print a newline
1680 after waiting for user input.
1682 * loader/i386/linux.c: Include `<grub/normal.h>'.
1683 (grub_cmd_linux): Improve the error message about `ask' mode, by
1684 waiting for user input so it's not missed (we can do this, since
1685 user requested interaction).
1687 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1689 Added missing lst to grub-mkrescue
1691 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1692 and ${input_dir}/parttool.lst
1694 2009-04-30 David S. Miller <davem@davemloft.net>
1696 * util/hostdisk.c (device_is_wholedisk): New function.
1697 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1698 zero only if device_is_wholedisk() returns true.
1700 * util/hostdisk.c (convert_system_partition_to_system_disk):
1701 Handle virtual disk devices named /dev/vdiskX as found on sparc
1704 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1705 lettered partition specifier is found, convert to numbered.
1707 2009-04-29 David S. Miller <davem@davemloft.net>
1709 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1710 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1712 * normal/command.c: Add missing newline at end of file.
1714 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1716 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1717 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1718 grub_ofdisk_read): Likewise, and deal similarly with the fact that
1719 ihandles have a 32-bit type but need to be stored in a "void *".
1721 2009-04-28 Pavel Roskin <proski@gnu.org>
1723 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1724 not disk. Adjust all dependencies.
1725 (grub_fs_uuid_close): Use grub_device_close(), not
1728 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1729 parent's partition, don't copy it by reference, as it gets freed
1732 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1734 Preboot hooks support
1736 * commands/boot.c (struct grub_preboot_t): new declaration
1737 (preboots_head): new variable
1738 (preboots_tail): likewise
1739 (grub_loader_register_preboot_hook): new function
1740 (grub_loader_unregister_preboot_hook): likewise
1741 (grub_loader_set): launch preboot hooks
1742 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1743 (grub_loader_register_preboot_hook): new declaration
1744 (grub_loader_unregister_preboot_hook): likewise
1746 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1750 * disk/scsi.c (grub_scsi_open): added missing cast when
1751 calling grub_dprintf
1753 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1755 Bug and warning fixes
1757 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1759 * commands/test.c (test_parse): fixed bug with file tests and corrected
1760 declaration of find_file
1762 2009-04-26 Pavel Roskin <proski@gnu.org>
1764 * Makefile.in: Don't install empty manual pages if help2man is
1765 missing. Use help2man option for output, not shell redirection.
1767 2009-04-26 David S. Miller <davem@davemloft.net>
1769 * util/grub-mkdevicemap.c (make_device_map): Add missing
1770 NESTED_FUNC_ATTR to process_device().
1772 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1776 * commands/test.c: rewritten to use bash-like test
1778 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1780 Parttool autoloading and improvements
1782 * Makefile.in (pkglib_DATA): add parttool.lst
1783 (parttool.lst): new target
1784 * genmk.rb: generate parttool-*
1785 (CLEANFILES): add #{parttool}
1786 (PARTTOOLFILES): new variable
1787 * genparttoollist.sh: new file
1788 * parttool/pcpart.c (grub_pcpart_boot): more feedback
1789 (grub_pcpart_type): likewise
1790 * commands/parttool.c (helpmsg): new variable
1791 (grub_cmd_parttool): output help if not enough arguments are supplied
1793 (GRUB_MOD_INIT(parttool)): use helpmsg
1795 2009-04-24 David S. Miller <davem@davemloft.net>
1797 Avoiding opening same device multiple times in device iterator.
1799 * kern/device.c: (grub_device_iterate): Define struct part_ent,
1800 and use it to build a list of partitions in iterate_disk() and
1801 iterate_partition().
1803 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1806 * disk/ieee1275/nand.c (grub_nand_iterate): Return
1807 grub_devalias_iterate() result instead of unconditional 0.
1808 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1809 Also, capture hook return value, either directly or via
1810 grub_children_iterate(), and propagate to caller.
1811 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1812 grub_children_iterate): Return value is now 'int' instead of
1814 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1815 like a proper iterator, stopping when hooks return non-zero.
1816 (grub_devalias_iterate): Likewise.
1818 2009-04-23 David S. Miller <davem@davemloft.net>
1820 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1822 2009-04-22 David S. Miller <davem@davemloft.net>
1824 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1825 is larger than address_cells, use that value for address_cells too.
1827 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1828 IEEE1275_MAX_PATH_LEN): Define.
1829 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1830 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1831 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1832 'devtype'. Explicitly NULL terminate devalias expansion.
1834 * util/sparc64/ieee1275/misc.c: New file.
1835 * util/sparc64/ieee1275/grub-setup.c: New file.
1836 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1837 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1838 * util/sparc64/ieee1275/grub-install.in: New file.
1839 * util/ieee1275/ofpath.c: New file.
1840 * util/ieee1275/devicemap.c: New file.
1841 * util/devicemap.c: New file.
1842 * util/deviceiter.c: New file.
1843 * kern/sparc64/ieee1275/init.c: New file.
1844 * include/grub/util/ofpath.h: New file.
1845 * include/grub/util/deviceiter.h: New file.
1846 * util/grub-mkdevicemap.c: Include deviceiter.h.
1847 Implement using grub_util_emit_devicemap_entry and
1848 grub_util_iterate_devices.
1849 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1850 util/devicemap.c into grub-mkdevicemap
1851 * conf/i386-efi.rmk: Likewise.
1852 * conf/i386-ieee1275.rmk: Likewise.
1853 * conf/i386-pc.rmk: Likewise.
1854 * conf/powerpc-ieee1275.rmk: Likewise.
1855 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1856 images and installation utilities. Build kernel as image
1857 instead of as elf binary. Use common rules as much as possible.
1859 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
1861 Correct GPT definition
1863 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1866 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
1868 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1870 2009-04-19 David S. Miller <davem@davemloft.net>
1872 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1873 (grub_rescue_cmd_linux): Rename to...
1874 (grub_cmd_linux): and fix prototype.
1875 (grub_rescue_cmd_initrd): Rename to...
1876 (grub_cmd_initrd): and fix prototype.
1877 (cmd_linux, cmd_initrd): New.
1878 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1879 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1881 2009-04-17 Pavel Roskin <proski@gnu.org>
1883 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1885 (grub_ohci_transfer): Likewise.
1887 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1889 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1890 return without a value. Fix inconsistent indentation.
1892 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1893 match struct grub_fs.
1895 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1896 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1897 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1898 * commands/lspci.c (grub_lspci_iter): Likewise.
1900 2009-04-16 Bean <bean123ch@gmail.com>
1902 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1905 2009-04-15 Pavel Roskin <proski@gnu.org>
1907 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1908 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1909 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1912 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1914 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1915 that no multiple data or metadata areas are supported and `Unknown
1918 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1920 Move loader out of the kernel
1922 * kern/loader.c: moved to ...
1923 * commands/boot.c: ... moved here
1924 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1925 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1926 * include/grub/kernel.h (grub_machine_fini): export
1927 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1928 (grub_loader_set): likewise
1929 (grub_loader_unset): likewise
1930 (grub_loader_boot): likewise
1931 * conf/common.rmk: new module boot.mod
1932 (pkglib_MODULES): add boot.mod
1933 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1934 (grub_emu_SOURCES): likewise
1935 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1936 (grub_emu_SOURCES): likewise
1937 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1938 (grub_emu_SOURCES): likewise
1939 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1940 (grub_emu_SOURCES): likewise
1941 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1942 (grub_emu_SOURCES): likewise
1943 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1944 (grub_emu_SOURCES): likewise
1945 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1946 (grub_emu_SOURCES): likewise
1948 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1950 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1952 * kern/misc.c (grub_itoa): Removed function
1953 (grub_ltoa): likewise
1954 (grub_vsprintf): use grub_lltoa
1956 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1960 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1961 * conf/i386-coreboot.rmk: likewise
1962 * conf/i386-ieee1275.rmk: likewise
1963 * conf/powerpc-ieee1275.rmk: likewise
1965 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1967 * INSTALL: Add that `./autogen.sh' needs to be run before
1970 2009-04-14 Bean <bean123ch@gmail.com>
1972 * Makefile.in (pkglib_DATA): Add handler.lst.
1973 (handler.lst): New rule.
1975 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1976 * conf/i386-coreboot.rmk: Likewise.
1977 * conf/i386-ieee1275.rmk: Likewise.
1978 * conf/i386-efi.rmk: Likewise.
1979 * conf/x86_64-efi.rmk: Likewise.
1980 * conf/powerpc-ieee1275.rmk: Likewise.
1981 * conf/sparc64-ieee1275.rmk: Likewise.
1983 * genhandlerlist.sh: New file.
1985 * genmk.rb: Add rules to generate handler.lst.
1987 * include/grub/normal.h (grub_file_getline): New function definition.
1988 (read_handler_list): Likewise.
1989 (free_handler_list): Likewise.
1991 * include/grub/term.h (grub_term_register_input): Add name parameter
1992 for auto generation of handler.lst.
1993 (grub_term_register_output): Likewise.
1995 * normal/handler.c: New file.
1997 * normal/main.c (get_line): Renamed to grub_file_getline.
1998 (read_config_file): Use the newly renamed grub_file_getline.
1999 (read_command_list): Likewise.
2000 (read_fs_list): Likewise.
2001 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2002 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2004 * term/efi/console.c (grub_console_init): Add name parameter for auto
2005 generation of handler.lst.
2006 * term/gfxterm.c: Likewise.
2007 * term/i386/pc/at_keyboard.c: Likewise.
2008 * term/i386/pc/console.c: Likewise.
2009 * term/i386/pc/serial.c: Likewise.
2010 * term/i386/pc/vesafb.c: Likewise.
2011 * term/i386/pc/vga.c: Likewise.
2012 * term/i386/pc/vga_text.c: Likewise.
2013 * term/ieee1275/ofconsole.c: Likewise.
2014 * term/usb_keyboard.c: Likewise.
2016 2009-04-14 Bean <bean123ch@gmail.com>
2018 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2019 properly with null character.
2021 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2023 * configure: Remove.
2024 * config.h.in: Likewise.
2025 * stamp-h.in: Likewise.
2026 * DISTLIST: Likewise.
2027 * conf/common.mk: Likewise.
2028 * conf/i386-coreboot.mk: Likewise.
2029 * conf/i386-efi.mk: Likewise.
2030 * conf/i386-ieee1275.mk: Likewise.
2031 * conf/i386.mk: Likewise.
2032 * conf/i386-pc.mk: Likewise.
2033 * conf/powerpc-ieee1275.mk: Likewise.
2034 * conf/sparc64-ieee1275.mk: Likewise.
2035 * conf/x86_64-efi.mk: Likewise.
2037 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2040 2009-04-14 John Stanley <jpsinthemix@verizon.net>
2041 David S. Miller <davem@davemloft.net>
2043 * util/hostdisk.c (make_device_name): Fix buffer length
2046 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2048 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2049 <sys/param.h> and <sys/sysctl.h>.
2050 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2051 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2052 opening the device and reset them afterwards.
2054 2009-04-13 Pavel Roskin <proski@gnu.org>
2056 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2057 Reported by John Stanley <jpsinthemix@verizon.net>
2059 2009-04-13 Robert Millan <rmh@aybabtu.com>
2061 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2062 that name for menuentries when appropriate.
2064 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2066 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2068 2009-04-13 Robert Millan <rmh@aybabtu.com>
2070 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2071 to Linux, simply abort telling the user it's no longer supported.
2073 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2075 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2076 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
2077 `freebsd_loadenv' only when devices.hints exist.
2079 2009-04-13 Pavel Roskin <proski@gnu.org>
2081 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2083 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2085 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2087 (grub_drive): Likewise.
2089 2009-04-13 David S. Miller <davem@davemloft.net>
2091 * kern/sparc64/ieee1275/ieee1275.c: New file.
2092 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2093 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2094 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2095 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2096 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2097 grub_ieee1275_alloc_physmem): Declare new exported functions.
2099 * include/grub/sparc64/ieee1275/loader.h: New file.
2100 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2101 * include/grub/sparc64/kernel.h: Likewise.
2102 * loader/sparc64/ieee1275/linux.c: Likewise.
2104 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2105 (grub_fstest_SOURCES): Likewise.
2107 * util/hostdisk.c (make_device_name): Do not make any assumptions
2108 about the length of drive names.
2110 * kern/dl.c (grub_dl_load_file): Close file immediately when
2111 we are done using it.
2113 2009-04-12 David S. Miller <davem@davemloft.net>
2115 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2116 values. Noticed by Pavel Roskin.
2118 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2121 * genmk.rb: Add more flexible image type specification, also
2122 pass --strip-unneeded to objcopy.
2123 * conf/i386-pc.rmk: Use *_FORMAT.
2124 * conf/i386-pc.mk: Rebuilt.
2126 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2127 (OFDISK_HASH_SZ): Define.
2128 (ofdisk_hash): New hash table.
2129 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2130 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2131 instead of device phandle which is not unique.
2133 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2134 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2135 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2136 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2137 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2138 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2139 GRUB_KERNEL_MACHINE_DATA_END): Define.
2140 (grub_kernel_image_size, grub_total_module_size): Declare.
2142 2009-04-12 Pavel Roskin <proski@gnu.org>
2144 * configure.ac: Change the logic when we check for target tools.
2145 Do it when the target is specified and it's different from the
2146 specified value of the host.
2148 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
2150 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2151 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2152 GNU/kFreeBSD. Check if a device is a character device. Use
2153 DIOCGMEDIASIZE to get the size.
2154 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2155 support for GNU/kFreeBSD.
2156 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2157 is a character device instead of a block device. Add support for
2158 FreeBSD device names.
2160 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2161 is a character device instead of a block device.
2163 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2164 is a character device instead of a block device.
2166 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2168 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2169 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2170 FreeBSD. Check if a device is a character device. Use
2171 DIOCGMEDIASIZE to get the size.
2172 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2173 support for FreeBSD.
2174 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2175 is a character device instead of a block device. Add support for
2176 FreeBSD device names.
2178 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2179 a character device instead of a block device.
2180 (grub_util_check_char_device): New function.
2182 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2183 a character device instead of a block device.
2185 * include/grub/util/getroot.h (grub_util_check_char_device): New
2188 2009-04-11 David S. Miller <davem@davemloft.net>
2190 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2192 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2193 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2194 function, if present.
2195 (__bswapdi2): Likewise.
2197 * include/grub/sparc64/ieee1275/boot.h: New file.
2198 * boot/sparc64/ieee1275/boot.S: Likewise.
2199 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2201 * kern/misc.c (grub_ltoa): New function.
2202 (grub_vsprintf): Use it to format 'long' integers.
2204 2009-04-10 David S. Miller <davem@davemloft.net>
2206 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2207 slots are of type grub_ieee1275_cell_t.
2208 (grub_nand_read): Likewise.
2209 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2210 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2211 macros are used to compare values in arg/ret block of the call.
2212 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2213 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2214 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2215 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2216 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2217 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2218 grub_ieee1275_close, grub_ieee1275_set_property,
2219 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2220 grub_ieee1275_cell_t.
2221 * kern/ieee1275/openfw.c (grub_map): Likewise.
2222 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2223 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2225 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2226 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2227 (grub_devalias_iterate): Likewise.
2229 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
2233 * fs/ufs.c (INODE_NBLOCKS): new definition
2234 (struct grub_ufs_dirent): added fields for non-BSD dirents
2235 (grub_ufs_get_file_block): fixed double indirect handling
2236 (grub_ufs_lookup_symlink): use more robust way to determine whether
2238 (grub_ufs_find_file): support for non-BSD dirents
2239 (grub_ufs_dir): support for non-BSD dirents
2241 2009-04-10 Bean <bean123ch@gnail.com>
2243 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2244 attribute, otherwise the size would be wrong for i386 platform.
2246 * include/grub/pci.h (grub_pci_read_word): New inline function.
2247 (grub_pci_read_byte): Likewise.
2248 (grub_pci_write): Likewise.
2249 (grub_pci_write_word): Likewise.
2250 (grub_pci_write_byte): Likewise.
2252 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2254 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2255 (find_framebuf): Scan pci to locate the frame buffer address.
2257 * commands/efi/fixvideo.c: New file.
2259 * commands/efi/loadbios.c: Likewise.
2261 * commands/memrw.c: Likewise.
2263 * util/grub-dumpbios.in: Likewise.
2265 * conf/common.rmk (grub-dumpbios): New utility.
2266 (pkglib_MODULES): New module memrw.mod.
2267 (memrw_mod_SOURCE): New macro.
2268 (memrw_mod_CFLAGS): Likewise.
2269 (memrw_mod_LDFLAGS): Likewise.
2271 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2273 (loadbios_mod_SOURCE): New macro.
2274 (loadbios_mod_CFLAGS): Likewise.
2275 (loadbios_mod_LDFLAGS): Likewise.
2276 (fixvideo_mod_SOURCE): Likewise.
2277 (fixvideo_mod_CFLAGS): Likewise.
2278 (fixvideo_mod_LDFLAGS): Likewise.
2280 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2282 (loadbios_mod_SOURCE): New macro.
2283 (loadbios_mod_CFLAGS): Likewise.
2284 (loadbios_mod_LDFLAGS): Likewise.
2285 (fixvideo_mod_SOURCE): Likewise.
2286 (fixvideo_mod_CFLAGS): Likewise.
2287 (fixvideo_mod_LDFLAGS): Likewise.
2289 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
2291 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2293 2009-04-07 David S. Miller <davem@davemloft.net>
2295 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2296 support for R_SPARC_OLO10 relocations. Fix compile warning for
2297 R_SPARC_WDISP30 case.
2298 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2300 2009-04-06 Pavel Roskin <proski@gnu.org>
2302 * include/grub/misc.h (ARRAY_SIZE): New macro.
2303 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2305 * loader/i386/linux.c (allocate_pages): Use free_pages().
2306 (grub_linux_unload): Don't use free_pages().
2307 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2308 wrong index. Treat all other modes as text modes.
2309 (grub_cmd_linux): Initialize vid_mode unconditionally to
2310 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2312 * commands/help.c (print_command_help): Use cmd->prio, not
2313 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2315 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
2319 * parttool/pcpart.c: new file
2320 * commands/parttool.c: likewise
2321 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2322 (parttool_mod_SOURCES): new variable
2323 (parttool_mod_CFLAGS): likewise
2324 (parttool_mod_LDFLAGS): likewise
2325 (pcpart_mod_SOURCES): likewise
2326 (pcpart_mod_CFLAGS): likewise
2327 (pcpart_mod_LDFLAGS): likewise
2328 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2329 and parttool/pcpart.c
2330 * conf/i386-efi.rmk: likewise
2331 * conf/i386-ieee1275.rmk: likewise
2332 * conf/i386-pc.rmk: likewise
2333 * conf/powerpc-ieee1275.rmk: likewise
2334 * conf/sparc64-ieee1275.rmk: likewise
2335 * conf/x86_64-ieee1275.rmk: likewise
2337 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2339 Support for mtime and further expandability of dir command
2341 * include/grub/lib/datetime.h: moved to ...
2342 * include/grub/datetime.h: ... moved here and added
2343 declaration of grub_unixtime2datetime. All users updated
2344 * include/grub/fs.h: new syntax for dir and mtime functions in
2346 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2347 and GRUB_FSHELP_FLAGS_MASK
2348 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2349 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2350 (grub_ext2_mtime): new function
2351 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2352 (grub_hfsplus_mtime): new function
2353 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2354 (GRUB_UFS_ATTR_FILE): likewise
2355 (GRUB_UFS_ATTR_LNK): likewise
2356 (struct grub_ufs_sblock): new fields mtime
2357 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2359 (grub_ufs_dir): mtime support
2360 (grub_ufs_mtime): new function
2361 * fs/affs.c (grub_affs_dir): use new dir syntax
2362 * fs/afs.c (grub_afs_dir): likewise
2363 * fs/cpio.c (grub_cpio_dir): likewise
2364 * fs/fat.c (grub_fat_find_dir): likewise
2365 * fs/hfs.c (grub_hfs_dir): likewise
2366 * fs/iso9660.c (grub_iso9660_dir): likewise
2367 * fs/jfs.c (grub_jfs_dir): likewise
2368 * fs/minix.c (grub_minix_dir): likewise
2369 * fs/ntfs.c (grub_ntfs_dir): likewise
2370 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2371 * fs/sfs.c (grub_sfs_dir): likewise
2372 * fs/xfs.c (grub_xfs_dir): likewise
2373 * util/hostfs.c (grub_hostfs_dir): likewise
2374 * lib/datetime.c: moved to ...
2375 * normal/datetime.c: ... moved here
2376 (grub_unixtime2datetime): new function
2377 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2378 * normal/completion.c (iterate_dir): use new dir syntax
2379 * normal/misc.c (grub_normal_print_device_info): tell the
2380 last modification time of a volume
2381 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2382 * conf/common.rmk: added lib/datetime.c to ls.mod
2383 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2384 (normal_mod_SOURCES): likewise
2385 (datetime_mod_SOURCES): Removed lib/datetime.c
2386 * conf/i386-efi.rmk: likewise
2387 * conf/i386-ieee1275.rmk: likewise
2388 * conf/i386-pc.rmk: likewise
2389 * conf/powerpc-ieee1275.rmk: likewise
2390 * conf/sparc64-ieee1275.rmk: likewise
2391 * conf/x86_64-efi.rmk: likewise
2393 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2395 Trim trailing spaces in FAT label and support mtools-like labels
2397 * fs/fat.c (grub_fat_iterate_dir): New function based
2398 on grub_fat_find_dir
2399 (grub_fat_find_dir): use grub_fat_iterate_dir
2400 (grub_fat_label): likewise
2402 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2404 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2406 remove extraneous kernel_elf_HEADERS
2408 2009-04-04 Bean <bean123ch@gnail.com>
2410 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2412 * util/misc.c: Likewise.
2414 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2416 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2417 instead of grub_printf.
2419 2009-04-03 Robert Millan <rmh@aybabtu.com>
2421 * loader/i386/linux.c (grub_linux_setup_video): Fill
2422 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2423 values from `mode info' structure instead of hardcoded
2426 2009-04-01 Pavel Roskin <proski@gnu.org>
2428 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2430 * genmk.rb: Likewise.
2431 * configure.ac: Likewise.
2433 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2435 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2436 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2438 2009-04-01 David S. Miller <davem@davemloft.net>
2440 * normal/sparc64/setjmp.S: Fix setjmp implementation.
2441 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2442 (grub_setjmp): Mark with 'returns_twice' attribute.
2443 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2444 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2445 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2447 2009-04-01 Robert Millan <rmh@aybabtu.com>
2449 Reapply fix from 2008-07-28 which was accidentally reverted; also
2450 perform the same fix to a similar check in same function.
2452 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2453 with the same number are found, just use issue a warning with
2454 grub_dprintf(), as this error has been reported to be non-fatal.
2456 2009-03-31 Pavel Roskin <proski@gnu.org>
2458 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2459 for cross-compilation.
2461 2009-03-30 Robert Millan <rmh@aybabtu.com>
2463 Fix i386-ieee1275 build.
2465 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2468 2009-03-30 Pavel Roskin <proski@gnu.org>
2470 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2471 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2472 zero-terminated, rely only on the strlen value. Fix comparison
2473 of strings differing in length.
2475 2009-03-30 Robert Millan <rmh@aybabtu.com>
2477 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2478 checking for abi version. Improve error messages on BIOS to notify
2479 user about `linux16' command.
2481 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2485 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2486 in case of collision
2487 * disk/scsi.c (grub_scsi_open): free scsi in case of error
2489 2009-03-29 Robert Millan <rmh@aybabtu.com>
2491 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2492 set `vid_mode' accordingly.
2493 (grub_linux_boot): Process `vid_mode' and set video mode.
2495 2009-03-29 Robert Millan <rmh@aybabtu.com>
2497 * util/grub.d/10_linux.in (linux_entry): New function.
2498 Factorize generation of Linux boot entries.
2500 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2502 Make the format of Environment Block plain text. The boot loader
2503 part is not tested well yet.
2505 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2508 (usage): Remove "info" and "clear". Add "unset". Update the
2509 description of "set", as this does not delete variables any
2511 (create_envblk_file): Complete rewrite.
2512 (open_envblk_file): Likewise.
2513 (cmd_info): Removed.
2514 (cmd_list): Likewise.
2515 (cmd_set): Likewise.
2516 (cmd_clear): Likewise.
2517 (list_variables): New function.
2518 (write_envblk): Likewise.
2519 (set_variables): Likewise.
2520 (unset_variables): Likewise.
2521 (main): Complete rewrite.
2523 * commands/loadenv.c (buffer): Removed.
2525 (open_envblk_file): New function.
2526 (read_envblk_file): Complete rewrite.
2527 (grub_cmd_load_env): Likewise.
2528 (grub_cmd_list_env): Likewise.
2529 (struct blocklist): New struct.
2530 (free_blocklists): New function.
2531 (check_blocklists): Likewise.
2532 (write_blocklists): Likewise.
2533 (grub_cmd_save_env): Complete rewrite.
2535 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2536 a plain text signature.
2537 (GRUB_ENVBLK_MAXLEN): Removed.
2538 (struct grub_envblk): Complete rewrite.
2539 (grub_envblk_find): Removed.
2540 (grub_envblk_insert): Likewise.
2541 (grub_envblk_open): New prototype.
2542 (grub_envblk_set): Likewise.
2543 (grub_envblk_delete): Put const to VALUE.
2544 (grub_envblk_iterate): Put const to NAME and VALUE.
2545 (grub_envblk_close): New prototype.
2546 (grub_envblk_buffer): New inline function.
2547 (grub_envblk_size): Likewise.
2549 * lib/envblk.c: Include grub/mm.h.
2550 (grub_env_find): Removed.
2551 (grub_envblk_open): New function.
2552 (grub_envblk_close): Likewise.
2553 (escaped_value_len): Likewise.
2554 (find_next_line): Likewise.
2555 (grub_envblk_insert): Removed.
2556 (grub_envblk_set): New function.
2557 (grub_envblk_delete): Complete rewrite.
2558 (grub_envblk_iterate): Likewise.
2560 2009-03-28 Robert Millan <rmh@aybabtu.com>
2562 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2563 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2564 variables. Use 16-bit loader.
2565 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2567 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2568 (grub_linux16_boot): ... this. Update all users.
2569 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2570 (grub_linux_boot): ... this. Update all users.
2572 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2573 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2574 commands to `linux16' and `initrd16'.
2575 (GRUB_MOD_FINI(linux)): Rename to ...
2576 (GRUB_MOD_FINI(linux16)): ... this.
2578 2009-03-24 Pavel Roskin <proski@gnu.org>
2580 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2581 not just for compilation.
2583 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2585 Move multiboot helper out of kernel
2587 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2588 `loader/i386/multiboot_helper.S'.
2589 * conf/i386-coreboot.rmk: Likewise
2590 * conf/i386-ieee1275.rmk: Likewise
2592 * kern/i386/loader.S: Move multiboot helpers from here...
2593 * loader/i386/multiboot_helper.S: ...moved here
2594 * include/grub/i386/loader.h: Move declarations of multiboot
2595 helpers from here...
2596 * include/grub/i386/multiboot.h: ...moved here
2597 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2599 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2601 * kern/env.c (grub_env_context_open): Added an argument to specify
2602 whether a new context inherits exported variables from current
2603 one. This is useful when making a sandbox to interpret a config
2605 All callers updated.
2607 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2609 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2611 * kern/env.c (grub_env_context_close): Fix memory leaks.
2613 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2615 * normal/main.c (grub_normal_execute): Added an argument
2616 BATCH to specify if an interactive interface should be provided
2617 after reading a config file.
2618 All callers updated.
2619 (read_command_list): Prevent being executed twice.
2620 (read_fs_list): Likewise.
2622 * include/grub/normal.h (grub_normal_execute): Updated the
2625 2009-03-22 Pavel Roskin <proski@gno.org>
2627 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2629 * kern/i386/pc/startup.S: Likewise.
2630 * kern/i386/efi/startup.S: Likewise.
2631 * kern/i386/ieee1275/startup.S: Likewise.
2632 * kern/i386/coreboot/startup.S: Likewise.
2633 * kern/x86_64/efi/startup.S: Likewise.
2635 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2636 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2637 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2639 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2641 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2643 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2645 Use vaddr of correct segment for entry_point.
2647 2009-03-21 Bean <bean123ch@gmail.com>
2649 * commands/blocklist.c: Add include file <grub/command.h>, remove
2650 <grub/normal.h> and <grub/arg.h>.
2651 (grub_cmd_blocklist): Use the new command interface.
2652 (GRUB_MOD_INIT): Likewise.
2653 (GRUB_MOD_FINI): Likewise.
2654 * commands/boot.c: Likewise.
2655 * commands/cat.c: Likewise.
2656 * commands/cmp.c: Likewise.
2657 * commands/configfile.c: Likewise.
2658 * commands/crc.c: Likewise.
2659 * commands/echo.c: Likewise.
2660 * commands/halt.c: Likewise.
2661 * commands/handler.c: Likewise.
2662 * commands/hdparm.c: Likewise.
2663 * commands/help.c: Likewise.
2664 * commands/hexdump.c: Likewise.
2665 * commands/loadenv.c: Likewise.
2666 * commands/ls.c: Likewise.
2667 * commands/lsmmap.c: Likewise.
2668 * commands/lspci.c: Likewise.
2669 * commands/loadenv.c: Likewise.
2670 * commands/read.c: Likewise.
2671 * commands/reboot.c: Likewise.
2672 * commands/search.c: Likewise.
2673 * commands/sleep.c: Likewise.
2674 * commands/test.c: Likewise.
2675 * commands/usbtest.c: Likewise.
2676 * commands/videotest.c: Likewise.
2677 * commands/i386/cpuid.c: Likewise.
2678 * commands/i386/pc/halt.c: Likewise.
2679 * commands/i386/pc/play.c: Likewise.
2680 * commands/i386/pc/pxecmd.c: Likewise.
2681 * commands/i386/pc/vbeinfo.c: Likewise.
2682 * commands/i386/pc/vbetest.c: Likewise.
2683 * commands/ieee1275/suspend.c: Likewise.
2684 * disk/loopback.c: Likewise.
2685 * font/font_cmd.c: Likewise.
2686 * hello/hello.c: Likewise.
2687 * loader/efi/appleloader.c: Likewise.
2688 * loader/efi/chainloader.c: Likewise.
2689 * loader/i386/bsd.c: Likewise.
2690 * loader/i386/efi/linux.c: Likewise.
2691 * loader/i386/ieee1275/linux.c: Likewise.
2692 * loader/i386/linux.c: Likewise.
2693 * loader/i386/pc/chainloader.c: Likewise.
2694 * loader/i386/pc/linux.c: Likewise.
2695 * loader/powerpc/ieee1275/linux.c: Likewise.
2696 * loader/multiboot_loader.c: Likewise.
2697 * term/gfxterm.c: Likewise.
2698 * term/i386/pc/serial.c: Likewise.
2699 * term/terminfo.c: Likewise.
2701 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2702 * term/i386/pc/vga.c: Likewise.
2703 * video/readers/jpeg.c: Likewise.
2704 * video/readers/png.c: Likewise.
2705 * video/readers/tga.c: Likewise.
2707 * util/grub-fstest (cmd_loopback): Removed.
2708 (cmd_blocklist): Likewise.
2710 (grub_register_command): Likewise.
2711 (grub_unregister_command): Likewise.
2712 (execute_command): Use grub_command_find to locate command and execute
2715 * include/grub/efi/chainloader.h: Removed.
2716 * loader/efi/chainloader_normal.c: Likewise.
2717 * loader/i386/bsd_normal.c: Likewise.
2718 * loader/i386/pc/chainloader_normal.c: Likewise.
2719 * loader/i386/pc/multiboot_normal.c: Likewise.
2720 * loader/linux_normal.c: Likewise.
2721 * loader/multiboot_loader_normal.c: Likewise.
2722 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2724 * gencmdlist.sh: Scan new registration command grub_register_extcmd
2725 and grub_register_command_p1.
2727 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2728 kern/command.c, lib/arg.c and commands/extcmd.c.
2729 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2730 (minicmd_mod_SOURCES): New variable.
2731 (minicmd_mod_CFLAGS): Likewise.
2732 (minicmd_mod_LDFLAGS): Likewise.
2733 (extcmd_mod_SOURCES): Likewise.
2734 (extcmd_mod_CFLAGS): Likewise.
2735 (extcmd_mod_LDFLAGS): Likewise.
2736 (boot_mod_SOURCES): Removed.
2737 (boot_mod_CFLAGS): Likewise.
2738 (boot_mod_LDFLAGS): Likewise.
2740 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2742 (kernel_img_HEADERS): Add command.h.
2743 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2744 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2746 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2747 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2748 remove the corresponding normal mode command.
2749 (normal_mod_SOURCES): Remove normal/arg.c.
2750 * conf/i386-coreboot.rmk: Likewise.
2751 * conf/i386-efi.rmk: Likewise.
2752 * conf/i386-ieee1275.rmk: Likewise.
2753 * conf/powerpc-ieee1275.rmk: Likewise.
2754 * conf/x86_64-efi.rmk: Likewise.
2756 * include/grub/arg.h: Move from here ...
2757 * include/grub/lib/arg.h: ... to here.
2759 * normal/arg.c: Move from here ...
2760 * lib/arg.c: ... to here.
2762 * commands/extcmd.c: New file.
2763 * commands/minicmd.c: Likewise.
2764 * include/grub/command.h: Likewise.
2765 * include/grub/extcmd.h: Likewise.
2766 * kern/command.c: Likewise.
2767 * kern/corecmd.c: Likewise.
2769 * kern/list.c (grub_list_iterate): Return int instead of void.
2770 (grub_list_insert): New function.
2771 (grub_prio_list_insert): Likewise.
2773 * kern/rescue.c (grub_rescue_command): Removed.
2774 (grub_rescue_command_list): Likewise.
2775 (grub_rescue_register_command): Likewise.
2776 (grub_rescue_unregister_command): Likewise.
2777 (grub_rescue_cmd_boot): Move to minicmd.c
2778 (grub_rescue_cmd_help): Likewise.
2779 (grub_rescue_cmd_info): Likewise.
2780 (grub_rescue_cmd_boot): Likewise.
2781 (grub_rescue_cmd_testload): Likewise.
2782 (grub_rescue_cmd_dump): Likewise.
2783 (grub_rescue_cmd_rmmod): Likewise.
2784 (grub_rescue_cmd_lsmod): Likewise.
2785 (grub_rescue_cmd_exit): Likewise.
2786 (grub_rescue_print_devices): Moved to corecmd.c.
2787 (grub_rescue_print_files): Likewise.
2788 (grub_rescue_cmd_ls): Likewise.
2789 (grub_rescue_cmd_insmod): Likewise.
2790 (grub_rescue_cmd_set): Likewise.
2791 (grub_rescue_cmd_unset): Likewise.
2792 (attempt_normal_mode): Use grub_command_find to get normal module.
2793 (grub_enter_rescue_mode): Use grub_register_core_commands to register
2794 commands, remove grub_rescue_register_command calls.
2796 * normal/command.c (grub_register_command): Removed.
2797 (grub_unregister_command): Likewise.
2798 (grub_command_find): Likewise.
2799 (grub_iterate_commands): Likewise.
2800 (rescue_command): Likewise.
2801 (export_command): Moved to corecmd.c.
2802 (set_command): Removed.
2803 (unset_command): Likewise.
2804 (insmod_command): Likewise.
2805 (rmmod_command): Likewise.
2806 (lsmod_command): Likewise.
2807 (grub_command_init): Likewise.
2809 * normal/completion.c (iterate_command): Use cmd->prio to check for
2811 (complete_arguments): Use grub_extcmd_t structure to find options.
2812 (grub_normal_do_completion): Change function grub_iterate_commands to
2813 grub_command_iterate.
2815 * normal/execute.c (grub_script_execute_cmd): No need to parse
2818 * normal/main.c (grub_dyncmd_dispatcher): New function.
2819 (read_command_list): Register unload commands as dyncmd.
2820 (grub_cmd_normal): Use new command interface, register rescue,
2821 unregister normal at entry, register normal, unregister rescue at exit.
2823 * include/grub/list.h (grub_list_test_t): New type.
2824 (grub_list_iterate): Return int instead of void.
2825 (grub_list_insert): New function.
2826 (GRUB_AS_NAMED_LIST_P): New macro.
2827 (GRUB_AS_PRIO_LIST): Likewise.
2828 (GRUB_AS_PRIO_LIST_P): Likewise.
2829 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2830 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2831 (grub_prio_list): New structure.
2832 (grub_prio_list_insert): New function.
2833 (grub_prio_list_remove): New inline function.
2835 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2836 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2837 (GRUB_COMMAND_FLAG_MENU): Likewise.
2838 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2839 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2840 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2841 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2842 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2843 (grub_command): Likewise.
2844 (grub_register_command): Likewise.
2845 (grub_command_find): Likewise.
2846 (grub_iterate_commands): Likewise.
2847 (grub_command_init): Likewise.
2848 (grub_arg_parse): Likewise.
2849 (grub_arg_show_help): Likewise.
2851 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2852 (grub_rescue_unregister_command): Likewise.
2854 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2855 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2856 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2858 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2859 grub_rescue_cmd_initrd.
2860 * include/grub/i386/loader.h: Likewise.
2861 * include/grub/x86_64/loader.h: Likewise.
2863 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2865 2009-03-21 Bean <bean123ch@gmail.com>
2867 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2868 instead of stat in mingw environment.
2870 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2872 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2874 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2877 2009-03-21 Bean <bean123ch@gmail.com>
2879 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2882 2009-03-18 Michel Dänzer <michel@daenzer.net>
2884 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2885 checking inode flags for EXT4_EXTENTS_FLAG.
2887 2009-03-18 Robert Millan <rmh@aybabtu.com>
2889 * loader/i386/linux.c: Include `<grub/video.h>' and
2890 `<grub/i386/pc/vbe.h>'..
2891 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2892 (grub_linux32_boot): Attempt to configure video settings with
2893 grub_linux_setup_video().
2894 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2895 to avoid grub_console_fini() which would step out of graphical mode
2898 2009-03-14 Robert Millan <rmh@aybabtu.com>
2900 Fix build on powerpc.
2901 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2903 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2905 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2906 background image command.
2908 2009-03-12 Colin D Bennett <colin@gibibit.com>
2910 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2911 (grub_gfxterm_putchar): Extract pairs of identical calls to
2912 draw_cursor out of conditional blocks.
2914 2009-03-11 Pavel Roskin <proski@gnu.org>
2916 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2917 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2919 2009-03-11 Robert Millan <rmh@aybabtu.com>
2921 * loader/i386/multiboot_elfxx.c
2922 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2924 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
2926 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2929 2009-03-11 Robert Millan <rmh@aybabtu.com>
2931 * loader/i386/multiboot.c (code_size): New variable.
2932 (grub_multiboot): Define offsets by adding to `code_size' rather
2933 than subtracting from `grub_multiboot_payload_size'. Provide
2934 4-byte alignment to MBI and others by increasing
2935 `boot_loader_name_length' appropriately.
2937 * loader/i386/multiboot_elfxx.c
2938 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2940 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
2942 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2945 2009-03-08 Robert Millan <rmh@aybabtu.com>
2947 Make loader/i386/linux.c usable on i386-pc again.
2949 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2951 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2954 2009-03-07 Bean <bean123ch@gmail.com>
2956 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2959 2009-03-06 Robert Millan <rmh@aybabtu.com>
2961 Fix display issue on terminals with screen size other than 80x25
2962 (e.g. gfxterm with resolution higher than 640x480).
2964 * normal/main.c (grub_normal_init_page): Display title text in a
2965 position relative to the center of the terminal instead of relying
2966 on a hardcoded offset.
2968 2009-03-04 Robert Millan <rmh@aybabtu.com>
2970 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2973 * Makefile.in (host_kernel): New variable.
2974 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2975 scripts instead of just the windows one.
2976 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2978 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2980 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2982 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2983 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2984 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2985 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2986 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2987 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2989 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2991 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2992 or if there's no space for the disk label and print the partition number on a
2995 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2997 * util/misc.c: Include <time.h>.
2998 (grub_millisleep): New function.
3000 2009-03-04 Bean <bean123ch@gmail.com>
3002 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3003 another option -mno-red-zone.
3005 * commands/handler.c: Change module description.
3007 * kern/handler.c: Add missing space at the end of description line.
3009 * kern/list.c: Likewise.
3011 2009-03-03 Robert Millan <rmh@aybabtu.com>
3013 Move more components to the relocation area, and fix mbi pointer
3014 handling to use the destination rather than the origin (thanks to
3015 Vladimir Serbinenko for spotting).
3017 * loader/i386/multiboot.c (mbi_dest): New variable.
3018 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3019 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3022 2009-03-01 Bean <bean123ch@gmail.com>
3024 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3025 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3026 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3027 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3029 * loader/i386/efi/linux.c (acpi_guid): New variable.
3030 (acpi_guid): Likewise.
3031 (EBDA_SEG_ADDR): New constant.
3032 (LOW_MEM_ADDR): Likewise.
3033 (FAKE_EBDA_SEG): Likewise.
3034 (fake_bios_data): New function.
3035 (grub_linux_boot): Call fake_bios_data.
3037 2009-03-01 Bean <bean123ch@gmail.com>
3039 * commands/terminal.c: Removed.
3041 * commands/handler.c: New file.
3043 * include/grub/list.h: Likewise.
3045 * include/grub/handler.h: Likewise.
3047 * kern/list.c: Likewise.
3049 * kern/handler.c: Likewise.
3051 * kern/term.h: Include header file <grub/handler.h>.
3052 (grub_term_input): Move next field to the beginning.
3053 (grub_term_output): Likewise.
3054 (grub_term_input_class): New variable.
3055 (grub_term_output_class): Likewise.
3056 (grub_term_register_input): Changed to inline function.
3057 (grub_term_register_output): Likewise.
3058 (grub_term_unregister_input): Likewise.
3059 (grub_term_unregister_output): Likewise.
3060 (grub_term_set_current_input): Likewise.
3061 (grub_term_set_current_output): Likewise.
3062 (grub_term_get_current_input): Likewise.
3063 (grub_term_get_current_output): Likewise.
3064 (grub_term_iterate_input): Removed.
3065 (grub_term_iterate_output): Likewise.
3067 * kern/term.c (grub_term_list_input): Removed.
3068 (grub_term_list_output): Likewise.
3069 (grub_term_input_class): New variable.
3070 (grub_term_output_class): Likewise.
3071 (grub_cur_term_input): Change variable as macro.
3072 (grub_cur_term_output): Likewise.
3073 (grub_term_register_input): Removed.
3074 (grub_term_register_output): Likewise.
3075 (grub_term_unregister_input): Likewise.
3076 (grub_term_unregister_output): Likewise.
3077 (grub_term_set_current_input): Likewise.
3078 (grub_term_set_current_output): Likewise.
3079 (grub_term_iterate_input): Likewise.
3080 (grub_term_iterate_output): Likewise.
3081 (grub_term_get_current_input): Likewise.
3082 (grub_term_get_current_output): Likewise.
3084 * util/grub-editenv.c: Include header file <grub/handler.h>.
3085 (grub_term_get_current_input): Removed.
3086 (grub_term_get_current_output): Likewise.
3087 (grub_term_input_class): New variable.
3088 (grub_term_output_class): Likewise.
3090 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3091 (grub_term_get_current_output): Likewise.
3092 (grub_term_input_class): New variable.
3093 (grub_term_output_class): Likewise.
3095 * util/grub-probe.c (grub_term_get_current_input): Removed.
3096 (grub_term_get_current_output): Likewise.
3097 (grub_term_input_class): New variable.
3098 (grub_term_output_class): Likewise.
3100 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3101 (grub_term_get_current_output): Likewise.
3102 (grub_term_input_class): New variable.
3103 (grub_term_output_class): Likewise.
3105 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3106 (terminal_mod_SOURCES): Likewise.
3107 (terminal_mod_CFLAGS): Likewise.
3108 (terminal_mod_LDFLAGS): Likewise.
3110 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3112 (kernel_img_SOURCES): Add list.c and handler.c.
3113 (kernel_img_HEADERS): Add list.h and handler.h.
3115 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3117 (kernel_mod_SOURCES): Add list.c and handler.c.
3118 (kernel_mod_HEADERS): Add list.h and handler.h.
3120 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3122 (kernel_elf_SOURCES): Add list.c and handler.c.
3123 (kernel_elf_HEADERS): Add list.h and handler.h.
3125 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3127 (kernel_elf_SOURCES): Add list.c and handler.c.
3128 (kernel_elf_HEADERS): Add list.h and handler.h.
3130 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3132 (kernel_mod_SOURCES): Add list.c and handler.c.
3133 (kernel_mod_HEADERS): Add list.h and handler.h.
3135 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3137 (kernel_elf_SOURCES): Add list.c and handler.c.
3138 (kernel_elf_HEADERS): Add list.h and handler.h.
3140 2009-02-27 Robert Millan <rmh@aybabtu.com>
3142 Factorize elf32 / elf64 code in Multiboot loader. This will
3143 prevent it from getting out of sync again.
3145 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3146 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3147 grub_multiboot_load_elf64): Move from here ...
3148 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3149 grub_multiboot_load_elf): ... to here (new file).
3151 2009-02-27 Robert Millan <rmh@aybabtu.com>
3153 * util/grub.d/10_linux.in: Rename "single-user mode" to
3156 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3158 Don't leak in SCSI code.
3159 * disk/scsi.c (grub_scsi_close): free `scsi'.
3161 2009-02-27 Robert Millan <rmh@aybabtu.com>
3163 * loader/i386/pc/multiboot.c: Move from here ...
3164 * loader/i386/multiboot.c: ... to here. Update all users.
3166 2009-02-27 Robert Millan <rmh@aybabtu.com>
3168 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3169 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3171 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
3173 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3176 2009-02-27 Robert Millan <rmh@aybabtu.com>
3178 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3179 `0x' qualifier as 0 when base is specified as parameter).
3181 2009-02-24 Bean <bean123ch@gmail.com>
3183 * configure.ac: Check for -mcmodel=large in x86_64 target.
3185 * include/grub/efi/api.h (efi_call_10): New macro.
3186 (efi_wrap_10): New function.
3188 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3189 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3190 (GRUB_PE32_REL_BASED_LOW): Likewise.
3191 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3192 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3193 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3194 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3195 (GRUB_PE32_REL_BASED_REL): Likewise.
3196 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3197 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3198 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3200 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3203 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3204 (efi_wrap_10): New function.
3206 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3208 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3209 MB/MBP model (NV chipset).
3210 (devdata_devs): Add devpath_5 to the list.
3212 * load/i386/efi/linux.c (video_base): Remove variable.
3213 (RGB_MASK): New macro.
3214 (RGB_MAGIC): Likewise.
3215 (LINE_MIN): Likewise.
3216 (LINE_MAX): Likewise.
3217 (FBTEST_STEP): Likewise.
3218 (FBTEST_COUNT): Likewise.
3219 (fb_list): New variable.
3220 (grub_find_video_card): Remove function.
3221 (find_framebuf): New function.
3222 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3225 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3228 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3230 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3232 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3235 2009-02-22 Robert Millan <rmh@aybabtu.com>
3237 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3238 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3239 in our relocation, instead of using it directly from heap. Also
3240 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3242 2009-02-21 Robert Millan <rmh@aybabtu.com>
3244 Implement USB keyboard support (based on patch by Marco Gerards)
3246 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3247 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3248 (usb_keyboard_mod_LDFLAGS): New variables.
3250 * term/usb_keyboard.c: New file.
3252 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3254 Corrected wrong declaration
3256 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3258 2009-02-14 Christian Franke <franke@computer.org>
3260 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3261 (grub_lspci_iter): Print class code and programming interface byte.
3263 2009-02-14 Christian Franke <franke@computer.org>
3265 * gendistlist.sh: Ignore `.svn' directories.
3267 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
3269 * fs/fat.c: Add 2009 to Copyright line.
3271 2009-02-14 Christian Franke <franke@computer.org>
3273 * commands/hdparm.c: New file. Provides `hdparm' command
3274 which sends ATA commands via grub_disk_ata_pass_through ().
3276 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3278 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3279 and <grub/cpu/io.h> to include/grub/ata.h.
3280 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3281 (GRUB_CDROM_SECTOR_SIZE): Remove.
3282 (GRUB_ATA_*): Move to include/grub/ata.h.
3283 (GRUB_ATAPI_*): Likewise.
3284 (enum grub_ata_commands): Likewise.
3285 (enum grub_ata_timeout_milliseconds): Likewise.
3286 (struct grub_ata_device): Likewise.
3287 (grub_ata_regset): Likewise.
3288 (grub_ata_regget): Likewise.
3289 (grub_ata_regset2): Likewise.
3290 (grub_ata_regget2): Likewise.
3291 (grub_ata_check_ready): Likewise.
3292 (grub_ata_wait_not_busy): Remove static, exported in
3294 (grub_ata_wait_drq): Likewise.
3295 (grub_ata_pio_read): Likewise.
3297 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3298 function for hdparm.mod.
3300 * include/grub/ata.h: New file, contains declarations from
3302 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3304 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3305 (grub_disk_ata_pass_through): New exported variable.
3307 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3309 2009-02-13 Colin D Bennett <colin@gibibit.com>
3311 Support multiple fallback entries, and provide an API to support
3312 executing default+fallback menu entries. Renamed the `terminal' menu
3315 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3316 variable declaration.
3317 (grub_menu_execute_callback): New structure declaration.
3318 (grub_menu_execute_callback_t): New typedef.
3319 (grub_menu_execute_with_fallback): New function declaration.
3320 (grub_menu_get_entry): Likewise.
3321 (grub_menu_get_timeout): Likewise.
3322 (grub_menu_set_timeout): Likewise.
3324 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3326 * normal/menu.c (grub_wait_after_message): Moved to
3327 `normal/menu_text.c'.
3328 (draw_border): Likewise.
3329 (print_message): Likewise.
3330 (print_entry): Likewise.
3331 (print_entries): Likewise.
3332 (grub_menu_init_page): Likewise.
3333 (get_entry_number): Likewise.
3334 (print_timeout): Likewise.
3335 (run_menu): Likewise.
3336 (grub_menu_execute_entry): Likewise.
3337 (show_text_menu): Likewise.
3338 (get_and_remove_first_entry_number): New function.
3339 (grub_menu_execute_with_fallback): Likewise.
3340 (get_entry): Renamed to ...
3341 (grub_menu_get_entry): .. this and made it global.
3342 (get_timeout): Renamed to ...
3343 (grub_menu_get_timeout): ... this and made it global.
3344 (set_timeout): Renamed to ...
3345 (grub_menu_set_timeout): ... this and made it global.
3346 (grub_normal_terminal_menu_viewer): Renamed to ...
3347 (grub_normal_text_menu_viewer): ... this.
3349 * normal/menu_text.c: New file. Extracted text-menu-specific code
3352 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3353 (normal_mod_SOURCES): Likewise.
3355 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3356 (normal_mod_SOURCES): Likewise.
3358 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3359 (normal_mod_SOURCES): Likewise.
3361 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3362 (normal_mod_SOURCES): Likewise.
3364 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3365 (normal_mod_SOURCES): Likewise.
3367 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3368 (normal_mod_SOURCES): Likewise.
3370 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3371 (normal_mod_SOURCES): Likewise.
3373 2009-02-11 Robert Millan <rmh@aybabtu.com>
3375 * util/grub.d/00_header.in: Update old reference to `font' command.
3377 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
3379 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3381 Based on patch from Javier MartÃn.
3383 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3385 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3386 to avoid false positives with FAT.
3387 (grub_fstest_SOURCES): Likewise.
3388 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3389 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3390 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3391 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3392 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3393 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3395 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3397 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3398 bpb.version_specific.fat12_or_fat16.fstype and
3399 bpb.version_specific.fat32.fstype.
3401 2009-02-08 Robert Millan <rmh@aybabtu.com>
3403 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3405 2009-02-08 Robert Millan <rmh@aybabtu.com>
3407 * Makefile.in (host_os, host_cpu): New variables.
3408 (target_os): Remove. Update all users.
3410 2009-02-08 Marco Gerards <marco@gnu.org>
3412 * Makefile.in (enable_grub_emu_usb): New variable.
3413 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3414 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3415 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3416 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3417 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3418 `usbtest.mod' and `usbms.mod'.
3419 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3420 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3421 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3422 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3423 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3426 * disk/usbms.c: New file.
3428 * include/grub/usb.h: Likewise.
3430 * include/grub/usbtrans.h: Likewise.
3432 * include/grub/usbdesc.h: Likewise.
3434 * bus/usb/usbtrans.c: Likewise.
3436 * bus/usb/ohci.c: Likewise.
3438 * bus/usb/uhci.c: Likewise.
3440 * bus/usb/usbhub.c: Likewise.
3442 * bus/usb/usb.c: Likewise.
3444 * commands/usbtest.c: Likewise.
3446 * util/usb.c: Likewise.
3448 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3450 * configure.ac: Test for libusb presence.
3452 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3454 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3456 * kern/mm.c: Add more comments.
3458 2009-02-08 Robert Millan <rmh@aybabtu.com>
3460 Patch from Javier MartÃn.
3461 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3462 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3464 2009-02-08 Robert Millan <rmh@aybabtu.com>
3466 * fs/cpio.c: Split tar functionality to ...
3467 * fs/tar.c: ... here (new file). Update all users.
3469 2009-02-07 Robert Millan <rmh@aybabtu.com>
3471 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3472 backward-incompatible features.
3474 Based on patch from Javier MartÃn, with some adjustments.
3476 2009-02-07 Michael Scherer <misc@mandriva.org>
3478 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3480 2009-02-07 Robert Millan <rmh@aybabtu.com>
3482 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3483 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3484 after the RAID stuff.
3486 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3488 Fixes problem when running vbetest command as reported by
3489 Vladimir Serbinenko <phcoder@gmail.com>.
3491 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3493 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
3495 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3496 /dev/md/NpN style mdraid devices.
3498 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3500 * util/unifont2pff.rb: Remove.
3502 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3504 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3507 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3509 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3510 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3511 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3512 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3513 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3514 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3515 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3517 2009-02-02 Christian Franke <franke@computer.org>
3519 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3521 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
3523 * INSTALL: Note that we now require at least autoconf 2.59 and
3524 that LZO is optional.
3526 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3528 Base on patch on bug #24154 created by Tomas Tintera
3531 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3533 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3535 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3536 <bero@arklinux.org>.
3538 * normal/parser.y (script_init): Add missing semicolon.
3540 2009-01-31 Colin D Bennett <colin@gibibit.com>
3542 * normal/main.c: Add include to grub/menu_viewer.h.
3543 (free_menu_entry_classes): Added.
3544 (grub_normal_menu_addentry): Added class property handling.
3545 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3546 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3548 * normal/menu_viewer.c: New file.
3550 * normal/menu.c (run_menu_entry): Renamed to ...
3551 (grub_menu_execute_entry): ... this and made it as global.
3552 (grub_menu_run): Renamed to ...
3553 (show_text_menu): ... this and made it local.
3554 (show_text_menu): Adapt to new function names.
3555 (grub_normal_terminal_menu_viewer): New global variable.
3557 * include/grub/menu.h: New file.
3559 * include/grub/menu_viewer.h: New file.
3561 * include/grub/normal.h: Added include to grub/menu.h.
3562 (grub_menu_entry): Moved to include/grub/menu.h.
3563 (grub_menu_entry_t): Likewise.
3564 (grub_menu): Likewise.
3565 (grub_menu_t): Likewise.
3566 (grub_normal_terminal_menu_viewer): Added.
3567 (grub_menu_execute_entry): Likewise.
3568 (grub_menu_run): Removed.
3570 * DISTLIST: Added include/grub/menu.h.
3571 Added include/grub/menu_viewer.h.
3572 Added normal/menu_viewer.c.
3574 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3576 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3577 arglist for menutitle arguments.
3579 * normal/main.c (grub_normal_menu_addentry): Likewise.
3581 * normal/parser.y (menuentry): Likewise.
3583 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3585 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3586 (grub_script_create_cmdmenu): Likewise.
3588 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3590 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3593 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3595 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3597 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3599 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3601 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3603 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3605 2009-01-30 Christian Franke <franke@computer.org>
3607 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3608 in option help text.
3610 2009-01-27 Pavel Roskin <proski@gnu.org>
3612 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3614 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3616 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3618 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3620 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3621 unregister function.
3623 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3625 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3627 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3629 * util/grub-mkfont.c (usage): Fix typo.
3631 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3633 2009-01-26 Daniel Mierswa <impulze@impulze.org>
3635 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3637 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3639 * kern/misc.c (grub_strcasecmp): New function.
3640 (grub_strcasecmp): Use grub_size_t instead of int for length.
3642 * include/grub/misc.h: Update function prototypes.
3644 2009-01-26 Robert Millan <rmh@aybabtu.com>
3646 * configure.ac: Fix cross-compilation check.
3648 2009-01-22 Christian Franke <franke@computer.org>
3650 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3651 (precision) digit string. Allow `.format2' without `format1' (width).
3652 Limit input chars for `%s' output to `format2' if specified. This is
3653 compatible with standard printf ().
3655 2009-01-22 Christian Franke <franke@computer.org>
3657 * disk/ata.c (grub_ata_wait_status): Replace by ...
3658 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3659 other status bits may be invalid while BSY is asserted.
3660 (grub_ata_check_ready): New function.
3661 (grub_ata_cmd): Removed.
3662 (grub_ata_wait_drq): New function.
3663 (grub_ata_strncpy): Remove inline.
3664 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3665 and error check now done by grub_ata_wait_drq ().
3666 (grub_ata_pio_write): Likewise.
3667 (grub_atapi_identify): Set DEV before check for !BSY. Use
3668 grub_ata_wait_drq () to wait for data.
3669 (grub_ata_device_initialize): Add status register check to
3670 detect missing SATA slave devices. Add debug messages.
3671 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3672 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3673 transfer loop by grub_ata_pio_write ().
3674 (grub_ata_identify): Set DEV before check for !BSY. Use
3675 grub_ata_wait_drq () to wait for data.
3676 (grub_ata_setaddress): Set DEV before check for !BSY.
3677 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3678 read/write in one loop. Fix invalid command on write. Fix incomplete
3679 command on (size % batch) == 0. Add missing error check after write of
3680 last block. Add debug messages.
3681 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
3683 2009-01-19 Christian Franke <franke@computer.org>
3685 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3686 (GRUB_ATAPI_IREASON_*): Likewise.
3687 (grub_ata_pio_write): Fix timeout error return.
3688 (grub_atapi_identify): Add grub_ata_wait () after cmd.
3689 (grub_atapi_wait_drq): New function.
3690 (grub_atapi_packet): New parameter `size'.
3691 Use grub_atapi_wait_drq () and direct write instead of
3692 grub_ata_pio_write ().
3693 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3694 reads the number of bytes requested by the device for each DRQ
3696 (grub_atapi_write): Remove old implementation, return not
3697 implemented instead.
3699 2009-01-19 Christian Franke <franke@computer.org>
3701 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3702 of 512 to calculate data size.
3703 (grub_scsi_read12): Likewise.
3704 (grub_scsi_write10): Likewise.
3705 (grub_scsi_write12): Likewise.
3706 (grub_scsi_read): Adjust size according to blocksize.
3707 Add checks for invalid blocksize and unaligned transfer.
3709 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
3711 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3713 * term/gfxterm.c (write_char): Fix background rendering for wide
3716 2009-01-19 Robert Millan <rmh@aybabtu.com>
3718 * config.guess: Update to latest version from config git.
3719 * config.sub: Likewise.
3721 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
3723 * Makefile.in: Change font compilation to use new grub-mkfont instead
3726 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3727 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3728 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3729 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3730 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3731 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3732 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3733 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3734 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3736 2009-01-16 Christian Franke <franke@computer.org>
3738 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3739 (enum grub_ata_timeout_milliseconds): New enum.
3740 (grub_ata_wait_status): Add parameter milliseconds.
3741 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3742 recovery from timed-out commands.
3743 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3744 return grub_errno instead of REG_ERROR.
3745 (grub_ata_pio_write): Add parameter milliseconds.
3746 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3747 Pass milliseconds to grub_ata_wait_status () and
3748 grub_ata_pio_read ().
3749 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3750 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3751 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3752 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3753 It is not suitable for device detection, because DEV bit is ignored,
3754 the command may run too long, and not all devices set the signature
3756 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3757 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3758 Fix device selection, DEV bit must be set first to address the registers
3759 of the correct device.
3760 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3761 grub_ata_pio_read/write ().
3762 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3763 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3765 2009-01-13 Carles Pina i Estany <carles@pina.cat>
3767 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3769 2009-01-13 Bean <bean123ch@gmail.com>
3771 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3773 2009-01-13 Bean <bean123ch@gmail.com>
3775 * Makefile.in: (enable_grub_mkfont): New variable.
3776 (freetype_cflags): Likewise.
3777 (freetype_libs): Likewise.
3779 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3780 (grub_mkfont_SOURCES): New variable.
3781 (grub_mkfont_CFLAGS): Likewise.
3782 (grub_mkfont_LDFLAGS): Likewise.
3784 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3785 library if `--enable-grub-mkfont' is requested.
3786 (enable_grub_mkfont): New variable.
3787 (freetype_cflags): Likewise.
3788 (freetype_libs): Likewise.
3790 * util/grub-mkfont.c: New file.
3792 2009-01-12 Christian Franke <franke@computer.org>
3794 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3795 mode check. Fix setting of compat_use[].
3797 2009-01-10 Robert Millan <rmh@aybabtu.com>
3799 Update a few copyright years which we forgot to do in 2008 (only for
3800 files whose changes made in 2008 were copyright-significant)
3802 * Makefile.in: Add 2008 to Copyright line.
3803 * disk/ieee1275/ofdisk.c: Likewise.
3804 * disk/efi/efidisk.c: Likewise.
3805 * kern/dl.c: Likewise.
3806 * kern/sparc64/ieee1275/init.c: Likewise.
3807 * kern/mm.c: Likewise.
3808 * kern/efi/mm.c: Likewise.
3809 * boot/i386/pc/boot.S: Likewise.
3810 * genfslist.sh: Likewise.
3811 * fs/iso9660.c: Likewise.
3812 * fs/hfs.c: Likewise.
3813 * fs/jfs.c: Likewise.
3814 * fs/minix.c: Likewise.
3815 * fs/ufs.c: Likewise.
3816 * gensymlist.sh.in: Likewise.
3817 * genkernsyms.sh.in: Likewise.
3818 * include/grub/misc.h: Likewise.
3819 * include/grub/types.h: Likewise.
3820 * include/grub/symbol.h: Likewise.
3821 * include/grub/elf.h: Likewise.
3822 * include/grub/kernel.h: Likewise.
3823 * include/grub/disk.h: Likewise.
3824 * include/grub/dl.h: Likewise.
3825 * include/grub/i386/linux.h: Likewise.
3826 * include/grub/i386/pc/biosdisk.h: Likewise.
3827 * include/grub/efi/api.h: Likewise.
3828 * include/grub/efi/pe32.h: Likewise.
3829 * include/grub/util/misc.h: Likewise.
3830 * normal/execute.c: Likewise.
3831 * normal/arg.c: Likewise.
3832 * normal/completion.c: Likewise.
3833 * normal/lexer.c: Likewise.
3834 * normal/parser.y: Likewise.
3835 * normal/misc.c: Likewise.
3836 * commands/i386/pc/vbeinfo.c: Likewise.
3837 * commands/hexdump.c: Likewise.
3838 * commands/terminal.c: Likewise.
3839 * commands/ls.c: Likewise.
3840 * commands/help.c: Likewise.
3841 * partmap/pc.c: Likewise.
3842 * loader/efi/chainloader.c: Likewise.
3843 * loader/multiboot_loader.c: Likewise.
3844 * loader/i386/pc/multiboot2.c: Likewise.
3845 * term/efi/console.c: Likewise.
3846 * term/i386/pc/serial.c: Likewise.
3847 * util/lvm.c: Likewise.
3848 * util/console.c: Likewise.
3849 * util/i386/efi/grub-mkimage.c: Likewise.
3850 * util/raid.c: Likewise.
3852 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3854 * commands/videotest.c: Removed include to grub/machine/memory.h.
3856 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3857 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3858 (video_mod_SOURCES): Removed.
3859 (video_mod_CFLAGS): Likewise.
3860 (video_mod_LDFLAGS): Likewise.
3861 (gfxterm_mod_SOURCES): Likewise.
3862 (gfxterm_mod_CFLAGS): Likewise.
3863 (gfxterm_mod_LDFLAGS): Likewise.
3864 (videotest_mod_SOURCES): Likewise.
3865 (videotest_mod_CFLAGS): Likewise.
3866 (videotest_mod_LDFLAGS): Likewise.
3867 (bitmap_mod_SOURCES): Likewise.
3868 (bitmap_mod_CFLAGS): Likewise.
3869 (bitmap_mod_LDFLAGS): Likewise.
3870 (tga_mod_SOURCES): Likewise.
3871 (tga_mod_CFLAGS): Likewise.
3872 (tga_mod_LDFLAGS): Likewise.
3873 (jpeg_mod_SOURCES): Likewise.
3874 (jpeg_mod_CFLAGS): Likewise.
3875 (jpeg_mod_LDFLAGS): Likewise.
3876 (png_mod_SOURCES): Likewise.
3877 (png_mod_CFLAGS): Likewise.
3878 (png_mod_LDFLAGS): Likewise.
3880 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3881 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3882 (video_mod_SOURCES): Added.
3883 (video_mod_CFLAGS): Likewise.
3884 (video_mod_LDFLAGS): Likewise.
3885 (videotest_mod_SOURCES): Likewise.
3886 (videotest_mod_CFLAGS): Likewise.
3887 (videotest_mod_LDFLAGS): Likewise.
3888 (bitmap_mod_SOURCES): Likewise.
3889 (bitmap_mod_CFLAGS): Likewise.
3890 (bitmap_mod_LDFLAGS): Likewise.
3891 (tga_mod_SOURCES): Likewise.
3892 (tga_mod_CFLAGS): Likewise.
3893 (tga_mod_LDFLAGS): Likewise.
3894 (jpeg_mod_SOURCES): Likewise.
3895 (jpeg_mod_CFLAGS): Likewise.
3896 (jpeg_mod_LDFLAGS): Likewise.
3897 (png_mod_SOURCES): Likewise.
3898 (png_mod_CFLAGS): Likewise.
3899 (png_mod_LDFLAGS): Likewise.
3900 (gfxterm_mod_SOURCES): Likewise.
3901 (gfxterm_mod_CFLAGS): Likewise.
3902 (gfxterm_mod_LDFLAGS): Likewise.
3904 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3905 grub/machine/console.h.
3907 2009-01-04 Jerone Young <jerone@gmail.com>
3909 Make on screen instructions clearer
3911 Based on patch created by Jidanni <jidanni@jidanni.org>
3913 * normal/menu.c: print clearer instructions on the screen
3915 2009-01-02 Colin D Bennett <colin@gibibit.com>
3919 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3920 build system and fixed gfxterm.c to work with different sized fonts.
3922 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3924 * configure: Re-generated.
3926 * DISTLIST: Removed font/manager.c.
3928 Added font/font_cmd.c.
3930 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3933 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
3935 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3937 * kern/term.c: Changed users of grub_utf8_to_ucs4.
3939 * normal/menu.c: Likewise.
3941 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3942 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3944 * include/grub/font.h: Replaced with new file.
3946 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3947 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3948 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3949 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3950 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3951 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3952 fg_red, fg_green, fg_blue, fg_alpha.
3953 (grub_video_adapter): Removed blit_glyph.
3954 (grub_video_blit_glyph): Removed.
3956 * font/manager.c: Removed file.
3958 * font/font.c: New file.
3960 * font/font_cmd.c: Likewise.
3962 * video/video.c (grub_video_blit_glyph): Removed.
3964 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3965 (grub_video_vbe_map_rgba): Likewise.
3966 (grub_video_vbe_unmap_color_int): Likewise.
3967 (grub_video_vbe_blit_glyph): Removed.
3968 (grub_video_vbe_adapter): Removed blit_glyph.
3970 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3971 (get_pixel): Likewise.
3972 (set_pixel): Likewise.
3974 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3976 * term/gfxterm.c: Adapted to new font engine.
3978 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
3980 * term/i386/pc/vga.c: Likewise.
3982 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3984 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3986 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3988 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3990 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3992 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3994 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3996 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3998 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4000 * util/grub.d/00_header.in: Changed to use new loadfont command.
4002 * util/grub-mkconfig_lib.in: Changed font extension.
4004 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
4006 * util/getroot.c (grub_util_get_grub_dev): Add support for
4007 /dev/md/dNNpNN style partitionable mdraid devices.
4009 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
4011 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4012 at a time limit of the PXE TFTP API correctly.
4013 (grub_pxefs_close): Likewise.
4015 2008-11-29 Robert Millan <rmh@aybabtu.com>
4017 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4018 grub_ata_device_initialize() calls.
4020 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
4022 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4024 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4026 2008-11-28 Robert Millan <rmh@aybabtu.com>
4028 Fix build on powerpc-ieee1275. Based on patch created by
4029 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4030 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4031 `kern/ieee1275/mmap.c'.
4032 * include/grub/powerpc/ieee1275/memory.h: New file.
4034 Provide grub-install on coreboot.
4035 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4036 (grub_install_SOURCES): New variable.
4037 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4040 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
4042 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4043 to `grub_term_input_t'.
4044 (grub_term_get_current_output): Change return type to
4045 `grub_term_output_t'.
4047 2008-11-22 Robert Millan <rmh@aybabtu.com>
4049 Fix breakage on coreboot due to declaration mismatch.
4050 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4051 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4052 grub_vga_text_cls().
4054 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4055 comments. Avoid copying one more byte than necessary (just in case).
4057 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4058 to 0x200000 (avoids trouble with some OFW implementations, and matches
4059 with the one in Yaboot).
4060 Reported by Manoel Abranches
4062 2008-11-20 Robert Millan <rmh@aybabtu.com>
4064 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4065 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4067 * util/grub-mkconfig_lib.in (grub_warn): New function.
4068 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4069 warnings, to obtain consistent formatting.
4070 * util/grub.d/00_header.in: Likewise.
4071 * util/update-grub_lib.in: Likewise.
4073 * loader/i386/linux.c (allocate_pages): Fix a warning.
4074 Move comment text to `#error' stanza.
4076 Harmonize ieee1275's grub_available_iterate() with the generic
4077 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4078 build problem on i386-ieee1275):
4079 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4080 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4081 parameter `type'. Update all users of this function.
4082 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4083 `kern/ieee1275/mmap.c'.
4084 * kern/ieee1275/init.c
4085 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4087 (grub_machine_mmap_iterate): ... this.
4088 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4089 return type to `grub_err_t'. Update all implementations of this
4091 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4094 Add `lsmmap' command (lists firmware-provided memory map):
4095 * commands/lsmmap.c: New file.
4096 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4097 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4099 * conf/powerpc-ieee1275.rmk: Likewise.
4100 * conf/i386-coreboot.rmk: Likewise.
4101 * conf/i386-ieee1275.rmk: Likewise.
4103 2008-11-19 Robert Millan <rmh@aybabtu.com>
4105 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4106 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4107 constraints to initrd allocation (based on code from
4108 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4109 for Linux to find it.
4111 2008-11-14 Robert Millan <rmh@aybabtu.com>
4113 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4114 order to cope with duplicate slashes.
4116 2008-11-14 Robert Millan <rmh@aybabtu.com>
4118 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4119 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4120 don't want to mess with lower memory, because it is used in the Linux
4123 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4124 an appropriate place in lower memory, between 0x10000 and 0x90000,
4125 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4126 is in our heap (probably as a result of it being corrupted during
4127 decompression). Add #error instance with comment to explain why this
4128 loader isn't currently usable on PC/BIOS.
4130 2008-11-14 Robert Millan <rmh@aybabtu.com>
4132 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4133 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4135 2008-11-12 Robert Millan <rmh@aybabtu.com>
4137 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4139 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4140 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4142 * include/grub/i386/pc/memory.h: ... to here.
4144 2008-11-12 Robert Millan <rmh@aybabtu.com>
4146 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4149 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4150 (grub_console_cur_color, grub_console_real_putchar)
4151 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4152 (grub_console_setcolorstate, grub_console_setcolor)
4153 (grub_console_getcolor): Move from here ...
4154 * include/grub/i386/vga_common.h: ... to here (new file).
4156 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4157 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4159 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4160 `<grub/i386/vga_common.h>'.
4162 2008-11-12 Robert Millan <rmh@aybabtu.com>
4164 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4165 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4166 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4168 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4169 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4171 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4172 grub_console_init() with call to grub_vga_text_init().
4173 (grub_machine_fini): Replace call to
4174 grub_console_fini() with call to grub_vga_text_fini() and
4175 grub_at_keyboard_fini().
4177 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4178 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4179 (grub_console_setcolorstate, grub_console_setcolor)
4180 (grub_console_getcolor): New function prototypes.
4182 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4183 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4184 (grub_vga_text_setcursor): Static-ize.
4185 (grub_vga_text_term): New structure.
4186 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4188 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4189 (grub_console_cur_color, grub_console_standard_color)
4190 (grub_console_normal_color, grub_console_highlight_color)
4191 (map_char, grub_console_putchar, grub_console_getcharwidth)
4192 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4193 (grub_console_getcolor): Move from here ...
4194 * term/i386/vga_common.c: ... to here (same function names).
4196 2008-11-12 Robert Millan <rmh@aybabtu.com>
4198 Use newly-added Multiboot support in coreboot.
4200 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4201 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4203 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4204 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4205 (codestart): Store the MBI in `startup_multiboot_info' when we're
4206 being loaded using Multiboot.
4208 * kern/i386/coreboot/init.c (grub_machine_init): Move
4209 grub_at_keyboard_init() call to beginning of function (useful for
4210 debugging). Call grub_machine_mmap_init() before attempting to use
4211 grub_machine_mmap_iterate().
4212 (grub_lower_mem, grub_upper_mem): Move from here ...
4213 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4216 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4219 2008-11-12 Robert Millan <rmh@aybabtu.com>
4221 Fix a regression introduced by the at_keyboard.mod split. Because
4222 some terminals are default on some platforms and non-default on
4223 others, the first terminal being registered determines which is
4224 going to be default.
4226 * kern/term.c (grub_term_register_input): If this is the first
4227 terminal being registered, set it as the current one.
4228 (grub_term_register_output): Likewise.
4230 * term/efi/console.c (grub_console_init): Do not call
4231 grub_term_set_current_output() or grub_term_set_current_input().
4232 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4233 * term/i386/pc/console.c (grub_console_init): Likewise.
4234 (grub_console_fini): Do not call grub_term_set_current_input()
4235 (but leave grub_term_set_current_output() to restore text mode).
4237 2008-11-10 Robert Millan <rmh@aybabtu.com>
4239 * util/grub.d/00_header.in: Add backward compatibility check for
4240 versions of terminal.mod that don't understand `terminal_input' or
4243 2008-11-09 Robert Millan <rmh@aybabtu.com>
4245 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4246 `terminal_input' / `terminal_output', not `terminal'.
4248 2008-11-08 Robert Millan <rmh@aybabtu.com>
4250 * Makefile.in (include_DATA): Fix srcdir=. assumption.
4251 (DISTCLEANFILES): Add `build_env.mk'.
4253 2008-11-08 Robert Millan <rmh@aybabtu.com>
4255 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4256 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4257 members. Update all users.
4258 * util/console.c (grub_ncurses_term): Split in ...
4259 (grub_ncurses_term_input): ... this, and ...
4260 (grub_ncurses_term_output): ... this. Update all users.
4261 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4263 2008-11-08 Robert Millan <rmh@aybabtu.com>
4265 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4266 (PKGDATA): Add $(pkgdata_SRCDIR).
4267 (pkglib_BUILDDIR): New variable.
4268 (pkgdata_SRCDIR): New variable.
4269 (build_env.mk): New target.
4270 (include_DATA): New variable.
4271 (install-local): Install $(include_DATA) files in $(includedir).
4273 2008-11-07 Pavel Roskin <proski@gnu.org>
4275 * gendistlist.sh: Use C locale for sorting to ensure consistent
4276 output on all systems.
4278 * util/grub.d/00_header.in: Remove incorrect space before
4281 2008-11-07 Robert Millan <rmh@aybabtu.com>
4283 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4285 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4286 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4287 (based on find_multi_boot1_header).
4288 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4289 using find_multi_boot2_header(), and abort if neither Multiboot or
4290 Multiboot headers were found.
4292 2008-11-07 Robert Millan <rmh@aybabtu.com>
4294 Modularize at_keyboard.mod:
4296 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4297 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4298 (at_keyboard_mod_LDFLAGS): New variables.
4300 Actual terminal split:
4302 * include/grub/term.h (struct grub_term): Split in ...
4303 (struct grub_term_input): ... this, and ...
4304 (struct grub_term_output): ... this. Update all users.
4305 (grub_term_set_current): Split in ...
4306 (grub_term_set_current_input): ... this, and ...
4307 (grub_term_set_current_output): ... this.
4308 (grub_term_get_current): Split in ...
4309 (grub_term_get_current_input): ... this, and ...
4310 (grub_term_get_current_output): ... this.
4311 (grub_term_register): Split in ...
4312 (grub_term_register_input): ... this, and ...
4313 (grub_term_register_output): ... this.
4314 (grub_term_unregister): Split in ...
4315 (grub_term_unregister_input): ... this, and ...
4316 (grub_term_unregister_output): ... this.
4317 (grub_term_iterate): Split in ...
4318 (grub_term_iterate_input): ... this, and ...
4319 (grub_term_iterate_output): ... this.
4321 * kern/term.c (grub_term_list): Split in ...
4322 (grub_term_list_input): ... this, and ...
4323 (grub_term_list_output): ... this. Update all users.
4324 (grub_cur_term): Split in ...
4325 (grub_cur_term_input): ... this, and ...
4326 (grub_cur_term_output): ... this. Update all users.
4327 (grub_term_set_current): Split in ...
4328 (grub_term_set_current_input): ... this, and ...
4329 (grub_term_set_current_output): ... this.
4330 (grub_term_get_current): Split in ...
4331 (grub_term_get_current_input): ... this, and ...
4332 (grub_term_get_current_output): ... this.
4333 (grub_term_register): Split in ...
4334 (grub_term_register_input): ... this, and ...
4335 (grub_term_register_output): ... this.
4336 (grub_term_unregister): Split in ...
4337 (grub_term_unregister_input): ... this, and ...
4338 (grub_term_unregister_output): ... this.
4339 (grub_term_iterate): Split in ...
4340 (grub_term_iterate_input): ... this, and ...
4341 (grub_term_iterate_output): ... this.
4343 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4344 a check for input and one for output (and only attempt to get keys
4345 from user when input works).
4347 * util/grub-probe.c (grub_term_get_current): Split in ...
4348 (grub_term_get_current_input): ... this, and ...
4349 (grub_term_get_current_output): ... this.
4350 * util/grub-fstest.c: Likewise.
4351 * util/i386/pc/grub-setup.c: Likewise.
4352 * util/grub-editenv.c: Likewise.
4354 Portability adjustments:
4356 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4357 `term/i386/pc/at_keyboard.c'.
4358 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4359 grub_keyboard_controller_init() (now handled by terminal .init).
4360 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4361 grub_at_keyboard_init().
4362 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4363 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4364 at_keyboard.mod via input terminal interface).
4365 * include/grub/i386/coreboot/console.h: Convert into a stub for
4366 `<grub/i386/pc/console.h>'.
4368 Migrate full terminals to new API:
4370 * term/efi/console.c (grub_console_term): Split into ...
4371 (grub_console_term_input): ... this, and ...
4372 (grub_console_term_output): ... this. Update all users.
4373 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4374 (grub_ofconsole_init): Split into ...
4375 (grub_ofconsole_init_input): ... this, and ...
4376 (grub_ofconsole_init_output): ... this.
4377 (grub_ofconsole_term): Split into ...
4378 (grub_ofconsole_term_input): ... this, and ...
4379 (grub_ofconsole_term_output): ... this. Update all users.
4380 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4381 (grub_serial_term_input): ... this, and ...
4382 (grub_serial_term_output): ... this. Update all users.
4383 * term/i386/pc/console.c (grub_console_term): Split into ...
4384 (grub_console_term_input): ... this, and ...
4385 (grub_console_term_output): ... this. Update all users.
4386 (grub_console_term_input): Only enable it on PC/BIOS platform.
4387 (grub_console_init): Remove grub_keyboard_controller_init() call.
4389 Migrate input terminals to new API:
4391 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4392 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4393 i386-specific anyway).
4394 (grub_console_checkkey): Rename to ...
4395 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4397 (grub_keyboard_controller_orig): New variable.
4398 (grub_console_getkey): Rename to ...
4399 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4401 (grub_keyboard_controller_init): Static-ize. Save original
4402 controller value so that it can be restored ...
4403 (grub_keyboard_controller_fini): ... here (new function).
4404 (grub_at_keyboard_term): New structure.
4405 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4408 Migrate output terminals to new API:
4410 * term/i386/pc/vga.c (grub_vga_term): Change type to
4411 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4412 members. Update all users.
4413 * term/gfxterm.c (grub_video_term): Change type to
4414 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4415 members. Update all users.
4416 * include/grub/i386/pc/console.h (grub_console_checkkey)
4417 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4420 Migrate `terminal' command and userland tools to new API:
4422 * commands/terminal.c (grub_cmd_terminal): Split into ...
4423 (grub_cmd_terminal_input): ... this, and ...
4424 (grub_cmd_terminal_output): ... this.
4425 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4426 `terminal_input' and `terminal_output'.
4427 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4428 `terminal_input' / `terminal_output' API.
4429 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4430 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4431 provided ${GRUB_TERMINAL}, convert it).
4433 2008-11-04 Robert Millan <rmh@aybabtu.com>
4435 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4437 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4439 2008-11-03 Bean <bean123ch@gmail.com>
4441 * kern/elf.c (grub_elf32_load): Revert to previous code.
4442 (grub_elf64_load): Likewise.
4444 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4446 2008-11-01 Robert Millan <rmh@aybabtu.com>
4448 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4449 (TARGET_CPPFLAGS): Likewise.
4450 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4452 2008-11-01 Carles Pina i Estany <carles@pina.cat>
4454 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4456 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4458 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4459 addition of objects until the code is not going to be able to fail.
4461 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4463 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4464 (add a missing NULL check, and correct them by moving the pointer
4465 operations after the actual check).
4467 2008-10-29 Robert Millan <rmh@aybabtu.com>
4469 * util/i386/pc/grub-install.in: Handle empty string as output from
4470 make_system_path_relative_to_its_root().
4472 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4474 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4475 circular metadata worst case scenario. If the metadata is circular
4476 then copy the wrap in place.
4477 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4478 project lib/format_text/layout.h
4479 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4481 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4483 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4485 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4487 * util/update-grub_lib.in: Mention filename in warning message.
4489 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4491 * NEWS: Update for rename of update-grub to grub-mkconfig.
4493 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4495 * util/update-grub_lib.in: Copy to ...
4496 * util/grub-mkconfig_lib.in: ... this. Update all users.
4497 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4498 * util/update-grub.in: Rename to ...
4499 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4500 option. Add `--output' option to allow users to specify the generated
4501 configuration file. Default to stdout.
4502 (update_grub_dir): Rename to ...
4503 (grub_mkconfig_dir): ... this.
4504 (grub_cfg): Default to an empty string.
4505 * conf/common.rmk (update-grub): Rename to ...
4506 (grub-mkconfig): ... this.
4507 (update-grub_lib): Copy to ...
4508 (grub-mkconfig_lib): ... this.
4509 (update-grub_SCRIPTS): Copy to ...
4510 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4511 (update-grub_DATA): Rename to ...
4512 (grub-mkconfig_DATA): ... this.
4514 2008-09-28 Robert Millan <rmh@aybabtu.com>
4516 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4517 to `modified'. Add the real `created' field.
4518 (grub_iso9660_uuid): Use `modified' rather than `created' for
4519 constructing the UUID.
4521 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
4523 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4524 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4526 2008-09-28 Bean <bean123ch@gmail.com>
4528 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4529 Thanks to Christian Franke for finding this bug.
4531 2008-09-25 Robert Millan <rmh@aybabtu.com>
4533 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4534 instances of grub_util_get_disk_name() (see previous commit).
4536 2008-09-25 Robert Millan <rmh@aybabtu.com>
4538 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4539 `util/i386/get_disk_name.c'.
4540 * conf/i386-efi.rmk: Likewise.
4541 * conf/x86_64-efi.rmk: Likewise.
4542 * conf/i386-coreboot.rmk: Likewise.
4543 * conf/i386-ieee1275.rmk: Likewise.
4544 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4545 `util/ieee1275/get_disk_name.c'.
4546 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4547 * util/ieee1275/get_disk_name.c: Remove file.
4548 * util/i386/get_disk_name.c: Remove file.
4549 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4550 "hd%d" for device.map entries, rather than using
4551 grub_util_get_disk_name().
4553 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4555 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4557 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4559 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4561 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4563 (GRUB_TERM_PPAGE): Changed to 0x4900.
4565 2008-09-24 Robert Millan <rmh@aybabtu.com>
4567 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4568 macros (they were i386-pc specific).
4569 * include/grub/sparc64/ieee1275/console.h: Likewise.
4570 * include/grub/efi/console.h: Likewise.
4572 2008-09-22 Bean <bean123ch@gmail.com>
4574 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4575 resident and in attribute list.
4577 * include/grub/ntfs.h (BMP_LEN): Removed.
4579 2008-09-22 Bean <bean123ch@gmail.com>
4581 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4582 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4584 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4585 error occurs, as grub_disk_open will call grub_disk_close, which will
4586 call p->close (scsi).
4588 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4590 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4591 (AC_PREREQ): Bumped to 2.59.
4592 (AC_TRY_COMPILE): Replace obsolete macro with ...
4593 (AC_COMPILE_IFELSE): ... this.
4594 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4595 (AC_LINK_IFELSE): ... this.
4597 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4599 * autogen.sh: Add a call to `gendistlist.sh'.
4601 2008-09-19 Christian Franke <franke@computer.org>
4603 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4604 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4605 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4606 Export __enable_execute_stack() to modules.
4607 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4610 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4612 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4615 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4617 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4618 #include <grub/util/hostdisk.h>.
4620 2008-09-08 Robert Millan <rmh@aybabtu.com>
4622 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4623 segments when their filesz is zero (grub_file_read() interprets
4624 zero-size as "read until EOF", which results in memory corruption).
4625 Use `lowest_segment' rather than 0 for calculating the current
4626 segment load address.
4628 2008-09-08 Robert Millan <rmh@aybabtu.com>
4630 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4631 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4632 clobbered useful information.
4634 2008-09-08 Robert Millan <rmh@aybabtu.com>
4636 * include/grub/util/biosdisk.h: Move to ...
4637 * include/grub/util/hostdisk.h: ... here. Update all users.
4638 * util/biosdisk.c: Move to ...
4639 * util/hostdisk.c: ... here. Update all users.
4641 2008-09-07 Robert Millan <rmh@aybabtu.com>
4643 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4645 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4646 and length can be stored directly in the `mbi->mmap_addr' and
4647 `mbi->mmap_length' struct fields.
4649 2008-09-07 Robert Millan <rmh@aybabtu.com>
4651 * conf/i386.rmk: New file. Provides declaration for building
4653 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4654 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4656 Include `conf/i386.mk'.
4657 * conf/i386-efi.rmk: Likewise.
4658 * conf/x86_64-efi.rmk: Likewise.
4659 * conf/i386-coreboot.rmk: Likewise.
4660 * conf/i386-ieee1275.rmk: Likewise.
4662 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4664 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4665 Adds optimization support for BGR based modes.
4667 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4668 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4669 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4670 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4671 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4672 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4673 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4674 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4675 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4676 (grub_video_i386_vbeblit_index_index): Likewise.
4677 (grub_video_i386_vbeblit_replace_directN): Added.
4678 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4679 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4680 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4681 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4682 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4683 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4684 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4685 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4686 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4687 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4688 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4689 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4690 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4692 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4693 (grub_video_i386_vbefill_R8G8B8): Likewise.
4694 (grub_video_i386_vbefill_index): Likewise.
4695 (grub_video_i386_vbefill_direct32): Added.
4696 (grub_video_i386_vbefill_direct24): Likewise.
4697 (grub_video_i386_vbefill_direct16): Likewise.
4698 (grub_video_i386_vbefill_direct8): Likewise.
4700 * include/grub/video.h (grub_video_blit_format): Removed
4701 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4702 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4703 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4704 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4705 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4707 * video/video.c (grub_video_get_blit_format): Updated to use new
4708 blit formats. Added handling for 16 bit color modes.
4710 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4712 (common_blitter): Updated to use new blitters.
4714 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4716 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4717 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4718 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4719 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4720 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4721 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4722 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4723 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4724 (grub_video_i386_vbeblit_index_index): Likewise.
4725 (grub_video_i386_vbeblit_replace_directN): Added.
4726 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4727 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4728 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4729 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4730 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4731 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4732 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4733 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4734 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4735 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4736 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4737 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4738 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4740 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4741 (grub_video_i386_vbefill_R8G8B8): Likewise.
4742 (grub_video_i386_vbefill_index): Likewise.
4743 (grub_video_i386_vbefill_direct32): Added.
4744 (grub_video_i386_vbefill_direct24): Likewise.
4745 (grub_video_i386_vbefill_direct16): Likewise.
4746 (grub_video_i386_vbefill_direct8): Likewise.
4748 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4751 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4754 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4757 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4760 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4762 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4765 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4767 * fs/iso9660.c (grub_iso9660_date): New structure.
4768 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4769 (grub_iso9660_uuid): New function.
4771 2008-09-05 Bean <bean123ch@gmail.com>
4773 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4775 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4776 insensitive bit for names in Win32 and Win32 & DOS namespace.
4778 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4780 * include/grub/types.h (LONG_MAX): Likewise.
4782 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4784 * util/getroot.c: Include <config.h>.
4785 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4786 add support for /dev/md/N devices and handle LVM double dash escaping.
4788 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
4790 * config.guess: Update to latest version from config git.
4791 * config.sub: Likewise.
4793 2008-09-03 Robert Millan <rmh@aybabtu.com>
4795 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4796 `disk->total_sectors'.
4798 2008-09-01 Colin D Bennett <colin@gibibit.com>
4800 * include/grub/normal.h: Fixed incorrect comment for
4801 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4803 2008-09-01 Colin D Bennett <colin@gibibit.com>
4805 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4806 values with defines.
4808 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4809 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4810 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4811 (GRUB_VBE_MODEATTR_COLOR): Likewise.
4812 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4813 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4814 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4815 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4816 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4817 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4818 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4819 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4820 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4821 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4822 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4823 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4824 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4825 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4826 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4828 2008-08-31 Robert Millan <rmh@aybabtu.com>
4830 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4832 (grub_multiboot): Fix a few warnings.
4834 2008-08-31 Robert Millan <rmh@aybabtu.com>
4836 * loader/i386/pc/multiboot.c: Update comment not to say that
4837 boot_device support is unimplemented.
4839 2008-08-31 Robert Millan <rmh@aybabtu.com>
4841 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4842 or memory map support are unimplemented.
4844 2008-08-31 Colin D Bennett <colin@gibibit.com>
4846 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4848 2008-08-31 Colin D Bennett <colin@gibibit.com>
4850 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4851 total video memory in 'vbeinfo' output; show color format details for
4854 2008-08-30 Pavel Roskin <proski@gnu.org>
4856 * util/genmoddep.c: Remove for real this time.
4857 * DISTLIST: Remove util/genmoddep.c.
4859 2008-08-30 Robert Millan <rmh@aybabtu.com>
4861 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4862 as required by Multiboot spec (it was already 4-byte aligned, but
4865 2008-08-29 Pavel Roskin <proski@gnu.org>
4867 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4868 * kern/powerpc/ieee1275/startup.S: ... this.
4869 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4870 * DISTLIST: Likewise.
4872 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4873 grub/cpu/kernel.h. Add start label for consistency with other
4874 platforms. Add grub_prefix immediately after start. Add jump
4875 to the code after grub_prefix.
4876 * include/grub/powerpc/kernel.h: Provide valid values for
4877 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4879 2008-08-29 Bean <bean123ch@gmail.com>
4881 * configure.ac: Change host_os to cygwin for mingw.
4882 (asprintf): New check for function.
4884 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4885 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4887 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4888 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4889 sync, sleep and grub_util_get_disk_size for mingw.
4891 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4892 to get size in mingw.
4893 (open_device): Use flag O_BINARY if it's defined.
4894 (find_root_device): Add dummy code for mingw.
4896 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4897 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4898 (get_scsi_disk_name): Return 0 for mingw.
4900 * util/hostfs.c: #include <grub/util/misc.h>.
4901 (grub_hostfs_open): Use "rb" flag to open file, use
4902 grub_util_get_disk_size to get disk size for mingw.
4904 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4905 (asprintf): New function if HAVE_ASPRINTF is not set.
4906 (sync): New function for mingw.
4908 (grub_util_get_disk_size): Likewise.
4910 2008-08-28 Pavel Roskin <proski@gnu.org>
4912 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4915 2008-08-28 Robert Millan <rmh@aybabtu.com>
4917 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4919 2008-08-28 Robert Millan <rmh@aybabtu.com>
4921 Change find_grub_drive() syntax so it doesn't prevent it from
4922 detecting NULL names as errors.
4924 * util/biosdisk.c (find_grub_drive): Move free slot search code
4926 (find_free_slot): ... to here.
4927 (read_device_map): Use find_free_slot() to search for free slots.
4929 2008-08-27 Marco Gerards <marco@gnu.org>
4931 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4932 (scsi_mod_SOURCES): New variable.
4933 (scsi_mod_CFLAGS): Likewise
4934 (scsi_mod_LDFLAGS): Likewise.
4936 * disk/scsi.c: New file.
4938 * include/grub/scsi.h: Likewise.
4940 * include/grub/scsicmd.h: Likewise.
4942 * disk/ata.c: Include <grub/scsi.h>.
4943 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4945 (grub_ata_iterate): Skip ATAPI devices.
4946 (grub_ata_open): Only handle ATAPI devices.
4947 (struct grub_atapi_read): Removed.
4948 (grub_atapi_readsector): Likewise.
4949 (grub_ata_read): No longer handle ATAPI devices.
4950 (grub_ata_write): Likewise.
4951 (grub_atapi_iterate): New function.
4952 (grub_atapi_read): Likewise.
4953 (grub_atapi_write): Likewise.
4954 (grub_atapi_open): Likewise.
4955 (grub_atapi_close): Likewise.
4956 (grub_atapi_dev): New variable.
4957 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4958 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4960 * include/grub/disk.h (enum grub_disk_dev_id): Add
4961 `GRUB_DISK_DEVICE_SCSI_ID'.
4963 2008-08-26 Robert Millan <rmh@aybabtu.com>
4965 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4966 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4969 2008-08-23 Bean <bean123ch@gmail.com>
4971 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4972 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4973 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4974 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4976 (raid5rec_mod_SOURCES): New macro.
4977 (raid5rec_mod_CFLAGS): Likewise.
4978 (raid5rec_mod_LDFLAGS): Likewise.
4979 (raid6rec_mod_SOURCES): Likewise.
4980 (raid6rec_mod_CFLAGS): Likewise.
4981 (raid6rec_mod_LDFLAGS): Likewise.
4982 (mdraid_mod_SOURCES): Likewise.
4983 (mdraid_mod_CFLAGS): Likewise.
4984 (mdraid_mod_LDFLAGS): Likewise.
4985 (dm_nv_mod_SOURCES): Likewise.
4986 (dm_nv_mod_CFLAGS): Likewise.
4987 (dm_nv_mod_LDFLAGS): Likewise.
4989 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4990 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4991 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4993 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4994 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4996 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4998 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5000 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5002 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5004 * disk/raid5_recover.c: New file.
5006 * disk/raid6_recover.c: Likewise.
5008 * disk/mdraid_linux.c: Likewise.
5010 * disk/dmraid_nvidia.c: Likewise.
5012 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5015 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5016 calculate the size of raid device.
5017 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5018 different layout of raid5.
5019 (grub_raid_scan_device): Remove code specific to mdraid.
5020 (grub_raid_list): New variable.
5021 (free_array): New function.
5022 (grub_raid_register): Likewise.
5023 (grub_raid_unregister): Likewise.
5024 (grub_raid_rescan): Likewise.
5025 (GRUB_MOD_INIT): Don't iterate device here.
5026 (GRUB_MOD_FINI): Use free_array to release resource.
5028 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5029 (grub_raid5_recover_func_t): New function variable type.
5030 (grub_raid6_recover_func_t): Likewise.
5031 (grub_raid5_recover_func): New variable.
5032 (grub_raid6_recover_func): Likewise.
5033 (grub_raid_register): New function.
5034 (grub_raid_unregister): Likewise.
5035 (grub_raid_rescan): Likewise.
5036 (grub_raid_block_xor): Likewise.
5038 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5039 (CMD_CRC): New macro.
5041 (read_file): Handle device as well as file.
5042 (cmd_crc): New function.
5043 (fstest): Handle multiple disks.
5044 (options): Remove part, raw and long, add root and diskcount.
5045 (usage): Add crc, remove -p, -r, -l, add -r and -c.
5046 (main): Find the first non option entry and ignore subsequent options,
5047 add handling for the new options, support multiple disks.
5049 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5051 2008-08-23 Bean <bean123ch@gmail.com>
5053 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5055 * genfslist.sh: Ignore kernel.mod.
5057 * genpartmaplist.sh: Likewise.
5059 2008-08-23 Robert Millan <rmh@aybabtu.com>
5061 * util/getroot.c (find_root_device): Skip anything that starts with
5062 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5064 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
5066 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5067 * util/grub.d/00_header.in: Allow the administrator to change default
5068 gfxmode via ${GRUB_GFXMODE}.
5070 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
5072 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5074 2008-08-21 Robert Millan <rmh@aybabtu.com>
5076 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5078 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5079 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5081 2008-08-20 Carles Pina i Estany <carles@pina.cat>
5083 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5084 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5086 2008-08-19 Robert Millan <rmh@aybabtu.com>
5088 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5089 (struct grub_virtual_screen): Remove `cursor_color'.
5090 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5092 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5094 2008-08-18 Robert Millan <rmh@aybabtu.com>
5096 Unify (identical) linux_normal.c files.
5097 * loader/i386/efi/linux_normal.c: Move from here ...
5098 * loader/linux_normal.c: ... to here. Update all users.
5099 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5100 * loader/i386/ieee1275/linux_normal.c: Likewise.
5102 2008-08-18 Robert Millan <rmh@aybabtu.com>
5104 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5105 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5106 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5107 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5108 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5110 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5111 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5112 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5113 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5114 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5115 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5116 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5117 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5118 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5119 portably using grub_getxy().
5120 Replace `-EFI' with `-bzImage' in boot message.
5122 2008-08-17 Robert Millan <rmh@aybabtu.com>
5124 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5126 2008-08-17 Robert Millan <rmh@aybabtu.com>
5128 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5130 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5131 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5132 (grub_machine_mmap_iterate): New function declaration.
5133 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5135 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5138 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5139 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5140 Move e820 parsing from here ...
5141 * kern/i386/pc/mmap.c: New file.
5142 (grub_machine_mmap_iterate): ... to here.
5144 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5145 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5146 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5147 (grub_available_iterate): Redeclare to return `void', and redeclare
5148 its hook to use grub_uint64_t as addr and size parameters, and rename
5150 (grub_machine_mmap_iterate): ... this. Update all users.
5152 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5153 to make it more readable. Rename to ...
5154 (grub_machine_mmap_iterate): ... this.
5156 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5157 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5158 (grub_multiboot): Allocate an extra region after the payload, and fill
5159 it with a Multiboot memory map. Adjust a.out loader to calculate size
5160 with the extra space.
5161 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5162 with the extra space.
5164 2008-08-17 Carles Pina i Estany <carles@pina.cat>
5166 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5168 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
5170 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5171 mdate-sh to the list `find' searches for.
5172 * DISTLIST: Regenerated.
5174 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
5176 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5177 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5178 genmoddep.awk, gensymlist.sh.in.
5179 (DISTDIRS): Add bus, docs, hook, lib.
5180 * DISTLIST: Regenerated.
5181 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5183 2008-08-16 Robert Millan <rmh@aybabtu.com>
5185 * disk/raid.c (grub_raid_init): Handle/report errors set by
5186 grub_device_iterate().
5187 * disk/lvm.c (grub_lvm_init): Likewise.
5189 2008-08-15 Bean <bean123ch@gmail.com>
5191 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5193 (datetime_mod_SOURCES): New macro.
5194 (datetime_mod_CFLAGS): Likewise.
5195 (datetime_mod_LDFLAGS): Likewise.
5196 (date_mod_SOURCES): Likewise.
5197 (date_mod_CFLAGS): Likewise.
5198 (date_mod_LDFLAGS): Likewise.
5199 (datehook_mod_SOURCES): Likewise.
5200 (datehook_mod_CFLAGS): Likewise.
5201 (datehook_mod_LDFLAGS): Likewise.
5203 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5205 (datetime_mod_SOURCES): New macro.
5206 (datetime_mod_CFLAGS): Likewise.
5207 (datetime_mod_LDFLAGS): Likewise.
5208 (date_mod_SOURCES): Likewise.
5209 (date_mod_CFLAGS): Likewise.
5210 (date_mod_LDFLAGS): Likewise.
5211 (datehook_mod_SOURCES): Likewise.
5212 (datehook_mod_CFLAGS): Likewise.
5213 (datehook_mod_LDFLAGS): Likewise.
5215 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5217 (datetime_mod_SOURCES): New macro.
5218 (datetime_mod_CFLAGS): Likewise.
5219 (datetime_mod_LDFLAGS): Likewise.
5220 (date_mod_SOURCES): Likewise.
5221 (date_mod_CFLAGS): Likewise.
5222 (date_mod_LDFLAGS): Likewise.
5223 (datehook_mod_SOURCES): Likewise.
5224 (datehook_mod_CFLAGS): Likewise.
5225 (datehook_mod_LDFLAGS): Likewise.
5227 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5229 (datetime_mod_SOURCES): New macro.
5230 (datetime_mod_CFLAGS): Likewise.
5231 (datetime_mod_LDFLAGS): Likewise.
5232 (date_mod_SOURCES): Likewise.
5233 (date_mod_CFLAGS): Likewise.
5234 (date_mod_LDFLAGS): Likewise.
5235 (datehook_mod_SOURCES): Likewise.
5236 (datehook_mod_CFLAGS): Likewise.
5237 (datehook_mod_LDFLAGS): Likewise.
5239 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5241 (datetime_mod_SOURCES): New macro.
5242 (datetime_mod_CFLAGS): Likewise.
5243 (datetime_mod_LDFLAGS): Likewise.
5244 (date_mod_SOURCES): Likewise.
5245 (date_mod_CFLAGS): Likewise.
5246 (date_mod_LDFLAGS): Likewise.
5247 (datehook_mod_SOURCES): Likewise.
5248 (datehook_mod_CFLAGS): Likewise.
5249 (datehook_mod_LDFLAGS): Likewise.
5251 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5253 * commands/date.c: New file.
5255 * hook/datehook.c: Likewise.
5257 * include/grub/lib/datetime.h: Likewise.
5259 * include/grub/i386/cmos.h: Likewise.
5261 * lib/datetime.c: Likewise.
5263 * lib/i386/datetime.c: Likewise.
5265 * lib/efi/datetime.c: Likewise.
5267 2008-08-14 Robert Millan <rmh@aybabtu.com>
5269 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5270 (grub_mkelfimage_SOURCES): New variable.
5271 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5273 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5274 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5275 * conf/powerpc-ieee1275.rmk: Likewise.
5276 * conf/i386-ieee1275.rmk: Likewise.
5278 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5279 * kern/i386/coreboot/init.c: Likewise.
5281 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5282 with `<grub/cpu/kernel.h>'.
5283 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5285 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5286 * kern/i386/coreboot/startup.S: Likewise.
5288 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5289 (GRUB_MOD_GAP): Remove.
5290 * include/grub/powerpc/kernel.h: New file.
5291 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5292 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5293 * include/grub/i386/kernel.h: New file.
5294 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5295 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5296 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5298 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5300 Use --directory when invoking grub_mkimage.
5302 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5303 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5304 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5305 and GRUB_KERNEL_CPU_PREFIX.
5307 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
5309 * include/grub/err.h (grub_err_printf): New function prototype.
5310 * util/misc.c (grub_err_printf): New function.
5311 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5313 * kern/err.c (grub_print_error): Use grub_err_printf.
5315 2008-08-13 Robert Millan <rmh@aybabtu.com>
5317 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5319 2008-08-13 Robert Millan <rmh@aybabtu.com>
5321 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5324 2008-08-12 Robert Millan <rmh@aybabtu.com>
5326 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5327 of the relocation code from here ...
5328 (grub_multiboot): ... to here.
5329 (forward_relocator, backward_relocator): Move from here ...
5330 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5331 (grub_multiboot_backward_relocator): ... to here.
5332 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5333 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5334 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5335 (grub_multiboot_forward_relocator_end)
5336 (grub_multiboot_backward_relocator)
5337 (grub_multiboot_backward_relocator_end): New variables.
5339 2008-08-12 Bean <bean123ch@gmail.com>
5341 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5343 2008-08-11 Robert Millan <rmh@aybabtu.com>
5345 * kern/i386/linuxbios/startup.S: Move from here ...
5346 * kern/i386/coreboot/startup.S: ... to here.
5348 * kern/i386/linuxbios/init.c: Move from here ...
5349 * kern/i386/coreboot/init.c: ... to here.
5351 * kern/i386/linuxbios/table.c: Move from here ...
5352 * kern/i386/coreboot/mmap.c: ... to here.
5354 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5356 2008-08-11 Robert Millan <rmh@aybabtu.com>
5358 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5359 errors. Leave it to the upper layer to handle them.
5361 2008-08-09 Christian Franke <franke@computer.org>
5363 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5364 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5365 Install `grub.d/10_windows' only on Cygwin.
5366 * configure.ac: Add subst of `target_os'.
5367 Check `target_os' also before setting TARGET_OBJ2ELF.
5368 Add `--enable-grub-pe2elf'.
5370 2008-08-08 Robert Millan <rmh@aybabtu.com>
5372 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5373 (grub_last_time): Change type to grub_uint64_t.
5374 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5375 (grub_disk_close): Likewise.
5377 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5378 (run_menu): Migrate code from to using grub_get_time_ms().
5380 * util/misc.c (grub_get_time_ms): New function.
5382 2008-08-08 Marco Gerards <marco@gnu.org>
5384 * disk/ata.c (grub_ata_regget): Change return type to
5386 (grub_ata_regget2): Likewise.
5387 (grub_ata_wait_status): New function.
5388 (grub_ata_wait_busy): Removed function, updated all users to use
5389 `grub_ata_wait_status'.
5390 (grub_ata_wait_drq): Likewise.
5391 (grub_ata_cmd): New function.
5392 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5394 (grub_ata_pio_write): Add error handling.
5395 (grub_atapi_identify): Likewise.
5396 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5398 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5399 handling. Actually use the detected registers. Reorder the
5400 detection logic such that it is easier to read.
5401 (grub_ata_pciinit): Do not assign the same ID to each controller.
5402 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5404 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5406 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5408 2008-08-08 Marco Gerards <marco@gnu.org>
5412 2008-08-07 Bean <bean123ch@gmail.com>
5414 * include/grub/x86_64/pci.h: New file.
5416 2008-08-07 Christian Franke <franke@computer.org>
5418 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5419 (TIMER2_GATE): Likewise.
5420 (grub_pit_wait): Add enable/disable of the timer2 gate
5421 bit of port 0x61. This fixes a possible infinite loop.
5423 2008-08-07 Bean <bean123ch@gmail.com>
5425 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5426 kern/i386/tsc.c and kern/i386/pit.c.
5428 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5431 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5434 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5436 2008-08-07 Bean <bean123ch@gmail.com>
5438 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5440 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5442 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5443 multiple inclusion. Add #include <grub/types.h>.
5445 2008-08-06 Christian Franke <franke@computer.org>
5447 * conf/common.rmk: Build and install `10_windows'.
5448 * util/grub.d/10_windows.in: New script.
5450 2008-08-06 Pavel Roskin <proski@gnu.org>
5452 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5454 2008-08-06 Robert Millan <rmh@aybabtu.com>
5456 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5457 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5459 2008-08-06 Bean <bean123ch@gmail.com>
5461 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5462 (grub_pxefs_fs_int): Remove dummy definition.
5463 (grub_pxefs_open): Use data->block_size to store the current block
5465 (grub_pxefs_read): Use block size stored in data->block_size. As the
5466 value of grub_pxe_blksize can be changed after the file is opened.
5468 2008-08-06 Bean <bean123ch@gmail.com>
5470 * fs/i386/pc/pxe.c (curr_file): new variable.
5471 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5472 require the dummy internal file system anymore.
5473 (grub_pxefs_read): Removed.
5474 (grub_pxefs_close): Likewise.
5475 (grub_pxefs_fs_int): Likewise.
5476 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5477 connection when we switch file.
5478 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5480 2008-08-06 Robert Millan <rmh@aybabtu.com>
5482 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5484 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5485 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5487 * kern/i386/halt.c: New file.
5488 * kern/i386/reboot.c: Likewise.
5489 * include/grub/i386/reboot.h: Likewise.
5490 * include/grub/i386/halt.h: Likewise.
5492 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5493 Include `<grub/cpu/halt.h>'.
5494 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5495 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5497 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5498 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5499 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5500 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5501 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5502 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5504 * include/grub/i386/at_keyboard.h: ... to here.
5506 2008-08-05 Robert Millan <rmh@aybabtu.com>
5508 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5509 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5510 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5511 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5512 `kern/generic/millisleep.c'.
5514 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5515 instead of grub_get_rtc().
5516 (grub_tsc_init): Initialize `tsc_boot_time'.
5518 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5519 (grub_machine_init): Use grub_tsc_init() rather than
5520 installing an RTC-based handler via grub_install_get_time_ms().
5522 * kern/i386/pit.c: New file.
5523 * include/grub/i386/pit.h: Likewise.
5525 2008-08-05 Bean <bean123ch@gmail.com>
5527 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5529 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5530 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5531 (pxe_mod_SOURCES): New macro.
5532 (pxe_mod_CFLAGS): Likewise.
5533 (pxe_mod_LDFLAGS): Likewise.
5534 (pxecmd_mod_SOURCES): Likewise.
5535 (pxecmd_mod_CFLAGS): Likewise.
5536 (pxecmd_mod_LDFLAGS): Likewise.
5538 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5539 (grub_pxe_call): Likewise.
5541 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5543 * commands/i386/pc/pxecmd.c: New file.
5545 * fs/i386/pc/pxe.c: Likewise.
5547 * include/grub/i386/pc/pxe.h: Likewise.
5549 2008-08-05 Bean <bean123ch@gmail.com>
5551 * util/console.c (grub_console_cur_color): New variable.
5552 (grub_console_standard_color): Likewise.
5553 (grub_console_normal_color): Likewise.
5554 (grub_console_highlight_color): Likewise.
5555 (color_map): Likewise.
5556 (use_color): Likewise.
5557 (NUM_COLORS): New macro.
5558 (grub_ncurses_setcolorstate): Handle color properly.
5559 (grub_ncurses_setcolor): Don't change color here, just remember the
5560 settings, color will be set in grub_ncurses_setcolorstate.
5561 (grub_ncurses_getcolor): New function.
5562 (grub_ncurses_init): Initialize color pairs.
5563 (grub_ncurses_term): New member grub_ncurses_getcolor.
5565 2008-08-05 Colin D Bennett <colin@gibibit.com>
5567 High resolution timer support. Implemented for x86 CPUs using TSC.
5568 Extracted generic grub_millisleep() so it's linked in only as needed.
5569 This requires a Pentium compatible CPU; if the RDTSC instruction is
5570 not supported, then it falls back on the generic grub_get_time_ms()
5571 implementation that uses the machine's RTC.
5573 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5574 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5575 `kern/generic/millisleep.c'.
5577 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5578 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5580 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5581 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5583 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5585 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5586 `kern/generic/millisleep.c'.
5588 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5590 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5592 * kern/generic/rtc_get_time_ms.c: New file.
5594 * kern/generic/millisleep.c: New file.
5596 * kern/misc.c: Don't include
5597 <kern/time.h> anymore.
5598 (grub_millisleep_generic): Removed.
5600 * commands/sleep.c (grub_interruptible_millisleep): Uses
5601 grub_get_time_ms() instead of grub_get_rtc().
5603 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5605 (grub_cpu_is_cpuid_supported): New inline function.
5606 (grub_cpu_is_tsc_supported): New inline function.
5607 (grub_tsc_init): New function prototype.
5608 (grub_tsc_get_time_ms): New function prototype.
5610 * kern/i386/tsc.c (grub_get_time_ms): New file.
5612 * include/grub/time.h: Include <grub/types.h.
5613 (grub_millisleep_generic): Removed.
5614 (grub_get_time_ms): New prototype.
5615 (grub_install_get_time_ms): New prototype.
5616 (grub_rtc_get_time_ms): New prototype.
5618 * kern/time.c (grub_get_time_ms): New function.
5619 (grub_install_get_time_ms): New function.
5621 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5622 <grub/time.h> anymore.
5623 (grub_millisleep): Removed.
5624 (grub_machine_init): Call grub_tsc_init.
5626 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5627 get_time_ms() implementation.
5629 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5630 (ieee1275_get_time_ms): New function.
5631 (grub_machine_init): Install get_time_ms() implementation.
5633 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5634 (grub_machine_init): Call grub_tsc_init().
5635 (grub_millisleep): Removed.
5637 * kern/ieee1275/init.c (grub_millisleep): Removed.
5638 (grub_machine_init): Install ieee1275_get_time_ms()
5640 (ieee1275_get_time_ms): New function.
5641 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5644 2008-08-05 Marco Gerards <marco@gnu.org>
5646 * disk/ata.c: Include <grub/pci.h>.
5647 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5648 (grub_ata_initialize): Rewritten.
5649 (grub_ata_device_initialize): New function.
5651 2008-08-04 Pavel Roskin <proski@gnu.org>
5653 * kern/main.c: Include grub/mm.h.
5655 2008-08-04 Robert Millan <rmh@aybabtu.com>
5657 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5658 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5659 corruption problem).
5661 2008-08-04 Robert Millan <rmh@aybabtu.com>
5663 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5664 warnings introduced in my last commit.
5666 2008-08-03 Robert Millan <rmh@aybabtu.com>
5668 Make PCI available on all i386 architectures.
5670 * include/grub/i386/pc/pci.h: Move from here ...
5671 * include/grub/i386/pci.h: ... to here.
5673 * include/grub/i386/pc/pci.h: Remove.
5674 * include/grub/i386/efi/pci.h: Remove.
5675 * include/grub/x86_64/efi/pci.h: Remove.
5677 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5680 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5681 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5682 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5684 * conf/i386-ieee1275.rmk: Likewise.
5686 2008-08-03 Robert Millan <rmh@aybabtu.com>
5688 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5689 (grub_console_setcursor): Make it possible to set cursor off.
5691 2008-08-03 Robert Millan <rmh@aybabtu.com>
5693 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
5694 of modules instead of assuming which platform provides what.
5695 * util/update-grub.in: Likewise.
5697 2008-08-03 Robert Millan <rmh@aybabtu.com>
5699 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5700 instead of `grub_install_dos_part' to determine whether a drive needs
5701 to be prepended to prefix (`grub_install_dos_part' is not reliable,
5702 because it can be overridden when loading GRUB via Multiboot).
5704 2008-08-02 Robert Millan <rmh@aybabtu.com>
5706 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5708 2008-08-02 Robert Millan <rmh@aybabtu.com>
5710 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5711 of informational grub_dprintf() calls.
5713 2008-08-02 Robert Millan <rmh@aybabtu.com>
5715 * disk/memdisk.c (memdisk_size): Don't initialize.
5716 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5718 * include/grub/i386/pc/kernel.h
5719 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5720 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5721 (grub_memdisk_image_size, grub_arch_memdisk_addr)
5722 (grub_arch_memdisk_size): Remove.
5724 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5725 field (was only used to transfer a constant). Add `type' field to
5726 support multiple module types.
5727 (grub_module_iterate): New function.
5729 * kern/device.c (grub_device_open): Do not hide error messages
5730 when grub_disk_open() fails. Use grub_print_error() instead.
5732 * kern/i386/pc/init.c (grub_arch_modules_addr)
5733 (grub_arch_memdisk_size): Remove functions.
5734 (grub_arch_modules_addr): Return the module address in high memory
5735 (now that it isn't copied anymore).
5737 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5738 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5739 decompression routine (grub_total_module_size already includes that
5740 now). Don't copy modules back to low memory.
5742 * kern/main.c: Include `<grub/mm.h>'.
5743 (grub_load_modules): Split out (and use) ...
5744 (grub_module_iterate): ... this function, which iterates through
5745 module objects and runs a hook.
5746 Comment out grub_mm_init_region() call, as it would cause non-ELF
5747 modules to be overwritten.
5749 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5750 the memdisk image in its own region, make it part of the module list.
5751 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5752 (main): Parse --memdisk|-m option, and pass user-provided path as
5753 parameter to generate_image().
5754 (add_segments): Pass `memdisk_path' down to load_modules().
5755 (load_modules): Embed memdisk image in module section when requested.
5756 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5757 `header.type' instead of `header.offset'.
5759 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5760 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5761 (memdisk_mod_LDFLAGS): New variables.
5762 * conf/i386-coreboot.rmk: Likewise.
5763 * conf/i386-ieee1275.rmk: Likewise.
5765 2008-08-02 Robert Millan <rmh@aybabtu.com>
5767 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5768 (backward_relocator): New variables. Used to allocate and relocate
5769 the payload, respectively.
5770 (grub_multiboot_load_elf32): Load into heap instead of requested
5771 address, install the appropriate relocator code in each bound of
5772 the payload, and set the entry point such that
5773 grub_multiboot_real_boot() will jump to one of them.
5775 * kern/i386/loader.S (grub_multiboot_payload_size)
5776 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5777 (grub_multiboot_payload_entry_offset): New variables.
5778 (grub_multiboot_real_boot): Set cpu context to what the relocator
5779 expects, and jump to the relocator instead of the payload.
5781 * include/grub/i386/loader.h (grub_multiboot_payload_size)
5782 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5783 (grub_multiboot_payload_entry_offset): Export.
5785 2008-08-01 Bean <bean123ch@gmail.com>
5787 * normal/menu_entry.c (editor_getline): Don't return the original
5788 string as result, as it will be released by lexer once it has done
5791 2008-08-01 Robert Millan <rmh@aybabtu.com>
5793 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5794 within menuentries, not before them.
5795 util/grub.d/10_hurd.in: Likewise.
5797 2008-08-01 Bean <bean123ch@gmail.com>
5799 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5800 (bufio_mod_SOURCES): New macro.
5801 (bufio_mod_CFLAGS): Likewise.
5802 (bufio_mod_LDFLAGS): Likewise.
5804 * include/grub/bufio.h: New file.
5806 * io/bufio.c: Likewise.
5808 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5809 (grub_video_reader_png): Use grub_buffile_open to open file.
5811 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5812 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5814 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5815 (grub_video_reader_tga): Use grub_buffile_open to open file.
5817 * font/manager.c: Include <grub/bufio.h>.
5818 (add_font): Use grub_buffile_open to open file.
5820 2008-07-31 Robert Millan <rmh@aybabtu.com>
5822 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5823 ELF segments, use a macro for arbitrarily accessing any of them instead
5824 of preparing a pointer that allows access to one at a time.
5825 (grub_multiboot_load_elf64): Likewise.
5827 2008-07-31 Bean <bean123ch@gmail.com>
5829 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5830 GRUB_KERNEL_MACHINE_DATA_END.
5832 2008-07-30 Robert Millan <rmh@aybabtu.com>
5834 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5835 Increase from 0x50 to 0x60.
5836 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5837 use UUIDs to identify the root drive for them. If that's not
5839 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5840 check, for cross-disk installs.
5842 2008-07-30 Robert Millan <rmh@aybabtu.com>
5844 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5845 is non-empty, use it to set the `prefix' environment variable instead
5846 of the usual approach.
5847 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5848 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5849 environment variable instead of dummy make_install_device().
5851 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5852 (start): Insert a data section, with `grub_prefix' variable.
5853 * kern/i386/linuxbios/startup.S: Likewise.
5855 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5856 New variable reference.
5857 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5858 New macro. Defines offset of `grub_prefix' within startup.S (relative
5860 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5861 section within startup.S (relative to `start').
5862 * include/grub/i386/coreboot/kernel.h: Likewise.
5864 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5865 Overwrite grub_prefix with its contents, at the beginning of the
5867 (main): Understand -p|--prefix.
5869 2008-07-30 Robert Millan <rmh@aybabtu.com>
5871 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5873 2008-07-30 Robert Millan <rmh@aybabtu.com>
5875 * term/i386/pc/vga_text.c (grub_console_cls): Use
5876 grub_console_gotoxy() to go back to beginning of the screen.
5877 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5879 2008-07-29 Christian Franke <franke@computer.org>
5881 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5882 Add conversion of emulated mount points on Cygwin.
5884 2008-07-29 Christian Franke <franke@computer.org>
5886 * util/update-grub.in: Add a check for admin
5888 Remove old `grub.cfg.new' before creation.
5889 Add `-f' to `mv' to handle the different filesystem
5890 semantics of Windows.
5892 2008-07-29 Bean <bean123ch@gmail.com>
5894 * normal/main.c (get_line): Fix buffer overflow bug.
5896 2008-07-28 Robert Millan <rmh@aybabtu.com>
5898 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5899 (struct grub_apple_header): New struct. Describes the layout of
5901 (apple_partition_map_iterate): Check the header magic as well as the
5902 partition magic (which was already being checked).
5904 2008-07-28 Pavel Roskin <proski@gnu.org>
5906 * genmk.rb: Add a warning to the beginning of the output that
5907 it's a generated file and should not be edited.
5909 2008-07-28 Robert Millan <rmh@aybabtu.com>
5911 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5912 with the same number are found, just use issue a warning with
5913 grub_dprintf(), as this error has been reported to be non-fatal.
5915 2008-07-27 Robert Millan <rmh@aybabtu.com>
5917 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5920 2008-07-27 Bean <bean123ch@gmail.com>
5922 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5923 (grub_fat_find_dir): Ignore case when comparing filename.
5925 2008-07-27 Bean <bean123ch@gmail.com>
5927 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5928 smallino, as it's more descriptive, and i8count can be confused with
5929 the other field count.
5930 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5933 2008-07-27 Bean <bean123ch@gmail.com>
5935 * commands/crc.c: New file.
5937 * lib/crc.c: Likewise.
5939 * include/grub/lib/crc.h: Likewise.
5941 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5943 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5944 (hexdump): Move this function to ...
5946 * lib/hexdump.c: ... here.
5948 * include/grub/hexdump.h: Renamed to ...
5950 * include/grub/lib/hexdump.h: ... this.
5952 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5954 * util/grub-editenv.c: Likewise.
5956 * include/envblk.h: Renamed to ...
5958 * include/lib/envblk.h: ... this.
5960 * util/envblk.c: Renamed to ...
5962 * lib/envblk.c: ... this.
5964 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5966 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5967 (pkglib_MODULES): Add crc.mod.
5968 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5969 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5970 (crc_mod_SOURCES): New macro.
5971 (crc_mod_CFLAGS): Likewise.
5972 (crc_mod_LDFLAGS): Likewise.
5974 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5976 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5978 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5980 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5982 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5984 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
5986 * commands/help.c: Include <grub/term.h>.
5987 (TERM_WIDTH): Removed. Updated all users.
5989 2008-07-27 Pavel Roskin <proski@gnu.org>
5991 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5992 spurious warnings about a comment within a comment.
5994 2008-07-25 Robert Millan <rmh@aybabtu.com>
5996 * util/getroot.c (find_root_device): Skip devices that match
5997 /dev/dm-[0-9]. This lets the real device be found for any type of
5998 abstraction (LVM, EVMS, RAID..).
5999 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6000 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6001 device is found first, find_root_device() will now skip it.
6003 2008-07-24 Pavel Roskin <proski@gnu.org>
6005 * include/grub/types.h: Use __builtin_bswap32() and
6006 __builtin_bswap64() with gcc 4.3 and newer.
6008 2008-07-24 Christian Franke <franke@computer.org>
6010 * util/i386/pc/grub-install.in: If `--debug' is specified,
6011 pass `--verbose' to grub-setup.
6012 Abort script if make_system_path_relative_to_its_root() fails.
6014 2008-07-24 Bean <bean123ch@gmail.com>
6016 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6017 variable `target_platform' should be `platform'.
6019 2008-07-24 Bean <bean123ch@gmail.com>
6021 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6022 (grub_png_init_fixed_block): New function.
6023 (grub_png_decode_image_data): Handle fixed huffman code compression.
6025 2008-07-24 Bean <bean123ch@gmail.com>
6027 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6028 (grub_pe2elf_SOURCES): New macro.
6029 (CLEANFILES): Add grub-pe2elf.
6031 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6032 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6033 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6034 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6035 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6036 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6037 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6038 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6039 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6040 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6041 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6042 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6043 (GRUB_PE32_DT_FUNCTION): Likewise.
6044 (GRUB_PE32_REL_I386_DIR32): Likewise.
6045 (GRUB_PE32_REL_I386_REL32): Likewise.
6046 (grub_pe32_symbol): New structure.
6047 (grub_pe32_reloc): Likewise.
6049 * util/grub-pe2elf.c: New file.
6051 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6052 start symbol in non pc platform.
6054 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6056 The following patches are from Christian Franke.
6058 * include/grub/dl.h: Remove .previous, gas supports this only
6061 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6062 Remove .type, gas supports this only for ELF format.
6064 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6065 nullbytes in symbol table. This fixes an infinite loop if table is
6068 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6069 TARGET_IMG_LDFLAGS and EXEEXT.
6071 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6072 TARGET_IMG_LDFLAGS_AC.
6073 (grub_CHECK_STACK_ARG_PROBE): New function.
6075 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6077 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6079 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6080 to set TARGET_IMG_LD* accordingly.
6081 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6082 Add call to grub_CHECK_STACK_ARG_PROBE.
6083 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6085 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6087 * genmk.rb: Add EXEEXT to CLEANFILES.
6089 2008-07-23 Robert Millan <rmh@aybabtu.com>
6091 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6092 define the codes for arrows and lines used for the menu).
6093 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6096 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6097 fonts, because the latter are too slow.
6099 2008-07-21 Bean <bean123ch@gmail.com>
6101 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6102 a20. Run keyboard test last, as it will cause macbook to halt.
6104 2008-07-18 Pavel Roskin <proski@gnu.org>
6106 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6107 load foreign architecture modules correctly anyway. Keep
6108 support for loading host architecture modules, whether we
6109 compile them or not.
6111 2008-07-17 Pavel Roskin <proski@gnu.org>
6113 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6114 change target_cpu. The compiler default can mismatch target_cpu
6117 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6118 * kern/efi/efi.c: Likewise.
6120 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6121 target compiler is functional.
6122 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6125 * configure.ac: Default to efi platform for x86_64-apple. Allow
6126 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6127 adjustments from the rest, only do them if target is not
6128 explicitly given. Merge other adjustments with the final sanity
6129 check. Remove an extraneous check for supported CPU. Be
6130 specific which CPU and which platform is not supported.
6132 * configure.ac: Default to pc platform for x86_64.
6134 2008-07-17 Robert Millan <rmh@aybabtu.com>
6136 Partial LinuxBIOS -> Coreboot rename.
6138 * conf/i386-linuxbios.rmk: Renamed to ...
6139 * conf/i386-coreboot.rmk: ... this.
6140 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6141 * configure.ac: Accept "coreboot" as input platform (but maintain
6142 compatibility with "linuxbios").
6143 * include/grub/i386/linuxbios: Renamed to ...
6144 * include/grub/i386/coreboot: ... this.
6146 2008-07-17 Bean <bean123ch@gmail.com>
6148 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6149 (appleldr_mod_SOURCE): New variable.
6150 (appleldr_mod_CFLAGS): Likewise.
6151 (appleldr_mod_LDFLAGS): Likewise.
6152 (pci_mod_SOURCES): Likewise.
6153 (pci_mod_CFLAGS): Likewise.
6154 (pci_mod_LDFLAGS): Likewise.
6155 (lspci_mod_SOURCES): Likewise.
6156 (lspci_mod_CFLAGS): Likewise.
6157 (lspci_mod_LDFLAGS): Likewise.
6159 * conf/x86_64-efi.rmk: New file.
6161 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6163 (grub_efidisk_write): Likewise.
6165 * include/efi/api.h (efi_call_0): New macro.
6166 (efi_call_1): Likewise.
6167 (efi_call_2): Likewise.
6168 (efi_call_3): Likewise.
6169 (efi_call_4): Likewise.
6170 (efi_call_5): Likewise.
6171 (efi_call_6): Likewise.
6173 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6174 grub_rescue_cmd_chainloader.
6176 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6177 (grub_pe32_optional_header): Change some fields based on i386 or
6179 (GRUB_PE32_PE32_MAGIC): Likewise.
6181 * include/grub/efi/uga_draw.h: New file.
6183 * include/grub/elf.h (STN_ABS): New constant.
6184 (R_X86_64_NONE): Relocation constant for x86_64.
6185 (R_X86_64_64): Likewise.
6186 (R_X86_64_PC32): Likewise.
6187 (R_X86_64_GOT32): Likewise.
6188 (R_X86_64_PLT32): Likewise.
6189 (R_X86_64_COPY): Likewise.
6190 (R_X86_64_GLOB_DAT): Likewise.
6191 (R_X86_64_JUMP_SLOT): Likewise.
6192 (R_X86_64_RELATIVE): Likewise.
6193 (R_X86_64_GOTPCREL): Likewise.
6194 (R_X86_64_32): Likewise.
6195 (R_X86_64_32S): Likewise.
6196 (R_X86_64_16): Likewise.
6197 (R_X86_64_PC16): Likewise.
6198 (R_X86_64_8): Likewise.
6199 (R_X86_64_PC8): Likewise.
6201 * include/grub/i386/efi/pci.h: New file.
6203 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6204 Change it value based on platform.
6205 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6206 (GRUB_E820_RAM): Likewise.
6207 (GRUB_E820_RESERVED): Likewise.
6208 (GRUB_E820_ACPI): Likewise.
6209 (GRUB_E820_NVS): Likewise.
6210 (GRUB_E820_EXEC_CODE): Likewise.
6211 (GRUB_E820_MAX_ENTRY): Likewise.
6212 (grub_e820_mmap): New structure.
6213 (linux_kernel_header): Change the efi field according to different
6214 kernel version, also field from linux_kernel_header.
6216 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6218 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6219 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6220 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6221 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6222 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6223 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6224 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6225 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6226 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6227 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6229 * include/grub/x86_64/efi/kernel.h: New file.
6231 * include/grub/x86_64/efi/loader.h: Likewise.
6233 * include/grub/x86_64/efi/machine.h: Likewise.
6235 * include/grub/x86_64/efi/pci.h: Likewise.
6237 * include/grub/x86_64/efi/time.h: Likewise.
6239 * include/grub/x86_64/linux.h: Likewise.
6241 * include/grub/x86_64/setjmp.h: Likewise.
6243 * include/grub/x86_64/time.h: Likewise.
6245 * include/grub/x86_64/types.h: Likewise.
6247 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6248 GRUB_TARGET_SIZEOF_VOID_P.
6250 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6251 (grub_efi_locate_handle): Likewise.
6252 (grub_efi_open_protocol): Likewise.
6253 (grub_efi_set_text_mode): Likewise.
6254 (grub_efi_stall): Likewise.
6255 (grub_exit): Likewise.
6256 (grub_reboot): Likewise.
6257 (grub_halt): Likewise.
6258 (grub_efi_exit_boot_services): Likewise.
6259 (grub_get_rtc): Likewise.
6261 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6262 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6263 (grub_efi_allocate_pages): Wrap efi calls.
6264 (grub_efi_free_pages): Wrap efi calls.
6265 (grub_efi_get_memory_map): Wrap efi calls.
6267 * kern/x86_64/dl.c: New file.
6269 * kern/x86_64/efi/callwrap.S: Likewise.
6271 * kern/x86_64/efi/startup.S: Likewise.
6273 * loader/efi/appleloader.c: Likewise.
6275 * loader/efi/chainloader.c (cmdline): New variable.
6276 (grub_chainloader_unload): Wrap efi calls.
6277 (grub_chainloader_boot): Likewise.
6278 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6281 * loader/efi/chainloader_normal.c (chainloader_command):
6282 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6285 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6287 (grub_e820_add_region): New function.
6288 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6290 (grub_find_video_card): New function.
6291 (grub_linux_setup_video): New function.
6292 (grub_rescue_cmd_linux): Probe for video information.
6294 * normal/x86_64/setjmp.S: New file.
6296 * term/efi/console.c (map_char): New function.
6297 (grub_console_putchar): Map unicode char.
6298 (grub_console_checkkey): Wrap efi calls.
6299 (grub_console_getkey): Likewise.
6300 (grub_console_getwh): Likewise.
6301 (grub_console_gotoxy): Likewise.
6302 (grub_console_cls): Likewise.
6303 (grub_console_setcolorstate): Likewise.
6304 (grub_console_setcursor): Likewise.
6306 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6308 2008-07-16 Pavel Roskin <proski@gnu.org>
6310 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6313 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6314 pointer, not an integer. This fixes a warning and prevents
6315 precision loss on 64-bit systems.
6316 (relocate_addresses): Remove unneeded cast.
6318 2008-07-15 Pavel Roskin <proski@gnu.org>
6320 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6322 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6324 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6325 Fix comparison between signed and unsigned.
6327 * include/grub/i386/ieee1275/console.h: Declare
6328 grub_console_init() and grub_console_fini().
6330 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6331 It's empty and unused.
6333 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6334 beginning to avoid warnings with some compilers.
6336 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6337 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6339 2008-07-14 Pavel Roskin <proski@gnu.org>
6341 * kern/env.c (grub_register_variable_hook): Don't copy empty
6342 string, it leaks memory. Pass "" to grub_env_set(), it should
6343 handle constant strings.
6345 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6346 * commands/cmp.c (grub_cmd_cmp): Likewise.
6347 * kern/dl.c (grub_dl_flush_cache): Likewise.
6348 (grub_dl_load_core): Likewise.
6349 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6350 (grub_elf64_load_phdrs): Likewise.
6352 2008-07-13 Pavel Roskin <proski@gnu.org>
6354 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6355 between signed and unsigned.
6356 (LzmaEnc_Finish): Fix warning about an unused parameter.
6358 2008-07-13 Bean <bean123ch@gmail.com>
6360 * Makefile.in (enable_lzo): New rule.
6362 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6364 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6366 * boot/i386/pc/lnxboot.S: #include <config.h>.
6368 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6369 its value according to the compression algorithm used, lzo or lzma.
6371 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6372 compression algorithm according to configure macro.
6374 * kern/i386/pc/startup.S (codestart): Likewise.
6376 * kern/i386/pc/lzma_decode.S: New file.
6378 * include/grub/lib/LzFind.h: Likewise.
6380 * include/grub/lib/LzHash.h: Likewise.
6382 * include/grub/lib/LzmaDec.h: Likewise.
6384 * include/grub/lib/LzmaEnc.h: Likewise.
6386 * include/grub/lib/LzmaTypes.h: Likewise.
6388 * lib/LzFind.c: Likewise.
6390 * lib/LzmaDec.c: Likewise.
6392 * lib/LzmaEnc.c: Likewise.
6394 2008-07-13 Bean <bean123ch@gmail.com>
6396 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6397 (grub_ext4_extent_header): New structure.
6398 (grub_ext4_extent): Likewise.
6399 (grub_ext4_extent_idx): Likewise.
6400 (grub_ext4_find_leaf): New function.
6401 (grub_ext2_read_block): Handle extents.
6403 2008-07-12 Robert Millan <rmh@aybabtu.com>
6405 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6407 2008-07-11 Robert Millan <rmh@aybabtu.com>
6409 * util/grub.d/40_custom.in: New file. Example on how to add custom
6410 entries to /etc/grub.d.
6411 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6412 40_custom (implicitly, by merging all the grub.d rules).
6414 2008-07-11 Pavel Roskin <proski@gnu.org>
6416 * commands/read.c (grub_getline): Fix invalid memory access.
6417 Don't add newline to the variable value.
6419 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6420 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6421 (serial_hw_get_port): Check validity of the port number.
6422 (grub_cmd_serial): Check return value of serial_hw_get_port().
6424 2008-07-07 Pavel Roskin <proski@gnu.org>
6426 * boot/i386/pc/diskboot.S (notification_string): Replace
6427 "Loading kernel" with just "loading". This is shorter, less
6428 confusing and saves a few bytes for possible future changes.
6430 2008-07-05 Pavel Roskin <proski@gnu.org>
6432 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6433 size for ATAPI devices, they are undefined. Output sector
6434 number in decimal form.
6436 * disk/ata.c: Use named constants for status bits.
6438 2008-07-04 Pavel Roskin <proski@gnu.org>
6440 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6441 grub_addr_t before casting it to the void pointer to fix a
6442 warning. Non-addressable regions are discarded earlier.
6443 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6444 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6445 (check_signature): Don't shadow table_header.
6446 (grub_linuxbios_table_iterate): Cast numeric constants to
6447 grub_linuxbios_table_header_t.
6448 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6451 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6454 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6455 pointer, which can cause warnings. Support 64-bit addresses.
6457 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6458 of sizeof(long). This fixes PowerPC image generation on x86_64.
6460 2008-07-04 Robert Millan <rmh@aybabtu.com>
6462 This fixes a performance issue when pc & gpt partmap iterators
6463 didn't abort iteration even after our hook found what it was
6464 looking for (often causing expensive probes of non-existent drives).
6466 Some callers relied on previous buggy behaviour, since they would
6467 raise an error when their own hooks caused early abortion of its
6470 * kern/device.c (grub_device_open): Improve error message.
6471 * disk/lvm.c (grub_lvm_open): Likewise.
6472 * disk/raid.c (grub_raid_open): Likewise.
6474 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6475 when hook requests it, independently of grub_errno.
6476 (pc_partition_map_probe): Do not fail when find_func() caused
6477 early abortion of pc_partition_map_iterate().
6479 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6480 when hook requests it, independently of grub_errno.
6481 (gpt_partition_map_probe): Do not fail when find_func() caused
6482 early abortion of gpt_partition_map_iterate().
6484 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6485 when hook requests it, independently of grub_errno. Do not fail when
6486 part_map_iterate_hook() caused early abortion of p->iterate().
6488 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6489 when grub_partition_iterate() returned with non-zero.
6491 2008-07-03 Pavel Roskin <proski@gnu.org>
6493 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6494 like we do in grub_ata_pio_read().
6495 (grub_ata_readwrite): Always write individual sectors. Fix the
6496 sector count for the remainder.
6497 (grub_ata_write): Enable writing to ATA devices. Correctly
6498 report error for ATAPI devices.
6500 2008-07-02 Pavel Roskin <proski@gnu.org>
6502 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6505 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6506 for every read sector, we already increment it for the whole
6507 batch. This fixes reading more than 256 sectors at once.
6509 * util/grub-editenv.c (cmd_info): Cast argument to long
6510 explicitly. ptrdiff_t reduces to int on i386.
6512 * util/grub-editenv.c (main): Be specific which parameter is
6515 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6516 (memdisk): Make memdisk_orig_addr a pointer.
6518 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6519 for file offsets, use grub_off_t instead. Fix printf format
6522 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6523 there. Real unexpected warnings should not drown in the noise
6524 about known problems.
6526 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6527 grub_disk_addr_t for memory addresses.
6529 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6530 explicitly to fix a warning.
6532 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6534 * Makefile.in (MODULE_LDFLAGS): New variable.
6535 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6536 the linker accepts --build-id=none.
6537 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6539 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6541 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6542 those in Linux XFS code. Provide a way to access 64-bit parent
6544 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6545 the end of struct grub_xfs_dir_header.
6547 2008-07-02 Bean <bean123ch@gmail.com>
6549 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6550 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6551 and GRUB_IEEE1275_FLAG_NO_ANSI.
6553 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6554 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6555 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6557 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6558 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6560 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6561 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6563 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6564 esc sequence on non ANSI terminal.
6565 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6567 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6570 2008-07-02 Bean <bean123ch@gmail.com>
6572 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6573 (grub_editenv_SOURCES): New variable.
6574 (pkglib_MODULES): Add loadenv.mod.
6575 (loadenv_mod_SOURCES): New variable.
6576 (loadenv_mod_CFLAGS): Likewise.
6577 (loadenv_mod_LDFLAGS): Likewise.
6579 * include/grub/envblk.h: New file.
6581 * util/envblk.c: New file.
6583 * util/grub-editenv.c: New file.
6585 * commands/loadenv.c: New file.
6587 2008-07-01 Pavel Roskin <proski@gnu.org>
6589 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6590 not unsigned char. This fixes warnings and is consistent with
6593 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6595 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6597 * term/tparm.c (analyze): Always set *popcount.
6599 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6600 cast to fix a warning.
6602 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6603 cast to suppress a warning.
6605 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6606 grub_fshelp_read_file() expects.
6608 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6609 write uuid as a 32-bit value in CPU byte order, so declare and
6612 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6613 long if the format specifier expects it.
6614 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6615 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6616 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6617 long to fix a warning.
6618 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6619 grub_dprintf() arguments to fix warnings.
6621 2008-06-30 Pavel Roskin <proski@gnu.org>
6623 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6624 install_bsd_part immediately before core.img is embedded or
6625 modified on disk. This fixes core.img verification if core.img
6628 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6629 core_path to calculate the blocklist.
6630 Patch from Javier MartÃn <lordhabbit@gmail.com>
6632 2008-06-29 Robert Millan <rmh@aybabtu.com>
6634 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6635 block to disk block.
6636 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6637 Patch from Niels Böhm <bitbucket@arcor.de>
6639 2008-06-29 Robert Millan <rmh@aybabtu.com>
6641 * util/update-grub_lib.in (font_path): Search for fonts in
6642 /boot/grub first, which is more likely to be readable (we aren't
6643 deciding where fonts live, just looking for them).
6645 2008-06-26 Pavel Roskin <proski@gnu.org>
6647 * util/biosdisk.c (read_device_map): Don't leave dead map
6648 entries for devices failing stat() check.
6650 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6651 core_path_dev for the core.img path on the target device.
6653 2008-06-26 Robert Millan <rmh@aybabtu.com>
6655 * disk/fs_uuid.c: New file.
6656 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6657 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6658 (fs_uuid_mod_LDFLAGS): New variables.
6659 * include/grub/disk.h (grub_disk_dev_id): Add
6660 `GRUB_DISK_DEVICE_UUID_ID'.
6661 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6662 implement iterate().
6664 2008-06-26 Robert Millan <rmh@aybabtu.com>
6666 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6667 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6668 Linux image includes no initrd.
6670 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
6672 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6673 call to resolve the core image location that effectively appended the
6676 2008-06-21 Robert Millan <rmh@aybabtu.com>
6678 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6681 * util/grub.d/10_hurd.in: ... to here ...
6682 * util/grub.d/10_linux.in: ... and here.
6684 2008-06-19 Robert Millan <rmh@aybabtu.com>
6686 * kern/main.c (grub_main): Export `prefix' variable immediately
6687 after it has been set by grub_machine_set_prefix().
6689 2008-06-19 Robert Millan <rmh@aybabtu.com>
6691 * commands/search.c (search_label, search_fs_uuid, search_file): Print
6692 search result when not saving to variable, not the other way around.
6693 When saving to variable, abort iteration as soon as a match is found.
6695 2008-06-19 Robert Millan <rmh@aybabtu.com>
6697 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6698 check for partition that provides /boot/grub. Its logic is flawed,
6699 as it prevents prepare_grub_to_access_device() from being called
6702 2008-06-19 Robert Millan <rmh@aybabtu.com>
6704 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6705 "insmod" command directly when abstraction modules are needed,
6706 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6707 since it had already been processed).
6709 2008-06-19 Pavel Roskin <proski@gnu.org>
6711 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6712 changed. This is needed in case GRUB_LIBDIR changes.
6713 * conf/i386-ieee1275.rmk: Likewise.
6714 * conf/i386-linuxbios.rmk: Likewise.
6715 * conf/i386-pc.rmk: Likewise.
6716 * conf/powerpc-ieee1275.rmk: Likewise.
6718 2008-06-18 Pavel Roskin <proski@gnu.org>
6720 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6721 kernel_elf_symlist.c to symlist.c for consistency with other
6722 architectures. Update all users.
6723 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6725 2008-06-18 Robert Millan <rmh@aybabtu.com>
6727 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6730 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
6731 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
6732 a RAID device, run setup() for all members independently on whether
6733 LVM abstraction is being used.
6734 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6735 If grub-mkimage has set `*install_dos_part == -2', don't override this
6737 Perform *install_dos_part adjustments independently on whether
6738 we're embedding or not.
6739 Clarify error message when image is too big for embedding.
6740 Remove duplicate *install_dos_part stanza.
6742 2008-06-17 Robert Millan <rmh@aybabtu.com>
6744 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6745 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6747 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6748 values in grub_ofconsole_normal_color and
6749 grub_ofconsole_highlight_color (they're not directly related to
6750 background and foreground).
6751 (grub_ofconsole_setcolorstate): Extract background and foreground
6752 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6754 2008-06-17 Robert Millan <rmh@aybabtu.com>
6756 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6757 /boot/grub for the check in last commit, not /boot (they could be
6758 different partitions).
6760 2008-06-16 Robert Millan <rmh@aybabtu.com>
6762 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6763 asked to setup access for the same partition that provides /boot,
6764 don't bother using UUIDs since our root already has the value we
6767 2008-06-16 Robert Millan <rmh@aybabtu.com>
6769 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6771 Patch from Sven Mueller <sven@debian.org>.
6773 2008-06-16 Robert Millan <rmh@aybabtu.com>
6775 * util/update-grub.in: Check for $EUID instead of $UID.
6776 Reported by Vincent Zweije.
6778 2008-06-16 Bean <bean123ch@gmail.com>
6780 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6781 (grub_ext2_read_block): Likewise.
6782 (grub_ext2_read_inode): Likewise.
6783 (grub_ext2_mount): Likewise.
6784 (grub_ext2_close): Likewise.
6785 (grub_ext3_get_journal): Removed.
6787 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6788 (grub_reiserfs_read_symlink): Likewise.
6789 (grub_reiserfs_mount): Likewise.
6790 (grub_reiserfs_open): Likewise.
6791 (grub_reiserfs_read): Likewise.
6792 (grub_reiserfs_close): Likewise.
6793 (grub_reiserfs_get_journal): Removed.
6795 * fs/fshelp.c (grub_fshelp_read): Removed.
6796 (grub_fshelp_map_block): Likewise.
6798 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6799 (grub_fshelp_journal): Likewise.
6800 (grub_fshelp_read): Likewise.
6801 (grub_fshelp_map_block): Likewise.
6803 2008-06-16 Pavel Roskin <proski@gnu.org>
6805 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6806 floating point anymore.
6807 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6809 2008-06-15 Pavel Roskin <proski@gnu.org>
6811 * commands/ls.c (grub_ls_list_files): Use integer calculations
6812 for human readable format, avoid floating point use.
6813 * kern/misc.c (grub_ftoa): Remove.
6814 (grub_vsprintf): Remove floating point support.
6816 2008-06-15 Robert Millan <rmh@aybabtu.com>
6818 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6820 Reported by Max Vozeler.
6822 2008-06-15 Robert Millan <rmh@aybabtu.com>
6824 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6825 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6827 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6828 the beginning of the prefix.
6830 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6831 It is assumed that if we have a memdisk, grub-mkimage has set
6832 grub_prefix to include the "(memdisk)" drive in it.
6834 2008-06-15 Robert Millan <rmh@aybabtu.com>
6836 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6837 Initialize keyboard controller after registering the terminal, so that
6838 grub_printf() can be called from grub_keyboard_controller_init().
6840 2008-06-15 Robert Millan <rmh@aybabtu.com>
6842 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6843 extent-btree which is written as big endian on disk.
6844 Reported by Alain Greppin <al@chilibi.org>.
6846 2008-06-14 Robert Millan <rmh@aybabtu.com>
6848 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6849 * util/i386/pc/grub-install.in (modules): Likewise.
6851 2008-06-13 Pavel Roskin <proski@gnu.org>
6853 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6855 2008-06-13 Bean <bean123ch@gmail.com>
6857 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6859 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6861 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6862 to indicate sparse block.
6864 2008-06-12 Pavel Roskin <proski@gnu.org>
6866 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6867 number, grub_fshelp_read() does it for us.
6869 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6870 linear disk read with journal translation.
6871 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6872 * include/grub/fshelp.h: Declare grub_fshelp_read().
6874 2008-06-09 Pavel Roskin <proski@gnu.org>
6876 * fs/minix.c (grub_minix_mount): Handle error reading
6879 2008-06-08 Robert Millan <rmh@aybabtu.com>
6881 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6882 don't append the RAID prefix afterwards.
6883 Reported by Clint Adams.
6885 2008-06-08 Robert Millan <rmh@aybabtu.com>
6887 Based on description from Pavel:
6888 * kern/disk.c (grub_disk_check_range): Rename to ...
6889 (grub_disk_adjust_range): ... this. Add a comment explaining the
6890 tasks performed by this function.
6892 2008-06-08 Robert Millan <rmh@aybabtu.com>
6894 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6895 `num_serial' (for consistency with other variables).
6896 (struct grub_ntfs_data): Add `uuid' member.
6897 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6898 (grub_ntfs_uuid): New function.
6899 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6901 2008-06-07 Pavel Roskin <proski@gnu.org>
6903 * util/biosdisk.c (open_device): Revert last change to the
6904 function, it broke installation. The sector needs to be
6905 different dependent on which device is opened.
6907 2008-06-06 Robert Millan <rmh@aybabtu.com>
6909 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6910 rest of GRUB, and breakage doesn't happen if its value were modified.
6912 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6913 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6914 a constant (same value).
6915 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6916 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6918 2008-06-06 Robert Millan <rmh@aybabtu.com>
6920 * util/biosdisk.c (open_device): Do not modify sector offset when
6921 accessing a partition. kern/disk.c already handles this for us.
6923 2008-06-06 Robert Millan <rmh@aybabtu.com>
6925 * util/grub-emu.c (grub_machine_init): Move code in this function from
6927 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6928 segfault in case grub_printf() is called).
6930 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6931 grub_probe. Update all users not to explicitly add it again.
6932 (grub_device): New variable; contains corresponding device for grubdir.
6933 (fs_module, partmap_module, devabstraction_module): Pass
6934 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6937 2008-06-05 Robert Millan <rmh@aybabtu.com>
6939 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6940 is found, print it (same layout as with labels).
6942 2008-06-04 Robert Millan <rmh@aybabtu.com>
6944 * util/biosdisk.c (get_drive): Rename to ...
6945 (find_grub_drive): ... this. Update all users.
6947 (get_os_disk): Rename to ...
6948 (convert_system_partition_to_system_disk): ... this. Update all users.
6950 (find_drive): Rename to ...
6951 (find_system_device): ... this. Update all users.
6953 2008-06-04 Robert Millan <rmh@aybabtu.com>
6955 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6956 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6957 (make_device_map): Likewise.
6959 2008-06-01 Robert Millan <rmh@aybabtu.com>
6961 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6962 before dereferencing it.
6964 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6965 union with fat12/fat16-specific ones. Add some new fields, including
6966 `num_serial' for both versions.
6967 (struct grub_fat_data): Add `uuid' member.
6968 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6969 names. Initialize `data->uuid' using `num_serial'.
6970 (grub_fat_uuid): New function.
6971 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6973 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6974 (grub_reiserfs_uuid): New function.
6975 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6978 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6979 (grub_xfs_uuid): New function.
6980 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6982 2008-06-01 Robert Millan <rmh@aybabtu.com>
6984 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6985 code that is backward compatible with pre-uuid search command.
6987 2008-05-31 Robert Millan <rmh@aybabtu.com>
6989 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6990 floppies after everything else, to ensure floppy drive isn't accessed
6991 unnecessarily (patch from Bean).
6993 2008-05-31 Robert Millan <rmh@aybabtu.com>
6995 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6996 not print device names when we were asked to set a variable.
6998 2008-05-31 Robert Millan <rmh@aybabtu.com>
7000 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7001 using "cursor-on" and "cursor-off" commands (understood at least by
7002 the Open Firmware flavour on OLPC).
7004 2008-05-31 Michael Gorven <michael@gorven.za.net>
7006 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7007 on and off sequences.
7009 2008-05-31 Robert Millan <rmh@aybabtu.com>
7011 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7012 * util/update-grub.in: Likewise.
7014 2008-05-30 Pavel Roskin <proski@gnu.org>
7016 * util/biosdisk.c (linux_find_partition): Simplify logic and
7017 make the code more universal. Keep special processing for
7018 devfs, but use a simple rule for all other devices. If the
7019 device ends with a number, append 'p' and the partition number.
7020 Otherwise, append only the partition number.
7022 2008-05-30 Robert Millan <rmh@aybabtu.com>
7024 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7025 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7026 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7027 the `root' parameter to Linux.
7029 2008-05-30 Robert Millan <rmh@aybabtu.com>
7031 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7032 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7033 --fs_uuid with --fs-uuid.
7034 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7035 all filesystems support them).
7037 2008-05-30 Robert Millan <rmh@aybabtu.com>
7039 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7040 grub_printf() flags, since we're printing in units of 2 bytes.
7042 2008-05-30 Robert Millan <rmh@aybabtu.com>
7044 * util/grub.d/00_header.in: Remove obsolete comment referencing
7045 convert_system_path_to_grub_path().
7046 * util/update-grub.in: Likewise.
7047 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7048 (convert_system_path_to_grub_path): Add a warning message explaining
7049 that this function is deprecated. Rely on is_path_readable_by_grub()
7050 for the readability checks.
7051 (font_path): Use is_path_readable_by_grub() for the readability
7052 check rather than convert_system_path_to_grub_path().
7054 2008-05-30 Robert Millan <rmh@aybabtu.com>
7056 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7057 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7058 converting it first.
7059 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7060 grub.cfg for access to font file, and afterwards call it again to set
7063 2008-05-30 Robert Millan <rmh@aybabtu.com>
7065 * commands/search.c (options): Add --fs_uuid option.
7066 (search_fs_uuid): New function.
7067 (grub_cmd_search): Fix --set argument passing.
7068 Use search_fs_uuid() when requested via --fs_uuid.
7069 (grub_search_init): Update help message.
7070 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7071 and redeclare it as an array of 16-bit words.
7072 (grub_ext2_uuid): New function.
7073 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7074 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7075 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7076 (GRUB_DEVICE_BOOT_UUID): New variables.
7077 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7078 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7080 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7081 just assume `root' variable has the right value.
7082 * util/grub.d/10_linux.in: Likewise.
7083 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7085 (main): Recognise `-t fs_uuid' argument.
7087 2008-05-30 Robert Millan <rmh@aybabtu.com>
7089 * util/biosdisk.c (map): Redefine structure to hold information
7090 about GRUB drive name.
7091 (get_drive): Reimplement without assuming (and verifying) BIOS-like
7093 (call_hook): Remove.
7094 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7095 member. Assume drive has partitions.
7096 (grub_util_biosdisk_open): Access device names via `.device' struct
7098 (open_device): Likewise.
7099 (find_drive): Likewise.
7100 (read_device_map): Adjust map[] usage to match the new struct
7101 definition. Don't check for duplicates (still possible, but not cheap
7103 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7104 (make_device_name): Remove assumption of BIOS-like drive names.
7106 2008-05-30 Pavel Roskin <proski@gnu.org>
7108 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7109 compiling execute.c doesn't need grub_script.tab.h anymore.
7110 (normal/command.c_DEPENDENCIES): Likewise.
7111 (normal/function.c_DEPENDENCIES): Likewise.
7112 * conf/i386-ieee1275.rmk: Likewise.
7113 * conf/i386-linuxbios.rmk: Likewise.
7114 * conf/i386-pc.rmk: Likewise.
7115 * conf/powerpc-ieee1275.rmk: Likewise.
7116 * conf/sparc64-ieee1275.rmk: Likewise.
7118 2008-05-29 Pavel Roskin <proski@gnu.org>
7120 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7121 when scanning metadata for volume group name.
7123 * include/grub/script.h: Don't include grub_script.tab.h. It's
7124 a generated file, which may only be included from the files with
7125 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7126 use union YYSTYPE, as the later allows forward declaration.
7127 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7129 2008-05-29 Robert Millan <rmh@aybabtu.com>
7131 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7132 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7133 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7134 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7137 2008-05-29 Robert Millan <rmh@aybabtu.com>
7139 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7140 control key combinations.
7142 2008-05-29 Robert Millan <rmh@aybabtu.com>
7144 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7145 * util/ieee1275/grub-install.in: ... to here.
7146 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7147 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7148 (grub_install_SOURCES): Likewise.
7150 2008-05-29 Robert Millan <rmh@aybabtu.com>
7152 * fs/affs.c: Update copyright year.
7153 * fs/ext2.c: Likewise.
7154 * fs/fshelp.c: Likewise.
7155 * fs/hfsplus.c: Likewise.
7156 * fs/ntfs.c: Likewise.
7157 * fs/xfs.c: Likewise.
7158 * include/grub/fshelp.h: Likewise.
7159 * util/grub-mkdevicemap.c: Likewise.
7161 2008-05-28 Robert Millan <rmh@aybabtu.com>
7163 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7164 might need to be fatfs to support some firmware implementations
7167 2008-05-28 Robert Millan <rmh@aybabtu.com>
7169 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7171 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7172 (make_device_map): Likewise.
7174 2008-05-20 Bean <bean123ch@gmail.com>
7176 * fs/fshelp.c (grub_fshelp_map_block): New function.
7177 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7178 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7180 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7181 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7182 (grub_fshelp_journal): New structure.
7183 (grub_fshelp_map_block): New function prototype.
7184 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7185 (grub_fshelp_map_block): Likewise.
7187 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7188 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7189 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7190 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7191 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7192 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7193 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7194 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7195 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7196 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7197 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7198 (grub_ext2_sblock): New members for journal support.
7199 (grub_ext3_journal_header): New structure.
7200 (grub_ext3_journal_revoke_header): Likewise.
7201 (grub_ext3_journal_block_tag): Likewise.
7202 (grub_ext3_journal_sblock): Likewise.
7203 (grub_fshelp_node): New members logfile and journal.
7204 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7205 grub_fshelp_map_block to get real block number.
7206 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7208 (grub_ext2_read_inode): Likewise.
7209 (grub_ext3_get_journal): New function.
7210 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7211 (grub_ext2_close): Release memory used by journal.
7213 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7214 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7215 (grub_reiserfs_transaction_header): Renamed to
7216 grub_reiserfs_description_block, replace field data with real_blocks.
7217 (grub_reiserfs_commit_block): New structure.
7218 (grub_reiserfs_data): New member journal.
7219 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7221 (grub_reiserfs_read_symlink): Likewise.
7222 (grub_reiserfs_iterate_dir): Likewise.
7223 (grub_reiserfs_open): Likewise.
7224 (grub_reiserfs_read): Likewise.
7225 (grub_reiserfs_get_journal): New function.
7226 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7227 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7228 using grub_reiserfs_get_journal.
7229 (grub_reiserfs_close): Release memory used by journal.
7231 * fs/affs.c (grub_affs_read_block): Change block type to
7232 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7234 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7236 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7238 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7240 * fs/udf.c (grub_udf_read_block): Change block type to
7241 grub_disk_addr_t. Use type cast to avoid warning.
7243 * fs/xfs.c (grub_xfs_read_block): Likewise.
7245 2008-05-16 Christian Franke <franke@computer.org>
7247 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7248 to ensure that break with ESC will always work.
7249 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7250 Remove ESC from keyboard queue.
7252 2008-05-16 Christian Franke <franke@computer.org>
7254 * util/biosdisk.c: [__CYGWIN__] Add includes.
7255 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7256 (get_os_disk): Move variable declarations to OS specific
7257 parts to avoid warning.
7258 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7259 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7260 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7262 * util/getroot.c: [__CYGWIN__] Add includes.
7263 (strip_extra_slashes): Fix "/" case.
7264 [__CYGWIN__] (get_win32_path): New function.
7265 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7266 [__CYGWIN__] (find_root_device): Disable.
7267 [__CYGWIN__] (get_bootsec_serial): New function.
7268 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7269 [__linux__] (grub_guess_root_device): Add early returns to simplify
7271 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7272 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7273 check for Linux only.
7275 2008-05-15 Bean <bean123ch@gmail.com>
7277 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7278 keyboard hang problem in apple's intel mac.
7280 2008-05-09 Robert Millan <rmh@aybabtu.com>
7282 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7284 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7285 (make_device_map): Likewise.
7286 Reported by Aurelien Jarno <aurel32@debian.org>
7288 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
7290 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7291 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7292 (make_device_map): Output entries for xvd type disks.
7294 2008-05-07 Robert Millan <rmh@aybabtu.com>
7296 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7298 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7299 (make_device_map): Likewise.
7300 Reported by Roland Dreier <rdreier@cisco.com>
7302 2008-05-07 Robert Millan <rmh@aybabtu.com>
7304 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7305 grub_strstr() call. Correct a few mistakes in failure path handling.
7307 2008-05-06 Robert Millan <rmh@aybabtu.com>
7309 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7310 Do not print a trailing slash (therefore, the root directory is an
7312 (convert_system_path_to_grub_path): Do not remove trailing slash
7313 from make_system_path_relative_to_its_root() output.
7315 * util/i386/pc/grub-install.in: Add trailing slash to output from
7316 make_system_path_relative_to_its_root().
7318 2008-05-06 Robert Millan <rmh@aybabtu.com>
7320 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7321 ensures that output lines aren't intermangled with those sent to
7322 stderr (via grub_util_info()).
7323 * util/grub-probe.c (grub_refresh): Likewise.
7324 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7326 2008-05-05 Christian Franke <franke@computer.org>
7328 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7329 Add Cygwin device names.
7330 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7331 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7332 (check_device): Return error instead of success on empty name.
7333 (make_device_map): Move label inside linux specific code to
7334 prevent compiler warning.
7336 2008-04-30 Robert Millan <rmh@aybabtu.com>
7338 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7339 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7341 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7343 2008-04-29 Robert Millan <rmh@aybabtu.com>
7345 * docs/grub.cfg: New file (example GRUB configuration).
7347 2008-04-26 Robert Millan <rmh@aybabtu.com>
7349 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7350 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7351 and `disk/ieee1275/nand.c'.
7353 2008-04-25 Bean <bean123ch@gmail.com>
7355 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7358 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7359 change the buffer size to 4096 for cdrom device.
7361 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7363 (_linux_mod_SOURCES): New variable.
7364 (_linux_mod_CFLAGS): Likewise.
7365 (_linux_mod_LDFLAGS): Likewise.
7366 (linux_mod_SOURCES): Likewise.
7367 (linux_mod_CFLAGS): Likewise.
7368 (linux_mod_LDFLAGS): Likewise.
7369 (nand_mod_SOURCES): Likewise.
7370 (nand_mod_CFLAGS): Likewise.
7371 (nand_mod_LDFLAGS): Likewise.
7373 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7374 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7375 type property. (nand device in olpc don't have this property)
7377 * include/grub/disk.h (grub_disk_dev_id): New macro
7378 GRUB_DISK_DEVICE_NAND_ID.
7380 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7382 (grub_rescue_cmd_initrd): Likewise.
7384 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7385 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7386 ofw_cif_handler and ofw_idt, adjust padding number.
7388 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7389 GRUB_MACHINE_IEEE1275 is defined.
7391 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7392 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7394 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7395 on nested function heap_init.
7396 (grub_upper_mem): New variable for i386-ieee1275.
7397 (grub_get_extended_memory): New function for i386-ieee1275.
7398 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7400 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7401 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7404 * loader/i386/ieee1275/linux.c: New file.
7406 * loader/i386/ieee1275/linux_normal.c: New file.
7408 * disk/ieee1275/nand.c: New file.
7410 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7412 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7414 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7416 2008-04-18 Robert Millan <rmh@aybabtu.com>
7418 Restructures early code path on ieee1275 to unify grub_main() as
7419 the first C function that is executed in every platform.
7421 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7422 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7424 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7425 * kern/ieee1275/cmain.c (cmain): Rename to ...
7426 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7427 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7430 2008-04-18 Robert Millan <rmh@aybabtu.com>
7432 * util/update-grub.in: Fix syntax error when setting
7433 `GRUB_PRELOAD_MODULES'.
7434 Reported by Stephane Chazelas <stephane@artesyncp.com>
7436 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7438 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7439 section into account, newer toolchains generate unique build ids
7440 * configure.ac: remove the test for --build-id=none acceptance,
7441 we want build ids to be preserved
7442 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7443 far from other sections don't cause the raw binary images grow
7446 2008-04-15 Robert Millan <rmh@aybabtu.com>
7448 * disk/lvm.c: Update copyright year.
7449 * kern/misc.c: Likewise.
7451 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7453 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7454 there is no memory left for physical volume name.
7456 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7458 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7459 volume name mapping to support bigger than 9 character names properly.
7461 2008-04-13 Robert Millan <rmh@aybabtu.com>
7463 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7464 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7466 2008-04-13 Christian Franke <franke@computer.org>
7468 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7469 to create a floppy emulation boot CD when non emulation mode
7471 Enable Joliet CD filesystem extension.
7473 2008-04-13 Robert Millan <rmh@aybabtu.com>
7475 * kern/misc.c (grub_strncat): Fix off-by-one error.
7476 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7478 * kern/env.c (grub_env_context_close): Clear current context, not
7480 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7482 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7484 2008-04-13 Robert Millan <rmh@aybabtu.com>
7486 Improve robustness when handling LVM.
7488 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7489 (and leave `*p' unmodified).
7490 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7492 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7493 iterating through it.
7494 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7496 (grub_lvm_scan_device): Check the return value (and fail gracefully
7497 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7498 Don't assume `vg->pvs != NULL' when iterating through it.
7500 2008-04-13 Robert Millan <rmh@aybabtu.com>
7502 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7503 * genmk.rb (partmap): New variable.
7504 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7505 (#{partmap}): New target rule.
7506 * genpartmaplist.sh: New file.
7507 * Makefile.in (pkglib_DATA): Add partmap.lst.
7508 (partmap.lst): New target rule.
7509 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7510 modules (including all partition maps), instead of preloading them.
7512 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7514 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7515 `linux-boot-prober' (if installed) to detect other operating
7516 systems which are installed on the computer and add them to
7518 * conf/common.rmk: Build and install 30_os-prober.
7520 2008-04-12 Robert Millan <rmh@aybabtu.com>
7522 * kern/powerpc/ieee1275/init.c: Move from here ...
7523 * kern/ieee1275/init.c: ... to here. Update all users.
7525 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7526 * kern/ieee1275/cmain.c: ... to here. Update all users.
7528 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7529 * kern/ieee1275/openfw.c: ... to here. Update all users.
7531 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7532 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7534 2008-04-10 Pavel Roskin <proski@gnu.org>
7536 * configure.ac: Always use "_cv_" in cache variables for
7537 compatibility with Autoconf 2.62.
7539 2008-04-07 Robert Millan <rmh@aybabtu.com>
7541 Revert grub/machine/init.h addition by Pavel (since it breaks on
7542 i386-ieee1275 and others):
7543 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7544 * util/powerpc/ieee1275/misc.c: Likewise.
7546 2008-04-07 Robert Millan <rmh@aybabtu.com>
7548 * util/grub-probe.c (probe): Improve error message.
7550 2008-04-07 Robert Millan <rmh@aybabtu.com>
7552 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7553 (this prevents the presence of a bogus entry from ruining the whole
7556 2008-04-06 Pavel Roskin <proski@gnu.org>
7558 * util/biosdisk.c: Include grub/util/biosdisk.h.
7559 * util/grub-fstest.c (execute_command): Make static.
7560 * util/grub-mkdevicemap.c (check_device): Likewise.
7561 * util/i386/pc/misc.c: Include grub/machine/init.h.
7562 * util/powerpc/ieee1275/misc.c: Likewise.
7563 * util/lvm.c: Include grub/util/lvm.h.
7564 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7566 * util/raid.c: Include grub/util/raid.h.
7567 (grub_util_getdiskname): Make static.
7569 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7570 grub_hostfs_fini(), as they are called from grub_init_all() and
7571 grub_fini_all() respectively. This fixes an infinite loop in
7572 grub-fstest due to double registration of hostfs.
7573 Reported by Christian Franke <Christian.Franke@t-online.de>
7575 2008-04-05 Pavel Roskin <proski@gnu.org>
7577 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7578 all 8 functions. Otherwise, probe function 0 only.
7580 2008-04-04 Pavel Roskin <proski@gnu.org>
7582 * commands/lspci.c (grub_lspci_iter): Print the bus number
7585 * commands/lspci.c (grub_pci_classes): Fix typos.
7586 (grub_lspci_iter): Don't print func twice. Print vendor ID
7587 before device ID, as it's normally done.
7589 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7590 Fix signedness warnings.
7591 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7593 * util/ieee1275/get_disk_name.c: Include config.h so that
7594 _GNU_SOURCE is defined and getline() is declared. Mark an
7595 unused argument as such. Fix a signedness warning.
7597 2008-04-02 Pavel Roskin <proski@gnu.org>
7599 * genkernsyms.sh.in: Use more robust assignments for CC and
7600 srcdir. Quote srcdir.
7601 * gensymlist.sh.in: Likewise. Assert at the compile time that
7602 the symbol table is not empty.
7604 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7605 * fs/cpio.c (grub_cpio_read): Likewise.
7607 2008-04-01 Pavel Roskin <proski@gnu.org>
7609 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7610 * disk/host.c (grub_host_open): Likewise.
7611 * disk/loopback.c (grub_loopback_open): Likewise.
7612 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7613 disk->id as in disk/host.c, not a multi-character constant.
7615 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7616 later is obsolete, potentially dangerous and sets a bad example.
7617 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7618 * util/misc.c (grub_util_get_image_size): Likewise.
7620 * disk/loopback.c (options): Improve help for "--partitions".
7622 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7623 options to align them with the short options, e.g. "echo -e".
7625 2008-03-31 Bean <bean123ch@gmail.com>
7627 * video/reader/png.c (grub_png_data): New member is_16bit and
7629 (grub_png_decode_image_header): Detect 16 bit png image.
7630 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7631 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7632 (grub_video_reader_png): Release memory occupied by image_data.
7634 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7636 (grub_nfs_mount): Skip the test for sector per cluster.
7638 * include/grub/ntfs.h (MAX_SPC): Removed.
7640 2008-03-31 Bean <bean123ch@gmail.com>
7642 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7643 (grub_probe_SOURCES): Add fs/afs.c.
7644 (grub_fstest_SOURCES): Likewise.
7645 (afs_mod_SOURCES): New variable.
7646 (afs_mod_CFLAGS): Likewise.
7647 (afs_mod_LDFLAGS): Likewise.
7649 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7650 (grub_emu_SOURCES): Likewise.
7652 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7654 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7656 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7658 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7660 * fs/afs.c: New file.
7662 2008-03-30 Pavel Roskin <proski@gnu.org>
7664 * disk/host.c: Include grub/misc.h to fix a warning.
7665 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7666 warnings about implicit declarations.
7668 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7670 * include/grub/i386/loader.h: Change declaration of
7671 grub_linux_boot() to match what grub_loader_set() expects.
7672 * util/getroot.c (grub_guess_root_device): Return const char* to
7674 * util/grub-probe.c (probe): Fix a warning about uninitialized
7675 abstraction_name variable.
7676 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7677 second argument as unused to fix a warning.
7679 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7680 missing grub_error() call.
7682 * util/update-grub_lib.in: Define datarootdir, since Autoconf
7683 2.60 and newer uses it to define datadir.
7685 * commands/sleep.c: Fix warning about implicit declaration.
7686 * disk/memdisk.c: Likewise.
7687 * loader/aout.c: Likewise.
7688 * loader/i386/bsd_normal.c: Likewise.
7689 * util/grub-probe.c: Likewise.
7691 * commands/i386/cpuid.c (has_longmode): Make static.
7692 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7693 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7695 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7696 GDT. This is more robust, as %ds can change.
7697 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7698 calling real_to_prot().
7699 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7701 2008-03-28 Pavel Roskin <proski@gnu.org>
7703 * kern/i386/pc/startup.S: Assert that uncompressed functions
7704 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7705 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7706 code, as they push parts of the code (error handlers) beyond
7707 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
7708 code as correctness and size.
7710 2008-03-28 Pavel Roskin <proski@gnu.org>
7712 * kern/i386/pc/startup.S
7713 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7714 data block address to the real mode, keep offset minimal. This
7715 works around a bug in AWARD BIOS on old Athlon systems, which
7716 makes CD detection hang.
7718 2008-03-26 Pavel Roskin <proski@gnu.org>
7720 * normal/color.c (grub_parse_color_name_pair): Make `name' a
7722 * include/grub/normal.h: Add grub_parse_color_name_pair()
7725 2008-03-24 Bean <bean123ch@gmail.com>
7727 * disk/i386/pc/biosdisk.c (cd_start): Removed.
7728 (cd_count): Removed.
7729 (cd_drive): New variable.
7730 (grub_biosdisk_get_drive): Don't check for (cdN) device.
7731 (grub_biosdisk_call_hook): Likewise.
7732 (grub_biosdisk_iterate): Change cdrom detection method.
7733 (grub_biosdisk_open): Replace cd_start with cd_drive.
7734 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7735 detect cdrom device.
7737 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7739 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7740 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7741 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7742 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7743 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7744 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7745 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7746 (grub_biosdisk_cdrp): New structure.
7747 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7749 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7751 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7754 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7757 2008-03-20 Robert Millan <rmh@aybabtu.com>
7759 Remove 2 TiB limit in ata.mod.
7760 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7761 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7762 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7763 grub_uint64_t instead of grub_uint32_t.
7765 2008-03-05 Bean <bean123ch@gmail.com>
7767 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7768 (grub_multiboot): Set boot device.
7770 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7772 2008-03-02 Bean <bean123ch@gmail.com>
7774 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7777 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7779 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7782 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7785 * docs/fdl.texi: New file.
7787 * docs/mdate-sh: New file. Copied from gnulib.
7788 * docs/texinfo.tex: Likewise.
7790 * config.guess: Updated from gnulib.
7791 * install-sh: Likewise.
7793 2008-02-28 Robert Millan <rmh@aybabtu.com>
7795 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7796 (aout_mod_SOURCES): New variable.
7797 (aout_mod_CFLAGS): Likewise.
7798 (aout_mod_LDFLAGS): Likewise.
7800 * conf/i386-ieee1275.rmk: Likewise.
7802 2008-02-28 Robert Millan <rmh@aybabtu.com>
7804 * util/update-grub.in: Reorganise terminal validity check. Accept
7805 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7806 Based on suggestion by Franklin PIAT.
7808 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
7810 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7812 * util/getroot.c (grub_util_check_block_device): New function that
7813 returns the given argument if it is a block device and returns NULL else.
7814 * util/grub-probe.c (argument_is_device): New variable.
7815 (probe): Promote device_name from a variable to an argument. Receive
7816 device_name from grub_util_check_block_device() if path is NULL and from
7817 grub_guess_root_device() else. Do not free() device_name anymore.
7818 (options): Introduce new parameter '-d, --device'.
7819 (main): Add description of the new parameter to the help screen.
7820 Rename path variable to argument. Set argument_is_device if the '-d'
7821 option is given. Pass argument to probe() depending on
7824 2008-02-24 Bean <bean123ch@gmail.com>
7826 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7827 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7828 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7829 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7830 (GRUB_ISO9660_VOLDESC_END): Likewise.
7831 (grub_iso9660_primary_voldesc): New member escape.
7832 (grub_iso9660_data): New member joliet.
7833 (grub_iso9660_convert_string): New function.
7834 (grub_iso9660_mount): Detect joliet extension.
7835 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7836 (grub_iso9660_iso9660_label): Likewise.
7838 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7839 (grub_setup_SOURCES): Add fs/udf.c.
7840 (grub_fstest_SOURCES): Likewise.
7841 (udf_mod_SOURCES): New variable.
7842 (udf_mod_CFLAGS): Likewise.
7843 (udf_mod_LDFLAGS): Likewise.
7845 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7846 (grub_emu_SOURCES): Likewise.
7848 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7850 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7852 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7854 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7856 * fs/udf.c: New file.
7858 2008-02-24 Robert Millan <rmh@aybabtu.com>
7860 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7861 (normal/lexer.c_DEPENDENCIES): New variables.
7862 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7863 (normal/lexer.c_DEPENDENCIES): Likewise.
7864 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7865 (normal/lexer.c_DEPENDENCIES): Likewise.
7866 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7867 (normal/lexer.c_DEPENDENCIES): Likewise.
7868 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7869 (normal/lexer.c_DEPENDENCIES): Likewise.
7870 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7871 (normal/lexer.c_DEPENDENCIES): Likewise.
7873 2008-02-23 Robert Millan <rmh@aybabtu.com>
7875 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7876 since they were intended to be in hex. This didn't break previously
7877 because of a bug in gpt_partition_map_iterate() (see below).
7879 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7880 when checking the validity of GPT header.
7881 Remove `partno', since it always provides the same information as `i'.
7883 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7885 * include/grub/efi/time.h: Fix a wrong comment.
7887 2008-02-19 Pavel Roskin <proski@gnu.org>
7889 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7892 2008-02-19 Bean <bean123ch@gmail.com>
7894 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7895 (aout_mod_SOURCES): New variable.
7896 (aout_mod_CFLAGS): Likewise.
7897 (aout_mod_LDFLAGS): Likewise.
7898 (_bsd_mod_SOURCES): New variable.
7899 (_bsd_mod_CFLAGS): Likewise.
7900 (_bsd_mod_LDFLAGS): Likewise.
7901 (bsd_mod_SOURCES): New variable.
7902 (bsd_mod_CFLAGS): Likewise.
7903 (bsd_mod_LDFLAGS): Likewise.
7905 * include/grub/aout.h: New file.
7907 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7909 * include/grub/i386/bsd.h: New file.
7911 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7914 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7915 function is called, so that it's possible to change it inside the hook.
7916 (grub_elf64_load): Likewise.
7917 (grub_elf_file): Don't close the file if elf header is not found.
7918 (grub_elf_close): Close the file if grub_elf_file fails (The new
7919 grub_elf_file won't close it).
7920 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7921 (grub_elf64_size): Likewise.
7923 * kern/i386/loader.S (grub_unix_real_boot): New function.
7925 * loader/aout.c: New file.
7927 * loader/i386/bsd.c: New file.
7929 * loader/i386/bsd_normal.c: New file.
7931 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7933 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7934 can test other formats.
7936 2008-02-19 Robert Millan <rmh@aybabtu.com>
7938 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7939 (grub_gpt_partition_type_empty): Redefine with macro from
7940 `<grub/gpt_partition.h>'.
7941 (gpt_partition_map_iterate): Adjust partition type comparison.
7943 Export `entry' as partmap-specific `part.data' struct.
7944 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7946 * include/grub/gpt_partition.h (grub_gpt_header)
7947 (grub_gpt_partentry): ... to here (new file).
7949 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7951 (grub_gpt_partition_type_bios_boot): New const variable, defined
7952 with macro from `<grub/gpt_partition.h>'.
7954 (setup): Replace `first_start' with `embed_region', which keeps
7955 track of the embed region (and is partmap-agnostic).
7957 Replace find_first_partition_start() with find_usable_region(),
7958 which finds a usable region for embedding using partmap-specific
7959 knowledge (supports PC/MSDOS and GPT).
7961 Fix all assumptions that the embed region start at sector 1, using
7962 `embed_region.start' from now on. Similarly, use `embed_region.end'
7963 rather than `first_start' to calculate available size.
7965 In grub_util_info() message, replace "into after the MBR" with an
7966 indication of the specific sector our embed region starts at.
7968 2008-02-19 Robert Millan <rmh@aybabtu.com>
7970 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7971 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7972 `commands/reboot.c'.
7973 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7974 (halt_mod_SOURCES): Likewise.
7975 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7976 (halt_mod_SOURCES): Likewise.
7978 2008-02-17 Christian Franke <franke@computer.org>
7980 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7982 2008-02-17 Robert Millan <rmh@aybabtu.com>
7984 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7985 set `first_start' to 0 for non-PC/MSDOS partition maps.
7987 2008-02-16 Robert Millan <rmh@aybabtu.com>
7989 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7990 do not assume partition map is PC/MSDOS before performing checks that
7991 are specific to that layout.
7993 2008-02-13 Robert Millan <rmh@aybabtu.com>
7995 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7996 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7997 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7999 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8001 * configure.ac: Only a cosmetic change on the handling of
8002 -fno-stack-protector.
8004 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
8006 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8007 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8009 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8010 (halt_mod_SOURCES): New variable.
8011 (halt_mod_CFLAGS): Likewise.
8012 (halt_mod_LDFLAGS): Likewise.
8013 (reboot_mod_SOURCES): Likewise.
8014 (reboot_mod_CFLAGS): Likewise.
8015 (reboot_mod_LDFLAGS): Likewise.
8017 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8018 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8020 (halt_mod_SOURCES): Likewise.
8021 (reboot_mod_SOURCES): Likewise.
8023 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8024 commands/i386/pc/reboot.c by commands/reboot.c.
8025 (reboot_mod_SOURCES): Likewise.
8027 * commands/i386/pc/reboot.c: merge this file ...
8029 * commands/ieee1275/reboot.c: ... and this file ...
8031 * commands/reboot.c: ... to this file.
8032 Add some precompiler directive to include the correct header for
8035 * commands/ieee1275/halt.c: move this file ...
8037 * commands/halt.c: ... to here.
8038 Add some precompiler directive to include the correct header for
8041 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8042 (grub_halt): Likewise.
8044 * kern/efi/efi.c (grub_reboot): New function.
8045 (grub_halt): Likewise.
8047 2008-02-12 Robert Millan <rmh@aybabtu.com>
8049 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8050 /dev (like it is done for /dev/mapper). This doesn't provide support
8051 for EVMS, but at least it is now easy to identify the problem when it
8054 2008-02-11 Robert Millan <rmh@aybabtu.com>
8056 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8057 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8058 comparing it with -1, not 0.
8060 2008-02-10 Robert Millan <rmh@aybabtu.com>
8062 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8064 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8065 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8067 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8068 `disk/lvm.c' to the end of the list.
8069 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8070 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8072 2008-02-10 Robert Millan <rmh@aybabtu.com>
8074 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8075 grub_print_error() instead. This will let user know why we're entering
8077 Based on suggestions from Sam Morris.
8079 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
8081 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8082 on remaining N args, instead of "--" arg N times.
8084 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8086 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8087 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8088 pattern for unknown glyphs.
8090 2008-02-09 Robert Millan <rmh@aybabtu.com>
8092 * configure.ac: Probe for `help2man'.
8093 * Makefile.in (builddir): New variable.
8094 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8095 or otherwise add a few flags/options to it.
8096 (install-local): For every executable utility or script that is
8097 installed, invoke $(HELP2MAN) to install a manpage based on --help
8100 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8101 that it doesn't prevent --help from working in build tree.
8103 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8104 with `bug-grub@gnu.org'.
8105 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8106 * util/update-grub.in (usage): New function.
8107 Implement proper argument check, with support for --help and --version
8108 (as well as existing -y).
8110 2008-02-09 Christian Franke <franke@computer.org>
8112 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8113 avoid overwriting previous output.
8114 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8116 2008-02-09 Robert Millan <rmh@aybabtu.com>
8118 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8121 2008-02-09 Robert Millan <rmh@aybabtu.com>
8123 * commands/sleep.c: New file.
8124 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8125 (sleep_mod_SOURCES): New variable.
8126 (sleep_mod_CFLAGS): Likewise.
8127 (sleep_mod_LDFLAGS): Likewise.
8129 2008-02-09 Robert Millan <rmh@aybabtu.com>
8131 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8132 situations in which we can deduce the RAID size and the superblock
8135 2008-02-09 Robert Millan <rmh@aybabtu.com>
8137 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8138 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8139 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8141 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8142 and return a grub_diskmemberlist_t composed of physical array members.
8143 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8145 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8147 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8148 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8149 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8151 * util/grub-probe.c (probe): Move partmap probing code from here ...
8152 (probe_partmap): ... to here.
8153 (probe): Use probe_partmap() once for the disk we're probing, and
8154 additionally, when such disk contains a memberlist() struct member,
8155 once for each disk that is contained in the structure returned by
8158 2008-02-09 Robert Millan <rmh@aybabtu.com>
8160 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8161 environment variable to 'all' in order to obtain debug output from
8163 * util/i386/pc/grub-setup.c (main): Likewise.
8165 2008-02-08 Robert Millan <rmh@aybabtu.com>
8167 * disk/raid.c (grub_raid_scan_device): Check for
8168 `array->device[sb.this_disk.number]' rather than for
8169 `array->device[sb.this_disk.number]->name', since the latter is not
8170 guaranteed to be accessible.
8172 2008-02-08 Robert Millan <rmh@aybabtu.com>
8174 * disk/raid.c: Update copyright.
8175 * fs/cpio.c: Likewise.
8176 * include/grub/raid.h: Likewise.
8177 * loader/i386/pc/multiboot.c: Likewise.
8178 * util/hostfs.c: Likewise.
8180 2008-02-08 Robert Millan <rmh@aybabtu.com>
8182 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8183 to a grub_disk_t array.
8184 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8186 (grub_raid_scan_device): Replace `device[x].name' accesses with
8187 `device[x]->name'. Simplify initialization of `array->device[x]'.
8189 2008-02-08 Robert Millan <rmh@aybabtu.com>
8191 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8192 grub_dprintf() calls.
8193 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8196 2008-02-07 Christian Franke <franke@computer.org>
8198 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8199 instead of fseek and ftell to support large files.
8200 (grub_hostfs_read): Likewise.
8202 2008-02-07 Robert Millan <rmh@aybabtu.com>
8204 Patch from Jeroen Dekkers.
8205 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8206 failure, since successfully reading all array members might not be
8209 2008-02-06 Robert Millan <rmh@aybabtu.com>
8211 * util/grub-probe.c (probe): Simplify partmap probing (with the
8212 assumption that the first word up to the underscore equals to
8215 2008-02-06 Christian Franke <franke@computer.org>
8217 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8218 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8219 last block of a cpio or tar stream.
8220 Check for "TRAILER!!!" instead of any empty data
8221 block to detect last block of a cpio stream.
8222 (grub_cpio_dir): Fix constness of variable np.
8223 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8224 cpio or tar trailer is detected. This fixes a crash
8225 on open of a non existing file.
8227 2008-02-05 Bean <bean123ch@gmail.com>
8229 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8231 (grub_multiboot_load_elf64): Likewise.
8232 (grub_multiboot): Initialize mbi structure.
8234 * util/grub-fstest.c: Don't include unused header file script.h.
8236 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8238 (grub_fstest_SOURCES): Likewise.
8240 2008-02-05 Robert Millan <rmh@aybabtu.com>
8242 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8243 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8244 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8245 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8247 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8248 (translation_table): Replace hardcoded values with macros
8249 provided by `<grub/term.h>'.
8251 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8252 (keyboard_map): Correct/add a few values, with macros provided
8254 (keyboard_map_shift): Zero values that don't differ from their
8255 `keyboard_map' equivalents.
8256 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8257 Discard the second scan code that is always sent by Caps lock.
8258 Only use `keyboard_map_shift' when it provides a non-zero value,
8259 otherwise fallback to `keyboard_map'.
8261 2008-02-04 Bean <bean123ch@gmail.com>
8263 * Makefile.in (enable_grub_fstest): New variable.
8265 * conf/common.rmk (grub_fstest_init.lst): New rule.
8266 (grub_fstest_init.h): Likewise.
8267 (grub_fstest_init.c): Likewise.
8268 (util/grub-fstest.c_DEPENDENCIES): New variable.
8269 (grub_fstest_SOURCES): Likewise.
8271 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8273 * util/grub-fstest.c: New file.
8275 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8277 Make grub-setup handle a separate root device.
8279 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8280 so that the root device can be compared with the destination
8282 When embedding the core image, if the root and destination devices
8283 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8285 When not embedding, set ROOT_DRIVE to 0xFF.
8287 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8289 Add support for having a grub directory in a different drive. This
8290 is still only the data handling part.
8292 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8293 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8294 (grub_root_drive): New variable.
8296 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8297 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8298 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8301 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8303 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8305 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8307 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8308 is bogus, because PXE booting does not specify any drive
8311 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8312 am not sure if this is really correct.
8314 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8315 is always identical to the boot drive when booting from a CD.
8317 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8319 (root_drive): New variable.
8320 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8321 (setup_sectors): Push %dx right after popping it, because %dh will
8323 (copy_buffer): Restore %dx.
8325 2008-02-03 Robert Millan <rmh@aybabtu.com>
8327 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8328 use `cdboot.img' for cdrom images.
8330 2008-02-03 Robert Millan <rmh@aybabtu.com>
8332 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8333 only setup gfxterm when `font' command has succeeded.
8335 2008-02-03 Robert Millan <rmh@aybabtu.com>
8337 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8338 (grub_rescue_cmd_multiboot_loader)
8339 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8341 2008-02-03 Pavel Roskin <proski@gnu.org>
8343 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8344 %edx and %esi from stack only after grub_gate_a20() is called.
8345 grub_gate_a20() clobbers %edx.
8347 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8349 * configure.ac (AC_INIT): Bumped to 1.96.
8351 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8352 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8353 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8354 video/readers/png.c.
8356 2008-02-03 Bean <bean123ch@gmail.com>
8358 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8359 (cdboot_img_SOURCES): New variable.
8360 (cdboot_img_ASFLAGS): New variable.
8361 (cdboot_img_LDFLAGS): New variable.
8363 * boot/i386/pc/cdboot.S: New file.
8365 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8366 (cd_count): Likewise.
8367 (grub_biosdisk_get_drive): Add support for cd device.
8368 (grub_biosdisk_call_hook): Likewise.
8369 (grub_biosdisk_iterate): Likewise.
8370 (grub_biosdisk_open): Likewise.
8371 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8372 (grub_biosdisk_rw): Support reading from cd device.
8373 (GRUB_MOD_INIT): Iterate cd devices.
8375 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8376 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8377 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8379 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8381 2008-02-02 Robert Millan <rmh@aybabtu.com>
8383 * commands/read.c: New file.
8384 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8385 (read_mod_SOURCES): New variable.
8386 (read_mod_CFLAGS): Likewise.
8387 (read_mod_LDFLAGS): Likewise.
8389 2008-02-02 Robert Millan <rmh@aybabtu.com>
8391 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8392 determining whether menu has to be displayed.
8394 2008-02-02 Marco Gerards <marco@gnu.org>
8396 * bus/pci.c: New file.
8398 * include/grub/pci.h: Likewise.
8400 * include/grub/i386/pc/pci.h: Likewise.
8402 * commands/lspci.c: Likewise.
8404 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8406 (pci_mod_SOURCES): New variable.
8407 (pci_mod_CFLAGS): Likewise.
8408 (pci_mod_LDFLAGS): Likewise.
8409 (lspci_mod_SOURCES): Likewise.
8410 (lspci_mod_CFLAGS): Likewise.
8411 (lspci_mod_LDFLAGS): Likewise.
8413 2008-02-02 Bean <bean123ch@gmail.com>
8415 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8416 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8418 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8419 (grub_xfs_btree_node): New structure.
8420 (grub_xfs_btree_root): New structure.
8421 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8422 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8423 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8424 (GRUB_XFS_EXTENT_SIZE): Likewise.
8425 (grub_xfs_read_block): Support btree format type.
8426 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8427 Use directory block as basic unit.
8429 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8431 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8432 __attribute__ ((__regparm__ (1))).
8434 2008-02-01 Robert Millan <rmh@aybabtu.com>
8436 Correct a mistake in previous commit.
8438 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8440 (normal/command.c_DEPENDENCIES): New variable.
8442 2008-02-01 Robert Millan <rmh@aybabtu.com>
8444 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8446 (normal/command.c_DEPENDENCIES): New variable.
8447 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8448 * conf/i386-ieee1275.rmk: Likewise.
8449 * conf/i386-linuxbios.rmk: Likewise.
8450 * conf/i386-pc.rmk: Likewise.
8451 * conf/sparc64-ieee1275.rmk: Likewise.
8452 * conf/powerpc-ieee1275.rmk: Likewise.
8453 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8455 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8457 2008-02-01 Robert Millan <rmh@aybabtu.com>
8459 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8460 call at beginning of function.
8462 2008-01-31 Pavel Roskin <proski@gnu.org>
8464 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8465 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8466 (grub_mkrescue_SOURCES): Likewise.
8467 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8469 2008-01-30 Robert Millan <rmh@aybabtu.com>
8471 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8472 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8473 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8474 (grub_probe_SOURCES): ... to here.
8476 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8477 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8478 * conf/i386-ieee1275.rmk: Likewise.
8479 * conf/i386-linuxbios.rmk: Likewise.
8480 * conf/powerpc-ieee1275.rmk: Likewise.
8482 2008-01-30 Tristan Gingold <gingold@free.fr>
8484 * kern/rescue.c: Silently accept empty lines.
8486 2008-01-29 Bean <bean123ch@gmail.com>
8488 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8489 (real_code_2): Code cleanup and change comment style.
8490 (move_memory): Avoid using 32-bit address mode.
8492 2008-01-29 Bean <bean123ch@gmail.com>
8494 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8495 (png_mod_SOURCES): New variable.
8496 (png_mod_CFLAGS): Likewise.
8497 (png_mod_LDFLAGS): Likewise.
8499 * video/readers/png.c: New file.
8501 2008-01-28 Robert Millan <rmh@aybabtu.com>
8503 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8504 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8505 `ifndef GRUB_MOD_GAP' hack.
8506 * util/elf/grub-mkimage.c (add_segments): Likewise.
8508 2008-01-27 Robert Millan <rmh@aybabtu.com>
8510 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8511 `GRUB_MOD_GAP' for platforms in which it's not defined.
8512 * util/elf/grub-mkimage.c (add_segments): Likewise.
8514 2008-01-27 Robert Millan <rmh@aybabtu.com>
8516 Get grub-emu to build again (including parallel builds).
8518 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8520 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8521 (normal/execute.c_DEPENDENCIES): ... this, ...
8522 (grub-emu_DEPENDENCIES): ... and this.
8524 * conf/i386-efi.rmk: Likewise.
8525 * conf/i386-linuxbios.rmk: Likewise.
8526 * conf/i386-ieee1275.rmk: Likewise.
8527 * conf/powerpc-ieee1275.rmk: Likewise.
8528 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8530 2008-01-27 Robert Millan <rmh@aybabtu.com>
8532 * NEWS: Add a few items.
8534 2008-01-27 Robert Millan <rmh@aybabtu.com>
8536 Fix parallel builds with grub-emu. Based on earlier commit for
8537 grub-probe and grub-setup.
8539 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8540 (util/grub-emu.c_DEPENDENCIES): ... this.
8541 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8542 (util/grub-emu.c_DEPENDENCIES): ... this.
8543 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8544 (util/grub-emu.c_DEPENDENCIES): ... this.
8545 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8546 (util/grub-emu.c_DEPENDENCIES): ... this.
8547 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8548 (util/grub-emu.c_DEPENDENCIES): ... this.
8550 2008-01-27 Pavel Roskin <proski@gnu.org>
8552 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8553 to create a gap between _end and the modules added to the image
8554 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8555 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8556 * util/elf/grub-mkimage.c (add_segments): Likewise.
8558 2008-01-26 Pavel Roskin <proski@gnu.org>
8560 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8561 just return an error.
8563 2008-01-26 Bean <bean123ch@gmail.com>
8565 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8566 (grub_reiserfs_get_item): Save offset of the next item.
8567 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8569 2008-01-25 Robert Millan <rmh@aybabtu.com>
8571 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8572 make all filesystem sources appear together (possibly fixing omissions
8574 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8575 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8576 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8577 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8579 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8581 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8582 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8583 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8584 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8586 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8587 (probe): Add a sanity check to make sure of our ability to read
8588 requested files when probing for filesystem type.
8590 * genmk.rb: Update copyright year (2007).
8592 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8593 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8594 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8595 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8596 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8597 : Remove function prototypes.
8599 2008-01-25 Robert Millan <rmh@aybabtu.com>
8601 Revert my previous commits (based on wrong assumption of how grub_errno
8604 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8605 * kern/file.c (grub_file_open): Likewise.
8607 2008-01-24 Pavel Roskin <proski@gnu.org>
8609 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8610 that hang if GRUB tries to setup colors.
8611 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8612 colors for firmwares that don't support it.
8613 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8614 Recognize Open Hack'Ware, set flags to work around its
8617 2008-01-24 Robert Millan <rmh@aybabtu.com>
8619 * kern/file.c (grub_file_open): Do not account previous failures of
8620 unrelated functions when grub_errno is checked for.
8621 Reported by Oleg Strikov.
8623 2008-01-24 Bean <bean123ch@gmail.com>
8625 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8626 (grub_ufs_sblock): New member volume name.
8627 (grub_ufs_find_file): Fix string copy bug.
8628 (grub_ufs_label): Implement this function properly.
8630 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8631 (grub_hfs_iterate_records): Use the correct file number for extents
8632 and catalog file. Fix problem in next index calculation.
8633 (grub_hfs_find_node): Replace recursive function call with loop.
8634 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8636 2008-01-23 Robert Millan <rmh@aybabtu.com>
8638 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8639 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8640 (grub_multiboot2_real_boot): New function prototype.
8642 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8643 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8645 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8646 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8648 2008-01-23 Robert Millan <rmh@aybabtu.com>
8650 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8651 #ifdef'ed out grub_printf().
8653 2008-01-23 Robert Millan <rmh@aybabtu.com>
8655 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8656 grub_dprintf calls, since they make "debug=all" mode unusable.
8657 (grub_console_checkkey): Likewise.
8659 2008-01-23 Robert Millan <rmh@aybabtu.com>
8661 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8662 `term/i386/pc/at_keyboard.c'.
8663 (pkglib_MODULES): Add `serial.mod'.
8664 (serial_mod_SOURCES): New variable.
8665 (serial_mod_CFLAGS): Likewise.
8666 (serial_mod_LDFLAGS): Likewise.
8668 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8669 `<grub/powerpc/ieee1275/console.h>'.
8670 (grub_keyboard_controller_init): New function prototype.
8671 (grub_console_checkkey): Likewise.
8672 (grub_console_getkey): Likewise.
8674 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8677 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8678 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8680 2008-01-23 Robert Millan <rmh@aybabtu.com>
8682 * kern/i386/pc/init.c (make_install_device): When memdisk image is
8683 present, "(memdisk)/boot/grub" becomes the default prefix.
8685 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8686 a memdisk tarball with all the modules. Add --overlay=DIR option that
8687 allows users to overlay additional files into the image.
8689 2008-01-23 Robert Millan <rmh@aybabtu.com>
8691 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8692 and `machine/memory.h'.
8693 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8694 (_multiboot_mod_SOURCES): New variable.
8695 (_multiboot_mod_CFLAGS): Likewise.
8696 (_multiboot_mod_LDFLAGS): Likewise.
8697 (multiboot_mod_SOURCES): Likewise.
8698 (multiboot_mod_CFLAGS): Likewise.
8699 (multiboot_mod_LDFLAGS): Likewise.
8701 * include/grub/i386/ieee1275/loader.h: New file.
8703 * include/grub/i386/ieee1275/machine.h: Likewise.
8705 * include/grub/i386/ieee1275/memory.h: Likewise.
8707 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8708 variable declaration.
8709 (grub_os_area_size): Likewise.
8711 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8712 (grub_lower_mem, grub_upper_mem): New variables.
8713 (grub_stop_floppy): New function (just to make
8714 grub_multiboot2_real_boot() happy).
8716 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8717 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8718 (grub_stop): New function.
8719 Include `"../realmode.S"' and `"../loader.S"'.
8721 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8722 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8724 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8725 rely on grub_multiboot2_real_boot() for final boot.
8727 2008-01-22 Robert Millan <rmh@aybabtu.com>
8729 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8730 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8731 device that doesn't look like an SD card.
8732 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8733 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8734 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8735 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8738 2008-01-22 Robert Millan <rmh@aybabtu.com>
8740 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8741 avoid claiming over our own code.
8743 2008-01-22 Bean <bean123ch@gmail.com>
8745 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8746 (jpeg_mod_SOURCES): New variable.
8747 (jpeg_mod_CFLAGS): Likewise.
8748 (jpeg_mod_LDFLAGS): Likewise.
8750 * video/readers/jpeg.c : New file.
8752 2008-01-22 Bean <bean123ch@gmail.com>
8754 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8755 there are no more items.
8757 2008-01-21 Robert Millan <rmh@aybabtu.com>
8759 * kern/mm.c (grub_mm_init_region): Improve debug message.
8761 2008-01-21 Robert Millan <rmh@aybabtu.com>
8763 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8764 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8766 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8768 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8769 Indicates start of upper memory.
8770 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8771 (generate_image): Abort when image size is big enough to corrupt
8774 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8775 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8776 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8777 instead of hardcoding 0xA0000.
8778 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8779 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8780 instead of hardcoding 0xA0000.
8782 2008-01-21 Robert Millan <rmh@aybabtu.com>
8784 * disk/memdisk.c (memdisk_size): New variable.
8785 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8787 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
8788 image to dynamic memory.
8789 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8790 `memdisk_size'. Free memdisk block.
8792 2008-01-21 Robert Millan <rmh@aybabtu.com>
8794 Fix detection of very small filesystems (like tar).
8796 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8797 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8798 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8799 a problem with this disk).
8801 2008-01-21 Robert Millan <rmh@aybabtu.com>
8803 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8804 on grub_biosdisk_rw_standard() error.
8806 2008-01-21 Robert Millan <rmh@aybabtu.com>
8808 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8810 * kern/elf.c: Likewise.
8811 * kern/ieee1275/ieee1275.c: Likewise.
8812 * kern/powerpc/ieee1275/openfw.c: Likewise.
8813 * term/ieee1275/ofconsole.c: Likewise.
8815 2008-01-21 Robert Millan <rmh@aybabtu.com>
8817 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8819 * include/grub/kernel.h (grub_arch_memdisk_addr)
8820 (grub_arch_memdisk_size): Moved from here ...
8822 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8823 (grub_arch_memdisk_size): ... to here.
8825 2008-01-21 Robert Millan <rmh@aybabtu.com>
8827 Mostly based on bugfix from Bean.
8829 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8830 attribute with hook() parameter.
8831 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8833 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8834 attribute with hook() parameter.
8835 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8838 2008-01-21 Robert Millan <rmh@aybabtu.com>
8840 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8841 (pkglib_MODULES): Add `memdisk.mod'.
8842 (memdisk_mod_SOURCES): New variable.
8843 (memdisk_mod_CFLAGS): Likewise.
8844 (memdisk_mod_LDFLAGS): Likewise.
8846 * disk/memdisk.c: New file.
8848 * include/grub/disk.h (grub_disk_dev_id): Add
8849 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8851 * include/grub/i386/pc/kernel.h
8852 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8853 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8854 (grub_kernel_image_size): New variable declaration.
8855 (grub_total_module_size): Likewise.
8856 (grub_memdisk_image_size): Likewise.
8858 * include/grub/i386/pc/memory.h
8859 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8861 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8862 (grub_arch_memdisk_addr): New variable declaration.
8863 (grub_arch_memdisk_size): Likewise.
8865 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8866 (grub_arch_memdisk_size): Likewise.
8868 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8869 (codestart): Replace hardcoded `0x100000' with
8870 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8872 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8873 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8874 not NULL, append the contents of the file it refers to, at the end of
8875 the compressed kernel image. Initialize `grub_memdisk_image_size'
8876 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8877 (options): Add "memdisk"|'m' option.
8878 (main): Parse --memdisk|-m option, and pass user-provided path as
8879 parameter to generate_image().
8881 2008-01-20 Robert Millan <rmh@aybabtu.com>
8883 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8884 grub_dprintf() calls from here ...
8885 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8887 2008-01-20 Robert Millan <rmh@aybabtu.com>
8889 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8891 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8893 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8894 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8895 `GRUB_IEEE1275_FLAG_REAL_MODE'.
8896 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8898 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8899 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8901 2008-01-19 Robert Millan <rmh@aybabtu.com>
8903 Get rid of confusing function (superseded by
8904 `grub_ieee1275_get_integer_property')
8905 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8907 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8909 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8910 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8911 in native endianness from grub_ieee1275_get_integer_property().
8913 2008-01-19 Robert Millan <rmh@aybabtu.com>
8915 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8916 command after "shut-down", since implementations differ on which
8917 the command for halt is.
8919 2008-01-19 Robert Millan <rmh@aybabtu.com>
8921 * include/grub/i386/linuxbios/console.h: Add header protection.
8922 (grub_keyboard_controller_init): New function prototype.
8923 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8924 (KEYBOARD_COMMAND_READ): Likewise.
8925 (KEYBOARD_COMMAND_WRITE): Likewise.
8926 (KEYBOARD_SCANCODE_SET1): Likewise.
8927 (grub_keyboard_controller_write): New function.
8928 (grub_keyboard_controller_read): Likewise.
8929 (grub_keyboard_controller_init): Likewise.
8931 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8932 (grub_console_init): On coreboot/LinuxBIOS, call
8933 grub_keyboard_controller_init().
8935 2008-01-19 Robert Millan <rmh@aybabtu.com>
8937 PowerPC changes provided by Pavel Roskin.
8939 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8940 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8941 don't rely on cmain() doing it.
8942 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8943 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8945 2008-01-16 Robert Millan <rmh@aybabtu.com>
8947 * include/grub/i386/linuxbios/memory.h
8948 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8949 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8950 receive `table_header' as argument. Instead, probe for it in the
8951 known memory ranges where it can be present.
8952 (grub_available_iterate): Do not pass a fixed `table_header' address
8953 to grub_linuxbios_table_iterate().
8955 2008-01-15 Robert Millan <rmh@aybabtu.com>
8957 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8958 * conf/i386-ieee1275.rmk: New file.
8959 * include/grub/i386/ieee1275/console.h: Likewise.
8960 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8961 * include/grub/i386/ieee1275/kernel.h: Likewise.
8962 * include/grub/i386/ieee1275/time.h: Likewise.
8963 * kern/i386/ieee1275/init.c: Likewise.
8964 * kern/i386/ieee1275/startup.S: Likewise.
8966 2008-01-15 Robert Millan <rmh@aybabtu.com>
8968 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8969 when pointers are 32-bit (but still do set it to one when they are
8972 2008-01-15 Robert Millan <rmh@aybabtu.com>
8974 * include/grub/ieee1275/ieee1275.h
8975 (grub_ieee1275_get_integer_property): New function prototype.
8977 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8978 (grub_ieee1275_get_integer_property): New function. Wraps around
8979 grub_ieee1275_get_property() to handle endianness.
8981 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8982 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8984 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8985 (grub_map): Likewise.
8986 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8988 2008-01-15 Bean <bean123ch@gmail.com>
8990 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8991 (grub_script_execute_cmdline): Reset grub_errno.
8993 * normal/main.c (read_config_file): Reset grub_errno.
8995 * normal/parse.y (script_init): New.
8996 (script): Move function and menuentry here.
8998 (command): Add delimiter at the end of command.
8999 (commands): Adjust to match the new command.
9000 (commandblock): Remove grub_script_lexer_record_start.
9001 (menuentry): Add grub_script_lexer_record_start, use the new commands.
9002 (if): Use the new commands.
9004 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9006 2008-01-15 Robert Millan <rmh@aybabtu.com>
9008 * normal/menu.c (run_menu): Move timeout message from here ...
9009 (print_timeout): ... to here.
9010 (run_menu): Use print_timeout() once during initial draw to print
9011 the whole message, and again in every clock tick to update only
9012 the number of seconds.
9014 2008-01-15 Robert Millan <rmh@aybabtu.com>
9016 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9017 actual size of `available' from grub_ieee1275_get_property(), and
9018 restrict parsing to that bound.
9020 2008-01-15 Christian Franke <franke@computer.org>
9022 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9023 (argp_program_version): Remove variable.
9024 (argp_program_bug_address): Likewise.
9025 (options): Convert from struct argp_option to struct option.
9026 (struct arguments): Remove.
9027 (parse_opt): Remove.
9028 (usage): New function.
9029 (main): Replace struct args members by simple variables.
9030 Replace argp_parse() by getopt_long().
9031 Add switch to evaluate options.
9032 Add missing "(...)" around root_dev in prefix string.
9034 2008-01-14 Robert Millan <rmh@aybabtu.com>
9036 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9037 for grub_ieee1275_exit(), in order to improve portability.
9039 2008-01-14 Robert Millan <rmh@aybabtu.com>
9041 * util/grub.d/10_linux.in (prefix): Define.
9042 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9044 2008-01-13 Pavel Roskin <proski@gnu.org>
9046 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9047 grub_errno if no errors have been detected.
9049 2008-01-12 Robert Millan <rmh@aybabtu.com>
9051 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9052 (grub_util_get_dev_abstraction): New function prototype.
9054 * util/getroot.c: Include `<grub/util/getroot.h>'
9055 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9056 (grub_util_get_dev_abstraction): ... here (new function).
9058 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9059 `PRINT_ABSTRACTION'.
9060 (probe): Probe for abstraction type when requested.
9061 (main): Understand `--target=abstraction'.
9063 * util/i386/efi/grub-install.in: Add abstraction module to core
9064 image when it is found to be necessary.
9065 * util/i386/pc/grub-install.in: Likewise.
9066 * util/powerpc/ieee1275/grub-install.in: Likewise.
9068 * util/update-grub_lib.in (font_path): Return system path without
9069 converting to GRUB path.
9070 * util/update-grub.in: Convert system path returned by font_path()
9071 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9072 abstraction module is needed for loading fonts (if any). Export
9073 that as `GRUB_PRELOAD_MODULES'.
9074 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9077 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9079 Remove some unused code from reiserfs.
9081 * fs/reiserfs.c (struct grub_reiserfs_key)
9082 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9083 (struct grub_reiserfs_node_body): Removed.
9084 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9086 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9088 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9090 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9092 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9094 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9096 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9097 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9098 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9100 2008-01-10 Robert Millan <rmh@aybabtu.com>
9102 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9103 Determines if a file is garbage left by packaging systems, etc.
9104 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9105 for processing /etc/grub.d scripts.
9106 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9107 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9108 as a condition for processing Linux images.
9110 2008-01-10 Pavel Roskin <proski@gnu.org>
9112 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9113 to compile reiserfs.c on PowerPC.
9115 2008-01-10 Robert Millan <rmh@aybabtu.com>
9117 * kern/device.c (grub_device_iterate): Do not abort device iteration
9118 when one of the devices cannot be opened.
9119 * kern/disk.c (grub_disk_open): Do not account previous failures of
9120 unrelated functions when grub_errno is checked for.
9122 2008-01-08 Robert Millan <rmh@aybabtu.com>
9124 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9125 `! grub_linux_is_bzimage', change order of address comparison to make
9126 it more intuitive, and improve "too big zImage" error message.
9128 2008-01-08 Robert Millan <rmh@aybabtu.com>
9130 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9131 `$(update-grub_DATA)'.
9132 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9135 2008-01-07 Robert Millan <rmh@aybabtu.com>
9137 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9138 which instruction is modified by grub-setup during installation
9139 (since it wasn't obvious by only looking at this file).
9141 2008-01-07 Robert Millan <rmh@aybabtu.com>
9143 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9144 listing actual TODO items.
9146 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9148 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9150 (grub_reiserfs_get_key_offset): Likewise.
9151 (grub_reiserfs_set_key_offset): Likewise.
9152 (grub_reiserfs_set_key_type): Likewise.
9153 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9155 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9156 better to remove the bitfield version completely.
9158 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9160 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9161 allocated from the heap, due to the fshelp implementation.
9162 (grub_reiserfs_dir): Free NODE, due to the same reason.
9164 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9166 Mostly from Vincent Pelletier:
9168 * fs/reiserfs.c: New file.
9170 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9171 (reiserfs_mod_SOURCES): New variable.
9172 (reiserfs_mod_CFLAGS): Likewise.
9173 (reiserfs_mod_LDFLAGS): Likewise.
9175 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9176 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9177 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9180 2008-01-06 Robert Millan <rmh@aybabtu.com>
9182 * normal/color.c: Remove `<grub/env.h>'.
9184 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9186 * include/grub/normal.h: Include <grub/env.h>.
9188 2008-01-05 Robert Millan <rmh@aybabtu.com>
9190 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9191 usage example with `(hd0,1)'.
9192 Reported by Samuel Thibault.
9194 2008-01-05 Robert Millan <rmh@aybabtu.com>
9196 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9197 (grub_linux_boot_zimage): Rename to ...
9198 (grub_linux_boot): ... this.
9199 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9200 (grub_linux_boot_zimage): Conditionalize zImage copy.
9202 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9203 (grub_linux_boot_bzimage): Remove prototype.
9204 (grub_linux_boot_zimage): Rename to ...
9205 (grub_linux_boot): ... this.
9207 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9208 (grub_linux_boot): Remove function.
9210 2008-01-05 Robert Millan <rmh@aybabtu.com>
9212 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9213 (grub_env_write_color_highlight): Likewise.
9214 (grub_wait_after_message): Likewise.
9216 * normal/color.c: New file.
9218 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9219 (normal_mod_DEPENDENCIES): Likewise.
9221 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9222 (normal_mod_DEPENDENCIES): Likewise.
9224 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9225 (normal_mod_DEPENDENCIES): Likewise.
9227 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9228 (normal_mod_DEPENDENCIES): Likewise.
9230 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9231 for waiting after a message is printed.
9232 * normal/main.c (read_config_file): Likewise.
9233 (grub_normal_init): Register grub_env_write_color_normal() and
9234 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9235 `color_highlight' variables as global.
9237 * normal/menu.c (grub_wait_after_message): New function.
9238 (grub_color_menu_normal): New variable. Replaces ...
9239 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9240 (grub_color_menu_highlight): New variable. Replaces ...
9241 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9242 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9243 `GRUB_TERM_COLOR_STANDARD'.
9244 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9245 `normal_code' and `highlight_code' to `old_color_normal' and
9246 `old_color_highlight', respectively.
9247 (grub_menu_init_page): Update colors when drawing the menu, based on
9248 `menu_color_normal' and `menu_color_highlight' variables.
9249 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9250 a message is printed.
9252 2008-01-05 Robert Millan <rmh@aybabtu.com>
9254 * kern/env.c (grub_env_context_open): Propagate hooks for global
9255 variables to new context.
9257 * kern/main.c (grub_set_root_dev): Export `root' variable.
9259 2008-01-05 Robert Millan <rmh@aybabtu.com>
9261 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9262 discs unconditionally, since udev and others have options to provide
9265 2008-01-05 Robert Millan <rmh@aybabtu.com>
9267 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9269 2008-01-04 Christian Franke <franke@computer.org>
9271 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9274 2008-01-03 Pavel Roskin <proski@gnu.org>
9276 * kern/i386/linuxbios/init.c: Put "void" to all function
9277 declarations with no arguments.
9278 * kern/powerpc/ieee1275/init.c: Likewise.
9279 * term/i386/pc/at_keyboard.c: Likewise.
9280 * term/i386/pc/vga_text.c: Likewise.
9281 * util/grub-mkdevicemap.c: Likewise.
9283 2008-01-02 Robert Millan <rmh@aybabtu.com>
9285 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9286 message when loaded image is out of bounds.
9287 (grub_multiboot_load_elf64): Likewise.
9289 2008-01-02 Pavel Roskin <proski@gnu.org>
9291 * util/grub.d/10_linux.in: Try version without ".old" when
9292 looking for initrd. It's better to use initrd from the newer
9293 kernel of the same version than no initrd at all.
9295 2008-01-01 Robert Millan <rmh@aybabtu.com>
9297 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9299 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9301 * include/grub/video.h: Added grub_video_unmap_color and
9302 grub_video_get_active_render_target.
9303 (grub_video_adapter): Added unmap_color and get_active_render_target.
9305 * video/video.c: Added grub_video_unmap_color and
9306 grub_video_get_active_render_target.
9307 (grub_video_get_info): Changed method to accept NULL pointer as an
9308 argument to allow detection of active video adapter.
9310 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9311 grub_video_vbe_unmap_color_int.
9312 Added grub_video_vbe_unmap_color and
9313 grub_video_vbe_get_active_render_target.
9314 (grub_video_vbe_adapter): Added unmap_color and
9315 get_active_render_target.
9317 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9318 with grub_video_vbe_unmap_color_int.
9320 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9321 (DEFAULT_NORMAL_COLOR): Likewise.
9322 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9323 (DEFAULT_FG_COLOR): Removed.
9324 (DEFAULT_BG_COLOR): Likewise.
9325 (DEFAULT_CURSOR_COLOR): Changed value.
9326 (grub_virtual_screen): Added standard_color_setting,
9327 normal_color_setting, highlight_color_setting and term_color.
9328 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9329 (bitmap_width): Added.
9330 (bitmap_height): Likewise.
9332 (set_term_color): Likewise.
9333 (grub_virtual_screen_setup): Changed to use new terminal coloring
9335 (grub_gfxterm_init): Added init for bitmap.
9336 (grub_gfxterm_fini): Added destroy for bitmap.
9337 (redraw_screen_rect): Updated to use background bitmap and new
9339 (scroll_up): Added optimization for case when there is no bitmap.
9340 (grub_gfxterm_cls): Fixed to use correct background color.
9341 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9343 (grub_virtual_screen_setcolor): Likewise.
9344 (grub_virtual_screen_getcolor): Added.
9345 (grub_gfxterm_background_image_cmd): Likewise.
9346 (grub_video_term): Added setcolor and getcolor.
9347 (MOD_INIT): Added registration of background_image command.
9348 (MOD_TERM): Added unregistration for background_image command.
9350 2007-12-30 Pavel Roskin <proski@gnu.org>
9352 * loader/multiboot_loader.c: Fix multiboot command
9353 unregistration. Fix all typos in the word "multiboot".
9355 2007-12-29 Pavel Roskin <proski@gnu.org>
9357 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9358 support for initrd names used in Fedora.
9360 2007-12-26 Bean <bean123ch@gmail.com>
9362 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9363 (cpio_mod_SOURCES): New variable.
9364 (cpio_mod_CFLAGS): Likewise.
9365 (cpio_mod_LDFLAGS): Likewise.
9367 * fs/cpio.c: New file.
9369 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9371 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9373 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9375 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9377 2007-12-25 Robert Millan <rmh@aybabtu.com>
9379 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9380 (grub_getcolor): New function.
9382 * kern/term.c (grub_getcolor): New function.
9383 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9384 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9385 (print_entry): Set normal and highlight colors to
9386 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9387 respectively, before printing and restore them to old
9389 (grub_menu_init_page): Likewise. Fill an additional colored space
9390 that would otherwise be left blank.
9392 * term/efi/console.c (grub_console_getcolor): New function.
9393 (struct grub_console_term.getcolor): New variable.
9394 * term/i386/pc/console.c (grub_console_getcolor): New function.
9395 (struct grub_console_term.getcolor): New variable.
9396 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9397 (struct grub_console_term.getcolor): New variable.
9399 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9400 (struct grub_console_term.setcolor): Remove variable.
9401 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9402 (struct grub_console_term.setcolor): Remove variable.
9403 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9404 (struct grub_console_term.setcolor): Remove variable.
9405 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9406 (struct grub_console_term.setcolor): Remove variable.
9408 2007-12-25 Robert Millan <rmh@aybabtu.com>
9410 * configure.ac: Search for possible unifont.hex locations, and
9411 define UNIFONT_HEX if found.
9413 * Makefile.in (UNIFONT_HEX): Define variable.
9414 (DATA): Rename to ...
9415 (PKGLIB): ... this. Update all users.
9416 (PKGDATA): New variable.
9417 (pkgdata_IMAGES): Rename to ...
9418 (pkglib_IMAGES): ... this. Update all users.
9419 (pkgdata_MODULES): Rename to ...
9420 (pkglib_MODULES): ... this. Update all users.
9421 (pkgdata_PROGRAMS): Rename to ...
9422 (pkglib_PROGRAMS): ... this. Update all users.
9423 (pkgdata_DATA): Rename to ...
9424 (pkglib_DATA): ... this. Update all users.
9425 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9426 (unicode.pff, ascii.pff): New rules.
9427 (all-local): Add `$(PKGDATA)' dependency.
9428 (install-local): Process `$(PKGDATA)'.
9430 * util/update-grub_lib.in (font_path): Search for *.pff files in
9431 a few more locations, including `${pkgdata}'.
9433 2007-12-23 Robert Millan <rmh@aybabtu.com>
9435 Patch from Bean <bean123ch@gmail.com>:
9436 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9439 2007-12-21 Bean <bean123ch@gmail.com>
9441 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9442 (ntfscomp_mod_SOURCES): New variable.
9443 (ntfscomp_mod_CFLAGS): Likewise.
9444 (ntfscomp_mod_LDFLAGS): Likewise.
9446 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9447 (grub_probe_SOURCES): Likewise.
9448 (grub_emu_SOURCES): Likewise.
9450 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9451 (grub_emu_SOURCES): Likewise.
9453 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9454 (grub_emu_SOURCES): Likewise.
9456 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9457 (grub_emu_SOURCES): Likewise.
9459 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9460 (read_run_list): Renamed to grub_ntfs_read_run_list.
9461 (decomp_nextvcn): Moved to ntfscomp.c.
9462 (decomp_getch): Likewise.
9463 (decomp_get16): Likewise.
9464 (decomp_block): Likewise.
9465 (read_block): Likewise.
9466 (read_data): Partially moved to ntfscomp.c.
9467 (fixup): Change unsigned to grub_uint16_t.
9468 (read_mft): Change unsigned long to grub_uint32_t.
9469 (read_attr): Likewise.
9470 (read_data): Likewise.
9471 (read_run_data): Likewise.
9472 (read_run_list): Likewise.
9473 (read_mft): Likewise.
9475 * fs/ntfscomp.c: New file.
9477 * include/grub/ntfs.h: New file.
9479 2007-12-16 Robert Millan <rmh@aybabtu.com>
9481 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9482 IDE disk check, since Linux is known to support 20 IDE disks.
9483 Reported by Colin Watson.
9485 2007-12-15 Bean <bean123ch@gmail.com>
9487 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9488 (lnxboot_img_SOURCES): New variable.
9489 (lnxboot_img_ASFLAGS): Likewise.
9490 (lnxboot_img_LDFLAGS): Likewise.
9492 * boot/i386/pc/lnxboot.S: New file.
9494 2007-11-24 Pavel Roskin <proski@gnu.org>
9496 * configure.ac: Test if '--build-id=none' is supported by the
9497 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9498 objcopy to generate incorrect binary files (binutils
9499 2.17.50.0.18-1 as shipped by Fedora 8).
9500 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9501 linking, so that build ID doesn't break the test.
9503 2007-11-24 Pavel Roskin <proski@gnu.org>
9505 * include/grub/i386/time.h: use "void" in the argument list
9507 * include/grub/powerpc/time.h: Likewise.
9508 * include/grub/sparc64/time.h: Likewise.
9510 2007-11-18 Christian Franke <franke@computer.org>
9512 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9513 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9514 This fixes the problem that function keys did not work in grub-emu.
9516 2007-11-18 Christian Franke <franke@computer.org>
9518 * disk/host.c (grub_host_open): Remove attribute unused from
9519 name parameter. Add check for "host". This fixes the problem
9520 that grub-emu does not find partitions.
9522 2007-11-18 Christian Franke <franke@computer.org>
9524 * util/hostfs.c (is_dir): New function.
9525 (grub_hostfs_dir): Handle missing dirent.d_type case.
9526 (grub_hostfs_read): Add missing fseek().
9527 (grub_hostfs_label): Clear label pointer. This fixes a crash
9528 of grub-emu on "ls (host)".
9530 2007-11-18 Christian Franke <franke@computer.org>
9532 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9533 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9534 to 64 bit boundary by default.
9536 2007-11-18 Bean <bean123ch@gmail.com>
9538 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9539 (hexdump_mod_SOURCES): New variable.
9540 (hexdump_mod_CFLAGS): Likewise.
9541 (hexdump_mod_LDFLAGS): Likewise.
9543 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9545 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9547 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9549 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9551 * include/grub/hexdump.h: New file.
9553 * commands/hexdump.c: New file.
9555 2007-11-10 Robert Millan <rmh@aybabtu.com>
9557 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9558 in grub_outb() calls.
9559 (beep_on): Likewise.
9561 2007-11-10 Christian Franke <franke@computer.org>
9563 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9564 (grub_menu_run): Likewise.
9566 2007-11-10 Robert Millan <rmh@aybabtu.com>
9568 * include/grub/i386/efi/machine.h: New file.
9569 * include/grub/i386/linuxbios/machine.h: Likewise.
9570 * include/grub/i386/pc/machine.h: Likewise.
9571 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9572 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9574 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9575 (serial_hw_io_addr): New variable.
9576 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9577 instead of `(unsigned short *) 0x400'.
9579 2007-11-10 Bean <bean123ch@gmail.com>
9581 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9583 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9585 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9586 (vga_mod_SOURCES): Added.
9587 (vga_mod_CFLAGS): Likewise.
9588 (vga_mod_LDFLAGS): Likewise.
9590 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9592 (set_map_mask): Likewise.
9593 (set_read_map): Likewise.
9594 (set_read_address): Likewise.
9595 (vga_font): Removed variable.
9596 (get_vga_glyph): Removed function.
9597 (invalidate_char): Likewise.
9598 (write_char): Changed to use grub_font_get_glyph() for font
9600 (grub_vga_putchar): Likewise.
9601 (grub_vga_getcharwidth): Likewise.
9603 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9605 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9607 (pxeboot_img_LDFLAGS): Likewise.
9608 (diskboot_img_LDFLAGS): Likewise.
9609 (kernel_img_LDFLAGS): Likewise.
9611 2007-11-06 Robert Millan <rmh@aybabtu.com>
9613 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9614 in grub_outb() calls.
9615 (serial_hw_init): Likewise.
9617 2007-11-05 Robert Millan <rmh@aybabtu.com>
9619 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9620 spaces. Skip non-regular files.
9622 2007-11-05 Robert Millan <rmh@aybabtu.com>
9624 * kern/disk.c (grub_disk_firmware_fini)
9625 (grub_disk_firmware_is_tainted): New variables.
9627 * include/grub/disk.h (grub_disk_firmware_fini)
9628 (grub_disk_firmware_is_tainted): Likewise.
9630 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9631 (grub_disk_biosdisk_fini): ... to here.
9632 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9633 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9634 is set. Register grub_disk_biosdisk_fini() in
9635 `grub_disk_firmware_fini'.
9637 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9638 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9639 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9640 to finish existing firmware disk interface.
9642 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9643 (ata_mod_SOURCES): New variable.
9644 (ata_mod_CFLAGS): Likewise.
9645 (ata_mod_LDFLAGS): Likewise.
9647 2007-11-05 Robert Millan <rmh@aybabtu.com>
9649 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9650 (grub_ata_wait): Reimplement using grub_millisleep().
9652 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9653 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9655 2007-11-03 Marco Gerards <marco@gnu.org>
9657 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9658 (CRTC_ADDR_PORT): New macro.
9659 (CRTC_DATA_PORT): Likewise.
9660 (CRTC_CURSOR): Likewise.
9661 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9662 (CRTC_CURSOR_ADDR_LOW): Likewise.
9663 (update_cursor): New function.
9664 (grub_console_real_putchar): Call `update_cursor'.
9665 (grub_console_gotoxy): Likewise.
9666 (grub_console_cls): Set the default color when clearing the
9668 (grub_console_setcursor): Implemented.
9670 2007-11-03 Marco Gerards <marco@gnu.org>
9672 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9674 (grub_ata_pio_write): Likewise.
9676 (grub_atapi_identify): Wait after issuing an ATA command.
9677 (grub_atapi_packet): Likewise.
9678 (grub_ata_identify): Likewise.
9679 (grub_ata_readwrite): Likewise.
9681 2007-11-03 Marco Gerards <marco@gnu.org>
9683 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9684 (grub_ata_pio_write): Likewise.
9685 (grub_ata_readwrite): Use `grub_error', instead of
9686 returning `grub_errno'.
9688 2007-11-03 Marco Gerards <marco@gnu.org>
9690 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9691 grub_ata_pio_write once for every single sector, instead of for
9694 2007-10-31 Robert Millan <rmh@aybabtu.com>
9696 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9698 * conf/i386-linuxbios.rmk: New file.
9700 * kern/i386/pc/hardware.c: Likewise.
9701 * term/i386/pc/at_keyboard.c: Likewise.
9702 * term/i386/pc/vga_text.c: Likewise.
9704 * include/grub/i386/linuxbios/boot.h: Likewise.
9705 * include/grub/i386/linuxbios/console.h: Likewise.
9706 * include/grub/i386/linuxbios/init.h: Likewise.
9707 * include/grub/i386/linuxbios/kernel.h: Likewise.
9708 * include/grub/i386/linuxbios/loader.h: Likewise.
9709 * include/grub/i386/linuxbios/memory.h: Likewise.
9710 * include/grub/i386/linuxbios/serial.h: Likewise.
9711 * include/grub/i386/linuxbios/time.h: Likewise.
9713 * kern/i386/linuxbios/init.c: Likewise.
9714 * kern/i386/linuxbios/startup.S: Likewise.
9715 * kern/i386/linuxbios/table.c: Likewise.
9717 2007-10-31 Marco Gerards <marco@gnu.org>
9719 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9720 (ata_mod_SOURCES): New variable.
9721 (ata_mod_CFLAGS): Likewise.
9722 (ata_mod_LDFLAGS): Likewise.
9724 * disk/ata.c: New file.
9726 * include/grub/disk.h (grub_disk_dev_id): Add
9727 `GRUB_DISK_DEV_ATA_ID'.
9729 2007-10-31 Robert Millan <rmh@aybabtu.com>
9731 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9732 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9734 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9735 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9737 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9740 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9742 2007-10-27 Robert Millan <rmh@aybabtu.com>
9744 * include/grub/types.h (ULONG_MAX): Define macro.
9746 2007-10-22 Robert Millan <rmh@aybabtu.com>
9748 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9750 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9752 2007-10-22 Robert Millan <rmh@aybabtu.com>
9754 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9755 (pkgdata_MODULES): Add `biosdisk.mod'.
9756 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9759 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9760 (grub_biosdisk_init): Replace with ...
9761 (GRUB_MOD_INIT(biosdisk)): ... this.
9762 (grub_biosdisk_fini): Replace with ...
9763 (GRUB_MOD_FINI(biosdisk)): ... this.
9765 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9766 (grub_machine_init): Remove call to grub_biosdisk_init().
9767 (grub_machine_fini): Remove call to grub_machine_fini().
9769 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9771 2007-10-22 Robert Millan <rmh@aybabtu.com>
9773 * include/grub/time.h: New file.
9774 * include/grub/i386/time.h: Likewise.
9775 * include/grub/powerpc/time.h: Likewise.
9776 * include/grub/sparc64/time.h: Likewise.
9778 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9780 (KERNEL_MACHINE_TIME_HEADER): ... this.
9781 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9783 (KERNEL_MACHINE_TIME_HEADER): ... this.
9784 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9786 (KERNEL_MACHINE_TIME_HEADER): ... this.
9788 * kern/i386/efi/init.c: Include `<grub/time.h>'.
9789 (grub_millisleep): New function.
9790 * kern/i386/pc/init.c: Include `<grub/time.h>'.
9791 (grub_millisleep): New function.
9792 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9793 Remove `grub/machine/time.h' include.
9794 (grub_millisleep): New function.
9795 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9796 Remove `grub/machine/time.h' include.
9797 (grub_millisleep): New function.
9799 * include/grub/misc.h (grub_div_roundup): New function.
9801 * kern/misc.c: Include `<grub/time.h>'.
9802 (grub_millisleep_generic): New function.
9804 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9806 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9808 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9809 `machine/time.h'. Add `time.h'.
9810 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9812 2007-10-21 Robert Millan <rmh@aybabtu.com>
9814 * include/grub/misc.h (grub_max): New function.
9816 2007-10-21 Robert Millan <rmh@aybabtu.com>
9818 * util/misc.c (grub_util_info): Call fflush() before returning.
9820 2007-10-20 Robert Millan <rmh@aybabtu.com>
9822 * genmk.rb (Image): Copy `extra_flags' from here ...
9823 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
9825 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9826 to `argc' and `args' arguments.
9828 2007-10-17 Robert Millan <rmh@aybabtu.com>
9830 * kern/i386/loader.S: New file.
9832 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9833 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9834 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9835 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9836 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9837 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9838 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9839 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9840 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9841 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9842 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9843 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9844 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9845 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9847 * kern/i386/realmode.S: New file.
9849 * kern/i386/pc/startup.S (protstack): Moved from here ...
9850 * kern/i386/realmode.S (protstack)... to here.
9851 * kern/i386/pc/startup.S (gdt): Moved from here ...
9852 * kern/i386/realmode.S (gdt)... to here.
9853 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9854 * kern/i386/realmode.S (prot_to_real)... to here.
9856 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9857 `kern/i386/realmode.S'.
9859 2007-10-17 Robert Millan <rmh@aybabtu.com>
9861 * include/grub/i386/loader.h: New file.
9863 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9864 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9865 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9866 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9867 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9868 * include/grub/i386/loader.h (grub_linux_prot_size)
9869 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9870 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9871 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9872 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9874 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9876 2007-10-15 Robert Millan <rmh@aybabtu.com>
9878 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9879 filesystem when dev->disk is unset.
9880 Do probe for filesystem even when dev->disk->has_partitions is set.
9881 In case a filesystem is found, always report it.
9882 In case it isn't, if dev->disk->has_partitions is set, report that
9883 a partition table was found instead of reporting that no filesystem
9884 could be identified.
9886 2007-10-12 Robert Millan <rmh@aybabtu.com>
9888 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9889 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9891 * include/grub/types.h (grub_host_to_target16): New macro.
9892 (grub_host_to_target32): Likewise.
9893 (grub_host_to_target64): Likewise.
9894 (grub_target_to_host16): Likewise.
9895 (grub_target_to_host32): Likewise.
9896 (grub_target_to_host64): Likewise.
9898 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9900 (GRUB_MOD_ALIGN): ...this. Update all users.
9902 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9903 grub_host_to_target32.
9904 Replace grub_be_to_cpu32 with grub_target_to_host32.
9905 (load_modules): Likewise.
9906 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9907 Replace grub_be_to_cpu32 with grub_target_to_host32.
9908 Replace grub_cpu_to_be16 with grub_host_to_target16.
9909 Replace grub_cpu_to_be32 grub_host_to_target32.
9911 2007-10-12 Robert Millan <rmh@aybabtu.com>
9913 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9914 * util/elf/grub-mkimage.c: ... here.
9916 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9917 `util/powerpc/ieee1275/grub-mkimage.c'.
9919 2007-10-07 Robert Millan <rmh@aybabtu.com>
9921 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9922 and make it easier to figure out.
9923 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9924 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9925 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9926 leave us with less than HEAP_MIN_SIZE total heap.
9927 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9929 2007-10-03 Robert Millan <rmh@aybabtu.com>
9931 * include/grub/i386/io.h: New file.
9932 * commands/i386/pc/play.c (inb): Removed.
9934 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9936 * term/i386/pc/serial.c (inb): Removed.
9938 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9940 * term/i386/pc/vga.c (inb): Removed.
9942 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9945 2007-10-02 Robert Millan <rmh@aybabtu.com>
9947 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9948 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9949 Reported by Marcin Kurek.
9951 2007-09-07 Robert Millan <rmh@aybabtu.com>
9953 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9954 SmartFirmware version updates (as released by Sven Luther), and avoid
9955 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9956 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9959 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9962 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9963 when merging two regions.
9965 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9967 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9968 * normal/completion.c (grub_normal_do_completion): Likewise.
9969 Reported by Hitoshi Ozeki.
9971 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9973 Do not use devices at boot in chainloading.
9975 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9976 (boot_part_addr): Likewise.
9977 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9978 with BOOT_DRIVE and BOOT_PART_ADDR.
9979 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9980 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9982 2007-08-29 Robert Millan <rmh@aybabtu.com>
9984 Patch from Simon Peter <dn.tlp@gmx.net>:
9985 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9986 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9987 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9988 util/i386/pc/grub-setup.c_DEPENDENCIES.
9989 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9990 util/grub-probe.c_DEPENDENCIES.
9991 * conf/powerpc-ieee1275.rmk: Likewise.
9993 2007-08-28 Robert Millan <rmh@aybabtu.com>
9995 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9996 to tell grub-mkdevicemap how to name devices.
9997 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10000 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10001 util/i386/get_disk_name.c.
10002 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10003 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10004 util/ieee1275/get_disk_name.c.
10006 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10008 * DISTLIST: Add util/i386/get_disk_name.c and
10009 util/ieee1275/get_disk_name.c.
10011 * util/grub-mkdevicemap.c: Replace device naming logic with
10012 grub_util_get_disk_name() calls.
10014 2007-08-20 Robert Millan <rmh@aybabtu.com>
10016 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10017 (so that it works for both plural and singular quantities).
10019 2007-08-05 Robert Millan <rmh@aybabtu.com>
10021 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10022 so that [xz] isn't taken into account when determining order.
10024 2007-08-02 Marco Gerards <marco@gnu.org>
10026 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10027 `include/multiboot2.h', `include/grub/elfload.h',
10028 `include/multiboot.h', `include/grub/multiboot.h',
10029 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10030 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10031 `kern/elf.c', `loader/multiboot_loader.c',
10032 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10033 `loader/i386/pc/multiboot2.c',
10034 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10035 `util/i386/pc/grub-mkrescue.in'. Remove
10036 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10037 `include/grub/i386/pc/util/biosdisk.h' and
10038 `include/grub/powerpc/ieee1275/multiboot.h'.
10040 2007-08-02 Bean <bean123ch@gmail.com>
10042 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10043 (ntfs_mod_SOURCES): New variable.
10044 (ntfs_mod_CFLAGS): Likewise.
10045 (ntfs_mod_LDFLAGS): Likewise.
10047 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10048 (grub_probe_SOURCES): Likewise.
10049 (grub_emu_SOURCES): Likewise.
10051 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10052 (grub_emu_SOURCES): Likewise.
10054 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10055 (grub_emu_SOURCES): Likewise.
10057 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10059 * fs/ntfs.c: New file.
10061 2007-08-02 Bean <bean123ch@gmail.com>
10063 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10065 * file.h (grub_file): Likewise.
10067 * fshelp.h (grub_fshelp_read_file): Likewise.
10069 * util/i386/pc/grub-setup.c (setup): Likewise.
10070 (save_first_sector): Likewise.
10071 (save_blocklists): Likewise.
10073 * fs/affs.c (grub_affs_read_file): Likewise.
10075 * fs/ext2.c (grub_ext2_read_file): Likewise.
10077 * fs/fat.c (grub_fat_read_data): Likewise.
10079 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10081 * fs/hfs.c (grub_hfs_read_file): Likewise.
10083 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10085 * fs/jfs.c (grub_jfs_read_file): Likewise.
10087 * fs/minix.c (grub_minix_read_file): Likewise.
10089 * fs/sfs.c (grub_sfs_read_file): Likewise.
10091 * fs/ufs.c (grub_ufs_read_file): Likewise.
10093 * fs/xfs.c (grub_xfs_read_file): Likewise.
10095 * command/blocklist.c (read_blocklist): Likewise.
10096 (print_blocklist): Likewise.
10098 2007-08-02 Marco Gerards <marco@gnu.org>
10100 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10103 * disk/host.c: New file.
10105 * util/hostfs.c: Likewise.
10107 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10108 return `GRUB_ERR_BAD_FS'.
10109 * fs/sfs.c (grub_sfs_mount): Likewise.
10110 * fs/xfs.c (grub_xfs_mount): Likewise.
10112 * include/grub/disk.h (enum grub_disk_dev_id): Add
10113 `GRUB_DISK_DEVICE_HOST_ID'.
10115 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10117 2007-07-24 Jerone Young <jerone@gmail.com>
10119 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10120 modules for compilation.
10121 * conf/powerpc-ieee1275.rmk: Likewise.
10123 * include/multiboot.h: Move multiboot definitions to one file. Rename
10124 many definitions to not get grub specific.
10125 * include/multiboot2.h: Create header with multiboot 2 definitions.
10126 * include/grub/multiboot.h: Header for grub specific function
10127 prototypes and definitions.
10128 * include/grub/multiboot2.h: Likewise.
10129 * include/grub/multiboot_loader.h: Likewise.
10130 * include/grub/i386/pc/multiboot.h: Removed.
10131 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10133 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10134 and 2 to allow for one multiboot and module commands.
10135 * loader/multiboot2.c: Add multiboot2 functionality.
10136 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10137 and definition names.
10138 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10140 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10141 ieee1275 specific multiboot2 code.
10143 * kern/i386/pc/startup.S: Change headers and definition names for
10144 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10146 2007-07-22 Robert Millan <rmh@aybabtu.com>
10148 * geninitheader.sh: Process file specified in first parameter rather
10149 than hardcoding grub_modules_init.lst.
10150 * geninit.sh: Likewise. Also, construct header name dynamically rather
10151 than hardcoding grub_modules_init.h.
10153 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10154 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10155 grub_probe_init.[ch] and grub_setup_init.[ch].
10157 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10158 grub_modules_init.h with grub_emu_init.h.
10159 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10160 grub_probe_init.[ch] files.
10161 * conf/i386-efi.rmk: Likewise.
10162 * conf/i386-pc.rmk: Likewise.
10163 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10164 grub_setup_init.[ch] files.
10166 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10167 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10168 to initialize modules rather than a list of hardcoded functions.
10169 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10170 grub_init_all() to initialize modules rather than a list of hardcoded
10173 2007-07-22 Robert Millan <rmh@aybabtu.com>
10175 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10176 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10178 2007-07-22 Robert Millan <rmh@aybabtu.com>
10180 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10181 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10182 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10183 flag when running on SmartFirmware.
10184 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10185 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10188 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10189 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10190 rather than decreasing it.
10192 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10193 there's not enough space to do it, fail in the same way as when it
10194 can't be done because there are no partitions.
10196 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10197 when nvsetenv failed.
10199 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10201 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10202 because this rule is automatically generated.
10203 (grub-mkrescue): Removed for the same reason as above.
10205 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10207 Migrate to GNU General Public License Version 3.
10209 * COPYING: Replaced with the plain text version of GPLv3.
10211 * config.guess: Updated from gnulib.
10212 * config.sub: Likewise.
10214 * geninit.sh: Output a GPLv3 copyright notice.
10215 * geninitheader.sh: Likewise.
10216 * genmodsrc.sh: Likewise.
10217 * gensymlist.sh.in: Likewise.
10219 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10220 * boot/i386/pc/diskboot.S: Likewise.
10221 * boot/i386/pc/pxeboot.S: Likewise.
10222 * commands/blocklist.c: Likewise.
10223 * commands/boot.c: Likewise.
10224 * commands/cat.c: Likewise.
10225 * commands/cmp.c: Likewise.
10226 * commands/configfile.c: Likewise.
10227 * commands/echo.c: Likewise.
10228 * commands/help.c: Likewise.
10229 * commands/ls.c: Likewise.
10230 * commands/search.c: Likewise.
10231 * commands/terminal.c: Likewise.
10232 * commands/test.c: Likewise.
10233 * commands/videotest.c: Likewise.
10234 * commands/i386/cpuid.c: Likewise.
10235 * commands/i386/pc/halt.c: Likewise.
10236 * commands/i386/pc/play.c: Likewise.
10237 * commands/i386/pc/reboot.c: Likewise.
10238 * commands/i386/pc/vbeinfo.c: Likewise.
10239 * commands/i386/pc/vbetest.c: Likewise.
10240 * commands/ieee1275/halt.c: Likewise.
10241 * commands/ieee1275/reboot.c: Likewise.
10242 * commands/ieee1275/suspend.c: Likewise.
10243 * disk/loopback.c: Likewise.
10244 * disk/lvm.c: Likewise.
10245 * disk/raid.c: Likewise.
10246 * disk/efi/efidisk.c: Likewise.
10247 * disk/i386/pc/biosdisk.c: Likewise.
10248 * disk/ieee1275/ofdisk.c: Likewise.
10249 * font/manager.c: Likewise.
10250 * fs/affs.c: Likewise.
10251 * fs/ext2.c: Likewise.
10252 * fs/fat.c: Likewise.
10253 * fs/fshelp.c: Likewise.
10254 * fs/hfs.c: Likewise.
10255 * fs/hfsplus.c: Likewise.
10256 * fs/iso9660.c: Likewise.
10257 * fs/jfs.c: Likewise.
10258 * fs/minix.c: Likewise.
10259 * fs/sfs.c: Likewise.
10260 * fs/ufs.c: Likewise.
10261 * fs/xfs.c: Likewise.
10262 * hello/hello.c: Likewise.
10263 * include/grub/acorn_filecore.h: Likewise.
10264 * include/grub/arg.h: Likewise.
10265 * include/grub/bitmap.h: Likewise.
10266 * include/grub/boot.h: Likewise.
10267 * include/grub/cache.h: Likewise.
10268 * include/grub/device.h: Likewise.
10269 * include/grub/disk.h: Likewise.
10270 * include/grub/dl.h: Likewise.
10271 * include/grub/elfload.h: Likewise.
10272 * include/grub/env.h: Likewise.
10273 * include/grub/err.h: Likewise.
10274 * include/grub/file.h: Likewise.
10275 * include/grub/font.h: Likewise.
10276 * include/grub/fs.h: Likewise.
10277 * include/grub/fshelp.h: Likewise.
10278 * include/grub/gzio.h: Likewise.
10279 * include/grub/hfs.h: Likewise.
10280 * include/grub/kernel.h: Likewise.
10281 * include/grub/loader.h: Likewise.
10282 * include/grub/lvm.h: Likewise.
10283 * include/grub/misc.h: Likewise.
10284 * include/grub/mm.h: Likewise.
10285 * include/grub/net.h: Likewise.
10286 * include/grub/normal.h: Likewise.
10287 * include/grub/parser.h: Likewise.
10288 * include/grub/partition.h: Likewise.
10289 * include/grub/pc_partition.h: Likewise.
10290 * include/grub/raid.h: Likewise.
10291 * include/grub/rescue.h: Likewise.
10292 * include/grub/script.h: Likewise.
10293 * include/grub/setjmp.h: Likewise.
10294 * include/grub/symbol.h: Likewise.
10295 * include/grub/term.h: Likewise.
10296 * include/grub/terminfo.h: Likewise.
10297 * include/grub/tparm.h: Likewise.
10298 * include/grub/types.h: Likewise.
10299 * include/grub/video.h: Likewise.
10300 * include/grub/efi/api.h: Likewise.
10301 * include/grub/efi/chainloader.h: Likewise.
10302 * include/grub/efi/console.h: Likewise.
10303 * include/grub/efi/console_control.h: Likewise.
10304 * include/grub/efi/disk.h: Likewise.
10305 * include/grub/efi/efi.h: Likewise.
10306 * include/grub/efi/pe32.h: Likewise.
10307 * include/grub/efi/time.h: Likewise.
10308 * include/grub/i386/linux.h: Likewise.
10309 * include/grub/i386/setjmp.h: Likewise.
10310 * include/grub/i386/types.h: Likewise.
10311 * include/grub/i386/efi/kernel.h: Likewise.
10312 * include/grub/i386/efi/loader.h: Likewise.
10313 * include/grub/i386/efi/time.h: Likewise.
10314 * include/grub/i386/pc/biosdisk.h: Likewise.
10315 * include/grub/i386/pc/boot.h: Likewise.
10316 * include/grub/i386/pc/chainloader.h: Likewise.
10317 * include/grub/i386/pc/console.h: Likewise.
10318 * include/grub/i386/pc/init.h: Likewise.
10319 * include/grub/i386/pc/kernel.h: Likewise.
10320 * include/grub/i386/pc/loader.h: Likewise.
10321 * include/grub/i386/pc/memory.h: Likewise.
10322 * include/grub/i386/pc/multiboot.h: Likewise.
10323 * include/grub/i386/pc/serial.h: Likewise.
10324 * include/grub/i386/pc/time.h: Likewise.
10325 * include/grub/i386/pc/vbe.h: Likewise.
10326 * include/grub/i386/pc/vbeblit.h: Likewise.
10327 * include/grub/i386/pc/vbefill.h: Likewise.
10328 * include/grub/i386/pc/vbeutil.h: Likewise.
10329 * include/grub/i386/pc/vga.h: Likewise.
10330 * include/grub/ieee1275/ieee1275.h: Likewise.
10331 * include/grub/ieee1275/ofdisk.h: Likewise.
10332 * include/grub/powerpc/libgcc.h: Likewise.
10333 * include/grub/powerpc/setjmp.h: Likewise.
10334 * include/grub/powerpc/types.h: Likewise.
10335 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10336 * include/grub/powerpc/ieee1275/console.h: Likewise.
10337 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10338 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10339 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10340 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10341 * include/grub/powerpc/ieee1275/time.h: Likewise.
10342 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10343 * include/grub/sparc64/libgcc.h: Likewise.
10344 * include/grub/sparc64/setjmp.h: Likewise.
10345 * include/grub/sparc64/types.h: Likewise.
10346 * include/grub/sparc64/ieee1275/console.h: Likewise.
10347 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10348 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10349 * include/grub/sparc64/ieee1275/time.h: Likewise.
10350 * include/grub/util/biosdisk.h: Likewise.
10351 * include/grub/util/getroot.h: Likewise.
10352 * include/grub/util/lvm.h: Likewise.
10353 * include/grub/util/misc.h: Likewise.
10354 * include/grub/util/raid.h: Likewise.
10355 * include/grub/util/resolve.h: Likewise.
10356 * io/gzio.c: Likewise.
10357 * kern/device.c: Likewise.
10358 * kern/disk.c: Likewise.
10359 * kern/dl.c: Likewise.
10360 * kern/elf.c: Likewise.
10361 * kern/env.c: Likewise.
10362 * kern/err.c: Likewise.
10363 * kern/file.c: Likewise.
10364 * kern/fs.c: Likewise.
10365 * kern/loader.c: Likewise.
10366 * kern/main.c: Likewise.
10367 * kern/misc.c: Likewise.
10368 * kern/mm.c: Likewise.
10369 * kern/parser.c: Likewise.
10370 * kern/partition.c: Likewise.
10371 * kern/rescue.c: Likewise.
10372 * kern/term.c: Likewise.
10373 * kern/efi/efi.c: Likewise.
10374 * kern/efi/init.c: Likewise.
10375 * kern/efi/mm.c: Likewise.
10376 * kern/i386/dl.c: Likewise.
10377 * kern/i386/efi/init.c: Likewise.
10378 * kern/i386/efi/startup.S: Likewise.
10379 * kern/i386/pc/init.c: Likewise.
10380 * kern/i386/pc/lzo1x.S: Likewise.
10381 * kern/i386/pc/startup.S: Likewise.
10382 * kern/ieee1275/ieee1275.c: Likewise.
10383 * kern/powerpc/cache.S: Likewise.
10384 * kern/powerpc/dl.c: Likewise.
10385 * kern/powerpc/ieee1275/cmain.c: Likewise.
10386 * kern/powerpc/ieee1275/crt0.S: Likewise.
10387 * kern/powerpc/ieee1275/init.c: Likewise.
10388 * kern/powerpc/ieee1275/openfw.c: Likewise.
10389 * kern/sparc64/cache.S: Likewise.
10390 * kern/sparc64/dl.c: Likewise.
10391 * kern/sparc64/ieee1275/init.c: Likewise.
10392 * kern/sparc64/ieee1275/openfw.c: Likewise.
10393 * loader/efi/chainloader.c: Likewise.
10394 * loader/efi/chainloader_normal.c: Likewise.
10395 * loader/i386/efi/linux.c: Likewise.
10396 * loader/i386/efi/linux_normal.c: Likewise.
10397 * loader/i386/pc/chainloader.c: Likewise.
10398 * loader/i386/pc/chainloader_normal.c: Likewise.
10399 * loader/i386/pc/linux.c: Likewise.
10400 * loader/i386/pc/linux_normal.c: Likewise.
10401 * loader/i386/pc/multiboot.c: Likewise.
10402 * loader/i386/pc/multiboot_normal.c: Likewise.
10403 * loader/powerpc/ieee1275/linux.c: Likewise.
10404 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10405 * normal/arg.c: Likewise.
10406 * normal/cmdline.c: Likewise.
10407 * normal/command.c: Likewise.
10408 * normal/completion.c: Likewise.
10409 * normal/execute.c: Likewise.
10410 * normal/function.c: Likewise.
10411 * normal/lexer.c: Likewise.
10412 * normal/main.c: Likewise.
10413 * normal/menu.c: Likewise.
10414 * normal/menu_entry.c: Likewise.
10415 * normal/misc.c: Likewise.
10416 * normal/parser.y: Likewise.
10417 * normal/script.c: Likewise.
10418 * normal/i386/setjmp.S: Likewise.
10419 * normal/powerpc/setjmp.S: Likewise.
10420 * normal/sparc64/setjmp.S: Likewise.
10421 * partmap/acorn.c: Likewise.
10422 * partmap/amiga.c: Likewise.
10423 * partmap/apple.c: Likewise.
10424 * partmap/gpt.c: Likewise.
10425 * partmap/pc.c: Likewise.
10426 * partmap/sun.c: Likewise.
10427 * term/gfxterm.c: Likewise.
10428 * term/terminfo.c: Likewise.
10429 * term/efi/console.c: Likewise.
10430 * term/i386/pc/console.c: Likewise.
10431 * term/i386/pc/serial.c: Likewise.
10432 * term/i386/pc/vesafb.c: Likewise.
10433 * term/i386/pc/vga.c: Likewise.
10434 * term/ieee1275/ofconsole.c: Likewise.
10435 * util/biosdisk.c: Likewise.
10436 * util/console.c: Likewise.
10437 * util/genmoddep.c: Likewise.
10438 * util/getroot.c: Likewise.
10439 * util/grub-emu.c: Likewise.
10440 * util/grub-mkdevicemap.c: Likewise.
10441 * util/grub-probe.c: Likewise.
10442 * util/lvm.c: Likewise.
10443 * util/misc.c: Likewise.
10444 * util/raid.c: Likewise.
10445 * util/resolve.c: Likewise.
10446 * util/update-grub.in: Likewise.
10447 * util/update-grub_lib.in: Likewise.
10448 * util/grub.d/00_header.in: Likewise.
10449 * util/grub.d/10_hurd.in: Likewise.
10450 * util/grub.d/10_linux.in: Likewise.
10451 * util/i386/efi/grub-install.in: Likewise.
10452 * util/i386/efi/grub-mkimage.c: Likewise.
10453 * util/i386/pc/grub-install.in: Likewise.
10454 * util/i386/pc/grub-mkimage.c: Likewise.
10455 * util/i386/pc/grub-mkrescue.in: Likewise.
10456 * util/i386/pc/grub-setup.c: Likewise.
10457 * util/i386/pc/misc.c: Likewise.
10458 * util/powerpc/ieee1275/grub-install.in: Likewise.
10459 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10460 * util/powerpc/ieee1275/misc.c: Likewise.
10461 * video/bitmap.c: Likewise.
10462 * video/video.c: Likewise.
10463 * video/i386/pc/vbe.c: Likewise.
10464 * video/i386/pc/vbeblit.c: Likewise.
10465 * video/i386/pc/vbefill.c: Likewise.
10466 * video/i386/pc/vbeutil.c: Likewise.
10467 * video/readers/tga.c: Likewise.
10469 2007-07-02 Robert Millan <rmh@aybabtu.com>
10471 * conf/i386-efi.rmk: Replace obsolete reference to
10472 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10473 with util/getroot.c.
10474 * conf/powerpc-ieee1275.rmk: Likewise.
10475 * conf/sparc64-ieee1275.rmk: Likewise.
10477 * util/grub-emu.c (main): Fix unchecked pointer handling.
10479 2007-07-02 Robert Millan <rmh@aybabtu.com>
10481 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10482 invocation to fail, in order to support partition-less media.
10484 * util/i386/pc/grub-install.in: Likewise.
10486 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10487 which fs or partmap modules are needed (akin to its sister scripts).
10489 Also use grub-probe to get rid of unportable /proc/mounts check.
10491 Print the same informational message that the other scripts do, before
10494 2007-06-23 Robert Millan <rmh@aybabtu.com>
10496 * util/update-grub_lib.in (font_path): New function. Determine whether
10497 a font file can be found and, if so, echo the GRUB path to it.
10499 * util/update-grub.in: Handle multiple terminals depending on user
10500 input, platform availability and font file presence. Propagate
10501 variables of our findings to /etc/grub.d/ children.
10503 * util/grub.d/00_header.in: Handle multiple terminals, based on
10504 environment setup by update-grub.
10506 2007-06-23 Robert Millan <rmh@aybabtu.com>
10508 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10510 2007-06-21 Robert Millan <rmh@aybabtu.com>
10512 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10513 indicate end of data section in kernel image.
10514 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10515 GRUB_KERNEL_MACHINE_DATA_END.
10517 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10519 * kern/i386/efi/startup.S: Likewise.
10521 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10522 during image generation. Implement --prefix option to override this
10524 * util/i386/efi/grub-mkimage.c: Likewise.
10526 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10527 code to make path relative to its root into a separate function.
10529 * util/i386/pc/grub-install.in: Use newly provided
10530 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10531 pass the result to grub-install --prefix.
10533 2007-06-13 Robert Millan <rmh@aybabtu.com>
10535 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10536 DEFAULT_DEVICE_MAP.
10537 * util/grub-emu.c: Use above definitions from misc.h instead of
10539 * util/grub-mkdevicemap.c: Likewise.
10540 * util/i386/pc/grub-setup.c: Likewise.
10541 * util/grub-probe.c: Likewise.
10542 (probe): Abort with grub_util_error() when either
10543 grub_guess_root_device or grub_util_get_grub_dev fails.
10545 2007-06-12 Robert Millan <rmh@aybabtu.com>
10547 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10548 "pager" assignment.
10549 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10551 * util/grub-probe.c (probe): Likewise for "drive_name".
10553 2007-06-11 Robert Millan <rmh@aybabtu.com>
10555 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10556 not just the cdrom one.
10558 2007-06-11 Robert Millan <rmh@aybabtu.com>
10560 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10561 Add --pkglibdir=DIR option to override pkglibdir.
10562 Mention --image-type=TYPE in help output.
10563 Fix --grub-mkimage (it was a no-op).
10564 Abort gracefully when no parameter is given.
10566 2007-06-11 Robert Millan <rmh@aybabtu.com>
10568 * util/i386/pc/grub-mkrescue.in: New file.
10569 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10570 * Makefile.in: Handle bin_SCRIPTS.
10572 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10574 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10575 list of video modes.
10577 2007-06-06 Robert Millan <rmh@aybabtu.com>
10579 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10580 file doesn't exist, or if it is in a filesystem grub can't read.
10582 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10583 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10584 header comment to fit in 80 columns when the variables are resolved.
10586 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10587 could be identified by update-grub. Remove redundant check for
10588 unifont.pff existence (since convert_system_path_to_grub_path now
10591 2007-06-04 Robert Millan <rmh@aybabtu.com>
10593 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10595 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10597 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10599 2007-06-04 Robert Millan <rmh@aybabtu.com>
10601 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10603 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10604 grub_apple_partition_map_fini.
10607 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10608 to access >2 TiB disks).
10610 Print disk->total_sectors with %llu instead of %lu, since this
10611 variable is always 64-bit (prevents wrong disk size from being displayed
10612 on either >2 TiB disk or big-endian CPU).
10614 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10615 into a generic case that supports all (sane) partition maps.
10617 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10620 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10621 and grub_apple_partition_map_fini() after that.
10623 2007-06-01 Robert Millan <rmh@aybabtu.com>
10625 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10627 * util/grub.d/00_header.in: Only enable gfxterm when
10628 convert_system_path_to_grub_path() succeeds.
10630 2007-05-20 Robert Millan <rmh@aybabtu.com>
10632 * util/update-grub_lib.in: New file.
10633 * DISTLIST: Add update-grub_lib.in.
10634 * conf/common.rmk: Generate update-grub_lib and install it in
10636 * Makefile.in: Add install routine for $(lib_DATA).
10638 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10639 function provided by update-grub_lib to support arbitrary paths of
10641 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10642 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10644 2007-05-19 Robert Millan <rmh@aybabtu.com>
10646 * commands/i386/cpuid.c: New module.
10647 * DISTLIST: Add it.
10648 * conf/i386-efi.rmk: Enable cpuid.mod.
10649 * conf/i386-pc.rmk: Likewise.
10651 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10653 * kern/disk.c (grub_disk_read): Check return value of
10656 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10658 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10660 * disk/raid.c (grub_raid_open): Likewise.
10662 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10664 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10665 stack instead of on the heap.
10667 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10668 before doing a read on it.
10670 * configure.ac: Only use -fno-stack-protector for the target
10673 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10675 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10676 __attribute_ ((unused)) to mode_type argument.
10678 * util/getroot.c (grub_guess_root_device): Fix #endif.
10680 * kern/misc.c (memcmp): Fix prototype.
10682 * include/grub/partition.h [GRUB_UTIL]
10683 (grub_gpt_partition_map_init): Add prototype.
10684 (grub_gpt_partition_map_fini): Likewise.
10686 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10687 at the right place.
10689 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10690 (grub_fat_read_data): Likewise.
10691 (grub_fat_find_dir): Likewise.
10693 * font/manager.c (find_glyph): Make table a const.
10694 (grub_font_get_glyph): Remove bitmap from if statement.
10696 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
10698 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10699 code, first search for device in /dev/mapper, then in /dev.
10700 (grub_util_get_grub_dev): New function.
10701 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10703 * util/grub-probe.c (probe): Remove check for RAID, call
10704 grub_util_get_grub_dev() instead of
10705 grub_util_biosdisk_get_grub_dev().
10706 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10707 grub_util_biosdisk_get_grub_dev().
10708 * util/i386/pc/grub-setup.c (main): Likewise.
10710 2007-05-16 Robert Millan <rmh@aybabtu.com>
10712 * DISTLIST: Update for the latest changes.
10713 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10714 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10715 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10716 grub/util/biosdisk.h.
10717 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10718 grub/util/biosdisk.h.
10720 2007-05-16 Robert Millan <rmh@aybabtu.com>
10722 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10724 2007-05-16 Robert Millan <rmh@aybabtu.com>
10726 * util/i386/efi/grub-install.in: New.
10727 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10728 newly added grub-install.
10729 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10731 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10732 grub/util/biosdisk.h.
10733 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10734 grub/util/biosdisk.h.
10736 2007-05-16 Robert Millan <rmh@aybabtu.com>
10738 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10739 * include/grub/util/biosdisk.h: ... here.
10740 * util/i386/pc/biosdisk.c: Moved to ...
10741 * util/biosdisk.c: ... here.
10742 * util/i386/pc/getroot.c: Moved to ...
10743 * util/getroot.c: ... here.
10744 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10745 * util/grub-mkdevicemap.c: ... here.
10746 * util/i386/pc/grub-probe.c: Moved to ...
10747 * util/grub-probe.c: ... here.
10749 2007-05-15 Robert Millan <rmh@aybabtu.com>
10751 * util/update-grub.in: Remove duplicated line in grub.cfg header
10754 2007-05-13 Robert Millan <rmh@aybabtu.com>
10756 * util/update-grub.in: Fix a few assumptions about the devices holding
10757 /, /boot and /boot/grub being the same.
10758 * util/grub.d/00_header.in: Likewise.
10759 * util/grub.d/10_hurd.in: Likewise.
10760 * util/grub.d/10_linux.in: Likewise.
10762 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10763 patterns. Use that to define the `.old' suffix as older than `'.
10765 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10767 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10768 the grub.cfg header message.
10770 2007-05-11 Robert Millan <rmh@aybabtu.com>
10772 * util/update-grub.in: Create device.map if it doesn't already exist,
10773 before attempting to run grub-probe.
10774 Check for grub-probe and grub-mkdevicemap with the same code
10775 grub-install is using.
10778 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
10780 * Makefile.in: Add the datarootdir autoconf variable.
10782 2007-05-09 Robert Millan <rmh@aybabtu.com>
10784 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10785 fail gracefully if dev->disk->partition == NULL.
10787 2007-05-07 Robert Millan <rmh@aybabtu.com>
10789 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10790 determine partition map module.
10791 * util/i386/pc/grub-install.in: Use this feature to decide which
10792 partition module to load, instead of hardcoding pc and gpt.
10794 2007-05-07 Robert Millan <rmh@aybabtu.com>
10796 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10797 source directory differs from build directory.
10799 2007-05-05 Robert Millan <rmh@aybabtu.com>
10801 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10804 2007-05-05 Robert Millan <rmh@aybabtu.com>
10806 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10808 2007-05-05 Robert Millan <rmh@aybabtu.com>
10810 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10811 command-line arguments via ${GRUB_CMDLINE_LINUX}.
10813 2007-05-05 Robert Millan <rmh@aybabtu.com>
10815 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10816 (grub_probe_SOURCES): Likewise.
10817 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10818 GPT and initialize dos_part and bsd_part accordingly.
10819 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10821 (main): Activate gpt module for use during partition identification,
10822 and deactivate it afterwards.
10823 * util/i386/pc/grub-install.in: Add gpt module to core.img.
10824 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10825 partition identification, and deactivate it afterwards.
10827 2007-05-05 Robert Millan <rmh@aybabtu.com>
10829 * term/i386/pc/console.c (grub_console_fini): Call
10830 grub_term_set_current() before grub_term_unregister().
10832 2007-05-04 Robert Millan <rmh@aybabtu.com>
10834 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10835 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10836 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10837 and update-grub_DATA.
10838 * conf/common.rmk: Build and install update-grub components.
10839 * conf/common.mk: Regenerate.
10840 * util/update-grub.in: New. Core of update-grub.
10841 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10842 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10843 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10844 * util/grub.d/README: New. Document grub.d directory layout.
10846 2007-05-01 Robert Millan <rmh@aybabtu.com>
10848 * util/grub-emu.c: Move initialization functions
10849 grub_util_biosdisk_init() and grub_init_all() before
10850 grub_util_biosdisk_get_grub_dev(), which relies on them.
10852 2007-04-19 Robert Millan <rmh@aybabtu.com>
10854 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10857 2007-04-18 Jerone Young <jerone@gmail.com>
10859 * kernel/elf.c: Add missing parenthesis for conditional statement
10862 2007-04-10 Jerone Young <jerone@gmail.com>
10864 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10865 continue on and look for device node with real device name.
10867 2007-04-10 Jerone Young <jerone@gmail.com>
10869 * configure.ac: Add argument for autoconf to use transformation
10871 * Makefile.in: Add autoconf package transformation code.
10872 * util/i386/pc/grub-install.in: Likewise.
10873 * util/powerpc/ieee1275/grub-install.in: Likewise.
10875 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10877 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10878 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10879 (EXT2_REVISION): Likewise.
10880 (EXT2_INODE_SIZE): Likewise.
10881 (struct grub_ext2_block_group): Added a missing member
10883 (grub_ext2_read_inode): Divide by the inode size in a superblock
10884 instead of 128 to obtain INODES_PER_BLOCK.
10885 Use the macro EXT2_INODE_SIZE instead of directly using
10886 SBLOCK->INODE_SIZE.
10888 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10890 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10891 superblock instead of the structure size to compute an
10892 offset. This fixes the problem that GRUB could not read a
10893 filesystem when inode size is different from 128-byte.
10895 2007-03-05 Marco Gerards <marco@gnu.org>
10897 * normal/main.c (read_config_file): When "menu" is not set, create
10898 an initial context.
10900 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10902 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10903 (HEAP_LIMIT): New macro.
10904 (grub_claim_heap): Claim memory up to `heaplimit'.
10906 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10908 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10909 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10910 (_start): Likewise.
10911 (grub_arch_modules_addr): Return address after `_end'.
10912 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10913 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10914 (add_segments): Calculate `_end' from phdr size and location.
10915 (ALIGN_UP): Moved to ...
10916 * include/grub/misc.h: here.
10917 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10919 (GRUB_IEEE1275_MODULE_BASE): Removed.
10921 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10923 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10926 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10928 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10930 (grub_elf64_load_hook_t): Likewise.
10931 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10934 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10936 * kern/mm.c: Update copyright.
10937 (grub_mm_debug): Correct syntax error.
10938 (grub_mm_dump_free): New function.
10939 (grub_debug_free): Call `grub_free'.
10940 * include/grub/mm.h: Update copyright.
10941 (grub_mm_dump_free): Add declaration.
10943 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10945 * include/grub/ieee1275/ieee1275.h: Update copyright.
10946 * kern/powerpc/ieee1275/init.c: Likewise.
10947 * kern/powerpc/ieee1275/openfw.c: Likewise.
10949 * loader/powerpc/ieee1275/linux.c: Likewise.
10950 * include/grub/elfload.h: Likewise.
10951 * kern/elf.c: Likewise.
10952 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10954 (grub_elf64_load): Likewise.
10955 (grub_elf32_load_segment): Move to a nested function.
10956 (grub_elf64_load_segment): Likewise.
10958 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10960 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10962 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10963 (grub_heap_len): Likewise.
10964 (HEAP_SIZE): New macro.
10965 (grub_claim_heap): New function.
10966 (grub_machine_init): Don't claim heap directly. Call
10968 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10969 (grub_available_iterate): New function.
10971 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10973 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10974 * configure.ac: Use it for testing the HOST and TARGET compilers.
10976 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10978 * Makefile.in (enable_grub_emu): New variable.
10979 * configure.ac (--enable-grub-emu): New option.
10980 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10981 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10982 * conf/i386-pc.rmk: Likewise.
10983 * conf/powerpc-ieee1275.rmk: Likewise.
10984 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10986 2006-12-12 Marco Gerards <marco@gnu.org>
10988 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10990 * kern/env.c (grub_env_unset): Don't free the member `value' when
10991 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10994 * normal/main.c (current_menu): Removed.
10995 (free_menu): Unset the `menu' environment variable.
10996 (grub_normal_menu_addentry): Make use of the environment variable
10997 `menu', instead of using the global `current_menu'. Allocate
10998 memory for the sourcecode of this entry.
10999 (read_config_file): New argument `nested', changed all callers.
11000 Only in the case of a new context, initialize a new menu. Set the
11001 `menu' environment variable.
11002 (grub_normal_execute): Don't set and unset the environment
11003 variable `menu' here anymore. Only free the menu when leaving the
11006 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11009 2006-12-11 Marco Gerards <marco@gnu.org>
11011 * normal/menu_entry.c (run): Fix off by one bug so the last line
11012 is executed. Move the loader check to outside the loop.
11014 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11016 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11018 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11020 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11021 the number of sectors. Reported by Andrey Shuvikov
11022 <mr_hyro@yahoo.com>.
11024 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11026 * kern/disk.c (grub_disk_read): When there is a read error, always
11027 try to read only the necessary data.
11029 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11031 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11033 [GRUB_UTIL] (grub_raid_fini): Likewise.
11034 [GRUB_UTIL] (grub_lvm_init): Likewise.
11035 [GRUB_UTIL] (grub_lvm_fini): Likewise.
11036 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11037 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11038 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11039 and grub_raid_fini().
11041 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11043 * include/grub/types.h (__unused): Rename to UNUSED.
11044 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11045 (grub_elf64_size): Likewise.
11047 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11049 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11050 grub_error_push and grub_error_pop in the error-handling path.
11051 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11054 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11056 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11057 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11058 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11059 (kernel_elf_SOURCES): Likewise.
11060 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11061 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11062 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11063 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11064 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11065 (elf_mod_SOURCES): New variable.
11066 (elf_mod_CFLAGS): Likewise.
11067 (elf_mod_LDFLAGS): Likewise.
11068 * include/grub/types.h (__unused): New macro.
11069 * include/grub/elfload.h: New file.
11070 * kern/elf.c: Likewise.
11071 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11072 (ELF32_LOADMASK): New macro.
11073 (ELF64_LOADMASK): Likewise.
11074 (vmlinux): Removed.
11075 (grub_linux_load32): New function.
11076 (grub_linux_load64): Likewise.
11077 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11078 Use grub_elf_t instead of grub_file_t.
11080 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11082 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11083 `catch_result' to struct set_color_args.
11085 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11087 * normal/menu.c: Include grub/script.h.
11088 * normal/menu_entry.c: Likewise.
11089 * include/grub/normal.h: Do not include grub/script.h.
11091 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11093 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11095 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11097 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11099 (grub_disk_close): Print debug messages when closing a disk.
11100 (grub_disk_read): Print debug messages when disk read fails.
11101 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11103 * kern/partition.c: Include misc.h.
11104 (grub_partition_iterate): Print debug messages when detecting
11107 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11109 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11111 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11113 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11115 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11116 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11118 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11120 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11121 instead of sizeof(lv). Patch by Michael Guntsche.
11123 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11125 * disk/lvm.c: Rename VGS to VG_LIST.
11126 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11127 (grub_lvm_open): Likewise.
11128 Thanks to Michael Guntsche for finding this bug.
11130 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11132 * configure.ac (AC_INIT): Bumped to 1.95.
11134 2006-10-14 Robert Millan <rmh@aybabtu.com>
11136 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11137 with "/dev/.static/dev/md".
11139 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11141 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11142 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11143 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11144 DRIVE_NAME are always freed.
11146 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11147 DOS_PART, as a DOS partition is counted from one instead of zero
11148 now. Reported by Robert Millan.
11150 2006-10-14 Robert Millan <rmh@aybabtu.com>
11152 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11153 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11154 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11155 string returned by grub_guess_root_device.
11156 * util/i386/pc/grub-setup.c: Likewise.
11157 * util/i386/pc/grub-probefs.c: Likewise.
11159 * util/i386/pc/grub-probefs.c: Rename to ...
11160 * util/i386/pc/grub-probe.c: ... this.
11161 * DISTLIST: Remove grub-probefs, add grub-probe.
11162 * conf/i386-efi.rmk: Likewise.
11163 * conf/i386-pc.rmk: Likewise.
11164 * util/i386/pc/grub-install.in: Likewise.
11166 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11167 choose which information we want to print.
11169 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11171 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11172 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11173 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11174 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11175 video/readers/tga.c and video/i386/pc/vbeutil.c.
11177 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11179 Added support for RAID and LVM.
11181 * disk/lvm.c: New file.
11182 * disk/raid.c: Likewise.
11183 * include/grub/lvm.h: Likewise.
11184 * include/grub/raid.h: Likewise.
11185 * include/grub/util/lvm.h: Likewise.
11186 * include/grub/util/raid.h: Likewise.
11187 * util/lvm.c: Likewise.
11188 * util/raid.c: Likewise.
11190 * include/grub/disk.h (grub_disk_dev_id): Add
11191 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11192 (grub_disk_get_size): New prototype.
11193 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11194 returns a partition.
11195 (grub_disk_get_size): New function.
11197 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11198 verbatim if grub_install_dos_part is -2.
11200 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11203 * util/i386/pc/grub-setup.c (setup): New argument
11204 MUST_EMBED. Force embedding of GRUB when the argument is
11205 true. Close FILE before returning.
11206 (main): Add support for RAID and LVM.
11208 * conf/common.rmk: Add RAID and LVM modules.
11209 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11211 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11213 * kern/misc.c (grub_strstr): New function.
11214 * include/grub/misc.h (grub_strstr): New prototype.
11216 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11218 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11220 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11222 * kern/misc.c (grub_strtoull): Guess the base only if not
11225 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11227 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11230 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11232 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11234 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11235 Remove `flags' argument. All callers changed.
11236 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11237 (IEEE1275_IHANDLE_INVALID): New variable.
11238 (IEEE1275_CELL_INVALID): New variable.
11239 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11240 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11241 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11242 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11243 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11244 codes from Open Firmware. All callers updated.
11245 (grub_ieee1275_next_property): Directly return Open Firmware return
11247 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11248 Standardize error checking from `grub_ieee1275_get_property'.
11249 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11250 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11252 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11254 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11255 `instance_to_package_args' to `instance_to_path_args'.
11257 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11258 `grub_ieee1275_chosen'.
11260 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11261 `grub_ieee1275_interpret'.
11263 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11265 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11267 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11269 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11270 (__cmpdi): Likewise.
11272 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11273 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11276 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11278 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11279 to type `grub_ssize_t'.
11280 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11282 2006-09-22 Marco Gerards <marco@gnu.org>
11284 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11287 2006-09-22 Marco Gerards <marco@gnu.org>
11289 * commands/echo.c: New file.
11291 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11293 * conf/common.rmk (echo_mod_SOURCES): New variable.
11294 (echo_mod_CFLAGS): Likewise.
11295 (echo_mod_LDFLAGS): Likewise.
11297 2006-09-22 Marco Gerards <marco@gnu.org>
11299 * normal/main.c (get_line): Malloc memory instead of using
11300 preallocated memory. Removed the arguments `cmdline' and
11301 `max_len'. Updated all callers.
11303 2006-09-22 Marco Gerards <marco@gnu.org>
11305 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11306 (normal_mod_DEPENDENCIES): Likewise.
11308 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11309 (normal_mod_DEPENDENCIES): Likewise.
11311 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11313 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
11315 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11317 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11318 (normal_mod_DEPENDENCIES): Likewise.
11319 * conf/i386-pc.mk: Regenerate.
11320 * conf/i386-efi.mk: Likewise
11321 * conf/common.mk: Likewise.
11322 * conf/powerpc-ieee1275.mk: Likewise.
11323 * conf/sparc64-ieee1275.mk: Likewise.
11325 2006-09-22 Robert Millan <rmh@aybabtu.com>
11327 Sync with i386 version.
11328 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11329 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11331 2006-09-21 Robert Millan <rmh@aybabtu.com>
11333 Import from GRUB Legacy (lib/device.c):
11334 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11335 (init_device_map) [__linux__]: Add support for I2O devices.
11337 2006-09-14 Marco Gerards <marco@gnu.org>
11339 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11342 2006-09-14 Robert Millan <rmh@aybabtu.com>
11344 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11347 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11349 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11350 before adding it to device.map.
11352 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
11354 * genmk.rb: Let GCC generate dependencies the first time it
11355 compiles a file; using the -MD option.
11356 * conf/common.mk: Regenerate.
11357 * conf/i386-pc.mk: Likewise.
11358 * conf/i386-efi.mk: Likewise.
11359 * conf/powerpc-ieee1275.mk: Likewise.
11360 * conf/sparc64-ieee1275.mk: Likewise.
11362 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11364 Move the prototypes of grub_setjmp and grub_longjmp to
11365 cpu/setjmp.h, so that each architecture may specify different
11368 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11369 (grub_longjmp): Likewise.
11370 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11371 (grub_longjmp): Likewise.
11372 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11373 (grub_longjmp): Likewise.
11375 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11376 [!GRUB_UTIL] (grub_longjmp): Removed.
11378 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11380 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11381 "color!" method does not return any value.
11383 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11385 * include/grub/bitmap.h: New file.
11387 * include/grub/i386/pc/vbeutil.h: Likewise.
11389 * video/bitmap.c: Likewise.
11391 * video/readers/tga.c: Likewise.
11393 * video/i386/pc/vbeutil.c: Likewise.
11395 * commands/videotest.c: Code cleanup and updated to reflect to new
11398 * term/gfxterm.c: Likewise.
11400 * video/video.c: Likewise.
11402 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11403 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11404 (bitmap_mod_SOURCES): New entry.
11405 (bitmap_mod_CFLAGS): Likewise.
11406 (bitmap_mod_LDFLAGS): Likewise.
11407 (tga_mod_SOURCES): Likewise.
11408 (tga_mod_CFLAGS): Likewise.
11409 (tga_mod_LDFLAGS): Likewise.
11411 * include/grub/video.h (grub_video_blit_operators): New enum type.
11412 (grub_video_render_target): Changed as forward declaration and moved
11413 actual definition to be video driver specific.
11414 (grub_video_adapter.blit_bitmap): Added blitting operator.
11415 (grub_video_adapter.blit_render_target): Likewise.
11416 (grub_video_blit_bitmap): Likewise.
11417 (grub_video_blit_render_target): Likewise.
11419 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11420 driver specific render target definition.
11421 (grub_video_vbe_map_rgba): Added driver internal helper.
11422 (grub_video_vbe_unmap_color): Updated to use
11423 grub_video_i386_vbeblit_info.
11424 (grub_video_vbe_get_video_ptr): Likewise.
11426 * include/grub/i386/pc/vbeblit.h
11427 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11428 grub_video_i386_vbeblit_info.
11429 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11430 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11431 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11432 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11433 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11434 (grub_video_i386_vbeblit_index_index): Likewise.
11435 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11436 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11437 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11438 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11440 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11443 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11444 include/grub/i386/pc/vbeblit.h.
11446 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11447 Updated to use grub_video_i386_vbeblit_info.
11448 (grub_video_i386_vbefill_R8G8B8): Likewise.
11449 (grub_video_i386_vbefill_index): Likewise.
11450 (grub_video_i386_vbefill): Added generic filler.
11452 * video/i386/pc/vbefill.c: Updated to reflect changes on
11453 include/grub/i386/pc/vbefill.h.
11455 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11456 grub_video_i386_vbeblit_info.
11457 (grub_video_vbe_unmap_color): Likewise.
11458 (grub_video_vbe_blit_glyph): Likewise.
11459 (grub_video_vbe_scroll): Likewise.
11460 (grub_video_vbe_draw_pixel): Removed function.
11461 (grub_video_vbe_get_pixel): Likewise.
11462 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11463 updated code to use it.
11464 (common_blitter): Added common blitter for render target and bitmap.
11465 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11466 (grub_video_vbe_blit_render_target): Likewise.
11468 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
11470 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11471 is in text mode if there is no console control protocol instance
11474 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11476 * include/grub/video.h: Code cleanup.
11478 * include/grub/i386/pc/vbe.h: Likewise.
11480 * video/i386/pc/vbe.c: Likewise.
11482 * video/i386/pc/vbeblit.c: Likewise.
11484 * video/i386/pc/vbefill.c: Likewise.
11486 * video/video.c: Likewise. Also added more comments.
11488 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11490 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11491 (struct grub_biosdisk_dap): Likewise.
11493 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11494 linkage settings for all functions.
11496 2006-07-12 Marco Gerards <marco@gnu.org>
11498 * configure.ac (--enable-mm-debug): Fix typo.
11500 * genkernsyms.sh.in: Use proper quoting for `CC'.
11502 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11504 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11505 (normal_mod_ASFLAGS): Remove "-m32".
11507 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11509 * util/misc.c: Include config.h.
11510 [!HAVE_MEMALIGN]: Do not include malloc.h.
11511 (grub_memalign): Use posix_memalign, if present. Then, use
11512 memalign, if present. Otherwise, emit an error.
11514 * util/grub-emu.c: Do not include malloc.h.
11516 * include/grub/util/misc.h: Include unistd.h. This is required for
11517 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11518 D. Eades III <hde@foobar-qux.org>.
11520 * configure.ac (AC_GNU_SOURCE): Added.
11521 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11524 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11526 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11527 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11529 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11531 * include/grub/types.h (grub_host_addr_t): Rename to
11532 grub_target_addr_t.
11533 (grub_host_off_t): Rename to grub_target_off_t.
11534 (grub_host_size_t): Rename to grub_target_size_t.
11535 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11536 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11538 * include/grub/kernel.h (struct grub_module_header): Change type
11539 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11540 (grub_module_info): Likewise.
11542 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11544 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11545 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11546 Velazquez <jesus.velazquez@gmail.com>.
11548 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11550 Count partitions from 1 instead of 0 in the string representation
11551 of partitions. Still use 0-based internally.
11553 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11554 (sun_partition_map_iterate): Use grub_partition_t instead of
11555 struct grub_partition *. Cast DESC->START_CYLINDER to
11556 grub_uint64_t after converting the endian.
11557 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11558 (sun_partition_map_get_name): Add 1 to P->INDEX.
11560 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11562 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11564 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11565 zero instead of one.
11566 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11567 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11569 * partmap/apple.c (apple_partition_map_iterate): Change the type
11570 of POS to unsigned.
11571 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11572 (apple_partition_map_get_name): Add 1 into P->INDEX.
11574 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11575 of POS to unsigned.
11576 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11577 calculate the offset of a partition.
11578 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11579 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11581 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11582 SECTOR to grub_disk_addr_t.
11583 (acorn_partition_map_iterate): Likewise.
11584 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11585 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11587 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11589 * kern/i386/pc/init.c (make_install_device): Add 1 into
11590 GRUB_INSTALL_DOS_PART.
11592 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11595 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11597 Clean up the code to support 64-bit addressing in disks and
11598 files. This change is not enough for filesystems yet.
11600 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11601 type of "start" to grub_uint64_t.
11602 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11603 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11604 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11607 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11608 to grub_disk_addr_t.
11610 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11613 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11615 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11618 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11620 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11622 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11624 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11625 to grub_off_t, to detect an error from grub_file_seek.
11626 (grub_multiboot_load_elf32): Likewise.
11628 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11629 maximum unsigned long value when an overflow is detected.
11630 (grub_strtoull): New function.
11631 (grub_divmod64): Likewise.
11632 (grub_lltoa): use grub_divmod64.
11634 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11636 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11637 the pointer to next character. Use grub_strtoull instead of
11639 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11640 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11643 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11644 return value is signed.
11645 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11646 test if OFFSET is less than zero, as OFFSET is unsigned now.
11648 * kern/disk.c (struct grub_disk_cache): Change the type of
11649 "sector" to grub_disk_addr_t.
11650 (grub_disk_cache_get_index): Change the type of SECTOR to
11651 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11652 unsigned after shifting.
11653 (grub_disk_cache_invalidate): Change the type of SECTOR to
11655 (grub_disk_cache_unlock): Likewise.
11656 (grub_disk_cache_store): Likewise.
11657 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11658 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11659 grub_disk_addr_t and grub_uint64_t, respectively.
11660 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11661 body, as the value of OFFSET is tweaked by
11662 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11663 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11665 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11666 body, as the value of OFFSET is tweaked by
11667 grub_disk_check_range. Change the types of LEN and N to
11670 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11671 and "saved_offset" to grub_off_t.
11672 (test_header): Cast BUF to char *.
11673 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11675 (grub_gzio_read): Change the types of OFFSET and SIZE to
11676 grub_off_t and grub_size_t, respectively.
11678 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11680 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11681 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11682 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11683 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11684 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11686 * include/grub/types.h (grub_off_t): Unconditionally set to
11688 (grub_disk_addr_t): Changed to grub_uint64_t.
11690 * include/grub/partition.h (struct grub_partition): Change the
11691 types of "start", "len" and "offset" to grub_disk_addr_t,
11692 grub_uint64_t and grub_disk_addr_t, respectively.
11693 (grub_partition_get_start): Return grub_disk_addr_t.
11694 (grub_partition_get_len): Return grub_uint64_t.
11696 * include/grub/misc.h (grub_strtoull): New prototype.
11697 (grub_divmod64): Likewise.
11699 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11700 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11701 grub_off_t, respectively.
11702 All callers and references changed.
11704 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11705 grub_size_t in "read".
11706 All callers and references changed.
11708 * include/grub/file.h (struct grub_file): Change the types of
11709 "offset" and "size" to grub_off_t and grub_off_t,
11710 respectively. Change the type of SECTOR to grub_disk_addr_t in
11712 (grub_file_read): Change the type of LEN to grub_size_t.
11713 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11715 (grub_file_size): Return grub_off_t.
11716 (grub_file_tell): Likewise.
11717 All callers and references changed.
11719 * include/grub/disk.h (struct grub_disk_dev): Change the types of
11720 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11722 (struct grub_disk): Change the type of "total_sectors" to
11723 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11725 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11726 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11727 (grub_disk_write): Likewise.
11728 All callers and references changed.
11730 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11731 char * for grub_strncmp to silence gcc.
11732 (grub_iso9660_mount): Likewise.
11733 (grub_iso9660_mount): Likewise.
11734 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11736 (grub_iso9660_iterate_dir): Likewise.
11737 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11739 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11740 LEN to grub_disk_addr_t and grub_size_t, respectively.
11742 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11744 * fs/jfs.c (grub_jfs_read_file): Likewise.
11746 * fs/minix.c (grub_jfs_read_file): Likewise.
11748 * fs/sfs.c (grub_jfs_read_file): Likewise.
11750 * fs/ufs.c (grub_jfs_read_file): Likewise.
11752 * fs/xfs.c (grub_jfs_read_file): Likewise.
11754 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11755 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11758 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11759 BLKNR to -1 instead of returning GRUB_ERRNO.
11760 (grub_ext2_read_file): Change the types of SECTOR and
11761 LEN to grub_disk_addr_t and grub_size_t, respectively.
11763 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11764 LEN to grub_disk_addr_t and grub_size_t, respectively.
11766 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11769 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11770 string. Do not cast SECTOR explicitly.
11772 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11773 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11774 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11775 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11776 over 2TB and LBA mode is not supported, raise an error.
11777 (get_safe_sectors): New function.
11778 (grub_biosdisk_read): Use get_safe_sectors.
11779 (grub_biosdisk_write): Likewise.
11781 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11782 (grub_efidisk_write): Likewise.
11784 * disk/loopback.c (delete_loopback): Cosmetic changes.
11785 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11787 (grub_loopback_open): Likewise.
11788 (grub_loopback_read): Likewise. Also, change the type of POS to
11789 grub_off_t, and fix the usage of grub_memset.
11791 * commands/i386/pc/play.c: Include grub/machine/time.h.
11793 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11796 * commands/configfile.c: Include grub/env.h.
11798 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11799 GRUB_ERRNO directly instead. Change the type of POS to
11800 grub_off_t. Follow the coding standard.
11802 * commands/blocklist.c: Include grub/partition.h.
11803 (grub_cmd_blocklist): Return an error if the underlying device is
11804 not a disk. Take the starting sector of a partition into account,
11805 if a partition is used.
11807 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11809 (lba_mode): Support 64-bit addresses.
11810 (chs_mode): Likewise.
11811 (copy_buffer): Adapted to the new offsets of a length field and a
11813 (blocklist_default_start): Allocate 64-bit space.
11815 * boot/i386/pc/boot.S (force_lba): Removed.
11816 (boot_drive): Moved to under KERNEL_SECTOR.
11817 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11819 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11821 (lba_mode): Refactored to support a 64-bit address. More size
11823 (setup_sectors): Likewise.
11825 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11827 * DISTLIST: Added include/grub/i386/linux.h. Removed
11828 include/grub/i386/pc/linux.h
11830 * configure.ac (AC_INIT): Bumped to 1.94.
11832 * config.guess: Updated from gnulib.
11833 * config.sub: Likewise.
11834 * install-sh: Likewise.
11835 * mkinstalldirs: Likewise.
11837 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11839 * conf/common.rmk (grub_modules_init.lst): Depended on
11840 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11843 * genmk.rb (PModule::rule): Reverted the previous change.
11845 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11847 * conf/common.rmk (grub_modules_init.lst): Depends on
11848 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11849 that the target does not exist before producing.
11850 (grub_modules_init.h): Remove the target before generating.
11851 (grub_emu_init.c): Likewise.
11853 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11855 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11857 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11858 for the target-specific tests. Make sure that we also have the
11859 up-to-date target variables for those tests.
11861 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11863 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11864 (PModule::rule): Likewise.
11866 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11868 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11869 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11870 target-specific flags should be prefixed.
11871 (PModule::rule): Likewise.
11873 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11875 * configure.ac (CMP): Check if cmp is available explicitly.
11877 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11879 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11880 (target_cpu): New variable.
11881 (pkglibdir): Use target_cpu instead of host_cpu.
11883 * util/i386/pc/grub-install.in (host_cpu): Removed.
11884 (target_cpu): New variable.
11885 (pkglibdir): Use target_cpu instead of host_cpu.
11887 * util/genmoddep.c: Removed.
11889 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11890 instead of GRUB_HOST_SIZEOF_VOID_P.
11891 * kern/dl.c: Likewise.
11893 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11895 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11896 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11897 (GRUB_TARGET_SIZEOF_LONG): ... this.
11898 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11899 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11900 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11902 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11903 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11904 (GRUB_TARGET_SIZEOF_LONG): ... this.
11905 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11906 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11907 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11909 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11910 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11911 (GRUB_TARGET_SIZEOF_LONG): ... this.
11912 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11913 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11915 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11916 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11917 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11918 instead of GRUB_HOST_SIZEOF_LONG.
11919 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11920 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11921 GRUB_CPU_WORDS_BIGENDIAN.
11922 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11923 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11926 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11927 (genmoddep_SOURCES): Likewise.
11928 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11929 (genmoddep_SOURCES): Likewise.
11930 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11931 (genmoddep_SOURCES): Likewise.
11932 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11934 (genmoddep_SOURCES): Likewise.
11936 * genmoddep.awk: New file.
11938 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11939 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11940 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11941 (PModule::rule): Likewise.
11942 (Program::rule): Likewise.
11943 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11944 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11947 * configure.ac: Rewritten intensively to use host and target
11948 instead of build and host, respectively.
11950 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11951 (host_cpu): Removed.
11952 (target_cpu): New variable.
11953 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11954 (BUILD_CC): Removed.
11955 (BUILD_CFLAGS): Likewise.
11956 (BUILD_CPPFLAGS): Likewise.
11957 (TARGET_CC): New variable.
11958 (TARGET_CFLAGS): Likewise.
11959 (TARGET_CPPFLAGS): Likewise.
11960 (TARGET_LDFLAGS): Likewise.
11962 (include): Use target_cpu instead of host_cpu.
11963 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11965 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11967 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11969 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11970 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11971 field 'false' to 'exec_on_false'.
11972 (grub_script_create_cmdif): Renamed argument names to reflect above
11975 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11977 * normal/script.c (grub_script_create_cmdif): Likewise.
11979 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11981 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11983 (grub_hfsplus_btree_recptr): Likewise.
11984 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11985 FILEBLOCK both to pass a block number and store next block
11987 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11988 overflow file correctly. Specify errors appropriately, because
11989 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11990 grub_hfsplus_btree_recptr to get the pointer to a found key.
11991 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11994 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11996 (_linux_mod_SOURCES): New variable.
11997 (_linux_mod_CFLAGS): Likewise.
11998 (_linux_mod_LDFLAGS): Likewise.
11999 (linux_mod_SOURCES): Likewise.
12000 (linux_mod_CFLAGS): Likewise.
12001 (linux_mod_LDFLAGS): Likewise.
12003 * DISTLIST: Added loader/i386/efi/linux.c,
12004 loader/i386/efi/linux_normal.c and
12005 include/grub/i386/efi/loader.h.
12007 * loader/i386/efi/linux.c: New file.
12008 * loader/i386/efi/linux_normal.c: Likewise.
12009 * include/grub/i386/efi/loader.h: Likewise.
12011 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12013 * commands/blocklist.c: New file.
12015 * DISTLIST: Added commands/blocklist.c.
12017 * term/efi/console.c (grub_console_highlight_color): Use a lighter
12018 color for the background, and a darker color for the foreground.
12019 (grub_console_checkkey): Return READ_KEY.
12020 (grub_console_cls): Set the background to
12021 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12023 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12025 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12026 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12028 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12031 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12032 BG. The spec is wrong again.
12034 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12036 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12038 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12039 commands/blocklist.c.
12040 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12042 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12043 (blocklist_mod_SOURCES): New variable.
12044 (blocklist_mod_CFLAGS): Likewise.
12045 (blocklist_mod_LDFLAGS): Likewise.
12047 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12049 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12051 (lba_mode): Use %eax more intensively to reduce the code size.
12053 2006-05-20 Marco Gerards <marco@gnu.org>
12055 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12057 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12059 (script): Accept leading newlines.
12060 (newlines): New rule to describe 0 or more newlines.
12061 (commands): Accept `command' with trailing newline. Fixed the
12062 order in which arguments were passed to `grub_script_add_cmd'.
12063 Accept commands separated by newlines.
12064 (function): Changed to accept newlines.
12065 (menuentry) Rewritten.
12067 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12068 front of the list, instead of to the end.
12070 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12072 * util/i386/pc/grub-install.in (bindir): New variable.
12073 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12074 Shaver <lbgwjl@gmail.com>.
12076 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12078 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12079 grub/machine/linux.h
12080 * loader/i386/pc/linux.c: Likewise.
12082 * include/grub/i386/pc/linux.h: Moved to ...
12083 * include/grub/i386/linux.h: ... here.
12085 * include/grub/i386/linux.h (struct linux_kernel_params): New
12088 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12090 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12092 (grub_video_vbe_blit_glyph): Likewise.
12093 (grub_video_vbe_blit_bitmap): Likewise.
12094 (grub_video_vbe_blit_render_target): Likewise.
12096 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12098 * configure.ac (--with-platform): Properly quote the square
12101 2006-05-08 Marco Gerards <marco@gnu.org>
12103 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12105 (kernel_elf_HEADERS): ...to this. Updated all users.
12106 (grubof_symlist.c): Renamed from this...
12107 (kernel_elf_symlist.c): ...to this. Updated all users.
12108 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12109 (grubof_SOURCES): Renamed from this...
12110 (kernel_elf_SOURCES): ...to this.
12111 (grubof_HEADERS): Renamed from this...
12112 (kernel_elf_HEADERS): ...to this.
12113 (grubof_CFLAGS): Renamed from this...
12114 (kernel_elf_CFLAGS): ...to this.
12115 (grubof_ASFLAGS): Renamed from this...
12116 (kernel_elf_ASFLAGS): ...to this.
12117 (grubof_LDFLAGS): Renamed from this...
12118 (kernel_elf_LDFLAGS): ...to this.
12120 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12122 (kernel_elf_HEADERS): ...to this. Updated all users.
12123 (grubof_symlist.c): Renamed from this...
12124 (kernel_elf_symlist.c): ...to this. Updated all users.
12125 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12126 (grubof_SOURCES): Renamed from this...
12127 (kernel_elf_SOURCES): ...to this.
12128 (grubof_HEADERS): Renamed from this...
12129 (kernel_elf_HEADERS): ...to this.
12130 (grubof_CFLAGS): Renamed from this...
12131 (kernel_elf_CFLAGS): ...to this.
12132 (grubof_ASFLAGS): Renamed from this...
12133 (kernel_elf_ASFLAGS): ...to this.
12134 (grubof_LDFLAGS): Renamed from this...
12135 (kernel_elf_LDFLAGS): ...to this.
12137 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12138 `kernel.elf' instead of `grubof'.
12140 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12142 Add --with-platform to configure. Use pkglibdir instead of
12143 pkgdatadir. This is reported by Roger Leigh.
12145 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12146 (host_vendor): Likewise.
12147 (host_os): Likewise.
12148 (pkgdatadir): Likewise.
12149 (platform): New variable.
12150 (pkglibdir): Likewise.
12151 Use PKGLIBDIR instead of PKGDATADIR.
12153 * util/i386/pc/grub-install.in (datadir): Removed.
12154 (host_vendor): Likewise.
12155 (host_os): Likewise.
12156 (pkgdatadir): Likewise.
12157 (platform): New variable.
12158 (pkglibdir): Likewise.
12159 Use PKGLIBDIR instead of PKGDATADIR.
12161 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12162 instead of GRUB_DATADIR.
12164 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12166 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12169 * configure.ac (--with-platform): New option.
12170 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12172 * Makefile.in: Include a makefile based on PLATFORM instead of
12174 (pkgdatadir): Not appended by the machine type.
12175 (pkglibdir): Appended by the machine type.
12176 (host_vendor): Removed.
12177 (platform): New variable.
12178 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12179 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12180 (uninstall): Likewise.
12182 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12184 Use the environment context in the menu. Remove the commands
12185 "default" and "timeout", and use variables instead.
12187 * normal/menu.c: Include grub/env.h.
12188 (print_entry): Cast TITLE to silence gcc.
12189 (get_timeout): New function.
12190 (set_timeout): Likewise.
12191 (get_entry_number): Likewise.
12192 (run_menu): Use a default entry, a fallback entry and a timeout
12193 in the environment variables "default", "fallback" and
12194 "timeout". Also, tweak the default entry if it is not within the
12195 current menu entries.
12196 (grub_menu_run): Use a fallback entry in the environment variable
12199 * normal/main.c (read_config_file): Do not initialize
12200 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12202 (grub_normal_execute): Use a data slot to store the menu.
12204 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12205 fallback_entry and timeout.
12206 (struct grub_menu_list): Removed.
12207 (grub_menu_list_t): Likewise.
12208 (struct grub_context): Likewise.
12209 (grub_context_t): Likewise.
12210 (grub_context_get): Likewise.
12211 (grub_context_get_current_menu): Likewise.
12212 (grub_context_push_menu): Likewise.
12213 (grub_context_pop_menu): Likewise.
12214 (grub_default_init): Likewise.
12215 (grub_default_fini): Likewise.
12216 (grub_timeout_init): Likewise.
12217 (grub_timeout_fini): Likewise.
12219 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12221 (normal_mod_SOURCES): Removed normal/context.c.
12223 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12224 commands/default.c, commands/timeout.c and normal/context.c.
12225 (normal_mod_SOURCES): Removed normal/context.c.
12227 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12228 commands/timeout.c and normal/context.c.
12229 (normal_mod_SOURCES): Removed normal/context.c.
12231 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12232 commands/default.c, commands/timeout.c and normal/context.c.
12233 (normal_mod_SOURCES): Removed normal/context.c.
12235 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12237 (default_mod_SOURCES): Removed.
12238 (default_mod_CFLAGS): Likewise.
12239 (default_mod_LDFLAGS): Likewise.
12240 (timeout_mod_SOURCES): Removed.
12241 (timeout_mod_CFLAGS): Likewise.
12242 (timeout_mod_LDFLAGS): Likewise.
12244 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12247 * commands/default.c: Removed.
12248 * commands/timeout.c: Likewise.
12249 * normal/context.c: Likewise.
12251 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12253 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12255 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12257 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12258 "next" to "prev" for readability.
12259 (struct grub_env_sorted_var): New struct.
12260 (grub_env_context): Renamed to ...
12261 (initial_context): ... this.
12262 (grub_env_var_context): Renamed to ...
12263 (current_context): ... this.
12264 (grub_env_find): Look only at CURRENT_CONTEXT.
12265 (grub_env_context_open): Rewritten to copy exported variables from
12267 (grub_env_context_close): Rewritten according to the new
12268 scheme. Also, add an assertion to prevent the initial context from
12270 (grub_env_insert): Removed the code for the sorted list.
12271 (grub_env_remove): Likewise.
12272 (grub_env_export): Simply mark the variable with
12273 GRUB_ENV_VAR_GLOBAL.
12274 (grub_env_set): A cosmetic change for naming consistency.
12275 (grub_env_get): Likewise.
12276 (grub_env_unset): Likewise.
12277 (grub_env_iterate): Rewritten to sort variables within this
12279 (grub_register_variable_hook): Fixed for naming consistency. Call
12280 grub_env_find again, only if NAME is not found at the first time.
12281 (mangle_data_slot_name): New function.
12282 (grub_env_set_data_slot): Likewise.
12283 (grub_env_get_data_slot): Likewise.
12284 (grub_env_unset_data_slot): Likewise.
12286 * include/grub/env.h (grub_env_var_type): New enum.
12287 (GRUB_ENV_VAR_LOCAL): New constant.
12288 (GRUB_ENV_VAR_GLOBAL): Likewise.
12289 (GRUB_ENV_VAR_DATA): Likewise.
12290 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12292 (grub_env_set): Replace VAR with NAME for consistency.
12293 (grub_register_variable_hook): Likewise.
12294 (grub_env_export): Specify the name of the argument.
12295 (grub_env_set_data_slot): New prototype.
12296 (grub_env_get_data_slot): Likewise.
12297 (grub_env_unset_data_slot): Likewise.
12299 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12301 Extend the loader so that GRUB can accept a loader which comes
12302 back to GRUB when a loaded image exits. Also, this change adds
12303 support for a chainloader on EFI.
12305 * term/efi/console.c: Include grub/misc.h.
12306 (grub_console_checkkey): Display a scan code on the top for
12307 debugging. This will be removed once the EFI port gets stable.
12308 Correct the scan code mapping.
12310 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12311 allocate memory from larger regions, in order to reduce the number
12312 of allocated regions. Otherwise, the MacOSX loader panics.
12313 (filter_memory_map): Avoid less than 1MB for compatibility with
12315 (add_memory_regions): Allocate from the tail of a region, if
12316 possible, to avoid allocating a region near to 1MB, for the MacOSX
12319 * kern/efi/init.c (grub_efi_set_prefix): Specify
12320 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12322 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12323 argument IMAGE_HANDLE and specify it to get a loaded image.
12324 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12325 grub_efi_get_loaded_image.
12326 (grub_efi_get_filename): Divide the length by the size of
12328 (grub_efi_get_device_path): New function.
12329 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12330 the length by the size of grub_efi_char16_t for a file path device
12333 * kern/loader.c (grub_loader_noreturn): New variable.
12334 (grub_loader_set): Accept a new argument NORETURN. Set
12335 GRUB_LOADER_NORETURN to NORETURN.
12336 All callers changed.
12337 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12340 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12342 (grub_efi_get_loaded_image): Take an argument to specify an image
12345 * include/grub/loader.h (grub_loader_set): Added one more argument
12348 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12349 instead of grub_efi_open_protocol.
12350 (grub_efidisk_get_device_name): Likewise.
12351 (grub_efidisk_close): Print a newline.
12352 (grub_efidisk_get_device_handle): Fixed to use
12353 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12354 GRUB_EFI_DEVICE_PATH_TYPE.
12356 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12357 * kern/efi/efi.c (device_path_guid): ... here.
12359 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12361 (kernel_mod_HEADERS): Added efi/disk.h.
12362 (_chain_mod_SOURCES): New variable.
12363 (_chain_mod_CFLAGS): Likewise.
12364 (_chain_mod_LDFLAGS): Likewise.
12365 (chain_mod_SOURCES): Likewise.
12366 (chain_mod_CFLAGS): Likewise.
12367 (chain_mod_LDFLAGS): Likewise.
12369 * DISTLIST: Added include/grub/efi/chainloader.h,
12370 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12372 * include/grub/efi/chainloader.h: New file.
12373 * loader/efi/chainloader.c: Likewise.
12374 * loader/efi/chainloader_normal.c: Likewise.
12376 2006-04-30 Marco Gerards <marco@gnu.org>
12378 * commands/configfile.c (grub_cmd_source): New function.
12379 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12380 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12382 2006-04-30 Marco Gerards <marco@gnu.org>
12384 * normal/execute.c (grub_script_execute_cmd): Change the return
12385 type to `grub_err_t'. Correctly return the error.
12386 (grub_script_execute_cmdline): In case a command line is not a
12387 command or a function, try to interpret it as an assignment.
12389 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12391 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12392 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12393 skip a node whose name is obviously invalid as UTF-16,
12394 i.e. contains a NUL character. Stop the iteration when the last
12395 directory entry is found. Instead of using the return value of
12396 grub_hfsplus_btree_iterate_node, store the value in RET and use
12397 it, because the iterator can be stopped by the last directory
12400 2006-04-30 Marco Gerards <marco@gnu.org>
12402 * include/grub/env.h (grub_env_export): New prototype. Reported
12403 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12405 2006-04-30 Marco Gerards <marco@gnu.org>
12407 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12408 size of the extents in a catalog file record.
12410 2006-04-29 Marco Gerards <marco@gnu.org>
12412 * commands/configfile.c (grub_cmd_configfile): Execute the
12413 configfile within its own context.
12415 * include/grub/env.h (grub_env_context_open): New prototype.
12416 (grub_env_context_close): Likewise.
12418 * kern/env.c (grub_env): Removed.
12419 (grub_env_sorted): Likewise.
12420 (grub_env_context): New variable.
12421 (grub_env_var_context): Likewise.
12422 (grub_env_find): Search both the active context and the global
12424 (grub_env_context_open): New function.
12425 (grub_env_context_close): Likewise.
12426 (grub_env_insert): Likewise.
12427 (grub_env_remove): Likewise.
12428 (grub_env_export): Likewise.
12429 (grub_env_set): Changed to use helper functions to avoid code
12431 (grub_env_iterate): Rewritten so both the current context and the
12432 global context are being used.
12434 * normal/command.c (export_command): New function.
12435 (grub_command_init): Register the `export' function.
12437 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12439 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12440 explicitly to suppress gcc's warnings.
12441 * fs/fat.c (grub_fat_find_dir): Likewise.
12442 (grub_fat_label): Likewise.
12443 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12444 (grub_xfs_mount): Likewise.
12445 (grub_xfs_label): Likewise.
12446 * fs/affs.c (grub_affs_mount): Likewise.
12447 (grub_affs_label): Likewise.
12448 (grub_affs_iterate_dir): Likewise.
12449 * fs/sfs.c (grub_sfs_mount): Likewise.
12450 (grub_sfs_iterate_dir): Likewise.
12451 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12452 * fs/hfs.c (grub_hfs_mount): Likewise.
12453 (grub_hfs_cmp_catkeys): Likewise.
12454 (grub_hfs_find_dir): Likewise.
12455 (grub_hfs_dir): Likewise.
12456 (grub_hfs_label): Likewise.
12457 * fs/jfs.c (grub_jfs_mount): Likewise.
12458 (grub_jfs_opendir): Likewise.
12459 (grub_jfs_getent): Likewise.
12460 (grub_jfs_lookup_symlink): Likewise.
12461 (grub_jfs_label): Likewise.
12462 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12463 (grub_hfsplus_iterate_dir): Likewise.
12464 (grub_hfsplus_btree_iterate_node): Made static.
12466 * util/grub-emu.c (prefix): New variable.
12467 (grub_machine_set_prefix): New function.
12468 (main): Do not set the environment variable "prefix" here. Only
12469 set PREFIX, which is used later by grub_machine_set_prefix.
12471 * include/grub/video.h: Do not include grub/symbol.h.
12472 (grub_video_register): Not exported. This symbol is not defined in
12474 (grub_video_unregister): Likewise.
12475 (grub_video_iterate): Likewise.
12476 (grub_video_setup): Likewise.
12477 (grub_video_restore): Likewise.
12478 (grub_video_get_info): Likewise.
12479 (grub_video_get_blit_format): Likewise.
12480 (grub_video_set_palette): Likewise.
12481 (grub_video_get_palette): Likewise.
12482 (grub_video_set_viewport): Likewise.
12483 (grub_video_get_viewport): Likewise.
12484 (grub_video_map_color): Likewise.
12485 (grub_video_map_rgb): Likewise.
12486 (grub_video_map_rgba): Likewise.
12487 (grub_video_fill_rect): Likewise.
12488 (grub_video_blit_glyph): Likewise.
12489 (grub_video_blit_bitmap): Likewise.
12490 (grub_video_blit_render_target): Likewise.
12491 (grub_video_scroll): Likewise.
12492 (grub_video_swap_buffers): Likewise.
12493 (grub_video_create_render_target): Likewise.
12494 (grub_video_delete_render_target): Likewise.
12495 (grub_video_set_active_render_target): Likewise.
12497 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12499 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12501 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12502 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12503 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12504 instead of $(srcdir)/genkernsyms.sh.
12506 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12507 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12508 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12509 instead of $(srcdir)/genkernsyms.sh.
12511 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12512 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12513 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12514 instead of $(srcdir)/genkernsyms.sh.
12516 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12517 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12518 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12519 instead of $(srcdir)/genkernsyms.sh.
12521 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12524 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12526 (gensymlist.sh): New target.
12527 (genkernsyms.sh): Likewise.
12529 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12530 genkernsyms.sh.in and gensymlist.sh.in.
12532 * genkernsyms.sh: Removed.
12533 * gensymlist.sh: Likewise.
12535 * genkernsyms.sh.in: New file.
12536 * gensymlist.sh.in: Likewise.
12538 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12540 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12541 clobber "prefix", since we may have already set it manually.
12543 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12545 * kern/misc.c (abort): New alias for grub_abort.
12547 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12549 A new machine-specific function "grub_machine_set_prefix" is
12550 defined. This is called after loading modules, so that a prefix
12551 initialization can use modules. Also, this change adds an
12552 intensive debugging feature for the memory manager via the
12553 configure option "--enable-mm-debug".
12555 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12558 * kern/sparc64/ieee1275/init.c (abort): Removed.
12559 (grub_stop): Likewise.
12560 (grub_exit): New function.
12561 (grub_set_prefix): Renamed to ...
12562 (grub_machine_set_prefix): ... this.
12563 (grub_machine_init): Do not call grub_set_prefix.
12565 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12566 (grub_machine_set_prefix): ... this.
12567 (grub_machine_init): Do not call grub_set_prefix.
12569 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12570 (grub_machine_init): Do not set the prefix here.
12572 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12574 * kern/efi/init.c: Include grub/mm.h.
12575 (grub_efi_set_prefix): New function.
12577 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12578 (grub_efi_get_filename): New function.
12579 (grub_print_device_path): Renamed to ...
12580 (grub_efi_print_device_path): ... this.
12582 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12583 [MM_DEBUG] (grub_realloc): Likewise.
12584 [MM_DEBUG] (grub_free): Likewise.
12585 [MM_DEBUG] (grub_memalign): Likewise.
12586 [MM_DEBUG] (grub_mm_debug): New variable.
12587 [MM_DEBUG] (grub_debug_malloc): New function.
12588 [MM_DEBUG] (grub_debug_free): New function.
12589 [MM_DEBUG] (grub_debug_realloc): New function.
12590 [MM_DEBUG] (grub_debug_memalign): New function.
12592 * kern/misc.c (grub_abort): Print a newline to distinguish
12595 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12596 grub_set_root_dev after loading modules. This is necessary when
12597 setting a prefix depends on modules.
12599 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12600 (grub_efi_print_device_path): ... this.
12601 (grub_efi_get_filename): New prototype.
12602 (grub_efi_set_prefix): Likewise.
12604 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12606 (grub_efidisk_get_device_handle): New prototype.
12607 (grub_efidisk_get_device_name): Likewise.
12609 * include/grub/mm.h: Include config.h.
12610 (MM_DEBUG): Removed.
12611 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12612 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12613 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12614 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12615 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12616 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12617 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12618 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12619 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12621 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12623 * disk/efi/efidisk.c: Include grub/partition.h.
12624 (iterate_child_devices): New function.
12625 (add_device): First, compare only last device path nodes, so that
12626 devices are sorted by the types.
12627 (grub_efidisk_get_device_handle): New function.
12628 (grub_efidisk_get_device_name): Likewise.
12630 * configure.ac (--enable-mm-debug): New option to enable the
12631 memory manager debugging feature. This makes the binary much
12632 bigger, so is disabled by default.
12634 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12636 Use grub_abort instead of grub_stop, and grub_exit must be
12637 define in each architecture now. Also, this change adds support
12640 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12641 (grub_getkey): New function.
12642 (grub_term_get_current): Likewise.
12644 * util/i386/pc/grub-setup.c: Include grub/term.h.
12645 (grub_getkey): New function.
12646 (grub_term_get_current): Likewise.
12648 * util/misc.c (grub_stop): Renamed to ...
12649 (grub_exit): ... this.
12651 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12652 (grub_exit): ... this.
12653 (grub_machine_init): Use grub_abort instead of abort.
12654 (grub_stop): Removed.
12656 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12659 * kern/i386/pc/startup.S (grub_exit): New function.
12660 (cold_reboot): New label.
12662 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12663 (grub_efi_init): Call grub_efidisk_init.
12664 (grub_efi_fini): Call grub_efidisk_fini.
12666 * kern/efi/efi.c: Include grub/mm.h.
12667 (grub_efi_console_control_guid): Renamed to ...
12668 (console_control_guid): ... this.
12669 (grub_efi_loaded_image_guid): Renamed to ...
12670 (loaded_image_guid): ... this.
12671 (grub_efi_locate_handle): New function.
12672 (grub_efi_open_protocol): Likewise.
12673 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12674 GRUB_EFI_CONSOLE_CONTROL_GUID.
12675 (grub_efi_exit): Removed.
12676 (grub_stop): Likewise.
12677 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12678 (grub_exit): New function.
12679 (grub_print_device_path): Likewise.
12681 * kern/rescue.c (grub_rescue_cmd_exit): New function.
12682 (grub_enter_rescue_mode): Register "exit".
12684 * kern/misc.c (grub_real_dprintf): A cosmetic change.
12685 (grub_abort): New function.
12687 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12689 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12691 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12693 * include/grub/efi/efi.h (grub_efi_exit): Removed.
12694 (grub_print_device_path): New prototype.
12695 (grub_efi_locate_handle): Likewise.
12696 (grub_efi_open_protocol): Likewise.
12698 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12699 * disk/efi/efidisk.c: Likewise.
12701 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12703 * include/grub/efi/console_control.h
12704 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12706 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12707 last 8 bytes as an array.
12708 (GRUB_EFI_DISK_IO_GUID): New macro.
12709 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12710 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12711 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12713 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12714 (struct grub_efi_device_path): Rename the member "sub_type" to
12716 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12717 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12718 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12719 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12720 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12721 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12722 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12723 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12724 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12725 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12726 (struct grub_efi_pci_device_path): New structure.
12727 (grub_efi_pci_device_path_t): New type.
12728 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12729 (struct grub_efi_pccard_device_path): New structure.
12730 (grub_efi_pccard_device_path_t): New type.
12731 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12732 (struct grub_efi_memory_mapped_device_path): New structure.
12733 (grub_efi_memory_mapped_device_path_t): New type.
12734 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12735 (struct grub_efi_vendor_device_path): New structure.
12736 (grub_efi_vendor_device_path_t): New type.
12737 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12738 (struct grub_efi_controller_device_path): New structure.
12739 (grub_efi_controller_device_path_t): New type.
12740 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12741 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12742 (struct grub_efi_acpi_device_path): New structure.
12743 (grub_efi_acpi_device_path_t): New type.
12744 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12745 (struct grub_efi_expanded_acpi_device_path): New structure.
12746 (grub_efi_expanded_acpi_device_path_t): New type.
12747 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12748 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12749 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12750 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12751 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12752 (struct grub_efi_atapi_device_path): New structure.
12753 (grub_efi_atapi_device_path_t): New type.
12754 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12755 (struct grub_efi_fibre_channel_device_path): New structure.
12756 (grub_efi_fibre_channel_device_path_t): New type.
12757 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12758 (struct grub_efi_1394_device_path): New structure.
12759 (grub_efi_1394_device_path_t): New type.
12760 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12761 (struct grub_efi_usb_device_path): New structure.
12762 (grub_efi_usb_device_path_t): New type.
12763 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12764 (struct grub_efi_usb_class_device_path): New structure.
12765 (grub_efi_usb_class_device_path_t): New type.
12766 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12767 (struct grub_efi_i2o_device_path): New structure.
12768 (grub_efi_i2o_device_path_t): New type.
12769 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12770 (struct grub_efi_mac_address_device_path): New structure.
12771 (grub_efi_mac_address_device_path_t): New type.
12772 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12773 (struct grub_efi_ipv4_device_path): New structure.
12774 (grub_efi_ipv4_device_path_t): New type.
12775 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12776 (struct grub_efi_ipv6_device_path): New structure.
12777 (grub_efi_ipv6_device_path_t): New type.
12778 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12779 (struct grub_efi_infiniband_device_path): New structure.
12780 (grub_efi_infiniband_device_path_t): New type.
12781 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12782 (struct grub_efi_uart_device_path): New structure.
12783 (grub_efi_uart_device_path_t): New type.
12784 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12785 (struct grub_efi_vendor_messaging_device_path): New structure.
12786 (grub_efi_vendor_messaging_device_path_t): New type.
12787 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12788 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12789 (struct grub_efi_hard_drive_device_path): New structure.
12790 (grub_efi_hard_drive_device_path_t): New type.
12791 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12792 (struct grub_efi_cdrom_device_path): New structure.
12793 (grub_efi_cdrom_device_path_t): New type.
12794 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12795 (struct grub_efi_vendor_media_device_path): New structure.
12796 (grub_efi_vendor_media_device_path_t): New type.
12797 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12798 (struct grub_efi_file_path_device_path): New structure.
12799 (grub_efi_file_path_device_path_t): New type.
12800 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12801 (struct grub_efi_protocol_device_path): New structure.
12802 (grub_efi_protocol_device_path_t): New type.
12803 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12804 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12805 (struct grub_efi_bios_device_path): New structure.
12806 (grub_efi_bios_device_path_t): New type.
12807 (struct grub_efi_disk_io): New structure.
12808 (grub_efi_disk_io_t): New type.
12809 (struct grub_efi_block_io_media): New structure.
12810 (grub_efi_block_io_media_t): New type.
12811 (struct grub_efi_block_io): New structure.
12812 (grub_efi_block_io_t): New type.
12814 * include/grub/misc.h (grub_stop): Removed.
12815 (grub_exit): New prototype.
12816 (grub_abort): Likewise.
12818 * include/grub/disk.h (enum grub_disk_dev_id): Added
12819 GRUB_DISK_DEVICE_EFIDISK_ID.
12821 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12822 disk/efi/efidisk.c.
12823 (kernel_syms.lst): Remove the target if an error occurs.
12825 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12827 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12828 as it was simply too buggy.
12830 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12832 * kern/misc.c (grub_lltoa): New function.
12833 (grub_vsprintf): Added support for the long long suffix,
12836 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12838 * Makefile.in (LDFLAGS): Add variable.
12839 (LD): Remove variable.
12840 * configure.ac: Add -m32 to LDFLAGS.
12841 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12842 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12843 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12844 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12845 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12847 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12848 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12849 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12851 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12853 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12854 length for unknown glyph.
12856 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12858 Add support for pre-loaded modules into the EFI port.
12860 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12861 completely. Accept one more argument DIR. The caller has changed.
12863 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12865 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12866 (grub_efi_loaded_image_guid): New variable.
12867 (grub_efi_get_loaded_image): New function.
12868 (grub_arch_modules_addr): Likewise.
12870 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12873 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12874 (struct grub_efi_loaded_image): New structure.
12875 (grub_efi_loaded_image_t): New type.
12877 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12879 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12880 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12881 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12883 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12885 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12887 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12889 * DISTLIST: Added include/grub/efi/console.h,
12890 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12891 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12893 * include/grub/efi/console.h: New file.
12894 * include/grub/efi/time.h: Likewise.
12895 * include/grub/i386/efi/kernel.h: Likewise.
12896 * kern/efi/init.c: Likewise.
12897 * kern/efi/mm.c: Likewise.
12898 * term/efi/console.c: Likewise.
12900 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12901 (grub_stop): Removed.
12902 (grub_get_rtc): Likewise.
12903 (grub_machine_init): Simply call grub_efi_init.
12904 (grub_machine_fini): Call grub_efi_fini.
12906 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12907 (grub_efi_output_string): Removed.
12908 (grub_efi_stall): New function.
12909 (grub_stop): Likewise.
12910 (grub_get_rtc): Likewise.
12912 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12913 (grub_efi_stall): New prototype.
12914 (grub_efi_allocate_pages): Likewise.
12915 (grub_efi_free_pages): Likewise.
12916 (grub_efi_get_memory_map): Likewise.
12917 (grub_efi_mm_init): Likewise.
12918 (grub_efi_mm_fini): Likewise.
12919 (grub_efi_init): Likewise.
12920 (grub_efi_fini): Likewise.
12922 * include/grub/i386/efi/time.h: Do not include
12923 grub/symbol.h. Include grub/efi/time.h.
12924 (GRUB_TICKS_PER_SECOND): Removed.
12925 (grub_get_rtc): Likewise.
12927 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12928 Added padding. The EFI spec is buggy.
12929 (GRUB_EFI_BLACK): New macro.
12930 (GRUB_EFI_BLUE): Likewise.
12931 (GRUB_EFI_GREEN): Likewise.
12932 (GRUB_EFI_CYAN): Likewise.
12933 (GRUB_EFI_RED): Likewise.
12934 (GRUB_EFI_MAGENTA): Likewise.
12935 (GRUB_EFI_BROWN): Likewise.
12936 (GRUB_EFI_LIGHTGRAY): Likewise.
12937 (GRUB_EFI_BRIGHT): Likewise.
12938 (GRUB_EFI_DARKGRAY): Likewise.
12939 (GRUB_EFI_LIGHTBLUE): Likewise.
12940 (GRUB_EFI_LIGHTGREEN): Likewise.
12941 (GRUB_EFI_LIGHTCYAN): Likewise.
12942 (GRUB_EFI_LIGHTRED): Likewise.
12943 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12944 (GRUB_EFI_YELLOW): Likewise.
12945 (GRUB_EFI_WHITE): Likewise.
12946 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12947 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12948 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12949 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12950 (GRUB_EFI_BACKGROUND_RED): Likewise.
12951 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12952 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12953 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12954 (GRUB_EFI_TEXT_ATTR): Likewise.
12956 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12957 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12958 (kernel_mod_HEADERS): Added efi/time.h.
12960 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12962 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12963 include/grub/efi/api.h, include/grub/efi/console_control.h,
12964 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12965 include/grub/i386/efi/time.h, kern/efi/efi.c,
12966 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12967 and util/i386/efi/grub-mkimage.c.
12969 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12971 * genmk.rb (PModule#rule): Do not export symbols if
12972 #{prefix}_EXPORTS is set to "no".
12974 * conf/i386-efi.mk: New file.
12975 * conf/i386-efi.rmk: Likewise.
12976 * include/grub/efi/api.h: Likewise.
12977 * include/grub/efi/console_control.h: Likewise.
12978 * include/grub/efi/efi.h: Likewise.
12979 * include/grub/efi/pe32.h: Likewise.
12980 * include/grub/i386/efi/time.h: Likewise.
12981 * kern/efi/efi.c: Likewise.
12982 * kern/i386/efi/init.c: Likewise.
12983 * kern/i386/efi/startup.S: Likewise.
12984 * util/i386/efi/grub-mkimage.c: Likewise.
12986 2006-04-17 Marco Gerards <marco@gnu.org>
12988 * include/grub/script.h: Include <grub/parser.h> and
12989 "grub_script.tab.h".
12990 (struct grub_lexer_param): New struct.
12991 (struct grub_parser_param): Likewise.
12992 (grub_script_create_arglist): Pass the state in an argument.
12993 (grub_script_add_arglist): Likewise.
12994 (grub_script_create_cmdline): Likewise.
12995 (grub_script_create_cmdblock): Likewise.
12996 (grub_script_create_cmdif): Likewise.
12997 (grub_script_create_cmdmenu): Likewise.
12998 (grub_script_add_cmd): Likewise.
12999 (grub_script_arg_add): Likewise.
13000 (grub_script_lexer_ref): Likewise.
13001 (grub_script_lexer_deref): Likewise.
13002 (grub_script_lexer_record_start): Likewise.
13003 (grub_script_lexer_record_stop): Likewise.
13004 (grub_script_mem_record): Likewise.
13005 (grub_script_mem_record_stop): Likewise.
13006 (grub_script_malloc): Likewise.
13007 (grub_script_yylex): Likewise.
13008 (grub_script_yyparse): Likewise.
13009 (grub_script_yyerror): Likewise.
13010 (grub_script_yylex): Likewise.
13011 (grub_script_lexer_init): Return the state.
13013 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13014 (grub_script_lexer_done): Likewise.
13015 (grub_script_lexer_getline): Likewise.
13016 (grub_script_lexer_refs): Likewise.
13017 (script): Likewise.
13018 (newscript): Likewise.
13019 (record): Likewise.
13020 (recording): Likewise.
13021 (recordpos): Likewise.
13022 (recordlen): Likewise.
13023 (grub_script_lexer_init): Return the state instead of setting
13025 (grub_script_lexer_ref): Use the newly added argument for state
13026 instead of globals.
13027 (grub_script_lexer_deref): Likewise.
13028 (grub_script_lexer_record_start): Likewise.
13029 (grub_script_lexer_record_stop): Likewise.
13030 (recordchar): Likewise.
13031 (nextchar): Likewise.
13032 (grub_script_yylex2): Likewise.
13033 (grub_script_yylex): Likewise.
13034 (grub_script_yyerror): Likewise.
13036 * normal/parser.y (func_mem): Removed variable.
13037 (menu_entry): Likewise.
13039 (%lex-param): New parser option.
13040 (%parse-param): Likewise.
13041 (script): Always return the AST.
13042 (argument): Pass the state around.
13043 (arguments): Likewise.
13044 (grubcmd): Likewise.
13045 (commands): Likewise.
13046 (function): Likewise.
13047 (menuentry): Likewise.
13048 (if_statement): Likewise.
13051 * normal/script.c (grub_script_memused): Removed variable.
13052 (grub_script_parsed): Likewise.
13053 (grub_script_malloc): Added a state argument. Use that instead of
13055 (grub_script_mem_record): Likewise.
13056 (grub_script_mem_record_stop): Likewise.
13057 (grub_script_arg_add): Likewise.
13058 (grub_script_add_arglist): Likewise.
13059 (grub_script_create_cmdline): Likewise.
13060 (grub_script_create_cmdif): Likewise.
13061 (grub_script_create_cmdmenu): Likewise.
13062 (grub_script_add_cmd): Likewise.
13063 (grub_script_parse): Setup the state before calling the parser.
13065 2006-04-16 Marco Gerards <marco@gnu.org>
13067 * normal/command.c (grub_command_init): Remove the title command.
13069 * normal/lexer.c (grub_script_yylex): Renamed from this...
13070 (grub_script_yylex2): ... to this.
13071 (grub_script_yylex): New function. Temporary
13072 introduced to filter some tokens.
13073 (grub_script_yyerror): Print a newline.
13075 * normal/main.c (read_config_file): Output information about the
13076 lines that contain errors. Wait for a key after all lines have
13077 been processed. Don't return an empty menu.
13079 * normal/parser.y (func_mem): Don't initialize.
13080 (menu_entry): Likewise.
13081 (err): New variable.
13082 (script): Don't return anything when an error was encountered.
13083 (ws, returns): Removed rules.
13084 (argument): Disabled concatenated variable support.
13085 (arguments): Remove explicit separators.
13086 (grubcmd): Likewise.
13087 (function): Likewise.
13088 (menuentry): Likewise.
13090 (commands): Likewise. Add error handling.
13092 * normal/script.c (grub_script_create_cmdline): If
13093 `grub_script_parsed' is 0, assume the parser encountered an error.
13095 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13097 * configure.ac: Add support for EFI. Fix the typo
13098 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13100 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13102 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13103 foreign multibyte characters should be shown correctly.
13105 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13107 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13109 (read_config_file): Made it to close file before returning.
13111 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13113 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13114 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13115 video/i386/pc/vbefill.c.
13117 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13118 video/i386/pc/vbefill.c.
13120 * include/grub/video.h (grub_video_blit_format): New enum.
13121 (grub_video_mode_info): Added new member blit_format.
13122 (grub_video_get_blit_format): New function prototype.
13124 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13125 function prototype.
13126 (grub_video_vbe_map_rgb): Likewise.
13127 (grub_video_vbe_unmap_color): Likewise.
13129 * include/grub/i386/pc/vbeblit.h: New file.
13131 * include/grub/i386/pc/vbefill.h: New file.
13133 * video/video.c (grub_video_get_blit_format): New function.
13134 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13135 (grub_video_vbe_map_rgb): Likewise.
13136 (grub_video_vbe_unmap_color): Likewise.
13138 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13140 (grub_video_vbe_blit_render_target): Changed to use more optimized
13142 (grub_video_vbe_setup): Added detection for optimized settings.
13143 (grub_video_vbe_create_render_target): Likewise.
13145 * video/i386/pc/vbeblit.c: New file.
13147 * video/i386/pc/vbefill.c: New file.
13149 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13151 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13154 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13155 parsing to support both hex and dec ranges. If filename was missing
13156 show usage information.
13158 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13160 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13161 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13163 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13164 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13165 (video_mod_SOURCES): Added.
13166 (video_mod_CFLAGS): Likewise.
13167 (video_mod_LDFLAGS): Likewise.
13168 (gfxterm_mod_SOURCES): Likewise.
13169 (gfxterm_mod_CFLAGS): Likewise.
13170 (gfxterm_mod_LDFLAGS): Likewise.
13171 (videotest_mod_SOURCES): Likewise.
13172 (videotest_mod_CFLAGS): Likewise.
13173 (videotest_mod_LDFLAGS): Likewise.
13174 (vesafb_mod_SOURCES): Removed.
13175 (vesafb_mod_CFLAGS): Likewise.
13176 (vesafb_mod_LDFLAGS): Likewise.
13177 (vga_mod_SOURCES): Likewise.
13178 (vga_mod_CFLAGS): Likewise.
13179 (vga_mod_LDFLAGS): Likewise.
13181 * commands/videotest.c: New file.
13183 * font/manager.c (fill_with_default_glyph): Modified to use
13185 (grub_font_get_glyph): Likewise.
13186 (fontmanager): Renamed from this...
13187 (font_manager): ... to this.
13189 * include/grub/font.h (grub_font_glyph): Added new structure.
13190 (grub_font_get_glyph): Modified to use grub_font_glyph.
13192 * include/grub/misc.h (grub_abs): Added as inline function.
13194 * include/grub/video.h: New file.
13196 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13197 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13198 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13199 (grub_vbe_get_controller_info): Renamed from this...
13200 (grub_vbe_bios_get_controller_info): ... to this.
13201 (grub_vbe_get_mode_info): Renamed from this...
13202 (grub_vbe_bios_get_mode_info): ... to this.
13203 (grub_vbe_set_mode): Renamed from this...
13204 (grub_vbe_bios_set_mode): ... to this.
13205 (grub_vbe_get_mode): Renamed from this...
13206 (grub_vbe_bios_get_mode): ... to this.
13207 (grub_vbe_set_memory_window): Renamed from this...
13208 (grub_vbe_bios_set_memory_window): ... to this.
13209 (grub_vbe_get_memory_window): Renamed from this...
13210 (grub_vbe_bios_get_memory_window): ... to this.
13211 (grub_vbe_set_scanline_length): Renamed from this...
13212 (grub_vbe_set_scanline_length): ... to this.
13213 (grub_vbe_get_scanline_length): Renamed from this...
13214 (grub_vbe_bios_get_scanline_length): ... to this.
13215 (grub_vbe_set_display_start): Renamed from this...
13216 (grub_vbe_bios_set_display_start): ... to this.
13217 (grub_vbe_get_display_start): Renamed from this...
13218 (grub_vbe_bios_get_display_start): ... to this.
13219 (grub_vbe_set_palette_data): Renamed from this...
13220 (grub_vbe_bios_set_palette_data): ... to this.
13221 (grub_vbe_set_pixel_rgb): Removed.
13222 (grub_vbe_set_pixel_index): Likewise.
13224 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13226 (grub_vbe_bios_get_controller_info): ... to this.
13227 (grub_vbe_get_mode_info): Renamed from this...
13228 (grub_vbe_bios_get_mode_info): ... to this.
13229 (grub_vbe_set_mode): Renamed from this...
13230 (grub_vbe_bios_set_mode): ... to this.
13231 (grub_vbe_get_mode): Renamed from this...
13232 (grub_vbe_bios_get_mode): ... to this.
13233 (grub_vbe_set_memory_window): Renamed from this...
13234 (grub_vbe_bios_set_memory_window): ... to this.
13235 (grub_vbe_get_memory_window): Renamed from this...
13236 (grub_vbe_bios_get_memory_window): ... to this.
13237 (grub_vbe_set_scanline_length): Renamed from this...
13238 (grub_vbe_set_scanline_length): ... to this.
13239 (grub_vbe_get_scanline_length): Renamed from this...
13240 (grub_vbe_bios_get_scanline_length): ... to this.
13241 (grub_vbe_set_display_start): Renamed from this...
13242 (grub_vbe_bios_set_display_start): ... to this.
13243 (grub_vbe_get_display_start): Renamed from this...
13244 (grub_vbe_bios_get_display_start): ... to this.
13245 (grub_vbe_set_palette_data): Renamed from this...
13246 (grub_vbe_bios_set_palette_data): ... to this.
13247 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13248 getting corrupted after calling it. Added more pushes and pops.
13249 (grub_vbe_bios_set_mode): Likewise.
13250 (grub_vbe_bios_get_mode): Likewise.
13251 (grub_vbe_bios_get_memory_window): Likewise.
13252 (grub_vbe_bios_set_scanline_length): Likewise.
13253 (grub_vbe_bios_get_scanline_length): Likewise.
13254 (grub_vbe_bios_get_display_start): Likewise.
13255 (grub_vbe_bios_set_palette_data): Likewise.
13257 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13258 (cl_insert): Likewise.
13259 (cl_delete): Likewise.
13261 * term/gfxterm.c: New file.
13263 * term/i386/pc/vesafb.c: Removed file.
13265 * video/video.c: New file.
13267 * video/i386/pc/vbe.c (real2pm): Added new function.
13268 (grub_video_vbe_draw_pixel): Likewise.
13269 (grub_video_vbe_get_video_ptr): Likewise.
13270 (grub_video_vbe_get_pixel): Likewise
13271 (grub_video_vbe_init): Likewise.
13272 (grub_video_vbe_fini): Likewise.
13273 (grub_video_vbe_setup): Likewise.
13274 (grub_video_vbe_get_info): Likewise.
13275 (grub_video_vbe_set_palette): Likewise.
13276 (grub_video_vbe_get_palette): Likewise.
13277 (grub_video_vbe_set_viewport): Likewise.
13278 (grub_video_vbe_get_viewport): Likewise.
13279 (grub_video_vbe_map_color): Likewise.
13280 (grub_video_vbe_map_rgb): Likewise.
13281 (grub_video_vbe_map_rgba): Likewise.
13282 (grub_video_vbe_unmap_color): Likewise.
13283 (grub_video_vbe_fill_rect): Likewise.
13284 (grub_video_vbe_blit_glyph): Likewise.
13285 (grub_video_vbe_blit_bitmap): Likewise.
13286 (grub_video_vbe_blit_render_target): Likewise.
13287 (grub_video_vbe_scroll): Likewise.
13288 (grub_video_vbe_swap_buffers): Likewise.
13289 (grub_video_vbe_create_render_target): Likewise.
13290 (grub_video_vbe_delete_render_target): Likewise.
13291 (grub_video_vbe_set_active_render_target): Likewise.
13292 (grub_vbe_set_pixel_rgb): Remove function.
13293 (grub_vbe_set_pixel_index): Likewise.
13294 (index_color_mode): Remove static variable.
13295 (active_mode): Likewise.
13296 (framebuffer): Likewise.
13297 (bytes_per_scan_line): Likewise.
13298 (grub_video_vbe_adapter): Added new static variable.
13299 (framebuffer): Likewise.
13300 (render_target): Likewise.
13301 (initial_mode): Likewise.
13302 (mode_in_use): Likewise.
13303 (mode_list): Likewise.
13305 2006-03-10 Marco Gerards <marco@gnu.org>
13307 * configure.ac (AC_INIT): Bumped to 1.93.
13309 * DISTLIST: Added `include/grub/hfs.h'.
13311 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13313 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13314 18H, which might help the BIOS falling back to next boot media.
13316 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13318 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13319 Poe Chen <poe.poechen@gmail.com>.
13321 2006-01-17 Marco Gerards <marco@gnu.org>
13323 * include/grub/normal.h: Include <grub/script.h>.
13324 (grub_command_list): Removed struct.
13325 (grub_command_list_t): Removed type.
13326 (grub_menu_entry): Remove members `num' and `command_list'. Add
13327 members `commands' and `sourcecode'.
13328 * include/grub/script.h: Add inclusion guards.
13329 (grub_script_cmd_menuentry): New struct.
13330 (grub_script_execute_menuentry): New prototype.
13331 (grub_script_lexer_record_start): Likewise.
13332 (grub_script_lexer_record_stop): Likewise.
13333 * normal/execute.c (grub_script_execute_menuentry): New function.
13334 * normal/lexer.c (record, recording, recordpos, recordlen): New
13336 (grub_script_lexer_record_start): New function.
13337 (grub_script_lexer_record_stop): Likewise.
13338 (recordchar): Likewise.
13339 (nextchar): Likewise.
13340 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13341 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13342 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13343 (current_menu): New variable.
13344 (free_menu): Mainly rewritten.
13345 (grub_normal_menu_addentry): New function.
13346 (read_config_file): Rewritten.
13347 * normal/menu.c (run_menu_entry): Mainly rewritten.
13348 * normal/menu_entry.c (make_screen): Rewritten the code to insert
13350 (run): Mainly rewritten.
13351 * normal/parser.y (menu_entry): New variable.
13352 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13353 (menuentry): New rule.
13354 (command): Add `menuentry'.
13355 (if_statement): Allow additional returns before `fi'.
13356 * normal/script.c (grub_script_create_cmdmenu): New function.
13358 2006-01-03 Marco Gerards <marco@gnu.org>
13360 * INSTALL: GNU Bison is required.
13361 * configure.ac: Rewritten the test to detect Bison.
13362 * Makefile.in (YACC): New variable. Reported by Xun Sun
13363 <xun.sun.cn@gmail.com>.
13365 2006-01-03 Marco Gerards <marco@gnu.org>
13367 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13368 the HFS+ filesystem to filesystem blocks.
13369 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13370 GCC warning is silenced.
13372 2006-01-03 Marco Gerards <marco@gnu.org>
13374 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13375 read from disk from big endian to host byte order.
13377 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13379 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13381 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13382 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13383 embedded HFS+ filesystem.
13384 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13385 (grub_hfs_sblock): Move from here...
13386 * include/grub/hfs.h: To here... New file.
13387 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13389 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13391 (grub_hfsplus_volheader): Change type of member `magic' to
13393 (grub_hfsplus_data): Add new member `embedded_offset'.
13394 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13396 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13397 Calculate the offset.
13399 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13401 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13403 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13405 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13407 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13408 ENV->NAME is NULL after allocating ENV->VALUE.
13410 2005-12-25 Marco Gerards <marco@gnu.org>
13412 * kern/env.c (grub_env_set): Rewritten the error handling code.
13414 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13416 * geninit.sh: Made more robust, and more portable.
13418 2005-12-25 Marco Gerards <marco@gnu.org>
13420 Add support for Apple HFS+ filesystems.
13422 * fs/hfsplus.c: New file.
13424 * DISTLIST: Added `fs/hfsplus.c'.
13426 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13427 (hfsplus_mod_SOURCES): New variable.
13428 (hfsplus_mod_CFLAGS): Likewise.
13429 (hfsplus_mod_LDFLAGS): Likewise.
13430 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13431 (grub_setup_SOURCES): Likewise.
13432 (grub_mkdevicemap_SOURCES): Likewise.
13433 (grub_emu_SOURCES): Likewise.
13434 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13436 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13438 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13440 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13442 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13443 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13444 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13445 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13446 normal/lexer.c, normal/parser.y, normal/script.c, and
13448 Removed kern/sparc64/cache.c.
13450 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13451 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13454 * configure.ac (AC_INIT): Bumped to 1.92.
13456 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13458 * kern/err.c (grub_error_push): Added new function to support error
13460 (grub_error_pop): Likewise.
13461 (grub_error_stack_items): New local variable to support error stacks.
13462 (grub_error_stack_pos): Likewise.
13463 (grub_error_stack_assert): Likewise.
13464 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13466 (grub_print_error): Added support to print errors from error stack.
13468 * include/grub/err.h (grub_error_push): Added function prototype.
13469 (grub_error_pop): Likewise.
13471 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13473 * configure.ac: Accept `powerpc64' as host_cpu.
13474 (amd64): Rename to `biarch32'.
13476 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13477 non-cacheline-aligned addresses.
13479 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13480 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13481 if `size' is non-zero.
13483 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
13485 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13486 and `cd' to make sure the filename is not prefixed with a
13488 (pkgdata_MODULES): Add `gpt.mod'.
13489 (gpt_mod_SOURCES): New variable.
13490 (gpt_mod_CFLAGS): Likewise.
13491 (gpt_mod_LDFLAGS): Likewise.
13493 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13495 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13498 * partmap/gpt.c: New file.
13500 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13501 GPT partition map is detected.
13503 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13505 * commands/i386/pc/play.c: New file.
13506 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13507 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13510 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
13512 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13513 ((unused))' to silence gcc warning.
13515 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13517 * configure.ac: Correct `AC_PROG_YACC' test.
13519 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13521 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13522 check before installing files.
13524 2005-11-22 Mike Small <smallm@panix.com>
13526 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13527 number regex so multidigit numbers are recognized correctly.
13529 2005-11-22 Mike Small <smallm@panix.com>
13531 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13532 debugging message before attempting to claim memory.
13533 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13534 multiple addresses in case of failure.
13536 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13538 * term/tparm.c (get_space): Remove empty `if' statement.
13540 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13542 * kern/parser.c (check_varstate): Rename `state' to 's'.
13544 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13546 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13547 variable definitions to the beginning of each function. Sort stack
13549 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13550 `buf' argument to `char *'.
13552 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13554 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13555 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13556 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13557 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13558 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13559 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13560 configfile.mod, search.mod, gzio.mod and test.mod.
13561 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13562 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13563 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13564 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13565 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13566 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13567 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13568 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13569 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13570 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13571 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13572 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13573 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13574 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13575 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13576 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13577 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13578 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13579 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13580 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13581 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13582 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13583 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13585 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13587 (pkgdata_MODULES): Add test.mod.
13589 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13591 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13592 appending to variables with "+=".
13593 (PModule): Use full pathname to generate *.lst filenames.
13595 * Makefile.in: Fixed list rules moved from genmk.rb.
13596 (.DELETE_ON_ERROR): New special target.
13597 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13599 * conf/i386-pc.rmk: Include conf/common.mk.
13600 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13601 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13602 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13603 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13604 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13605 configfile.mod, search.mod, gzio.mod and test.mod.
13606 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13607 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13608 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13609 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13610 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13611 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13612 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13613 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13614 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13615 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13616 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13617 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13618 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13619 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13620 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13621 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13622 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13623 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13624 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13625 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13626 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13627 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13628 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13630 * conf/common.rmk: ... to here. New file.
13632 * conf/common.mk: New file.
13634 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13636 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13637 (grub_script.tab.c): ... here.
13639 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13640 (grub_script.tab.c): ... here.
13642 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13643 (grub_script.tab.c): ... here.
13645 * normal/command.c (grub_command_find): Fixed a memory leak of
13646 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13648 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13650 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13651 "@" which marks the start of a comment on ARM.
13652 (VARIABLE): Likewise.
13654 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13656 Add support for Linux/ADFS partition tables.
13658 * partmap/acorn.c: New file.
13660 * include/grub/acorn_filecore.h: Likewise.
13662 * DISTLIST: Added `partmap/acorn.c' and
13663 `include/grub/acorn_filecore.h'.
13665 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13667 (pkgdata_MODULES): Add `acorn.mod'.
13668 (acorn_mod_SOURCES): New variable.
13669 (acorn_mod_CFLAGS): Likewise.
13671 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13673 (pkgdata_MODULES): Add `acorn.mod'.
13674 (acorn_mod_SOURCES): New variable.
13675 (acorn_mod_CFLAGS): Likewise.
13677 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13678 (pkgdata_MODULES): Add `acorn.mod'.
13679 (acorn_mod_SOURCES): New variable.
13680 (acorn_mod_CFLAGS): Likewise.
13681 (acorn_mod_LDFLAGS): Likewise.
13683 * include/types.h (grub_disk_addr_t): New typedef.
13685 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
13687 * geninit.sh: New file.
13689 * geninitheader.sh: Likewise.
13691 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13692 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13693 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13694 * commands/configfile.c (grub_configfile_init)
13695 (grub_configfile_fini): Likewise.
13696 * commands/default.c (grub_default_init, grub_default_fini):
13698 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13699 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13700 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13701 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13703 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13704 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13706 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13707 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13709 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13711 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13713 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13714 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13715 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13716 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13717 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13718 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13719 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13720 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13721 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13722 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13723 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13724 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13725 * partmap/amiga.c (grub_amiga_partition_map_init)
13726 (grub_amiga_partition_map_fini): Likewise.
13727 * partmap/apple.c (grub_apple_partition_map_init)
13728 (grub_apple_partition_map_fini): Likewise.
13729 * partmap/pc.c (grub_pc_partition_map_init)
13730 (grub_pc_partition_map_fini): Likewise.
13731 * partmap/sun.c (grub_sun_partition_map_init,
13732 grub_sun_partition_map_fini): Likewise.
13733 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13736 * util/grub-emu.c: Include <grub_modules_init.h>.
13737 (main): Don't initialize and de-initialize any modules directly,
13738 use `grub_init_all' and `grub_fini_all' instead.
13740 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13741 `grub_vesafb_mod_init'.
13742 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13744 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13745 `grub_vga_mod_init'. Updated all users.
13746 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13748 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13749 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13752 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13753 Generate a function to initialize the module in utilities.
13754 Updated all callers.
13755 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13756 initialize the module in utilities. Updated all callers.
13758 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13760 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13761 escape sequence and a literal ^L to clear the screen.
13763 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13764 when returning from Open Firmware.
13766 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13768 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13769 (grub_ofconsole_height): Likewise.
13770 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13771 manually insert a '\n'.
13772 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13773 `grub_ofconsole_height'. Return early if these are already set.
13775 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13777 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13778 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13779 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13780 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13781 and `normal/script.c'.
13782 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13783 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13784 (test_mod_SOURCES): New variable.
13785 (test_mod_CFLAGS): Likewise.
13786 (test_mod_LDFLAGS): Likewise.
13787 (pkgdata_MODULES): Add `test.mod'.
13788 (grub_script.tab.c): New rule.
13789 (grub_script.tab.h): Likewise.
13791 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
13793 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13794 `commands/test.c', `normal/execute.c', `normal/lexer.c',
13795 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13796 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13797 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13798 (test_mod_SOURCES): New variable.
13799 (test_mod_CFLAGS): Likewise.
13800 (pkgdata_MODULES): Add `test.mod'.
13801 (grub_script.tab.c): New rule.
13802 (grub_script.tab.h): Likewise.
13804 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
13806 Add initial scripting support.
13808 * commands/test.c: New file.
13809 * include/grub/script.h: Likewise.
13810 * normal/execute.c: Likewise.
13811 * normal/function.c: Likewise.
13812 * normal/lexer.c: Likewise.
13813 * normal/parser.y: Likewise.
13814 * normal/script.c: Likewise.
13816 * configure.ac: Add `AC_PROG_YACC' test.
13818 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13819 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13820 `normal/function.c' and `normal/script.c'.
13821 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13822 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13823 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13825 (pkgdata_MODULES): Add `test.mod'.
13826 (grub_script.tab.c): New rule.
13827 (grub_script.tab.h): Likewise.
13829 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13831 * include/grub/normal.h (grub_test_init): New prototype.
13832 (grub_test_fini): Likewise.
13834 * normal/command.c: Include <grub/script.h>.
13835 (grub_command_execute): Rewritten.
13837 * util/grub-emu.c (main): Call `grub_test_init' and
13840 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13842 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13844 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13845 there are no pending characters.
13847 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13849 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13850 `grub_strndup' to drop device arguments. Replace unnecessary
13851 `grub_strndup' with `grub_strdup'.
13853 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13855 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13856 `debug' environment variable has been set.
13858 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
13860 * Makefile.in (install-local): Use $(DATA).
13861 (uninstall): Likewise.
13862 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13863 (sbin_UTILITIES): ... to here.
13864 (sbin_SCRIPTS): New variable.
13865 (grub_install_SOURCES): New variable.
13866 * util/powerpc/ieee1275/grub-install.in: New file.
13867 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13869 (add_segments): Call `grub_util_get_path'.
13871 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13873 From Timothy Baldwin:
13874 * commands/ls.c (grub_ls_list_files): Close FILE with
13876 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13878 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
13880 * include/grub/parser.h: New file.
13882 * kern/parser.c: Likewise.
13884 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13885 (grub_setup_SOURCES): Likewise.
13886 (grub_probefs_SOURCES): Likewise.
13887 (grub_emu_SOURCES): Likewise.
13888 (kernel_img_HEADERS): Add `parser.h'.
13890 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13891 (grub_emu_SOURCES): Add `kern/parser.c'.
13892 (grubof_SOURCES): Likewise.
13894 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13895 (grubof_SOURCES): Add `kern/parser.c'.
13897 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13899 * kern/misc.c (grub_split_cmdline): Removed function.
13901 * kern/rescue.c: Include <grub/parser.h>.
13902 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13903 of `grub_split_cmdline'.
13905 * normal/command.c: Include <grub/parser.h>.
13906 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13907 of `grub_split_cmdline'.
13909 * normal/completion.c: Include <grub/parser.h>.
13910 (cmdline_state): New variable.
13911 (iterate_dir): End the filename with a quote depending on the
13912 command line state.
13913 (get_state): new function.
13914 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13915 split the arguments and determine the current argument. When the
13916 argument string is not quoted, escape all spaces.
13918 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13920 * normal/sparc64/setjmp.S: New file.
13922 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13924 * include/grub/sparc64/libgcc.h: New file.
13925 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13926 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13927 normal/sparc64/setjmp.c.
13929 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13931 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13932 * kern/sparc64/cache.S: New file.
13933 * kern/sparc64/cache.c: Removed.
13934 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13935 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13937 (COMMON_LDFLAGS): Add -melf64_sparc.
13938 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13939 (grubof_SOURCES): Use cache.S instead of cache.c.
13940 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13941 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13942 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13944 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13945 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13946 (linux_mod_CFLAGS): Commented out.
13947 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13948 out because module isn't built.
13949 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13950 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13951 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13952 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13953 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13954 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13955 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13956 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13957 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13958 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13959 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13960 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13961 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13962 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13964 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13966 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13967 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13968 longer, because HFS should not be used on PC.
13970 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13972 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13973 consistently within the loop.
13975 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
13977 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13978 directory can not be read.
13980 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13982 * configure.ac (AC_INIT): Increase the version number to 1.91.
13984 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13985 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13986 term/i386/pc/serial.c.
13988 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13990 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13991 file size must be permitted.
13993 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13994 between %ah and %al.
13996 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13998 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14000 Call the hook with a NUL-terminated filename.
14001 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14004 * kern/term.c (cursor_state): New variable.
14005 (grub_term_set_current): Reset the cursor state on a new
14007 (grub_setcursor): Rewritten to use CURSOR_STATE.
14008 (grub_getcursor): New function.
14010 * include/grub/term.h (grub_getcursor): New prototype.
14012 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14013 integers on ARM. Reported by Timothy Baldwin
14014 <T.E.Baldwin99@members.leeds.ac.uk>.
14016 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
14018 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14020 (grub_sfs_dir): Likewise.
14022 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
14024 Add support for the SFS filesystem.
14026 * fs/sfs.c: New file.
14028 * DISTLIST: Added `fs/sfs.c'.
14030 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14031 (grub_probefs_SOURCES): Likewise.
14032 (grub_emu_SOURCES): Likewise.
14033 (pkgdata_MODULES): Add `sfs.mod'.
14034 (sfs_mod_SOURCES): New variable.
14035 (sfs_mod_CFLAGS): Likewise.
14036 (sfs_mod_LDFLAGS): Likewise.
14038 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14039 (pkgdata_MODULES): Add `sfs.mod'.
14040 (sfs_mod_SOURCES): New variable.
14041 (sfs_mod_CFLAGS): Likewise.
14043 * util/grub-emu.c (main): Call `grub_sfs_init' and
14046 * include/grub/fs.h (grub_sfs_init): New prototype.
14047 (grub_sfs_fini): Likewise.
14049 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
14051 Add support for the AFFS filesystem.
14053 * fs/affs.c: New file.
14055 * DISTLIST: Added `fs/affs.c'.
14057 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14058 (grub_probefs_SOURCES): Likewise.
14059 (grub_emu_SOURCES): Likewise.
14060 (pkgdata_MODULES): Add `affs.mod'.
14061 (affs_mod_SOURCES): New variable.
14062 (affs_mod_CFLAGS): Likewise.
14063 (affs_mod_LDFLAGS): Likewise.
14065 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14066 (pkgdata_MODULES): Add `affs.mod'.
14067 (affs_mod_SOURCES): New variable.
14068 (affs_mod_CFLAGS): Likewise.
14070 * util/grub-emu.c (main): Call `grub_affs_init' and
14073 * include/grub/fs.h (grub_affs_init): New prototype.
14074 (grub_affs_fini): Likewise.
14076 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14078 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14080 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14082 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14085 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14088 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14089 (COMMON_LDFLAGS): New variable.
14090 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14091 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14092 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14093 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14094 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14095 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14096 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14097 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14098 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14099 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14100 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14101 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14102 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14103 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14104 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14106 (normal_mod_ASFLAGS): Add `-m32'.
14108 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14109 (grub_host_size_t, grub_host_ssize_t): New types.
14110 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14111 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14112 `GRUB_HOST_SIZEOF_VOID_P'.
14114 * include/grub/kernel.h (struct grub_module_header): Type of
14115 member offset changed to `grub_host_off_t'. Type of member size
14116 changed to `grub_host_size_t'.
14117 (struct grub_module_info): Type of member offset changed to
14118 `grub_host_off_t'. Type of member size changed to
14119 `grub_host_size_t'.
14121 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14123 Make GRUB's kernel compliant to Multiboot Specification.
14125 * kern/i386/pc/startup.S (multiboot_header): New label.
14126 (multiboot_entry): Likewise.
14127 (multiboot_trampoline): Likewise.
14129 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14130 Increased to 0x4A0.
14132 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14133 put parentheses after a question mark.
14134 [!GRUB_UTIL] (my_mod): New variable.
14136 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14138 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
14140 Adds support for the XFS filesystem. Btrees are not supported
14143 * fs/xfs.c: New file.
14145 * DISTLIST: Added `fs/xfs.c'.
14147 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14148 (grub_probefs_SOURCES): Likewise.
14149 (grub_emu_SOURCES): Likewise.
14150 (pkgdata_MODULES): Add `xfs.mod'.
14151 (xfs_mod_SOURCES): New variable.
14152 (xfs_mod_CFLAGS): Likewise.
14154 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14155 (pkgdata_MODULES): Add `xfs.mod'.
14156 (xfs_mod_SOURCES): New variable.
14157 (xfs_mod_CFLAGS): Likewise.
14159 * util/grub-emu.c (main): Call `grub_xfs_init' and
14162 * include/grub/fs.h (grub_xfs_init): New prototype.
14163 (grub_xfs_fini): Likewise.
14166 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14168 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14169 color modes, allow greater than 16 colors to be configured as
14172 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14174 * normal/completion.c (complete_arguments): Add the qualifier
14175 const into OPTIONS.
14177 From Omniflux <omniflux+lists@omniflux.com>:
14178 * include/grub/terminfo.h: New file.
14179 * include/grub/tparm.h: Likewise.
14180 * include/grub/i386/pc/serial.h: Likewise.
14181 * term/terminfo.c: Likewise.
14182 * term/tparm.c: Likewise.
14183 * term/i386/pc/serial.c: Likewise.
14184 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14186 (terminfo_mod_SOURCES): New variable.
14187 (terminfo_mod_CFLAGS): Likewise.
14188 (serial_mod_SOURCES): Likewise.
14189 (serial_mod_CFLAGS): Likewise.
14191 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14193 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14194 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14195 and kern/powerpc/ieee1275/cmain.c, respectively.
14197 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14198 * kern/powerpc/ieee1275/crt0.S: ... here.
14200 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14201 * kern/powerpc/ieee1275/cmain.c: ... here.
14203 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14204 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14205 instead of boot/powerpc/ieee1275/crt0.S and
14206 boot/powerpc/ieee1275/cmain.c, respectively.
14208 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14209 sectors. It was not used anyway.
14211 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14213 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14214 `unused parameter' warning.
14216 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14218 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14220 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14223 2005-08-28 Marco Gerards <metgerards@student.han.nl>
14225 * include/grub/normal.h (enum grub_completion_type): Added
14226 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14228 * normal/cmdline.c (print_completion): Handle
14229 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14230 * normal/menu_entry.c (store_completion): Likewise.
14232 * normal/completion.c (complete_arguments): New function.
14233 (grub_normal_do_completion): Call `complete_arguments' when the
14234 current words start with a dash.
14236 2005-08-27 Marco Gerards <metgerards@student.han.nl>
14238 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14239 `gzio.mod' instead of `io.mod').
14241 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14243 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14244 (DISTDIRS): Added io and video.
14245 Rewrite the search routine to make an output consistently.
14247 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14248 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14249 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14250 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14251 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14252 util/powerpc/ieee1275/misc.c.
14254 * include/grub/gzio.h: New file.
14255 * io/gzio.c: Likewise.
14257 * kern/file.c (grub_file_close): Call grub_device_close only if
14258 FILE->DEVICE is not NULL.
14260 * include/grub/mm.h [!NULL] (NULL): New macro.
14262 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14264 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14265 (pkgdata_MODULES): Added gzio.mod.
14266 (gzio_mod_SOURCES): New variable.
14267 (gzio_mod_CFLAGS): Likewise.
14269 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14270 (pkgdata_MODULES): Added gzio.mod.
14271 (gzio_mod_SOURCES): New variable.
14272 (gzio_mod_CFLAGS): Likewise.
14274 * commands/cat.c: Include grub/gzio.h.
14275 (grub_cmd_cat): Use grub_gzfile_open instead of
14278 * commands/cmp.c: Include grub/gzio.h.
14279 (grub_cmd_cmp): Use grub_gzfile_open instead of
14282 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14283 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14285 (grub_rescue_cmd_module): Likewise.
14287 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14289 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14290 kern/sparc64/ieee1275/init.c because it contains _start.
14291 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14293 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14295 * configure.ac: Add support for sparc64 host with ieee1275
14297 * configure: Generated from configure.ac.
14298 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14300 (grub_ofdisk_read): Likewise.
14301 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14302 pointers as (void *) to remove a warning.
14303 (grub_ofdisk_close): Likewise.
14304 (grub_ofdisk_read): Likewise.
14305 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14306 returns, so make it return void to remove a warning.
14307 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14308 Corresponding prototype change.
14309 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14310 values, and cast the pointers as (void *) to remove a warning.
14311 (grub_mm_dump): Likewise.
14312 * conf/sparc64-ieee1275.mk: New file.
14313 * conf/sparc64-ieee1275.rmk: Likewise.
14314 * include/grub/sparc64/setjmp.h: Likewise.
14315 * include/grub/sparc64/types.h: Likewise.
14316 * include/grub/sparc64/ieee1275/console.h: Likewise.
14317 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14318 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14319 * include/grub/sparc64/ieee1275/time.h: Likewise.
14320 * kern/sparc64/cache.c: Likewise.
14321 * kern/sparc64/dl.c: Likewise.
14322 * kern/sparc64/ieee1275/init.c: Likewise.
14323 * kern/sparc64/ieee1275/openfw.c: Likewise.
14325 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14327 * util/console.c (grub_ncurses_putchar): If C is greater than
14328 0x7f, set C to a question mark.
14329 (grub_ncurses_getcharwidth): New function.
14330 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14333 * normal/menu.c (print_entry): Made aware of Unicode. First,
14334 convert TITLE to UCS-4, and predict the cursor position by
14337 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14339 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14341 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14343 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14344 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14347 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14348 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14349 grub_strcpy and grub_strlen. Take it into account that a space
14350 character is inserted as a delimiter.
14352 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14354 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14355 invalid magic in the error.
14357 * commands/search.c: New file.
14359 * util/grub-emu.c (main): Call grub_search_init and
14362 * kern/rescue.c (grub_rescue_print_disks): Removed.
14363 (grub_rescue_print_devices): New function.
14364 (grub_rescue_cmd_ls): Use grub_device_iterate with
14365 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14366 grub_rescue_print_disks.
14368 * kern/partition.c (grub_partition_iterate): Return the result of
14369 PARTMAP->ITERATE instead of GRUB_ERRNO.
14371 * kern/device.c: Include grub/partition.h.
14372 (grub_device_iterate): New function.
14374 * include/grub/partition.h (grub_partition_iterate): Return int
14375 instead of grub_err_t.
14377 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14379 [GRUB_UTIL] (grub_search_fini): Likewise.
14381 * include/grub/device.h (grub_device_iterate): New prototype.
14383 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14385 (pkgdata_MODULES): Added search.mod.
14386 (search_mod_SOURCES): New variable.
14387 (search_mod_CFLAGS): Likewise.
14389 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14390 (pkgdata_MODULES): Added search.mod.
14391 (search_mod_SOURCES): New variable.
14392 (search_mod_CFLAGS): Likewise.
14394 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14395 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14396 All callers changed.
14398 * DISTLIST: Added commands/search.c.
14400 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14402 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14404 (grub_getcharwidth): New function.
14406 * kern/misc.c (grub_utf8_to_ucs4): New function.
14408 * include/grub/term.h (struct grub_term): Added a new member
14410 (grub_getcharwidth): New prototype.
14412 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14414 * term/i386/pc/console.c (map_char): New function. Segregated from
14415 grub_console_putchar.
14416 (grub_console_putchar): Use map_char.
14417 (grub_console_getcharwidth): New function.
14418 (grub_console_term): Specified grub_console_getcharwidth as
14421 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14422 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14424 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14426 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14427 on grub_strtoul completely.
14428 (write_char): Declare local variables in the beginning of the
14430 (grub_vesafb_getcharwidth): New function.
14431 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14434 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14436 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14437 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14438 commands/i386/pc/vbetest.c.
14440 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14441 call grub_vbe_get_controller_info again, because the returned
14442 information is volatile.
14443 (grub_vbe_set_video_mode): Mostly rewritten.
14444 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14445 grub_vbe_status_t correctly.
14446 (grub_vbe_get_video_mode_info): Likewise.
14447 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14448 several if statements.
14450 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14451 * commands/i386/pc/vbeinfo.c: ... this.
14453 * commands/i386/pc/vbe_test.c: Renamed to ...
14454 * commands/i386/pc/vbetest.c: ... this.
14456 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14458 (grub_cmd_vbeinfo): ... this. Save video modes before
14459 iterating. Skip a video mode, if it is not available, not enough
14460 information is given or it is monochrome. Show the memory
14461 model. Leave the interpretation of MODEVAR to grub_strtoul
14463 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14464 (GRUB_MOD_FINI): Likewise.
14466 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14467 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14468 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14469 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14470 grub_strtoul completely.
14471 (real2pm): Removed.
14472 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14473 (GRUB_MOD_FINI): Likewise.
14475 * normal/misc.c: Include grub/mm.h.
14477 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14478 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14479 (vbe_list_modes_mod_SOURCES): Removed.
14480 (vbe_list_modes_mod_CFLAGS): Likewise.
14481 (vbe_test_mod_SOURCES): Likewise.
14482 (vbe_test_mod_CFLAGS): Likewise.
14483 (vbeinfo_mod_SOURCES): New variable.
14484 (vbeinfo_mod_CFLAGS): Likewise.
14485 (vbetest_mod_SOURCES): Likewise.
14486 (vbetest_mod_CFLAGS): Likewise.
14488 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14490 * normal/misc.c: New file.
14492 * DISTLIST: Added normal/misc.c.
14494 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14495 DISK to HOOK. Call HOOK with DISK.
14496 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14497 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14498 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14500 * normal/menu_entry.c (struct screen): Added a new member
14501 "completion_shown".
14502 (completion_buffer): New global variable.
14503 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14504 (store_completion): New function.
14505 (complete): Likewise.
14506 (clear_completions): Likewise.
14507 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14508 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14509 a tab, call complete.
14511 * normal/completion.c (disk_dev): Removed.
14512 (print_simple_completion): Likewise.
14513 (print_partition_completion): Likewise.
14514 (print_func): New global variable.
14515 (add_completion): Do not take the arguments WHAT or PRINT any
14516 longer. Added a new argument TYPE. Instead of printing directly,
14517 call PRINT_FUNC if not NULL.
14518 All callers changed.
14519 (complete_device): Use a local variable DEV instead of
14520 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14521 (grub_normal_do_completion): Take a new argument HOOK. Do not
14522 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14523 empty string, return NULL instead.
14524 All callers changed.
14526 * normal/cmdline.c (print_completion): New function.
14528 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14530 All callers changed.
14532 * kern/disk.c (grub_print_partinfo): Removed.
14534 * include/grub/partition.h (struct grub_partition_map): Add a new
14535 argument DISK into HOOK of ITERATE.
14536 (grub_partition_iterate): Add a new argument DISK to HOOK.
14538 * include/grub/normal.h (enum grub_completion_type): New enum.
14539 (grub_completion_type_t): New type.
14540 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14541 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14542 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14543 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14544 (grub_normal_do_completion): Added a new argument HOOK.
14545 (grub_normal_print_device_info): New prototype.
14547 * include/grub/disk.h (grub_print_partinfo): Removed.
14549 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14550 (normal_mod_SOURCES): Likewise.
14551 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14552 (normal_mod_SOURCES): Likewise.
14554 * commands/ls.c (grub_ls_list_disks): Use
14555 grub_normal_print_device_info instead of grub_print_partinfo. Free
14557 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14558 duplicating the code.
14560 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14562 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14563 follow GCS more precisely.
14564 * commands/i386/pc/vbe_test.c: Likewise.
14565 * include/grub/i386/pc/vbe.h: Likewise.
14566 * term/i386/pc/vesafb.c: Likewise.
14567 * video/i386/pc/vbe.c: Likewise.
14569 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14571 * DISTLIST: Added term/i386/pc/vesafb.c
14572 DISTLIST: Added video/i386/pc/vbe.c
14573 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14574 DISTLIST: Added commands/i386/pc/vbe_test.c.
14575 * commands/i386/pc/vbe_list_modes.c: New file.
14576 * commands/i386/pc/vbe_test.c: Likewise.
14577 * term/i386/pc/vesafb.c: Likewise.
14578 * video/i386/pc/vbe.c: Likewise.
14579 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14580 (grub_vbe_probe) Added prototype.
14581 (grub_vbe_set_video_mode) Likewise.
14582 (grub_vbe_get_video_mode) Likewise.
14583 (grub_vbe_get_video_mode_info) Likewise.
14584 (grub_vbe_set_pixel_rgb) Likewise.
14585 (grub_vbe_set_pixel_index) Likewise.
14586 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14587 (pkgdata_MODULES): Added vesafb.mod.
14588 (pkgdata_MODULES): Added vbe_list_modes.mod.
14589 (pkgdata_MODULES): Added vbe_test.mod.
14590 (vbe_mod_SOURCES): Added.
14591 (vbe_mod_CFLAGS): Likewise.
14592 (vesafb_mod_SOURCES): Likewise.
14593 (vesafb_mod_CFLAGS): Likewise.
14594 (vbe_list_modes_mod_SOURCES): Likewise.
14595 (vbe_list_modes_mod_CFLAGS): Likewise.
14596 (vbe_test_mod_SOURCES): Likewise.
14597 (vbe_test_mod_CFLAGS): Likewise.
14599 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14601 * normal/command.c (grub_command_execute): If INTERACTIVE is
14602 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14603 CMDLINE. Disable the pager if INTERACTIVE is true.
14604 All callers are changed.
14606 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14607 before reading a config file.
14608 * normal/main.c (read_config_file): Even if a command is not
14609 found, register it if it is within an entry.
14611 * util/grub-emu.c: Include sys/types.h and unistd.h.
14612 (options): Added --hold.
14613 (struct arguments): Added a new member "hold".
14614 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14616 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14617 cleared by a debugger, if it is not zero.
14619 * include/grub/normal.h (grub_command_execute): Add an argument
14622 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14624 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14626 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14628 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14629 program with another one, because the old one didn't detect a bug
14630 in gcc-3.4. Always use regparm 2, because the new test is still
14631 not enough for gcc-4.0. Someone must investigate a simple test
14632 case which detects a bug in gcc-4.0.
14634 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14636 * DISTLIST: Added normal/completion.c.
14638 * normal/completion.c: New file.
14640 * term/i386/pc/console.c (grub_console_getwh): New function.
14641 (grub_console_term): Assign grub_console_getwh to getwh.
14643 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14644 function is defined in normal/completion.c as
14645 grub_normal_do_completion.
14646 (grub_cmdline_get): Use grub_normal_do_completion instead of
14649 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14650 returns non-zero, otherwise return 0.
14651 (grub_partition_iterate): First, probe the partition map. Then,
14652 call ITERATE only for this partition map.
14654 * kern/misc.c (grub_strncmp): Rewritten.
14656 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14657 returns non-zero. Otherwise return 0.
14659 * include/grub/partition.h (grub_partition_map_iterate): Return
14660 int instead of void.
14662 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14664 * include/grub/misc.h (grub_strncmp): Change the type of N to
14667 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14670 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14671 unsigned explicitly before comparing it with I.
14673 * kern/main.c (grub_env_write_root): Add the attribute unused into
14676 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14677 normal/completion.c.
14678 (normal_mod_SOURCES): Likewise.
14679 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14680 (normal_mod_SOURCES): Likewise.
14682 * normal/command.c (grub_iterate_commands): If ITERATE returns
14683 non-zero, return one immediately.
14685 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
14687 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14688 * kern/i386/pc/startup.S: Updated Global Descriptor table's
14690 (grub_vbe_get_controller_info): New function.
14691 (grub_vbe_get_mode_info): Likewise.
14692 (grub_vbe_set_mode): Likewise.
14693 (grub_vbe_get_mode): Likewise.
14694 (grub_vbe_set_memory_window): Likewise.
14695 (grub_vbe_get_memory_window): Likewise.
14696 (grub_vbe_set_scanline_length): Likewise.
14697 (grub_vbe_get_scanline_length): Likewise.
14698 (grub_vbe_set_display_start): Likewise.
14699 (grub_vbe_get_display_start): Likewise.
14700 (grub_vbe_set_palette_data): Likewise.
14701 * include/grub/i386/pc/vbe.h: New file.
14703 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14705 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14706 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14707 * DISTLIST: Likewise.
14708 * kern/ieee1275/of.c: Moved to ...
14709 * kern/ieee1275/ieee1275.c: ... here.
14711 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14713 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14714 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14715 Pass 0 as `end' parameter to grub_strtoul().
14717 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14719 * include/grub/powerpc/ieee1275/console.h: Do not include
14720 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
14722 (grub_console_cur_color): Remove i386-specific prototype.
14723 (grub_console_real_putchar): Likewise.
14724 (grub_console_checkkey): Likewise.
14725 (grub_console_getkey): Likewise.
14726 (grub_console_getxy): Likewise.
14727 (grub_console_gotoxy): Likewise.
14728 (grub_console_cls): Likewise.
14729 (grub_console_setcursor): Likewise.
14730 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14731 Include <grub/machine/console.h>.
14732 * term/ieee1275/ofconsole.c: Likewise.
14734 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
14736 * Makefile.in (LIBLZO): New variable.
14738 * configure.ac: Check for LZO version 2.
14740 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14741 lzo/lzo1x.h instead of lzo1x.h.
14743 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14746 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14747 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14749 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14750 copying the data from PARTITION to P.
14752 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14754 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14755 negative, unload the module.
14757 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14758 map is "pc_partition_map" but not "pc".
14759 (usage): Fix the description. The options are --boot-image and
14760 --core-image but not --boot-file or --core-file.
14761 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14762 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14765 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14766 --core-file. Specify INSTALL_DEVICE as an argument.
14768 * util/console.c: Include config.h.
14769 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14770 [HAVE_NCURSES_H]: Include ncurses.h.
14771 [HAVE_CURSES_H]: Include curses.h.
14772 [!A_NORMAL] (A_NORMAL): Defined as zero.
14773 [!A_STANDOUT] (A_STANDOUT): Likewise.
14775 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14777 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14779 * configure.ac: Check for curses libraries and headers.
14781 * Makefile.in (LIBCURSES): New variable.
14783 * genmk.rb (Script::rule): Set the executable bits.
14785 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14786 name of the PC partition map is "pc_partition_map" but not "pc".
14788 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14790 * util/i386/pc/grub-install.in (grub_probefs): New variable.
14791 (modules): Likewise.
14792 (usage): Added descriptions for --modules and --grub-probefs.
14793 Handle --modules and --grub-probefs. Save the arguments in MODULES
14794 and GRUB_PROBEFS, respectively.
14795 Auto-detect a filesystem module against GRUBDIR. If the result is
14796 empty and modules are not specified explicitly, abort the
14797 installation. Add the result to MODULES.
14799 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14800 disk/powerpc/ieee1275/ofdisk.c,
14801 include/grub/powerpc/ieee1275/init.h and
14802 term/powerpc/ieee1275/ofconsole.c.
14803 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14804 term/ieee1275/ofconsole.c.
14806 * include/grub/powerpc/ieee1275/console.h: Resurrected.
14808 * COPYING: Upgraded to the latest version. Only the address of the
14809 FSF office has changed.
14811 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14813 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14814 kern/ieee1275.c with kern/ieee1275/of.c.
14816 * kern/ieee1275.c: Moved to ...
14817 * kern/ieee1275/of.c: ... here.
14819 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
14821 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14824 * config.guess: Updated to the latest version from gnulib.
14825 * config.sub: Likewise.
14826 * install.sh: Likewise.
14827 * mkinstalldirs: Likewise.
14829 * include/grub/console.h: Removed. This file is arch-specific. Do
14830 not put this in include/grub.
14832 * include/grub/i386/pc/console.h: Resurrected.
14834 * util/console.c: Include grub/machine/console.h instead of
14836 * util/grub-emu.c: Likewise.
14838 2005-08-04 Marco Gerards <metgerards@student.han.nl>
14840 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14843 From Vincent Pelletier <subdino2004@yahoo.fr>
14844 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14845 Redefined to use grub_getwh.
14846 (grub_term): New member named getwh.
14847 (grub_getwh): New prototype.
14848 * kern/term.c (grub_getwh): New function.
14849 * term/i386/pc/console.c (grub_console_getwh): New function.
14850 (grub_console_term): New member `getwh'.
14851 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14852 (grub_vga_term): New member `getwh'.
14853 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14855 (grub_ofconsole_getw): New function.
14856 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14857 (grub_ofconsole_term): New field named getwh and new initial
14860 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14862 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14863 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14864 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14865 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14866 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14867 of <grub/machine/ieee1275.h>.
14868 * commands/ieee1275/reboot.c: Likewise.
14869 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14870 * kern/ieee1275.c: ... to here. All users updated. Change all
14871 parameter structs to use new type `grub_ieee1275_cell_t'.
14872 * term/powerpc/ieee1275/ofconsole.c: Move ...
14873 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14874 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14875 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14876 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14878 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14879 Remove unused prototypes. All users updated.
14880 * include/grub/powerpc/ieee1275/console.h: Removed.
14881 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14882 `grub_ieee1275_cell_t'.
14883 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14884 Cast comparisons with -1 to the correct type.
14885 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14886 type to match `grub_ieee1275_entry_fn'.
14888 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14890 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14892 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14893 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14895 (grub_probefs_SOURCES): New variable.
14897 * util/i386/pc/grub-probefs.c: New file.
14899 * util/i386/pc/grub-setup.c (main): Call
14900 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14901 grub_hfs_init and grub_jfs_init to initialize the system. Call
14902 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14903 grub_pc_partition_map_fini to finish the system.
14905 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14907 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14909 (grub_multiboot_load_elf32): Likewise.
14910 (grub_multiboot_is_elf64): Likewise.
14911 (grub_multiboot_load_elf64): Likewise.
14912 (grub_multiboot_load_elf): Likewise.
14913 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14914 an ELF32 or ELF64 file.
14915 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14917 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14918 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14919 NULL before calling FS->LABEL.
14920 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14921 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14922 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14923 before calling FS->LABEL.
14925 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14927 * util/i386/pc/grub-install.in (datadir): New variable.
14929 (pkgdatadir): New variable.
14930 (pkglibdir): Removed.
14932 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14934 * DISTLIST: Added util/i386/pc/grub-install.in.
14936 * util/i386/pc/grub-install.in: New file.
14938 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14939 (grub_install_SOURCES): Likewise.
14941 * genmk.rb: Added support for scripts.
14942 (Script): New class.
14943 (scripts): New variable.
14945 * Makefile.in (install-local): Install sbin_SCRIPTS by
14947 (uninstall): Remove sbin_SCRIPTS.
14949 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14950 device, try to get a GRUB device by
14951 grub_util_biosdisk_get_grub_dev.
14954 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14955 description for --device-map.
14957 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14959 Change the semantics of variable hooks. They now return strings
14960 instead of error values.
14962 * util/i386/pc/grub-setup.c: Include grub/env.h.
14963 (setup): Use grub_device_set_root instead of grub_env_set.
14965 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14966 grub_env_get instead of grub_device_set_root and
14967 grub_device_get_root, respectively.
14969 * kern/main.c (grub_env_write_root): New function.
14970 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14971 grub_env_set instead of grub_device_set_root.
14973 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14975 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14976 rather than calling ENV->WRITE_HOOK afterwards.
14977 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14978 passing a pointer of a pointer.
14979 (grub_register_variable_hook): Change the types of "read_hook" and
14980 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14982 Allocate the default empty string on the heap, because this string
14983 may be freed later.
14985 * kern/device.c: Include grub/env.h.
14986 (grub_device_set_root): Removed.
14987 (grub_device_get_root): Likewise.
14988 (grub_device_open): Use grub_env_get instead of
14989 grub_device_get_root.
14991 * include/grub/env.h (grub_env_read_hook_t): New type.
14992 (grub_env_write_hook_t): Likewise.
14993 (grub_env_var): Change the types of "read_hook" and "write_hook"
14994 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14995 (grub_register_variable_hook): Likewise.
14997 * include/grub/device.h (grub_device_set_root): Removed.
14998 (grub_device_set_root): Likewise.
15000 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15001 make sure that DIRNAME terminates with '/', so that
15002 grub_fat_find_dir will fail if PATH is not a directory.
15004 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15006 Use the qualifier auto for print_files and print_files_long.
15007 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15009 Put a newline only if there is no error.
15010 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15013 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15015 * kern/partition.c (grub_partition_probe): Initialize PART to
15016 NULL. Otherwise, when no partition map is registered, this returns
15019 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15021 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15022 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15025 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15027 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15028 information on each device, if it does not have partitions. Print
15029 "Device" instead of "Disk", because this function is not specific
15032 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15033 static to ensure that it is put on the memory rather than a
15036 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15038 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15039 (grub_cat_init): Likewise.
15040 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15041 (options): Likewise.
15042 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15043 (grub_configfile_init): Likewise.
15044 * font/manager.c (GRUB_MOD_INIT): Likewise.
15045 * commands/help.c (GRUB_MOD_INIT): Likewise.
15046 (grub_help_init): Likewise.
15047 * normal/command.c (grub_command_init): Likewise.
15048 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15049 * disk/loopback.c (grub_loop_init): Likewise.
15050 (GRUB_MOD_INIT): Likewise.
15051 * commands/ls.c (grub_ls_init): Likewise.
15052 (GRUB_MOD_INIT): Likewise.
15053 (options): Likewise.
15054 * commands/boot.c (grub_boot_init): Likewise.
15055 (GRUB_MOD_INIT): Likewise.
15056 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15057 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15058 (GRUB_MOD_INIT): Likewise.
15059 * commands/cmp.c (grub_cmp_init): Likewise.
15060 (GRUB_MOD_INIT): Likewise.
15062 * normal/arg.c: Use <> instead of "" to include header files.
15063 (SHORT_ARG_HELP): New macro.
15064 (SHORT_ARG_USAGE): Likewise.
15065 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15066 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15068 (find_short): Check if C is 'h' or 'u' explicitly.
15069 (grub_arg_show_help): Use space characters instead of tabs. Treat
15070 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15071 are shown with --help and --usage only if they are not used for
15072 the command itself.
15073 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15076 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15077 const into "longarg". Change the type of "shortarg" to int.
15079 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15081 * boot/i386/pc/boot.S (boot_drive_check): New label.
15083 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15086 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15087 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15089 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15091 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15092 When turning off Gate A20, skip the check and return immediately,
15093 because this is not fatal usually.
15095 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15097 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15098 be 0x7C00 instead of 0x8000.
15100 * boot/i386/pc/pxeboot.S: Rewritten.
15102 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15104 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15107 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15109 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15110 robustness. This routine now supports a BIOS call and System
15111 Control Port A to modify the gate A20.
15113 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15114 Increased to 0x440.
15116 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15118 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15119 device path and resulting ihandle.
15120 (grub_ofdisk_close): dprintf the ihandle being closed.
15121 (grub_ofdisk_read): dprintf function parameters.
15122 * kern/mm.c (grub_mm_init_region): Likewise.
15123 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15124 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15125 size, and boot arguments.
15126 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15127 before loading into memory.
15128 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15129 before loading into memory.
15131 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15133 * kern/mm.c: Added much documentation.
15134 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15135 8, set to 5 instead of 8.
15137 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15139 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15141 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15142 (grub_mkdevicemap_SOURCES): New variable.
15144 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15145 lib/device.c of GRUB Legacy.
15147 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15149 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15150 instead of PATH is NULL.
15152 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15154 * commands/cmp.c (BUFFER_SIZE): New macro.
15155 (grub_cmd_cmp): Close the right file at the right time. Compare
15156 only data just read. Don't report files of different size as
15157 identical. Dynamically allocate buffers. Move variable
15158 declarations at the beginning of function.
15160 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
15162 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15165 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15167 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15168 when backspace is pressed at beginning of line.
15170 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
15172 * DISTLIST: Added genfslist.sh.
15174 * normal/main.c (fs_module_list): New variable.
15175 (autoload_fs_module): New function.
15176 (read_fs_list): Likewise.
15177 (grub_normal_execute): Call read_fs_list.
15179 * kern/fs.c (grub_fs_autoload_hook): New variable.
15180 (grub_fs_probe): Added support for auto-loading.
15182 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15183 (grub_fs_module_list_t): New type.
15185 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15186 (grub_fs_autoload_hook): New prototype.
15188 * genfslist.sh: New file.
15190 * genmk.rb: Added a rule to generate a filesystem list.
15192 2005-06-30 Marco Gerards <metgerards@student.han.nl>
15194 * configure.ac: Fix the test for cross-compiling.
15196 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15197 define GRUB_UTIL anymore.
15199 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15200 so this function works on other systems than just big endian.
15201 (load_modules): Likewise.
15202 (add_segments): Likewise.
15204 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15206 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15207 contains `l' modifier, get a long from va_arg().
15209 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15211 * kern/mm.c (grub_free): If the next free block which is being
15212 merged is the first free block, set the first block to the block
15214 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15216 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15218 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15219 `grub_ieee1275_chosen'.
15221 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15223 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15224 (grub_ieee1275_chosen): New variable.
15225 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15227 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15228 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15229 Rename first argument to `phandle' for consistency.
15230 (grub_ieee1275_get_property_length): Likewise.
15231 (grub_ieee1275_next_property): Likewise. Change type of first argument
15232 to grub_ieee1275_phandle_t.
15233 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15234 Move export next to declaration.
15235 (grub_ieee1275_chosen): New variable.
15236 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15237 Correct cosmetic typo.
15238 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15239 `grub_ieee1275_chosen'.
15240 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15241 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15242 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15243 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15244 `grub_ieee1275_chosen'.
15246 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15248 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15250 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15251 /chosen/bootargs as "variable=value" pairs.
15253 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15255 * include/grub/misc.h (grub_dprintf): New macro.
15256 (grub_real_dprintf): New prototype.
15257 (grub_strword): Likewise.
15258 (grub_iswordseparator): Likewise.
15259 * kern/misc.c (grub_real_dprintf): New function.
15260 (grub_strword): Likewise.
15261 (grub_iswordseparator): Likewise.
15263 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15265 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15266 (roundup): Remove macro.
15267 (grub_ieee1275_flags): Make static.
15268 (grub_ieee1275_realmode): Remove.
15269 (grub_ieee1275_test_flag): New function.
15270 (grub_ieee1275_set_flag): Likewise.
15271 (find_options): Rename to `grub_ieee1275_find_options'; update
15272 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15273 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15274 (cmain): New prototype.
15275 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15276 `grub_ieee1275_flags' directly.
15277 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15278 machine/biosdisk.h.
15279 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15280 Don't include grub/machine/init.h.
15281 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15282 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15284 (grub_ieee1275_realmode): Likewise.
15285 (grub_ieee1275_flag): New enum.
15286 (grub_ieee1275_test_flag): New prototype.
15287 (grub_ieee1275_set_flag): New prototype.
15288 * include/grub/powerpc/ieee1275/init.h: Remove file.
15289 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15290 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15291 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15292 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15294 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15295 `grub_ieee1275_test_flag'.
15296 (grub_ieee1275_encode_devname): Likewise.
15298 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15300 * include/grub/powerpc/ieee1275/ieee1275.h
15301 (grub_ieee1275_encode_devname): New prototype.
15302 (grub_ieee1275_get_filename): Likewise.
15303 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15305 (grub_set_prefix): Likewise.
15306 (grub_machine_init): Call grub_set_prefix.
15307 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15308 (grub_parse_type): New enum.
15309 (grub_ieee1275_get_devargs): New function.
15310 (grub_ieee1275_get_devname): Likewise.
15311 (grub_ieee1275_parse_args): Likewise.
15312 (grub_ieee1275_get_filename): Likewise.
15313 (grub_ieee1275_encode_devname): Likewise.
15315 2005-03-30 Marco Gerards <metgerards@student.han.nl>
15317 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15318 `grub_loader_unset'.
15320 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15322 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15323 instead of grub_ieee1275_interpret.
15324 (grub_halt_init): New function.
15325 (grub_halt_fini): Likewise.
15326 (GRUB_MOD_INIT): Correct message grammar.
15327 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15328 instead of grub_ieee1275_interpret.
15329 (grub_reboot_init): New function.
15330 (grub_reboot_fini): Likewise.
15331 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15332 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15333 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15334 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15335 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15337 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15339 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15341 (grub_halt): Likewise.
15342 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15343 (cmain): Remove __attribute__((unused)).
15344 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15345 (grub_heap_len): Likewise.
15346 (grub_machine_fini): New function.
15347 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15348 (grub_halt): Likewise.
15349 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15351 * util/powerpc/ieee1275/misc.c: New file.
15353 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15355 * DISTLIST: New file.
15356 * gendistlist.sh: Likewise.
15358 * Makefile.in (COMMON_DISTFILES): Removed.
15359 (BOOT_DISTFILES): Likewise.
15360 (CONF_DISTFILES): Likewise.
15361 (DISK_DISTFILES): Likewise.
15362 (FS_DISTFILES): Likewise.
15363 (INCLUDE_DISTFILES): Likewise.
15364 (KERN_DISTFILES): Likewise.
15365 (LOADER_DISTFILES): Likewise.
15366 (TERM_DISTFILES): Likewise.
15367 (UTIL_DISTFILES): Likewise.
15368 (DISTFILES): Likewise.
15369 (uninstall): Uninstall files in $(pkgdata_DATA).
15370 (DISTLIST): New target.
15371 (distdir): Use the contents of the file DISTLIST to get a list of
15374 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15376 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15377 descriptor. This is ported from GRUB Legacy.
15379 * gencmdlist.sh: Added an extra semicolon to make it work with
15380 old sed versions. Reported by Robert Bihlmeyer
15381 <robbe@orcus.priv.at>.
15383 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
15385 Automatic loading of commands is supported.
15387 * normal/main.c (read_command_list): New function.
15388 (grub_normal_execute): Call read_command_list.
15390 * normal/command.c (grub_register_command): Return zero or CMD.
15391 Allocate CMD->NAME from the heap.
15392 Initialize CMD->MODULE_NAME to zero.
15393 Find the same name as well. If the same command is found and it is
15394 a dummy command, overwrite members. If it is not a dummy command,
15396 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15397 (grub_command_find): If a dummy command is found, load a module
15398 and retry to find a command only once.
15400 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15401 make sure that each command is loaded.
15403 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15405 (struct grub_command): Remove const from the member `name'.
15406 Add a new member `module_name'.
15407 (grub_register_command): Return grub_command_t.
15409 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15410 sure that each command is loaded.
15412 * genmk.rb (PModule::rule): Specify a module name without the
15413 suffix ".mod" to gencmdlist.sh.
15415 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15417 * gencmdlist.sh: New file.
15419 * genmk.rb (PModule::rule): Generate a rule for a command list.
15421 Generate command.lst from $(COMMANDFILES).
15423 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15424 (DATA): Added $(pkgdata_DATA).
15425 (install-local): Install files in $(pkgdata_DATA).
15427 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15429 * term/i386/pc/vga.c (debug_command): Removed.
15430 (GRUB_MOD_INIT): Do not register the command "debug".
15432 From Hollis Blanchard:
15433 * commands/configfile.c: New file.
15434 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15435 commands/configfile.c.
15436 (pkgdata_MODULES): Added configfile.mod.
15437 (configfile_mod_SOURCES): New variable.
15438 (configfile_mod_CFLAGS): Likewise.
15439 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15440 commands/configfile.c.
15441 (pkgdata_MODULES): Added configfile.mod.
15442 (configfile_mod_SOURCES): New variable.
15443 (configfile_mod_CFLAGS): Likewise.
15444 * util/grub-emu.c (main): Call grub_configfile_init and
15445 grub_configfile_fini.
15446 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15448 [GRUB_UTIL] (grub_configfile_fini): Likewise.
15450 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15452 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15455 * commands/help.c (grub_cmd_help): Do not print newlines after
15456 the last command in print_command_help.
15458 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15460 * commands/default.h: New file.
15461 * commands/timeout.h: Likewise.
15462 * normal/context.c: Likewise.
15464 * util/misc.c: Do not include sys/times.h.
15465 Include sys/time.h and grub/machine/time.h.
15466 (grub_get_rtc): Rewritten with gettimeofday.
15468 * util/grub-emu.c (main): Call grub_default_init and
15469 grub_timeout_init before grub_normal_init, and call
15470 grub_timeout_fini and grub_default_fini after grub_main.
15472 * util/console.c (grub_ncurses_checkkey): Return the read
15475 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15478 * normal/main.c (read_config_file): Push MENU. If this fails,
15479 print an error and wait for a user input.
15480 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15481 If a menu is empty or an error occurs, pop MENU.
15482 (grub_normal_execute): Pop and free MENU after grub_menu_run
15485 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15487 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15489 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15491 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15493 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15496 * include/grub/normal.h (struct grub_menu_list): New struct.
15497 (grub_menu_list_t): New type.
15498 (struct grub_context): New struct.
15499 (grub_context_t): New type.
15500 (grub_register_command): Got rid of EXPORT_FUNC.
15501 (grub_unregister_command): Likewise.
15502 (grub_context_get): New prototype.
15503 (grub_context_get_current_menu): Likewise.
15504 (grub_context_push_menu): Likewise.
15505 (grub_context_pop_menu): Likewise.
15506 [GRUB_UTIL] (grub_default_init): Likewise.
15507 [GRUB_UTIL] (grub_default_fini): Likewise.
15508 [GRUB_UTIL] (grub_timeout_init): Likewise.
15509 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15511 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15512 commands/timeout.c and normal/context.c.
15513 (pkgdata_MODULES): Added default.mod and timeout.mod.
15514 (normal_mod_SOURCES): Added normal/context.c.
15515 (default_mod_SOURCES): New variable.
15516 (default_mod_CFLAGS): Likewise.
15517 (timeout_mod_SOURCES): Likewise.
15518 (timeout_mod_CFLAGS): Likewise.
15519 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15521 (pkgdata_MODULES): Added default.mod and timeout.mod.
15522 (normal_mod_SOURCES): Added normal/context.c.
15523 (default_mod_SOURCES): New variable.
15524 (default_mod_CFLAGS): Likewise.
15525 (timeout_mod_SOURCES): Likewise.
15526 (timeout_mod_CFLAGS): Likewise.
15528 * Makefile.in (all-local): Added $(MKFILES).
15530 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15532 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15533 (grub_emu_SOURCES): Likewise.
15534 (pkgdata_MODULES): Add `sun.mod'.
15535 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15536 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15538 (pkgdata_MODULES): Add `sun.mod'.
15539 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15540 * include/grub/partition.h (grub_sun_partition_map_init): New
15542 (grub_sun_partition_map_fini): Likewise.
15543 * partmap/sun.c: New file.
15544 * util/grub-emu.c (main): Initialize and de-initialize the sun
15545 partitionmap support.
15547 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15549 This implements an Emacs-like menu entry editor.
15551 * normal/menu_entry.c: New file.
15553 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15554 characters to ASCII.
15555 (saved_char): New variable.
15556 (grub_ncurses_checkkey): Rewritten completely.
15557 (grub_ncurses_getkey): Likewise.
15558 (grub_ncurses_init): Call raw instead of cbreak.
15560 * normal/menu.c (print_entry): Do not put a space.
15561 (init_page): Renamed to ...
15562 (grub_menu_init_page): ... this. All callers changed.
15563 (edit_menu_entry): Removed.
15564 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15566 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15568 * kern/misc.c (grub_vprintf): Call grub_refresh.
15570 * normal/menu.c (DISP_LEFT): Renamed to ...
15571 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15572 * normal/menu.c (DISP_UP): Renamed to ...
15573 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15574 * normal/menu.c (DISP_RIGHT): Renamed to ...
15575 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15576 * normal/menu.c (DISP_DOWN): Renamed to ...
15577 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15578 * normal/menu.c (DISP_HLINE): Renamed to ...
15579 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15580 * normal/menu.c (DISP_VLINE): Renamed to ...
15581 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15582 * normal/menu.c (DISP_UL): Renamed to ...
15583 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15584 * normal/menu.c (DISP_UR): Renamed to ...
15585 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15586 * normal/menu.c (DISP_LL): Renamed to ...
15587 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15588 * normal/menu.c (DISP_LR): Renamed to ...
15589 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15590 * normal/menu.c (TERM_WIDTH): Renamed to ...
15591 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15592 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15593 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15594 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15595 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15596 * normal/menu.c (TERM_MARGIN): Renamed to ...
15597 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15598 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15599 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15600 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15601 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15602 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15603 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15604 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15605 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15606 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15607 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15608 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15609 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15610 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15611 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15612 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15613 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15614 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15615 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15616 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15617 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15618 All callers changed.
15620 * include/grub/normal.h: New prototype.
15622 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15623 normal/menu_entry.c.
15624 (normal_mod_SOURCES): Likewise.
15625 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15626 (normal_mod_SOURCES): Likewise.
15628 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15630 * include/grub/normal.h (grub_halt_init): New prototype.
15631 (grub_halt_fini): Likewise.
15632 (grub_reboot_init): Likewise.
15633 (grub_reboot_fini): Likewise.
15635 * util/grub-emu.c: Include signal.h.
15636 (main_env): New global variable.
15637 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15639 (grub_machine_fini): New function.
15640 (main): Call grub_halt_init and grub_reboot_init before
15641 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15642 Call setjmp with MAIN_ENV to go back afterwards.
15643 Call grub_machine_fini right before return.
15645 * include/grub/util/misc.h: Include setjmp.h.
15646 (main_env): New prototype.
15648 * include/grub/kernel.h (grub_machine_fini): New prototype.
15649 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15650 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15652 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15653 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15654 * term/i386/pc/console.c (grub_console_fini): Likewise.
15656 * util/i386/pc/misc.c: New file.
15658 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15659 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15660 commands/i386/pc/reboot.c.
15662 2005-02-14 Guillem Jover <guillem@hadrons.org>
15664 * include/grub/dl.h (grub_dl_check_header): New prototype.
15665 (grub_arch_dl_check_header): Change return type to grub_err_t,
15666 remove size parameter and export function. Update all callers.
15667 * kern/dl.c (grub_dl_check_header): New function.
15668 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15669 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15670 are inside the core.
15671 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15672 independent ELF header checks.
15673 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15674 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15675 `grub_dl_check_header' instead of explicit checks. Check for the
15677 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15678 `grub_dl_check_header' instead of explicit checks. Remove arch
15679 specific ELF header checks.
15681 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15684 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
15686 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15687 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15689 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
15691 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15692 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15693 (part_map_iterate): Clear `grub_errno' and return 0 if
15694 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15695 * partmap/amiga.c (amiga_partition_map_iterate): Return
15696 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15697 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15699 2005-02-01 Guillem Jover <guillem@hadrons.org>
15701 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15704 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15706 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15708 (grub_rescue_cmd_linux): New prototype.
15709 (grub_rescue_cmd_initrd): Likewise.
15710 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15712 (grub_linux_release_mem): Release the memory for the initrd.
15713 (grub_load_linux): Renamed from this...
15714 (grub_rescue_cmd_linux): ...To this. Changed all callers.
15715 Changed `entry' not to be static. Loop over memory regions to
15716 find another one when the default fails.
15717 (grub_rescue_cmd_initrd): New function.
15718 (grub_linux_init): Remove function.
15719 (grub_linux_fini): Likewise.
15720 (GRUB_MOD_INIT): Register `initrd'.
15721 (GRUB_MOD_FINI): Unregister `initrd'.
15722 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15724 (grub_linux_normal_fini): Likewise.
15725 (GRUB_MOD_INIT): Register `initrd'.
15726 (GRUB_MOD_FINI): Unregister `initrd'.
15728 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15730 * commands/help.c: New file.
15731 * normal/arg.c (show_help): Renamed to...
15732 (grub_arg_show_help): ... this.
15733 * commands/i386/pc/halt.c: New file.
15734 * commands/i386/pc/reboot.c: Likewise.
15735 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15736 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15737 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15738 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15740 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15742 (pkgdata_MODULES): Add `help.mod'.
15743 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15744 * grub/i386/pc/init.h (grub_reboot): New prototype.
15745 (grub_halt): Likewise.
15746 * include/grub/normal.h (grub_arg_show_help): New prototype.
15747 (grub_help_init): Likewise.
15748 (grub_help_fini): Likewise.
15749 * util/grub-emu.c (main): Initialize and deinitialize the help
15752 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15754 * normal/command.c (grub_command_init): Fixed the description of
15755 the `set' and `unset' commands.
15757 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15759 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15761 * commands/ieee1275/halt.c: New file.
15762 * commands/ieee1275/reboot.c: Likewise.
15763 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15764 `__attribute__ ((unused))'. Some GCS related fixed.
15765 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15766 (grub_suspend_fini): Likewise.
15767 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15769 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15770 (halt_mod_CFLAGS): New variables.
15771 * include/grub/powerpc/ieee1275/ieee1275.h
15772 (grub_ieee1275_interpret): New prototype.
15774 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15776 * include/grub/misc.h (memmove): New prototype.
15777 (memcpy): Likewise.
15779 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
15781 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15782 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
15784 2005-01-22 Marco Gerards <metgerards@student.han.nl>
15786 * kern/misc.c (grub_strndup): Function rewritten.
15788 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
15790 * normal/menu.c (TERM_WIDTH): Macro redefined.
15791 (TERM_TOP_BORDER_Y): Likewise.
15792 (draw_border): Replaced while-loop by a for-loop. Make the number
15793 of lines consistent with the number of lines displayed in
15794 print_entries. Added a margin below the rectangle.
15795 (print_entry): Make the entry fit in the rectangle.
15796 (print_entries): Display the scroll arrows next to the right
15799 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15801 * fs/minix.c (grub_minix_find_file): Reserve more space for
15802 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
15803 `grub_strncpy' to copy `path' into it.
15805 2005-01-21 Marco Gerards <metgerards@student.han.nl>
15807 Add the loopback device, a device via which files can be accessed
15810 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15811 (pkgdata_MODULES): Add loopback.mod.
15812 (loopback_mod_SOURCES): New variable.
15813 (loopback_mod_CFLAGS): Likewise.
15814 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15816 (pkgdata_MODULES): Add loopback.mod.
15817 (loopback_mod_SOURCES): New variable.
15818 (loopback_mod_CFLAGS): Likewise.
15819 * disk/loopback.c: new file.
15820 * include/grub/normal.h (grub_loop_init): New prototype.
15821 (grub_loop_fini): New prototype.
15822 * util/grub-emu.c (main): Initialize and de-initialize loopback
15824 * include/grub/disk.h (grub_disk_dev_id): Add
15825 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15827 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15829 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15831 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15832 (suspend_mod_SOURCES): New variable.
15833 (suspend_mod_CFLAGS): Likewise.
15834 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15836 * commands/ieee1275/suspend.c: New file.
15838 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15840 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15841 ((unused))' to `__attribute__ ((used))'.
15842 (GRUB_MOD_FINI): Likewise.
15843 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15844 * genmk.rb (PModule): Assign space to common symbols when linking
15847 2005-01-20 Marco Gerards <metgerards@student.han.nl>
15849 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15850 `unsigned' arguments to `grub_size_t'.
15851 (grub_malloc): Likewise.
15852 (grub_realloc): Likewise.
15853 (grub_memalign): Likewise.
15854 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15855 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15856 * util/misc.c (grub_malloc): Likewise.
15857 (grub_realloc): Likewise.
15858 * kern/mm.c (get_header_from_pointer): Change the casts to
15859 `unsigned' into a cast to `grub_size_t'.
15861 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15862 point to `currnode' when `currnode' is changed.
15864 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15865 Schottelius <nico-linux@schottelius.org>.
15867 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15869 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15870 (note_path): Remove variable.
15871 (GRUB_IEEE1275_NOTE_NAME): New macro.
15872 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15873 (grub_ieee1275_note_hdr): New structure.
15874 (grub_ieee1275_note_desc): Likewise.
15875 (grub_ieee1275_note): Likewise.
15876 (load_note): Remove `dir' argument. All callers updated. Remove
15877 `note_img' and `path'. Do not load a file from `note_path'.
15878 Initialize a struct grub_ieee1275_note and write that to `out'.
15879 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15881 2005-01-05 Marco Gerards <metgerards@student.han.nl>
15883 * util/misc.c (grub_util_read_image): Revert last change. It
15884 called `grub_util_read_at', which seeks from the beginning of the
15887 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15889 * TODO: Add note about endianness in grub-mkimage.
15890 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15892 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15893 (grub_mkimage_SOURCES): New target.
15894 * include/grub/kernel.h (grub_start_addr): Remove variable.
15895 (grub_end_addr): Likewise.
15896 (grub_total_module_size): Likewise.
15897 (grub_kernel_image_size): Likewise.
15898 (GRUB_MODULE_MAGIC): New constant.
15899 (grub_module_info): New structure.
15900 (grub_arch_modules_addr): New prototype.
15901 (grub_get_end_addr): Remove prototype.
15902 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15903 * include/grub/powerpc/ieee1275/kernel.h: New file.
15904 * include/grub/util/misc.h (grub_util_get_fp_size): New
15906 (grub_util_read_at): Likewise.
15907 (grub_util_write_image_at): Likewise.
15908 * kern/main.c (grub_get_end_addr): Remove function.
15909 (grub_load_modules): Call grub_arch_modules_addr instead of using
15910 grub_end_addr. Look for a grub_module_info struct in memory. Use
15911 the grub_module_info fields instead of calling grub_get_end_addr
15912 as loop conditions. Move grub_add_unused_region code here.
15913 (grub_add_unused_region): Remove function.
15914 * kern/i386/pc/init.c: Include grub/cache.h.
15915 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15916 one call to add_mem_region.
15917 (grub_arch_modules_addr): New function.
15918 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15919 (grub_total_module_size): Likewise.
15920 Include grub/machine/kernel.h.
15921 (grub_arch_modules_addr): New function.
15922 * util/grub-emu.c (grub_end_addr): Remove variable.
15923 (grub_total_module_size): Likewise.
15924 (grub_arch_modules_addr): New function.
15925 * util/misc.c: Include unistd.h.
15926 (grub_util_get_fp_size): New function.
15927 (grub_util_read_at): Likewise.
15928 (grub_util_write_image_at): Likewise.
15929 (grub_util_read_image): Call grub_util_read_at.
15930 (grub_util_write_image): Call grub_util_write_image_at.
15931 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15932 additional memory in kernel_img for a struct grub_module_info.
15933 Fill in that grub_module_info.
15934 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15936 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15938 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15940 * include/grub/powerpc/ieee1275/ieee1275.h
15941 (grub_ieee1275_milliseconds): New prototype.
15942 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15944 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15945 grub_ieee1275_milliseconds.
15947 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15949 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15951 (find_options): New function.
15952 (cmain): Call find_options.
15953 * include/grub/powerpc/ieee1275/ieee1275.h
15954 (grub_ieee1275_realmode): New extern variable.
15955 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15956 grub_map if grub_ieee1275_realmode is false.
15958 2004-12-29 Marco Gerards <metgerards@student.han.nl>
15960 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15961 lines are inserted and make it work like readline. Reported by
15962 Vincent Pelletier <subdino2004@yahoo.fr>.
15964 2004-12-28 Marco Gerards <metgerards@student.han.nl>
15966 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15968 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15969 `kern/powerpc/cache.S'.
15971 2004-12-27 Marco Gerards <metgerards@student.han.nl>
15973 * genmk.rb: Handle the `Program' class in the main loop. Written
15974 by Johan Rydberg <jrydberg@gnu.org>.
15975 (Program): New class.
15976 (programs): New variable.
15977 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15978 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15979 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15980 (help_arch): Function removed.
15981 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15982 `powerpc/libgcc.h' and `loader.h'.
15983 (pkgdata_PROGRAMS): New variable.
15984 (sbin_UTILITIES): Variable removed.
15985 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15986 (grubof_SOURCES): Variable re-defined so it only includes the
15987 core functionality.
15988 (grubof_CFLAGS): Remove `-DGRUBOF'.
15989 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15990 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15991 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15992 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15993 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15994 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15995 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15996 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15997 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15998 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15999 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16000 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16001 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16002 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16003 (pc_mod_CFLAGS): New variables.
16004 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16005 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16006 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16007 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16009 * include/grub/i386/pc/init.h (grub_os_area_addr)
16010 (rub_os_area_size): ... to here.
16011 * include/grub/powerpc/ieee1275/ieee1275.h
16012 (grub_ieee1275_entry_fn): Export symbol.
16013 * include/grub/powerpc/ieee1275/init.h: New file.
16014 * include/grub/powerpc/libgcc.h: Likewise.
16015 * include/grub/cache.h: Likewise.
16016 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16017 <hollis@penguinppc.org>.
16018 * kern/dl.c: Include <grub/cache.h>.
16019 (grub_dl_flush_cache): New function.
16020 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16022 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16023 (grub_console_init): Removed prototypes.
16024 (grub_machine_init): Don't initialize the modules anymore.
16025 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16027 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16028 Macro undef removed.
16029 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16030 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16031 relocation `R_PPC_REL32'. Return an error when the relocation is
16033 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16034 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16035 * util/misc.c (grub_arch_sync_caches): Likewise.
16037 2004-12-19 Marco Gerards <metgerards@student.han.nl>
16039 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16040 `symlist.c', add `grubof_symlist.c'.
16041 (symlist.c): Variable removed.
16042 (grubof_HEADERS): Variable added.
16043 (grubof_symlist.c): New target.
16044 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16045 `kernel_img_HEADERS'.
16046 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16047 * kern/powerpc/dl.c: New file.
16048 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16050 (grub_arch_dl_relocate_symbols): Likewise.
16051 (grub_register_exported_symbols): Likewise.
16053 2004-12-13 Marco Gerards <metgerards@student.han.nl>
16055 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16056 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16057 to fail instead. Reported by Vincent Pelletier
16058 <subdino2004@yahoo.fr>.
16060 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16061 it is not allocated. Reported by Vincent Pelletier
16062 <subdino2004@yahoo.fr>.
16064 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16065 output so the output looks better.
16067 2004-12-04 Marco Gerards <metgerards@student.han.nl>
16069 Modulize the partition map support and add support for the amiga
16072 * commands/ls.c: Include <grub/partition.h> instead of
16073 <grub/machine/partition.h>.
16074 * kern/disk.c: Likewise.
16075 * kern/rescue.c: Likewise.
16076 * loader/i386/pc/chainloader.c: Likewise.
16077 * normal/cmdline.c: Likewise.
16078 * kern/powerpc/ieee1275/init.c: Likewise.
16079 (grub_machine_init): Call `grub_pc_partition_map_init',
16080 `grub_amiga_partition_map_init' and
16081 `grub_apple_partition_map_init'.
16082 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16083 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16084 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16085 `partition.h' and `pc_partition.h'.
16086 (grub_setup_SOURCES): Remove
16087 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16088 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16089 (grub_emu_SOURCES): Likewise.
16090 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16091 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16092 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16093 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16094 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16095 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16096 (grubof_SOURCES): Likewise.
16097 * disk/i386/pc/partition.c: File removed.
16098 * disk/powerpc/ieee1275/partition.c: Likewise.
16099 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16100 * include/grub/i386/pc/partition.h: Likewise.
16101 * kern/partition.c: New file.
16102 * partmap/amiga.c: Likewise.
16103 * partmap/apple.c: Likewise.
16104 * partmap/pc.c: Likewise.
16105 * include/grub/partition.h: Likewise..
16106 * include/grub/pc_partition.h: Likewise.
16107 * util/grub-emu.c: Include <grub/partition.h> instead of
16108 <grub/machine/partition.h>.
16109 (main): Call `grub_pc_partition_map_init',
16110 `grub_amiga_partition_map_init' and
16111 `grub_apple_partition_map_init' and deinitialize afterwards.
16112 * util/i386/pc/biosdisk.c: Include `#include
16113 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16114 `<grub/machine/partition.h>'.
16115 * util/i386/pc/grub-setup.c: Likewise.
16116 * util/i386/pc/biosdisk.c: Likewise.
16117 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16118 partition information in case of a PC partition.
16119 * util/i386/pc/grub-setup.c: Include `#include
16120 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16121 `<grub/machine/partition.h>'.
16122 (setup): Only access the PC specific partition information in case
16125 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
16127 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16128 (grub_longjmp): Likewise.
16129 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16131 * normal/powerpc/setjmp.S: New file.
16132 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16133 `normal/powerpc/setjmp.S'.
16134 (grubof_CFLAGS): Add `-DGRUBOF'.
16135 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16136 [GRUB_UTIL && !GRUBOF].
16138 2004-11-16 Marco Gerards <metgerards@student.han.nl>
16140 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16141 property named `name'. Correctly handle the error returned by
16142 `grub_ieee1275_finddevice' if a device can not be opened.
16144 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16146 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16147 `actual' for negativity.
16148 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16151 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16153 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16154 (PAGE_OFFSET): New macro.
16155 (CRTC_ADDR_PORT): Likewise.
16156 (CRTC_DATA_PORT): Likewise.
16157 (START_ADDR_HIGH_REGISTER): Likewise.
16158 (START_ADDR_LOW_REGISTER): Likewise.
16159 (GRAPHICS_ADDR_PORT): Likewise.
16160 (GRAPHICS_DATA_PORT): Likewise.
16161 (READ_MAP_REGISTER): Likewise.
16162 (INPUT_STATUS1_REGISTER): Likewise.
16163 (INPUT_STATUS1_VERTR_BIT): Likewise.
16164 (page): New variable.
16165 (wait_vretrace): New function.
16166 (set_read_map): Likewise.
16167 (set_start_address): Likewise.
16168 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16170 (check_vga_mem): Take the page into account.
16171 (write_char): Likewise.
16172 (write_cursor): Likewise.
16173 (scroll_up): Likewise. Copy the page to the page that is not
16174 shown and switch between both pages.
16175 (grub_vga_putchar): Fix off by one error.
16176 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16179 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16181 Add support for iso9660 (including rockridge).
16183 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16184 (iso9660_mod_SOURCES): New variable.
16185 (iso9660_mod_CFLAGS): Likewise.
16186 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16187 * include/grub/fs.h (grub_iso9660_init): New prototype.
16188 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16189 * fs/iso9660.c: New file.
16191 * include/grub/misc.h (grub_strncat): New prototype.
16192 * kern/misc.c (grub_strncat): New function.
16194 * fs/hfs.c (grub_hfs_mount): Translate the error
16195 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16196 * fs/jfs.c (grub_jfs_mount): Likewise.
16197 * fs/ufs.c (grub_ufs_mount): Likewise.
16199 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16201 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16202 which initialized BAT registers.
16203 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16204 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16206 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16207 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16209 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16210 (grub_mapclaim): Likewise.
16211 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16212 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16215 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16217 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16218 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16219 -ffreestanding and -msoft-float.
16221 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16223 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16224 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16225 set in grub_ieee1275_flags.
16227 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16229 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16231 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16232 grub_console_init first.
16233 Change the memory range used for grub_ieee1275_claim and
16234 grub_mm_init_region.
16235 Print an error message if the claim fails.
16236 Include <grub/misc.h>.
16238 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16240 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16241 Call grub_children_iterate for device nodes of type `scsi',
16243 (grub_ofdisk_open): Remove manual device alias resolution.
16244 Fix memory leak when device cannot be opened.
16245 * include/grub/powerpc/ieee1275/ieee1275.h
16246 (grub_children_iterate): New prototype.
16247 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16249 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16250 Return -1 if args.size was -1.
16252 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16254 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16255 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16256 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16257 Open Firmware's memory for it; claim memory from _start to _end.
16258 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16259 (_end): New extern.
16260 (_start): Zero BSS from __bss_start to _end.
16261 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16263 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16265 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16267 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16268 -1 if args.base was -1.
16270 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16272 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16273 escape sequence instead of a literal ^L. Also call
16274 grub_ofconsole_gotoxy.
16276 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16278 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16279 void * arguments to grub_addr_t. All callers updated. Also make
16280 the `result' argument optional.
16281 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16282 All callers updated.
16284 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16286 * commands/ls.c (grub_ls_list_files): Use the string following the
16287 initial ')', if present, as the filesystem path.
16288 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16290 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16292 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16294 Make the source code of the menu interface more readable.
16296 * normal/menu.c: Include grub/mm.h.
16297 (TERM_WIDTH): New macro.
16298 (TERM_HEIGHT): Likewise.
16299 (TERM_INFO_HEIGHT): Likewise.
16300 (TERM_MARGIN): Likewise.
16301 (TERM_SCROLL_WIDTH): Likewise.
16302 (TERM_TOP_BORDER_Y): Likewise.
16303 (TERM_LEFT_BORDER_X): Likewise.
16304 (TERM_BORDER_WIDTH): Likewise.
16305 (TERM_MESSAGE_HEIGHT): Likewise.
16306 (TERM_BORDER_HEIGHT): Likewise.
16307 (TERM_NUM_ENTRIES): Likewise.
16308 (TERM_FIRST_ENTRY_Y): Likewise.
16309 (TERM_ENTRY_WIDTH): Likewise.
16310 (TERM_CURSOR_X): Likewise.
16311 (draw_border): Use macros instead of magic numbers.
16312 (print_entry): Likewise.
16313 (print_entries): Likewise.
16314 (run_menu): Likewise. Also, handle the key 'e'.
16315 (run_menu_entry): Ignore empty command lines.
16316 (print_message): Added a new argument EDIT. If EDIT is true,
16317 print a different message.
16318 (init_page): Likewise.
16319 (edit_menu_entry): New function. Not implemented yet.
16321 2004-09-17 Marco Gerards <metgerards@student.han.nl>
16323 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16324 can be loaded from normal mode.
16326 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16328 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16329 (multiboot_mod_CFLAGS): New variables.
16330 * loader/i386/pc/linux_normal.c: New file.
16331 * loader/i386/pc/multiboot_normal.c: Likewise.
16333 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16334 attribute `unused'.
16336 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16337 `fdiro' to read the mode information from instead of `diro'.
16339 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16340 looking up a symlink.
16342 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16344 * normal/command.c (grub_command_execute): Don't parse the
16345 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16346 flags of the command.
16348 * normal/menu.c (grub_menu_run): Fix typo.
16350 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16352 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16354 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16355 `y + 1' instead of `y - 1'.
16357 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16359 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16361 From Hollis Blanchard <hollis@penguinppc.org>:
16362 * kern/misc.c (memmove): New alias for grub_memmove.
16363 (memcmp): New alias for grub_memcmp.
16364 (memset): New alias for grub_memset.
16365 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16366 Change "int handle" to "grub_ieee1275_phandle_t handle".
16367 * include/grub/powerpc/ieee1275/ieee1275.h
16368 (grub_ieee1275_get_property): Likewise.
16370 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16372 Added normal mode command `chainloader' as module chain.mod, which
16373 depends on normal.mod and _chain.mod.
16375 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16376 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16377 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16379 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16380 but arguments parsing moved to ...
16381 (grub_chainloader_cmd): ... here. New function.
16382 * include/grub/i386/pc/chainloader.h: New file.
16383 * loader/i386/pc/chainloader_normal.c: Likewise.
16385 2004-09-11 Marco Gerards <metgerards@student.han.nl>
16387 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16388 (grub_mkimage_LDFLAGS): Likewise.
16389 (grub_emu_SOURCES): Likewise.
16390 (kernel_img_HEADERS): Added fshelp.h.
16391 * fs/ext2.c: Include <grub/fshelp.h>.
16392 (FILETYPE_REG): New macro.
16393 (FILETYPE_INO_REG): Likewise.
16394 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16396 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16398 (grub_fshelp_node): New struct.
16399 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16401 (grub_ext2_get_file_block): Removed function.
16402 (grub_ext2_read_block): New function.
16403 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16404 This function was written.
16405 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16406 (grub_ext2_find_file): Removed function.
16407 (grub_ext2_read_symlink): New function.
16408 (grub_ext2_iterate_dir): Likewise.
16409 (grub_ext2_open): Rewritten.
16410 (grub_ext2_dir): Rewritten.
16411 * include/grub/fshelp.h: New file.
16412 * fs/fshelp.c: Likewise.
16414 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16416 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16417 (print_message): Add a missing newline.
16418 (run_menu): Added timeout support.
16419 (run_menu_entry): New local function.
16420 (grub_menu_run): Added support for booting.
16422 * kern/loader.c (grub_loader_is_loaded): New function.
16424 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16425 (grub_get_rtc): Exported.
16427 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16428 (grub_get_rtc): Exported.
16430 * include/grub/normal.h (struct grub_command_list): Remove
16431 constant from the member `command'.
16433 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16435 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16437 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16439 2004-08-28 Marco Gerards <metgerards@student.han.nl>
16441 Add support for the JFS filesystem.
16443 * fs/jfs.c: New file.
16444 * include/grub/fs.h (grub_jfs_init): New prototype.
16445 (grub_jfs_fini): New prototype.
16446 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16447 (grub_emu_SOURCES): Likewise.
16448 (pkgdata_MODULES): Add jfs.mod.
16449 (jfs_mod_SOURCES): New variable.
16450 (jfs_mod_CFLAGS): Likewise.
16451 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16452 (grubof_SOURCES): Likewise.
16453 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16455 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16456 endian to the host endian.
16457 (grub_fat_utf16_to_utf8): Move function from there...
16458 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
16459 the endianness of the source string anymore.
16460 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16462 2004-08-24 Marco Gerards <metgerards@student.han.nl>
16464 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16465 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16466 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16467 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16469 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16470 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16471 for `node_found' and `it_dir'.
16472 (grub_hfs_dir): Add prototype for `dir_hook'.
16474 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16475 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16476 and `indir32' to silence a gcc warning.
16478 * include/grub/fs.h (grub_hfs_init): New prototype.
16479 (grub_hfs_fini): Likewise.
16482 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16484 Each disk device has its own id now. This is useful to make use
16485 of multiple disk devices.
16487 * include/grub/disk.h (grub_disk_dev_id): New enum.
16488 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16489 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16491 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16492 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16494 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16495 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16497 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16498 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16500 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16501 "id" which is used by the cache manager.
16503 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16506 2004-08-18 Marco Gerards <metgerards@student.han.nl>
16508 * fs/hfs.c: New file.
16509 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16510 (grub_emu_SOURCES): Likewise.
16511 (pkgdata_MODULES): Add hfs.mod.
16512 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16513 (grubof_SOURCES): Likewise.
16514 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16516 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16517 * kern/misc.c (grub_strncasecmp): Add function.
16519 2004-08-14 Marco Gerards <metgerards@student.han.nl>
16521 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16524 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16525 (grub_ext2_dir): In case the directory entry type is unknown, read
16528 2004-08-02 Peter Bruin <pjbruin@dds.nl>
16530 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16531 grub_load_linux instead of grub_rescue_cmd_linux as second
16532 argument of grub_rescue_register_command.
16534 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16536 2004-07-27 Marco Gerards <metgerards@student.han.nl>
16538 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16540 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16541 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16542 `loader/powerpc/ieee1275/linux.c',
16543 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16544 * include/grub/powerpc/ieee1275/ieee1275.h
16545 (grub_ieee1275_release): New prototype.
16546 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16547 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16548 normal, boot, linux and linux_normal.
16549 * loader/powerpc/ieee1275/linux.c: New file.
16550 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16552 2004-07-12 Marco Gerards <metgerards@student.han.nl>
16554 * normal/arg.c (grub_arg_parse): Correct error handling after
16555 reallocating the argumentlist (check if `argl' is not null instead
16556 of checking if `args' is not null).
16557 * kern/mm.c (grub_realloc): Return the same pointer when using the
16558 same region, instead of returning the header address.
16560 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16562 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16563 one block instead of two when looking for the initial partition.
16564 (grub_partition_probe): Initialize the local variable `p' with 0.
16565 Use base 10 for the grub_strtoul call.
16566 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16567 need for one local variable.
16568 (grub_strtoul): Don't add the new value to `num', instead of that
16571 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16573 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16574 (pxeboot_img_SOURCES): New variable.
16575 (pxeboot_img_ASFLAGS): Likewise.
16576 (pxeboot_img_LDFLAGS): Likewise.
16577 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16578 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16579 <lode_leroy@hotmail.com>.
16581 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16583 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16584 there was no input.
16586 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16588 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16589 the history buffer logic.
16591 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16593 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16594 (FILETYPE_INO_SYMLINK): New macros.
16595 (grub_ext2_find_file): Check if the node is a directory using the
16596 inode stat information instead of using the filetype in the
16597 dirent. Exclude the first character of an absolute symlink.
16598 (grub_ext2_dir): Mask out the filetype part of the mode member of
16601 2004-05-24 Marco Gerards <metgerards@student.han.nl>
16603 Add support for UFS version 1 and 2. Add support for the minix
16604 filesystem version 1 and 2, both the variants with 14 and 30 long
16607 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16609 (grub_emu_SOURCES): Likewise.
16610 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16611 (ufs_mod_SOURCES): New variable.
16612 (ufs_mod_CFLAGS): Likewise.
16613 (minix_mod_SOURCES): Likewise.
16614 (minix_mod_CFLAGS): Likewise.
16615 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16617 (grubof_SOURCES): Likewise.
16618 * fs/ufs.c: New file.
16619 * fs/minix.c: New file.
16620 * include/grub/fs.h (grub_ufs_init): New prototype.
16621 (grub_ufs_fini): Likewise.
16622 (grub_minix_init): Likewise.
16623 (grub_minix_fini): Likewise.
16624 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16627 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16629 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16630 commands/ls.c, commands/terminal.c, commands/boot.c,
16631 commands/cmp.c and commands/cat.c.
16632 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16634 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16637 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16639 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16640 and grub_, respectively. Because the conversion is trivial and
16641 mechanical, I omit the details here. Please refer to the CVS
16642 if you need more information.
16644 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16646 * include/pupa: Renamed to ...
16647 * include/grub: ... this.
16648 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16649 * util/i386/pc/grub-mkimage.c: ... this.
16650 * util/i386/pc/pupa-setup.c: Renamed to ...
16651 * util/i386/pc/grub-setup.c: ... this.
16652 * util/pupa-emu.c: Renamed to ...
16653 * util/grub-emu.c: ... this.
16655 2004-03-29 Marco Gerards <metgerards@student.han.nl>
16657 Add support for the newworld apple macintosh (PPC). This has been
16658 tested on the powerbook 2000 only. It only adds support for
16659 generic ieee1275 functions, console and disk support. This should
16660 be easy to port to other architectures with support for Open
16663 * configure.ac: Accept the powerpc as host_cpu. In the case of
16664 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16665 specific tests are only executed while building for the i386.
16666 Inverse test for crosscompile.
16667 * genmk.rb (Utility): Allow assembler files.
16668 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16669 * conf/powerpc-ieee1275.rmk: New file.
16670 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16671 * disk/powerpc/ieee1275/partition.c: Likewise.
16672 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16673 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16674 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16675 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16676 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16677 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16678 * include/pupa/powerpc/ieee1275/loader.h
16679 * include/pupa/powerpc/setjmp.h: Likewise.
16680 * include/pupa/powerpc/types.h: Likewise.
16681 * kern/powerpc/ieee1275/init.c: Likewise.
16682 * kern/powerpc/ieee1275/openfw.c: Likewise.
16683 * term/powerpc/ieee1275/ofconsole.c: Likewise.
16685 These files were written by Johan Rydberg
16686 (jrydberg@night.trouble.net) and I only modified them slightly.
16688 * boot/powerpc/ieee1275/cmain.c: New file.
16689 * boot/powerpc/ieee1275/crt0.S: Likewise.
16690 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16691 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16693 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
16695 * Makefile.in: Update copyright.
16696 * genmodsrc.sh: Likewise.
16697 * gensymlist.sh: Likewise.
16698 * term/i386/pc/vga.c: Indent correctly.
16700 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16701 bugreporting address.
16702 * util/i386/pc/pupa-setup.c (usage): Likewise,
16703 (main): Call pupa_ext2_init and pupa_ext2_fini.
16705 * fs/fat.c (log2): Renamed to ...
16706 (fat_log2): ... this.
16707 All callers changed.
16708 * kern/misc.c (memcpy): Alias to pupa_memmove.
16709 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16711 * util/console.c (pupa_ncurses_fini): Return 0.
16713 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16714 Move fail label here.
16715 [__GNU__]: Don't warn when using stat.
16716 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16717 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16718 long int. Use strtol instead of strtoul.
16720 2004-03-14 Marco Gerards <metgerards@student.han.nl>
16722 * commands/boot.c: New file.
16723 * commands/cat.c: Likewise.
16724 * commands/cmp.c: Likewise.
16725 * commands/ls.c: Likewise.
16726 * commands/terminal.c: Likewise.
16727 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16728 (pupa_register_command): Changed interface to match the new
16730 (pupa_command_execute): Changed (almost rewritten) so it uses
16731 pupa_split_command. Added support for setting variables using the
16733 (rescue_command): Changed to work with the new argument parser.
16734 (terminal_command): Moved from here to commands/terminal.c.
16735 (set_command): New function.
16736 (unset_command): New function.
16737 (insmod_command): New function.
16738 (rmmod_command): New function.
16739 (lsmod_command): New function.
16740 (pupa_command_init): Don't initialize the command terminal
16741 anymore. Initialize the commands set, unset, insmod, rmmod and
16743 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16744 (kernel_img_HEADERS): Add arg.h and env.h.
16745 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16746 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16747 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16749 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16751 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16752 (boot_mod_SOURCES): New variable.
16753 (terminal_mod_SOURCES): Likewise.
16754 (ls_mod_SOURCES): Likewise.
16755 (cmp_mod_SOURCES): Likewise.
16756 (cat_mod_SOURCES): Likewise.
16758 * normal/arg.c: New file.
16759 * kern/env.c: Likewise.
16760 * include/pupa/arg.h: Likewise.
16761 * include/pupa/env.h: Likewise.
16762 * font/manager.c (font_command): Changed to match argument parsing
16764 (PUPA_MOD_INIT): Likewise.
16765 * hello/hello.c (pupa_cmd_hello): Likewise.
16766 (PUPA_MOD_INIT): Likewise.
16767 * include/pupa/disk.h: Include <pupa/device.h>.
16768 (pupa_print_partinfo): New prototype.
16769 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16770 (pupa_dl_get_prefix): Likewise.
16771 * include/pupa/misc.h: Include <pupa/err.h>.
16772 (pupa_isgraph): New prototype.
16773 (pupa_isdigit): Likewise.
16774 (pupa_split_cmdline): Likewise.
16775 * include/pupa/normal.h: Include <pupa/arg.h>.
16776 (pupa_command): Changed the prototype of the member `func' to
16777 match the argument parsing interface. Added member `options'.
16778 (pupa_register_command): Updated to match function.
16779 (pupa_arg_parse): New prototype.
16780 (pupa_hello_init) [PUPA_UTIL]: New prototype.
16781 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16782 (pupa_ls_init) [PUPA_UTIL]: Likewise.
16783 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16784 (pupa_cat_init) [PUPA_UTIL]: Likewise.
16785 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16786 (pupa_boot_init) [PUPA_UTIL]: Likewise.
16787 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16788 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16789 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16790 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16791 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16792 * kern/disk.c: Include <pupa/file.h>.
16793 (pupa_print_partinfo): New function.
16794 * kern/dl.c: Include <pupa/env.h>.
16795 (pupa_dl_dir): Variable removed.
16796 (pupa_dl_load): Use the environment variable `prefix' instead of
16797 the variable pupa_dl_dir.
16798 (pupa_dl_set_prefix): Function removed.
16799 (pupa_dl_get_prefix): Likewise.
16800 * kern/i386/pc/init.c: Include <pupa/env.h>.
16801 (pupa_machine_init): Use the environment variable `prefix' instead of
16802 using pupa_dl_set_prefix to set the prefix.
16803 * kern/main.c: Include <pupa/env.h>.
16804 (pupa_set_root_dev): Use the environment variable `prefix' instead of
16805 using pupa_dl_get_prefix to get the prefix.
16806 * kern/misc.c: Include <pupa/env.h>.
16807 (pupa_isdigit): New function.
16808 (pupa_isgraph): Likewise.
16809 (pupa_ftoa): Likewise.
16810 (pupa_vsprintf): Added support for printing values of the type
16811 `double'. Make it possible to format variable output when using
16812 formatting like `%1.2%f'.
16813 (pupa_split_cmdline): New function.
16814 * kern/rescue.c: Include <pupa/env.h>.
16815 (next_word): Removed function.
16816 (pupa_rescue_cmd_prefix): Likewise.
16817 (pupa_rescue_cmd_set): New function.
16818 (pupa_rescue_cmd_unset): New function.
16819 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16820 split the command line instead of splitting it here. Added
16821 support for setting variables using the syntax `foo=bar'. Don't
16822 initialize the prefix command anymore. Initialized the set and
16824 * normal/cmdline.c: Include <pupa/env.h>.
16825 (pupa_tab_complete): Added prototypes for print_simple_completion,
16826 print_partition_completion, add_completion, iterate_commands,
16827 iterate_dev, iterate_part and iterate_dir. Moved code to print
16828 partition information from here to kern/disk.c.
16829 (pupa_cmdline_run): Don't check if the function exists anymore.
16830 * normal/main.c: Include <pupa/env.h>.
16831 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16832 instead of using pupa_dl_get_prefix to get the prefix.
16833 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16834 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16836 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16837 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16838 ((unused))' to silence a gcc warning.
16839 (pupa_vga_setcolor): Likewise.
16840 (debug_command): Changed to match argument parsing
16842 * util/pupa-emu.c: Include <pupa/env.h>.
16843 (options): Added 0's for unused fields to silence a gcc warning.
16845 (main): Use the environment variable `prefix' instead of using
16846 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16847 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16850 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16851 * util/misc.c: Include <malloc.h>.
16852 (pupa_malloc): Rewritten so errors are correctly reported.
16853 (pupa_realloc): Likewise.
16854 (pupa_memalign): Likewise.
16855 (pupa_mm_init_region): Declare unused variables with
16856 `__attribute__ ((unused))' to silence a gcc warning.
16857 * normal/i386/setjmp.S: Remove tab at the end of the file to
16858 silence a gcc warning.
16859 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16860 variables with `__attribute__ ((unused))' to silence a gcc
16862 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16863 local variable i unsigned to silence a gcc warning.
16865 * kern/term.c: Include <pupa/misc.h>.
16866 (pupa_more_lines): New variable.
16867 (pupa_more): Likewise.
16868 (pupa_putcode): When the pager is active pause at the end of every
16870 (pupa_set_more): New function.
16871 * include/pupa/term.h (pupa_set_more): New prototype.
16874 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16876 Now this project is GRUB 2 rather than PUPA. The location of
16877 the CVS repository was moved to GRUB's.
16879 * configure.ac: Use bug-grub as the reporting address.
16880 Use GRUB instead of PUPA.
16881 Change the version number to 1.90.
16883 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16885 * genkernsyms.sh: Updated copyright information.
16886 * genmk.rb: Likewise.
16887 * genmodsrc.sh: Likewise.
16888 * gensymlist.sh: Likewise.
16889 * boot/i386/pc/boot.S: Likewise.
16890 * boot/i386/pc/diskboot.S: Likewise.
16891 * disk/i386/pc/biosdisk.c: Likewise.
16892 * disk/i386/pc/partition.c: Likewise.
16893 * font/manager.c: Likewise.
16894 * fs/ext2.c: Likewise.
16895 * fs/fat.c: Likewise.
16896 * include/pupa/boot.h: Likewise.
16897 * include/pupa/device.h: Likewise.
16898 * include/pupa/disk.h: Likewise.
16899 * include/pupa/dl.h: Likewise.
16900 * include/pupa/elf.h: Likewise.
16901 * include/pupa/err.h: Likewise.
16902 * include/pupa/file.h: Likewise.
16903 * include/pupa/font.h: Likewise.
16904 * include/pupa/fs.h: Likewise.
16905 * include/pupa/kernel.h: Likewise.
16906 * include/pupa/loader.h: Likewise.
16907 * include/pupa/misc.h: Likewise.
16908 * include/pupa/mm.h: Likewise.
16909 * include/pupa/net.h: Likewise.
16910 * include/pupa/normal.h: Likewise.
16911 * include/pupa/rescue.h: Likewise.
16912 * include/pupa/setjmp.h: Likewise.
16913 * include/pupa/symbol.h: Likewise.
16914 * include/pupa/term.h: Likewise.
16915 * include/pupa/types.h: Likewise.
16916 * include/pupa/i386/setjmp.h: Likewise.
16917 * include/pupa/i386/types.h: Likewise.
16918 * include/pupa/i386/pc/biosdisk.h: Likewise.
16919 * include/pupa/i386/pc/boot.h: Likewise.
16920 * include/pupa/i386/pc/console.h: Likewise.
16921 * include/pupa/i386/pc/init.h: Likewise.
16922 * include/pupa/i386/pc/kernel.h: Likewise.
16923 * include/pupa/i386/pc/linux.h: Likewise.
16924 * include/pupa/i386/pc/loader.h: Likewise.
16925 * include/pupa/i386/pc/memory.h: Likewise.
16926 * include/pupa/i386/pc/multiboot.h: Likewise.
16927 * include/pupa/i386/pc/partition.h: Likewise.
16928 * include/pupa/i386/pc/time.h: Likewise.
16929 * include/pupa/i386/pc/vga.h: Likewise.
16930 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16931 * include/pupa/util/getroot.h: Likewise.
16932 * include/pupa/util/misc.h: Likewise.
16933 * include/pupa/util/resolve.h: Likewise.
16934 * kern/device.c: Likewise.
16935 * kern/disk.c: Likewise.
16936 * kern/dl.c: Likewise.
16937 * kern/err.c: Likewise.
16938 * kern/file.c: Likewise.
16939 * kern/fs.c: Likewise.
16940 * kern/loader.c: Likewise.
16941 * kern/main.c: Likewise.
16942 * kern/misc.c: Likewise.
16943 * kern/mm.c: Likewise.
16944 * kern/rescue.c: Likewise.
16945 * kern/term.c: Likewise.
16946 * kern/i386/dl.c: Likewise.
16947 * kern/i386/pc/init.c: Likewise.
16948 * kern/i386/pc/lzo1x.S: Likewise.
16949 * kern/i386/pc/startup.S: Likewise.
16950 * loader/i386/pc/chainloader.c: Likewise.
16951 * loader/i386/pc/linux.c: Likewise.
16952 * loader/i386/pc/multiboot.c: Likewise.
16953 * normal/cmdline.c: Likewise.
16954 * normal/command.c: Likewise.
16955 * normal/main.c: Likewise.
16956 * normal/menu.c: Likewise.
16957 * normal/i386/setjmp.S: Likewise.
16958 * term/i386/pc/console.c: Likewise.
16959 * term/i386/pc/vga.c: Likewise.
16960 * util/console.c: Likewise.
16961 * util/genmoddep.c: Likewise.
16962 * util/misc.c: Likewise.
16963 * util/pupa-emu.c: Likewise.
16964 * util/resolve.c: Likewise.
16965 * util/unifont2pff.rb: Likewise.
16966 * util/i386/pc/biosdisk.c: Likewise.
16967 * util/i386/pc/getroot.c: Likewise.
16968 * util/i386/pc/pupa-mkimage.c: Likewise.
16969 * util/i386/pc/pupa-setup.c: Likewise.
16971 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16973 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16974 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16975 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16976 reading and reset it after reading.
16977 (pupa_ext2_close): Return PUPA_ERR_NONE.
16979 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16981 (struct linux_kernel_header): Add kernel_version and
16983 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16984 pupa_file_read succeeds.
16985 (pupa_rescue_cmd_initrd): Implement.
16987 2003-12-03 Marco Gerards <metgerards@student.han.nl>
16989 * fs/ext2.c (pupa_ext2_label): New function.
16990 (pupa_ext2_fs): Added label.
16991 * fs/fat.c (pupa_fat_label): New function.
16992 (pupa_fat_fs): Added label.
16993 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16995 * kern/misc.c (pupa_strndup): New function.
16996 * include/pupa/misc.h (pupa_strndup): New prototype.
16998 * include/pupa/normal.h: Include <pupa/err.h>.
16999 (pupa_set_history): New prototype.
17000 (pupa_iterate_commands): New prototype.
17001 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17002 <pupa/disk.h>, <pupa/file.h>.
17003 (hist_size): New variable.
17004 (hist_lines): Likewise.
17005 (hist_end): Likewise.
17006 (hist_used): Likewise.
17007 (pupa_set_history): New function.
17008 (pupa_history_get): Likewise.
17009 (pupa_history_add): Likewise.
17010 (pupa_history_replace): Likewise.
17011 (pupa_tab_complete): Likewise.
17012 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17013 completion shows partitionnames while completing partitions, this
17014 feature was suggested by Jeff Bailey.
17015 * normal/command.c (pupa_iterate_commands): New function.
17016 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17017 (pupa_normal_init): Initialize history buffer.
17018 (PUPA_MOD_INIT): Likewise.
17019 (pupa_normal_fini): Free the history buffer.
17020 (PUPA_MOD_FINI): Likewise.
17022 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17025 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17026 * configure.ac [i386]: Check for regparam bug.
17027 (NESTED_FUNC_ATTR) [! i386]: Defined.
17029 2003-11-17 Marco Gerards <metgerards@student.han.nl>
17031 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17032 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17033 (pupa_emu_SOURCES): New variable.
17034 (pupa_emu_LDFLAGS): Likewise.
17035 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17036 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17037 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17038 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17039 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17040 (pupa_jmp_buf): New typedef.
17041 (pupa_setjmp) [PUPA_UTIL]: New macro.
17042 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17043 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17044 (pupa_refresh): New prototype.
17045 * include/pupa/util/getroot.h: New file.
17046 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17048 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17049 (pupa_rescue_cmd_cat): Likewise.
17050 (pupa_rescue_cmd_ls): Likewise.
17051 (pupa_rescue_cmd_testload): Likewise.
17052 (pupa_rescue_cmd_lsmod): Likewise.
17053 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17054 * normal/menu.c (run_menu): Likewise.
17055 * kern/term.c (pupa_cls): Likewise.
17056 (pupa_refresh): New function.
17057 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17058 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17059 * util/console.c: New file.
17061 * util/i386/pc/getroot.c: New file.
17062 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17063 (pupa_putchar): New function.
17064 (pupa_refresh): Likewise.
17065 (xgetcwd): Function moved to ...
17066 (strip_extra_slashes): Likewise.
17067 (get_prefix): Likewise.
17068 * util/i386/pc/getroot.c: ... here.
17069 (find_root_device): Function moved and renamed to...
17070 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17071 Changed all callers.
17072 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17074 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17075 Changed all callers.
17076 * util/misc.c (pupa_memalign): New function.
17077 (pupa_mm_init_region): Likewise.
17078 (pupa_register_exported_symbols): Likewise.
17079 (pupa_putchar): Function removed.
17080 * util/pupa-emu.c: New file.
17082 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17084 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17085 (_multiboot_mod_SOURCES): New variable.
17086 (_multiboot_mod_CFLAGS): Likewise.
17087 * loader/i386/pc/multiboot.c: New file.
17088 * include/pupa/i386/pc/multiboot.h: Likewise.
17089 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17090 (pupa_multiboot_real_boot): New function.
17091 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17092 (pupa_multiboot_real_boot): New prototype.
17093 (pupa_rescue_cmd_multiboot): Likewise
17094 (pupa_rescue_cmd_module): Likewise.
17096 * kern/loader.c (pupa_loader_set): Continue when
17097 pupa_loader_unload_func() fails.
17098 (pupa_loader_unset): New function.
17099 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17101 * kern/misc.c (pupa_stpcpy): New function.
17102 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17104 2003-11-12 Marco Gerards <metgerards@student.han.nl>
17106 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17107 for available extensions.
17109 * include/pupa/i386/pc/time.h: New file.
17110 * kern/disk.c: Include <pupa/machine/time.h>.
17111 (PUPA_CACHE_TIMEOUT): New macro.
17112 (pupa_last_time): New variable.
17113 (pupa_disk_open): Flush the cache when there was a timeout.
17114 (pupa_disk_close): Reset the timer.
17115 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17117 * util/misc.c: Include <sys/times.h>
17118 (pupa_get_rtc): New function.
17120 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17122 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17124 (pupa_ext2_get_file_block): Use blocks member.
17126 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17127 first block. Return -1 instead of pupa_errno on error.
17129 2003-10-27 Marco Gerards <metgerards@student.han.nl>
17131 * README: In the pupa-mkimage example use _chain instead of chain
17132 and ext2 instead of fat.
17133 * TODO: Replace ext2fs with jfs as an example. Add an item for
17134 adding journal playback for ext2fs.
17135 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17136 (pkgdata_MODULES): Added ext2.mod.
17137 (ext2_mod_SOURCES): New variable.
17138 (ext2_mod_CFLAGS): Likewise.
17139 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17140 * include/pupa/misc.h (pupa_strncpy): New prototype.
17141 (pupa_strcat): Likewise.
17142 (pupa_strncmp): Likewise.
17143 * kern/misc.c (pupa_strcat): Enable function.
17144 (pupa_strncpy): New function.
17145 (pupa_strncmp): Likewise.
17146 * fs/ext2.c: New file.
17148 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17149 when the read failed before retrying.
17150 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17151 (_FILE_OFFSET_BITS): Likewise.
17152 * configure.ac: Added AC_SYS_LARGEFILE.
17154 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17156 * genmk.rb (PModule#rule): Make sure to get only symbol names
17157 from the output of nm.
17158 Reported by Robert Millan <zeratul2@wanadoo.es>.
17160 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17162 I forgot to check in these changes for a long time. This adds
17163 incomplete support for VGA console, and this is still very
17164 buggy. Also, a lot of consideration is required for I18N,
17165 UNICODE, and VGA font issues. Therefore, assume that this is
17166 such that "better than nothing".
17168 * font/manager.c: New file.
17169 * include/pupa/font.h: Likewise.
17170 * include/pupa/i386/pc/vga.h: Likewise.
17171 * term/i386/pc/vga.c: Likewise.
17172 * util/unifont2pff.rb: Likewise.
17174 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17175 (pkgdata_MODULES): Added vga.mod and font.mod.
17176 (vga_mod_SOURCES): New variables.
17177 (vga_mod_CFLAGS): Likewise.
17178 (font_mod_SOURCES): Likewise.
17179 (font_mod_CFLAGS): Likewise.
17181 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17183 * include/pupa/term.h: Include pupa/err.h.
17184 (struct pupa_term): Added init and fini.
17185 Changed the argument of putchar to pupa_uint32_t.
17187 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17188 (pupa_console_real_putchar): New prototype.
17189 (pupa_console_putchar): Removed.
17190 (pupa_console_checkkey): Exported.
17191 (pupa_console_getkey): Likewise.
17193 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17196 * kern/term.c (pupa_term_set_current): Rewritten.
17197 (pupa_putchar): Likewise.
17198 (pupa_putcode): New function.
17200 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17201 (pupa_console_real_putchar): ... this.
17202 (pupa_vga_set_mode): New function.
17203 (pupa_vga_get_font): Likewise.
17205 * normal/command.c: Include pupa/term.h.
17206 (terminal_command): New function.
17207 (pupa_command_init): Register the command "terminal".
17209 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17210 (DISP_UP): Likewise.
17211 (DISP_RIGHT): Likewise.
17212 (DISP_DOWN): Likewise.
17213 (DISP_HLINE): Likewise.
17214 (DISP_VLINE): Likewise.
17215 (DISP_UL): Likewise.
17216 (DISP_UR): Likewise.
17217 (DISP_LL): Likewise.
17218 (DISP_LR): Likewise.
17220 * term/i386/pc/console.c (pupa_console_putchar): New function.
17222 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17224 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17225 FIX. Reverse the path_list.
17227 * include/pupa/normal.h: Export pupa_register_command and
17228 pupa_unregister_command.
17230 * hello/hello.c (pupa_cmd_hello): New module.
17231 * conf/i386-pc.rmk: Added hello.mod.
17233 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17235 * kern/i386/pc/lzo1x.S: New file.
17237 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17238 (compress_kernel): New variable.
17239 (generate_image): Heavily modified to support compressing a
17240 large part of the core image.
17242 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17244 (pupa_util_load_image): New function.
17246 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17247 (pupa_compressed_size): New variable.
17248 (codestart): Enable Gate A20 here.
17249 Decompress the compressed part of the core image.
17250 Rearrange the code to put functions and variables which are
17251 required for initialization in the non-compressed part.
17254 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17257 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17259 * include/pupa/i386/pc/kernel.h
17260 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17261 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17262 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17263 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17264 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17266 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17268 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17269 (Utility#rule): Likewise.
17271 * configure.ac: Check if LZO is available.
17273 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17275 * include/pupa/normal.h: New file.
17276 * include/pupa/setjmp.h: Likewise.
17277 * include/pupa/i386/setjmp.h: Likewise.
17278 * normal/cmdline.c: Likewise.
17279 * normal/command.c: Likewise.
17280 * normal/main.c: Likewise.
17281 * normal/menu.c: Likewise.
17282 * normal/i386/setjmp.S: Likewise.
17284 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17285 (pupa_rescue_cmd_initrd): Likewise.
17287 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17290 * kern/i386/pc/startup.S (translation_table): New variable.
17291 (translate_keycode): New function.
17292 (pupa_console_getkey): Call translate_keycode.
17294 * kern/rescue.c (attempt_normal_mode): New function.
17295 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17296 it failed, print a message.
17298 * kern/mm.c (pupa_real_malloc): Print more information when a
17299 free magic is broken.
17300 (pupa_free): If the first free header is not free actually, set
17303 * kern/main.c (pupa_load_normal_mode): Just load the module
17305 (pupa_main): Don't print the message
17306 "Entering into rescue mode..." here.
17308 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17310 (pupa_rescue_cmd_initrd): Likewise.
17311 (pupa_rescue_cmd_initrd): Likewise.
17313 * include/pupa/symbol.h (FUNCTION): Specify the type.
17314 (VARIABLE): Likewise.
17316 * include/pupa/err.h (pupa_err_t): Added
17317 PUPA_ERR_UNKNOWN_COMMAND.
17319 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17320 (pupa_dl_get_prefix): Likewise.
17322 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17323 Added _chain.mod and _linux.mod instead of chain.mod and
17325 (chain_mod_SOURCES): Renamed to ...
17326 (_chain_mod_SOURCES): ... this.
17327 (chain_mod_CFLAGS): Renamed to ...
17328 (_chain_mod_CFLAGS): ... this.
17329 (linux_mod_SOURCES): Renamed to ...
17330 (_linux_mod_SOURCES): ... this.
17331 (linux_mod_CFLAGS): Renamed to ...
17332 (_linux_mod_CFLAGS): ... this.
17333 (normal_mod_SOURCES): New variable.
17334 (normal_mod_CFLAGS): Likewise.
17335 (normal_mod_ASFLAGS): Likewise.
17337 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17339 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17342 * kern/dl.c (pupa_dl_ref): Refer depending modules
17344 (pupa_dl_unref): Unrefer depending modules recursively.
17345 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17346 a module is unloaded before one depending on that module is
17348 (pupa_dl_unload): Unload depending modules explicitly,
17351 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17353 * include/pupa/i386/pc/linux.h: New file.
17354 * loader/i386/pc/linux.c: Likewise.
17356 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17358 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17359 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17360 of PUPA_CHAINLOADER_BOOT_SECTOR.
17362 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17363 (pupa_linux_prot_size): New variable.
17364 (pupa_linux_tmp_addr): Likewise.
17365 (pupa_linux_real_addr): Likewise.
17366 (pupa_linux_boot_zimage): New function.
17367 (pupa_linux_boot_bzimage): Likewise.
17369 * kern/i386/pc/init.c (struct mem_region): New structure.
17370 (MAX_REGIONS): New macro.
17371 (mem_regions): New variable.
17372 (num_regions): Likewise.
17373 (pupa_os_area_addr): Likewise.
17374 (pupa_os_area_size): Likewise.
17375 (pupa_lower_mem): Likewise.
17376 (pupa_upper_mem): Likewise.
17377 (add_mem_region): New function.
17378 (compact_mem_regions): Likewise.
17379 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17380 the size of the conventional memory and that of so-called upper
17381 memory (before the first memory hole).
17382 Instead of adding each found region to free memory, use
17383 add_mem_region and add them after removing overlaps.
17384 Also, add only 1/4 of the upper memory to free memory. The rest
17385 is used for loading OS images. Maybe this is ad hoc, but this
17386 makes it much easier to relocate OS images when booting.
17388 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17389 (pupa_enter_rescue_mode): Don't register initrd and module.
17391 * kern/mm.c: Include pupa/dl.h.
17393 * kern/main.c: Include pupa/file.h and pupa/device.h.
17395 * kern/loader.c (pupa_loader_load_module_func): Removed.
17396 (pupa_loader_load_module): Likewise.
17398 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17401 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17402 (pupa_linux_tmp_addr): Likewise.
17403 (pupa_linux_real_addr): Likewise.
17404 (pupa_linux_boot_zimage): Likewise.
17405 (pupa_linux_boot_bzimage): Likewise.
17407 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17408 (pupa_upper_mem): Likewise.
17409 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17410 module is too dangerous.
17412 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17413 (pupa_os_area_size): Likewise.
17414 (pupa_loader_set): Remove the first argument. Loader doesn't
17415 manage modules or initrd any longer.
17416 (pupa_loader_load_module): Removed.
17418 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17419 (linux_mod_SOURCES): New variable.
17420 (linux_mod_CFLAGS): Likewise.
17422 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17424 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17425 the length of a blocklist correctly.
17427 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17428 Use ioctl only if the OS file is a block device.
17429 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17430 not very useful for normal files.
17432 * kern/main.c (pupa_set_root_dev): New function.
17433 (pupa_load_normal_mode): Likewise.
17434 (pupa_main): Call those above.
17436 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17439 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17441 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17443 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17444 (setup): Configure the installed partition information and the
17447 * loader/i386/pc/chainloader.c (my_mod): New variable.
17448 (pupa_chainloader_unload): New function.
17449 (pupa_rescue_cmd_chainloader): Refer itself.
17450 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17452 * kern/i386/pc/startup.S (install_partition): Removed.
17453 (version_string): Likewise.
17454 (config_file): Likewise.
17455 (pupa_install_dos_part): New variable.
17456 (pupa_install_bsd_part): Likewise.
17457 (pupa_prefix): Likewise.
17458 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17460 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17462 (make_install_device): New function.
17463 (pupa_machine_init): Set the dl prefix.
17465 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17466 (buf): Renamed to ...
17467 (linebuf): ... this.
17468 (pupa_rescue_cmd_prefix): New function.
17469 (pupa_rescue_cmd_insmod): Likewise.
17470 (pupa_rescue_cmd_rmmod): Likewise.
17471 (pupa_rescue_cmd_lsmod): Likewise.
17472 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17475 * kern/mm.c (pupa_memalign): If failed even after invalidating
17476 disk caches, unload unneeded modules and retry.
17478 * kern/misc.c (pupa_memmove): New function.
17479 (pupa_memcpy): Removed.
17480 (pupa_strcpy): New function.
17481 (pupa_itoa): Made static.
17483 * kern/dl.c (pupa_dl_iterate): New function.
17484 (pupa_dl_ref): Likewise.
17485 (pupa_dl_unref): Likewise.
17486 (pupa_dl_unload): Return if succeeded or not.
17487 (pupa_dl_unload_unneeded): New function.
17488 (pupa_dl_unload_all): Likewise.
17489 (pupa_dl_init): Renamed to ...
17490 (pupa_dl_set_prefix): ... this.
17491 (pupa_dl_get_prefix): New function.
17493 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17494 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17495 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17496 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17497 (pupa_install_dos_part): Declared.
17498 (pupa_install_bsd_part): Likewise.
17499 (pupa_prefix): Likewise.
17500 (pupa_boot_drive): Likewise.
17502 * include/pupa/types.h: Fix a typo.
17504 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17506 (pupa_memmove): Declared.
17507 (pupa_strcpy): Likewise.
17509 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17510 pupa_mod_init takes one argument, its own module.
17511 (pupa_dl_unload_unneeded): Declared.
17512 (pupa_dl_unload_all): Likewise.
17513 (pupa_dl_ref): Likewise.
17514 (pupa_dl_unref): Likewise.
17515 (pupa_dl_iterate): Likewise.
17516 (pupa_dl_init): Renamed to ...
17517 (pupa_dl_set_prefix): ... this.
17518 (pupa_dl_get_prefix): Declared.
17520 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17521 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17523 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17524 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17526 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17527 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17529 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17531 * util/i386/pc/pupa-setup.c (setup): Define the internal
17532 function find_first_partition_start at the top level, because GCC
17533 3.0.x cannot compile internal functions in deeper scopes
17535 (find_root_device): Use lstat instead of stat.
17536 Don't follow symbolic links.
17537 Fix the path-constructing code.
17539 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17540 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17541 by a BLKGETSIZE ioctl first, because block devices don't fill
17542 the member st_mode of the structure stat on Linux.
17543 [__linux__] (linux_find_partition): Use a temporary buffer
17544 REAL_DEV for the working space. Copy it to DEV before returning.
17545 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17546 buffer cache consistent.
17547 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17548 strncmp. The previous value was merely wrong.
17549 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17551 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17552 FAT size is 12. The previous value was merely wrong.
17554 * kern/main.c (pupa_main): Don't split the starting message from
17557 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17558 LF, because BIOS goes crazy about character attributes in this
17561 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17563 * include/i386/pc/util/biosdisk.h: New file.
17564 * util/i386/pc/biosdisk.c: Likewise.
17565 * util/i386/pc/pupa-setup.c: Likewise.
17567 * Makefile.in (INCLUDE_DISTFILES): Added
17568 include/pupa/i386/pc/util/biosdisk.h.
17569 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17570 directory util/i386/pc.
17571 (install-local): Added a rule for sbin_UTILITIES.
17572 (uninstall): Likewise.
17574 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17576 * util/misc.c (xrealloc): New function.
17577 (pupa_malloc): Likewise.
17578 (pupa_free): Likewise.
17579 (pupa_realloc): Likewise.
17580 (pupa_stop): Likewise.
17581 (pupa_putchar): Likewise.
17583 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17585 * include/pupa/util/misc.h (xrealloc): Declared.
17587 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17589 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17590 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17592 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17593 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17595 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17596 way should be implemented.
17597 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17599 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17600 the size of NAME for safety.
17601 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17604 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17605 (pupa_setup_SOURCES): Likewise.
17607 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17609 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17611 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17612 bunch of pushl's from pusha, because this destroys the return
17615 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17617 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17618 This means that any missing prototypes could be fatal. Also, you
17619 must take care when writing assembly code. See the comments at
17620 the beginning of startup.S, for more details.
17622 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17623 compilation mechanism.
17624 (pupa_chainloader_real_boot): Likewise.
17625 (pupa_biosdisk_rw_int13_extensions): Likewise.
17626 (pupa_biosdisk_rw_standard): Likewise.
17627 (pupa_biosdisk_check_int13_extensions): Likewise.
17628 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17629 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17630 (pupa_get_memsize): Likewise.
17631 (pupa_get_mmap_entry): Likewise.
17632 (pupa_console_putchar): Likewise.
17633 (pupa_console_setcursor): Likewise.
17634 (pupa_getrtsecs): Use pushl instead of push.
17636 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17637 memory instead of the stack for a mmap entry, because some
17638 BIOSes may ignore the maximum size and overflow.
17640 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17642 * genmk.rb (PModule#rule): Compile automatically generated
17643 sources with module-specific CFLAGS as well as other sources.
17645 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17647 * configure.ac: Check ld.
17648 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17649 respectively, before checking endianness and sizes.
17651 * Makefile.in (LD): New variable.
17653 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17655 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17657 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17659 * Changelog: New file.