1 2009-06-27 Pavel Roskin <proski@gnu.org>
3 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
5 * efiemu/prepare32.c: Likewise.
6 * efiemu/prepare64.c: Likewise.
8 2009-06-26 Pavel Roskin <proski@gnu.org>
10 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
11 * include/grub/elf.h: Define symbols without "32" or "64" based
12 on GRUB_TARGET_WORDSIZE.
13 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
14 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
16 * efiemu/loadcore64.c: Likewise.
17 * loader/i386/bsd32.c: Likewise.
18 * loader/i386/bsd64.c: Likewise.
19 * kern/dl.c: Remove own ELF definitions.
20 * util/i386/efi/grub-mkimage.c: Likewise.
22 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
24 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
25 segment 0x0 unconditionally, because the reference generated by
26 GAS is an absolute address.
28 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
30 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
31 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
33 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
35 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
36 indexes. Check for -f explicitly.
37 (search_file): Improve error message.
38 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
40 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
42 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
43 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
45 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
47 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
48 * conf/i386-ieee1275.rmk: Likewise.
49 * conf/i386-coreboot.rmk: Likewise.
51 * kern/i386/pc/startup.S (grub_stop): Remove function.
52 * kern/i386/ieee1275/startup.S: Likewise.
53 * kern/i386/coreboot/startup.S: Likewise.
54 * kern/i386/misc.S (grub_stop): New function.
56 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
58 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
59 * kern/i386/realmode.S (real_to_prot): ... to here.
61 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
63 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
65 (kernel_elf_SOURCES): Rename to ...
66 (kernel_img_SOURCES): ... this.
67 (kernel_elf_HEADERS): Rename to ...
68 (kernel_img_HEADERS): ... this. Update all users.
69 (kernel_elf_ASFLAGS): Rename to ...
70 (kernel_img_ASFLAGS): ... this.
71 (kernel_elf_CFLAGS): Rename to ...
72 (kernel_img_CFLAGS): ... this.
73 (kernel_elf_LDFLAGS): Rename to ...
74 (kernel_img_LDFLAGS): ... this.
75 * conf/i386-coreboot.rmk: Likewise.
76 * conf/powerpc-ieee1275.rmk: Likewise.
78 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
81 2009-06-21 Pavel Roskin <proski@gnu.org>
83 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
84 to match nested functions.
85 * loader/sparc64/ieee1275/linux.c: Likewise.
87 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
89 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
91 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
94 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
96 Fix asm file handling on ELF, and remove workarounds.
98 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
99 and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
100 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
101 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
103 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
107 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
108 and loader/i386/bsd64.c
109 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
110 (FREEBSD_MODTYPE_ELF_MODULE): New definition
111 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
112 (grub_freebsd_load_elfmodule32): New declaration
113 (grub_freebsd_load_elfmoduleobj64): Likewise
114 (grub_freebsd_load_elf_meta32): Likewise
115 (grub_freebsd_load_elf_meta64): Likewise
116 (grub_freebsd_add_meta): Likewise
117 (grub_freebsd_add_meta_module): Likewise
118 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
119 (grub_freebsd_add_meta_module): Likewise and move module-specific
120 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
121 (grub_cmd_freebsd): Add elf-kernel specific parts
122 based on grub_freebsd_add_meta_module
123 (grub_cmd_freebsd_module): Add type parsing moved from
124 grub_freebsd_add_meta_module
125 (grub_cmd_freebsd_module_elf): New function
126 (cmd_freebsd_module_elf): New variable
127 (GRUB_MOD_INIT): Register freebsd_module_elf
128 * loader/i386/bsd32.c: New file
129 * loader/i386/bsd64.c: Likewise
130 * loader/i386/bsdXX.c: Likewise
131 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
132 (grub_elf64_load): Likewise
133 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
135 (grub_elf64_load_hook_t): Likewise
137 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
139 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
141 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
142 don't write a menu entry for recovery mode.
144 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
146 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
147 after it's no longer needed.
149 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
151 * include/grub/i386/loader.h (grub_linux_prot_size)
152 (grub_linux_tmp_addr, grub_linux_real_addr)
153 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
155 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
156 common grub_util_info() call to ...
157 (generate_image): ... here.
158 Fix use of uninitialized memory, comparison of signed with
159 unsigned integers and memory leak.
160 Remove bogus module address message.
162 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
164 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
166 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
168 2009-06-19 Pavel Roskin <proski@gnu.org>
170 * configure.ac: Remove stray AC_MSG_CHECKING.
172 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
174 * disk/scsi.c (grub_scsi_open): use continue instead of big if
176 2009-06-18 Pavel Roskin <proski@gnu.org>
178 * conf/common.rmk: Add fs_file.mod.
179 * disk/fs_file.c: New file.
180 * include/grub/disk.h (enum grub_disk_dev_id): Add
181 GRUB_DISK_DEVICE_FILE_ID.
183 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
185 Fix build with Apple's toolchain. Part 2
187 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
190 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
192 Fix build with Apple's toolchain. Part 1
194 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
196 * configure.ac: remove a leftover AC_MSG_RESULT
197 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
200 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
204 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
205 (decomp_block): initialize ch
206 use grub_memcpy instead of memcpy
208 2009-06-17 Pavel Roskin <proski@gnu.org>
210 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
211 version, use declarations needed to use vga_text as the startup
214 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
215 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
217 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
218 and grub_at_keyboard_fini(), it's done on module load and
221 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
223 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
225 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
227 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
231 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
232 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
233 (grub_script_yylex): don't segfault on unterminated script
234 newline terminates command and variable
236 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
238 avoid double grub_adjust_range call. Bug reported by David Simner
240 * kern/disk.c (grub_disk_write): change to raw disk access before
243 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
245 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
246 spaces, for the benefit of help2man.
247 * util/i386/efi/grub-mkimage.c (usage): Likewise.
249 2009-06-16 Pavel Roskin <proski@gnu.org>
251 * kern/i386/halt.c: Include grub/machine/init.h.
252 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
254 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
256 * util/grub.d/30_os-prober.in: Use ${root} in the generated
259 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
261 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
264 2009-06-16 Pavel Roskin <proski@gnu.org>
266 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
267 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
268 save %dx, we only need %dl and we never change it.
269 * boot/i386/pc/cdboot.S: Don't set the root drive.
270 * boot/i386/pc/pxeboot.S: Likewise.
271 * include/grub/i386/pc/boot.h: Remove
272 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
273 GRUB_BOOT_MACHINE_DRIVE_CHECK.
274 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
275 * kern/i386/pc/init.c (make_install_device): Remove references
277 * kern/i386/pc/startup.S: Likewise.
278 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
280 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
284 * commands/xnu_uuid.c: new file
285 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
286 (xnu_uuid_mod_SOURCES): new variable
287 (xnu_uuid_mod_CFLAGS): likewise
288 (xnu_uuid_mod_LDFLAGS): likewise
289 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
290 * conf/i386-ieee1275.rmk: likewise
291 * conf/i386-pc.rmk: likewise
292 * conf/powerpc-ieee1275.rmk: likewise
293 * conf/sparc64-ieee1275.rmk: likewise
294 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
296 2009-06-16 Pavel Roskin <proski@gnu.org>
298 * configure.ac: Avoid '==' in test command, it's not portable.
300 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
304 * commands/probe.c: new file
305 * conf/common.rmk (pkglib_MODULES): add probe.mod
306 (probe_mod_SOURCES): new variable
307 (probe_mod_CFLAGS): likewise
308 (probe_mod_LDFLAGS): likewise
309 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
310 * conf/i386-ieee1275.rmk: likewise
311 * conf/i386-pc.rmk: likewise
312 * conf/powerpc-ieee1275.rmk: likewise
313 * conf/sparc64-ieee1275.rmk: likewise
315 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
317 Fix handling of string like \"hello\" and "a
320 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
321 (grub_script_yylex): fix parsing of quoting, escaping and newline
323 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
325 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
328 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
330 * util/grub-mkconfig.in: Fix parsing of --output option.
332 2009-06-12 Pavel Roskin <proski@gnu.org>
334 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
335 genmk.rb don't need to be generated or installed.
337 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
339 * commands/i386/pc/drivemap_int13h.S: add more comments
341 2009-06-11 Pavel Roskin <proski@gnu.org>
343 * Makefile.in (uninstall): Uninstall manuals.
345 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
346 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
347 and update-grub_lib in two places.
348 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
350 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
353 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
354 `entry_lo' to fix variable shadowing.
356 2009-06-11 Christian Franke <franke@computer.org>
358 * kern/misc.c (__enable_execute_stack): Add missing return type
359 to prevent gcc warning.
361 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
363 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
365 2009-06-11 Pavel Roskin <proski@gnu.org>
367 * Makefile.in: Don't rely on any scripts being executable.
368 Always use $(SHELL) to run shell scripts.
370 * configure.ac: Always define ___main if using -nostdlib. This
371 fixes tests on Cygwin.
373 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
377 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
378 is in bytes and not in blocks
380 2009-06-11 Pavel Roskin <proski@gnu.org>
382 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
385 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
387 * util/grub.d/30_os-prober.in: Fix a comment. Source
388 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
389 to set the root device. Place drivemap command in the generated
392 2009-06-11 Pavel Roskin <proski@gnu.org>
394 * configure.ac: Remove host_m32. Issues with 64-bit utilities
395 have long been resolved.
397 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
399 * util/grub.d/10_linux.in: Capitalise "Linux".
401 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
403 2009-06-11 Pavel Roskin <proski@gnu.org>
405 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
406 fix a gcc warning and ensure that the function won't ever exit.
408 * kern/i386/ieee1275/init.c: Add missing prototype for
411 * loader/ieee1275/multiboot2.c [__i386__]: Include
412 grub/cpu/multiboot.h.
414 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
415 casts to short - they are not portable and cause warnings. Fix
416 use of uninitialized values in input_buf. Use ARRAY_SIZE.
418 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
422 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
424 (grub_get_root_biosnumber_saved): new variable
425 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
426 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
427 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
428 %dx after the call if necessary
429 * conf/common.rmk (pkglib_MODULES): remove boot.mod
430 (boot_mod_SOURCES): remove
431 (boot_mod_CFLAGS): remove
432 (boot_mod_LDFLAGS): remove
433 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
434 (boot_mod_SOURCES): new variable
435 (boot_mod_CFLAGS): likewise
436 (boot_mod_LDFLAGS): likewise
437 * conf/i386-efi.rmk: likewise
438 * conf/i386-ieee1275.rmk: likewise
439 * conf/i386-pc.rmk: likewise
440 * conf/powerpc-ieee1275.rmk: likewise
441 * conf/sparc64-ieee1275.rmk: likewise
442 * conf/x86_64-efi.rmk: likewise
443 * include/grub/i386/pc/biosnum.h: new file
444 * lib/i386/pc/biosnum.c: likewise
445 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
446 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
447 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
449 2009-06-10 Pavel Roskin <proski@gnu.org>
451 * io/gzio.c (test_header): Don't reuse one buffer for all data.
452 Use separate variables. Read only the file size at the end, but
453 not the checksum that we don't use.
455 * kern/file.c (grub_file_read): Use void pointer for the buffer.
458 * kern/ieee1275/openfw.c: Remove libc includes.
459 * kern/ieee1275/cmain.c: Likewise.
460 * include/grub/ieee1275/ieee1275.h: Likewise.
462 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
465 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
467 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
468 `genparttoollist.sh'.
469 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
470 Add `*.sh' to the list find searches for and change `mdate.sh'
473 2009-06-10 Pavel Roskin <proski@gnu.org>
475 * include/grub/multiboot2.h: Provide compatibility defines for
477 * include/multiboot2.h: Include stdint.h only if needed, using
479 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
481 * loader/ieee1275/multiboot2.c: Likewise.
482 * loader/multiboot2.c: Likewise.
483 * loader/multiboot_loader.c: Likewise.
485 * configure.ac: Use -nostdlib when probing for the target. It
486 should not be required to have libc for the target.
488 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
489 they fail without libc headers for the target.
490 * include/grub/powerpc/libgcc.h: Use weak attribute for all
492 * include/grub/sparc64/libgcc.h: Likewise. Don't use
493 preprocessor conditionals.
495 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
496 build system doesn't need to be aware of the tar.c internals.
498 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
500 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
502 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
504 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
505 disk limit to 26 for IDE, Virtio, Xen and SCSI.
507 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
509 * util/i386/pc/grub-install.in: Change the error message if UUIDs
510 aren't available if ata.mod gets used.
512 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
514 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
515 initialising controller.
516 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
518 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
520 * util/i386/pc/grub-install.in: Add a parameter --disk-module
521 to choose between ata and biosdisk module on i386-pc.
523 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
525 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
526 Subclass and Programming Interface fields in terms of the 3 byte
528 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
530 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
531 interface is OHCI. Add grub_dprintf for symmetry with
533 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
534 interface is UHCI. Add interf variable for programming
535 interface. Print interface with class/subclass.
537 * bus/usb/ohci.c: Set interf with correct field.
539 * bus/usb/uhci.c: Remove unneeded doubled lines.
540 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
541 Remove whitespace inside comment.
543 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
545 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
546 as fallback an equivalent option without depth.
548 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
550 Not fail if unable to retrieve C/H/S on LBA disks
552 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
553 if unable to retrieve C/H/S on LBA disks
555 2009-06-08 Pavel Roskin <proski@gnu.org>
557 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
560 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
562 * Makefile.in (uninstall): Remove all $lib_DATA files.
564 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
566 Bugfix: install on partitionless device
568 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
571 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
573 * Makefile.in (uninstall): Remove all $include_DATA files.
575 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
577 * commands/true.c: New file. Implement the true and false commands.
578 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
579 (true_mod_SOURCES): New variable.
580 (true_mod_CFLAGS): Likewise.
581 (true_mod_LDFLAGS): Likewise.
583 2009-06-05 Colin D Bennett <colin@gibibit.com>
585 Optimized font character lookup using binary search instead of linear
586 search. Fonts now are required to have the character index ordered by
589 * font/font.c (load_font_index): Verify that fonts have ordered
591 (find_glyph): Use binary search instead of linear search to find a
594 2009-06-05 Michael Scherer <misc@mandriva.org>
596 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
597 uses case sensitive btree.
598 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
599 only for case insensitive filesystems.
601 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
603 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
604 * conf/common.rmk (search_mod_CFLAGS): likewise
606 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
608 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
609 compensate a compiler bug
611 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
613 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
616 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
618 Definitions for creating asm symbols with Apple's CC
620 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
621 [APPLE_CC] (VARIABLE): likewise
623 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
625 Disable lnxboot.img when compiled
628 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
629 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
630 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
631 [! APPLE_CC] (CODE_LENG): skip
632 [! APPLE_CC] (setup_sects): likewise
633 [! APPLE_CC]: skip filling
635 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
637 Address in trampolines based on 32-bit registers when compiled
640 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
642 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
644 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
646 Avoid aliases when compiling with Apple's CC for PCBIOS machine
648 * kern/misc.c [APPLE_CC] (memcpy): new function
649 [APPLE_CC] (memmove): likewise
650 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
651 (memcpy): define alias conditionally on !APPLE_CC
654 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
656 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
657 (grub_assert_fail): make prototype conditional
659 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
661 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
663 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
665 (CLEANFILES): add grub-macho2img
666 (grub_macho2img_SOURCES): new variable
667 * kern/i386/pc/startup.S (bss_start): new variable
669 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
670 * util/grub-macho2img.c: new file
672 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
674 Use objconv when compiling with Apple's CC
676 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
677 (efiemu64.o): likewise
678 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
679 when compiling with Apple's CC
680 (efiemu64_s.o): likewise
681 * configure.ac: check for objconv when compiling with Apple's CC
682 * genmk.rb: use objconv for modules when compiled with Apple's CC
684 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
686 Define segment as well as section when compiling with
689 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
690 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
691 (efiemu_convert_pointer): likewise
692 (efiemu_set_virtual_address_map): likewise
693 (efiemu_convert_pointer): likewise
694 (efiemu_getcrc32): likewise
695 (init_crc32_table): likewise
697 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
698 (GRUB_MOD_DEP): likewise
700 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
702 Allow a compilation without -mcmodel=large
704 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
705 when compiled without -mcmodel=large
706 (filter_memory_map): remove memory post 4 GiB when compiled
707 without -mcmodel=large
708 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
709 TARGET_CFLAGS when -mcmodel=large isn't supported
711 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
713 Remove nested functions in efiemu core
715 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
717 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
719 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
721 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
723 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
725 (grub_cpu_is_tsc_supported): likewise
726 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
728 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
730 Absolute addressing through constant with Apple's cc
732 * kern/i386/pc/startup.S: Define necessary constants
733 and address through it when using ABS with Apple's CC
734 * boot/i386/pc/diskboot.S: likewise
735 * boot/i386/pc/boot.S: likewise
736 * boot/i386/pc/lnxboot.S: likewise
737 * boot/i386/pc/cdboot.S: likewise
738 * mmap/i386/pc/mmap_helper.S: likewise
739 * commands/i386/pc/drivemap_int13h.S: likewise
741 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
743 Check if compiler is apple cc
745 * Makefile.in (ASFLAGS): new variable
746 (TARGET_ASFLAGS): likewise
747 (TARGET_MODULE_FORMAT): likewise
748 (TARGET_APPLE_CC): likewise
750 (TARGET_IMG_CFLAGS): likewise
751 (TARGET_CPPFLAGS): add includedir
752 * configure.ac: call grub_apple_cc and grub_apple_target_cc
753 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
754 Check for linker script only if compiler isn't Apple's CC
755 (TARGET_MODULE_FORMAT): set
756 (TARGET_APPLE_CC): likewise
757 (TARGET_ASFLAGS): likewise
759 Check for objcopy only if compiler isn't Apple's CC
760 Check for BSS symbol only if compiler isn't Apple's CC
761 * genmk.rb: adapt nm options if we use Apple's utils
762 * aclocal.m4 (grub_apple_cc): new test
763 (grub_apple_target_cc): likewise
765 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
767 Simplify sed expressions and improve awk
769 * Makefile.in (install-local): simplify sed expression
770 * gencmdlist.sh: likewise
771 * genmoddep.awk: avoid adding module as a dependency of itself
773 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
775 Add missing start symbols
777 * boot/i386/pc/boot.S: add start
778 * boot/i386/pc/pxeboot.S: likewise
780 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
782 Fix wrong assumptions with grub-mkimage on EFI
784 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
785 (relocate_addresses): consider both r_addend and value at offset
786 (make_mods_section): zerofill modinfo and header
787 (convert_elf): write prefix here
789 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
791 Use .asciz instead of .string
793 * i386/pc/diskboot.S: use .asciz instead of .string
794 * i386/pc/boot.S: likewise
795 * include/grub/dl.h (GRUB_MOD_DEP): likewise
796 (GRUB_MOD_NAME): likewise
798 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
802 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
803 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
804 (grub_video_setup): remove
805 (grub_video_set_mode): new prototype
806 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
808 (linux_vesafb_res): compile only on PCBIOS
809 (grub_linux_boot): support gfxpayload
810 * loader/i386/pc/xnu.c (video_hook): new function
811 (grub_xnu_set_video): support gfxpayload
812 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
813 (DEFAULT_VIDEO_HEIGHT): likewise
814 (DEFAULT_VIDEO_FLAGS): likewise
815 (DEFAULT_VIDEO_MODE): new definition
816 (video_hook): new function
817 (grub_gfxterm_init): use grub_video_set_mode
818 * util/grub.d/30_os-prober.in: remove explicit modesetting before
820 * video/video.c (grub_video_setup): removed
821 (grub_video_set_mode): new function based on grub_gfxterm_init and
824 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
826 Avoid calling biosdisk in drivemap
828 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
829 (revparse_biosdisk): likewise
830 (list_mappings): derive name from id directly
831 (grub_cmd_drivemap): use tryparse_diskstring
833 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
837 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
838 (grub_lexer_param): add tokenonhold
839 (grub_script_create_cmdline): remove cmdline. All callers updated
840 (grub_script_function_create): make functionname
841 grub_script_arg. All callers updated
842 (grub_script_execute_argument_to_string): new prototype
843 * kern/parser.c (state_transitions): reorder
844 (grub_parser_cmdline_state): fix a bug and make more compact
845 * script/sh/execute.c (grub_script_execute_argument_to_string):
847 (grub_script_execute_cmdline): use new format
848 * script/sh/function.c (grub_script_function_create): make functionname
849 grub_script_arg. All callers updated
850 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
851 (grub_script_yylex): remove
852 (grub_script_yylex2): renamed to ...
853 (grub_script_yylex): ...renamed
854 parse the expressions like a${b}c
855 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
856 (GRUB_PARSER_TOKEN_VAR): remove
857 (GRUB_PARSER_TOKEN_NAME): likewise
858 ("if"): declare as typeless
860 ("function"): likewise
866 (script): accept empty scripts and make exit on error
867 (arguments): use GRUB_PARSER_TOKEN_ARG
869 (command): move error handling to script
870 (menuentry): move grub_script_lexer_ref before
871 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
872 argument. All callers updated
874 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
876 Prevent GRUB from probing floppies during boot.
878 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
879 * commands/search.c (options): Add --no-floppy.
880 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
881 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
882 --no-floppy when searching for UUIDs.
884 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
886 Simplify the code duplication in commands/search.c.
888 * commands/search.c (search_label, search_fs_uuid): Merge into ...
889 (search_fs): ... this. Update all users.
891 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
893 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
895 2009-05-28 Pavel Roskin <proski@gnu.org>
897 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
898 Remove the original symlink explicitly.
900 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
901 just one slash. That's how grub_fshelp_find_file() does it.
903 2009-05-26 Pavel Roskin <proski@gnu.org>
905 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
908 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
911 2009-05-25 Christian Franke <franke@computer.org>
913 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
915 (grub_atapi_identify): Add wait after drive select.
916 (grub_ata_identify): Do more strict status register check before
917 calling grub_atapi_identify (). Suppress error message if status
918 register is 0x00 after command failure. Add status register
919 check after PIO read to avoid bogus identify due to stuck DRQ.
920 Thanks to Pavel Roskin for testing.
921 (grub_device_initialize): Remove unsafe status register check.
922 Thanks to 'phcoder' for problem report and patch.
923 Prevent sign extension in debug message.
925 2009-05-23 Colin D Bennett <colin@gibibit.com>
927 Cleaned up `include/grub/normal.h'. Grouped prototypes by
928 definition file, and functions defined in `normal/menu.c' have had
929 their prototypes moved to `include/grub/menu.h' for consistency.
931 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
933 (grub_menu_get_entry): Likewise.
934 (grub_menu_get_timeout): Likewise.
935 (grub_menu_set_timeout): Likewise.
936 (grub_menu_execute_entry): Likewise.
937 (grub_menu_execute_with_fallback): Likewise.
938 (grub_menu_entry_run): Likewise.
940 * include/grub/normal.h: Re-ordered and grouped function
941 prototypes by file that the function is defined in.
942 (grub_menu_execute_callback): Removed; moved to menu.h.
943 (grub_menu_get_entry): Likewise.
944 (grub_menu_get_timeout): Likewise.
945 (grub_menu_set_timeout): Likewise.
946 (grub_menu_execute_entry): Likewise.
947 (grub_menu_execute_with_fallback): Likewise.
948 (grub_menu_entry_run): Likewise.
949 (grub_menu_addentry): Renamed from this ...
950 (grub_normal_add_menu_entry): ... to this.
952 * normal/main.c (grub_menu_addentry): Renamed from this ...
953 (grub_normal_add_menu_entry): ... to this.
955 * script/sh/execute.c (grub_script_execute_menuentry): Update
956 reference to renamed grub_menu_addentry function.
958 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
960 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
962 2009-05-22 Pavel Roskin <proski@gnu.org>
964 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
965 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
966 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
967 compiling for the i386 targets, but not for the utilities.
969 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
971 (grub_root_drive): Likewise.
972 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
974 (grub_root_drive): Change size to byte.
975 (grub_start_addr): Remove.
976 (grub_end_addr): Likewise.
977 (grub_apm_bios_info): Likewise.
979 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
981 * normal/i386: Remove.
982 * normal/powerpc: Likewise.
983 * normal/sparc64: Likewise.
984 * normal/x86_64: Likewise.
986 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
988 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
989 * loader/i386/linux_trampoline.S: Fix indentation
990 * loader/i386/xnu_helper.S: Likewise
992 2009-05-18 Colin D Bennett <colin@gibibit.com>
994 Display error messages when parsing a Lua statement fails.
995 Previously, executing a syntactically invalid statement like
996 ")foo" or "bar;" would silently fail.
998 * script/lua/grub_main.c (handle_lua_error): New function.
999 (grub_lua_parse_line): Improved reporting of Lua parser and
1002 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1004 Remove -Werror which causes build to fail on some systems
1006 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1007 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1008 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1010 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1012 trampoline for linux on 64-bit platform
1014 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1015 loader/i386/efi/linux_trampoline.S
1016 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1018 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1020 * loader/i386/linux_trampoline.S: moved here
1021 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1023 (jumpvector): removed
1024 (grub_linux_trampoline_start): new declaration
1025 (grub_linux_trampoline_end): likewise
1026 (grub_linux_boot): use trampoline when on 64-bit platform
1027 * loader/i386/linux.c: likewise
1029 2009-05-16 Pavel Roskin <proski@gnu.org>
1031 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1032 const to avoid a warning.
1033 (grub_lua_setenv): Likewise.
1034 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1035 lmsg to fix a warning.
1037 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1039 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1040 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1041 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1042 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1043 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1044 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1045 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1046 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1048 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1050 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1052 2009-05-16 Bean <bean123ch@gmail.com>
1054 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1055 (lua_mod_SOURCES): New variable.
1056 (lua_mod_CFLAGS): Likewise.
1057 (lua_mod_LDFLAGS): Likewise.
1059 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1060 (setjmp_mod_SOURCES): New variable.
1061 (setjmp_mod_CFLAGS): Likewise.
1062 (setjmp_LDFLAGS): Likewise.
1064 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1065 (setjmp_mod_SOURCES): New variable.
1066 (setjmp_mod_CFLAGS): Likewise.
1067 (setjmp_LDFLAGS): Likewise.
1069 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1070 (setjmp_mod_SOURCES): New variable.
1071 (setjmp_mod_CFLAGS): Likewise.
1072 (setjmp_LDFLAGS): Likewise.
1074 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1075 (setjmp_mod_SOURCES): New variable.
1076 (setjmp_mod_CFLAGS): Likewise.
1077 (setjmp_LDFLAGS): Likewise.
1079 * normal/i386/setjmp.S: Moved from here ...
1080 * lib/i386/setjmp.S: ... Moved here
1081 * normal/x86_64/setjmp.S: Moved from here ...
1082 * lib/x86_64/setjmp.S: ... Moved here
1083 * normal/powerpc/setjmp.S: Moved from here ...
1084 * lib/powerpc/setjmp.S: ... Moved here
1085 * normal/sparc64/setjmp.S: Moved from here ...
1086 * lib/sparc64/setjmp.S: ... Moved here
1088 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1089 returns_twice in mingw.
1091 * script/lua/grub_lib.c: New file.
1092 * script/lua/grub_lib.h: Likewise.
1093 * script/lua/grub_lua.h: Likewise.
1094 * script/lua/grub_main.c: Likewise.
1095 * script/lua/lapi.c: Likewise.
1096 * script/lua/lapi.h: Likewise.
1097 * script/lua/lauxlib.c: Likewise.
1098 * script/lua/lauxlib.h: Likewise.
1099 * script/lua/lbaselib.c: Likewise.
1100 * script/lua/lcode.c: Likewise.
1101 * script/lua/lcode.h: Likewise.
1102 * script/lua/ldblib.c: Likewise.
1103 * script/lua/ldebug.c: Likewise.
1104 * script/lua/ldebug.h: Likewise.
1105 * script/lua/ldo.c: Likewise.
1106 * script/lua/ldo.h: Likewise.
1107 * script/lua/ldump.c: Likewise.
1108 * script/lua/lfunc.c: Likewise.
1109 * script/lua/lfunc.h: Likewise.
1110 * script/lua/lgc.c: Likewise.
1111 * script/lua/lgc.h: Likewise.
1112 * script/lua/linit.c: Likewise.
1113 * script/lua/liolib.c: Likewise.
1114 * script/lua/llex.c: Likewise.
1115 * script/lua/llex.h: Likewise.
1116 * script/lua/llimits.h: Likewise.
1117 * script/lua/lmathlib.c: Likewise.
1118 * script/lua/lmem.c: Likewise.
1119 * script/lua/lmem.h: Likewise.
1120 * script/lua/loadlib.c: Likewise.
1121 * script/lua/lobject.c: Likewise.
1122 * script/lua/lobject.h: Likewise.
1123 * script/lua/lopcodes.c: Likewise.
1124 * script/lua/lopcodes.h: Likewise.
1125 * script/lua/loslib.c: Likewise.
1126 * script/lua/lparser.c: Likewise.
1127 * script/lua/lparser.h: Likewise.
1128 * script/lua/lstate.c: Likewise.
1129 * script/lua/lstate.h: Likewise.
1130 * script/lua/lstring.c: Likewise.
1131 * script/lua/lstring.h: Likewise.
1132 * script/lua/lstrlib.c: Likewise.
1133 * script/lua/ltable.c: Likewise.
1134 * script/lua/ltable.h: Likewise.
1135 * script/lua/ltablib.c: Likewise.
1136 * script/lua/ltm.c: Likewise.
1137 * script/lua/ltm.h: Likewise.
1138 * script/lua/lua.h: Likewise.
1139 * script/lua/luaconf.h: Likewise.
1140 * script/lua/lualib.h: Likewise.
1141 * script/lua/lundump.c: Likewise.
1142 * script/lua/lundump.h: Likewise.
1143 * script/lua/lvm.c: Likewise.
1144 * script/lua/lvm.h: Likewise.
1145 * script/lua/lzio.c: Likewise.
1146 * script/lua/lzio.h: Likewise.
1148 2009-05-16 Bean <bean123ch@gmail.com>
1150 * include/grub/kernel.h (grub_module_header_types): Add type
1153 * kern/main.c (grub_load_config): New function.
1154 (grub_main): Call grub_load_config to read boot config.
1156 * grub-mkimage (generate_image): New parameter config_path.
1157 (options): New option --config.
1158 (main): Parse --config option, and pass it to generate_image.
1160 2009-05-14 Christian Franke <franke@computer.org>
1162 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1163 This fixes build on Cygwin.
1165 2009-05-14 Pavel Roskin <proski@gnu.org>
1167 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1168 jump. This saves two bytes, so the typical case of 2 swapped
1169 drives would fit 32 bytes.
1171 2009-05-13 Pavel Roskin <proski@gnu.org>
1173 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1174 grub_uint32_t to avoid a warning.
1176 * loader/i386/linux.c (allocate_pages): When assigning
1177 real_mode_mem, cast through grub_size_t to fix a warning. The
1178 code already makes sure that the value would fit a pointer.
1179 (grub_linux_setup_video): Cast render_target->data to
1180 grub_size_t to fix a warning.
1182 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
1184 * commands/i386/pc/drivemap.c: New file - implement drivemap
1186 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1187 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1189 2009-05-13 Pavel Roskin <proski@gnu.org>
1191 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1192 embedding_area_exists.
1194 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1196 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1197 it easier to understand / work with.
1198 Improve warning messages for cases where there's no embedding area,
1199 or when it is too small (or core.img too large).
1201 2009-05-13 Pavel Roskin <proski@gnu.org>
1203 * loader/i386/pc/multiboot2.c: Add necessary includes for
1204 grub_multiboot2_real_boot().
1206 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1207 PX record is always little-endian. We only need the lower 2
1210 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1211 facilitate code reuse.
1212 (grub_cpio_mount): Use "struct head", not a char buffer. This
1213 fixes a warning reported by gcc 4.4.
1215 * kernel/disk.c (grub_disk_read): Use void pointer for the
1217 (grub_disk_write): Use const void pointer for the buffer.
1218 Adjust all callers. Remove unnecessary casts.
1220 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1222 * util/i386/pc/grub-install.in: Update copyright year.
1224 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1228 * commands/gptsync.c: new file
1229 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1230 (gptsync_mod_SOURCES): new variable
1231 (gptsync_mod_CFLAGS): likewise
1232 (gptsync_mod_LDFLAGS): likewise
1233 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1235 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1236 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1237 * conf/i386-ieee1275.rmk: likewise
1238 * conf/i386-pc.rmk: likewise
1239 * conf/powerpc-ieee1275.rmk: likewise
1241 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1245 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1246 (grub_dl_ref): likewise
1248 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1250 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1251 split in two functions (one for msdos and one for gpt).
1253 2009-05-08 Pavel Roskin <proski@gnu.org>
1255 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1258 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1259 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1260 Initialize them with -1. Add sanity check for bad1. Eliminate
1263 2009-05-08 David S. Miller <davem@davemloft.net>
1265 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1267 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1269 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1272 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
1274 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1275 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1277 2009-05-05 David S. Miller <davem@davemloft.net>
1279 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1281 2009-05-05 Pavel Roskin <proski@gnu.org>
1283 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1284 of grub_dl_ref() and grub_dl_unref().
1285 * commands/parttool.c: Remove preprocessor conditionals around
1286 grub_dl_ref() and grub_dl_unref().
1287 * fs/affs.c: Likewise.
1288 * fs/afs.c: Likewise.
1289 * fs/cpio.c: Likewise.
1290 * fs/ext2.c: Likewise.
1291 * fs/fat.c: Likewise.
1292 * fs/hfs.c: Likewise.
1293 * fs/hfsplus.c: Likewise.
1294 * fs/iso9660.c: Likewise.
1295 * fs/jfs.c: Likewise.
1296 * fs/minix.c: Likewise.
1297 * fs/ntfs.c: Likewise.
1298 * fs/reiserfs.c: Likewise.
1299 * fs/sfs.c: Likewise.
1300 * fs/udf.c: Likewise.
1301 * fs/ufs.c: Likewise.
1302 * fs/xfs.c: Likewise.
1303 * include/grub/dl.h: Likewise.
1304 * loader/xnu.c: Likewise.
1306 2009-05-04 Pavel Roskin <proski@gnu.org>
1308 * commands/acpi.c: Remove unused variable my_mod.
1309 * partmap/amiga.c: Likewise.
1310 * partmap/apple.c: Likewise.
1311 * partmap/gpt.c: Likewise.
1312 * partmap/pc.c: Likewise.
1313 * partmap/sun.c: Likewise.
1314 * term/gfxterm.c: Likewise.
1315 * term/i386/pc/vesafb.c: Likewise.
1316 * term/i386/pc/vga.c: Likewise.
1318 2009-05-04 David S. Miller <davem@davemloft.net>
1320 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1321 pointer args to grub_ieee1275_get_property().
1323 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1325 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1326 devices, and do not traverse down under controller nodes.
1328 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1329 (grub_ofdisk_open): Use it to un-escape "," characters.
1330 * kern/disk.c (find_part_sep): New.
1331 (grub_disk_open): Use it to find the first non-escaped ','
1332 character in the disk name.
1333 * util/ieee1275/devicemap.c (escape_of_path): New.
1334 (grub_util_emit_devicemap_entry): Use it.
1335 * util/sparc64/ieee1275/grub-install.in: Update script to
1336 strip partition specifiers properly by not triggering on
1337 '\' escaped ',' characters.
1339 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1341 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1343 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1345 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1346 on documentation from Wikipedia).
1348 2009-05-04 Pavel Roskin <proski@gnu.org>
1350 * disk/ata.c: Spelling fixes.
1351 * disk/raid.c: Likewise.
1352 * disk/usbms.c: Likewise.
1353 * disk/dmraid_nvidia.c: Likewise.
1354 * kern/ieee1275/openfw.c: Likewise.
1355 * kern/ieee1275/init.c: Likewise.
1356 * kern/ieee1275/cmain.c: Likewise.
1357 * boot/i386/pc/cdboot.S: Likewise.
1358 * video/readers/png.c: Likewise.
1359 * video/i386/pc/vbe.c: Likewise.
1360 * fs/udf.c: Likewise.
1361 * fs/hfs.c: Likewise.
1362 * fs/reiserfs.c: Likewise.
1363 * efiemu/runtime/efiemu.c: Likewise.
1364 * efiemu/main.c: Likewise.
1365 * efiemu/mm.c: Likewise.
1366 * include/grub/elf.h: Likewise.
1367 * include/grub/xnu.h: Likewise.
1368 * include/grub/usbdesc.h: Likewise.
1369 * include/grub/usb.h: Likewise.
1370 * include/grub/script_sh.h: Likewise.
1371 * include/grub/lib/LzmaEnc.h: Likewise.
1372 * include/grub/efiemu/efiemu.h: Likewise.
1373 * include/grub/command.h: Likewise.
1374 * normal/menu.c: Likewise.
1375 * normal/main.c: Likewise.
1376 * normal/datetime.c: Likewise.
1377 * bus/usb/uhci.c: Likewise.
1378 * mmap/i386/uppermem.c: Likewise.
1379 * mmap/mmap.c: Likewise.
1380 * commands/acpi.c: Likewise.
1381 * commands/test.c: Likewise.
1382 * partmap/apple.c: Likewise.
1383 * font/font.c: Likewise.
1384 * loader/sparc64/ieee1275/linux.c: Likewise.
1385 * loader/macho.c: Likewise.
1386 * loader/i386/bsd_trampoline.S: Likewise.
1387 * loader/i386/bsd.c: Likewise.
1388 * loader/xnu.c: Likewise.
1389 * term/i386/pc/vesafb.c: Likewise.
1390 * term/usb_keyboard.c: Likewise.
1391 * util/resolve.c: Likewise.
1392 * util/getroot.c: Likewise.
1394 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1396 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1398 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1400 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1403 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1405 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1406 parameter only available on BIOS.
1408 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1410 Removed wrong semicolon in declaration
1412 * grub/misc.h (grub_dprintf): remove semicolon
1414 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1416 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1417 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1418 is done by grub_cmd_linux() now).
1419 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1420 restore video to text mode.
1421 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1422 indicates lack of "vga=" parameter. "vga=0" is mapped to
1423 `GRUB_LINUX_VID_MODE_NORMAL'.
1425 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1427 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1428 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1429 and `normal/script.c'. Add `kern/rescue_reader.c',
1430 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1431 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1432 `grub_script.tab.c'.
1434 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1435 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1436 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1437 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1438 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1440 * Makefile.in: Remove duplicated 2008 in Copyright line.
1442 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1444 * util/misc.c (grub_util_warn): New function. Emits a warning
1446 * include/grub/util/misc.h (grub_util_warn): New declaration.
1448 * util/i386/pc/grub-install.in: Understand --force and pass it down
1451 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1453 (setup): Improve error messages and add warnings when requested to
1454 install in odd layouts. Refuse to install using blocklists unless
1457 2009-05-04 martin f. krafft <madduck@madduck.net>
1459 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1461 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1463 Updated copyright year
1465 * fs/hfsplus.c: updated copyright year
1467 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1471 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1472 in the space previously used by unused3
1473 (grub_hfsplus_uuid): new function
1474 (grub_hfsplus_fs): added uuid field
1476 2009-05-03 Pavel Roskin <proski@gnu.org>
1478 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1479 suppress warnings. It's no longer needed.
1480 * disk/host.c: Likewise.
1481 * disk/ata_pthru.c: Likewise.
1482 * disk/loopback.c: Likewise.
1483 * hook/datehook.c: Likewise.
1484 * parttool/pcpart.c: Likewise.
1485 * fs/i386/pc/pxe.c: Likewise.
1486 * fs/ntfscomp.c: Likewise.
1487 * efiemu/main.c: Likewise.
1488 * mmap/mmap.c: Likewise.
1489 * commands/crc.c: Likewise.
1490 * commands/hexdump.c: Likewise.
1491 * commands/hdparm.c: Likewise.
1492 * commands/acpi.c: Likewise.
1493 * commands/echo.c: Likewise.
1494 * commands/minicmd.c: Likewise.
1495 * commands/blocklist.c: Likewise.
1496 * commands/memrw.c: Likewise.
1497 * commands/loadenv.c: Likewise.
1498 * commands/usbtest.c: Likewise.
1499 * commands/lsmmap.c: Likewise.
1500 * commands/boot.c: Likewise.
1501 * commands/parttool.c: Likewise.
1502 * commands/configfile.c: Likewise.
1503 * commands/search.c: Likewise.
1504 * commands/ieee1275/suspend.c: Likewise.
1505 * commands/cat.c: Likewise.
1506 * commands/i386/pc/pxecmd.c: Likewise.
1507 * commands/i386/pc/play.c: Likewise.
1508 * commands/i386/pc/halt.c: Likewise.
1509 * commands/i386/pc/vbeinfo.c: Likewise.
1510 * commands/i386/pc/vbetest.c: Likewise.
1511 * commands/lspci.c: Likewise.
1512 * commands/date.c: Likewise.
1513 * commands/handler.c: Likewise.
1514 * commands/ls.c: Likewise.
1515 * commands/test.c: Likewise.
1516 * commands/cmp.c: Likewise.
1517 * commands/efi/loadbios.c: Likewise.
1518 * commands/efi/fixvideo.c: Likewise.
1519 * commands/halt.c: Likewise.
1520 * commands/help.c: Likewise.
1521 * commands/reboot.c: Likewise.
1522 * hello/hello.c: Likewise.
1523 * script/sh/main.c: Likewise.
1524 * loader/xnu.c: Likewise.
1525 * term/terminfo.c: Likewise.
1526 * term/i386/pc/serial.c: Likewise.
1527 * term/usb_keyboard.c: Likewise.
1529 2009-05-03 David S. Miller <davem@davemloft.net>
1531 * normal/menu.c: Include grub/parser.h
1533 2009-05-03 Pavel Roskin <proski@gnu.org>
1535 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1537 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1538 Suggested by Javier MartÃn <lordhabbit@gmail.com>
1540 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1541 efiemu??.o doesn't exist.
1542 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1545 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
1547 FreeBSD 64-bit support
1549 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1550 and loader/i386/bsd_trampoline.S
1551 (bsd_mod_ASFLAGS): new variable
1552 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1553 (FREEBSD_MODTYPE_KERNEL64): likewise
1554 (grub_bsd64_trampoline_start): likewise
1555 (grub_bsd64_trampoline_end): likewise
1556 (grub_bsd64_trampoline_selfjump): likewise
1557 (grub_bsd64_trampoline_gdt): likewise
1558 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1559 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1560 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1561 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1562 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1564 * loader/i386/bsd_pagetable.c: new file
1565 * loader/i386/bsd_trampoline.S: likewise
1566 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1567 (ALIGN_VAR): likewise
1568 (entry_hi): new variable
1569 (kern_end_mdofs): likewise
1570 (is_64bit): likewise
1571 (grub_freebsd_add_meta): use ALIGN_VAR
1572 (grub_e820_mmap): new declaration
1573 (grub_freebsd_add_mmap): new function
1574 (grub_freebsd_add_meta_module): support 64 bit kernels
1575 (grub_freebsd_list_modules): use ALIGN_VAR
1576 (gdt_descriptor): new declaration
1577 (grub_freebsd_boot): support 64 bit kernels
1578 (grub_bsd_elf64_hook): new function
1579 (grub_bsd_load_elf): support elf64
1581 2009-05-03 Bean <bean123ch@gmail.com>
1583 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1584 after we get the result of if statement.
1586 2009-05-03 Bean <bean123ch@gmail.com>
1588 * Makefile.in (enable_efiemu): New variable.
1590 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1592 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1594 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1595 path, add -mno-red-zone option.
1596 (efiemu64_s.o): Likewise.
1597 (efiemu64.o): Use macro $^ for source file.
1599 * configure.ac (--enable-efiemu): New option.
1601 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1605 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1606 (pkglib_MODULES): add xnu.mod
1607 (xnu_mod_SOURCES): new variable
1608 (xnu_mod_CFLAGS): likewise
1609 (xnu_mod_LDFLAGS): likewise
1610 (xnu_mod_ASFLAGS): likewise
1611 * conf/i386-pc.rmk: likewise
1612 * conf/x86_64-efi.rmk: likewise
1613 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1615 * include/grub/i386/macho.h: new file
1616 * include/grub/i386/xnu.h: likewise
1617 * include/grub/macho.h: likewise
1618 * include/grub/machoload.h: likewise
1619 * include/grub/x86_64/macho.h: likewise
1620 * include/grub/x86_64/xnu.h: likewise
1621 * include/grub/xnu.h: likewise
1622 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1623 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1624 * loader/i386/efi/xnu.c: new file
1625 * loader/i386/pc/xnu.c: likewise
1626 * loader/i386/xnu.c: likewise
1627 * loader/i386/xnu_helper.S: likewise
1628 * loader/macho.c: likewise
1629 * loader/xnu.c: likewise
1630 * loader/xnu_resume.c: likewise
1631 * util/grub-dumpdevtree: likewise
1632 * include/grub/i386/pit.h: include grub/err.h
1633 (grub_pit_wait): export
1634 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1636 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1640 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1641 _linux_efi, linux_efi.
1642 new files in grub-emu
1643 new targets efiemu32.o and efiemu64.o
1644 * loader/linux_normal_efiemu.c: likewise
1645 * loader/i386/efi/linux.c: added preliminary efiemu support
1646 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1648 * include/grub/autoefi.h: new file
1649 * include/grub/i386/efiemu.h: likewise
1650 * include/grub/i386/pc/efiemu.h: likewise
1651 * include/grub/efi/api.h: add LL suffix when necessary
1652 new definitions relating to tables
1653 * include/grub/efiemu/efiemu.h: new file
1654 * include/grub/efiemu/runtime.h: likewise
1655 * efiemu/prepare.c: likewise
1656 * efiemu/loadcore_common.c: likewise
1657 * efiemu/loadcore64.c: likewise
1658 * efiemu/runtime/efiemu.sh: likewise
1659 * efiemu/runtime/efiemu.S: likewise
1660 * efiemu/runtime/efiemu.c: likewise
1661 * efiemu/runtime/config.h: likewise
1662 * efiemu/prepare32.c: likewise
1663 * efiemu/main.c: likewise
1664 * efiemu/modules/pnvram.c: likewise
1665 * efiemu/modules/i386: likewise
1666 * efiemu/modules/i386/pc: likewise
1667 * efiemu/modules/acpi.c: likewise
1668 * efiemu/i386/pc/cfgtables.c: likewise
1669 * efiemu/i386/loadcore64.c: likewise
1670 * efiemu/i386/loadcore32.c: likewise
1671 * efiemu/prepare64.c: likewise
1672 * efiemu/loadcore.c: likewise
1673 * efiemu/symbols.c: likewise
1674 * efiemu/mm.c: likewise
1675 * efiemu/loadcore32.c: likewise
1677 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1681 * commands/acpi.c: new file
1682 * commands/i386/pc/acpi.c: likewise
1683 * commands/efi/acpi.c: likewise
1684 * include/grub/acpi.h: likewise
1685 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1686 (acpi_mod_SOURCES): new variable
1687 (acpi_mod_CFLAGS): likewise
1688 (acpi_mod_LDFLAGS): likewise
1689 * conf/i386-efi.rmk: likewise
1690 * conf/x86_64-efi.rmk: likewise
1692 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1694 Missing part from mmap patch
1696 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1697 (grub_mmap_unregister)
1698 (grub_mmap_free_and_unregister): use grub_mmap_register
1700 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1704 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1705 * loader/i386/linux.c (find_mmap_size): likewise
1706 (allocate_pages): likewise
1707 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1708 (grub_fill_multiboot_mmap): likewise
1709 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1710 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1711 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1712 (OPENBSD_MMAP_RESERVED): likewise
1713 * include/grub/i386/pc/memory.h: include grub/memory.h
1714 (grub_lower_mem): removed
1715 (grub_upper_mem): likewise
1716 (GRUB_MACHINE_MEMORY_ACPI): new definition
1717 (GRUB_MACHINE_MEMORY_NVS): likewise
1718 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1719 (GRUB_MACHINE_MEMORY_HOLE): likewise
1720 (grub_machine_mmap_register): likewise
1721 (grub_machine_mmap_unregister): likewise
1722 (grub_machine_get_upper): likewise
1723 (grub_machine_get_lower): likewise
1724 (grub_machine_get_post64): likewise
1725 * include/grub/i386/efi/memory.h: new file
1726 * include/grub/x86_64/efi/memory.h: likewise
1727 * include/grub/efi/memory.h: likewise
1728 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1729 (mmap_mod_SOURCES): new variable
1730 (mmap_mod_LDFLAGS): likewise
1731 (mmap_mod_ASFLAGS): likewise
1732 * conf/i386-coreboot.rmk: likewise
1733 * conf/i386-ieee1275.rmk: likewise
1734 * conf/i386-efi.rmk: likewise
1735 * conf/x86_64-efi.rmk: likewise
1736 * include/grub/types.h (UINT_TO_PTR): new macro
1737 (PTR_TO_UINT32): likewise
1738 (PTR_TO_UINT64): likewise
1739 * include/grub/memory.h: new file
1740 * mmap/i386/pc/mmap.c: likewise
1741 * mmap/i386/pc/mmap_helper.S: likewise
1742 * mmap/i386/uppermem.c: likewise
1743 * mmap/mmap.c: likewise
1744 * mmap/efi/mmap.c: likewise
1745 * kern/i386/coreboot/init.c (grub_machine_init): don't use
1747 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1748 (grub_upper_mem): likewise
1749 (grub_machine_init): don't use grub_upper_mem,
1750 make grub_lower_mem local
1751 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1752 grub_mmap_iterate and grub_mmap_get_upper
1753 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1755 2009-05-02 Bean <bean123ch@gmail.com>
1757 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1759 (pkglib_MODULES): Add normal.mod and sh.mod.
1760 (normal_SOURCES): New variable.
1761 (normal_mod_CFLAGS): Likewise.
1762 (normal_mod_LDFLAGS): Likewise.
1763 (sh_mod_SOURCES): Likewise.
1764 (sh_mod_CFLAGS): Likewise.
1765 (sh_mod_LDFLAGS): Likewise.
1767 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1768 script/sh/lexer.c_DEPENDENCIES.
1769 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1770 kern/rescue_reader.c and kern/rescue_parser.c.
1771 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1772 (grub_emu_SOURCES): Change source files.
1773 (pkglib_MODULES): Remove normal.mod.
1774 (normal_SOURCES): Removed.
1775 (normal_mod_CFLAGS): Likewise.
1776 (normal_mod_LDFLAGS): Likewise.
1777 * conf/i386-coreboot.rmk: Likewise.
1778 * conf/i386-efi.rmk: Likewise.
1779 * conf/i386-ieee1276.rmk: Likewise.
1780 * conf/powerpc-ieee1275.rmk: Likewise.
1781 * conf/sparc64-ieee1275.rmk: Likewise.
1782 * conf/x86_64-efi.rmk: Likewise.
1784 * include/grub/command.h (grub_command_execute): New inline function.
1786 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1788 * include/grub/normal.h: Remove <grub/setjmp.h>.
1789 (grub_fs_module_list): Moved to normal/autofs.c.
1790 (grub_exit_env): Removed.
1791 (grub_command_execute): Likewise.
1792 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1794 (read_command_list): New function declaration.
1795 (read_fs_list): Likewise.
1797 * include/parser.h: Include <grub/reader.h>.
1798 (grub_parser_split_cmdline): Change type of getline parameter.
1799 (grub_parser): New structure.
1800 (grub_parser_class): New variable.
1801 (grub_parser_execute): New function declaration.
1802 (grub_register_rescue_parser): Likewise.
1803 (grub_parser_register): New inline function.
1804 (grub_parser_unregister): Likewise.
1805 (grub_parser_get_current): Likewise.
1806 (grub_parser_set_current): Likewise.
1808 * include/grub/reader.h: New file.
1809 * kern/reader.c: Likewise.
1810 * kern/rescue_parser.c: Likewise.
1811 * kern/rescue_reader.c: Likewise.
1812 * normal/autofs.c: Likewise.
1813 * normal/dyncmd.c: Likewise.
1815 * include/grub/rescue.h: Removed.
1816 * normal/command.h: Likewise.
1818 * include/grub/script.h: Moved to ...
1819 * include/grub/script_sh.h: ... Moved here.
1820 * normal/execute.c: Moved to ...
1821 * script/sh/execute.c: ... Moved here.
1822 * normal/function.c: Moved to ...
1823 * script/sh/function.c: ... Moved here.
1824 * normal/lexer.c: Moved to ...
1825 * script/sh/lexer.c: ... Moved here.
1826 * normal/parser.y: Moved to ...
1827 * script/sh/parser.y: ... Moved here.
1828 * normal/script.c: Moved to ...
1829 * script/sh/script.c: ... Moved here.
1831 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1833 (grub_exit_env): Removed.
1834 (fs_module_list): Moved to normal/autofs.c.
1835 (grub_file_getline): Don't handle comment here.
1836 (free_menu): Skip removed field entry->commands.
1837 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1839 (read_config_file): Removed nested parameter, change getline function.
1840 (grub_enter_normal_mode): Removed.
1841 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1842 (read_command_list): Likewise.
1843 (autoload_fs_module): Moved to normal/autofs.c.
1844 (read_fs_list): Likewise.
1845 (reader_nested): New variable.
1846 (grub_normal_execute): Run parser.sh to switch to sh parser.
1847 (grub_cmd_rescue): Removed.
1848 (cmd_normal): Removed.
1849 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1851 (grub_cmdline_run): New function.
1852 (grub_normal_reader_init): Likewise.
1853 (grub_normal_read_line): Likewise.
1854 (grub_env_write_pager): Likewise.
1855 (cmdline): New variable.
1856 (grub_normal_reader): Likewise.
1857 (GRUB_MOD_INIT): Register normal reader and set as current, register
1858 pager hook, register normal command with grub_register_command_prio,
1859 so that it won't show up in command.lst.
1860 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1861 grub_fs_autoload_hook.
1863 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1864 (grub_menu_execute_entry): Replace grub_script_execute with
1865 grub_parser_execute, change parameter to grub_command_execute.
1867 * normal/menu_text.c: Remove <grub/script.h>.
1869 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1870 and <grub/parser.h>.
1871 (run): Change editor_getline to use new parser interface. Change
1872 parameter to grub_command_execute.
1874 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1875 <grub/reader.h> and <grub/parser.h>.
1876 (grub_load_normal_mode): Execute normal command.
1877 (grub_main): Call grub_register_core_commands,
1878 grub_register_rescue_parser and grub_register_rescue_reader, use
1879 grub_reader_loop to enter input loop.
1881 * kern/parser.c (grub_parser_split_cmdline): Change type of
1883 (grub_parser_class): New variable.
1884 (grub_parser_execute): New function.
1886 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1887 * loader/multiboot2.c: Likewise.
1888 * loader/sparc64/ieee1275/linux.c: Likewise.
1890 * util/grub-emu.c (read_command_list): New dummy function.
1892 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1894 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1895 count to 16 for CCISS and IDA.
1897 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1899 * normal/menu_text.c (grub_wait_after_message): Print a newline
1900 after waiting for user input.
1902 * loader/i386/linux.c: Include `<grub/normal.h>'.
1903 (grub_cmd_linux): Improve the error message about `ask' mode, by
1904 waiting for user input so it's not missed (we can do this, since
1905 user requested interaction).
1907 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1909 Added missing lst to grub-mkrescue
1911 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1912 and ${input_dir}/parttool.lst
1914 2009-04-30 David S. Miller <davem@davemloft.net>
1916 * util/hostdisk.c (device_is_wholedisk): New function.
1917 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1918 zero only if device_is_wholedisk() returns true.
1920 * util/hostdisk.c (convert_system_partition_to_system_disk):
1921 Handle virtual disk devices named /dev/vdiskX as found on sparc
1924 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1925 lettered partition specifier is found, convert to numbered.
1927 2009-04-29 David S. Miller <davem@davemloft.net>
1929 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1930 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1932 * normal/command.c: Add missing newline at end of file.
1934 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1936 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1937 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1938 grub_ofdisk_read): Likewise, and deal similarly with the fact that
1939 ihandles have a 32-bit type but need to be stored in a "void *".
1941 2009-04-28 Pavel Roskin <proski@gnu.org>
1943 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1944 not disk. Adjust all dependencies.
1945 (grub_fs_uuid_close): Use grub_device_close(), not
1948 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1949 parent's partition, don't copy it by reference, as it gets freed
1952 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1954 Preboot hooks support
1956 * commands/boot.c (struct grub_preboot_t): new declaration
1957 (preboots_head): new variable
1958 (preboots_tail): likewise
1959 (grub_loader_register_preboot_hook): new function
1960 (grub_loader_unregister_preboot_hook): likewise
1961 (grub_loader_set): launch preboot hooks
1962 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1963 (grub_loader_register_preboot_hook): new declaration
1964 (grub_loader_unregister_preboot_hook): likewise
1966 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
1970 * disk/scsi.c (grub_scsi_open): added missing cast when
1971 calling grub_dprintf
1973 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
1975 Bug and warning fixes
1977 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1979 * commands/test.c (test_parse): fixed bug with file tests and corrected
1980 declaration of find_file
1982 2009-04-26 Pavel Roskin <proski@gnu.org>
1984 * Makefile.in: Don't install empty manual pages if help2man is
1985 missing. Use help2man option for output, not shell redirection.
1987 2009-04-26 David S. Miller <davem@davemloft.net>
1989 * util/grub-mkdevicemap.c (make_device_map): Add missing
1990 NESTED_FUNC_ATTR to process_device().
1992 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
1996 * commands/test.c: rewritten to use bash-like test
1998 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2000 Parttool autoloading and improvements
2002 * Makefile.in (pkglib_DATA): add parttool.lst
2003 (parttool.lst): new target
2004 * genmk.rb: generate parttool-*
2005 (CLEANFILES): add #{parttool}
2006 (PARTTOOLFILES): new variable
2007 * genparttoollist.sh: new file
2008 * parttool/pcpart.c (grub_pcpart_boot): more feedback
2009 (grub_pcpart_type): likewise
2010 * commands/parttool.c (helpmsg): new variable
2011 (grub_cmd_parttool): output help if not enough arguments are supplied
2013 (GRUB_MOD_INIT(parttool)): use helpmsg
2015 2009-04-24 David S. Miller <davem@davemloft.net>
2017 Avoiding opening same device multiple times in device iterator.
2019 * kern/device.c: (grub_device_iterate): Define struct part_ent,
2020 and use it to build a list of partitions in iterate_disk() and
2021 iterate_partition().
2023 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2026 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2027 grub_devalias_iterate() result instead of unconditional 0.
2028 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2029 Also, capture hook return value, either directly or via
2030 grub_children_iterate(), and propagate to caller.
2031 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2032 grub_children_iterate): Return value is now 'int' instead of
2034 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2035 like a proper iterator, stopping when hooks return non-zero.
2036 (grub_devalias_iterate): Likewise.
2038 2009-04-23 David S. Miller <davem@davemloft.net>
2040 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2042 2009-04-22 David S. Miller <davem@davemloft.net>
2044 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2045 is larger than address_cells, use that value for address_cells too.
2047 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2048 IEEE1275_MAX_PATH_LEN): Define.
2049 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2050 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2051 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2052 'devtype'. Explicitly NULL terminate devalias expansion.
2054 * util/sparc64/ieee1275/misc.c: New file.
2055 * util/sparc64/ieee1275/grub-setup.c: New file.
2056 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2057 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2058 * util/sparc64/ieee1275/grub-install.in: New file.
2059 * util/ieee1275/ofpath.c: New file.
2060 * util/ieee1275/devicemap.c: New file.
2061 * util/devicemap.c: New file.
2062 * util/deviceiter.c: New file.
2063 * kern/sparc64/ieee1275/init.c: New file.
2064 * include/grub/util/ofpath.h: New file.
2065 * include/grub/util/deviceiter.h: New file.
2066 * util/grub-mkdevicemap.c: Include deviceiter.h.
2067 Implement using grub_util_emit_devicemap_entry and
2068 grub_util_iterate_devices.
2069 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2070 util/devicemap.c into grub-mkdevicemap
2071 * conf/i386-efi.rmk: Likewise.
2072 * conf/i386-ieee1275.rmk: Likewise.
2073 * conf/i386-pc.rmk: Likewise.
2074 * conf/powerpc-ieee1275.rmk: Likewise.
2075 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2076 images and installation utilities. Build kernel as image
2077 instead of as elf binary. Use common rules as much as possible.
2079 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
2081 Correct GPT definition
2083 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2086 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
2088 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2090 2009-04-19 David S. Miller <davem@davemloft.net>
2092 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2093 (grub_rescue_cmd_linux): Rename to...
2094 (grub_cmd_linux): and fix prototype.
2095 (grub_rescue_cmd_initrd): Rename to...
2096 (grub_cmd_initrd): and fix prototype.
2097 (cmd_linux, cmd_initrd): New.
2098 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2099 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2101 2009-04-17 Pavel Roskin <proski@gnu.org>
2103 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2105 (grub_ohci_transfer): Likewise.
2107 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2109 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2110 return without a value. Fix inconsistent indentation.
2112 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2113 match struct grub_fs.
2115 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2116 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2117 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2118 * commands/lspci.c (grub_lspci_iter): Likewise.
2120 2009-04-16 Bean <bean123ch@gmail.com>
2122 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2125 2009-04-15 Pavel Roskin <proski@gnu.org>
2127 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2128 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2129 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2132 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2134 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2135 that no multiple data or metadata areas are supported and `Unknown
2138 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2140 Move loader out of the kernel
2142 * kern/loader.c: moved to ...
2143 * commands/boot.c: ... moved here
2144 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2145 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2146 * include/grub/kernel.h (grub_machine_fini): export
2147 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2148 (grub_loader_set): likewise
2149 (grub_loader_unset): likewise
2150 (grub_loader_boot): likewise
2151 * conf/common.rmk: new module boot.mod
2152 (pkglib_MODULES): add boot.mod
2153 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2154 (grub_emu_SOURCES): likewise
2155 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2156 (grub_emu_SOURCES): likewise
2157 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2158 (grub_emu_SOURCES): likewise
2159 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2160 (grub_emu_SOURCES): likewise
2161 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2162 (grub_emu_SOURCES): likewise
2163 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2164 (grub_emu_SOURCES): likewise
2165 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2166 (grub_emu_SOURCES): likewise
2168 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2170 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2172 * kern/misc.c (grub_itoa): Removed function
2173 (grub_ltoa): likewise
2174 (grub_vsprintf): use grub_lltoa
2176 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2180 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2181 * conf/i386-coreboot.rmk: likewise
2182 * conf/i386-ieee1275.rmk: likewise
2183 * conf/powerpc-ieee1275.rmk: likewise
2185 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2187 * INSTALL: Add that `./autogen.sh' needs to be run before
2190 2009-04-14 Bean <bean123ch@gmail.com>
2192 * Makefile.in (pkglib_DATA): Add handler.lst.
2193 (handler.lst): New rule.
2195 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2196 * conf/i386-coreboot.rmk: Likewise.
2197 * conf/i386-ieee1275.rmk: Likewise.
2198 * conf/i386-efi.rmk: Likewise.
2199 * conf/x86_64-efi.rmk: Likewise.
2200 * conf/powerpc-ieee1275.rmk: Likewise.
2201 * conf/sparc64-ieee1275.rmk: Likewise.
2203 * genhandlerlist.sh: New file.
2205 * genmk.rb: Add rules to generate handler.lst.
2207 * include/grub/normal.h (grub_file_getline): New function definition.
2208 (read_handler_list): Likewise.
2209 (free_handler_list): Likewise.
2211 * include/grub/term.h (grub_term_register_input): Add name parameter
2212 for auto generation of handler.lst.
2213 (grub_term_register_output): Likewise.
2215 * normal/handler.c: New file.
2217 * normal/main.c (get_line): Renamed to grub_file_getline.
2218 (read_config_file): Use the newly renamed grub_file_getline.
2219 (read_command_list): Likewise.
2220 (read_fs_list): Likewise.
2221 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2222 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2224 * term/efi/console.c (grub_console_init): Add name parameter for auto
2225 generation of handler.lst.
2226 * term/gfxterm.c: Likewise.
2227 * term/i386/pc/at_keyboard.c: Likewise.
2228 * term/i386/pc/console.c: Likewise.
2229 * term/i386/pc/serial.c: Likewise.
2230 * term/i386/pc/vesafb.c: Likewise.
2231 * term/i386/pc/vga.c: Likewise.
2232 * term/i386/pc/vga_text.c: Likewise.
2233 * term/ieee1275/ofconsole.c: Likewise.
2234 * term/usb_keyboard.c: Likewise.
2236 2009-04-14 Bean <bean123ch@gmail.com>
2238 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2239 properly with null character.
2241 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2243 * configure: Remove.
2244 * config.h.in: Likewise.
2245 * stamp-h.in: Likewise.
2246 * DISTLIST: Likewise.
2247 * conf/common.mk: Likewise.
2248 * conf/i386-coreboot.mk: Likewise.
2249 * conf/i386-efi.mk: Likewise.
2250 * conf/i386-ieee1275.mk: Likewise.
2251 * conf/i386.mk: Likewise.
2252 * conf/i386-pc.mk: Likewise.
2253 * conf/powerpc-ieee1275.mk: Likewise.
2254 * conf/sparc64-ieee1275.mk: Likewise.
2255 * conf/x86_64-efi.mk: Likewise.
2257 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2260 2009-04-14 John Stanley <jpsinthemix@verizon.net>
2261 David S. Miller <davem@davemloft.net>
2263 * util/hostdisk.c (make_device_name): Fix buffer length
2266 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2268 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2269 <sys/param.h> and <sys/sysctl.h>.
2270 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2271 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2272 opening the device and reset them afterwards.
2274 2009-04-13 Pavel Roskin <proski@gnu.org>
2276 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2277 Reported by John Stanley <jpsinthemix@verizon.net>
2279 2009-04-13 Robert Millan <rmh@aybabtu.com>
2281 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2282 that name for menuentries when appropriate.
2284 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2286 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2288 2009-04-13 Robert Millan <rmh@aybabtu.com>
2290 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2291 to Linux, simply abort telling the user it's no longer supported.
2293 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2295 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2296 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
2297 `freebsd_loadenv' only when devices.hints exist.
2299 2009-04-13 Pavel Roskin <proski@gnu.org>
2301 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2303 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2305 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2307 (grub_drive): Likewise.
2309 2009-04-13 David S. Miller <davem@davemloft.net>
2311 * kern/sparc64/ieee1275/ieee1275.c: New file.
2312 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2313 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2314 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2315 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2316 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2317 grub_ieee1275_alloc_physmem): Declare new exported functions.
2319 * include/grub/sparc64/ieee1275/loader.h: New file.
2320 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2321 * include/grub/sparc64/kernel.h: Likewise.
2322 * loader/sparc64/ieee1275/linux.c: Likewise.
2324 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2325 (grub_fstest_SOURCES): Likewise.
2327 * util/hostdisk.c (make_device_name): Do not make any assumptions
2328 about the length of drive names.
2330 * kern/dl.c (grub_dl_load_file): Close file immediately when
2331 we are done using it.
2333 2009-04-12 David S. Miller <davem@davemloft.net>
2335 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2336 values. Noticed by Pavel Roskin.
2338 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2341 * genmk.rb: Add more flexible image type specification, also
2342 pass --strip-unneeded to objcopy.
2343 * conf/i386-pc.rmk: Use *_FORMAT.
2344 * conf/i386-pc.mk: Rebuilt.
2346 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2347 (OFDISK_HASH_SZ): Define.
2348 (ofdisk_hash): New hash table.
2349 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2350 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2351 instead of device phandle which is not unique.
2353 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2354 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2355 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2356 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2357 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2358 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2359 GRUB_KERNEL_MACHINE_DATA_END): Define.
2360 (grub_kernel_image_size, grub_total_module_size): Declare.
2362 2009-04-12 Pavel Roskin <proski@gnu.org>
2364 * configure.ac: Change the logic when we check for target tools.
2365 Do it when the target is specified and it's different from the
2366 specified value of the host.
2368 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
2370 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2371 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2372 GNU/kFreeBSD. Check if a device is a character device. Use
2373 DIOCGMEDIASIZE to get the size.
2374 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2375 support for GNU/kFreeBSD.
2376 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2377 is a character device instead of a block device. Add support for
2378 FreeBSD device names.
2380 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2381 is a character device instead of a block device.
2383 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2384 is a character device instead of a block device.
2386 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2388 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2389 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2390 FreeBSD. Check if a device is a character device. Use
2391 DIOCGMEDIASIZE to get the size.
2392 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2393 support for FreeBSD.
2394 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2395 is a character device instead of a block device. Add support for
2396 FreeBSD device names.
2398 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2399 a character device instead of a block device.
2400 (grub_util_check_char_device): New function.
2402 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2403 a character device instead of a block device.
2405 * include/grub/util/getroot.h (grub_util_check_char_device): New
2408 2009-04-11 David S. Miller <davem@davemloft.net>
2410 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2412 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2413 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2414 function, if present.
2415 (__bswapdi2): Likewise.
2417 * include/grub/sparc64/ieee1275/boot.h: New file.
2418 * boot/sparc64/ieee1275/boot.S: Likewise.
2419 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2421 * kern/misc.c (grub_ltoa): New function.
2422 (grub_vsprintf): Use it to format 'long' integers.
2424 2009-04-10 David S. Miller <davem@davemloft.net>
2426 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2427 slots are of type grub_ieee1275_cell_t.
2428 (grub_nand_read): Likewise.
2429 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2430 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2431 macros are used to compare values in arg/ret block of the call.
2432 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2433 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2434 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2435 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2436 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2437 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2438 grub_ieee1275_close, grub_ieee1275_set_property,
2439 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2440 grub_ieee1275_cell_t.
2441 * kern/ieee1275/openfw.c (grub_map): Likewise.
2442 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2443 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2445 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2446 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2447 (grub_devalias_iterate): Likewise.
2449 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
2453 * fs/ufs.c (INODE_NBLOCKS): new definition
2454 (struct grub_ufs_dirent): added fields for non-BSD dirents
2455 (grub_ufs_get_file_block): fixed double indirect handling
2456 (grub_ufs_lookup_symlink): use more robust way to determine whether
2458 (grub_ufs_find_file): support for non-BSD dirents
2459 (grub_ufs_dir): support for non-BSD dirents
2461 2009-04-10 Bean <bean123ch@gnail.com>
2463 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2464 attribute, otherwise the size would be wrong for i386 platform.
2466 * include/grub/pci.h (grub_pci_read_word): New inline function.
2467 (grub_pci_read_byte): Likewise.
2468 (grub_pci_write): Likewise.
2469 (grub_pci_write_word): Likewise.
2470 (grub_pci_write_byte): Likewise.
2472 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2474 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2475 (find_framebuf): Scan pci to locate the frame buffer address.
2477 * commands/efi/fixvideo.c: New file.
2479 * commands/efi/loadbios.c: Likewise.
2481 * commands/memrw.c: Likewise.
2483 * util/grub-dumpbios.in: Likewise.
2485 * conf/common.rmk (grub-dumpbios): New utility.
2486 (pkglib_MODULES): New module memrw.mod.
2487 (memrw_mod_SOURCE): New macro.
2488 (memrw_mod_CFLAGS): Likewise.
2489 (memrw_mod_LDFLAGS): Likewise.
2491 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2493 (loadbios_mod_SOURCE): New macro.
2494 (loadbios_mod_CFLAGS): Likewise.
2495 (loadbios_mod_LDFLAGS): Likewise.
2496 (fixvideo_mod_SOURCE): Likewise.
2497 (fixvideo_mod_CFLAGS): Likewise.
2498 (fixvideo_mod_LDFLAGS): Likewise.
2500 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2502 (loadbios_mod_SOURCE): New macro.
2503 (loadbios_mod_CFLAGS): Likewise.
2504 (loadbios_mod_LDFLAGS): Likewise.
2505 (fixvideo_mod_SOURCE): Likewise.
2506 (fixvideo_mod_CFLAGS): Likewise.
2507 (fixvideo_mod_LDFLAGS): Likewise.
2509 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
2511 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2513 2009-04-07 David S. Miller <davem@davemloft.net>
2515 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2516 support for R_SPARC_OLO10 relocations. Fix compile warning for
2517 R_SPARC_WDISP30 case.
2518 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2520 2009-04-06 Pavel Roskin <proski@gnu.org>
2522 * include/grub/misc.h (ARRAY_SIZE): New macro.
2523 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2525 * loader/i386/linux.c (allocate_pages): Use free_pages().
2526 (grub_linux_unload): Don't use free_pages().
2527 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2528 wrong index. Treat all other modes as text modes.
2529 (grub_cmd_linux): Initialize vid_mode unconditionally to
2530 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2532 * commands/help.c (print_command_help): Use cmd->prio, not
2533 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2535 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
2539 * parttool/pcpart.c: new file
2540 * commands/parttool.c: likewise
2541 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2542 (parttool_mod_SOURCES): new variable
2543 (parttool_mod_CFLAGS): likewise
2544 (parttool_mod_LDFLAGS): likewise
2545 (pcpart_mod_SOURCES): likewise
2546 (pcpart_mod_CFLAGS): likewise
2547 (pcpart_mod_LDFLAGS): likewise
2548 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2549 and parttool/pcpart.c
2550 * conf/i386-efi.rmk: likewise
2551 * conf/i386-ieee1275.rmk: likewise
2552 * conf/i386-pc.rmk: likewise
2553 * conf/powerpc-ieee1275.rmk: likewise
2554 * conf/sparc64-ieee1275.rmk: likewise
2555 * conf/x86_64-ieee1275.rmk: likewise
2557 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2559 Support for mtime and further expandability of dir command
2561 * include/grub/lib/datetime.h: moved to ...
2562 * include/grub/datetime.h: ... moved here and added
2563 declaration of grub_unixtime2datetime. All users updated
2564 * include/grub/fs.h: new syntax for dir and mtime functions in
2566 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2567 and GRUB_FSHELP_FLAGS_MASK
2568 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2569 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2570 (grub_ext2_mtime): new function
2571 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2572 (grub_hfsplus_mtime): new function
2573 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2574 (GRUB_UFS_ATTR_FILE): likewise
2575 (GRUB_UFS_ATTR_LNK): likewise
2576 (struct grub_ufs_sblock): new fields mtime
2577 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2579 (grub_ufs_dir): mtime support
2580 (grub_ufs_mtime): new function
2581 * fs/affs.c (grub_affs_dir): use new dir syntax
2582 * fs/afs.c (grub_afs_dir): likewise
2583 * fs/cpio.c (grub_cpio_dir): likewise
2584 * fs/fat.c (grub_fat_find_dir): likewise
2585 * fs/hfs.c (grub_hfs_dir): likewise
2586 * fs/iso9660.c (grub_iso9660_dir): likewise
2587 * fs/jfs.c (grub_jfs_dir): likewise
2588 * fs/minix.c (grub_minix_dir): likewise
2589 * fs/ntfs.c (grub_ntfs_dir): likewise
2590 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2591 * fs/sfs.c (grub_sfs_dir): likewise
2592 * fs/xfs.c (grub_xfs_dir): likewise
2593 * util/hostfs.c (grub_hostfs_dir): likewise
2594 * lib/datetime.c: moved to ...
2595 * normal/datetime.c: ... moved here
2596 (grub_unixtime2datetime): new function
2597 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2598 * normal/completion.c (iterate_dir): use new dir syntax
2599 * normal/misc.c (grub_normal_print_device_info): tell the
2600 last modification time of a volume
2601 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2602 * conf/common.rmk: added lib/datetime.c to ls.mod
2603 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2604 (normal_mod_SOURCES): likewise
2605 (datetime_mod_SOURCES): Removed lib/datetime.c
2606 * conf/i386-efi.rmk: likewise
2607 * conf/i386-ieee1275.rmk: likewise
2608 * conf/i386-pc.rmk: likewise
2609 * conf/powerpc-ieee1275.rmk: likewise
2610 * conf/sparc64-ieee1275.rmk: likewise
2611 * conf/x86_64-efi.rmk: likewise
2613 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2615 Trim trailing spaces in FAT label and support mtools-like labels
2617 * fs/fat.c (grub_fat_iterate_dir): New function based
2618 on grub_fat_find_dir
2619 (grub_fat_find_dir): use grub_fat_iterate_dir
2620 (grub_fat_label): likewise
2622 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2624 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2626 remove extraneous kernel_elf_HEADERS
2628 2009-04-04 Bean <bean123ch@gnail.com>
2630 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2632 * util/misc.c: Likewise.
2634 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2636 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2637 instead of grub_printf.
2639 2009-04-03 Robert Millan <rmh@aybabtu.com>
2641 * loader/i386/linux.c (grub_linux_setup_video): Fill
2642 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2643 values from `mode info' structure instead of hardcoded
2646 2009-04-01 Pavel Roskin <proski@gnu.org>
2648 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2650 * genmk.rb: Likewise.
2651 * configure.ac: Likewise.
2653 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2655 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2656 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2658 2009-04-01 David S. Miller <davem@davemloft.net>
2660 * normal/sparc64/setjmp.S: Fix setjmp implementation.
2661 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2662 (grub_setjmp): Mark with 'returns_twice' attribute.
2663 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2664 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2665 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2667 2009-04-01 Robert Millan <rmh@aybabtu.com>
2669 Reapply fix from 2008-07-28 which was accidentally reverted; also
2670 perform the same fix to a similar check in same function.
2672 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2673 with the same number are found, just use issue a warning with
2674 grub_dprintf(), as this error has been reported to be non-fatal.
2676 2009-03-31 Pavel Roskin <proski@gnu.org>
2678 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2679 for cross-compilation.
2681 2009-03-30 Robert Millan <rmh@aybabtu.com>
2683 Fix i386-ieee1275 build.
2685 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2688 2009-03-30 Pavel Roskin <proski@gnu.org>
2690 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2691 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2692 zero-terminated, rely only on the strlen value. Fix comparison
2693 of strings differing in length.
2695 2009-03-30 Robert Millan <rmh@aybabtu.com>
2697 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2698 checking for abi version. Improve error messages on BIOS to notify
2699 user about `linux16' command.
2701 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2705 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2706 in case of collision
2707 * disk/scsi.c (grub_scsi_open): free scsi in case of error
2709 2009-03-29 Robert Millan <rmh@aybabtu.com>
2711 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2712 set `vid_mode' accordingly.
2713 (grub_linux_boot): Process `vid_mode' and set video mode.
2715 2009-03-29 Robert Millan <rmh@aybabtu.com>
2717 * util/grub.d/10_linux.in (linux_entry): New function.
2718 Factorize generation of Linux boot entries.
2720 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2722 Make the format of Environment Block plain text. The boot loader
2723 part is not tested well yet.
2725 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2728 (usage): Remove "info" and "clear". Add "unset". Update the
2729 description of "set", as this does not delete variables any
2731 (create_envblk_file): Complete rewrite.
2732 (open_envblk_file): Likewise.
2733 (cmd_info): Removed.
2734 (cmd_list): Likewise.
2735 (cmd_set): Likewise.
2736 (cmd_clear): Likewise.
2737 (list_variables): New function.
2738 (write_envblk): Likewise.
2739 (set_variables): Likewise.
2740 (unset_variables): Likewise.
2741 (main): Complete rewrite.
2743 * commands/loadenv.c (buffer): Removed.
2745 (open_envblk_file): New function.
2746 (read_envblk_file): Complete rewrite.
2747 (grub_cmd_load_env): Likewise.
2748 (grub_cmd_list_env): Likewise.
2749 (struct blocklist): New struct.
2750 (free_blocklists): New function.
2751 (check_blocklists): Likewise.
2752 (write_blocklists): Likewise.
2753 (grub_cmd_save_env): Complete rewrite.
2755 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2756 a plain text signature.
2757 (GRUB_ENVBLK_MAXLEN): Removed.
2758 (struct grub_envblk): Complete rewrite.
2759 (grub_envblk_find): Removed.
2760 (grub_envblk_insert): Likewise.
2761 (grub_envblk_open): New prototype.
2762 (grub_envblk_set): Likewise.
2763 (grub_envblk_delete): Put const to VALUE.
2764 (grub_envblk_iterate): Put const to NAME and VALUE.
2765 (grub_envblk_close): New prototype.
2766 (grub_envblk_buffer): New inline function.
2767 (grub_envblk_size): Likewise.
2769 * lib/envblk.c: Include grub/mm.h.
2770 (grub_env_find): Removed.
2771 (grub_envblk_open): New function.
2772 (grub_envblk_close): Likewise.
2773 (escaped_value_len): Likewise.
2774 (find_next_line): Likewise.
2775 (grub_envblk_insert): Removed.
2776 (grub_envblk_set): New function.
2777 (grub_envblk_delete): Complete rewrite.
2778 (grub_envblk_iterate): Likewise.
2780 2009-03-28 Robert Millan <rmh@aybabtu.com>
2782 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2783 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2784 variables. Use 16-bit loader.
2785 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2787 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2788 (grub_linux16_boot): ... this. Update all users.
2789 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2790 (grub_linux_boot): ... this. Update all users.
2792 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2793 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2794 commands to `linux16' and `initrd16'.
2795 (GRUB_MOD_FINI(linux)): Rename to ...
2796 (GRUB_MOD_FINI(linux16)): ... this.
2798 2009-03-24 Pavel Roskin <proski@gnu.org>
2800 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2801 not just for compilation.
2803 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2805 Move multiboot helper out of kernel
2807 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2808 `loader/i386/multiboot_helper.S'.
2809 * conf/i386-coreboot.rmk: Likewise
2810 * conf/i386-ieee1275.rmk: Likewise
2812 * kern/i386/loader.S: Move multiboot helpers from here...
2813 * loader/i386/multiboot_helper.S: ...moved here
2814 * include/grub/i386/loader.h: Move declarations of multiboot
2815 helpers from here...
2816 * include/grub/i386/multiboot.h: ...moved here
2817 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2819 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2821 * kern/env.c (grub_env_context_open): Added an argument to specify
2822 whether a new context inherits exported variables from current
2823 one. This is useful when making a sandbox to interpret a config
2825 All callers updated.
2827 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2829 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2831 * kern/env.c (grub_env_context_close): Fix memory leaks.
2833 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2835 * normal/main.c (grub_normal_execute): Added an argument
2836 BATCH to specify if an interactive interface should be provided
2837 after reading a config file.
2838 All callers updated.
2839 (read_command_list): Prevent being executed twice.
2840 (read_fs_list): Likewise.
2842 * include/grub/normal.h (grub_normal_execute): Updated the
2845 2009-03-22 Pavel Roskin <proski@gno.org>
2847 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2849 * kern/i386/pc/startup.S: Likewise.
2850 * kern/i386/efi/startup.S: Likewise.
2851 * kern/i386/ieee1275/startup.S: Likewise.
2852 * kern/i386/coreboot/startup.S: Likewise.
2853 * kern/x86_64/efi/startup.S: Likewise.
2855 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2856 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2857 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2859 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2861 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2863 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2865 Use vaddr of correct segment for entry_point.
2867 2009-03-21 Bean <bean123ch@gmail.com>
2869 * commands/blocklist.c: Add include file <grub/command.h>, remove
2870 <grub/normal.h> and <grub/arg.h>.
2871 (grub_cmd_blocklist): Use the new command interface.
2872 (GRUB_MOD_INIT): Likewise.
2873 (GRUB_MOD_FINI): Likewise.
2874 * commands/boot.c: Likewise.
2875 * commands/cat.c: Likewise.
2876 * commands/cmp.c: Likewise.
2877 * commands/configfile.c: Likewise.
2878 * commands/crc.c: Likewise.
2879 * commands/echo.c: Likewise.
2880 * commands/halt.c: Likewise.
2881 * commands/handler.c: Likewise.
2882 * commands/hdparm.c: Likewise.
2883 * commands/help.c: Likewise.
2884 * commands/hexdump.c: Likewise.
2885 * commands/loadenv.c: Likewise.
2886 * commands/ls.c: Likewise.
2887 * commands/lsmmap.c: Likewise.
2888 * commands/lspci.c: Likewise.
2889 * commands/loadenv.c: Likewise.
2890 * commands/read.c: Likewise.
2891 * commands/reboot.c: Likewise.
2892 * commands/search.c: Likewise.
2893 * commands/sleep.c: Likewise.
2894 * commands/test.c: Likewise.
2895 * commands/usbtest.c: Likewise.
2896 * commands/videotest.c: Likewise.
2897 * commands/i386/cpuid.c: Likewise.
2898 * commands/i386/pc/halt.c: Likewise.
2899 * commands/i386/pc/play.c: Likewise.
2900 * commands/i386/pc/pxecmd.c: Likewise.
2901 * commands/i386/pc/vbeinfo.c: Likewise.
2902 * commands/i386/pc/vbetest.c: Likewise.
2903 * commands/ieee1275/suspend.c: Likewise.
2904 * disk/loopback.c: Likewise.
2905 * font/font_cmd.c: Likewise.
2906 * hello/hello.c: Likewise.
2907 * loader/efi/appleloader.c: Likewise.
2908 * loader/efi/chainloader.c: Likewise.
2909 * loader/i386/bsd.c: Likewise.
2910 * loader/i386/efi/linux.c: Likewise.
2911 * loader/i386/ieee1275/linux.c: Likewise.
2912 * loader/i386/linux.c: Likewise.
2913 * loader/i386/pc/chainloader.c: Likewise.
2914 * loader/i386/pc/linux.c: Likewise.
2915 * loader/powerpc/ieee1275/linux.c: Likewise.
2916 * loader/multiboot_loader.c: Likewise.
2917 * term/gfxterm.c: Likewise.
2918 * term/i386/pc/serial.c: Likewise.
2919 * term/terminfo.c: Likewise.
2921 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2922 * term/i386/pc/vga.c: Likewise.
2923 * video/readers/jpeg.c: Likewise.
2924 * video/readers/png.c: Likewise.
2925 * video/readers/tga.c: Likewise.
2927 * util/grub-fstest (cmd_loopback): Removed.
2928 (cmd_blocklist): Likewise.
2930 (grub_register_command): Likewise.
2931 (grub_unregister_command): Likewise.
2932 (execute_command): Use grub_command_find to locate command and execute
2935 * include/grub/efi/chainloader.h: Removed.
2936 * loader/efi/chainloader_normal.c: Likewise.
2937 * loader/i386/bsd_normal.c: Likewise.
2938 * loader/i386/pc/chainloader_normal.c: Likewise.
2939 * loader/i386/pc/multiboot_normal.c: Likewise.
2940 * loader/linux_normal.c: Likewise.
2941 * loader/multiboot_loader_normal.c: Likewise.
2942 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2944 * gencmdlist.sh: Scan new registration command grub_register_extcmd
2945 and grub_register_command_p1.
2947 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2948 kern/command.c, lib/arg.c and commands/extcmd.c.
2949 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2950 (minicmd_mod_SOURCES): New variable.
2951 (minicmd_mod_CFLAGS): Likewise.
2952 (minicmd_mod_LDFLAGS): Likewise.
2953 (extcmd_mod_SOURCES): Likewise.
2954 (extcmd_mod_CFLAGS): Likewise.
2955 (extcmd_mod_LDFLAGS): Likewise.
2956 (boot_mod_SOURCES): Removed.
2957 (boot_mod_CFLAGS): Likewise.
2958 (boot_mod_LDFLAGS): Likewise.
2960 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2962 (kernel_img_HEADERS): Add command.h.
2963 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2964 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2966 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2967 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2968 remove the corresponding normal mode command.
2969 (normal_mod_SOURCES): Remove normal/arg.c.
2970 * conf/i386-coreboot.rmk: Likewise.
2971 * conf/i386-efi.rmk: Likewise.
2972 * conf/i386-ieee1275.rmk: Likewise.
2973 * conf/powerpc-ieee1275.rmk: Likewise.
2974 * conf/x86_64-efi.rmk: Likewise.
2976 * include/grub/arg.h: Move from here ...
2977 * include/grub/lib/arg.h: ... to here.
2979 * normal/arg.c: Move from here ...
2980 * lib/arg.c: ... to here.
2982 * commands/extcmd.c: New file.
2983 * commands/minicmd.c: Likewise.
2984 * include/grub/command.h: Likewise.
2985 * include/grub/extcmd.h: Likewise.
2986 * kern/command.c: Likewise.
2987 * kern/corecmd.c: Likewise.
2989 * kern/list.c (grub_list_iterate): Return int instead of void.
2990 (grub_list_insert): New function.
2991 (grub_prio_list_insert): Likewise.
2993 * kern/rescue.c (grub_rescue_command): Removed.
2994 (grub_rescue_command_list): Likewise.
2995 (grub_rescue_register_command): Likewise.
2996 (grub_rescue_unregister_command): Likewise.
2997 (grub_rescue_cmd_boot): Move to minicmd.c
2998 (grub_rescue_cmd_help): Likewise.
2999 (grub_rescue_cmd_info): Likewise.
3000 (grub_rescue_cmd_boot): Likewise.
3001 (grub_rescue_cmd_testload): Likewise.
3002 (grub_rescue_cmd_dump): Likewise.
3003 (grub_rescue_cmd_rmmod): Likewise.
3004 (grub_rescue_cmd_lsmod): Likewise.
3005 (grub_rescue_cmd_exit): Likewise.
3006 (grub_rescue_print_devices): Moved to corecmd.c.
3007 (grub_rescue_print_files): Likewise.
3008 (grub_rescue_cmd_ls): Likewise.
3009 (grub_rescue_cmd_insmod): Likewise.
3010 (grub_rescue_cmd_set): Likewise.
3011 (grub_rescue_cmd_unset): Likewise.
3012 (attempt_normal_mode): Use grub_command_find to get normal module.
3013 (grub_enter_rescue_mode): Use grub_register_core_commands to register
3014 commands, remove grub_rescue_register_command calls.
3016 * normal/command.c (grub_register_command): Removed.
3017 (grub_unregister_command): Likewise.
3018 (grub_command_find): Likewise.
3019 (grub_iterate_commands): Likewise.
3020 (rescue_command): Likewise.
3021 (export_command): Moved to corecmd.c.
3022 (set_command): Removed.
3023 (unset_command): Likewise.
3024 (insmod_command): Likewise.
3025 (rmmod_command): Likewise.
3026 (lsmod_command): Likewise.
3027 (grub_command_init): Likewise.
3029 * normal/completion.c (iterate_command): Use cmd->prio to check for
3031 (complete_arguments): Use grub_extcmd_t structure to find options.
3032 (grub_normal_do_completion): Change function grub_iterate_commands to
3033 grub_command_iterate.
3035 * normal/execute.c (grub_script_execute_cmd): No need to parse
3038 * normal/main.c (grub_dyncmd_dispatcher): New function.
3039 (read_command_list): Register unload commands as dyncmd.
3040 (grub_cmd_normal): Use new command interface, register rescue,
3041 unregister normal at entry, register normal, unregister rescue at exit.
3043 * include/grub/list.h (grub_list_test_t): New type.
3044 (grub_list_iterate): Return int instead of void.
3045 (grub_list_insert): New function.
3046 (GRUB_AS_NAMED_LIST_P): New macro.
3047 (GRUB_AS_PRIO_LIST): Likewise.
3048 (GRUB_AS_PRIO_LIST_P): Likewise.
3049 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3050 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3051 (grub_prio_list): New structure.
3052 (grub_prio_list_insert): New function.
3053 (grub_prio_list_remove): New inline function.
3055 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3056 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3057 (GRUB_COMMAND_FLAG_MENU): Likewise.
3058 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3059 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3060 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3061 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3062 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3063 (grub_command): Likewise.
3064 (grub_register_command): Likewise.
3065 (grub_command_find): Likewise.
3066 (grub_iterate_commands): Likewise.
3067 (grub_command_init): Likewise.
3068 (grub_arg_parse): Likewise.
3069 (grub_arg_show_help): Likewise.
3071 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3072 (grub_rescue_unregister_command): Likewise.
3074 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3075 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3076 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3078 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3079 grub_rescue_cmd_initrd.
3080 * include/grub/i386/loader.h: Likewise.
3081 * include/grub/x86_64/loader.h: Likewise.
3083 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3085 2009-03-21 Bean <bean123ch@gmail.com>
3087 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3088 instead of stat in mingw environment.
3090 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3092 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3094 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3097 2009-03-21 Bean <bean123ch@gmail.com>
3099 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3102 2009-03-18 Michel Dänzer <michel@daenzer.net>
3104 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3105 checking inode flags for EXT4_EXTENTS_FLAG.
3107 2009-03-18 Robert Millan <rmh@aybabtu.com>
3109 * loader/i386/linux.c: Include `<grub/video.h>' and
3110 `<grub/i386/pc/vbe.h>'..
3111 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3112 (grub_linux32_boot): Attempt to configure video settings with
3113 grub_linux_setup_video().
3114 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3115 to avoid grub_console_fini() which would step out of graphical mode
3118 2009-03-14 Robert Millan <rmh@aybabtu.com>
3120 Fix build on powerpc.
3121 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3123 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3125 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3126 background image command.
3128 2009-03-12 Colin D Bennett <colin@gibibit.com>
3130 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3131 (grub_gfxterm_putchar): Extract pairs of identical calls to
3132 draw_cursor out of conditional blocks.
3134 2009-03-11 Pavel Roskin <proski@gnu.org>
3136 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3137 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3139 2009-03-11 Robert Millan <rmh@aybabtu.com>
3141 * loader/i386/multiboot_elfxx.c
3142 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3144 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
3146 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3149 2009-03-11 Robert Millan <rmh@aybabtu.com>
3151 * loader/i386/multiboot.c (code_size): New variable.
3152 (grub_multiboot): Define offsets by adding to `code_size' rather
3153 than subtracting from `grub_multiboot_payload_size'. Provide
3154 4-byte alignment to MBI and others by increasing
3155 `boot_loader_name_length' appropriately.
3157 * loader/i386/multiboot_elfxx.c
3158 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3160 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
3162 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3165 2009-03-08 Robert Millan <rmh@aybabtu.com>
3167 Make loader/i386/linux.c usable on i386-pc again.
3169 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3171 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3174 2009-03-07 Bean <bean123ch@gmail.com>
3176 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3179 2009-03-06 Robert Millan <rmh@aybabtu.com>
3181 Fix display issue on terminals with screen size other than 80x25
3182 (e.g. gfxterm with resolution higher than 640x480).
3184 * normal/main.c (grub_normal_init_page): Display title text in a
3185 position relative to the center of the terminal instead of relying
3186 on a hardcoded offset.
3188 2009-03-04 Robert Millan <rmh@aybabtu.com>
3190 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3193 * Makefile.in (host_kernel): New variable.
3194 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3195 scripts instead of just the windows one.
3196 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3198 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3200 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3202 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3203 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3204 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3205 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3206 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3207 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3209 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3211 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3212 or if there's no space for the disk label and print the partition number on a
3215 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3217 * util/misc.c: Include <time.h>.
3218 (grub_millisleep): New function.
3220 2009-03-04 Bean <bean123ch@gmail.com>
3222 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3223 another option -mno-red-zone.
3225 * commands/handler.c: Change module description.
3227 * kern/handler.c: Add missing space at the end of description line.
3229 * kern/list.c: Likewise.
3231 2009-03-03 Robert Millan <rmh@aybabtu.com>
3233 Move more components to the relocation area, and fix mbi pointer
3234 handling to use the destination rather than the origin (thanks to
3235 Vladimir Serbinenko for spotting).
3237 * loader/i386/multiboot.c (mbi_dest): New variable.
3238 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3239 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3242 2009-03-01 Bean <bean123ch@gmail.com>
3244 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3245 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3246 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3247 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3249 * loader/i386/efi/linux.c (acpi_guid): New variable.
3250 (acpi_guid): Likewise.
3251 (EBDA_SEG_ADDR): New constant.
3252 (LOW_MEM_ADDR): Likewise.
3253 (FAKE_EBDA_SEG): Likewise.
3254 (fake_bios_data): New function.
3255 (grub_linux_boot): Call fake_bios_data.
3257 2009-03-01 Bean <bean123ch@gmail.com>
3259 * commands/terminal.c: Removed.
3261 * commands/handler.c: New file.
3263 * include/grub/list.h: Likewise.
3265 * include/grub/handler.h: Likewise.
3267 * kern/list.c: Likewise.
3269 * kern/handler.c: Likewise.
3271 * kern/term.h: Include header file <grub/handler.h>.
3272 (grub_term_input): Move next field to the beginning.
3273 (grub_term_output): Likewise.
3274 (grub_term_input_class): New variable.
3275 (grub_term_output_class): Likewise.
3276 (grub_term_register_input): Changed to inline function.
3277 (grub_term_register_output): Likewise.
3278 (grub_term_unregister_input): Likewise.
3279 (grub_term_unregister_output): Likewise.
3280 (grub_term_set_current_input): Likewise.
3281 (grub_term_set_current_output): Likewise.
3282 (grub_term_get_current_input): Likewise.
3283 (grub_term_get_current_output): Likewise.
3284 (grub_term_iterate_input): Removed.
3285 (grub_term_iterate_output): Likewise.
3287 * kern/term.c (grub_term_list_input): Removed.
3288 (grub_term_list_output): Likewise.
3289 (grub_term_input_class): New variable.
3290 (grub_term_output_class): Likewise.
3291 (grub_cur_term_input): Change variable as macro.
3292 (grub_cur_term_output): Likewise.
3293 (grub_term_register_input): Removed.
3294 (grub_term_register_output): Likewise.
3295 (grub_term_unregister_input): Likewise.
3296 (grub_term_unregister_output): Likewise.
3297 (grub_term_set_current_input): Likewise.
3298 (grub_term_set_current_output): Likewise.
3299 (grub_term_iterate_input): Likewise.
3300 (grub_term_iterate_output): Likewise.
3301 (grub_term_get_current_input): Likewise.
3302 (grub_term_get_current_output): Likewise.
3304 * util/grub-editenv.c: Include header file <grub/handler.h>.
3305 (grub_term_get_current_input): Removed.
3306 (grub_term_get_current_output): Likewise.
3307 (grub_term_input_class): New variable.
3308 (grub_term_output_class): Likewise.
3310 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3311 (grub_term_get_current_output): Likewise.
3312 (grub_term_input_class): New variable.
3313 (grub_term_output_class): Likewise.
3315 * util/grub-probe.c (grub_term_get_current_input): Removed.
3316 (grub_term_get_current_output): Likewise.
3317 (grub_term_input_class): New variable.
3318 (grub_term_output_class): Likewise.
3320 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3321 (grub_term_get_current_output): Likewise.
3322 (grub_term_input_class): New variable.
3323 (grub_term_output_class): Likewise.
3325 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3326 (terminal_mod_SOURCES): Likewise.
3327 (terminal_mod_CFLAGS): Likewise.
3328 (terminal_mod_LDFLAGS): Likewise.
3330 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3332 (kernel_img_SOURCES): Add list.c and handler.c.
3333 (kernel_img_HEADERS): Add list.h and handler.h.
3335 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3337 (kernel_mod_SOURCES): Add list.c and handler.c.
3338 (kernel_mod_HEADERS): Add list.h and handler.h.
3340 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3342 (kernel_elf_SOURCES): Add list.c and handler.c.
3343 (kernel_elf_HEADERS): Add list.h and handler.h.
3345 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3347 (kernel_elf_SOURCES): Add list.c and handler.c.
3348 (kernel_elf_HEADERS): Add list.h and handler.h.
3350 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3352 (kernel_mod_SOURCES): Add list.c and handler.c.
3353 (kernel_mod_HEADERS): Add list.h and handler.h.
3355 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3357 (kernel_elf_SOURCES): Add list.c and handler.c.
3358 (kernel_elf_HEADERS): Add list.h and handler.h.
3360 2009-02-27 Robert Millan <rmh@aybabtu.com>
3362 Factorize elf32 / elf64 code in Multiboot loader. This will
3363 prevent it from getting out of sync again.
3365 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3366 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3367 grub_multiboot_load_elf64): Move from here ...
3368 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3369 grub_multiboot_load_elf): ... to here (new file).
3371 2009-02-27 Robert Millan <rmh@aybabtu.com>
3373 * util/grub.d/10_linux.in: Rename "single-user mode" to
3376 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3378 Don't leak in SCSI code.
3379 * disk/scsi.c (grub_scsi_close): free `scsi'.
3381 2009-02-27 Robert Millan <rmh@aybabtu.com>
3383 * loader/i386/pc/multiboot.c: Move from here ...
3384 * loader/i386/multiboot.c: ... to here. Update all users.
3386 2009-02-27 Robert Millan <rmh@aybabtu.com>
3388 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3389 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3391 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
3393 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3396 2009-02-27 Robert Millan <rmh@aybabtu.com>
3398 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3399 `0x' qualifier as 0 when base is specified as parameter).
3401 2009-02-24 Bean <bean123ch@gmail.com>
3403 * configure.ac: Check for -mcmodel=large in x86_64 target.
3405 * include/grub/efi/api.h (efi_call_10): New macro.
3406 (efi_wrap_10): New function.
3408 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3409 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3410 (GRUB_PE32_REL_BASED_LOW): Likewise.
3411 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3412 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3413 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3414 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3415 (GRUB_PE32_REL_BASED_REL): Likewise.
3416 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3417 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3418 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3420 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3423 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3424 (efi_wrap_10): New function.
3426 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3428 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3429 MB/MBP model (NV chipset).
3430 (devdata_devs): Add devpath_5 to the list.
3432 * load/i386/efi/linux.c (video_base): Remove variable.
3433 (RGB_MASK): New macro.
3434 (RGB_MAGIC): Likewise.
3435 (LINE_MIN): Likewise.
3436 (LINE_MAX): Likewise.
3437 (FBTEST_STEP): Likewise.
3438 (FBTEST_COUNT): Likewise.
3439 (fb_list): New variable.
3440 (grub_find_video_card): Remove function.
3441 (find_framebuf): New function.
3442 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3445 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3448 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3450 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3452 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3455 2009-02-22 Robert Millan <rmh@aybabtu.com>
3457 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3458 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3459 in our relocation, instead of using it directly from heap. Also
3460 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3462 2009-02-21 Robert Millan <rmh@aybabtu.com>
3464 Implement USB keyboard support (based on patch by Marco Gerards)
3466 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3467 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3468 (usb_keyboard_mod_LDFLAGS): New variables.
3470 * term/usb_keyboard.c: New file.
3472 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3474 Corrected wrong declaration
3476 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3478 2009-02-14 Christian Franke <franke@computer.org>
3480 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3481 (grub_lspci_iter): Print class code and programming interface byte.
3483 2009-02-14 Christian Franke <franke@computer.org>
3485 * gendistlist.sh: Ignore `.svn' directories.
3487 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
3489 * fs/fat.c: Add 2009 to Copyright line.
3491 2009-02-14 Christian Franke <franke@computer.org>
3493 * commands/hdparm.c: New file. Provides `hdparm' command
3494 which sends ATA commands via grub_disk_ata_pass_through ().
3496 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3498 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3499 and <grub/cpu/io.h> to include/grub/ata.h.
3500 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3501 (GRUB_CDROM_SECTOR_SIZE): Remove.
3502 (GRUB_ATA_*): Move to include/grub/ata.h.
3503 (GRUB_ATAPI_*): Likewise.
3504 (enum grub_ata_commands): Likewise.
3505 (enum grub_ata_timeout_milliseconds): Likewise.
3506 (struct grub_ata_device): Likewise.
3507 (grub_ata_regset): Likewise.
3508 (grub_ata_regget): Likewise.
3509 (grub_ata_regset2): Likewise.
3510 (grub_ata_regget2): Likewise.
3511 (grub_ata_check_ready): Likewise.
3512 (grub_ata_wait_not_busy): Remove static, exported in
3514 (grub_ata_wait_drq): Likewise.
3515 (grub_ata_pio_read): Likewise.
3517 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3518 function for hdparm.mod.
3520 * include/grub/ata.h: New file, contains declarations from
3522 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3524 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3525 (grub_disk_ata_pass_through): New exported variable.
3527 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3529 2009-02-13 Colin D Bennett <colin@gibibit.com>
3531 Support multiple fallback entries, and provide an API to support
3532 executing default+fallback menu entries. Renamed the `terminal' menu
3535 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3536 variable declaration.
3537 (grub_menu_execute_callback): New structure declaration.
3538 (grub_menu_execute_callback_t): New typedef.
3539 (grub_menu_execute_with_fallback): New function declaration.
3540 (grub_menu_get_entry): Likewise.
3541 (grub_menu_get_timeout): Likewise.
3542 (grub_menu_set_timeout): Likewise.
3544 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3546 * normal/menu.c (grub_wait_after_message): Moved to
3547 `normal/menu_text.c'.
3548 (draw_border): Likewise.
3549 (print_message): Likewise.
3550 (print_entry): Likewise.
3551 (print_entries): Likewise.
3552 (grub_menu_init_page): Likewise.
3553 (get_entry_number): Likewise.
3554 (print_timeout): Likewise.
3555 (run_menu): Likewise.
3556 (grub_menu_execute_entry): Likewise.
3557 (show_text_menu): Likewise.
3558 (get_and_remove_first_entry_number): New function.
3559 (grub_menu_execute_with_fallback): Likewise.
3560 (get_entry): Renamed to ...
3561 (grub_menu_get_entry): .. this and made it global.
3562 (get_timeout): Renamed to ...
3563 (grub_menu_get_timeout): ... this and made it global.
3564 (set_timeout): Renamed to ...
3565 (grub_menu_set_timeout): ... this and made it global.
3566 (grub_normal_terminal_menu_viewer): Renamed to ...
3567 (grub_normal_text_menu_viewer): ... this.
3569 * normal/menu_text.c: New file. Extracted text-menu-specific code
3572 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3573 (normal_mod_SOURCES): Likewise.
3575 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3576 (normal_mod_SOURCES): Likewise.
3578 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3579 (normal_mod_SOURCES): Likewise.
3581 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3582 (normal_mod_SOURCES): Likewise.
3584 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3585 (normal_mod_SOURCES): Likewise.
3587 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3588 (normal_mod_SOURCES): Likewise.
3590 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3591 (normal_mod_SOURCES): Likewise.
3593 2009-02-11 Robert Millan <rmh@aybabtu.com>
3595 * util/grub.d/00_header.in: Update old reference to `font' command.
3597 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
3599 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3601 Based on patch from Javier MartÃn.
3603 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3605 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3606 to avoid false positives with FAT.
3607 (grub_fstest_SOURCES): Likewise.
3608 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3609 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3611 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3612 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3613 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3615 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3617 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3618 bpb.version_specific.fat12_or_fat16.fstype and
3619 bpb.version_specific.fat32.fstype.
3621 2009-02-08 Robert Millan <rmh@aybabtu.com>
3623 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3625 2009-02-08 Robert Millan <rmh@aybabtu.com>
3627 * Makefile.in (host_os, host_cpu): New variables.
3628 (target_os): Remove. Update all users.
3630 2009-02-08 Marco Gerards <marco@gnu.org>
3632 * Makefile.in (enable_grub_emu_usb): New variable.
3633 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3634 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3635 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3636 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3637 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3638 `usbtest.mod' and `usbms.mod'.
3639 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3640 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3641 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3642 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3643 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3646 * disk/usbms.c: New file.
3648 * include/grub/usb.h: Likewise.
3650 * include/grub/usbtrans.h: Likewise.
3652 * include/grub/usbdesc.h: Likewise.
3654 * bus/usb/usbtrans.c: Likewise.
3656 * bus/usb/ohci.c: Likewise.
3658 * bus/usb/uhci.c: Likewise.
3660 * bus/usb/usbhub.c: Likewise.
3662 * bus/usb/usb.c: Likewise.
3664 * commands/usbtest.c: Likewise.
3666 * util/usb.c: Likewise.
3668 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3670 * configure.ac: Test for libusb presence.
3672 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3674 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3676 * kern/mm.c: Add more comments.
3678 2009-02-08 Robert Millan <rmh@aybabtu.com>
3680 Patch from Javier MartÃn.
3681 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3682 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3684 2009-02-08 Robert Millan <rmh@aybabtu.com>
3686 * fs/cpio.c: Split tar functionality to ...
3687 * fs/tar.c: ... here (new file). Update all users.
3689 2009-02-07 Robert Millan <rmh@aybabtu.com>
3691 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3692 backward-incompatible features.
3694 Based on patch from Javier MartÃn, with some adjustments.
3696 2009-02-07 Michael Scherer <misc@mandriva.org>
3698 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3700 2009-02-07 Robert Millan <rmh@aybabtu.com>
3702 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3703 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3704 after the RAID stuff.
3706 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3708 Fixes problem when running vbetest command as reported by
3709 Vladimir Serbinenko <phcoder@gmail.com>.
3711 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3713 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
3715 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3716 /dev/md/NpN style mdraid devices.
3718 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3720 * util/unifont2pff.rb: Remove.
3722 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3724 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3727 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3729 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3730 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3731 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3732 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3733 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3734 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3735 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3737 2009-02-02 Christian Franke <franke@computer.org>
3739 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3741 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
3743 * INSTALL: Note that we now require at least autoconf 2.59 and
3744 that LZO is optional.
3746 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3748 Base on patch on bug #24154 created by Tomas Tintera
3751 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3753 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3755 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3756 <bero@arklinux.org>.
3758 * normal/parser.y (script_init): Add missing semicolon.
3760 2009-01-31 Colin D Bennett <colin@gibibit.com>
3762 * normal/main.c: Add include to grub/menu_viewer.h.
3763 (free_menu_entry_classes): Added.
3764 (grub_normal_menu_addentry): Added class property handling.
3765 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3766 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3768 * normal/menu_viewer.c: New file.
3770 * normal/menu.c (run_menu_entry): Renamed to ...
3771 (grub_menu_execute_entry): ... this and made it as global.
3772 (grub_menu_run): Renamed to ...
3773 (show_text_menu): ... this and made it local.
3774 (show_text_menu): Adapt to new function names.
3775 (grub_normal_terminal_menu_viewer): New global variable.
3777 * include/grub/menu.h: New file.
3779 * include/grub/menu_viewer.h: New file.
3781 * include/grub/normal.h: Added include to grub/menu.h.
3782 (grub_menu_entry): Moved to include/grub/menu.h.
3783 (grub_menu_entry_t): Likewise.
3784 (grub_menu): Likewise.
3785 (grub_menu_t): Likewise.
3786 (grub_normal_terminal_menu_viewer): Added.
3787 (grub_menu_execute_entry): Likewise.
3788 (grub_menu_run): Removed.
3790 * DISTLIST: Added include/grub/menu.h.
3791 Added include/grub/menu_viewer.h.
3792 Added normal/menu_viewer.c.
3794 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3796 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3797 arglist for menutitle arguments.
3799 * normal/main.c (grub_normal_menu_addentry): Likewise.
3801 * normal/parser.y (menuentry): Likewise.
3803 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3805 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3806 (grub_script_create_cmdmenu): Likewise.
3808 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3810 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3813 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3815 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3817 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3819 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3821 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3823 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3825 2009-01-30 Christian Franke <franke@computer.org>
3827 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3828 in option help text.
3830 2009-01-27 Pavel Roskin <proski@gnu.org>
3832 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3834 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3836 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3838 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3840 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3841 unregister function.
3843 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3845 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3847 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3849 * util/grub-mkfont.c (usage): Fix typo.
3851 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3853 2009-01-26 Daniel Mierswa <impulze@impulze.org>
3855 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3857 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3859 * kern/misc.c (grub_strcasecmp): New function.
3860 (grub_strcasecmp): Use grub_size_t instead of int for length.
3862 * include/grub/misc.h: Update function prototypes.
3864 2009-01-26 Robert Millan <rmh@aybabtu.com>
3866 * configure.ac: Fix cross-compilation check.
3868 2009-01-22 Christian Franke <franke@computer.org>
3870 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3871 (precision) digit string. Allow `.format2' without `format1' (width).
3872 Limit input chars for `%s' output to `format2' if specified. This is
3873 compatible with standard printf ().
3875 2009-01-22 Christian Franke <franke@computer.org>
3877 * disk/ata.c (grub_ata_wait_status): Replace by ...
3878 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3879 other status bits may be invalid while BSY is asserted.
3880 (grub_ata_check_ready): New function.
3881 (grub_ata_cmd): Removed.
3882 (grub_ata_wait_drq): New function.
3883 (grub_ata_strncpy): Remove inline.
3884 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3885 and error check now done by grub_ata_wait_drq ().
3886 (grub_ata_pio_write): Likewise.
3887 (grub_atapi_identify): Set DEV before check for !BSY. Use
3888 grub_ata_wait_drq () to wait for data.
3889 (grub_ata_device_initialize): Add status register check to
3890 detect missing SATA slave devices. Add debug messages.
3891 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3892 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3893 transfer loop by grub_ata_pio_write ().
3894 (grub_ata_identify): Set DEV before check for !BSY. Use
3895 grub_ata_wait_drq () to wait for data.
3896 (grub_ata_setaddress): Set DEV before check for !BSY.
3897 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3898 read/write in one loop. Fix invalid command on write. Fix incomplete
3899 command on (size % batch) == 0. Add missing error check after write of
3900 last block. Add debug messages.
3901 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
3903 2009-01-19 Christian Franke <franke@computer.org>
3905 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3906 (GRUB_ATAPI_IREASON_*): Likewise.
3907 (grub_ata_pio_write): Fix timeout error return.
3908 (grub_atapi_identify): Add grub_ata_wait () after cmd.
3909 (grub_atapi_wait_drq): New function.
3910 (grub_atapi_packet): New parameter `size'.
3911 Use grub_atapi_wait_drq () and direct write instead of
3912 grub_ata_pio_write ().
3913 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3914 reads the number of bytes requested by the device for each DRQ
3916 (grub_atapi_write): Remove old implementation, return not
3917 implemented instead.
3919 2009-01-19 Christian Franke <franke@computer.org>
3921 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3922 of 512 to calculate data size.
3923 (grub_scsi_read12): Likewise.
3924 (grub_scsi_write10): Likewise.
3925 (grub_scsi_write12): Likewise.
3926 (grub_scsi_read): Adjust size according to blocksize.
3927 Add checks for invalid blocksize and unaligned transfer.
3929 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
3931 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3933 * term/gfxterm.c (write_char): Fix background rendering for wide
3936 2009-01-19 Robert Millan <rmh@aybabtu.com>
3938 * config.guess: Update to latest version from config git.
3939 * config.sub: Likewise.
3941 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
3943 * Makefile.in: Change font compilation to use new grub-mkfont instead
3946 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3947 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3948 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3949 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3950 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3951 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3952 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3953 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3954 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3956 2009-01-16 Christian Franke <franke@computer.org>
3958 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3959 (enum grub_ata_timeout_milliseconds): New enum.
3960 (grub_ata_wait_status): Add parameter milliseconds.
3961 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
3962 recovery from timed-out commands.
3963 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
3964 return grub_errno instead of REG_ERROR.
3965 (grub_ata_pio_write): Add parameter milliseconds.
3966 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3967 Pass milliseconds to grub_ata_wait_status () and
3968 grub_ata_pio_read ().
3969 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3970 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
3971 grub_ata_wait_status (). Fix IDENTIFY timeout check.
3972 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3973 It is not suitable for device detection, because DEV bit is ignored,
3974 the command may run too long, and not all devices set the signature
3976 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3977 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3978 Fix device selection, DEV bit must be set first to address the registers
3979 of the correct device.
3980 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3981 grub_ata_pio_read/write ().
3982 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3983 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3985 2009-01-13 Carles Pina i Estany <carles@pina.cat>
3987 * util/grub-editenv.c (main): Use fseeko(), not fseek().
3989 2009-01-13 Bean <bean123ch@gmail.com>
3991 * util/grub-mkfont.c (write_font): forget to remove some debug code.
3993 2009-01-13 Bean <bean123ch@gmail.com>
3995 * Makefile.in: (enable_grub_mkfont): New variable.
3996 (freetype_cflags): Likewise.
3997 (freetype_libs): Likewise.
3999 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4000 (grub_mkfont_SOURCES): New variable.
4001 (grub_mkfont_CFLAGS): Likewise.
4002 (grub_mkfont_LDFLAGS): Likewise.
4004 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4005 library if `--enable-grub-mkfont' is requested.
4006 (enable_grub_mkfont): New variable.
4007 (freetype_cflags): Likewise.
4008 (freetype_libs): Likewise.
4010 * util/grub-mkfont.c: New file.
4012 2009-01-12 Christian Franke <franke@computer.org>
4014 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4015 mode check. Fix setting of compat_use[].
4017 2009-01-10 Robert Millan <rmh@aybabtu.com>
4019 Update a few copyright years which we forgot to do in 2008 (only for
4020 files whose changes made in 2008 were copyright-significant)
4022 * Makefile.in: Add 2008 to Copyright line.
4023 * disk/ieee1275/ofdisk.c: Likewise.
4024 * disk/efi/efidisk.c: Likewise.
4025 * kern/dl.c: Likewise.
4026 * kern/sparc64/ieee1275/init.c: Likewise.
4027 * kern/mm.c: Likewise.
4028 * kern/efi/mm.c: Likewise.
4029 * boot/i386/pc/boot.S: Likewise.
4030 * genfslist.sh: Likewise.
4031 * fs/iso9660.c: Likewise.
4032 * fs/hfs.c: Likewise.
4033 * fs/jfs.c: Likewise.
4034 * fs/minix.c: Likewise.
4035 * fs/ufs.c: Likewise.
4036 * gensymlist.sh.in: Likewise.
4037 * genkernsyms.sh.in: Likewise.
4038 * include/grub/misc.h: Likewise.
4039 * include/grub/types.h: Likewise.
4040 * include/grub/symbol.h: Likewise.
4041 * include/grub/elf.h: Likewise.
4042 * include/grub/kernel.h: Likewise.
4043 * include/grub/disk.h: Likewise.
4044 * include/grub/dl.h: Likewise.
4045 * include/grub/i386/linux.h: Likewise.
4046 * include/grub/i386/pc/biosdisk.h: Likewise.
4047 * include/grub/efi/api.h: Likewise.
4048 * include/grub/efi/pe32.h: Likewise.
4049 * include/grub/util/misc.h: Likewise.
4050 * normal/execute.c: Likewise.
4051 * normal/arg.c: Likewise.
4052 * normal/completion.c: Likewise.
4053 * normal/lexer.c: Likewise.
4054 * normal/parser.y: Likewise.
4055 * normal/misc.c: Likewise.
4056 * commands/i386/pc/vbeinfo.c: Likewise.
4057 * commands/hexdump.c: Likewise.
4058 * commands/terminal.c: Likewise.
4059 * commands/ls.c: Likewise.
4060 * commands/help.c: Likewise.
4061 * partmap/pc.c: Likewise.
4062 * loader/efi/chainloader.c: Likewise.
4063 * loader/multiboot_loader.c: Likewise.
4064 * loader/i386/pc/multiboot2.c: Likewise.
4065 * term/efi/console.c: Likewise.
4066 * term/i386/pc/serial.c: Likewise.
4067 * util/lvm.c: Likewise.
4068 * util/console.c: Likewise.
4069 * util/i386/efi/grub-mkimage.c: Likewise.
4070 * util/raid.c: Likewise.
4072 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4074 * commands/videotest.c: Removed include to grub/machine/memory.h.
4076 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4077 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4078 (video_mod_SOURCES): Removed.
4079 (video_mod_CFLAGS): Likewise.
4080 (video_mod_LDFLAGS): Likewise.
4081 (gfxterm_mod_SOURCES): Likewise.
4082 (gfxterm_mod_CFLAGS): Likewise.
4083 (gfxterm_mod_LDFLAGS): Likewise.
4084 (videotest_mod_SOURCES): Likewise.
4085 (videotest_mod_CFLAGS): Likewise.
4086 (videotest_mod_LDFLAGS): Likewise.
4087 (bitmap_mod_SOURCES): Likewise.
4088 (bitmap_mod_CFLAGS): Likewise.
4089 (bitmap_mod_LDFLAGS): Likewise.
4090 (tga_mod_SOURCES): Likewise.
4091 (tga_mod_CFLAGS): Likewise.
4092 (tga_mod_LDFLAGS): Likewise.
4093 (jpeg_mod_SOURCES): Likewise.
4094 (jpeg_mod_CFLAGS): Likewise.
4095 (jpeg_mod_LDFLAGS): Likewise.
4096 (png_mod_SOURCES): Likewise.
4097 (png_mod_CFLAGS): Likewise.
4098 (png_mod_LDFLAGS): Likewise.
4100 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4101 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4102 (video_mod_SOURCES): Added.
4103 (video_mod_CFLAGS): Likewise.
4104 (video_mod_LDFLAGS): Likewise.
4105 (videotest_mod_SOURCES): Likewise.
4106 (videotest_mod_CFLAGS): Likewise.
4107 (videotest_mod_LDFLAGS): Likewise.
4108 (bitmap_mod_SOURCES): Likewise.
4109 (bitmap_mod_CFLAGS): Likewise.
4110 (bitmap_mod_LDFLAGS): Likewise.
4111 (tga_mod_SOURCES): Likewise.
4112 (tga_mod_CFLAGS): Likewise.
4113 (tga_mod_LDFLAGS): Likewise.
4114 (jpeg_mod_SOURCES): Likewise.
4115 (jpeg_mod_CFLAGS): Likewise.
4116 (jpeg_mod_LDFLAGS): Likewise.
4117 (png_mod_SOURCES): Likewise.
4118 (png_mod_CFLAGS): Likewise.
4119 (png_mod_LDFLAGS): Likewise.
4120 (gfxterm_mod_SOURCES): Likewise.
4121 (gfxterm_mod_CFLAGS): Likewise.
4122 (gfxterm_mod_LDFLAGS): Likewise.
4124 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4125 grub/machine/console.h.
4127 2009-01-04 Jerone Young <jerone@gmail.com>
4129 Make on screen instructions clearer
4131 Based on patch created by Jidanni <jidanni@jidanni.org>
4133 * normal/menu.c: print clearer instructions on the screen
4135 2009-01-02 Colin D Bennett <colin@gibibit.com>
4139 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4140 build system and fixed gfxterm.c to work with different sized fonts.
4142 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4144 * configure: Re-generated.
4146 * DISTLIST: Removed font/manager.c.
4148 Added font/font_cmd.c.
4150 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4153 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
4155 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4157 * kern/term.c: Changed users of grub_utf8_to_ucs4.
4159 * normal/menu.c: Likewise.
4161 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4162 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4164 * include/grub/font.h: Replaced with new file.
4166 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4167 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4168 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4169 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4170 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4171 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4172 fg_red, fg_green, fg_blue, fg_alpha.
4173 (grub_video_adapter): Removed blit_glyph.
4174 (grub_video_blit_glyph): Removed.
4176 * font/manager.c: Removed file.
4178 * font/font.c: New file.
4180 * font/font_cmd.c: Likewise.
4182 * video/video.c (grub_video_blit_glyph): Removed.
4184 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4185 (grub_video_vbe_map_rgba): Likewise.
4186 (grub_video_vbe_unmap_color_int): Likewise.
4187 (grub_video_vbe_blit_glyph): Removed.
4188 (grub_video_vbe_adapter): Removed blit_glyph.
4190 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4191 (get_pixel): Likewise.
4192 (set_pixel): Likewise.
4194 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4196 * term/gfxterm.c: Adapted to new font engine.
4198 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
4200 * term/i386/pc/vga.c: Likewise.
4202 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4204 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4206 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4208 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4210 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4212 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4214 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4216 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4218 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4220 * util/grub.d/00_header.in: Changed to use new loadfont command.
4222 * util/grub-mkconfig_lib.in: Changed font extension.
4224 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
4226 * util/getroot.c (grub_util_get_grub_dev): Add support for
4227 /dev/md/dNNpNN style partitionable mdraid devices.
4229 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
4231 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4232 at a time limit of the PXE TFTP API correctly.
4233 (grub_pxefs_close): Likewise.
4235 2008-11-29 Robert Millan <rmh@aybabtu.com>
4237 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4238 grub_ata_device_initialize() calls.
4240 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
4242 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4244 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4246 2008-11-28 Robert Millan <rmh@aybabtu.com>
4248 Fix build on powerpc-ieee1275. Based on patch created by
4249 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4250 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4251 `kern/ieee1275/mmap.c'.
4252 * include/grub/powerpc/ieee1275/memory.h: New file.
4254 Provide grub-install on coreboot.
4255 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4256 (grub_install_SOURCES): New variable.
4257 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4260 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
4262 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4263 to `grub_term_input_t'.
4264 (grub_term_get_current_output): Change return type to
4265 `grub_term_output_t'.
4267 2008-11-22 Robert Millan <rmh@aybabtu.com>
4269 Fix breakage on coreboot due to declaration mismatch.
4270 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4271 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4272 grub_vga_text_cls().
4274 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4275 comments. Avoid copying one more byte than necessary (just in case).
4277 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4278 to 0x200000 (avoids trouble with some OFW implementations, and matches
4279 with the one in Yaboot).
4280 Reported by Manoel Abranches
4282 2008-11-20 Robert Millan <rmh@aybabtu.com>
4284 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4285 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4287 * util/grub-mkconfig_lib.in (grub_warn): New function.
4288 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4289 warnings, to obtain consistent formatting.
4290 * util/grub.d/00_header.in: Likewise.
4291 * util/update-grub_lib.in: Likewise.
4293 * loader/i386/linux.c (allocate_pages): Fix a warning.
4294 Move comment text to `#error' stanza.
4296 Harmonize ieee1275's grub_available_iterate() with the generic
4297 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4298 build problem on i386-ieee1275):
4299 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4300 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4301 parameter `type'. Update all users of this function.
4302 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4303 `kern/ieee1275/mmap.c'.
4304 * kern/ieee1275/init.c
4305 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4307 (grub_machine_mmap_iterate): ... this.
4308 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4309 return type to `grub_err_t'. Update all implementations of this
4311 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4314 Add `lsmmap' command (lists firmware-provided memory map):
4315 * commands/lsmmap.c: New file.
4316 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4317 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4319 * conf/powerpc-ieee1275.rmk: Likewise.
4320 * conf/i386-coreboot.rmk: Likewise.
4321 * conf/i386-ieee1275.rmk: Likewise.
4323 2008-11-19 Robert Millan <rmh@aybabtu.com>
4325 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4326 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4327 constraints to initrd allocation (based on code from
4328 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4329 for Linux to find it.
4331 2008-11-14 Robert Millan <rmh@aybabtu.com>
4333 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4334 order to cope with duplicate slashes.
4336 2008-11-14 Robert Millan <rmh@aybabtu.com>
4338 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4339 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4340 don't want to mess with lower memory, because it is used in the Linux
4343 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4344 an appropriate place in lower memory, between 0x10000 and 0x90000,
4345 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4346 is in our heap (probably as a result of it being corrupted during
4347 decompression). Add #error instance with comment to explain why this
4348 loader isn't currently usable on PC/BIOS.
4350 2008-11-14 Robert Millan <rmh@aybabtu.com>
4352 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4353 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4355 2008-11-12 Robert Millan <rmh@aybabtu.com>
4357 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4359 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4360 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4362 * include/grub/i386/pc/memory.h: ... to here.
4364 2008-11-12 Robert Millan <rmh@aybabtu.com>
4366 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4369 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4370 (grub_console_cur_color, grub_console_real_putchar)
4371 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4372 (grub_console_setcolorstate, grub_console_setcolor)
4373 (grub_console_getcolor): Move from here ...
4374 * include/grub/i386/vga_common.h: ... to here (new file).
4376 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4377 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4379 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4380 `<grub/i386/vga_common.h>'.
4382 2008-11-12 Robert Millan <rmh@aybabtu.com>
4384 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4385 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4386 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4388 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4389 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4391 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4392 grub_console_init() with call to grub_vga_text_init().
4393 (grub_machine_fini): Replace call to
4394 grub_console_fini() with call to grub_vga_text_fini() and
4395 grub_at_keyboard_fini().
4397 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4398 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4399 (grub_console_setcolorstate, grub_console_setcolor)
4400 (grub_console_getcolor): New function prototypes.
4402 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4403 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4404 (grub_vga_text_setcursor): Static-ize.
4405 (grub_vga_text_term): New structure.
4406 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4408 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4409 (grub_console_cur_color, grub_console_standard_color)
4410 (grub_console_normal_color, grub_console_highlight_color)
4411 (map_char, grub_console_putchar, grub_console_getcharwidth)
4412 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4413 (grub_console_getcolor): Move from here ...
4414 * term/i386/vga_common.c: ... to here (same function names).
4416 2008-11-12 Robert Millan <rmh@aybabtu.com>
4418 Use newly-added Multiboot support in coreboot.
4420 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4421 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4423 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4424 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4425 (codestart): Store the MBI in `startup_multiboot_info' when we're
4426 being loaded using Multiboot.
4428 * kern/i386/coreboot/init.c (grub_machine_init): Move
4429 grub_at_keyboard_init() call to beginning of function (useful for
4430 debugging). Call grub_machine_mmap_init() before attempting to use
4431 grub_machine_mmap_iterate().
4432 (grub_lower_mem, grub_upper_mem): Move from here ...
4433 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4436 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4439 2008-11-12 Robert Millan <rmh@aybabtu.com>
4441 Fix a regression introduced by the at_keyboard.mod split. Because
4442 some terminals are default on some platforms and non-default on
4443 others, the first terminal being registered determines which is
4444 going to be default.
4446 * kern/term.c (grub_term_register_input): If this is the first
4447 terminal being registered, set it as the current one.
4448 (grub_term_register_output): Likewise.
4450 * term/efi/console.c (grub_console_init): Do not call
4451 grub_term_set_current_output() or grub_term_set_current_input().
4452 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4453 * term/i386/pc/console.c (grub_console_init): Likewise.
4454 (grub_console_fini): Do not call grub_term_set_current_input()
4455 (but leave grub_term_set_current_output() to restore text mode).
4457 2008-11-10 Robert Millan <rmh@aybabtu.com>
4459 * util/grub.d/00_header.in: Add backward compatibility check for
4460 versions of terminal.mod that don't understand `terminal_input' or
4463 2008-11-09 Robert Millan <rmh@aybabtu.com>
4465 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4466 `terminal_input' / `terminal_output', not `terminal'.
4468 2008-11-08 Robert Millan <rmh@aybabtu.com>
4470 * Makefile.in (include_DATA): Fix srcdir=. assumption.
4471 (DISTCLEANFILES): Add `build_env.mk'.
4473 2008-11-08 Robert Millan <rmh@aybabtu.com>
4475 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4476 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4477 members. Update all users.
4478 * util/console.c (grub_ncurses_term): Split in ...
4479 (grub_ncurses_term_input): ... this, and ...
4480 (grub_ncurses_term_output): ... this. Update all users.
4481 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4483 2008-11-08 Robert Millan <rmh@aybabtu.com>
4485 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4486 (PKGDATA): Add $(pkgdata_SRCDIR).
4487 (pkglib_BUILDDIR): New variable.
4488 (pkgdata_SRCDIR): New variable.
4489 (build_env.mk): New target.
4490 (include_DATA): New variable.
4491 (install-local): Install $(include_DATA) files in $(includedir).
4493 2008-11-07 Pavel Roskin <proski@gnu.org>
4495 * gendistlist.sh: Use C locale for sorting to ensure consistent
4496 output on all systems.
4498 * util/grub.d/00_header.in: Remove incorrect space before
4501 2008-11-07 Robert Millan <rmh@aybabtu.com>
4503 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4505 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4506 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4507 (based on find_multi_boot1_header).
4508 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4509 using find_multi_boot2_header(), and abort if neither Multiboot or
4510 Multiboot headers were found.
4512 2008-11-07 Robert Millan <rmh@aybabtu.com>
4514 Modularize at_keyboard.mod:
4516 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4517 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4518 (at_keyboard_mod_LDFLAGS): New variables.
4520 Actual terminal split:
4522 * include/grub/term.h (struct grub_term): Split in ...
4523 (struct grub_term_input): ... this, and ...
4524 (struct grub_term_output): ... this. Update all users.
4525 (grub_term_set_current): Split in ...
4526 (grub_term_set_current_input): ... this, and ...
4527 (grub_term_set_current_output): ... this.
4528 (grub_term_get_current): Split in ...
4529 (grub_term_get_current_input): ... this, and ...
4530 (grub_term_get_current_output): ... this.
4531 (grub_term_register): Split in ...
4532 (grub_term_register_input): ... this, and ...
4533 (grub_term_register_output): ... this.
4534 (grub_term_unregister): Split in ...
4535 (grub_term_unregister_input): ... this, and ...
4536 (grub_term_unregister_output): ... this.
4537 (grub_term_iterate): Split in ...
4538 (grub_term_iterate_input): ... this, and ...
4539 (grub_term_iterate_output): ... this.
4541 * kern/term.c (grub_term_list): Split in ...
4542 (grub_term_list_input): ... this, and ...
4543 (grub_term_list_output): ... this. Update all users.
4544 (grub_cur_term): Split in ...
4545 (grub_cur_term_input): ... this, and ...
4546 (grub_cur_term_output): ... this. Update all users.
4547 (grub_term_set_current): Split in ...
4548 (grub_term_set_current_input): ... this, and ...
4549 (grub_term_set_current_output): ... this.
4550 (grub_term_get_current): Split in ...
4551 (grub_term_get_current_input): ... this, and ...
4552 (grub_term_get_current_output): ... this.
4553 (grub_term_register): Split in ...
4554 (grub_term_register_input): ... this, and ...
4555 (grub_term_register_output): ... this.
4556 (grub_term_unregister): Split in ...
4557 (grub_term_unregister_input): ... this, and ...
4558 (grub_term_unregister_output): ... this.
4559 (grub_term_iterate): Split in ...
4560 (grub_term_iterate_input): ... this, and ...
4561 (grub_term_iterate_output): ... this.
4563 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4564 a check for input and one for output (and only attempt to get keys
4565 from user when input works).
4567 * util/grub-probe.c (grub_term_get_current): Split in ...
4568 (grub_term_get_current_input): ... this, and ...
4569 (grub_term_get_current_output): ... this.
4570 * util/grub-fstest.c: Likewise.
4571 * util/i386/pc/grub-setup.c: Likewise.
4572 * util/grub-editenv.c: Likewise.
4574 Portability adjustments:
4576 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4577 `term/i386/pc/at_keyboard.c'.
4578 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4579 grub_keyboard_controller_init() (now handled by terminal .init).
4580 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4581 grub_at_keyboard_init().
4582 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4583 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4584 at_keyboard.mod via input terminal interface).
4585 * include/grub/i386/coreboot/console.h: Convert into a stub for
4586 `<grub/i386/pc/console.h>'.
4588 Migrate full terminals to new API:
4590 * term/efi/console.c (grub_console_term): Split into ...
4591 (grub_console_term_input): ... this, and ...
4592 (grub_console_term_output): ... this. Update all users.
4593 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4594 (grub_ofconsole_init): Split into ...
4595 (grub_ofconsole_init_input): ... this, and ...
4596 (grub_ofconsole_init_output): ... this.
4597 (grub_ofconsole_term): Split into ...
4598 (grub_ofconsole_term_input): ... this, and ...
4599 (grub_ofconsole_term_output): ... this. Update all users.
4600 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4601 (grub_serial_term_input): ... this, and ...
4602 (grub_serial_term_output): ... this. Update all users.
4603 * term/i386/pc/console.c (grub_console_term): Split into ...
4604 (grub_console_term_input): ... this, and ...
4605 (grub_console_term_output): ... this. Update all users.
4606 (grub_console_term_input): Only enable it on PC/BIOS platform.
4607 (grub_console_init): Remove grub_keyboard_controller_init() call.
4609 Migrate input terminals to new API:
4611 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4612 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4613 i386-specific anyway).
4614 (grub_console_checkkey): Rename to ...
4615 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4617 (grub_keyboard_controller_orig): New variable.
4618 (grub_console_getkey): Rename to ...
4619 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4621 (grub_keyboard_controller_init): Static-ize. Save original
4622 controller value so that it can be restored ...
4623 (grub_keyboard_controller_fini): ... here (new function).
4624 (grub_at_keyboard_term): New structure.
4625 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4628 Migrate output terminals to new API:
4630 * term/i386/pc/vga.c (grub_vga_term): Change type to
4631 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4632 members. Update all users.
4633 * term/gfxterm.c (grub_video_term): Change type to
4634 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4635 members. Update all users.
4636 * include/grub/i386/pc/console.h (grub_console_checkkey)
4637 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4640 Migrate `terminal' command and userland tools to new API:
4642 * commands/terminal.c (grub_cmd_terminal): Split into ...
4643 (grub_cmd_terminal_input): ... this, and ...
4644 (grub_cmd_terminal_output): ... this.
4645 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4646 `terminal_input' and `terminal_output'.
4647 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4648 `terminal_input' / `terminal_output' API.
4649 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4650 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4651 provided ${GRUB_TERMINAL}, convert it).
4653 2008-11-04 Robert Millan <rmh@aybabtu.com>
4655 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4657 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4659 2008-11-03 Bean <bean123ch@gmail.com>
4661 * kern/elf.c (grub_elf32_load): Revert to previous code.
4662 (grub_elf64_load): Likewise.
4664 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4666 2008-11-01 Robert Millan <rmh@aybabtu.com>
4668 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4669 (TARGET_CPPFLAGS): Likewise.
4670 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4672 2008-11-01 Carles Pina i Estany <carles@pina.cat>
4674 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4676 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4678 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4679 addition of objects until the code is not going to be able to fail.
4681 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4683 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4684 (add a missing NULL check, and correct them by moving the pointer
4685 operations after the actual check).
4687 2008-10-29 Robert Millan <rmh@aybabtu.com>
4689 * util/i386/pc/grub-install.in: Handle empty string as output from
4690 make_system_path_relative_to_its_root().
4692 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4694 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4695 circular metadata worst case scenario. If the metadata is circular
4696 then copy the wrap in place.
4697 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4698 project lib/format_text/layout.h
4699 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4701 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4703 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4705 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4707 * util/update-grub_lib.in: Mention filename in warning message.
4709 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4711 * NEWS: Update for rename of update-grub to grub-mkconfig.
4713 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4715 * util/update-grub_lib.in: Copy to ...
4716 * util/grub-mkconfig_lib.in: ... this. Update all users.
4717 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4718 * util/update-grub.in: Rename to ...
4719 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4720 option. Add `--output' option to allow users to specify the generated
4721 configuration file. Default to stdout.
4722 (update_grub_dir): Rename to ...
4723 (grub_mkconfig_dir): ... this.
4724 (grub_cfg): Default to an empty string.
4725 * conf/common.rmk (update-grub): Rename to ...
4726 (grub-mkconfig): ... this.
4727 (update-grub_lib): Copy to ...
4728 (grub-mkconfig_lib): ... this.
4729 (update-grub_SCRIPTS): Copy to ...
4730 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4731 (update-grub_DATA): Rename to ...
4732 (grub-mkconfig_DATA): ... this.
4734 2008-09-28 Robert Millan <rmh@aybabtu.com>
4736 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4737 to `modified'. Add the real `created' field.
4738 (grub_iso9660_uuid): Use `modified' rather than `created' for
4739 constructing the UUID.
4741 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
4743 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4744 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4746 2008-09-28 Bean <bean123ch@gmail.com>
4748 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4749 Thanks to Christian Franke for finding this bug.
4751 2008-09-25 Robert Millan <rmh@aybabtu.com>
4753 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4754 instances of grub_util_get_disk_name() (see previous commit).
4756 2008-09-25 Robert Millan <rmh@aybabtu.com>
4758 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4759 `util/i386/get_disk_name.c'.
4760 * conf/i386-efi.rmk: Likewise.
4761 * conf/x86_64-efi.rmk: Likewise.
4762 * conf/i386-coreboot.rmk: Likewise.
4763 * conf/i386-ieee1275.rmk: Likewise.
4764 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4765 `util/ieee1275/get_disk_name.c'.
4766 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4767 * util/ieee1275/get_disk_name.c: Remove file.
4768 * util/i386/get_disk_name.c: Remove file.
4769 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4770 "hd%d" for device.map entries, rather than using
4771 grub_util_get_disk_name().
4773 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4775 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4777 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4779 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4781 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4783 (GRUB_TERM_PPAGE): Changed to 0x4900.
4785 2008-09-24 Robert Millan <rmh@aybabtu.com>
4787 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4788 macros (they were i386-pc specific).
4789 * include/grub/sparc64/ieee1275/console.h: Likewise.
4790 * include/grub/efi/console.h: Likewise.
4792 2008-09-22 Bean <bean123ch@gmail.com>
4794 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4795 resident and in attribute list.
4797 * include/grub/ntfs.h (BMP_LEN): Removed.
4799 2008-09-22 Bean <bean123ch@gmail.com>
4801 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4802 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4804 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4805 error occurs, as grub_disk_open will call grub_disk_close, which will
4806 call p->close (scsi).
4808 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4810 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4811 (AC_PREREQ): Bumped to 2.59.
4812 (AC_TRY_COMPILE): Replace obsolete macro with ...
4813 (AC_COMPILE_IFELSE): ... this.
4814 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4815 (AC_LINK_IFELSE): ... this.
4817 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4819 * autogen.sh: Add a call to `gendistlist.sh'.
4821 2008-09-19 Christian Franke <franke@computer.org>
4823 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4824 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4825 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4826 Export __enable_execute_stack() to modules.
4827 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4830 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4832 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4835 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4837 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4838 #include <grub/util/hostdisk.h>.
4840 2008-09-08 Robert Millan <rmh@aybabtu.com>
4842 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4843 segments when their filesz is zero (grub_file_read() interprets
4844 zero-size as "read until EOF", which results in memory corruption).
4845 Use `lowest_segment' rather than 0 for calculating the current
4846 segment load address.
4848 2008-09-08 Robert Millan <rmh@aybabtu.com>
4850 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4851 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4852 clobbered useful information.
4854 2008-09-08 Robert Millan <rmh@aybabtu.com>
4856 * include/grub/util/biosdisk.h: Move to ...
4857 * include/grub/util/hostdisk.h: ... here. Update all users.
4858 * util/biosdisk.c: Move to ...
4859 * util/hostdisk.c: ... here. Update all users.
4861 2008-09-07 Robert Millan <rmh@aybabtu.com>
4863 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4865 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4866 and length can be stored directly in the `mbi->mmap_addr' and
4867 `mbi->mmap_length' struct fields.
4869 2008-09-07 Robert Millan <rmh@aybabtu.com>
4871 * conf/i386.rmk: New file. Provides declaration for building
4873 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4874 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4876 Include `conf/i386.mk'.
4877 * conf/i386-efi.rmk: Likewise.
4878 * conf/x86_64-efi.rmk: Likewise.
4879 * conf/i386-coreboot.rmk: Likewise.
4880 * conf/i386-ieee1275.rmk: Likewise.
4882 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4884 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4885 Adds optimization support for BGR based modes.
4887 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4888 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4889 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4890 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4891 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4892 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4893 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4894 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4895 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4896 (grub_video_i386_vbeblit_index_index): Likewise.
4897 (grub_video_i386_vbeblit_replace_directN): Added.
4898 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4899 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4900 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4901 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4902 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4903 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4904 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4905 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4906 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4907 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4908 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4909 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4910 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4912 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4913 (grub_video_i386_vbefill_R8G8B8): Likewise.
4914 (grub_video_i386_vbefill_index): Likewise.
4915 (grub_video_i386_vbefill_direct32): Added.
4916 (grub_video_i386_vbefill_direct24): Likewise.
4917 (grub_video_i386_vbefill_direct16): Likewise.
4918 (grub_video_i386_vbefill_direct8): Likewise.
4920 * include/grub/video.h (grub_video_blit_format): Removed
4921 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4922 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4923 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4924 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4925 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4927 * video/video.c (grub_video_get_blit_format): Updated to use new
4928 blit formats. Added handling for 16 bit color modes.
4930 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4932 (common_blitter): Updated to use new blitters.
4934 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4936 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4937 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4938 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4939 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4940 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4941 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4942 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4943 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4944 (grub_video_i386_vbeblit_index_index): Likewise.
4945 (grub_video_i386_vbeblit_replace_directN): Added.
4946 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4947 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4948 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4949 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4950 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4951 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4952 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4953 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4954 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4955 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4956 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4957 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4958 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4960 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4961 (grub_video_i386_vbefill_R8G8B8): Likewise.
4962 (grub_video_i386_vbefill_index): Likewise.
4963 (grub_video_i386_vbefill_direct32): Added.
4964 (grub_video_i386_vbefill_direct24): Likewise.
4965 (grub_video_i386_vbefill_direct16): Likewise.
4966 (grub_video_i386_vbefill_direct8): Likewise.
4968 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4971 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4974 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4977 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4980 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4982 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4985 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
4987 * fs/iso9660.c (grub_iso9660_date): New structure.
4988 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4989 (grub_iso9660_uuid): New function.
4991 2008-09-05 Bean <bean123ch@gmail.com>
4993 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4995 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4996 insensitive bit for names in Win32 and Win32 & DOS namespace.
4998 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5000 * include/grub/types.h (LONG_MAX): Likewise.
5002 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5004 * util/getroot.c: Include <config.h>.
5005 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5006 add support for /dev/md/N devices and handle LVM double dash escaping.
5008 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5010 * config.guess: Update to latest version from config git.
5011 * config.sub: Likewise.
5013 2008-09-03 Robert Millan <rmh@aybabtu.com>
5015 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5016 `disk->total_sectors'.
5018 2008-09-01 Colin D Bennett <colin@gibibit.com>
5020 * include/grub/normal.h: Fixed incorrect comment for
5021 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5023 2008-09-01 Colin D Bennett <colin@gibibit.com>
5025 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5026 values with defines.
5028 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5029 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5030 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5031 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5032 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5033 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5034 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5035 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5036 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5037 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5038 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5039 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5040 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5041 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5042 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5043 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5044 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5045 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5046 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5048 2008-08-31 Robert Millan <rmh@aybabtu.com>
5050 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5052 (grub_multiboot): Fix a few warnings.
5054 2008-08-31 Robert Millan <rmh@aybabtu.com>
5056 * loader/i386/pc/multiboot.c: Update comment not to say that
5057 boot_device support is unimplemented.
5059 2008-08-31 Robert Millan <rmh@aybabtu.com>
5061 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5062 or memory map support are unimplemented.
5064 2008-08-31 Colin D Bennett <colin@gibibit.com>
5066 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5068 2008-08-31 Colin D Bennett <colin@gibibit.com>
5070 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5071 total video memory in 'vbeinfo' output; show color format details for
5074 2008-08-30 Pavel Roskin <proski@gnu.org>
5076 * util/genmoddep.c: Remove for real this time.
5077 * DISTLIST: Remove util/genmoddep.c.
5079 2008-08-30 Robert Millan <rmh@aybabtu.com>
5081 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5082 as required by Multiboot spec (it was already 4-byte aligned, but
5085 2008-08-29 Pavel Roskin <proski@gnu.org>
5087 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5088 * kern/powerpc/ieee1275/startup.S: ... this.
5089 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5090 * DISTLIST: Likewise.
5092 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5093 grub/cpu/kernel.h. Add start label for consistency with other
5094 platforms. Add grub_prefix immediately after start. Add jump
5095 to the code after grub_prefix.
5096 * include/grub/powerpc/kernel.h: Provide valid values for
5097 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5099 2008-08-29 Bean <bean123ch@gmail.com>
5101 * configure.ac: Change host_os to cygwin for mingw.
5102 (asprintf): New check for function.
5104 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5105 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5107 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5108 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5109 sync, sleep and grub_util_get_disk_size for mingw.
5111 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5112 to get size in mingw.
5113 (open_device): Use flag O_BINARY if it's defined.
5114 (find_root_device): Add dummy code for mingw.
5116 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5117 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5118 (get_scsi_disk_name): Return 0 for mingw.
5120 * util/hostfs.c: #include <grub/util/misc.h>.
5121 (grub_hostfs_open): Use "rb" flag to open file, use
5122 grub_util_get_disk_size to get disk size for mingw.
5124 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5125 (asprintf): New function if HAVE_ASPRINTF is not set.
5126 (sync): New function for mingw.
5128 (grub_util_get_disk_size): Likewise.
5130 2008-08-28 Pavel Roskin <proski@gnu.org>
5132 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5135 2008-08-28 Robert Millan <rmh@aybabtu.com>
5137 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5139 2008-08-28 Robert Millan <rmh@aybabtu.com>
5141 Change find_grub_drive() syntax so it doesn't prevent it from
5142 detecting NULL names as errors.
5144 * util/biosdisk.c (find_grub_drive): Move free slot search code
5146 (find_free_slot): ... to here.
5147 (read_device_map): Use find_free_slot() to search for free slots.
5149 2008-08-27 Marco Gerards <marco@gnu.org>
5151 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5152 (scsi_mod_SOURCES): New variable.
5153 (scsi_mod_CFLAGS): Likewise
5154 (scsi_mod_LDFLAGS): Likewise.
5156 * disk/scsi.c: New file.
5158 * include/grub/scsi.h: Likewise.
5160 * include/grub/scsicmd.h: Likewise.
5162 * disk/ata.c: Include <grub/scsi.h>.
5163 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5165 (grub_ata_iterate): Skip ATAPI devices.
5166 (grub_ata_open): Only handle ATAPI devices.
5167 (struct grub_atapi_read): Removed.
5168 (grub_atapi_readsector): Likewise.
5169 (grub_ata_read): No longer handle ATAPI devices.
5170 (grub_ata_write): Likewise.
5171 (grub_atapi_iterate): New function.
5172 (grub_atapi_read): Likewise.
5173 (grub_atapi_write): Likewise.
5174 (grub_atapi_open): Likewise.
5175 (grub_atapi_close): Likewise.
5176 (grub_atapi_dev): New variable.
5177 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5178 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5180 * include/grub/disk.h (enum grub_disk_dev_id): Add
5181 `GRUB_DISK_DEVICE_SCSI_ID'.
5183 2008-08-26 Robert Millan <rmh@aybabtu.com>
5185 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5186 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5189 2008-08-23 Bean <bean123ch@gmail.com>
5191 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5192 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5193 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5194 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5196 (raid5rec_mod_SOURCES): New macro.
5197 (raid5rec_mod_CFLAGS): Likewise.
5198 (raid5rec_mod_LDFLAGS): Likewise.
5199 (raid6rec_mod_SOURCES): Likewise.
5200 (raid6rec_mod_CFLAGS): Likewise.
5201 (raid6rec_mod_LDFLAGS): Likewise.
5202 (mdraid_mod_SOURCES): Likewise.
5203 (mdraid_mod_CFLAGS): Likewise.
5204 (mdraid_mod_LDFLAGS): Likewise.
5205 (dm_nv_mod_SOURCES): Likewise.
5206 (dm_nv_mod_CFLAGS): Likewise.
5207 (dm_nv_mod_LDFLAGS): Likewise.
5209 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5210 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5211 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5213 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5214 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5216 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5218 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5220 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5222 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5224 * disk/raid5_recover.c: New file.
5226 * disk/raid6_recover.c: Likewise.
5228 * disk/mdraid_linux.c: Likewise.
5230 * disk/dmraid_nvidia.c: Likewise.
5232 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5235 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5236 calculate the size of raid device.
5237 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5238 different layout of raid5.
5239 (grub_raid_scan_device): Remove code specific to mdraid.
5240 (grub_raid_list): New variable.
5241 (free_array): New function.
5242 (grub_raid_register): Likewise.
5243 (grub_raid_unregister): Likewise.
5244 (grub_raid_rescan): Likewise.
5245 (GRUB_MOD_INIT): Don't iterate device here.
5246 (GRUB_MOD_FINI): Use free_array to release resource.
5248 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5249 (grub_raid5_recover_func_t): New function variable type.
5250 (grub_raid6_recover_func_t): Likewise.
5251 (grub_raid5_recover_func): New variable.
5252 (grub_raid6_recover_func): Likewise.
5253 (grub_raid_register): New function.
5254 (grub_raid_unregister): Likewise.
5255 (grub_raid_rescan): Likewise.
5256 (grub_raid_block_xor): Likewise.
5258 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5259 (CMD_CRC): New macro.
5261 (read_file): Handle device as well as file.
5262 (cmd_crc): New function.
5263 (fstest): Handle multiple disks.
5264 (options): Remove part, raw and long, add root and diskcount.
5265 (usage): Add crc, remove -p, -r, -l, add -r and -c.
5266 (main): Find the first non option entry and ignore subsequent options,
5267 add handling for the new options, support multiple disks.
5269 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5271 2008-08-23 Bean <bean123ch@gmail.com>
5273 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5275 * genfslist.sh: Ignore kernel.mod.
5277 * genpartmaplist.sh: Likewise.
5279 2008-08-23 Robert Millan <rmh@aybabtu.com>
5281 * util/getroot.c (find_root_device): Skip anything that starts with
5282 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5284 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
5286 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5287 * util/grub.d/00_header.in: Allow the administrator to change default
5288 gfxmode via ${GRUB_GFXMODE}.
5290 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
5292 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5294 2008-08-21 Robert Millan <rmh@aybabtu.com>
5296 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5298 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5299 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5301 2008-08-20 Carles Pina i Estany <carles@pina.cat>
5303 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5304 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5306 2008-08-19 Robert Millan <rmh@aybabtu.com>
5308 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5309 (struct grub_virtual_screen): Remove `cursor_color'.
5310 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5312 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5314 2008-08-18 Robert Millan <rmh@aybabtu.com>
5316 Unify (identical) linux_normal.c files.
5317 * loader/i386/efi/linux_normal.c: Move from here ...
5318 * loader/linux_normal.c: ... to here. Update all users.
5319 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5320 * loader/i386/ieee1275/linux_normal.c: Likewise.
5322 2008-08-18 Robert Millan <rmh@aybabtu.com>
5324 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5325 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5326 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5327 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5328 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5330 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5331 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5332 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5333 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5334 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5335 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5336 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5337 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5338 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5339 portably using grub_getxy().
5340 Replace `-EFI' with `-bzImage' in boot message.
5342 2008-08-17 Robert Millan <rmh@aybabtu.com>
5344 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5346 2008-08-17 Robert Millan <rmh@aybabtu.com>
5348 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5350 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5351 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5352 (grub_machine_mmap_iterate): New function declaration.
5353 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5355 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5358 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5359 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5360 Move e820 parsing from here ...
5361 * kern/i386/pc/mmap.c: New file.
5362 (grub_machine_mmap_iterate): ... to here.
5364 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5365 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5366 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5367 (grub_available_iterate): Redeclare to return `void', and redeclare
5368 its hook to use grub_uint64_t as addr and size parameters, and rename
5370 (grub_machine_mmap_iterate): ... this. Update all users.
5372 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5373 to make it more readable. Rename to ...
5374 (grub_machine_mmap_iterate): ... this.
5376 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5377 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5378 (grub_multiboot): Allocate an extra region after the payload, and fill
5379 it with a Multiboot memory map. Adjust a.out loader to calculate size
5380 with the extra space.
5381 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5382 with the extra space.
5384 2008-08-17 Carles Pina i Estany <carles@pina.cat>
5386 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5388 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
5390 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5391 mdate-sh to the list `find' searches for.
5392 * DISTLIST: Regenerated.
5394 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
5396 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5397 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5398 genmoddep.awk, gensymlist.sh.in.
5399 (DISTDIRS): Add bus, docs, hook, lib.
5400 * DISTLIST: Regenerated.
5401 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5403 2008-08-16 Robert Millan <rmh@aybabtu.com>
5405 * disk/raid.c (grub_raid_init): Handle/report errors set by
5406 grub_device_iterate().
5407 * disk/lvm.c (grub_lvm_init): Likewise.
5409 2008-08-15 Bean <bean123ch@gmail.com>
5411 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5413 (datetime_mod_SOURCES): New macro.
5414 (datetime_mod_CFLAGS): Likewise.
5415 (datetime_mod_LDFLAGS): Likewise.
5416 (date_mod_SOURCES): Likewise.
5417 (date_mod_CFLAGS): Likewise.
5418 (date_mod_LDFLAGS): Likewise.
5419 (datehook_mod_SOURCES): Likewise.
5420 (datehook_mod_CFLAGS): Likewise.
5421 (datehook_mod_LDFLAGS): Likewise.
5423 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5425 (datetime_mod_SOURCES): New macro.
5426 (datetime_mod_CFLAGS): Likewise.
5427 (datetime_mod_LDFLAGS): Likewise.
5428 (date_mod_SOURCES): Likewise.
5429 (date_mod_CFLAGS): Likewise.
5430 (date_mod_LDFLAGS): Likewise.
5431 (datehook_mod_SOURCES): Likewise.
5432 (datehook_mod_CFLAGS): Likewise.
5433 (datehook_mod_LDFLAGS): Likewise.
5435 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5437 (datetime_mod_SOURCES): New macro.
5438 (datetime_mod_CFLAGS): Likewise.
5439 (datetime_mod_LDFLAGS): Likewise.
5440 (date_mod_SOURCES): Likewise.
5441 (date_mod_CFLAGS): Likewise.
5442 (date_mod_LDFLAGS): Likewise.
5443 (datehook_mod_SOURCES): Likewise.
5444 (datehook_mod_CFLAGS): Likewise.
5445 (datehook_mod_LDFLAGS): Likewise.
5447 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5449 (datetime_mod_SOURCES): New macro.
5450 (datetime_mod_CFLAGS): Likewise.
5451 (datetime_mod_LDFLAGS): Likewise.
5452 (date_mod_SOURCES): Likewise.
5453 (date_mod_CFLAGS): Likewise.
5454 (date_mod_LDFLAGS): Likewise.
5455 (datehook_mod_SOURCES): Likewise.
5456 (datehook_mod_CFLAGS): Likewise.
5457 (datehook_mod_LDFLAGS): Likewise.
5459 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5461 (datetime_mod_SOURCES): New macro.
5462 (datetime_mod_CFLAGS): Likewise.
5463 (datetime_mod_LDFLAGS): Likewise.
5464 (date_mod_SOURCES): Likewise.
5465 (date_mod_CFLAGS): Likewise.
5466 (date_mod_LDFLAGS): Likewise.
5467 (datehook_mod_SOURCES): Likewise.
5468 (datehook_mod_CFLAGS): Likewise.
5469 (datehook_mod_LDFLAGS): Likewise.
5471 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5473 * commands/date.c: New file.
5475 * hook/datehook.c: Likewise.
5477 * include/grub/lib/datetime.h: Likewise.
5479 * include/grub/i386/cmos.h: Likewise.
5481 * lib/datetime.c: Likewise.
5483 * lib/i386/datetime.c: Likewise.
5485 * lib/efi/datetime.c: Likewise.
5487 2008-08-14 Robert Millan <rmh@aybabtu.com>
5489 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5490 (grub_mkelfimage_SOURCES): New variable.
5491 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5493 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5494 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5495 * conf/powerpc-ieee1275.rmk: Likewise.
5496 * conf/i386-ieee1275.rmk: Likewise.
5498 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5499 * kern/i386/coreboot/init.c: Likewise.
5501 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5502 with `<grub/cpu/kernel.h>'.
5503 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5505 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5506 * kern/i386/coreboot/startup.S: Likewise.
5508 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5509 (GRUB_MOD_GAP): Remove.
5510 * include/grub/powerpc/kernel.h: New file.
5511 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5512 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5513 * include/grub/i386/kernel.h: New file.
5514 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5515 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5516 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5518 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5520 Use --directory when invoking grub_mkimage.
5522 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5523 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5524 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5525 and GRUB_KERNEL_CPU_PREFIX.
5527 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
5529 * include/grub/err.h (grub_err_printf): New function prototype.
5530 * util/misc.c (grub_err_printf): New function.
5531 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5533 * kern/err.c (grub_print_error): Use grub_err_printf.
5535 2008-08-13 Robert Millan <rmh@aybabtu.com>
5537 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5539 2008-08-13 Robert Millan <rmh@aybabtu.com>
5541 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5544 2008-08-12 Robert Millan <rmh@aybabtu.com>
5546 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5547 of the relocation code from here ...
5548 (grub_multiboot): ... to here.
5549 (forward_relocator, backward_relocator): Move from here ...
5550 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5551 (grub_multiboot_backward_relocator): ... to here.
5552 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5553 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5554 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5555 (grub_multiboot_forward_relocator_end)
5556 (grub_multiboot_backward_relocator)
5557 (grub_multiboot_backward_relocator_end): New variables.
5559 2008-08-12 Bean <bean123ch@gmail.com>
5561 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5563 2008-08-11 Robert Millan <rmh@aybabtu.com>
5565 * kern/i386/linuxbios/startup.S: Move from here ...
5566 * kern/i386/coreboot/startup.S: ... to here.
5568 * kern/i386/linuxbios/init.c: Move from here ...
5569 * kern/i386/coreboot/init.c: ... to here.
5571 * kern/i386/linuxbios/table.c: Move from here ...
5572 * kern/i386/coreboot/mmap.c: ... to here.
5574 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5576 2008-08-11 Robert Millan <rmh@aybabtu.com>
5578 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5579 errors. Leave it to the upper layer to handle them.
5581 2008-08-09 Christian Franke <franke@computer.org>
5583 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5584 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5585 Install `grub.d/10_windows' only on Cygwin.
5586 * configure.ac: Add subst of `target_os'.
5587 Check `target_os' also before setting TARGET_OBJ2ELF.
5588 Add `--enable-grub-pe2elf'.
5590 2008-08-08 Robert Millan <rmh@aybabtu.com>
5592 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5593 (grub_last_time): Change type to grub_uint64_t.
5594 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5595 (grub_disk_close): Likewise.
5597 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5598 (run_menu): Migrate code from to using grub_get_time_ms().
5600 * util/misc.c (grub_get_time_ms): New function.
5602 2008-08-08 Marco Gerards <marco@gnu.org>
5604 * disk/ata.c (grub_ata_regget): Change return type to
5606 (grub_ata_regget2): Likewise.
5607 (grub_ata_wait_status): New function.
5608 (grub_ata_wait_busy): Removed function, updated all users to use
5609 `grub_ata_wait_status'.
5610 (grub_ata_wait_drq): Likewise.
5611 (grub_ata_cmd): New function.
5612 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5614 (grub_ata_pio_write): Add error handling.
5615 (grub_atapi_identify): Likewise.
5616 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5618 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5619 handling. Actually use the detected registers. Reorder the
5620 detection logic such that it is easier to read.
5621 (grub_ata_pciinit): Do not assign the same ID to each controller.
5622 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5624 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5626 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5628 2008-08-08 Marco Gerards <marco@gnu.org>
5632 2008-08-07 Bean <bean123ch@gmail.com>
5634 * include/grub/x86_64/pci.h: New file.
5636 2008-08-07 Christian Franke <franke@computer.org>
5638 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5639 (TIMER2_GATE): Likewise.
5640 (grub_pit_wait): Add enable/disable of the timer2 gate
5641 bit of port 0x61. This fixes a possible infinite loop.
5643 2008-08-07 Bean <bean123ch@gmail.com>
5645 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5646 kern/i386/tsc.c and kern/i386/pit.c.
5648 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5651 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5654 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5656 2008-08-07 Bean <bean123ch@gmail.com>
5658 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5660 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5662 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5663 multiple inclusion. Add #include <grub/types.h>.
5665 2008-08-06 Christian Franke <franke@computer.org>
5667 * conf/common.rmk: Build and install `10_windows'.
5668 * util/grub.d/10_windows.in: New script.
5670 2008-08-06 Pavel Roskin <proski@gnu.org>
5672 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5674 2008-08-06 Robert Millan <rmh@aybabtu.com>
5676 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5677 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5679 2008-08-06 Bean <bean123ch@gmail.com>
5681 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5682 (grub_pxefs_fs_int): Remove dummy definition.
5683 (grub_pxefs_open): Use data->block_size to store the current block
5685 (grub_pxefs_read): Use block size stored in data->block_size. As the
5686 value of grub_pxe_blksize can be changed after the file is opened.
5688 2008-08-06 Bean <bean123ch@gmail.com>
5690 * fs/i386/pc/pxe.c (curr_file): new variable.
5691 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5692 require the dummy internal file system anymore.
5693 (grub_pxefs_read): Removed.
5694 (grub_pxefs_close): Likewise.
5695 (grub_pxefs_fs_int): Likewise.
5696 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5697 connection when we switch file.
5698 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5700 2008-08-06 Robert Millan <rmh@aybabtu.com>
5702 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5704 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5705 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5707 * kern/i386/halt.c: New file.
5708 * kern/i386/reboot.c: Likewise.
5709 * include/grub/i386/reboot.h: Likewise.
5710 * include/grub/i386/halt.h: Likewise.
5712 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5713 Include `<grub/cpu/halt.h>'.
5714 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5715 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5717 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5718 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5719 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5720 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5721 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5722 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5724 * include/grub/i386/at_keyboard.h: ... to here.
5726 2008-08-05 Robert Millan <rmh@aybabtu.com>
5728 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5729 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5730 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5731 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5732 `kern/generic/millisleep.c'.
5734 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5735 instead of grub_get_rtc().
5736 (grub_tsc_init): Initialize `tsc_boot_time'.
5738 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5739 (grub_machine_init): Use grub_tsc_init() rather than
5740 installing an RTC-based handler via grub_install_get_time_ms().
5742 * kern/i386/pit.c: New file.
5743 * include/grub/i386/pit.h: Likewise.
5745 2008-08-05 Bean <bean123ch@gmail.com>
5747 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5749 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5750 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5751 (pxe_mod_SOURCES): New macro.
5752 (pxe_mod_CFLAGS): Likewise.
5753 (pxe_mod_LDFLAGS): Likewise.
5754 (pxecmd_mod_SOURCES): Likewise.
5755 (pxecmd_mod_CFLAGS): Likewise.
5756 (pxecmd_mod_LDFLAGS): Likewise.
5758 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5759 (grub_pxe_call): Likewise.
5761 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5763 * commands/i386/pc/pxecmd.c: New file.
5765 * fs/i386/pc/pxe.c: Likewise.
5767 * include/grub/i386/pc/pxe.h: Likewise.
5769 2008-08-05 Bean <bean123ch@gmail.com>
5771 * util/console.c (grub_console_cur_color): New variable.
5772 (grub_console_standard_color): Likewise.
5773 (grub_console_normal_color): Likewise.
5774 (grub_console_highlight_color): Likewise.
5775 (color_map): Likewise.
5776 (use_color): Likewise.
5777 (NUM_COLORS): New macro.
5778 (grub_ncurses_setcolorstate): Handle color properly.
5779 (grub_ncurses_setcolor): Don't change color here, just remember the
5780 settings, color will be set in grub_ncurses_setcolorstate.
5781 (grub_ncurses_getcolor): New function.
5782 (grub_ncurses_init): Initialize color pairs.
5783 (grub_ncurses_term): New member grub_ncurses_getcolor.
5785 2008-08-05 Colin D Bennett <colin@gibibit.com>
5787 High resolution timer support. Implemented for x86 CPUs using TSC.
5788 Extracted generic grub_millisleep() so it's linked in only as needed.
5789 This requires a Pentium compatible CPU; if the RDTSC instruction is
5790 not supported, then it falls back on the generic grub_get_time_ms()
5791 implementation that uses the machine's RTC.
5793 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5794 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5795 `kern/generic/millisleep.c'.
5797 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5798 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5800 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5801 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5803 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5805 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5806 `kern/generic/millisleep.c'.
5808 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5810 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5812 * kern/generic/rtc_get_time_ms.c: New file.
5814 * kern/generic/millisleep.c: New file.
5816 * kern/misc.c: Don't include
5817 <kern/time.h> anymore.
5818 (grub_millisleep_generic): Removed.
5820 * commands/sleep.c (grub_interruptible_millisleep): Uses
5821 grub_get_time_ms() instead of grub_get_rtc().
5823 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5825 (grub_cpu_is_cpuid_supported): New inline function.
5826 (grub_cpu_is_tsc_supported): New inline function.
5827 (grub_tsc_init): New function prototype.
5828 (grub_tsc_get_time_ms): New function prototype.
5830 * kern/i386/tsc.c (grub_get_time_ms): New file.
5832 * include/grub/time.h: Include <grub/types.h.
5833 (grub_millisleep_generic): Removed.
5834 (grub_get_time_ms): New prototype.
5835 (grub_install_get_time_ms): New prototype.
5836 (grub_rtc_get_time_ms): New prototype.
5838 * kern/time.c (grub_get_time_ms): New function.
5839 (grub_install_get_time_ms): New function.
5841 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5842 <grub/time.h> anymore.
5843 (grub_millisleep): Removed.
5844 (grub_machine_init): Call grub_tsc_init.
5846 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5847 get_time_ms() implementation.
5849 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5850 (ieee1275_get_time_ms): New function.
5851 (grub_machine_init): Install get_time_ms() implementation.
5853 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5854 (grub_machine_init): Call grub_tsc_init().
5855 (grub_millisleep): Removed.
5857 * kern/ieee1275/init.c (grub_millisleep): Removed.
5858 (grub_machine_init): Install ieee1275_get_time_ms()
5860 (ieee1275_get_time_ms): New function.
5861 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5864 2008-08-05 Marco Gerards <marco@gnu.org>
5866 * disk/ata.c: Include <grub/pci.h>.
5867 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5868 (grub_ata_initialize): Rewritten.
5869 (grub_ata_device_initialize): New function.
5871 2008-08-04 Pavel Roskin <proski@gnu.org>
5873 * kern/main.c: Include grub/mm.h.
5875 2008-08-04 Robert Millan <rmh@aybabtu.com>
5877 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5878 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5879 corruption problem).
5881 2008-08-04 Robert Millan <rmh@aybabtu.com>
5883 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5884 warnings introduced in my last commit.
5886 2008-08-03 Robert Millan <rmh@aybabtu.com>
5888 Make PCI available on all i386 architectures.
5890 * include/grub/i386/pc/pci.h: Move from here ...
5891 * include/grub/i386/pci.h: ... to here.
5893 * include/grub/i386/pc/pci.h: Remove.
5894 * include/grub/i386/efi/pci.h: Remove.
5895 * include/grub/x86_64/efi/pci.h: Remove.
5897 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5900 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5901 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5902 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5904 * conf/i386-ieee1275.rmk: Likewise.
5906 2008-08-03 Robert Millan <rmh@aybabtu.com>
5908 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5909 (grub_console_setcursor): Make it possible to set cursor off.
5911 2008-08-03 Robert Millan <rmh@aybabtu.com>
5913 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
5914 of modules instead of assuming which platform provides what.
5915 * util/update-grub.in: Likewise.
5917 2008-08-03 Robert Millan <rmh@aybabtu.com>
5919 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5920 instead of `grub_install_dos_part' to determine whether a drive needs
5921 to be prepended to prefix (`grub_install_dos_part' is not reliable,
5922 because it can be overridden when loading GRUB via Multiboot).
5924 2008-08-02 Robert Millan <rmh@aybabtu.com>
5926 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5928 2008-08-02 Robert Millan <rmh@aybabtu.com>
5930 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5931 of informational grub_dprintf() calls.
5933 2008-08-02 Robert Millan <rmh@aybabtu.com>
5935 * disk/memdisk.c (memdisk_size): Don't initialize.
5936 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5938 * include/grub/i386/pc/kernel.h
5939 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5940 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5941 (grub_memdisk_image_size, grub_arch_memdisk_addr)
5942 (grub_arch_memdisk_size): Remove.
5944 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5945 field (was only used to transfer a constant). Add `type' field to
5946 support multiple module types.
5947 (grub_module_iterate): New function.
5949 * kern/device.c (grub_device_open): Do not hide error messages
5950 when grub_disk_open() fails. Use grub_print_error() instead.
5952 * kern/i386/pc/init.c (grub_arch_modules_addr)
5953 (grub_arch_memdisk_size): Remove functions.
5954 (grub_arch_modules_addr): Return the module address in high memory
5955 (now that it isn't copied anymore).
5957 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5958 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5959 decompression routine (grub_total_module_size already includes that
5960 now). Don't copy modules back to low memory.
5962 * kern/main.c: Include `<grub/mm.h>'.
5963 (grub_load_modules): Split out (and use) ...
5964 (grub_module_iterate): ... this function, which iterates through
5965 module objects and runs a hook.
5966 Comment out grub_mm_init_region() call, as it would cause non-ELF
5967 modules to be overwritten.
5969 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5970 the memdisk image in its own region, make it part of the module list.
5971 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5972 (main): Parse --memdisk|-m option, and pass user-provided path as
5973 parameter to generate_image().
5974 (add_segments): Pass `memdisk_path' down to load_modules().
5975 (load_modules): Embed memdisk image in module section when requested.
5976 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5977 `header.type' instead of `header.offset'.
5979 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5980 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5981 (memdisk_mod_LDFLAGS): New variables.
5982 * conf/i386-coreboot.rmk: Likewise.
5983 * conf/i386-ieee1275.rmk: Likewise.
5985 2008-08-02 Robert Millan <rmh@aybabtu.com>
5987 * loader/i386/pc/multiboot.c (playground, forward_relocator)
5988 (backward_relocator): New variables. Used to allocate and relocate
5989 the payload, respectively.
5990 (grub_multiboot_load_elf32): Load into heap instead of requested
5991 address, install the appropriate relocator code in each bound of
5992 the payload, and set the entry point such that
5993 grub_multiboot_real_boot() will jump to one of them.
5995 * kern/i386/loader.S (grub_multiboot_payload_size)
5996 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5997 (grub_multiboot_payload_entry_offset): New variables.
5998 (grub_multiboot_real_boot): Set cpu context to what the relocator
5999 expects, and jump to the relocator instead of the payload.
6001 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6002 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6003 (grub_multiboot_payload_entry_offset): Export.
6005 2008-08-01 Bean <bean123ch@gmail.com>
6007 * normal/menu_entry.c (editor_getline): Don't return the original
6008 string as result, as it will be released by lexer once it has done
6011 2008-08-01 Robert Millan <rmh@aybabtu.com>
6013 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6014 within menuentries, not before them.
6015 util/grub.d/10_hurd.in: Likewise.
6017 2008-08-01 Bean <bean123ch@gmail.com>
6019 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6020 (bufio_mod_SOURCES): New macro.
6021 (bufio_mod_CFLAGS): Likewise.
6022 (bufio_mod_LDFLAGS): Likewise.
6024 * include/grub/bufio.h: New file.
6026 * io/bufio.c: Likewise.
6028 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6029 (grub_video_reader_png): Use grub_buffile_open to open file.
6031 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6032 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6034 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6035 (grub_video_reader_tga): Use grub_buffile_open to open file.
6037 * font/manager.c: Include <grub/bufio.h>.
6038 (add_font): Use grub_buffile_open to open file.
6040 2008-07-31 Robert Millan <rmh@aybabtu.com>
6042 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6043 ELF segments, use a macro for arbitrarily accessing any of them instead
6044 of preparing a pointer that allows access to one at a time.
6045 (grub_multiboot_load_elf64): Likewise.
6047 2008-07-31 Bean <bean123ch@gmail.com>
6049 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6050 GRUB_KERNEL_MACHINE_DATA_END.
6052 2008-07-30 Robert Millan <rmh@aybabtu.com>
6054 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6055 Increase from 0x50 to 0x60.
6056 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6057 use UUIDs to identify the root drive for them. If that's not
6059 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6060 check, for cross-disk installs.
6062 2008-07-30 Robert Millan <rmh@aybabtu.com>
6064 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6065 is non-empty, use it to set the `prefix' environment variable instead
6066 of the usual approach.
6067 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6068 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6069 environment variable instead of dummy make_install_device().
6071 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6072 (start): Insert a data section, with `grub_prefix' variable.
6073 * kern/i386/linuxbios/startup.S: Likewise.
6075 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6076 New variable reference.
6077 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6078 New macro. Defines offset of `grub_prefix' within startup.S (relative
6080 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6081 section within startup.S (relative to `start').
6082 * include/grub/i386/coreboot/kernel.h: Likewise.
6084 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6085 Overwrite grub_prefix with its contents, at the beginning of the
6087 (main): Understand -p|--prefix.
6089 2008-07-30 Robert Millan <rmh@aybabtu.com>
6091 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6093 2008-07-30 Robert Millan <rmh@aybabtu.com>
6095 * term/i386/pc/vga_text.c (grub_console_cls): Use
6096 grub_console_gotoxy() to go back to beginning of the screen.
6097 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6099 2008-07-29 Christian Franke <franke@computer.org>
6101 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6102 Add conversion of emulated mount points on Cygwin.
6104 2008-07-29 Christian Franke <franke@computer.org>
6106 * util/update-grub.in: Add a check for admin
6108 Remove old `grub.cfg.new' before creation.
6109 Add `-f' to `mv' to handle the different filesystem
6110 semantics of Windows.
6112 2008-07-29 Bean <bean123ch@gmail.com>
6114 * normal/main.c (get_line): Fix buffer overflow bug.
6116 2008-07-28 Robert Millan <rmh@aybabtu.com>
6118 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6119 (struct grub_apple_header): New struct. Describes the layout of
6121 (apple_partition_map_iterate): Check the header magic as well as the
6122 partition magic (which was already being checked).
6124 2008-07-28 Pavel Roskin <proski@gnu.org>
6126 * genmk.rb: Add a warning to the beginning of the output that
6127 it's a generated file and should not be edited.
6129 2008-07-28 Robert Millan <rmh@aybabtu.com>
6131 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6132 with the same number are found, just use issue a warning with
6133 grub_dprintf(), as this error has been reported to be non-fatal.
6135 2008-07-27 Robert Millan <rmh@aybabtu.com>
6137 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6140 2008-07-27 Bean <bean123ch@gmail.com>
6142 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6143 (grub_fat_find_dir): Ignore case when comparing filename.
6145 2008-07-27 Bean <bean123ch@gmail.com>
6147 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6148 smallino, as it's more descriptive, and i8count can be confused with
6149 the other field count.
6150 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6153 2008-07-27 Bean <bean123ch@gmail.com>
6155 * commands/crc.c: New file.
6157 * lib/crc.c: Likewise.
6159 * include/grub/lib/crc.h: Likewise.
6161 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6163 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6164 (hexdump): Move this function to ...
6166 * lib/hexdump.c: ... here.
6168 * include/grub/hexdump.h: Renamed to ...
6170 * include/grub/lib/hexdump.h: ... this.
6172 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6174 * util/grub-editenv.c: Likewise.
6176 * include/envblk.h: Renamed to ...
6178 * include/lib/envblk.h: ... this.
6180 * util/envblk.c: Renamed to ...
6182 * lib/envblk.c: ... this.
6184 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6186 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6187 (pkglib_MODULES): Add crc.mod.
6188 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6189 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6190 (crc_mod_SOURCES): New macro.
6191 (crc_mod_CFLAGS): Likewise.
6192 (crc_mod_LDFLAGS): Likewise.
6194 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6196 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6198 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6200 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6202 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6204 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
6206 * commands/help.c: Include <grub/term.h>.
6207 (TERM_WIDTH): Removed. Updated all users.
6209 2008-07-27 Pavel Roskin <proski@gnu.org>
6211 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6212 spurious warnings about a comment within a comment.
6214 2008-07-25 Robert Millan <rmh@aybabtu.com>
6216 * util/getroot.c (find_root_device): Skip devices that match
6217 /dev/dm-[0-9]. This lets the real device be found for any type of
6218 abstraction (LVM, EVMS, RAID..).
6219 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6220 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6221 device is found first, find_root_device() will now skip it.
6223 2008-07-24 Pavel Roskin <proski@gnu.org>
6225 * include/grub/types.h: Use __builtin_bswap32() and
6226 __builtin_bswap64() with gcc 4.3 and newer.
6228 2008-07-24 Christian Franke <franke@computer.org>
6230 * util/i386/pc/grub-install.in: If `--debug' is specified,
6231 pass `--verbose' to grub-setup.
6232 Abort script if make_system_path_relative_to_its_root() fails.
6234 2008-07-24 Bean <bean123ch@gmail.com>
6236 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6237 variable `target_platform' should be `platform'.
6239 2008-07-24 Bean <bean123ch@gmail.com>
6241 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6242 (grub_png_init_fixed_block): New function.
6243 (grub_png_decode_image_data): Handle fixed huffman code compression.
6245 2008-07-24 Bean <bean123ch@gmail.com>
6247 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6248 (grub_pe2elf_SOURCES): New macro.
6249 (CLEANFILES): Add grub-pe2elf.
6251 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6252 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6253 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6254 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6255 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6256 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6257 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6258 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6259 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6260 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6261 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6262 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6263 (GRUB_PE32_DT_FUNCTION): Likewise.
6264 (GRUB_PE32_REL_I386_DIR32): Likewise.
6265 (GRUB_PE32_REL_I386_REL32): Likewise.
6266 (grub_pe32_symbol): New structure.
6267 (grub_pe32_reloc): Likewise.
6269 * util/grub-pe2elf.c: New file.
6271 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6272 start symbol in non pc platform.
6274 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6276 The following patches are from Christian Franke.
6278 * include/grub/dl.h: Remove .previous, gas supports this only
6281 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6282 Remove .type, gas supports this only for ELF format.
6284 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6285 nullbytes in symbol table. This fixes an infinite loop if table is
6288 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6289 TARGET_IMG_LDFLAGS and EXEEXT.
6291 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6292 TARGET_IMG_LDFLAGS_AC.
6293 (grub_CHECK_STACK_ARG_PROBE): New function.
6295 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6297 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6299 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6300 to set TARGET_IMG_LD* accordingly.
6301 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6302 Add call to grub_CHECK_STACK_ARG_PROBE.
6303 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6305 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6307 * genmk.rb: Add EXEEXT to CLEANFILES.
6309 2008-07-23 Robert Millan <rmh@aybabtu.com>
6311 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6312 define the codes for arrows and lines used for the menu).
6313 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6316 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6317 fonts, because the latter are too slow.
6319 2008-07-21 Bean <bean123ch@gmail.com>
6321 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6322 a20. Run keyboard test last, as it will cause macbook to halt.
6324 2008-07-18 Pavel Roskin <proski@gnu.org>
6326 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6327 load foreign architecture modules correctly anyway. Keep
6328 support for loading host architecture modules, whether we
6329 compile them or not.
6331 2008-07-17 Pavel Roskin <proski@gnu.org>
6333 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6334 change target_cpu. The compiler default can mismatch target_cpu
6337 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6338 * kern/efi/efi.c: Likewise.
6340 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6341 target compiler is functional.
6342 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6345 * configure.ac: Default to efi platform for x86_64-apple. Allow
6346 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6347 adjustments from the rest, only do them if target is not
6348 explicitly given. Merge other adjustments with the final sanity
6349 check. Remove an extraneous check for supported CPU. Be
6350 specific which CPU and which platform is not supported.
6352 * configure.ac: Default to pc platform for x86_64.
6354 2008-07-17 Robert Millan <rmh@aybabtu.com>
6356 Partial LinuxBIOS -> Coreboot rename.
6358 * conf/i386-linuxbios.rmk: Renamed to ...
6359 * conf/i386-coreboot.rmk: ... this.
6360 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6361 * configure.ac: Accept "coreboot" as input platform (but maintain
6362 compatibility with "linuxbios").
6363 * include/grub/i386/linuxbios: Renamed to ...
6364 * include/grub/i386/coreboot: ... this.
6366 2008-07-17 Bean <bean123ch@gmail.com>
6368 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6369 (appleldr_mod_SOURCE): New variable.
6370 (appleldr_mod_CFLAGS): Likewise.
6371 (appleldr_mod_LDFLAGS): Likewise.
6372 (pci_mod_SOURCES): Likewise.
6373 (pci_mod_CFLAGS): Likewise.
6374 (pci_mod_LDFLAGS): Likewise.
6375 (lspci_mod_SOURCES): Likewise.
6376 (lspci_mod_CFLAGS): Likewise.
6377 (lspci_mod_LDFLAGS): Likewise.
6379 * conf/x86_64-efi.rmk: New file.
6381 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6383 (grub_efidisk_write): Likewise.
6385 * include/efi/api.h (efi_call_0): New macro.
6386 (efi_call_1): Likewise.
6387 (efi_call_2): Likewise.
6388 (efi_call_3): Likewise.
6389 (efi_call_4): Likewise.
6390 (efi_call_5): Likewise.
6391 (efi_call_6): Likewise.
6393 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6394 grub_rescue_cmd_chainloader.
6396 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6397 (grub_pe32_optional_header): Change some fields based on i386 or
6399 (GRUB_PE32_PE32_MAGIC): Likewise.
6401 * include/grub/efi/uga_draw.h: New file.
6403 * include/grub/elf.h (STN_ABS): New constant.
6404 (R_X86_64_NONE): Relocation constant for x86_64.
6405 (R_X86_64_64): Likewise.
6406 (R_X86_64_PC32): Likewise.
6407 (R_X86_64_GOT32): Likewise.
6408 (R_X86_64_PLT32): Likewise.
6409 (R_X86_64_COPY): Likewise.
6410 (R_X86_64_GLOB_DAT): Likewise.
6411 (R_X86_64_JUMP_SLOT): Likewise.
6412 (R_X86_64_RELATIVE): Likewise.
6413 (R_X86_64_GOTPCREL): Likewise.
6414 (R_X86_64_32): Likewise.
6415 (R_X86_64_32S): Likewise.
6416 (R_X86_64_16): Likewise.
6417 (R_X86_64_PC16): Likewise.
6418 (R_X86_64_8): Likewise.
6419 (R_X86_64_PC8): Likewise.
6421 * include/grub/i386/efi/pci.h: New file.
6423 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6424 Change it value based on platform.
6425 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6426 (GRUB_E820_RAM): Likewise.
6427 (GRUB_E820_RESERVED): Likewise.
6428 (GRUB_E820_ACPI): Likewise.
6429 (GRUB_E820_NVS): Likewise.
6430 (GRUB_E820_EXEC_CODE): Likewise.
6431 (GRUB_E820_MAX_ENTRY): Likewise.
6432 (grub_e820_mmap): New structure.
6433 (linux_kernel_header): Change the efi field according to different
6434 kernel version, also field from linux_kernel_header.
6436 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6438 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6439 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6440 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6441 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6442 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6443 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6444 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6445 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6446 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6447 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6449 * include/grub/x86_64/efi/kernel.h: New file.
6451 * include/grub/x86_64/efi/loader.h: Likewise.
6453 * include/grub/x86_64/efi/machine.h: Likewise.
6455 * include/grub/x86_64/efi/pci.h: Likewise.
6457 * include/grub/x86_64/efi/time.h: Likewise.
6459 * include/grub/x86_64/linux.h: Likewise.
6461 * include/grub/x86_64/setjmp.h: Likewise.
6463 * include/grub/x86_64/time.h: Likewise.
6465 * include/grub/x86_64/types.h: Likewise.
6467 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6468 GRUB_TARGET_SIZEOF_VOID_P.
6470 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6471 (grub_efi_locate_handle): Likewise.
6472 (grub_efi_open_protocol): Likewise.
6473 (grub_efi_set_text_mode): Likewise.
6474 (grub_efi_stall): Likewise.
6475 (grub_exit): Likewise.
6476 (grub_reboot): Likewise.
6477 (grub_halt): Likewise.
6478 (grub_efi_exit_boot_services): Likewise.
6479 (grub_get_rtc): Likewise.
6481 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6482 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6483 (grub_efi_allocate_pages): Wrap efi calls.
6484 (grub_efi_free_pages): Wrap efi calls.
6485 (grub_efi_get_memory_map): Wrap efi calls.
6487 * kern/x86_64/dl.c: New file.
6489 * kern/x86_64/efi/callwrap.S: Likewise.
6491 * kern/x86_64/efi/startup.S: Likewise.
6493 * loader/efi/appleloader.c: Likewise.
6495 * loader/efi/chainloader.c (cmdline): New variable.
6496 (grub_chainloader_unload): Wrap efi calls.
6497 (grub_chainloader_boot): Likewise.
6498 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6501 * loader/efi/chainloader_normal.c (chainloader_command):
6502 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6505 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6507 (grub_e820_add_region): New function.
6508 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6510 (grub_find_video_card): New function.
6511 (grub_linux_setup_video): New function.
6512 (grub_rescue_cmd_linux): Probe for video information.
6514 * normal/x86_64/setjmp.S: New file.
6516 * term/efi/console.c (map_char): New function.
6517 (grub_console_putchar): Map unicode char.
6518 (grub_console_checkkey): Wrap efi calls.
6519 (grub_console_getkey): Likewise.
6520 (grub_console_getwh): Likewise.
6521 (grub_console_gotoxy): Likewise.
6522 (grub_console_cls): Likewise.
6523 (grub_console_setcolorstate): Likewise.
6524 (grub_console_setcursor): Likewise.
6526 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6528 2008-07-16 Pavel Roskin <proski@gnu.org>
6530 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6533 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6534 pointer, not an integer. This fixes a warning and prevents
6535 precision loss on 64-bit systems.
6536 (relocate_addresses): Remove unneeded cast.
6538 2008-07-15 Pavel Roskin <proski@gnu.org>
6540 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6542 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6544 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6545 Fix comparison between signed and unsigned.
6547 * include/grub/i386/ieee1275/console.h: Declare
6548 grub_console_init() and grub_console_fini().
6550 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6551 It's empty and unused.
6553 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6554 beginning to avoid warnings with some compilers.
6556 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6557 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6559 2008-07-14 Pavel Roskin <proski@gnu.org>
6561 * kern/env.c (grub_register_variable_hook): Don't copy empty
6562 string, it leaks memory. Pass "" to grub_env_set(), it should
6563 handle constant strings.
6565 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6566 * commands/cmp.c (grub_cmd_cmp): Likewise.
6567 * kern/dl.c (grub_dl_flush_cache): Likewise.
6568 (grub_dl_load_core): Likewise.
6569 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6570 (grub_elf64_load_phdrs): Likewise.
6572 2008-07-13 Pavel Roskin <proski@gnu.org>
6574 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6575 between signed and unsigned.
6576 (LzmaEnc_Finish): Fix warning about an unused parameter.
6578 2008-07-13 Bean <bean123ch@gmail.com>
6580 * Makefile.in (enable_lzo): New rule.
6582 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6584 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6586 * boot/i386/pc/lnxboot.S: #include <config.h>.
6588 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6589 its value according to the compression algorithm used, lzo or lzma.
6591 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6592 compression algorithm according to configure macro.
6594 * kern/i386/pc/startup.S (codestart): Likewise.
6596 * kern/i386/pc/lzma_decode.S: New file.
6598 * include/grub/lib/LzFind.h: Likewise.
6600 * include/grub/lib/LzHash.h: Likewise.
6602 * include/grub/lib/LzmaDec.h: Likewise.
6604 * include/grub/lib/LzmaEnc.h: Likewise.
6606 * include/grub/lib/LzmaTypes.h: Likewise.
6608 * lib/LzFind.c: Likewise.
6610 * lib/LzmaDec.c: Likewise.
6612 * lib/LzmaEnc.c: Likewise.
6614 2008-07-13 Bean <bean123ch@gmail.com>
6616 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6617 (grub_ext4_extent_header): New structure.
6618 (grub_ext4_extent): Likewise.
6619 (grub_ext4_extent_idx): Likewise.
6620 (grub_ext4_find_leaf): New function.
6621 (grub_ext2_read_block): Handle extents.
6623 2008-07-12 Robert Millan <rmh@aybabtu.com>
6625 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6627 2008-07-11 Robert Millan <rmh@aybabtu.com>
6629 * util/grub.d/40_custom.in: New file. Example on how to add custom
6630 entries to /etc/grub.d.
6631 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6632 40_custom (implicitly, by merging all the grub.d rules).
6634 2008-07-11 Pavel Roskin <proski@gnu.org>
6636 * commands/read.c (grub_getline): Fix invalid memory access.
6637 Don't add newline to the variable value.
6639 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6640 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6641 (serial_hw_get_port): Check validity of the port number.
6642 (grub_cmd_serial): Check return value of serial_hw_get_port().
6644 2008-07-07 Pavel Roskin <proski@gnu.org>
6646 * boot/i386/pc/diskboot.S (notification_string): Replace
6647 "Loading kernel" with just "loading". This is shorter, less
6648 confusing and saves a few bytes for possible future changes.
6650 2008-07-05 Pavel Roskin <proski@gnu.org>
6652 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6653 size for ATAPI devices, they are undefined. Output sector
6654 number in decimal form.
6656 * disk/ata.c: Use named constants for status bits.
6658 2008-07-04 Pavel Roskin <proski@gnu.org>
6660 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6661 grub_addr_t before casting it to the void pointer to fix a
6662 warning. Non-addressable regions are discarded earlier.
6663 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6664 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6665 (check_signature): Don't shadow table_header.
6666 (grub_linuxbios_table_iterate): Cast numeric constants to
6667 grub_linuxbios_table_header_t.
6668 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6671 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6674 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6675 pointer, which can cause warnings. Support 64-bit addresses.
6677 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6678 of sizeof(long). This fixes PowerPC image generation on x86_64.
6680 2008-07-04 Robert Millan <rmh@aybabtu.com>
6682 This fixes a performance issue when pc & gpt partmap iterators
6683 didn't abort iteration even after our hook found what it was
6684 looking for (often causing expensive probes of non-existent drives).
6686 Some callers relied on previous buggy behaviour, since they would
6687 raise an error when their own hooks caused early abortion of its
6690 * kern/device.c (grub_device_open): Improve error message.
6691 * disk/lvm.c (grub_lvm_open): Likewise.
6692 * disk/raid.c (grub_raid_open): Likewise.
6694 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6695 when hook requests it, independently of grub_errno.
6696 (pc_partition_map_probe): Do not fail when find_func() caused
6697 early abortion of pc_partition_map_iterate().
6699 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6700 when hook requests it, independently of grub_errno.
6701 (gpt_partition_map_probe): Do not fail when find_func() caused
6702 early abortion of gpt_partition_map_iterate().
6704 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6705 when hook requests it, independently of grub_errno. Do not fail when
6706 part_map_iterate_hook() caused early abortion of p->iterate().
6708 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6709 when grub_partition_iterate() returned with non-zero.
6711 2008-07-03 Pavel Roskin <proski@gnu.org>
6713 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6714 like we do in grub_ata_pio_read().
6715 (grub_ata_readwrite): Always write individual sectors. Fix the
6716 sector count for the remainder.
6717 (grub_ata_write): Enable writing to ATA devices. Correctly
6718 report error for ATAPI devices.
6720 2008-07-02 Pavel Roskin <proski@gnu.org>
6722 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6725 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6726 for every read sector, we already increment it for the whole
6727 batch. This fixes reading more than 256 sectors at once.
6729 * util/grub-editenv.c (cmd_info): Cast argument to long
6730 explicitly. ptrdiff_t reduces to int on i386.
6732 * util/grub-editenv.c (main): Be specific which parameter is
6735 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6736 (memdisk): Make memdisk_orig_addr a pointer.
6738 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6739 for file offsets, use grub_off_t instead. Fix printf format
6742 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6743 there. Real unexpected warnings should not drown in the noise
6744 about known problems.
6746 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6747 grub_disk_addr_t for memory addresses.
6749 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6750 explicitly to fix a warning.
6752 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6754 * Makefile.in (MODULE_LDFLAGS): New variable.
6755 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6756 the linker accepts --build-id=none.
6757 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6759 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6761 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6762 those in Linux XFS code. Provide a way to access 64-bit parent
6764 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6765 the end of struct grub_xfs_dir_header.
6767 2008-07-02 Bean <bean123ch@gmail.com>
6769 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6770 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6771 and GRUB_IEEE1275_FLAG_NO_ANSI.
6773 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6774 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6775 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6777 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6778 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6780 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6781 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6783 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6784 esc sequence on non ANSI terminal.
6785 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6787 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6790 2008-07-02 Bean <bean123ch@gmail.com>
6792 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6793 (grub_editenv_SOURCES): New variable.
6794 (pkglib_MODULES): Add loadenv.mod.
6795 (loadenv_mod_SOURCES): New variable.
6796 (loadenv_mod_CFLAGS): Likewise.
6797 (loadenv_mod_LDFLAGS): Likewise.
6799 * include/grub/envblk.h: New file.
6801 * util/envblk.c: New file.
6803 * util/grub-editenv.c: New file.
6805 * commands/loadenv.c: New file.
6807 2008-07-01 Pavel Roskin <proski@gnu.org>
6809 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6810 not unsigned char. This fixes warnings and is consistent with
6813 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6815 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6817 * term/tparm.c (analyze): Always set *popcount.
6819 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6820 cast to fix a warning.
6822 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6823 cast to suppress a warning.
6825 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6826 grub_fshelp_read_file() expects.
6828 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6829 write uuid as a 32-bit value in CPU byte order, so declare and
6832 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6833 long if the format specifier expects it.
6834 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6835 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6836 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6837 long to fix a warning.
6838 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6839 grub_dprintf() arguments to fix warnings.
6841 2008-06-30 Pavel Roskin <proski@gnu.org>
6843 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6844 install_bsd_part immediately before core.img is embedded or
6845 modified on disk. This fixes core.img verification if core.img
6848 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6849 core_path to calculate the blocklist.
6850 Patch from Javier MartÃn <lordhabbit@gmail.com>
6852 2008-06-29 Robert Millan <rmh@aybabtu.com>
6854 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6855 block to disk block.
6856 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6857 Patch from Niels Böhm <bitbucket@arcor.de>
6859 2008-06-29 Robert Millan <rmh@aybabtu.com>
6861 * util/update-grub_lib.in (font_path): Search for fonts in
6862 /boot/grub first, which is more likely to be readable (we aren't
6863 deciding where fonts live, just looking for them).
6865 2008-06-26 Pavel Roskin <proski@gnu.org>
6867 * util/biosdisk.c (read_device_map): Don't leave dead map
6868 entries for devices failing stat() check.
6870 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6871 core_path_dev for the core.img path on the target device.
6873 2008-06-26 Robert Millan <rmh@aybabtu.com>
6875 * disk/fs_uuid.c: New file.
6876 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6877 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6878 (fs_uuid_mod_LDFLAGS): New variables.
6879 * include/grub/disk.h (grub_disk_dev_id): Add
6880 `GRUB_DISK_DEVICE_UUID_ID'.
6881 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6882 implement iterate().
6884 2008-06-26 Robert Millan <rmh@aybabtu.com>
6886 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6887 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6888 Linux image includes no initrd.
6890 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
6892 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6893 call to resolve the core image location that effectively appended the
6896 2008-06-21 Robert Millan <rmh@aybabtu.com>
6898 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6901 * util/grub.d/10_hurd.in: ... to here ...
6902 * util/grub.d/10_linux.in: ... and here.
6904 2008-06-19 Robert Millan <rmh@aybabtu.com>
6906 * kern/main.c (grub_main): Export `prefix' variable immediately
6907 after it has been set by grub_machine_set_prefix().
6909 2008-06-19 Robert Millan <rmh@aybabtu.com>
6911 * commands/search.c (search_label, search_fs_uuid, search_file): Print
6912 search result when not saving to variable, not the other way around.
6913 When saving to variable, abort iteration as soon as a match is found.
6915 2008-06-19 Robert Millan <rmh@aybabtu.com>
6917 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6918 check for partition that provides /boot/grub. Its logic is flawed,
6919 as it prevents prepare_grub_to_access_device() from being called
6922 2008-06-19 Robert Millan <rmh@aybabtu.com>
6924 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6925 "insmod" command directly when abstraction modules are needed,
6926 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6927 since it had already been processed).
6929 2008-06-19 Pavel Roskin <proski@gnu.org>
6931 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6932 changed. This is needed in case GRUB_LIBDIR changes.
6933 * conf/i386-ieee1275.rmk: Likewise.
6934 * conf/i386-linuxbios.rmk: Likewise.
6935 * conf/i386-pc.rmk: Likewise.
6936 * conf/powerpc-ieee1275.rmk: Likewise.
6938 2008-06-18 Pavel Roskin <proski@gnu.org>
6940 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6941 kernel_elf_symlist.c to symlist.c for consistency with other
6942 architectures. Update all users.
6943 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6945 2008-06-18 Robert Millan <rmh@aybabtu.com>
6947 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6950 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
6951 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
6952 a RAID device, run setup() for all members independently on whether
6953 LVM abstraction is being used.
6954 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6955 If grub-mkimage has set `*install_dos_part == -2', don't override this
6957 Perform *install_dos_part adjustments independently on whether
6958 we're embedding or not.
6959 Clarify error message when image is too big for embedding.
6960 Remove duplicate *install_dos_part stanza.
6962 2008-06-17 Robert Millan <rmh@aybabtu.com>
6964 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6965 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6967 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6968 values in grub_ofconsole_normal_color and
6969 grub_ofconsole_highlight_color (they're not directly related to
6970 background and foreground).
6971 (grub_ofconsole_setcolorstate): Extract background and foreground
6972 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6974 2008-06-17 Robert Millan <rmh@aybabtu.com>
6976 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6977 /boot/grub for the check in last commit, not /boot (they could be
6978 different partitions).
6980 2008-06-16 Robert Millan <rmh@aybabtu.com>
6982 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6983 asked to setup access for the same partition that provides /boot,
6984 don't bother using UUIDs since our root already has the value we
6987 2008-06-16 Robert Millan <rmh@aybabtu.com>
6989 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6991 Patch from Sven Mueller <sven@debian.org>.
6993 2008-06-16 Robert Millan <rmh@aybabtu.com>
6995 * util/update-grub.in: Check for $EUID instead of $UID.
6996 Reported by Vincent Zweije.
6998 2008-06-16 Bean <bean123ch@gmail.com>
7000 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7001 (grub_ext2_read_block): Likewise.
7002 (grub_ext2_read_inode): Likewise.
7003 (grub_ext2_mount): Likewise.
7004 (grub_ext2_close): Likewise.
7005 (grub_ext3_get_journal): Removed.
7007 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7008 (grub_reiserfs_read_symlink): Likewise.
7009 (grub_reiserfs_mount): Likewise.
7010 (grub_reiserfs_open): Likewise.
7011 (grub_reiserfs_read): Likewise.
7012 (grub_reiserfs_close): Likewise.
7013 (grub_reiserfs_get_journal): Removed.
7015 * fs/fshelp.c (grub_fshelp_read): Removed.
7016 (grub_fshelp_map_block): Likewise.
7018 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7019 (grub_fshelp_journal): Likewise.
7020 (grub_fshelp_read): Likewise.
7021 (grub_fshelp_map_block): Likewise.
7023 2008-06-16 Pavel Roskin <proski@gnu.org>
7025 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7026 floating point anymore.
7027 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7029 2008-06-15 Pavel Roskin <proski@gnu.org>
7031 * commands/ls.c (grub_ls_list_files): Use integer calculations
7032 for human readable format, avoid floating point use.
7033 * kern/misc.c (grub_ftoa): Remove.
7034 (grub_vsprintf): Remove floating point support.
7036 2008-06-15 Robert Millan <rmh@aybabtu.com>
7038 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7040 Reported by Max Vozeler.
7042 2008-06-15 Robert Millan <rmh@aybabtu.com>
7044 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7045 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7047 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7048 the beginning of the prefix.
7050 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7051 It is assumed that if we have a memdisk, grub-mkimage has set
7052 grub_prefix to include the "(memdisk)" drive in it.
7054 2008-06-15 Robert Millan <rmh@aybabtu.com>
7056 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7057 Initialize keyboard controller after registering the terminal, so that
7058 grub_printf() can be called from grub_keyboard_controller_init().
7060 2008-06-15 Robert Millan <rmh@aybabtu.com>
7062 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7063 extent-btree which is written as big endian on disk.
7064 Reported by Alain Greppin <al@chilibi.org>.
7066 2008-06-14 Robert Millan <rmh@aybabtu.com>
7068 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7069 * util/i386/pc/grub-install.in (modules): Likewise.
7071 2008-06-13 Pavel Roskin <proski@gnu.org>
7073 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7075 2008-06-13 Bean <bean123ch@gmail.com>
7077 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7079 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7081 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7082 to indicate sparse block.
7084 2008-06-12 Pavel Roskin <proski@gnu.org>
7086 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7087 number, grub_fshelp_read() does it for us.
7089 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7090 linear disk read with journal translation.
7091 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7092 * include/grub/fshelp.h: Declare grub_fshelp_read().
7094 2008-06-09 Pavel Roskin <proski@gnu.org>
7096 * fs/minix.c (grub_minix_mount): Handle error reading
7099 2008-06-08 Robert Millan <rmh@aybabtu.com>
7101 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7102 don't append the RAID prefix afterwards.
7103 Reported by Clint Adams.
7105 2008-06-08 Robert Millan <rmh@aybabtu.com>
7107 Based on description from Pavel:
7108 * kern/disk.c (grub_disk_check_range): Rename to ...
7109 (grub_disk_adjust_range): ... this. Add a comment explaining the
7110 tasks performed by this function.
7112 2008-06-08 Robert Millan <rmh@aybabtu.com>
7114 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7115 `num_serial' (for consistency with other variables).
7116 (struct grub_ntfs_data): Add `uuid' member.
7117 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7118 (grub_ntfs_uuid): New function.
7119 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7121 2008-06-07 Pavel Roskin <proski@gnu.org>
7123 * util/biosdisk.c (open_device): Revert last change to the
7124 function, it broke installation. The sector needs to be
7125 different dependent on which device is opened.
7127 2008-06-06 Robert Millan <rmh@aybabtu.com>
7129 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7130 rest of GRUB, and breakage doesn't happen if its value were modified.
7132 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7133 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7134 a constant (same value).
7135 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7136 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7138 2008-06-06 Robert Millan <rmh@aybabtu.com>
7140 * util/biosdisk.c (open_device): Do not modify sector offset when
7141 accessing a partition. kern/disk.c already handles this for us.
7143 2008-06-06 Robert Millan <rmh@aybabtu.com>
7145 * util/grub-emu.c (grub_machine_init): Move code in this function from
7147 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7148 segfault in case grub_printf() is called).
7150 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7151 grub_probe. Update all users not to explicitly add it again.
7152 (grub_device): New variable; contains corresponding device for grubdir.
7153 (fs_module, partmap_module, devabstraction_module): Pass
7154 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7157 2008-06-05 Robert Millan <rmh@aybabtu.com>
7159 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7160 is found, print it (same layout as with labels).
7162 2008-06-04 Robert Millan <rmh@aybabtu.com>
7164 * util/biosdisk.c (get_drive): Rename to ...
7165 (find_grub_drive): ... this. Update all users.
7167 (get_os_disk): Rename to ...
7168 (convert_system_partition_to_system_disk): ... this. Update all users.
7170 (find_drive): Rename to ...
7171 (find_system_device): ... this. Update all users.
7173 2008-06-04 Robert Millan <rmh@aybabtu.com>
7175 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7176 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7177 (make_device_map): Likewise.
7179 2008-06-01 Robert Millan <rmh@aybabtu.com>
7181 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7182 before dereferencing it.
7184 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7185 union with fat12/fat16-specific ones. Add some new fields, including
7186 `num_serial' for both versions.
7187 (struct grub_fat_data): Add `uuid' member.
7188 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7189 names. Initialize `data->uuid' using `num_serial'.
7190 (grub_fat_uuid): New function.
7191 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7193 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7194 (grub_reiserfs_uuid): New function.
7195 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7198 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7199 (grub_xfs_uuid): New function.
7200 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7202 2008-06-01 Robert Millan <rmh@aybabtu.com>
7204 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7205 code that is backward compatible with pre-uuid search command.
7207 2008-05-31 Robert Millan <rmh@aybabtu.com>
7209 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7210 floppies after everything else, to ensure floppy drive isn't accessed
7211 unnecessarily (patch from Bean).
7213 2008-05-31 Robert Millan <rmh@aybabtu.com>
7215 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7216 not print device names when we were asked to set a variable.
7218 2008-05-31 Robert Millan <rmh@aybabtu.com>
7220 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7221 using "cursor-on" and "cursor-off" commands (understood at least by
7222 the Open Firmware flavour on OLPC).
7224 2008-05-31 Michael Gorven <michael@gorven.za.net>
7226 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7227 on and off sequences.
7229 2008-05-31 Robert Millan <rmh@aybabtu.com>
7231 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7232 * util/update-grub.in: Likewise.
7234 2008-05-30 Pavel Roskin <proski@gnu.org>
7236 * util/biosdisk.c (linux_find_partition): Simplify logic and
7237 make the code more universal. Keep special processing for
7238 devfs, but use a simple rule for all other devices. If the
7239 device ends with a number, append 'p' and the partition number.
7240 Otherwise, append only the partition number.
7242 2008-05-30 Robert Millan <rmh@aybabtu.com>
7244 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7245 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7246 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7247 the `root' parameter to Linux.
7249 2008-05-30 Robert Millan <rmh@aybabtu.com>
7251 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7252 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7253 --fs_uuid with --fs-uuid.
7254 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7255 all filesystems support them).
7257 2008-05-30 Robert Millan <rmh@aybabtu.com>
7259 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7260 grub_printf() flags, since we're printing in units of 2 bytes.
7262 2008-05-30 Robert Millan <rmh@aybabtu.com>
7264 * util/grub.d/00_header.in: Remove obsolete comment referencing
7265 convert_system_path_to_grub_path().
7266 * util/update-grub.in: Likewise.
7267 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7268 (convert_system_path_to_grub_path): Add a warning message explaining
7269 that this function is deprecated. Rely on is_path_readable_by_grub()
7270 for the readability checks.
7271 (font_path): Use is_path_readable_by_grub() for the readability
7272 check rather than convert_system_path_to_grub_path().
7274 2008-05-30 Robert Millan <rmh@aybabtu.com>
7276 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7277 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7278 converting it first.
7279 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7280 grub.cfg for access to font file, and afterwards call it again to set
7283 2008-05-30 Robert Millan <rmh@aybabtu.com>
7285 * commands/search.c (options): Add --fs_uuid option.
7286 (search_fs_uuid): New function.
7287 (grub_cmd_search): Fix --set argument passing.
7288 Use search_fs_uuid() when requested via --fs_uuid.
7289 (grub_search_init): Update help message.
7290 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7291 and redeclare it as an array of 16-bit words.
7292 (grub_ext2_uuid): New function.
7293 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7294 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7295 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7296 (GRUB_DEVICE_BOOT_UUID): New variables.
7297 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7298 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7300 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7301 just assume `root' variable has the right value.
7302 * util/grub.d/10_linux.in: Likewise.
7303 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7305 (main): Recognise `-t fs_uuid' argument.
7307 2008-05-30 Robert Millan <rmh@aybabtu.com>
7309 * util/biosdisk.c (map): Redefine structure to hold information
7310 about GRUB drive name.
7311 (get_drive): Reimplement without assuming (and verifying) BIOS-like
7313 (call_hook): Remove.
7314 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7315 member. Assume drive has partitions.
7316 (grub_util_biosdisk_open): Access device names via `.device' struct
7318 (open_device): Likewise.
7319 (find_drive): Likewise.
7320 (read_device_map): Adjust map[] usage to match the new struct
7321 definition. Don't check for duplicates (still possible, but not cheap
7323 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7324 (make_device_name): Remove assumption of BIOS-like drive names.
7326 2008-05-30 Pavel Roskin <proski@gnu.org>
7328 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7329 compiling execute.c doesn't need grub_script.tab.h anymore.
7330 (normal/command.c_DEPENDENCIES): Likewise.
7331 (normal/function.c_DEPENDENCIES): Likewise.
7332 * conf/i386-ieee1275.rmk: Likewise.
7333 * conf/i386-linuxbios.rmk: Likewise.
7334 * conf/i386-pc.rmk: Likewise.
7335 * conf/powerpc-ieee1275.rmk: Likewise.
7336 * conf/sparc64-ieee1275.rmk: Likewise.
7338 2008-05-29 Pavel Roskin <proski@gnu.org>
7340 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7341 when scanning metadata for volume group name.
7343 * include/grub/script.h: Don't include grub_script.tab.h. It's
7344 a generated file, which may only be included from the files with
7345 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7346 use union YYSTYPE, as the later allows forward declaration.
7347 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7349 2008-05-29 Robert Millan <rmh@aybabtu.com>
7351 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7352 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7353 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7354 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7357 2008-05-29 Robert Millan <rmh@aybabtu.com>
7359 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7360 control key combinations.
7362 2008-05-29 Robert Millan <rmh@aybabtu.com>
7364 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7365 * util/ieee1275/grub-install.in: ... to here.
7366 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7367 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7368 (grub_install_SOURCES): Likewise.
7370 2008-05-29 Robert Millan <rmh@aybabtu.com>
7372 * fs/affs.c: Update copyright year.
7373 * fs/ext2.c: Likewise.
7374 * fs/fshelp.c: Likewise.
7375 * fs/hfsplus.c: Likewise.
7376 * fs/ntfs.c: Likewise.
7377 * fs/xfs.c: Likewise.
7378 * include/grub/fshelp.h: Likewise.
7379 * util/grub-mkdevicemap.c: Likewise.
7381 2008-05-28 Robert Millan <rmh@aybabtu.com>
7383 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7384 might need to be fatfs to support some firmware implementations
7387 2008-05-28 Robert Millan <rmh@aybabtu.com>
7389 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7391 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7392 (make_device_map): Likewise.
7394 2008-05-20 Bean <bean123ch@gmail.com>
7396 * fs/fshelp.c (grub_fshelp_map_block): New function.
7397 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7398 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7400 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7401 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7402 (grub_fshelp_journal): New structure.
7403 (grub_fshelp_map_block): New function prototype.
7404 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7405 (grub_fshelp_map_block): Likewise.
7407 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7408 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7409 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7410 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7411 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7412 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7413 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7414 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7415 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7416 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7417 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7418 (grub_ext2_sblock): New members for journal support.
7419 (grub_ext3_journal_header): New structure.
7420 (grub_ext3_journal_revoke_header): Likewise.
7421 (grub_ext3_journal_block_tag): Likewise.
7422 (grub_ext3_journal_sblock): Likewise.
7423 (grub_fshelp_node): New members logfile and journal.
7424 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7425 grub_fshelp_map_block to get real block number.
7426 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7428 (grub_ext2_read_inode): Likewise.
7429 (grub_ext3_get_journal): New function.
7430 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7431 (grub_ext2_close): Release memory used by journal.
7433 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7434 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7435 (grub_reiserfs_transaction_header): Renamed to
7436 grub_reiserfs_description_block, replace field data with real_blocks.
7437 (grub_reiserfs_commit_block): New structure.
7438 (grub_reiserfs_data): New member journal.
7439 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7441 (grub_reiserfs_read_symlink): Likewise.
7442 (grub_reiserfs_iterate_dir): Likewise.
7443 (grub_reiserfs_open): Likewise.
7444 (grub_reiserfs_read): Likewise.
7445 (grub_reiserfs_get_journal): New function.
7446 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7447 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7448 using grub_reiserfs_get_journal.
7449 (grub_reiserfs_close): Release memory used by journal.
7451 * fs/affs.c (grub_affs_read_block): Change block type to
7452 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7454 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7456 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7458 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7460 * fs/udf.c (grub_udf_read_block): Change block type to
7461 grub_disk_addr_t. Use type cast to avoid warning.
7463 * fs/xfs.c (grub_xfs_read_block): Likewise.
7465 2008-05-16 Christian Franke <franke@computer.org>
7467 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7468 to ensure that break with ESC will always work.
7469 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7470 Remove ESC from keyboard queue.
7472 2008-05-16 Christian Franke <franke@computer.org>
7474 * util/biosdisk.c: [__CYGWIN__] Add includes.
7475 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7476 (get_os_disk): Move variable declarations to OS specific
7477 parts to avoid warning.
7478 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7479 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7480 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7482 * util/getroot.c: [__CYGWIN__] Add includes.
7483 (strip_extra_slashes): Fix "/" case.
7484 [__CYGWIN__] (get_win32_path): New function.
7485 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7486 [__CYGWIN__] (find_root_device): Disable.
7487 [__CYGWIN__] (get_bootsec_serial): New function.
7488 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7489 [__linux__] (grub_guess_root_device): Add early returns to simplify
7491 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7492 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7493 check for Linux only.
7495 2008-05-15 Bean <bean123ch@gmail.com>
7497 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7498 keyboard hang problem in apple's intel mac.
7500 2008-05-09 Robert Millan <rmh@aybabtu.com>
7502 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7504 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7505 (make_device_map): Likewise.
7506 Reported by Aurelien Jarno <aurel32@debian.org>
7508 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
7510 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7511 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7512 (make_device_map): Output entries for xvd type disks.
7514 2008-05-07 Robert Millan <rmh@aybabtu.com>
7516 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7518 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7519 (make_device_map): Likewise.
7520 Reported by Roland Dreier <rdreier@cisco.com>
7522 2008-05-07 Robert Millan <rmh@aybabtu.com>
7524 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7525 grub_strstr() call. Correct a few mistakes in failure path handling.
7527 2008-05-06 Robert Millan <rmh@aybabtu.com>
7529 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7530 Do not print a trailing slash (therefore, the root directory is an
7532 (convert_system_path_to_grub_path): Do not remove trailing slash
7533 from make_system_path_relative_to_its_root() output.
7535 * util/i386/pc/grub-install.in: Add trailing slash to output from
7536 make_system_path_relative_to_its_root().
7538 2008-05-06 Robert Millan <rmh@aybabtu.com>
7540 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7541 ensures that output lines aren't intermangled with those sent to
7542 stderr (via grub_util_info()).
7543 * util/grub-probe.c (grub_refresh): Likewise.
7544 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7546 2008-05-05 Christian Franke <franke@computer.org>
7548 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7549 Add Cygwin device names.
7550 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7551 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7552 (check_device): Return error instead of success on empty name.
7553 (make_device_map): Move label inside linux specific code to
7554 prevent compiler warning.
7556 2008-04-30 Robert Millan <rmh@aybabtu.com>
7558 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7559 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7561 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7563 2008-04-29 Robert Millan <rmh@aybabtu.com>
7565 * docs/grub.cfg: New file (example GRUB configuration).
7567 2008-04-26 Robert Millan <rmh@aybabtu.com>
7569 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7570 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7571 and `disk/ieee1275/nand.c'.
7573 2008-04-25 Bean <bean123ch@gmail.com>
7575 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7578 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7579 change the buffer size to 4096 for cdrom device.
7581 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7583 (_linux_mod_SOURCES): New variable.
7584 (_linux_mod_CFLAGS): Likewise.
7585 (_linux_mod_LDFLAGS): Likewise.
7586 (linux_mod_SOURCES): Likewise.
7587 (linux_mod_CFLAGS): Likewise.
7588 (linux_mod_LDFLAGS): Likewise.
7589 (nand_mod_SOURCES): Likewise.
7590 (nand_mod_CFLAGS): Likewise.
7591 (nand_mod_LDFLAGS): Likewise.
7593 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7594 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7595 type property. (nand device in olpc don't have this property)
7597 * include/grub/disk.h (grub_disk_dev_id): New macro
7598 GRUB_DISK_DEVICE_NAND_ID.
7600 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7602 (grub_rescue_cmd_initrd): Likewise.
7604 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7605 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7606 ofw_cif_handler and ofw_idt, adjust padding number.
7608 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7609 GRUB_MACHINE_IEEE1275 is defined.
7611 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7612 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7614 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7615 on nested function heap_init.
7616 (grub_upper_mem): New variable for i386-ieee1275.
7617 (grub_get_extended_memory): New function for i386-ieee1275.
7618 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7620 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7621 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7624 * loader/i386/ieee1275/linux.c: New file.
7626 * loader/i386/ieee1275/linux_normal.c: New file.
7628 * disk/ieee1275/nand.c: New file.
7630 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7632 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7634 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7636 2008-04-18 Robert Millan <rmh@aybabtu.com>
7638 Restructures early code path on ieee1275 to unify grub_main() as
7639 the first C function that is executed in every platform.
7641 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7642 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7644 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7645 * kern/ieee1275/cmain.c (cmain): Rename to ...
7646 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7647 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7650 2008-04-18 Robert Millan <rmh@aybabtu.com>
7652 * util/update-grub.in: Fix syntax error when setting
7653 `GRUB_PRELOAD_MODULES'.
7654 Reported by Stephane Chazelas <stephane@artesyncp.com>
7656 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7658 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7659 section into account, newer toolchains generate unique build ids
7660 * configure.ac: remove the test for --build-id=none acceptance,
7661 we want build ids to be preserved
7662 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7663 far from other sections don't cause the raw binary images grow
7666 2008-04-15 Robert Millan <rmh@aybabtu.com>
7668 * disk/lvm.c: Update copyright year.
7669 * kern/misc.c: Likewise.
7671 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7673 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7674 there is no memory left for physical volume name.
7676 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7678 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7679 volume name mapping to support bigger than 9 character names properly.
7681 2008-04-13 Robert Millan <rmh@aybabtu.com>
7683 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7684 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7686 2008-04-13 Christian Franke <franke@computer.org>
7688 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7689 to create a floppy emulation boot CD when non emulation mode
7691 Enable Joliet CD filesystem extension.
7693 2008-04-13 Robert Millan <rmh@aybabtu.com>
7695 * kern/misc.c (grub_strncat): Fix off-by-one error.
7696 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7698 * kern/env.c (grub_env_context_close): Clear current context, not
7700 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7702 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7704 2008-04-13 Robert Millan <rmh@aybabtu.com>
7706 Improve robustness when handling LVM.
7708 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7709 (and leave `*p' unmodified).
7710 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7712 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7713 iterating through it.
7714 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7716 (grub_lvm_scan_device): Check the return value (and fail gracefully
7717 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7718 Don't assume `vg->pvs != NULL' when iterating through it.
7720 2008-04-13 Robert Millan <rmh@aybabtu.com>
7722 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7723 * genmk.rb (partmap): New variable.
7724 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7725 (#{partmap}): New target rule.
7726 * genpartmaplist.sh: New file.
7727 * Makefile.in (pkglib_DATA): Add partmap.lst.
7728 (partmap.lst): New target rule.
7729 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7730 modules (including all partition maps), instead of preloading them.
7732 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7734 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7735 `linux-boot-prober' (if installed) to detect other operating
7736 systems which are installed on the computer and add them to
7738 * conf/common.rmk: Build and install 30_os-prober.
7740 2008-04-12 Robert Millan <rmh@aybabtu.com>
7742 * kern/powerpc/ieee1275/init.c: Move from here ...
7743 * kern/ieee1275/init.c: ... to here. Update all users.
7745 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7746 * kern/ieee1275/cmain.c: ... to here. Update all users.
7748 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7749 * kern/ieee1275/openfw.c: ... to here. Update all users.
7751 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7752 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7754 2008-04-10 Pavel Roskin <proski@gnu.org>
7756 * configure.ac: Always use "_cv_" in cache variables for
7757 compatibility with Autoconf 2.62.
7759 2008-04-07 Robert Millan <rmh@aybabtu.com>
7761 Revert grub/machine/init.h addition by Pavel (since it breaks on
7762 i386-ieee1275 and others):
7763 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7764 * util/powerpc/ieee1275/misc.c: Likewise.
7766 2008-04-07 Robert Millan <rmh@aybabtu.com>
7768 * util/grub-probe.c (probe): Improve error message.
7770 2008-04-07 Robert Millan <rmh@aybabtu.com>
7772 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7773 (this prevents the presence of a bogus entry from ruining the whole
7776 2008-04-06 Pavel Roskin <proski@gnu.org>
7778 * util/biosdisk.c: Include grub/util/biosdisk.h.
7779 * util/grub-fstest.c (execute_command): Make static.
7780 * util/grub-mkdevicemap.c (check_device): Likewise.
7781 * util/i386/pc/misc.c: Include grub/machine/init.h.
7782 * util/powerpc/ieee1275/misc.c: Likewise.
7783 * util/lvm.c: Include grub/util/lvm.h.
7784 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7786 * util/raid.c: Include grub/util/raid.h.
7787 (grub_util_getdiskname): Make static.
7789 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7790 grub_hostfs_fini(), as they are called from grub_init_all() and
7791 grub_fini_all() respectively. This fixes an infinite loop in
7792 grub-fstest due to double registration of hostfs.
7793 Reported by Christian Franke <Christian.Franke@t-online.de>
7795 2008-04-05 Pavel Roskin <proski@gnu.org>
7797 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7798 all 8 functions. Otherwise, probe function 0 only.
7800 2008-04-04 Pavel Roskin <proski@gnu.org>
7802 * commands/lspci.c (grub_lspci_iter): Print the bus number
7805 * commands/lspci.c (grub_pci_classes): Fix typos.
7806 (grub_lspci_iter): Don't print func twice. Print vendor ID
7807 before device ID, as it's normally done.
7809 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7810 Fix signedness warnings.
7811 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7813 * util/ieee1275/get_disk_name.c: Include config.h so that
7814 _GNU_SOURCE is defined and getline() is declared. Mark an
7815 unused argument as such. Fix a signedness warning.
7817 2008-04-02 Pavel Roskin <proski@gnu.org>
7819 * genkernsyms.sh.in: Use more robust assignments for CC and
7820 srcdir. Quote srcdir.
7821 * gensymlist.sh.in: Likewise. Assert at the compile time that
7822 the symbol table is not empty.
7824 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7825 * fs/cpio.c (grub_cpio_read): Likewise.
7827 2008-04-01 Pavel Roskin <proski@gnu.org>
7829 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7830 * disk/host.c (grub_host_open): Likewise.
7831 * disk/loopback.c (grub_loopback_open): Likewise.
7832 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7833 disk->id as in disk/host.c, not a multi-character constant.
7835 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7836 later is obsolete, potentially dangerous and sets a bad example.
7837 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7838 * util/misc.c (grub_util_get_image_size): Likewise.
7840 * disk/loopback.c (options): Improve help for "--partitions".
7842 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7843 options to align them with the short options, e.g. "echo -e".
7845 2008-03-31 Bean <bean123ch@gmail.com>
7847 * video/reader/png.c (grub_png_data): New member is_16bit and
7849 (grub_png_decode_image_header): Detect 16 bit png image.
7850 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7851 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7852 (grub_video_reader_png): Release memory occupied by image_data.
7854 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7856 (grub_nfs_mount): Skip the test for sector per cluster.
7858 * include/grub/ntfs.h (MAX_SPC): Removed.
7860 2008-03-31 Bean <bean123ch@gmail.com>
7862 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7863 (grub_probe_SOURCES): Add fs/afs.c.
7864 (grub_fstest_SOURCES): Likewise.
7865 (afs_mod_SOURCES): New variable.
7866 (afs_mod_CFLAGS): Likewise.
7867 (afs_mod_LDFLAGS): Likewise.
7869 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7870 (grub_emu_SOURCES): Likewise.
7872 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7874 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7876 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7878 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7880 * fs/afs.c: New file.
7882 2008-03-30 Pavel Roskin <proski@gnu.org>
7884 * disk/host.c: Include grub/misc.h to fix a warning.
7885 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7886 warnings about implicit declarations.
7888 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7890 * include/grub/i386/loader.h: Change declaration of
7891 grub_linux_boot() to match what grub_loader_set() expects.
7892 * util/getroot.c (grub_guess_root_device): Return const char* to
7894 * util/grub-probe.c (probe): Fix a warning about uninitialized
7895 abstraction_name variable.
7896 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7897 second argument as unused to fix a warning.
7899 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7900 missing grub_error() call.
7902 * util/update-grub_lib.in: Define datarootdir, since Autoconf
7903 2.60 and newer uses it to define datadir.
7905 * commands/sleep.c: Fix warning about implicit declaration.
7906 * disk/memdisk.c: Likewise.
7907 * loader/aout.c: Likewise.
7908 * loader/i386/bsd_normal.c: Likewise.
7909 * util/grub-probe.c: Likewise.
7911 * commands/i386/cpuid.c (has_longmode): Make static.
7912 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7913 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7915 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7916 GDT. This is more robust, as %ds can change.
7917 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7918 calling real_to_prot().
7919 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7921 2008-03-28 Pavel Roskin <proski@gnu.org>
7923 * kern/i386/pc/startup.S: Assert that uncompressed functions
7924 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7925 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7926 code, as they push parts of the code (error handlers) beyond
7927 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
7928 code as correctness and size.
7930 2008-03-28 Pavel Roskin <proski@gnu.org>
7932 * kern/i386/pc/startup.S
7933 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7934 data block address to the real mode, keep offset minimal. This
7935 works around a bug in AWARD BIOS on old Athlon systems, which
7936 makes CD detection hang.
7938 2008-03-26 Pavel Roskin <proski@gnu.org>
7940 * normal/color.c (grub_parse_color_name_pair): Make `name' a
7942 * include/grub/normal.h: Add grub_parse_color_name_pair()
7945 2008-03-24 Bean <bean123ch@gmail.com>
7947 * disk/i386/pc/biosdisk.c (cd_start): Removed.
7948 (cd_count): Removed.
7949 (cd_drive): New variable.
7950 (grub_biosdisk_get_drive): Don't check for (cdN) device.
7951 (grub_biosdisk_call_hook): Likewise.
7952 (grub_biosdisk_iterate): Change cdrom detection method.
7953 (grub_biosdisk_open): Replace cd_start with cd_drive.
7954 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7955 detect cdrom device.
7957 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7959 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7960 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7961 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7962 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7963 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7964 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7965 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7966 (grub_biosdisk_cdrp): New structure.
7967 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7969 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7971 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7974 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7977 2008-03-20 Robert Millan <rmh@aybabtu.com>
7979 Remove 2 TiB limit in ata.mod.
7980 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7981 (grub_ata_dumpinfo): Print sector count with 0x%llx.
7982 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7983 grub_uint64_t instead of grub_uint32_t.
7985 2008-03-05 Bean <bean123ch@gmail.com>
7987 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7988 (grub_multiboot): Set boot device.
7990 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7992 2008-03-02 Bean <bean123ch@gmail.com>
7994 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7997 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
7999 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8002 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8005 * docs/fdl.texi: New file.
8007 * docs/mdate-sh: New file. Copied from gnulib.
8008 * docs/texinfo.tex: Likewise.
8010 * config.guess: Updated from gnulib.
8011 * install-sh: Likewise.
8013 2008-02-28 Robert Millan <rmh@aybabtu.com>
8015 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8016 (aout_mod_SOURCES): New variable.
8017 (aout_mod_CFLAGS): Likewise.
8018 (aout_mod_LDFLAGS): Likewise.
8020 * conf/i386-ieee1275.rmk: Likewise.
8022 2008-02-28 Robert Millan <rmh@aybabtu.com>
8024 * util/update-grub.in: Reorganise terminal validity check. Accept
8025 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8026 Based on suggestion by Franklin PIAT.
8028 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8030 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8032 * util/getroot.c (grub_util_check_block_device): New function that
8033 returns the given argument if it is a block device and returns NULL else.
8034 * util/grub-probe.c (argument_is_device): New variable.
8035 (probe): Promote device_name from a variable to an argument. Receive
8036 device_name from grub_util_check_block_device() if path is NULL and from
8037 grub_guess_root_device() else. Do not free() device_name anymore.
8038 (options): Introduce new parameter '-d, --device'.
8039 (main): Add description of the new parameter to the help screen.
8040 Rename path variable to argument. Set argument_is_device if the '-d'
8041 option is given. Pass argument to probe() depending on
8044 2008-02-24 Bean <bean123ch@gmail.com>
8046 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8047 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8048 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8049 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8050 (GRUB_ISO9660_VOLDESC_END): Likewise.
8051 (grub_iso9660_primary_voldesc): New member escape.
8052 (grub_iso9660_data): New member joliet.
8053 (grub_iso9660_convert_string): New function.
8054 (grub_iso9660_mount): Detect joliet extension.
8055 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8056 (grub_iso9660_iso9660_label): Likewise.
8058 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8059 (grub_setup_SOURCES): Add fs/udf.c.
8060 (grub_fstest_SOURCES): Likewise.
8061 (udf_mod_SOURCES): New variable.
8062 (udf_mod_CFLAGS): Likewise.
8063 (udf_mod_LDFLAGS): Likewise.
8065 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8066 (grub_emu_SOURCES): Likewise.
8068 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8070 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8072 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8074 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8076 * fs/udf.c: New file.
8078 2008-02-24 Robert Millan <rmh@aybabtu.com>
8080 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8081 (normal/lexer.c_DEPENDENCIES): New variables.
8082 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8083 (normal/lexer.c_DEPENDENCIES): Likewise.
8084 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8085 (normal/lexer.c_DEPENDENCIES): Likewise.
8086 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8087 (normal/lexer.c_DEPENDENCIES): Likewise.
8088 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8089 (normal/lexer.c_DEPENDENCIES): Likewise.
8090 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8091 (normal/lexer.c_DEPENDENCIES): Likewise.
8093 2008-02-23 Robert Millan <rmh@aybabtu.com>
8095 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8096 since they were intended to be in hex. This didn't break previously
8097 because of a bug in gpt_partition_map_iterate() (see below).
8099 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8100 when checking the validity of GPT header.
8101 Remove `partno', since it always provides the same information as `i'.
8103 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8105 * include/grub/efi/time.h: Fix a wrong comment.
8107 2008-02-19 Pavel Roskin <proski@gnu.org>
8109 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8112 2008-02-19 Bean <bean123ch@gmail.com>
8114 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8115 (aout_mod_SOURCES): New variable.
8116 (aout_mod_CFLAGS): Likewise.
8117 (aout_mod_LDFLAGS): Likewise.
8118 (_bsd_mod_SOURCES): New variable.
8119 (_bsd_mod_CFLAGS): Likewise.
8120 (_bsd_mod_LDFLAGS): Likewise.
8121 (bsd_mod_SOURCES): New variable.
8122 (bsd_mod_CFLAGS): Likewise.
8123 (bsd_mod_LDFLAGS): Likewise.
8125 * include/grub/aout.h: New file.
8127 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8129 * include/grub/i386/bsd.h: New file.
8131 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8134 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8135 function is called, so that it's possible to change it inside the hook.
8136 (grub_elf64_load): Likewise.
8137 (grub_elf_file): Don't close the file if elf header is not found.
8138 (grub_elf_close): Close the file if grub_elf_file fails (The new
8139 grub_elf_file won't close it).
8140 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8141 (grub_elf64_size): Likewise.
8143 * kern/i386/loader.S (grub_unix_real_boot): New function.
8145 * loader/aout.c: New file.
8147 * loader/i386/bsd.c: New file.
8149 * loader/i386/bsd_normal.c: New file.
8151 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8153 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8154 can test other formats.
8156 2008-02-19 Robert Millan <rmh@aybabtu.com>
8158 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8159 (grub_gpt_partition_type_empty): Redefine with macro from
8160 `<grub/gpt_partition.h>'.
8161 (gpt_partition_map_iterate): Adjust partition type comparison.
8163 Export `entry' as partmap-specific `part.data' struct.
8164 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8166 * include/grub/gpt_partition.h (grub_gpt_header)
8167 (grub_gpt_partentry): ... to here (new file).
8169 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8171 (grub_gpt_partition_type_bios_boot): New const variable, defined
8172 with macro from `<grub/gpt_partition.h>'.
8174 (setup): Replace `first_start' with `embed_region', which keeps
8175 track of the embed region (and is partmap-agnostic).
8177 Replace find_first_partition_start() with find_usable_region(),
8178 which finds a usable region for embedding using partmap-specific
8179 knowledge (supports PC/MSDOS and GPT).
8181 Fix all assumptions that the embed region start at sector 1, using
8182 `embed_region.start' from now on. Similarly, use `embed_region.end'
8183 rather than `first_start' to calculate available size.
8185 In grub_util_info() message, replace "into after the MBR" with an
8186 indication of the specific sector our embed region starts at.
8188 2008-02-19 Robert Millan <rmh@aybabtu.com>
8190 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8191 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8192 `commands/reboot.c'.
8193 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8194 (halt_mod_SOURCES): Likewise.
8195 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8196 (halt_mod_SOURCES): Likewise.
8198 2008-02-17 Christian Franke <franke@computer.org>
8200 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8202 2008-02-17 Robert Millan <rmh@aybabtu.com>
8204 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8205 set `first_start' to 0 for non-PC/MSDOS partition maps.
8207 2008-02-16 Robert Millan <rmh@aybabtu.com>
8209 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8210 do not assume partition map is PC/MSDOS before performing checks that
8211 are specific to that layout.
8213 2008-02-13 Robert Millan <rmh@aybabtu.com>
8215 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8216 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8217 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8219 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8221 * configure.ac: Only a cosmetic change on the handling of
8222 -fno-stack-protector.
8224 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
8226 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8227 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8229 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8230 (halt_mod_SOURCES): New variable.
8231 (halt_mod_CFLAGS): Likewise.
8232 (halt_mod_LDFLAGS): Likewise.
8233 (reboot_mod_SOURCES): Likewise.
8234 (reboot_mod_CFLAGS): Likewise.
8235 (reboot_mod_LDFLAGS): Likewise.
8237 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8238 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8240 (halt_mod_SOURCES): Likewise.
8241 (reboot_mod_SOURCES): Likewise.
8243 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8244 commands/i386/pc/reboot.c by commands/reboot.c.
8245 (reboot_mod_SOURCES): Likewise.
8247 * commands/i386/pc/reboot.c: merge this file ...
8249 * commands/ieee1275/reboot.c: ... and this file ...
8251 * commands/reboot.c: ... to this file.
8252 Add some precompiler directive to include the correct header for
8255 * commands/ieee1275/halt.c: move this file ...
8257 * commands/halt.c: ... to here.
8258 Add some precompiler directive to include the correct header for
8261 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8262 (grub_halt): Likewise.
8264 * kern/efi/efi.c (grub_reboot): New function.
8265 (grub_halt): Likewise.
8267 2008-02-12 Robert Millan <rmh@aybabtu.com>
8269 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8270 /dev (like it is done for /dev/mapper). This doesn't provide support
8271 for EVMS, but at least it is now easy to identify the problem when it
8274 2008-02-11 Robert Millan <rmh@aybabtu.com>
8276 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8277 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8278 comparing it with -1, not 0.
8280 2008-02-10 Robert Millan <rmh@aybabtu.com>
8282 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8284 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8285 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8287 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8288 `disk/lvm.c' to the end of the list.
8289 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8290 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8292 2008-02-10 Robert Millan <rmh@aybabtu.com>
8294 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8295 grub_print_error() instead. This will let user know why we're entering
8297 Based on suggestions from Sam Morris.
8299 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
8301 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8302 on remaining N args, instead of "--" arg N times.
8304 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8306 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8307 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8308 pattern for unknown glyphs.
8310 2008-02-09 Robert Millan <rmh@aybabtu.com>
8312 * configure.ac: Probe for `help2man'.
8313 * Makefile.in (builddir): New variable.
8314 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8315 or otherwise add a few flags/options to it.
8316 (install-local): For every executable utility or script that is
8317 installed, invoke $(HELP2MAN) to install a manpage based on --help
8320 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8321 that it doesn't prevent --help from working in build tree.
8323 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8324 with `bug-grub@gnu.org'.
8325 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8326 * util/update-grub.in (usage): New function.
8327 Implement proper argument check, with support for --help and --version
8328 (as well as existing -y).
8330 2008-02-09 Christian Franke <franke@computer.org>
8332 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8333 avoid overwriting previous output.
8334 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8336 2008-02-09 Robert Millan <rmh@aybabtu.com>
8338 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8341 2008-02-09 Robert Millan <rmh@aybabtu.com>
8343 * commands/sleep.c: New file.
8344 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8345 (sleep_mod_SOURCES): New variable.
8346 (sleep_mod_CFLAGS): Likewise.
8347 (sleep_mod_LDFLAGS): Likewise.
8349 2008-02-09 Robert Millan <rmh@aybabtu.com>
8351 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8352 situations in which we can deduce the RAID size and the superblock
8355 2008-02-09 Robert Millan <rmh@aybabtu.com>
8357 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8358 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8359 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8361 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8362 and return a grub_diskmemberlist_t composed of physical array members.
8363 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8365 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8367 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8368 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8369 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8371 * util/grub-probe.c (probe): Move partmap probing code from here ...
8372 (probe_partmap): ... to here.
8373 (probe): Use probe_partmap() once for the disk we're probing, and
8374 additionally, when such disk contains a memberlist() struct member,
8375 once for each disk that is contained in the structure returned by
8378 2008-02-09 Robert Millan <rmh@aybabtu.com>
8380 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8381 environment variable to 'all' in order to obtain debug output from
8383 * util/i386/pc/grub-setup.c (main): Likewise.
8385 2008-02-08 Robert Millan <rmh@aybabtu.com>
8387 * disk/raid.c (grub_raid_scan_device): Check for
8388 `array->device[sb.this_disk.number]' rather than for
8389 `array->device[sb.this_disk.number]->name', since the latter is not
8390 guaranteed to be accessible.
8392 2008-02-08 Robert Millan <rmh@aybabtu.com>
8394 * disk/raid.c: Update copyright.
8395 * fs/cpio.c: Likewise.
8396 * include/grub/raid.h: Likewise.
8397 * loader/i386/pc/multiboot.c: Likewise.
8398 * util/hostfs.c: Likewise.
8400 2008-02-08 Robert Millan <rmh@aybabtu.com>
8402 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8403 to a grub_disk_t array.
8404 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8406 (grub_raid_scan_device): Replace `device[x].name' accesses with
8407 `device[x]->name'. Simplify initialization of `array->device[x]'.
8409 2008-02-08 Robert Millan <rmh@aybabtu.com>
8411 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8412 grub_dprintf() calls.
8413 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8416 2008-02-07 Christian Franke <franke@computer.org>
8418 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8419 instead of fseek and ftell to support large files.
8420 (grub_hostfs_read): Likewise.
8422 2008-02-07 Robert Millan <rmh@aybabtu.com>
8424 Patch from Jeroen Dekkers.
8425 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8426 failure, since successfully reading all array members might not be
8429 2008-02-06 Robert Millan <rmh@aybabtu.com>
8431 * util/grub-probe.c (probe): Simplify partmap probing (with the
8432 assumption that the first word up to the underscore equals to
8435 2008-02-06 Christian Franke <franke@computer.org>
8437 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8438 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8439 last block of a cpio or tar stream.
8440 Check for "TRAILER!!!" instead of any empty data
8441 block to detect last block of a cpio stream.
8442 (grub_cpio_dir): Fix constness of variable np.
8443 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8444 cpio or tar trailer is detected. This fixes a crash
8445 on open of a non existing file.
8447 2008-02-05 Bean <bean123ch@gmail.com>
8449 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8451 (grub_multiboot_load_elf64): Likewise.
8452 (grub_multiboot): Initialize mbi structure.
8454 * util/grub-fstest.c: Don't include unused header file script.h.
8456 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8458 (grub_fstest_SOURCES): Likewise.
8460 2008-02-05 Robert Millan <rmh@aybabtu.com>
8462 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8463 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8464 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8465 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8467 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8468 (translation_table): Replace hardcoded values with macros
8469 provided by `<grub/term.h>'.
8471 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8472 (keyboard_map): Correct/add a few values, with macros provided
8474 (keyboard_map_shift): Zero values that don't differ from their
8475 `keyboard_map' equivalents.
8476 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8477 Discard the second scan code that is always sent by Caps lock.
8478 Only use `keyboard_map_shift' when it provides a non-zero value,
8479 otherwise fallback to `keyboard_map'.
8481 2008-02-04 Bean <bean123ch@gmail.com>
8483 * Makefile.in (enable_grub_fstest): New variable.
8485 * conf/common.rmk (grub_fstest_init.lst): New rule.
8486 (grub_fstest_init.h): Likewise.
8487 (grub_fstest_init.c): Likewise.
8488 (util/grub-fstest.c_DEPENDENCIES): New variable.
8489 (grub_fstest_SOURCES): Likewise.
8491 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8493 * util/grub-fstest.c: New file.
8495 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8497 Make grub-setup handle a separate root device.
8499 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8500 so that the root device can be compared with the destination
8502 When embedding the core image, if the root and destination devices
8503 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8505 When not embedding, set ROOT_DRIVE to 0xFF.
8507 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8509 Add support for having a grub directory in a different drive. This
8510 is still only the data handling part.
8512 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8513 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8514 (grub_root_drive): New variable.
8516 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8517 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8518 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8521 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8523 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8525 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8527 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8528 is bogus, because PXE booting does not specify any drive
8531 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8532 am not sure if this is really correct.
8534 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8535 is always identical to the boot drive when booting from a CD.
8537 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8539 (root_drive): New variable.
8540 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8541 (setup_sectors): Push %dx right after popping it, because %dh will
8543 (copy_buffer): Restore %dx.
8545 2008-02-03 Robert Millan <rmh@aybabtu.com>
8547 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8548 use `cdboot.img' for cdrom images.
8550 2008-02-03 Robert Millan <rmh@aybabtu.com>
8552 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8553 only setup gfxterm when `font' command has succeeded.
8555 2008-02-03 Robert Millan <rmh@aybabtu.com>
8557 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8558 (grub_rescue_cmd_multiboot_loader)
8559 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8561 2008-02-03 Pavel Roskin <proski@gnu.org>
8563 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8564 %edx and %esi from stack only after grub_gate_a20() is called.
8565 grub_gate_a20() clobbers %edx.
8567 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8569 * configure.ac (AC_INIT): Bumped to 1.96.
8571 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8572 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8573 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8574 video/readers/png.c.
8576 2008-02-03 Bean <bean123ch@gmail.com>
8578 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8579 (cdboot_img_SOURCES): New variable.
8580 (cdboot_img_ASFLAGS): New variable.
8581 (cdboot_img_LDFLAGS): New variable.
8583 * boot/i386/pc/cdboot.S: New file.
8585 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8586 (cd_count): Likewise.
8587 (grub_biosdisk_get_drive): Add support for cd device.
8588 (grub_biosdisk_call_hook): Likewise.
8589 (grub_biosdisk_iterate): Likewise.
8590 (grub_biosdisk_open): Likewise.
8591 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8592 (grub_biosdisk_rw): Support reading from cd device.
8593 (GRUB_MOD_INIT): Iterate cd devices.
8595 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8596 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8597 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8599 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8601 2008-02-02 Robert Millan <rmh@aybabtu.com>
8603 * commands/read.c: New file.
8604 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8605 (read_mod_SOURCES): New variable.
8606 (read_mod_CFLAGS): Likewise.
8607 (read_mod_LDFLAGS): Likewise.
8609 2008-02-02 Robert Millan <rmh@aybabtu.com>
8611 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8612 determining whether menu has to be displayed.
8614 2008-02-02 Marco Gerards <marco@gnu.org>
8616 * bus/pci.c: New file.
8618 * include/grub/pci.h: Likewise.
8620 * include/grub/i386/pc/pci.h: Likewise.
8622 * commands/lspci.c: Likewise.
8624 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8626 (pci_mod_SOURCES): New variable.
8627 (pci_mod_CFLAGS): Likewise.
8628 (pci_mod_LDFLAGS): Likewise.
8629 (lspci_mod_SOURCES): Likewise.
8630 (lspci_mod_CFLAGS): Likewise.
8631 (lspci_mod_LDFLAGS): Likewise.
8633 2008-02-02 Bean <bean123ch@gmail.com>
8635 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8636 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8638 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8639 (grub_xfs_btree_node): New structure.
8640 (grub_xfs_btree_root): New structure.
8641 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8642 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8643 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8644 (GRUB_XFS_EXTENT_SIZE): Likewise.
8645 (grub_xfs_read_block): Support btree format type.
8646 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8647 Use directory block as basic unit.
8649 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8651 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8652 __attribute__ ((__regparm__ (1))).
8654 2008-02-01 Robert Millan <rmh@aybabtu.com>
8656 Correct a mistake in previous commit.
8658 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8660 (normal/command.c_DEPENDENCIES): New variable.
8662 2008-02-01 Robert Millan <rmh@aybabtu.com>
8664 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8666 (normal/command.c_DEPENDENCIES): New variable.
8667 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8668 * conf/i386-ieee1275.rmk: Likewise.
8669 * conf/i386-linuxbios.rmk: Likewise.
8670 * conf/i386-pc.rmk: Likewise.
8671 * conf/sparc64-ieee1275.rmk: Likewise.
8672 * conf/powerpc-ieee1275.rmk: Likewise.
8673 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8675 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8677 2008-02-01 Robert Millan <rmh@aybabtu.com>
8679 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8680 call at beginning of function.
8682 2008-01-31 Pavel Roskin <proski@gnu.org>
8684 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8685 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8686 (grub_mkrescue_SOURCES): Likewise.
8687 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8689 2008-01-30 Robert Millan <rmh@aybabtu.com>
8691 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8692 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8693 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8694 (grub_probe_SOURCES): ... to here.
8696 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8697 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8698 * conf/i386-ieee1275.rmk: Likewise.
8699 * conf/i386-linuxbios.rmk: Likewise.
8700 * conf/powerpc-ieee1275.rmk: Likewise.
8702 2008-01-30 Tristan Gingold <gingold@free.fr>
8704 * kern/rescue.c: Silently accept empty lines.
8706 2008-01-29 Bean <bean123ch@gmail.com>
8708 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8709 (real_code_2): Code cleanup and change comment style.
8710 (move_memory): Avoid using 32-bit address mode.
8712 2008-01-29 Bean <bean123ch@gmail.com>
8714 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8715 (png_mod_SOURCES): New variable.
8716 (png_mod_CFLAGS): Likewise.
8717 (png_mod_LDFLAGS): Likewise.
8719 * video/readers/png.c: New file.
8721 2008-01-28 Robert Millan <rmh@aybabtu.com>
8723 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8724 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8725 `ifndef GRUB_MOD_GAP' hack.
8726 * util/elf/grub-mkimage.c (add_segments): Likewise.
8728 2008-01-27 Robert Millan <rmh@aybabtu.com>
8730 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8731 `GRUB_MOD_GAP' for platforms in which it's not defined.
8732 * util/elf/grub-mkimage.c (add_segments): Likewise.
8734 2008-01-27 Robert Millan <rmh@aybabtu.com>
8736 Get grub-emu to build again (including parallel builds).
8738 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8740 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8741 (normal/execute.c_DEPENDENCIES): ... this, ...
8742 (grub-emu_DEPENDENCIES): ... and this.
8744 * conf/i386-efi.rmk: Likewise.
8745 * conf/i386-linuxbios.rmk: Likewise.
8746 * conf/i386-ieee1275.rmk: Likewise.
8747 * conf/powerpc-ieee1275.rmk: Likewise.
8748 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8750 2008-01-27 Robert Millan <rmh@aybabtu.com>
8752 * NEWS: Add a few items.
8754 2008-01-27 Robert Millan <rmh@aybabtu.com>
8756 Fix parallel builds with grub-emu. Based on earlier commit for
8757 grub-probe and grub-setup.
8759 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8760 (util/grub-emu.c_DEPENDENCIES): ... this.
8761 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8762 (util/grub-emu.c_DEPENDENCIES): ... this.
8763 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8764 (util/grub-emu.c_DEPENDENCIES): ... this.
8765 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8766 (util/grub-emu.c_DEPENDENCIES): ... this.
8767 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8768 (util/grub-emu.c_DEPENDENCIES): ... this.
8770 2008-01-27 Pavel Roskin <proski@gnu.org>
8772 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8773 to create a gap between _end and the modules added to the image
8774 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8775 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8776 * util/elf/grub-mkimage.c (add_segments): Likewise.
8778 2008-01-26 Pavel Roskin <proski@gnu.org>
8780 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8781 just return an error.
8783 2008-01-26 Bean <bean123ch@gmail.com>
8785 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8786 (grub_reiserfs_get_item): Save offset of the next item.
8787 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8789 2008-01-25 Robert Millan <rmh@aybabtu.com>
8791 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8792 make all filesystem sources appear together (possibly fixing omissions
8794 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8795 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8796 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8797 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8799 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8801 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8802 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8803 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8804 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8806 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8807 (probe): Add a sanity check to make sure of our ability to read
8808 requested files when probing for filesystem type.
8810 * genmk.rb: Update copyright year (2007).
8812 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8813 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8814 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8815 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8816 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8817 : Remove function prototypes.
8819 2008-01-25 Robert Millan <rmh@aybabtu.com>
8821 Revert my previous commits (based on wrong assumption of how grub_errno
8824 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8825 * kern/file.c (grub_file_open): Likewise.
8827 2008-01-24 Pavel Roskin <proski@gnu.org>
8829 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8830 that hang if GRUB tries to setup colors.
8831 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8832 colors for firmwares that don't support it.
8833 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8834 Recognize Open Hack'Ware, set flags to work around its
8837 2008-01-24 Robert Millan <rmh@aybabtu.com>
8839 * kern/file.c (grub_file_open): Do not account previous failures of
8840 unrelated functions when grub_errno is checked for.
8841 Reported by Oleg Strikov.
8843 2008-01-24 Bean <bean123ch@gmail.com>
8845 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8846 (grub_ufs_sblock): New member volume name.
8847 (grub_ufs_find_file): Fix string copy bug.
8848 (grub_ufs_label): Implement this function properly.
8850 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8851 (grub_hfs_iterate_records): Use the correct file number for extents
8852 and catalog file. Fix problem in next index calculation.
8853 (grub_hfs_find_node): Replace recursive function call with loop.
8854 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8856 2008-01-23 Robert Millan <rmh@aybabtu.com>
8858 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8859 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8860 (grub_multiboot2_real_boot): New function prototype.
8862 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8863 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8865 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8866 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8868 2008-01-23 Robert Millan <rmh@aybabtu.com>
8870 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8871 #ifdef'ed out grub_printf().
8873 2008-01-23 Robert Millan <rmh@aybabtu.com>
8875 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8876 grub_dprintf calls, since they make "debug=all" mode unusable.
8877 (grub_console_checkkey): Likewise.
8879 2008-01-23 Robert Millan <rmh@aybabtu.com>
8881 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8882 `term/i386/pc/at_keyboard.c'.
8883 (pkglib_MODULES): Add `serial.mod'.
8884 (serial_mod_SOURCES): New variable.
8885 (serial_mod_CFLAGS): Likewise.
8886 (serial_mod_LDFLAGS): Likewise.
8888 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8889 `<grub/powerpc/ieee1275/console.h>'.
8890 (grub_keyboard_controller_init): New function prototype.
8891 (grub_console_checkkey): Likewise.
8892 (grub_console_getkey): Likewise.
8894 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8897 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8898 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8900 2008-01-23 Robert Millan <rmh@aybabtu.com>
8902 * kern/i386/pc/init.c (make_install_device): When memdisk image is
8903 present, "(memdisk)/boot/grub" becomes the default prefix.
8905 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8906 a memdisk tarball with all the modules. Add --overlay=DIR option that
8907 allows users to overlay additional files into the image.
8909 2008-01-23 Robert Millan <rmh@aybabtu.com>
8911 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8912 and `machine/memory.h'.
8913 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8914 (_multiboot_mod_SOURCES): New variable.
8915 (_multiboot_mod_CFLAGS): Likewise.
8916 (_multiboot_mod_LDFLAGS): Likewise.
8917 (multiboot_mod_SOURCES): Likewise.
8918 (multiboot_mod_CFLAGS): Likewise.
8919 (multiboot_mod_LDFLAGS): Likewise.
8921 * include/grub/i386/ieee1275/loader.h: New file.
8923 * include/grub/i386/ieee1275/machine.h: Likewise.
8925 * include/grub/i386/ieee1275/memory.h: Likewise.
8927 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8928 variable declaration.
8929 (grub_os_area_size): Likewise.
8931 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8932 (grub_lower_mem, grub_upper_mem): New variables.
8933 (grub_stop_floppy): New function (just to make
8934 grub_multiboot2_real_boot() happy).
8936 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8937 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8938 (grub_stop): New function.
8939 Include `"../realmode.S"' and `"../loader.S"'.
8941 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8942 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8944 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8945 rely on grub_multiboot2_real_boot() for final boot.
8947 2008-01-22 Robert Millan <rmh@aybabtu.com>
8949 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8950 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8951 device that doesn't look like an SD card.
8952 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8953 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8954 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8955 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8958 2008-01-22 Robert Millan <rmh@aybabtu.com>
8960 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8961 avoid claiming over our own code.
8963 2008-01-22 Bean <bean123ch@gmail.com>
8965 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8966 (jpeg_mod_SOURCES): New variable.
8967 (jpeg_mod_CFLAGS): Likewise.
8968 (jpeg_mod_LDFLAGS): Likewise.
8970 * video/readers/jpeg.c : New file.
8972 2008-01-22 Bean <bean123ch@gmail.com>
8974 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8975 there are no more items.
8977 2008-01-21 Robert Millan <rmh@aybabtu.com>
8979 * kern/mm.c (grub_mm_init_region): Improve debug message.
8981 2008-01-21 Robert Millan <rmh@aybabtu.com>
8983 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8984 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8986 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8988 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8989 Indicates start of upper memory.
8990 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8991 (generate_image): Abort when image size is big enough to corrupt
8994 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8995 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8996 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8997 instead of hardcoding 0xA0000.
8998 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8999 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9000 instead of hardcoding 0xA0000.
9002 2008-01-21 Robert Millan <rmh@aybabtu.com>
9004 * disk/memdisk.c (memdisk_size): New variable.
9005 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9007 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9008 image to dynamic memory.
9009 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9010 `memdisk_size'. Free memdisk block.
9012 2008-01-21 Robert Millan <rmh@aybabtu.com>
9014 Fix detection of very small filesystems (like tar).
9016 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9017 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9018 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9019 a problem with this disk).
9021 2008-01-21 Robert Millan <rmh@aybabtu.com>
9023 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9024 on grub_biosdisk_rw_standard() error.
9026 2008-01-21 Robert Millan <rmh@aybabtu.com>
9028 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9030 * kern/elf.c: Likewise.
9031 * kern/ieee1275/ieee1275.c: Likewise.
9032 * kern/powerpc/ieee1275/openfw.c: Likewise.
9033 * term/ieee1275/ofconsole.c: Likewise.
9035 2008-01-21 Robert Millan <rmh@aybabtu.com>
9037 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9039 * include/grub/kernel.h (grub_arch_memdisk_addr)
9040 (grub_arch_memdisk_size): Moved from here ...
9042 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9043 (grub_arch_memdisk_size): ... to here.
9045 2008-01-21 Robert Millan <rmh@aybabtu.com>
9047 Mostly based on bugfix from Bean.
9049 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9050 attribute with hook() parameter.
9051 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9053 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9054 attribute with hook() parameter.
9055 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9058 2008-01-21 Robert Millan <rmh@aybabtu.com>
9060 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9061 (pkglib_MODULES): Add `memdisk.mod'.
9062 (memdisk_mod_SOURCES): New variable.
9063 (memdisk_mod_CFLAGS): Likewise.
9064 (memdisk_mod_LDFLAGS): Likewise.
9066 * disk/memdisk.c: New file.
9068 * include/grub/disk.h (grub_disk_dev_id): Add
9069 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9071 * include/grub/i386/pc/kernel.h
9072 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9073 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9074 (grub_kernel_image_size): New variable declaration.
9075 (grub_total_module_size): Likewise.
9076 (grub_memdisk_image_size): Likewise.
9078 * include/grub/i386/pc/memory.h
9079 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9081 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9082 (grub_arch_memdisk_addr): New variable declaration.
9083 (grub_arch_memdisk_size): Likewise.
9085 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9086 (grub_arch_memdisk_size): Likewise.
9088 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9089 (codestart): Replace hardcoded `0x100000' with
9090 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9092 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9093 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9094 not NULL, append the contents of the file it refers to, at the end of
9095 the compressed kernel image. Initialize `grub_memdisk_image_size'
9096 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9097 (options): Add "memdisk"|'m' option.
9098 (main): Parse --memdisk|-m option, and pass user-provided path as
9099 parameter to generate_image().
9101 2008-01-20 Robert Millan <rmh@aybabtu.com>
9103 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9104 grub_dprintf() calls from here ...
9105 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9107 2008-01-20 Robert Millan <rmh@aybabtu.com>
9109 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9111 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9113 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9114 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9115 `GRUB_IEEE1275_FLAG_REAL_MODE'.
9116 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9118 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9119 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9121 2008-01-19 Robert Millan <rmh@aybabtu.com>
9123 Get rid of confusing function (superseded by
9124 `grub_ieee1275_get_integer_property')
9125 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9127 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9129 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9130 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9131 in native endianness from grub_ieee1275_get_integer_property().
9133 2008-01-19 Robert Millan <rmh@aybabtu.com>
9135 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9136 command after "shut-down", since implementations differ on which
9137 the command for halt is.
9139 2008-01-19 Robert Millan <rmh@aybabtu.com>
9141 * include/grub/i386/linuxbios/console.h: Add header protection.
9142 (grub_keyboard_controller_init): New function prototype.
9143 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9144 (KEYBOARD_COMMAND_READ): Likewise.
9145 (KEYBOARD_COMMAND_WRITE): Likewise.
9146 (KEYBOARD_SCANCODE_SET1): Likewise.
9147 (grub_keyboard_controller_write): New function.
9148 (grub_keyboard_controller_read): Likewise.
9149 (grub_keyboard_controller_init): Likewise.
9151 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9152 (grub_console_init): On coreboot/LinuxBIOS, call
9153 grub_keyboard_controller_init().
9155 2008-01-19 Robert Millan <rmh@aybabtu.com>
9157 PowerPC changes provided by Pavel Roskin.
9159 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9160 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9161 don't rely on cmain() doing it.
9162 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9163 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9165 2008-01-16 Robert Millan <rmh@aybabtu.com>
9167 * include/grub/i386/linuxbios/memory.h
9168 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9169 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9170 receive `table_header' as argument. Instead, probe for it in the
9171 known memory ranges where it can be present.
9172 (grub_available_iterate): Do not pass a fixed `table_header' address
9173 to grub_linuxbios_table_iterate().
9175 2008-01-15 Robert Millan <rmh@aybabtu.com>
9177 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9178 * conf/i386-ieee1275.rmk: New file.
9179 * include/grub/i386/ieee1275/console.h: Likewise.
9180 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9181 * include/grub/i386/ieee1275/kernel.h: Likewise.
9182 * include/grub/i386/ieee1275/time.h: Likewise.
9183 * kern/i386/ieee1275/init.c: Likewise.
9184 * kern/i386/ieee1275/startup.S: Likewise.
9186 2008-01-15 Robert Millan <rmh@aybabtu.com>
9188 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9189 when pointers are 32-bit (but still do set it to one when they are
9192 2008-01-15 Robert Millan <rmh@aybabtu.com>
9194 * include/grub/ieee1275/ieee1275.h
9195 (grub_ieee1275_get_integer_property): New function prototype.
9197 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9198 (grub_ieee1275_get_integer_property): New function. Wraps around
9199 grub_ieee1275_get_property() to handle endianness.
9201 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9202 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9204 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9205 (grub_map): Likewise.
9206 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9208 2008-01-15 Bean <bean123ch@gmail.com>
9210 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9211 (grub_script_execute_cmdline): Reset grub_errno.
9213 * normal/main.c (read_config_file): Reset grub_errno.
9215 * normal/parse.y (script_init): New.
9216 (script): Move function and menuentry here.
9218 (command): Add delimiter at the end of command.
9219 (commands): Adjust to match the new command.
9220 (commandblock): Remove grub_script_lexer_record_start.
9221 (menuentry): Add grub_script_lexer_record_start, use the new commands.
9222 (if): Use the new commands.
9224 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9226 2008-01-15 Robert Millan <rmh@aybabtu.com>
9228 * normal/menu.c (run_menu): Move timeout message from here ...
9229 (print_timeout): ... to here.
9230 (run_menu): Use print_timeout() once during initial draw to print
9231 the whole message, and again in every clock tick to update only
9232 the number of seconds.
9234 2008-01-15 Robert Millan <rmh@aybabtu.com>
9236 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9237 actual size of `available' from grub_ieee1275_get_property(), and
9238 restrict parsing to that bound.
9240 2008-01-15 Christian Franke <franke@computer.org>
9242 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9243 (argp_program_version): Remove variable.
9244 (argp_program_bug_address): Likewise.
9245 (options): Convert from struct argp_option to struct option.
9246 (struct arguments): Remove.
9247 (parse_opt): Remove.
9248 (usage): New function.
9249 (main): Replace struct args members by simple variables.
9250 Replace argp_parse() by getopt_long().
9251 Add switch to evaluate options.
9252 Add missing "(...)" around root_dev in prefix string.
9254 2008-01-14 Robert Millan <rmh@aybabtu.com>
9256 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9257 for grub_ieee1275_exit(), in order to improve portability.
9259 2008-01-14 Robert Millan <rmh@aybabtu.com>
9261 * util/grub.d/10_linux.in (prefix): Define.
9262 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9264 2008-01-13 Pavel Roskin <proski@gnu.org>
9266 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9267 grub_errno if no errors have been detected.
9269 2008-01-12 Robert Millan <rmh@aybabtu.com>
9271 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9272 (grub_util_get_dev_abstraction): New function prototype.
9274 * util/getroot.c: Include `<grub/util/getroot.h>'
9275 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9276 (grub_util_get_dev_abstraction): ... here (new function).
9278 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9279 `PRINT_ABSTRACTION'.
9280 (probe): Probe for abstraction type when requested.
9281 (main): Understand `--target=abstraction'.
9283 * util/i386/efi/grub-install.in: Add abstraction module to core
9284 image when it is found to be necessary.
9285 * util/i386/pc/grub-install.in: Likewise.
9286 * util/powerpc/ieee1275/grub-install.in: Likewise.
9288 * util/update-grub_lib.in (font_path): Return system path without
9289 converting to GRUB path.
9290 * util/update-grub.in: Convert system path returned by font_path()
9291 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9292 abstraction module is needed for loading fonts (if any). Export
9293 that as `GRUB_PRELOAD_MODULES'.
9294 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9297 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9299 Remove some unused code from reiserfs.
9301 * fs/reiserfs.c (struct grub_reiserfs_key)
9302 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9303 (struct grub_reiserfs_node_body): Removed.
9304 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9306 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9308 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9310 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9312 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9314 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9316 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9317 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9318 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9320 2008-01-10 Robert Millan <rmh@aybabtu.com>
9322 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9323 Determines if a file is garbage left by packaging systems, etc.
9324 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9325 for processing /etc/grub.d scripts.
9326 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9327 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9328 as a condition for processing Linux images.
9330 2008-01-10 Pavel Roskin <proski@gnu.org>
9332 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9333 to compile reiserfs.c on PowerPC.
9335 2008-01-10 Robert Millan <rmh@aybabtu.com>
9337 * kern/device.c (grub_device_iterate): Do not abort device iteration
9338 when one of the devices cannot be opened.
9339 * kern/disk.c (grub_disk_open): Do not account previous failures of
9340 unrelated functions when grub_errno is checked for.
9342 2008-01-08 Robert Millan <rmh@aybabtu.com>
9344 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9345 `! grub_linux_is_bzimage', change order of address comparison to make
9346 it more intuitive, and improve "too big zImage" error message.
9348 2008-01-08 Robert Millan <rmh@aybabtu.com>
9350 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9351 `$(update-grub_DATA)'.
9352 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9355 2008-01-07 Robert Millan <rmh@aybabtu.com>
9357 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9358 which instruction is modified by grub-setup during installation
9359 (since it wasn't obvious by only looking at this file).
9361 2008-01-07 Robert Millan <rmh@aybabtu.com>
9363 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9364 listing actual TODO items.
9366 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9368 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9370 (grub_reiserfs_get_key_offset): Likewise.
9371 (grub_reiserfs_set_key_offset): Likewise.
9372 (grub_reiserfs_set_key_type): Likewise.
9373 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9375 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9376 better to remove the bitfield version completely.
9378 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9380 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9381 allocated from the heap, due to the fshelp implementation.
9382 (grub_reiserfs_dir): Free NODE, due to the same reason.
9384 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9386 Mostly from Vincent Pelletier:
9388 * fs/reiserfs.c: New file.
9390 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9391 (reiserfs_mod_SOURCES): New variable.
9392 (reiserfs_mod_CFLAGS): Likewise.
9393 (reiserfs_mod_LDFLAGS): Likewise.
9395 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9396 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9397 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9400 2008-01-06 Robert Millan <rmh@aybabtu.com>
9402 * normal/color.c: Remove `<grub/env.h>'.
9404 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9406 * include/grub/normal.h: Include <grub/env.h>.
9408 2008-01-05 Robert Millan <rmh@aybabtu.com>
9410 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9411 usage example with `(hd0,1)'.
9412 Reported by Samuel Thibault.
9414 2008-01-05 Robert Millan <rmh@aybabtu.com>
9416 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9417 (grub_linux_boot_zimage): Rename to ...
9418 (grub_linux_boot): ... this.
9419 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9420 (grub_linux_boot_zimage): Conditionalize zImage copy.
9422 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9423 (grub_linux_boot_bzimage): Remove prototype.
9424 (grub_linux_boot_zimage): Rename to ...
9425 (grub_linux_boot): ... this.
9427 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9428 (grub_linux_boot): Remove function.
9430 2008-01-05 Robert Millan <rmh@aybabtu.com>
9432 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9433 (grub_env_write_color_highlight): Likewise.
9434 (grub_wait_after_message): Likewise.
9436 * normal/color.c: New file.
9438 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9439 (normal_mod_DEPENDENCIES): Likewise.
9441 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9442 (normal_mod_DEPENDENCIES): Likewise.
9444 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9445 (normal_mod_DEPENDENCIES): Likewise.
9447 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9448 (normal_mod_DEPENDENCIES): Likewise.
9450 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9451 for waiting after a message is printed.
9452 * normal/main.c (read_config_file): Likewise.
9453 (grub_normal_init): Register grub_env_write_color_normal() and
9454 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9455 `color_highlight' variables as global.
9457 * normal/menu.c (grub_wait_after_message): New function.
9458 (grub_color_menu_normal): New variable. Replaces ...
9459 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9460 (grub_color_menu_highlight): New variable. Replaces ...
9461 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9462 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9463 `GRUB_TERM_COLOR_STANDARD'.
9464 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9465 `normal_code' and `highlight_code' to `old_color_normal' and
9466 `old_color_highlight', respectively.
9467 (grub_menu_init_page): Update colors when drawing the menu, based on
9468 `menu_color_normal' and `menu_color_highlight' variables.
9469 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9470 a message is printed.
9472 2008-01-05 Robert Millan <rmh@aybabtu.com>
9474 * kern/env.c (grub_env_context_open): Propagate hooks for global
9475 variables to new context.
9477 * kern/main.c (grub_set_root_dev): Export `root' variable.
9479 2008-01-05 Robert Millan <rmh@aybabtu.com>
9481 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9482 discs unconditionally, since udev and others have options to provide
9485 2008-01-05 Robert Millan <rmh@aybabtu.com>
9487 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9489 2008-01-04 Christian Franke <franke@computer.org>
9491 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9494 2008-01-03 Pavel Roskin <proski@gnu.org>
9496 * kern/i386/linuxbios/init.c: Put "void" to all function
9497 declarations with no arguments.
9498 * kern/powerpc/ieee1275/init.c: Likewise.
9499 * term/i386/pc/at_keyboard.c: Likewise.
9500 * term/i386/pc/vga_text.c: Likewise.
9501 * util/grub-mkdevicemap.c: Likewise.
9503 2008-01-02 Robert Millan <rmh@aybabtu.com>
9505 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9506 message when loaded image is out of bounds.
9507 (grub_multiboot_load_elf64): Likewise.
9509 2008-01-02 Pavel Roskin <proski@gnu.org>
9511 * util/grub.d/10_linux.in: Try version without ".old" when
9512 looking for initrd. It's better to use initrd from the newer
9513 kernel of the same version than no initrd at all.
9515 2008-01-01 Robert Millan <rmh@aybabtu.com>
9517 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9519 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9521 * include/grub/video.h: Added grub_video_unmap_color and
9522 grub_video_get_active_render_target.
9523 (grub_video_adapter): Added unmap_color and get_active_render_target.
9525 * video/video.c: Added grub_video_unmap_color and
9526 grub_video_get_active_render_target.
9527 (grub_video_get_info): Changed method to accept NULL pointer as an
9528 argument to allow detection of active video adapter.
9530 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9531 grub_video_vbe_unmap_color_int.
9532 Added grub_video_vbe_unmap_color and
9533 grub_video_vbe_get_active_render_target.
9534 (grub_video_vbe_adapter): Added unmap_color and
9535 get_active_render_target.
9537 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9538 with grub_video_vbe_unmap_color_int.
9540 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9541 (DEFAULT_NORMAL_COLOR): Likewise.
9542 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9543 (DEFAULT_FG_COLOR): Removed.
9544 (DEFAULT_BG_COLOR): Likewise.
9545 (DEFAULT_CURSOR_COLOR): Changed value.
9546 (grub_virtual_screen): Added standard_color_setting,
9547 normal_color_setting, highlight_color_setting and term_color.
9548 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9549 (bitmap_width): Added.
9550 (bitmap_height): Likewise.
9552 (set_term_color): Likewise.
9553 (grub_virtual_screen_setup): Changed to use new terminal coloring
9555 (grub_gfxterm_init): Added init for bitmap.
9556 (grub_gfxterm_fini): Added destroy for bitmap.
9557 (redraw_screen_rect): Updated to use background bitmap and new
9559 (scroll_up): Added optimization for case when there is no bitmap.
9560 (grub_gfxterm_cls): Fixed to use correct background color.
9561 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9563 (grub_virtual_screen_setcolor): Likewise.
9564 (grub_virtual_screen_getcolor): Added.
9565 (grub_gfxterm_background_image_cmd): Likewise.
9566 (grub_video_term): Added setcolor and getcolor.
9567 (MOD_INIT): Added registration of background_image command.
9568 (MOD_TERM): Added unregistration for background_image command.
9570 2007-12-30 Pavel Roskin <proski@gnu.org>
9572 * loader/multiboot_loader.c: Fix multiboot command
9573 unregistration. Fix all typos in the word "multiboot".
9575 2007-12-29 Pavel Roskin <proski@gnu.org>
9577 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9578 support for initrd names used in Fedora.
9580 2007-12-26 Bean <bean123ch@gmail.com>
9582 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9583 (cpio_mod_SOURCES): New variable.
9584 (cpio_mod_CFLAGS): Likewise.
9585 (cpio_mod_LDFLAGS): Likewise.
9587 * fs/cpio.c: New file.
9589 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9591 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9593 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9595 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9597 2007-12-25 Robert Millan <rmh@aybabtu.com>
9599 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9600 (grub_getcolor): New function.
9602 * kern/term.c (grub_getcolor): New function.
9603 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9604 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9605 (print_entry): Set normal and highlight colors to
9606 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9607 respectively, before printing and restore them to old
9609 (grub_menu_init_page): Likewise. Fill an additional colored space
9610 that would otherwise be left blank.
9612 * term/efi/console.c (grub_console_getcolor): New function.
9613 (struct grub_console_term.getcolor): New variable.
9614 * term/i386/pc/console.c (grub_console_getcolor): New function.
9615 (struct grub_console_term.getcolor): New variable.
9616 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9617 (struct grub_console_term.getcolor): New variable.
9619 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9620 (struct grub_console_term.setcolor): Remove variable.
9621 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9622 (struct grub_console_term.setcolor): Remove variable.
9623 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9624 (struct grub_console_term.setcolor): Remove variable.
9625 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9626 (struct grub_console_term.setcolor): Remove variable.
9628 2007-12-25 Robert Millan <rmh@aybabtu.com>
9630 * configure.ac: Search for possible unifont.hex locations, and
9631 define UNIFONT_HEX if found.
9633 * Makefile.in (UNIFONT_HEX): Define variable.
9634 (DATA): Rename to ...
9635 (PKGLIB): ... this. Update all users.
9636 (PKGDATA): New variable.
9637 (pkgdata_IMAGES): Rename to ...
9638 (pkglib_IMAGES): ... this. Update all users.
9639 (pkgdata_MODULES): Rename to ...
9640 (pkglib_MODULES): ... this. Update all users.
9641 (pkgdata_PROGRAMS): Rename to ...
9642 (pkglib_PROGRAMS): ... this. Update all users.
9643 (pkgdata_DATA): Rename to ...
9644 (pkglib_DATA): ... this. Update all users.
9645 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9646 (unicode.pff, ascii.pff): New rules.
9647 (all-local): Add `$(PKGDATA)' dependency.
9648 (install-local): Process `$(PKGDATA)'.
9650 * util/update-grub_lib.in (font_path): Search for *.pff files in
9651 a few more locations, including `${pkgdata}'.
9653 2007-12-23 Robert Millan <rmh@aybabtu.com>
9655 Patch from Bean <bean123ch@gmail.com>:
9656 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9659 2007-12-21 Bean <bean123ch@gmail.com>
9661 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9662 (ntfscomp_mod_SOURCES): New variable.
9663 (ntfscomp_mod_CFLAGS): Likewise.
9664 (ntfscomp_mod_LDFLAGS): Likewise.
9666 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9667 (grub_probe_SOURCES): Likewise.
9668 (grub_emu_SOURCES): Likewise.
9670 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9671 (grub_emu_SOURCES): Likewise.
9673 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9674 (grub_emu_SOURCES): Likewise.
9676 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9677 (grub_emu_SOURCES): Likewise.
9679 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9680 (read_run_list): Renamed to grub_ntfs_read_run_list.
9681 (decomp_nextvcn): Moved to ntfscomp.c.
9682 (decomp_getch): Likewise.
9683 (decomp_get16): Likewise.
9684 (decomp_block): Likewise.
9685 (read_block): Likewise.
9686 (read_data): Partially moved to ntfscomp.c.
9687 (fixup): Change unsigned to grub_uint16_t.
9688 (read_mft): Change unsigned long to grub_uint32_t.
9689 (read_attr): Likewise.
9690 (read_data): Likewise.
9691 (read_run_data): Likewise.
9692 (read_run_list): Likewise.
9693 (read_mft): Likewise.
9695 * fs/ntfscomp.c: New file.
9697 * include/grub/ntfs.h: New file.
9699 2007-12-16 Robert Millan <rmh@aybabtu.com>
9701 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9702 IDE disk check, since Linux is known to support 20 IDE disks.
9703 Reported by Colin Watson.
9705 2007-12-15 Bean <bean123ch@gmail.com>
9707 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9708 (lnxboot_img_SOURCES): New variable.
9709 (lnxboot_img_ASFLAGS): Likewise.
9710 (lnxboot_img_LDFLAGS): Likewise.
9712 * boot/i386/pc/lnxboot.S: New file.
9714 2007-11-24 Pavel Roskin <proski@gnu.org>
9716 * configure.ac: Test if '--build-id=none' is supported by the
9717 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9718 objcopy to generate incorrect binary files (binutils
9719 2.17.50.0.18-1 as shipped by Fedora 8).
9720 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9721 linking, so that build ID doesn't break the test.
9723 2007-11-24 Pavel Roskin <proski@gnu.org>
9725 * include/grub/i386/time.h: use "void" in the argument list
9727 * include/grub/powerpc/time.h: Likewise.
9728 * include/grub/sparc64/time.h: Likewise.
9730 2007-11-18 Christian Franke <franke@computer.org>
9732 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9733 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9734 This fixes the problem that function keys did not work in grub-emu.
9736 2007-11-18 Christian Franke <franke@computer.org>
9738 * disk/host.c (grub_host_open): Remove attribute unused from
9739 name parameter. Add check for "host". This fixes the problem
9740 that grub-emu does not find partitions.
9742 2007-11-18 Christian Franke <franke@computer.org>
9744 * util/hostfs.c (is_dir): New function.
9745 (grub_hostfs_dir): Handle missing dirent.d_type case.
9746 (grub_hostfs_read): Add missing fseek().
9747 (grub_hostfs_label): Clear label pointer. This fixes a crash
9748 of grub-emu on "ls (host)".
9750 2007-11-18 Christian Franke <franke@computer.org>
9752 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9753 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9754 to 64 bit boundary by default.
9756 2007-11-18 Bean <bean123ch@gmail.com>
9758 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9759 (hexdump_mod_SOURCES): New variable.
9760 (hexdump_mod_CFLAGS): Likewise.
9761 (hexdump_mod_LDFLAGS): Likewise.
9763 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9765 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9767 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9769 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9771 * include/grub/hexdump.h: New file.
9773 * commands/hexdump.c: New file.
9775 2007-11-10 Robert Millan <rmh@aybabtu.com>
9777 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9778 in grub_outb() calls.
9779 (beep_on): Likewise.
9781 2007-11-10 Christian Franke <franke@computer.org>
9783 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9784 (grub_menu_run): Likewise.
9786 2007-11-10 Robert Millan <rmh@aybabtu.com>
9788 * include/grub/i386/efi/machine.h: New file.
9789 * include/grub/i386/linuxbios/machine.h: Likewise.
9790 * include/grub/i386/pc/machine.h: Likewise.
9791 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9792 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9794 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9795 (serial_hw_io_addr): New variable.
9796 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9797 instead of `(unsigned short *) 0x400'.
9799 2007-11-10 Bean <bean123ch@gmail.com>
9801 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9803 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9805 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9806 (vga_mod_SOURCES): Added.
9807 (vga_mod_CFLAGS): Likewise.
9808 (vga_mod_LDFLAGS): Likewise.
9810 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9812 (set_map_mask): Likewise.
9813 (set_read_map): Likewise.
9814 (set_read_address): Likewise.
9815 (vga_font): Removed variable.
9816 (get_vga_glyph): Removed function.
9817 (invalidate_char): Likewise.
9818 (write_char): Changed to use grub_font_get_glyph() for font
9820 (grub_vga_putchar): Likewise.
9821 (grub_vga_getcharwidth): Likewise.
9823 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9825 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9827 (pxeboot_img_LDFLAGS): Likewise.
9828 (diskboot_img_LDFLAGS): Likewise.
9829 (kernel_img_LDFLAGS): Likewise.
9831 2007-11-06 Robert Millan <rmh@aybabtu.com>
9833 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9834 in grub_outb() calls.
9835 (serial_hw_init): Likewise.
9837 2007-11-05 Robert Millan <rmh@aybabtu.com>
9839 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9840 spaces. Skip non-regular files.
9842 2007-11-05 Robert Millan <rmh@aybabtu.com>
9844 * kern/disk.c (grub_disk_firmware_fini)
9845 (grub_disk_firmware_is_tainted): New variables.
9847 * include/grub/disk.h (grub_disk_firmware_fini)
9848 (grub_disk_firmware_is_tainted): Likewise.
9850 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9851 (grub_disk_biosdisk_fini): ... to here.
9852 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9853 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9854 is set. Register grub_disk_biosdisk_fini() in
9855 `grub_disk_firmware_fini'.
9857 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9858 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9859 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9860 to finish existing firmware disk interface.
9862 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9863 (ata_mod_SOURCES): New variable.
9864 (ata_mod_CFLAGS): Likewise.
9865 (ata_mod_LDFLAGS): Likewise.
9867 2007-11-05 Robert Millan <rmh@aybabtu.com>
9869 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9870 (grub_ata_wait): Reimplement using grub_millisleep().
9872 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9873 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9875 2007-11-03 Marco Gerards <marco@gnu.org>
9877 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9878 (CRTC_ADDR_PORT): New macro.
9879 (CRTC_DATA_PORT): Likewise.
9880 (CRTC_CURSOR): Likewise.
9881 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9882 (CRTC_CURSOR_ADDR_LOW): Likewise.
9883 (update_cursor): New function.
9884 (grub_console_real_putchar): Call `update_cursor'.
9885 (grub_console_gotoxy): Likewise.
9886 (grub_console_cls): Set the default color when clearing the
9888 (grub_console_setcursor): Implemented.
9890 2007-11-03 Marco Gerards <marco@gnu.org>
9892 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9894 (grub_ata_pio_write): Likewise.
9896 (grub_atapi_identify): Wait after issuing an ATA command.
9897 (grub_atapi_packet): Likewise.
9898 (grub_ata_identify): Likewise.
9899 (grub_ata_readwrite): Likewise.
9901 2007-11-03 Marco Gerards <marco@gnu.org>
9903 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9904 (grub_ata_pio_write): Likewise.
9905 (grub_ata_readwrite): Use `grub_error', instead of
9906 returning `grub_errno'.
9908 2007-11-03 Marco Gerards <marco@gnu.org>
9910 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9911 grub_ata_pio_write once for every single sector, instead of for
9914 2007-10-31 Robert Millan <rmh@aybabtu.com>
9916 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9918 * conf/i386-linuxbios.rmk: New file.
9920 * kern/i386/pc/hardware.c: Likewise.
9921 * term/i386/pc/at_keyboard.c: Likewise.
9922 * term/i386/pc/vga_text.c: Likewise.
9924 * include/grub/i386/linuxbios/boot.h: Likewise.
9925 * include/grub/i386/linuxbios/console.h: Likewise.
9926 * include/grub/i386/linuxbios/init.h: Likewise.
9927 * include/grub/i386/linuxbios/kernel.h: Likewise.
9928 * include/grub/i386/linuxbios/loader.h: Likewise.
9929 * include/grub/i386/linuxbios/memory.h: Likewise.
9930 * include/grub/i386/linuxbios/serial.h: Likewise.
9931 * include/grub/i386/linuxbios/time.h: Likewise.
9933 * kern/i386/linuxbios/init.c: Likewise.
9934 * kern/i386/linuxbios/startup.S: Likewise.
9935 * kern/i386/linuxbios/table.c: Likewise.
9937 2007-10-31 Marco Gerards <marco@gnu.org>
9939 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9940 (ata_mod_SOURCES): New variable.
9941 (ata_mod_CFLAGS): Likewise.
9942 (ata_mod_LDFLAGS): Likewise.
9944 * disk/ata.c: New file.
9946 * include/grub/disk.h (grub_disk_dev_id): Add
9947 `GRUB_DISK_DEV_ATA_ID'.
9949 2007-10-31 Robert Millan <rmh@aybabtu.com>
9951 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9952 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9954 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9955 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9957 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9960 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9962 2007-10-27 Robert Millan <rmh@aybabtu.com>
9964 * include/grub/types.h (ULONG_MAX): Define macro.
9966 2007-10-22 Robert Millan <rmh@aybabtu.com>
9968 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
9970 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
9972 2007-10-22 Robert Millan <rmh@aybabtu.com>
9974 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9975 (pkgdata_MODULES): Add `biosdisk.mod'.
9976 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9979 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9980 (grub_biosdisk_init): Replace with ...
9981 (GRUB_MOD_INIT(biosdisk)): ... this.
9982 (grub_biosdisk_fini): Replace with ...
9983 (GRUB_MOD_FINI(biosdisk)): ... this.
9985 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9986 (grub_machine_init): Remove call to grub_biosdisk_init().
9987 (grub_machine_fini): Remove call to grub_machine_fini().
9989 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9991 2007-10-22 Robert Millan <rmh@aybabtu.com>
9993 * include/grub/time.h: New file.
9994 * include/grub/i386/time.h: Likewise.
9995 * include/grub/powerpc/time.h: Likewise.
9996 * include/grub/sparc64/time.h: Likewise.
9998 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10000 (KERNEL_MACHINE_TIME_HEADER): ... this.
10001 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10003 (KERNEL_MACHINE_TIME_HEADER): ... this.
10004 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10006 (KERNEL_MACHINE_TIME_HEADER): ... this.
10008 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10009 (grub_millisleep): New function.
10010 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10011 (grub_millisleep): New function.
10012 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10013 Remove `grub/machine/time.h' include.
10014 (grub_millisleep): New function.
10015 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10016 Remove `grub/machine/time.h' include.
10017 (grub_millisleep): New function.
10019 * include/grub/misc.h (grub_div_roundup): New function.
10021 * kern/misc.c: Include `<grub/time.h>'.
10022 (grub_millisleep_generic): New function.
10024 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10026 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10028 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10029 `machine/time.h'. Add `time.h'.
10030 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10032 2007-10-21 Robert Millan <rmh@aybabtu.com>
10034 * include/grub/misc.h (grub_max): New function.
10036 2007-10-21 Robert Millan <rmh@aybabtu.com>
10038 * util/misc.c (grub_util_info): Call fflush() before returning.
10040 2007-10-20 Robert Millan <rmh@aybabtu.com>
10042 * genmk.rb (Image): Copy `extra_flags' from here ...
10043 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10045 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10046 to `argc' and `args' arguments.
10048 2007-10-17 Robert Millan <rmh@aybabtu.com>
10050 * kern/i386/loader.S: New file.
10052 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10053 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10054 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10055 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10056 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10057 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10058 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10059 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10060 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10061 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10062 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10063 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10064 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10065 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10067 * kern/i386/realmode.S: New file.
10069 * kern/i386/pc/startup.S (protstack): Moved from here ...
10070 * kern/i386/realmode.S (protstack)... to here.
10071 * kern/i386/pc/startup.S (gdt): Moved from here ...
10072 * kern/i386/realmode.S (gdt)... to here.
10073 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10074 * kern/i386/realmode.S (prot_to_real)... to here.
10076 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10077 `kern/i386/realmode.S'.
10079 2007-10-17 Robert Millan <rmh@aybabtu.com>
10081 * include/grub/i386/loader.h: New file.
10083 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10084 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10085 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10086 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10087 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10088 * include/grub/i386/loader.h (grub_linux_prot_size)
10089 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10090 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10091 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10092 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10094 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10096 2007-10-15 Robert Millan <rmh@aybabtu.com>
10098 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10099 filesystem when dev->disk is unset.
10100 Do probe for filesystem even when dev->disk->has_partitions is set.
10101 In case a filesystem is found, always report it.
10102 In case it isn't, if dev->disk->has_partitions is set, report that
10103 a partition table was found instead of reporting that no filesystem
10104 could be identified.
10106 2007-10-12 Robert Millan <rmh@aybabtu.com>
10108 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10109 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10111 * include/grub/types.h (grub_host_to_target16): New macro.
10112 (grub_host_to_target32): Likewise.
10113 (grub_host_to_target64): Likewise.
10114 (grub_target_to_host16): Likewise.
10115 (grub_target_to_host32): Likewise.
10116 (grub_target_to_host64): Likewise.
10118 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10119 Renamed from to ...
10120 (GRUB_MOD_ALIGN): ...this. Update all users.
10122 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10123 grub_host_to_target32.
10124 Replace grub_be_to_cpu32 with grub_target_to_host32.
10125 (load_modules): Likewise.
10126 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10127 Replace grub_be_to_cpu32 with grub_target_to_host32.
10128 Replace grub_cpu_to_be16 with grub_host_to_target16.
10129 Replace grub_cpu_to_be32 grub_host_to_target32.
10131 2007-10-12 Robert Millan <rmh@aybabtu.com>
10133 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10134 * util/elf/grub-mkimage.c: ... here.
10136 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10137 `util/powerpc/ieee1275/grub-mkimage.c'.
10139 2007-10-07 Robert Millan <rmh@aybabtu.com>
10141 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10142 and make it easier to figure out.
10143 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10144 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10145 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10146 leave us with less than HEAP_MIN_SIZE total heap.
10147 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10149 2007-10-03 Robert Millan <rmh@aybabtu.com>
10151 * include/grub/i386/io.h: New file.
10152 * commands/i386/pc/play.c (inb): Removed.
10154 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10156 * term/i386/pc/serial.c (inb): Removed.
10158 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10160 * term/i386/pc/vga.c (inb): Removed.
10162 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10165 2007-10-02 Robert Millan <rmh@aybabtu.com>
10167 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10168 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10169 Reported by Marcin Kurek.
10171 2007-09-07 Robert Millan <rmh@aybabtu.com>
10173 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10174 SmartFirmware version updates (as released by Sven Luther), and avoid
10175 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10176 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10179 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10181 From Hitoshi Ozeki:
10182 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10183 when merging two regions.
10185 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10187 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10188 * normal/completion.c (grub_normal_do_completion): Likewise.
10189 Reported by Hitoshi Ozeki.
10191 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10193 Do not use devices at boot in chainloading.
10195 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10196 (boot_part_addr): Likewise.
10197 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10198 with BOOT_DRIVE and BOOT_PART_ADDR.
10199 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10200 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10202 2007-08-29 Robert Millan <rmh@aybabtu.com>
10204 Patch from Simon Peter <dn.tlp@gmx.net>:
10205 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10206 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10207 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10208 util/i386/pc/grub-setup.c_DEPENDENCIES.
10209 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10210 util/grub-probe.c_DEPENDENCIES.
10211 * conf/powerpc-ieee1275.rmk: Likewise.
10213 2007-08-28 Robert Millan <rmh@aybabtu.com>
10215 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10216 to tell grub-mkdevicemap how to name devices.
10217 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10220 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10221 util/i386/get_disk_name.c.
10222 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10223 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10224 util/ieee1275/get_disk_name.c.
10226 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10228 * DISTLIST: Add util/i386/get_disk_name.c and
10229 util/ieee1275/get_disk_name.c.
10231 * util/grub-mkdevicemap.c: Replace device naming logic with
10232 grub_util_get_disk_name() calls.
10234 2007-08-20 Robert Millan <rmh@aybabtu.com>
10236 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10237 (so that it works for both plural and singular quantities).
10239 2007-08-05 Robert Millan <rmh@aybabtu.com>
10241 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10242 so that [xz] isn't taken into account when determining order.
10244 2007-08-02 Marco Gerards <marco@gnu.org>
10246 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10247 `include/multiboot2.h', `include/grub/elfload.h',
10248 `include/multiboot.h', `include/grub/multiboot.h',
10249 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10250 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10251 `kern/elf.c', `loader/multiboot_loader.c',
10252 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10253 `loader/i386/pc/multiboot2.c',
10254 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10255 `util/i386/pc/grub-mkrescue.in'. Remove
10256 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10257 `include/grub/i386/pc/util/biosdisk.h' and
10258 `include/grub/powerpc/ieee1275/multiboot.h'.
10260 2007-08-02 Bean <bean123ch@gmail.com>
10262 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10263 (ntfs_mod_SOURCES): New variable.
10264 (ntfs_mod_CFLAGS): Likewise.
10265 (ntfs_mod_LDFLAGS): Likewise.
10267 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10268 (grub_probe_SOURCES): Likewise.
10269 (grub_emu_SOURCES): Likewise.
10271 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10272 (grub_emu_SOURCES): Likewise.
10274 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10275 (grub_emu_SOURCES): Likewise.
10277 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10279 * fs/ntfs.c: New file.
10281 2007-08-02 Bean <bean123ch@gmail.com>
10283 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10285 * file.h (grub_file): Likewise.
10287 * fshelp.h (grub_fshelp_read_file): Likewise.
10289 * util/i386/pc/grub-setup.c (setup): Likewise.
10290 (save_first_sector): Likewise.
10291 (save_blocklists): Likewise.
10293 * fs/affs.c (grub_affs_read_file): Likewise.
10295 * fs/ext2.c (grub_ext2_read_file): Likewise.
10297 * fs/fat.c (grub_fat_read_data): Likewise.
10299 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10301 * fs/hfs.c (grub_hfs_read_file): Likewise.
10303 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10305 * fs/jfs.c (grub_jfs_read_file): Likewise.
10307 * fs/minix.c (grub_minix_read_file): Likewise.
10309 * fs/sfs.c (grub_sfs_read_file): Likewise.
10311 * fs/ufs.c (grub_ufs_read_file): Likewise.
10313 * fs/xfs.c (grub_xfs_read_file): Likewise.
10315 * command/blocklist.c (read_blocklist): Likewise.
10316 (print_blocklist): Likewise.
10318 2007-08-02 Marco Gerards <marco@gnu.org>
10320 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10323 * disk/host.c: New file.
10325 * util/hostfs.c: Likewise.
10327 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10328 return `GRUB_ERR_BAD_FS'.
10329 * fs/sfs.c (grub_sfs_mount): Likewise.
10330 * fs/xfs.c (grub_xfs_mount): Likewise.
10332 * include/grub/disk.h (enum grub_disk_dev_id): Add
10333 `GRUB_DISK_DEVICE_HOST_ID'.
10335 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10337 2007-07-24 Jerone Young <jerone@gmail.com>
10339 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10340 modules for compilation.
10341 * conf/powerpc-ieee1275.rmk: Likewise.
10343 * include/multiboot.h: Move multiboot definitions to one file. Rename
10344 many definitions to not get grub specific.
10345 * include/multiboot2.h: Create header with multiboot 2 definitions.
10346 * include/grub/multiboot.h: Header for grub specific function
10347 prototypes and definitions.
10348 * include/grub/multiboot2.h: Likewise.
10349 * include/grub/multiboot_loader.h: Likewise.
10350 * include/grub/i386/pc/multiboot.h: Removed.
10351 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10353 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10354 and 2 to allow for one multiboot and module commands.
10355 * loader/multiboot2.c: Add multiboot2 functionality.
10356 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10357 and definition names.
10358 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10360 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10361 ieee1275 specific multiboot2 code.
10363 * kern/i386/pc/startup.S: Change headers and definition names for
10364 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10366 2007-07-22 Robert Millan <rmh@aybabtu.com>
10368 * geninitheader.sh: Process file specified in first parameter rather
10369 than hardcoding grub_modules_init.lst.
10370 * geninit.sh: Likewise. Also, construct header name dynamically rather
10371 than hardcoding grub_modules_init.h.
10373 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10374 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10375 grub_probe_init.[ch] and grub_setup_init.[ch].
10377 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10378 grub_modules_init.h with grub_emu_init.h.
10379 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10380 grub_probe_init.[ch] files.
10381 * conf/i386-efi.rmk: Likewise.
10382 * conf/i386-pc.rmk: Likewise.
10383 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10384 grub_setup_init.[ch] files.
10386 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10387 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10388 to initialize modules rather than a list of hardcoded functions.
10389 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10390 grub_init_all() to initialize modules rather than a list of hardcoded
10393 2007-07-22 Robert Millan <rmh@aybabtu.com>
10395 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10396 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10398 2007-07-22 Robert Millan <rmh@aybabtu.com>
10400 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10401 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10402 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10403 flag when running on SmartFirmware.
10404 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10405 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10408 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10409 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10410 rather than decreasing it.
10412 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10413 there's not enough space to do it, fail in the same way as when it
10414 can't be done because there are no partitions.
10416 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10417 when nvsetenv failed.
10419 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10421 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10422 because this rule is automatically generated.
10423 (grub-mkrescue): Removed for the same reason as above.
10425 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10427 Migrate to GNU General Public License Version 3.
10429 * COPYING: Replaced with the plain text version of GPLv3.
10431 * config.guess: Updated from gnulib.
10432 * config.sub: Likewise.
10434 * geninit.sh: Output a GPLv3 copyright notice.
10435 * geninitheader.sh: Likewise.
10436 * genmodsrc.sh: Likewise.
10437 * gensymlist.sh.in: Likewise.
10439 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10440 * boot/i386/pc/diskboot.S: Likewise.
10441 * boot/i386/pc/pxeboot.S: Likewise.
10442 * commands/blocklist.c: Likewise.
10443 * commands/boot.c: Likewise.
10444 * commands/cat.c: Likewise.
10445 * commands/cmp.c: Likewise.
10446 * commands/configfile.c: Likewise.
10447 * commands/echo.c: Likewise.
10448 * commands/help.c: Likewise.
10449 * commands/ls.c: Likewise.
10450 * commands/search.c: Likewise.
10451 * commands/terminal.c: Likewise.
10452 * commands/test.c: Likewise.
10453 * commands/videotest.c: Likewise.
10454 * commands/i386/cpuid.c: Likewise.
10455 * commands/i386/pc/halt.c: Likewise.
10456 * commands/i386/pc/play.c: Likewise.
10457 * commands/i386/pc/reboot.c: Likewise.
10458 * commands/i386/pc/vbeinfo.c: Likewise.
10459 * commands/i386/pc/vbetest.c: Likewise.
10460 * commands/ieee1275/halt.c: Likewise.
10461 * commands/ieee1275/reboot.c: Likewise.
10462 * commands/ieee1275/suspend.c: Likewise.
10463 * disk/loopback.c: Likewise.
10464 * disk/lvm.c: Likewise.
10465 * disk/raid.c: Likewise.
10466 * disk/efi/efidisk.c: Likewise.
10467 * disk/i386/pc/biosdisk.c: Likewise.
10468 * disk/ieee1275/ofdisk.c: Likewise.
10469 * font/manager.c: Likewise.
10470 * fs/affs.c: Likewise.
10471 * fs/ext2.c: Likewise.
10472 * fs/fat.c: Likewise.
10473 * fs/fshelp.c: Likewise.
10474 * fs/hfs.c: Likewise.
10475 * fs/hfsplus.c: Likewise.
10476 * fs/iso9660.c: Likewise.
10477 * fs/jfs.c: Likewise.
10478 * fs/minix.c: Likewise.
10479 * fs/sfs.c: Likewise.
10480 * fs/ufs.c: Likewise.
10481 * fs/xfs.c: Likewise.
10482 * hello/hello.c: Likewise.
10483 * include/grub/acorn_filecore.h: Likewise.
10484 * include/grub/arg.h: Likewise.
10485 * include/grub/bitmap.h: Likewise.
10486 * include/grub/boot.h: Likewise.
10487 * include/grub/cache.h: Likewise.
10488 * include/grub/device.h: Likewise.
10489 * include/grub/disk.h: Likewise.
10490 * include/grub/dl.h: Likewise.
10491 * include/grub/elfload.h: Likewise.
10492 * include/grub/env.h: Likewise.
10493 * include/grub/err.h: Likewise.
10494 * include/grub/file.h: Likewise.
10495 * include/grub/font.h: Likewise.
10496 * include/grub/fs.h: Likewise.
10497 * include/grub/fshelp.h: Likewise.
10498 * include/grub/gzio.h: Likewise.
10499 * include/grub/hfs.h: Likewise.
10500 * include/grub/kernel.h: Likewise.
10501 * include/grub/loader.h: Likewise.
10502 * include/grub/lvm.h: Likewise.
10503 * include/grub/misc.h: Likewise.
10504 * include/grub/mm.h: Likewise.
10505 * include/grub/net.h: Likewise.
10506 * include/grub/normal.h: Likewise.
10507 * include/grub/parser.h: Likewise.
10508 * include/grub/partition.h: Likewise.
10509 * include/grub/pc_partition.h: Likewise.
10510 * include/grub/raid.h: Likewise.
10511 * include/grub/rescue.h: Likewise.
10512 * include/grub/script.h: Likewise.
10513 * include/grub/setjmp.h: Likewise.
10514 * include/grub/symbol.h: Likewise.
10515 * include/grub/term.h: Likewise.
10516 * include/grub/terminfo.h: Likewise.
10517 * include/grub/tparm.h: Likewise.
10518 * include/grub/types.h: Likewise.
10519 * include/grub/video.h: Likewise.
10520 * include/grub/efi/api.h: Likewise.
10521 * include/grub/efi/chainloader.h: Likewise.
10522 * include/grub/efi/console.h: Likewise.
10523 * include/grub/efi/console_control.h: Likewise.
10524 * include/grub/efi/disk.h: Likewise.
10525 * include/grub/efi/efi.h: Likewise.
10526 * include/grub/efi/pe32.h: Likewise.
10527 * include/grub/efi/time.h: Likewise.
10528 * include/grub/i386/linux.h: Likewise.
10529 * include/grub/i386/setjmp.h: Likewise.
10530 * include/grub/i386/types.h: Likewise.
10531 * include/grub/i386/efi/kernel.h: Likewise.
10532 * include/grub/i386/efi/loader.h: Likewise.
10533 * include/grub/i386/efi/time.h: Likewise.
10534 * include/grub/i386/pc/biosdisk.h: Likewise.
10535 * include/grub/i386/pc/boot.h: Likewise.
10536 * include/grub/i386/pc/chainloader.h: Likewise.
10537 * include/grub/i386/pc/console.h: Likewise.
10538 * include/grub/i386/pc/init.h: Likewise.
10539 * include/grub/i386/pc/kernel.h: Likewise.
10540 * include/grub/i386/pc/loader.h: Likewise.
10541 * include/grub/i386/pc/memory.h: Likewise.
10542 * include/grub/i386/pc/multiboot.h: Likewise.
10543 * include/grub/i386/pc/serial.h: Likewise.
10544 * include/grub/i386/pc/time.h: Likewise.
10545 * include/grub/i386/pc/vbe.h: Likewise.
10546 * include/grub/i386/pc/vbeblit.h: Likewise.
10547 * include/grub/i386/pc/vbefill.h: Likewise.
10548 * include/grub/i386/pc/vbeutil.h: Likewise.
10549 * include/grub/i386/pc/vga.h: Likewise.
10550 * include/grub/ieee1275/ieee1275.h: Likewise.
10551 * include/grub/ieee1275/ofdisk.h: Likewise.
10552 * include/grub/powerpc/libgcc.h: Likewise.
10553 * include/grub/powerpc/setjmp.h: Likewise.
10554 * include/grub/powerpc/types.h: Likewise.
10555 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10556 * include/grub/powerpc/ieee1275/console.h: Likewise.
10557 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10558 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10559 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10560 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10561 * include/grub/powerpc/ieee1275/time.h: Likewise.
10562 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10563 * include/grub/sparc64/libgcc.h: Likewise.
10564 * include/grub/sparc64/setjmp.h: Likewise.
10565 * include/grub/sparc64/types.h: Likewise.
10566 * include/grub/sparc64/ieee1275/console.h: Likewise.
10567 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10568 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10569 * include/grub/sparc64/ieee1275/time.h: Likewise.
10570 * include/grub/util/biosdisk.h: Likewise.
10571 * include/grub/util/getroot.h: Likewise.
10572 * include/grub/util/lvm.h: Likewise.
10573 * include/grub/util/misc.h: Likewise.
10574 * include/grub/util/raid.h: Likewise.
10575 * include/grub/util/resolve.h: Likewise.
10576 * io/gzio.c: Likewise.
10577 * kern/device.c: Likewise.
10578 * kern/disk.c: Likewise.
10579 * kern/dl.c: Likewise.
10580 * kern/elf.c: Likewise.
10581 * kern/env.c: Likewise.
10582 * kern/err.c: Likewise.
10583 * kern/file.c: Likewise.
10584 * kern/fs.c: Likewise.
10585 * kern/loader.c: Likewise.
10586 * kern/main.c: Likewise.
10587 * kern/misc.c: Likewise.
10588 * kern/mm.c: Likewise.
10589 * kern/parser.c: Likewise.
10590 * kern/partition.c: Likewise.
10591 * kern/rescue.c: Likewise.
10592 * kern/term.c: Likewise.
10593 * kern/efi/efi.c: Likewise.
10594 * kern/efi/init.c: Likewise.
10595 * kern/efi/mm.c: Likewise.
10596 * kern/i386/dl.c: Likewise.
10597 * kern/i386/efi/init.c: Likewise.
10598 * kern/i386/efi/startup.S: Likewise.
10599 * kern/i386/pc/init.c: Likewise.
10600 * kern/i386/pc/lzo1x.S: Likewise.
10601 * kern/i386/pc/startup.S: Likewise.
10602 * kern/ieee1275/ieee1275.c: Likewise.
10603 * kern/powerpc/cache.S: Likewise.
10604 * kern/powerpc/dl.c: Likewise.
10605 * kern/powerpc/ieee1275/cmain.c: Likewise.
10606 * kern/powerpc/ieee1275/crt0.S: Likewise.
10607 * kern/powerpc/ieee1275/init.c: Likewise.
10608 * kern/powerpc/ieee1275/openfw.c: Likewise.
10609 * kern/sparc64/cache.S: Likewise.
10610 * kern/sparc64/dl.c: Likewise.
10611 * kern/sparc64/ieee1275/init.c: Likewise.
10612 * kern/sparc64/ieee1275/openfw.c: Likewise.
10613 * loader/efi/chainloader.c: Likewise.
10614 * loader/efi/chainloader_normal.c: Likewise.
10615 * loader/i386/efi/linux.c: Likewise.
10616 * loader/i386/efi/linux_normal.c: Likewise.
10617 * loader/i386/pc/chainloader.c: Likewise.
10618 * loader/i386/pc/chainloader_normal.c: Likewise.
10619 * loader/i386/pc/linux.c: Likewise.
10620 * loader/i386/pc/linux_normal.c: Likewise.
10621 * loader/i386/pc/multiboot.c: Likewise.
10622 * loader/i386/pc/multiboot_normal.c: Likewise.
10623 * loader/powerpc/ieee1275/linux.c: Likewise.
10624 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10625 * normal/arg.c: Likewise.
10626 * normal/cmdline.c: Likewise.
10627 * normal/command.c: Likewise.
10628 * normal/completion.c: Likewise.
10629 * normal/execute.c: Likewise.
10630 * normal/function.c: Likewise.
10631 * normal/lexer.c: Likewise.
10632 * normal/main.c: Likewise.
10633 * normal/menu.c: Likewise.
10634 * normal/menu_entry.c: Likewise.
10635 * normal/misc.c: Likewise.
10636 * normal/parser.y: Likewise.
10637 * normal/script.c: Likewise.
10638 * normal/i386/setjmp.S: Likewise.
10639 * normal/powerpc/setjmp.S: Likewise.
10640 * normal/sparc64/setjmp.S: Likewise.
10641 * partmap/acorn.c: Likewise.
10642 * partmap/amiga.c: Likewise.
10643 * partmap/apple.c: Likewise.
10644 * partmap/gpt.c: Likewise.
10645 * partmap/pc.c: Likewise.
10646 * partmap/sun.c: Likewise.
10647 * term/gfxterm.c: Likewise.
10648 * term/terminfo.c: Likewise.
10649 * term/efi/console.c: Likewise.
10650 * term/i386/pc/console.c: Likewise.
10651 * term/i386/pc/serial.c: Likewise.
10652 * term/i386/pc/vesafb.c: Likewise.
10653 * term/i386/pc/vga.c: Likewise.
10654 * term/ieee1275/ofconsole.c: Likewise.
10655 * util/biosdisk.c: Likewise.
10656 * util/console.c: Likewise.
10657 * util/genmoddep.c: Likewise.
10658 * util/getroot.c: Likewise.
10659 * util/grub-emu.c: Likewise.
10660 * util/grub-mkdevicemap.c: Likewise.
10661 * util/grub-probe.c: Likewise.
10662 * util/lvm.c: Likewise.
10663 * util/misc.c: Likewise.
10664 * util/raid.c: Likewise.
10665 * util/resolve.c: Likewise.
10666 * util/update-grub.in: Likewise.
10667 * util/update-grub_lib.in: Likewise.
10668 * util/grub.d/00_header.in: Likewise.
10669 * util/grub.d/10_hurd.in: Likewise.
10670 * util/grub.d/10_linux.in: Likewise.
10671 * util/i386/efi/grub-install.in: Likewise.
10672 * util/i386/efi/grub-mkimage.c: Likewise.
10673 * util/i386/pc/grub-install.in: Likewise.
10674 * util/i386/pc/grub-mkimage.c: Likewise.
10675 * util/i386/pc/grub-mkrescue.in: Likewise.
10676 * util/i386/pc/grub-setup.c: Likewise.
10677 * util/i386/pc/misc.c: Likewise.
10678 * util/powerpc/ieee1275/grub-install.in: Likewise.
10679 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10680 * util/powerpc/ieee1275/misc.c: Likewise.
10681 * video/bitmap.c: Likewise.
10682 * video/video.c: Likewise.
10683 * video/i386/pc/vbe.c: Likewise.
10684 * video/i386/pc/vbeblit.c: Likewise.
10685 * video/i386/pc/vbefill.c: Likewise.
10686 * video/i386/pc/vbeutil.c: Likewise.
10687 * video/readers/tga.c: Likewise.
10689 2007-07-02 Robert Millan <rmh@aybabtu.com>
10691 * conf/i386-efi.rmk: Replace obsolete reference to
10692 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10693 with util/getroot.c.
10694 * conf/powerpc-ieee1275.rmk: Likewise.
10695 * conf/sparc64-ieee1275.rmk: Likewise.
10697 * util/grub-emu.c (main): Fix unchecked pointer handling.
10699 2007-07-02 Robert Millan <rmh@aybabtu.com>
10701 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10702 invocation to fail, in order to support partition-less media.
10704 * util/i386/pc/grub-install.in: Likewise.
10706 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10707 which fs or partmap modules are needed (akin to its sister scripts).
10709 Also use grub-probe to get rid of unportable /proc/mounts check.
10711 Print the same informational message that the other scripts do, before
10714 2007-06-23 Robert Millan <rmh@aybabtu.com>
10716 * util/update-grub_lib.in (font_path): New function. Determine whether
10717 a font file can be found and, if so, echo the GRUB path to it.
10719 * util/update-grub.in: Handle multiple terminals depending on user
10720 input, platform availability and font file presence. Propagate
10721 variables of our findings to /etc/grub.d/ children.
10723 * util/grub.d/00_header.in: Handle multiple terminals, based on
10724 environment setup by update-grub.
10726 2007-06-23 Robert Millan <rmh@aybabtu.com>
10728 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10730 2007-06-21 Robert Millan <rmh@aybabtu.com>
10732 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10733 indicate end of data section in kernel image.
10734 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10735 GRUB_KERNEL_MACHINE_DATA_END.
10737 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10739 * kern/i386/efi/startup.S: Likewise.
10741 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10742 during image generation. Implement --prefix option to override this
10744 * util/i386/efi/grub-mkimage.c: Likewise.
10746 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10747 code to make path relative to its root into a separate function.
10749 * util/i386/pc/grub-install.in: Use newly provided
10750 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10751 pass the result to grub-install --prefix.
10753 2007-06-13 Robert Millan <rmh@aybabtu.com>
10755 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10756 DEFAULT_DEVICE_MAP.
10757 * util/grub-emu.c: Use above definitions from misc.h instead of
10759 * util/grub-mkdevicemap.c: Likewise.
10760 * util/i386/pc/grub-setup.c: Likewise.
10761 * util/grub-probe.c: Likewise.
10762 (probe): Abort with grub_util_error() when either
10763 grub_guess_root_device or grub_util_get_grub_dev fails.
10765 2007-06-12 Robert Millan <rmh@aybabtu.com>
10767 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10768 "pager" assignment.
10769 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10771 * util/grub-probe.c (probe): Likewise for "drive_name".
10773 2007-06-11 Robert Millan <rmh@aybabtu.com>
10775 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10776 not just the cdrom one.
10778 2007-06-11 Robert Millan <rmh@aybabtu.com>
10780 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10781 Add --pkglibdir=DIR option to override pkglibdir.
10782 Mention --image-type=TYPE in help output.
10783 Fix --grub-mkimage (it was a no-op).
10784 Abort gracefully when no parameter is given.
10786 2007-06-11 Robert Millan <rmh@aybabtu.com>
10788 * util/i386/pc/grub-mkrescue.in: New file.
10789 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10790 * Makefile.in: Handle bin_SCRIPTS.
10792 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10794 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10795 list of video modes.
10797 2007-06-06 Robert Millan <rmh@aybabtu.com>
10799 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10800 file doesn't exist, or if it is in a filesystem grub can't read.
10802 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10803 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10804 header comment to fit in 80 columns when the variables are resolved.
10806 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10807 could be identified by update-grub. Remove redundant check for
10808 unifont.pff existence (since convert_system_path_to_grub_path now
10811 2007-06-04 Robert Millan <rmh@aybabtu.com>
10813 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10815 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10817 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10819 2007-06-04 Robert Millan <rmh@aybabtu.com>
10821 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10823 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10824 grub_apple_partition_map_fini.
10827 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10828 to access >2 TiB disks).
10830 Print disk->total_sectors with %llu instead of %lu, since this
10831 variable is always 64-bit (prevents wrong disk size from being displayed
10832 on either >2 TiB disk or big-endian CPU).
10834 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10835 into a generic case that supports all (sane) partition maps.
10837 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10840 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10841 and grub_apple_partition_map_fini() after that.
10843 2007-06-01 Robert Millan <rmh@aybabtu.com>
10845 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10847 * util/grub.d/00_header.in: Only enable gfxterm when
10848 convert_system_path_to_grub_path() succeeds.
10850 2007-05-20 Robert Millan <rmh@aybabtu.com>
10852 * util/update-grub_lib.in: New file.
10853 * DISTLIST: Add update-grub_lib.in.
10854 * conf/common.rmk: Generate update-grub_lib and install it in
10856 * Makefile.in: Add install routine for $(lib_DATA).
10858 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10859 function provided by update-grub_lib to support arbitrary paths of
10861 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10862 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10864 2007-05-19 Robert Millan <rmh@aybabtu.com>
10866 * commands/i386/cpuid.c: New module.
10867 * DISTLIST: Add it.
10868 * conf/i386-efi.rmk: Enable cpuid.mod.
10869 * conf/i386-pc.rmk: Likewise.
10871 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10873 * kern/disk.c (grub_disk_read): Check return value of
10876 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10878 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10880 * disk/raid.c (grub_raid_open): Likewise.
10882 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10884 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10885 stack instead of on the heap.
10887 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10888 before doing a read on it.
10890 * configure.ac: Only use -fno-stack-protector for the target
10893 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10895 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10896 __attribute_ ((unused)) to mode_type argument.
10898 * util/getroot.c (grub_guess_root_device): Fix #endif.
10900 * kern/misc.c (memcmp): Fix prototype.
10902 * include/grub/partition.h [GRUB_UTIL]
10903 (grub_gpt_partition_map_init): Add prototype.
10904 (grub_gpt_partition_map_fini): Likewise.
10906 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10907 at the right place.
10909 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10910 (grub_fat_read_data): Likewise.
10911 (grub_fat_find_dir): Likewise.
10913 * font/manager.c (find_glyph): Make table a const.
10914 (grub_font_get_glyph): Remove bitmap from if statement.
10916 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
10918 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10919 code, first search for device in /dev/mapper, then in /dev.
10920 (grub_util_get_grub_dev): New function.
10921 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10923 * util/grub-probe.c (probe): Remove check for RAID, call
10924 grub_util_get_grub_dev() instead of
10925 grub_util_biosdisk_get_grub_dev().
10926 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10927 grub_util_biosdisk_get_grub_dev().
10928 * util/i386/pc/grub-setup.c (main): Likewise.
10930 2007-05-16 Robert Millan <rmh@aybabtu.com>
10932 * DISTLIST: Update for the latest changes.
10933 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10934 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10935 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10936 grub/util/biosdisk.h.
10937 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10938 grub/util/biosdisk.h.
10940 2007-05-16 Robert Millan <rmh@aybabtu.com>
10942 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10944 2007-05-16 Robert Millan <rmh@aybabtu.com>
10946 * util/i386/efi/grub-install.in: New.
10947 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10948 newly added grub-install.
10949 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10951 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10952 grub/util/biosdisk.h.
10953 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10954 grub/util/biosdisk.h.
10956 2007-05-16 Robert Millan <rmh@aybabtu.com>
10958 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10959 * include/grub/util/biosdisk.h: ... here.
10960 * util/i386/pc/biosdisk.c: Moved to ...
10961 * util/biosdisk.c: ... here.
10962 * util/i386/pc/getroot.c: Moved to ...
10963 * util/getroot.c: ... here.
10964 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10965 * util/grub-mkdevicemap.c: ... here.
10966 * util/i386/pc/grub-probe.c: Moved to ...
10967 * util/grub-probe.c: ... here.
10969 2007-05-15 Robert Millan <rmh@aybabtu.com>
10971 * util/update-grub.in: Remove duplicated line in grub.cfg header
10974 2007-05-13 Robert Millan <rmh@aybabtu.com>
10976 * util/update-grub.in: Fix a few assumptions about the devices holding
10977 /, /boot and /boot/grub being the same.
10978 * util/grub.d/00_header.in: Likewise.
10979 * util/grub.d/10_hurd.in: Likewise.
10980 * util/grub.d/10_linux.in: Likewise.
10982 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10983 patterns. Use that to define the `.old' suffix as older than `'.
10985 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10987 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10988 the grub.cfg header message.
10990 2007-05-11 Robert Millan <rmh@aybabtu.com>
10992 * util/update-grub.in: Create device.map if it doesn't already exist,
10993 before attempting to run grub-probe.
10994 Check for grub-probe and grub-mkdevicemap with the same code
10995 grub-install is using.
10998 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11000 * Makefile.in: Add the datarootdir autoconf variable.
11002 2007-05-09 Robert Millan <rmh@aybabtu.com>
11004 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11005 fail gracefully if dev->disk->partition == NULL.
11007 2007-05-07 Robert Millan <rmh@aybabtu.com>
11009 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11010 determine partition map module.
11011 * util/i386/pc/grub-install.in: Use this feature to decide which
11012 partition module to load, instead of hardcoding pc and gpt.
11014 2007-05-07 Robert Millan <rmh@aybabtu.com>
11016 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11017 source directory differs from build directory.
11019 2007-05-05 Robert Millan <rmh@aybabtu.com>
11021 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11024 2007-05-05 Robert Millan <rmh@aybabtu.com>
11026 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11028 2007-05-05 Robert Millan <rmh@aybabtu.com>
11030 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11031 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11033 2007-05-05 Robert Millan <rmh@aybabtu.com>
11035 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11036 (grub_probe_SOURCES): Likewise.
11037 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11038 GPT and initialize dos_part and bsd_part accordingly.
11039 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11041 (main): Activate gpt module for use during partition identification,
11042 and deactivate it afterwards.
11043 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11044 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11045 partition identification, and deactivate it afterwards.
11047 2007-05-05 Robert Millan <rmh@aybabtu.com>
11049 * term/i386/pc/console.c (grub_console_fini): Call
11050 grub_term_set_current() before grub_term_unregister().
11052 2007-05-04 Robert Millan <rmh@aybabtu.com>
11054 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11055 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11056 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11057 and update-grub_DATA.
11058 * conf/common.rmk: Build and install update-grub components.
11059 * conf/common.mk: Regenerate.
11060 * util/update-grub.in: New. Core of update-grub.
11061 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11062 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11063 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11064 * util/grub.d/README: New. Document grub.d directory layout.
11066 2007-05-01 Robert Millan <rmh@aybabtu.com>
11068 * util/grub-emu.c: Move initialization functions
11069 grub_util_biosdisk_init() and grub_init_all() before
11070 grub_util_biosdisk_get_grub_dev(), which relies on them.
11072 2007-04-19 Robert Millan <rmh@aybabtu.com>
11074 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11077 2007-04-18 Jerone Young <jerone@gmail.com>
11079 * kernel/elf.c: Add missing parenthesis for conditional statement
11082 2007-04-10 Jerone Young <jerone@gmail.com>
11084 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11085 continue on and look for device node with real device name.
11087 2007-04-10 Jerone Young <jerone@gmail.com>
11089 * configure.ac: Add argument for autoconf to use transformation
11091 * Makefile.in: Add autoconf package transformation code.
11092 * util/i386/pc/grub-install.in: Likewise.
11093 * util/powerpc/ieee1275/grub-install.in: Likewise.
11095 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11097 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11098 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11099 (EXT2_REVISION): Likewise.
11100 (EXT2_INODE_SIZE): Likewise.
11101 (struct grub_ext2_block_group): Added a missing member
11103 (grub_ext2_read_inode): Divide by the inode size in a superblock
11104 instead of 128 to obtain INODES_PER_BLOCK.
11105 Use the macro EXT2_INODE_SIZE instead of directly using
11106 SBLOCK->INODE_SIZE.
11108 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11110 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11111 superblock instead of the structure size to compute an
11112 offset. This fixes the problem that GRUB could not read a
11113 filesystem when inode size is different from 128-byte.
11115 2007-03-05 Marco Gerards <marco@gnu.org>
11117 * normal/main.c (read_config_file): When "menu" is not set, create
11118 an initial context.
11120 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11122 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11123 (HEAP_LIMIT): New macro.
11124 (grub_claim_heap): Claim memory up to `heaplimit'.
11126 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11128 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11129 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11130 (_start): Likewise.
11131 (grub_arch_modules_addr): Return address after `_end'.
11132 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11133 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11134 (add_segments): Calculate `_end' from phdr size and location.
11135 (ALIGN_UP): Moved to ...
11136 * include/grub/misc.h: here.
11137 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11139 (GRUB_IEEE1275_MODULE_BASE): Removed.
11141 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11143 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11146 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11148 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11150 (grub_elf64_load_hook_t): Likewise.
11151 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11154 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11156 * kern/mm.c: Update copyright.
11157 (grub_mm_debug): Correct syntax error.
11158 (grub_mm_dump_free): New function.
11159 (grub_debug_free): Call `grub_free'.
11160 * include/grub/mm.h: Update copyright.
11161 (grub_mm_dump_free): Add declaration.
11163 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11165 * include/grub/ieee1275/ieee1275.h: Update copyright.
11166 * kern/powerpc/ieee1275/init.c: Likewise.
11167 * kern/powerpc/ieee1275/openfw.c: Likewise.
11169 * loader/powerpc/ieee1275/linux.c: Likewise.
11170 * include/grub/elfload.h: Likewise.
11171 * kern/elf.c: Likewise.
11172 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11174 (grub_elf64_load): Likewise.
11175 (grub_elf32_load_segment): Move to a nested function.
11176 (grub_elf64_load_segment): Likewise.
11178 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11180 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11182 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11183 (grub_heap_len): Likewise.
11184 (HEAP_SIZE): New macro.
11185 (grub_claim_heap): New function.
11186 (grub_machine_init): Don't claim heap directly. Call
11188 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11189 (grub_available_iterate): New function.
11191 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11193 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11194 * configure.ac: Use it for testing the HOST and TARGET compilers.
11196 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11198 * Makefile.in (enable_grub_emu): New variable.
11199 * configure.ac (--enable-grub-emu): New option.
11200 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11201 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11202 * conf/i386-pc.rmk: Likewise.
11203 * conf/powerpc-ieee1275.rmk: Likewise.
11204 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11206 2006-12-12 Marco Gerards <marco@gnu.org>
11208 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11210 * kern/env.c (grub_env_unset): Don't free the member `value' when
11211 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11214 * normal/main.c (current_menu): Removed.
11215 (free_menu): Unset the `menu' environment variable.
11216 (grub_normal_menu_addentry): Make use of the environment variable
11217 `menu', instead of using the global `current_menu'. Allocate
11218 memory for the sourcecode of this entry.
11219 (read_config_file): New argument `nested', changed all callers.
11220 Only in the case of a new context, initialize a new menu. Set the
11221 `menu' environment variable.
11222 (grub_normal_execute): Don't set and unset the environment
11223 variable `menu' here anymore. Only free the menu when leaving the
11226 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11229 2006-12-11 Marco Gerards <marco@gnu.org>
11231 * normal/menu_entry.c (run): Fix off by one bug so the last line
11232 is executed. Move the loader check to outside the loop.
11234 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11236 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11238 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11240 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11241 the number of sectors. Reported by Andrey Shuvikov
11242 <mr_hyro@yahoo.com>.
11244 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11246 * kern/disk.c (grub_disk_read): When there is a read error, always
11247 try to read only the necessary data.
11249 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11251 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11253 [GRUB_UTIL] (grub_raid_fini): Likewise.
11254 [GRUB_UTIL] (grub_lvm_init): Likewise.
11255 [GRUB_UTIL] (grub_lvm_fini): Likewise.
11256 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11257 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11258 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11259 and grub_raid_fini().
11261 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11263 * include/grub/types.h (__unused): Rename to UNUSED.
11264 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11265 (grub_elf64_size): Likewise.
11267 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11269 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11270 grub_error_push and grub_error_pop in the error-handling path.
11271 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11274 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11276 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11277 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11278 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11279 (kernel_elf_SOURCES): Likewise.
11280 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11281 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11282 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11283 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11284 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11285 (elf_mod_SOURCES): New variable.
11286 (elf_mod_CFLAGS): Likewise.
11287 (elf_mod_LDFLAGS): Likewise.
11288 * include/grub/types.h (__unused): New macro.
11289 * include/grub/elfload.h: New file.
11290 * kern/elf.c: Likewise.
11291 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11292 (ELF32_LOADMASK): New macro.
11293 (ELF64_LOADMASK): Likewise.
11294 (vmlinux): Removed.
11295 (grub_linux_load32): New function.
11296 (grub_linux_load64): Likewise.
11297 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11298 Use grub_elf_t instead of grub_file_t.
11300 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11302 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11303 `catch_result' to struct set_color_args.
11305 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11307 * normal/menu.c: Include grub/script.h.
11308 * normal/menu_entry.c: Likewise.
11309 * include/grub/normal.h: Do not include grub/script.h.
11311 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11313 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11315 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11317 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11319 (grub_disk_close): Print debug messages when closing a disk.
11320 (grub_disk_read): Print debug messages when disk read fails.
11321 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11323 * kern/partition.c: Include misc.h.
11324 (grub_partition_iterate): Print debug messages when detecting
11327 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11329 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11331 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11333 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11335 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11336 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11338 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11340 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11341 instead of sizeof(lv). Patch by Michael Guntsche.
11343 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11345 * disk/lvm.c: Rename VGS to VG_LIST.
11346 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11347 (grub_lvm_open): Likewise.
11348 Thanks to Michael Guntsche for finding this bug.
11350 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11352 * configure.ac (AC_INIT): Bumped to 1.95.
11354 2006-10-14 Robert Millan <rmh@aybabtu.com>
11356 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11357 with "/dev/.static/dev/md".
11359 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11361 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11362 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11363 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11364 DRIVE_NAME are always freed.
11366 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11367 DOS_PART, as a DOS partition is counted from one instead of zero
11368 now. Reported by Robert Millan.
11370 2006-10-14 Robert Millan <rmh@aybabtu.com>
11372 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11373 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11374 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11375 string returned by grub_guess_root_device.
11376 * util/i386/pc/grub-setup.c: Likewise.
11377 * util/i386/pc/grub-probefs.c: Likewise.
11379 * util/i386/pc/grub-probefs.c: Rename to ...
11380 * util/i386/pc/grub-probe.c: ... this.
11381 * DISTLIST: Remove grub-probefs, add grub-probe.
11382 * conf/i386-efi.rmk: Likewise.
11383 * conf/i386-pc.rmk: Likewise.
11384 * util/i386/pc/grub-install.in: Likewise.
11386 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11387 choose which information we want to print.
11389 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11391 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11392 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11393 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11394 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11395 video/readers/tga.c and video/i386/pc/vbeutil.c.
11397 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11399 Added support for RAID and LVM.
11401 * disk/lvm.c: New file.
11402 * disk/raid.c: Likewise.
11403 * include/grub/lvm.h: Likewise.
11404 * include/grub/raid.h: Likewise.
11405 * include/grub/util/lvm.h: Likewise.
11406 * include/grub/util/raid.h: Likewise.
11407 * util/lvm.c: Likewise.
11408 * util/raid.c: Likewise.
11410 * include/grub/disk.h (grub_disk_dev_id): Add
11411 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11412 (grub_disk_get_size): New prototype.
11413 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11414 returns a partition.
11415 (grub_disk_get_size): New function.
11417 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11418 verbatim if grub_install_dos_part is -2.
11420 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11423 * util/i386/pc/grub-setup.c (setup): New argument
11424 MUST_EMBED. Force embedding of GRUB when the argument is
11425 true. Close FILE before returning.
11426 (main): Add support for RAID and LVM.
11428 * conf/common.rmk: Add RAID and LVM modules.
11429 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11431 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11433 * kern/misc.c (grub_strstr): New function.
11434 * include/grub/misc.h (grub_strstr): New prototype.
11436 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11438 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11440 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11442 * kern/misc.c (grub_strtoull): Guess the base only if not
11445 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11447 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11450 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11452 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11454 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11455 Remove `flags' argument. All callers changed.
11456 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11457 (IEEE1275_IHANDLE_INVALID): New variable.
11458 (IEEE1275_CELL_INVALID): New variable.
11459 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11460 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11461 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11462 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11463 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11464 codes from Open Firmware. All callers updated.
11465 (grub_ieee1275_next_property): Directly return Open Firmware return
11467 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11468 Standardize error checking from `grub_ieee1275_get_property'.
11469 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11470 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11472 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11474 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11475 `instance_to_package_args' to `instance_to_path_args'.
11477 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11478 `grub_ieee1275_chosen'.
11480 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11481 `grub_ieee1275_interpret'.
11483 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11485 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11487 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11489 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11490 (__cmpdi): Likewise.
11492 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11493 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11496 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11498 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11499 to type `grub_ssize_t'.
11500 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11502 2006-09-22 Marco Gerards <marco@gnu.org>
11504 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11507 2006-09-22 Marco Gerards <marco@gnu.org>
11509 * commands/echo.c: New file.
11511 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11513 * conf/common.rmk (echo_mod_SOURCES): New variable.
11514 (echo_mod_CFLAGS): Likewise.
11515 (echo_mod_LDFLAGS): Likewise.
11517 2006-09-22 Marco Gerards <marco@gnu.org>
11519 * normal/main.c (get_line): Malloc memory instead of using
11520 preallocated memory. Removed the arguments `cmdline' and
11521 `max_len'. Updated all callers.
11523 2006-09-22 Marco Gerards <marco@gnu.org>
11525 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11526 (normal_mod_DEPENDENCIES): Likewise.
11528 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11529 (normal_mod_DEPENDENCIES): Likewise.
11531 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11533 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
11535 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11537 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11538 (normal_mod_DEPENDENCIES): Likewise.
11539 * conf/i386-pc.mk: Regenerate.
11540 * conf/i386-efi.mk: Likewise
11541 * conf/common.mk: Likewise.
11542 * conf/powerpc-ieee1275.mk: Likewise.
11543 * conf/sparc64-ieee1275.mk: Likewise.
11545 2006-09-22 Robert Millan <rmh@aybabtu.com>
11547 Sync with i386 version.
11548 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11549 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11551 2006-09-21 Robert Millan <rmh@aybabtu.com>
11553 Import from GRUB Legacy (lib/device.c):
11554 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11555 (init_device_map) [__linux__]: Add support for I2O devices.
11557 2006-09-14 Marco Gerards <marco@gnu.org>
11559 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11562 2006-09-14 Robert Millan <rmh@aybabtu.com>
11564 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11567 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11569 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11570 before adding it to device.map.
11572 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
11574 * genmk.rb: Let GCC generate dependencies the first time it
11575 compiles a file; using the -MD option.
11576 * conf/common.mk: Regenerate.
11577 * conf/i386-pc.mk: Likewise.
11578 * conf/i386-efi.mk: Likewise.
11579 * conf/powerpc-ieee1275.mk: Likewise.
11580 * conf/sparc64-ieee1275.mk: Likewise.
11582 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11584 Move the prototypes of grub_setjmp and grub_longjmp to
11585 cpu/setjmp.h, so that each architecture may specify different
11588 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11589 (grub_longjmp): Likewise.
11590 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11591 (grub_longjmp): Likewise.
11592 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11593 (grub_longjmp): Likewise.
11595 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11596 [!GRUB_UTIL] (grub_longjmp): Removed.
11598 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11600 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11601 "color!" method does not return any value.
11603 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11605 * include/grub/bitmap.h: New file.
11607 * include/grub/i386/pc/vbeutil.h: Likewise.
11609 * video/bitmap.c: Likewise.
11611 * video/readers/tga.c: Likewise.
11613 * video/i386/pc/vbeutil.c: Likewise.
11615 * commands/videotest.c: Code cleanup and updated to reflect to new
11618 * term/gfxterm.c: Likewise.
11620 * video/video.c: Likewise.
11622 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11623 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11624 (bitmap_mod_SOURCES): New entry.
11625 (bitmap_mod_CFLAGS): Likewise.
11626 (bitmap_mod_LDFLAGS): Likewise.
11627 (tga_mod_SOURCES): Likewise.
11628 (tga_mod_CFLAGS): Likewise.
11629 (tga_mod_LDFLAGS): Likewise.
11631 * include/grub/video.h (grub_video_blit_operators): New enum type.
11632 (grub_video_render_target): Changed as forward declaration and moved
11633 actual definition to be video driver specific.
11634 (grub_video_adapter.blit_bitmap): Added blitting operator.
11635 (grub_video_adapter.blit_render_target): Likewise.
11636 (grub_video_blit_bitmap): Likewise.
11637 (grub_video_blit_render_target): Likewise.
11639 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11640 driver specific render target definition.
11641 (grub_video_vbe_map_rgba): Added driver internal helper.
11642 (grub_video_vbe_unmap_color): Updated to use
11643 grub_video_i386_vbeblit_info.
11644 (grub_video_vbe_get_video_ptr): Likewise.
11646 * include/grub/i386/pc/vbeblit.h
11647 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11648 grub_video_i386_vbeblit_info.
11649 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11650 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11651 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11652 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11653 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11654 (grub_video_i386_vbeblit_index_index): Likewise.
11655 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11656 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11657 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11658 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11660 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11663 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11664 include/grub/i386/pc/vbeblit.h.
11666 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11667 Updated to use grub_video_i386_vbeblit_info.
11668 (grub_video_i386_vbefill_R8G8B8): Likewise.
11669 (grub_video_i386_vbefill_index): Likewise.
11670 (grub_video_i386_vbefill): Added generic filler.
11672 * video/i386/pc/vbefill.c: Updated to reflect changes on
11673 include/grub/i386/pc/vbefill.h.
11675 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11676 grub_video_i386_vbeblit_info.
11677 (grub_video_vbe_unmap_color): Likewise.
11678 (grub_video_vbe_blit_glyph): Likewise.
11679 (grub_video_vbe_scroll): Likewise.
11680 (grub_video_vbe_draw_pixel): Removed function.
11681 (grub_video_vbe_get_pixel): Likewise.
11682 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11683 updated code to use it.
11684 (common_blitter): Added common blitter for render target and bitmap.
11685 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11686 (grub_video_vbe_blit_render_target): Likewise.
11688 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
11690 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11691 is in text mode if there is no console control protocol instance
11694 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11696 * include/grub/video.h: Code cleanup.
11698 * include/grub/i386/pc/vbe.h: Likewise.
11700 * video/i386/pc/vbe.c: Likewise.
11702 * video/i386/pc/vbeblit.c: Likewise.
11704 * video/i386/pc/vbefill.c: Likewise.
11706 * video/video.c: Likewise. Also added more comments.
11708 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11710 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11711 (struct grub_biosdisk_dap): Likewise.
11713 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11714 linkage settings for all functions.
11716 2006-07-12 Marco Gerards <marco@gnu.org>
11718 * configure.ac (--enable-mm-debug): Fix typo.
11720 * genkernsyms.sh.in: Use proper quoting for `CC'.
11722 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11724 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11725 (normal_mod_ASFLAGS): Remove "-m32".
11727 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11729 * util/misc.c: Include config.h.
11730 [!HAVE_MEMALIGN]: Do not include malloc.h.
11731 (grub_memalign): Use posix_memalign, if present. Then, use
11732 memalign, if present. Otherwise, emit an error.
11734 * util/grub-emu.c: Do not include malloc.h.
11736 * include/grub/util/misc.h: Include unistd.h. This is required for
11737 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11738 D. Eades III <hde@foobar-qux.org>.
11740 * configure.ac (AC_GNU_SOURCE): Added.
11741 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11744 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11746 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11747 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11749 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11751 * include/grub/types.h (grub_host_addr_t): Rename to
11752 grub_target_addr_t.
11753 (grub_host_off_t): Rename to grub_target_off_t.
11754 (grub_host_size_t): Rename to grub_target_size_t.
11755 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11756 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11758 * include/grub/kernel.h (struct grub_module_header): Change type
11759 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11760 (grub_module_info): Likewise.
11762 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11764 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11765 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11766 Velazquez <jesus.velazquez@gmail.com>.
11768 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11770 Count partitions from 1 instead of 0 in the string representation
11771 of partitions. Still use 0-based internally.
11773 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11774 (sun_partition_map_iterate): Use grub_partition_t instead of
11775 struct grub_partition *. Cast DESC->START_CYLINDER to
11776 grub_uint64_t after converting the endian.
11777 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11778 (sun_partition_map_get_name): Add 1 to P->INDEX.
11780 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11782 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11784 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11785 zero instead of one.
11786 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11787 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11789 * partmap/apple.c (apple_partition_map_iterate): Change the type
11790 of POS to unsigned.
11791 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11792 (apple_partition_map_get_name): Add 1 into P->INDEX.
11794 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11795 of POS to unsigned.
11796 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11797 calculate the offset of a partition.
11798 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11799 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11801 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11802 SECTOR to grub_disk_addr_t.
11803 (acorn_partition_map_iterate): Likewise.
11804 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11805 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11807 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11809 * kern/i386/pc/init.c (make_install_device): Add 1 into
11810 GRUB_INSTALL_DOS_PART.
11812 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11815 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11817 Clean up the code to support 64-bit addressing in disks and
11818 files. This change is not enough for filesystems yet.
11820 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11821 type of "start" to grub_uint64_t.
11822 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11823 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11824 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11827 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11828 to grub_disk_addr_t.
11830 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11833 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11835 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11838 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11840 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11842 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11844 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11845 to grub_off_t, to detect an error from grub_file_seek.
11846 (grub_multiboot_load_elf32): Likewise.
11848 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11849 maximum unsigned long value when an overflow is detected.
11850 (grub_strtoull): New function.
11851 (grub_divmod64): Likewise.
11852 (grub_lltoa): use grub_divmod64.
11854 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11856 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11857 the pointer to next character. Use grub_strtoull instead of
11859 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11860 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11863 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11864 return value is signed.
11865 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11866 test if OFFSET is less than zero, as OFFSET is unsigned now.
11868 * kern/disk.c (struct grub_disk_cache): Change the type of
11869 "sector" to grub_disk_addr_t.
11870 (grub_disk_cache_get_index): Change the type of SECTOR to
11871 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11872 unsigned after shifting.
11873 (grub_disk_cache_invalidate): Change the type of SECTOR to
11875 (grub_disk_cache_unlock): Likewise.
11876 (grub_disk_cache_store): Likewise.
11877 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11878 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11879 grub_disk_addr_t and grub_uint64_t, respectively.
11880 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11881 body, as the value of OFFSET is tweaked by
11882 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11883 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11885 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11886 body, as the value of OFFSET is tweaked by
11887 grub_disk_check_range. Change the types of LEN and N to
11890 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11891 and "saved_offset" to grub_off_t.
11892 (test_header): Cast BUF to char *.
11893 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11895 (grub_gzio_read): Change the types of OFFSET and SIZE to
11896 grub_off_t and grub_size_t, respectively.
11898 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11900 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11901 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11902 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11903 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11904 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11906 * include/grub/types.h (grub_off_t): Unconditionally set to
11908 (grub_disk_addr_t): Changed to grub_uint64_t.
11910 * include/grub/partition.h (struct grub_partition): Change the
11911 types of "start", "len" and "offset" to grub_disk_addr_t,
11912 grub_uint64_t and grub_disk_addr_t, respectively.
11913 (grub_partition_get_start): Return grub_disk_addr_t.
11914 (grub_partition_get_len): Return grub_uint64_t.
11916 * include/grub/misc.h (grub_strtoull): New prototype.
11917 (grub_divmod64): Likewise.
11919 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11920 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11921 grub_off_t, respectively.
11922 All callers and references changed.
11924 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11925 grub_size_t in "read".
11926 All callers and references changed.
11928 * include/grub/file.h (struct grub_file): Change the types of
11929 "offset" and "size" to grub_off_t and grub_off_t,
11930 respectively. Change the type of SECTOR to grub_disk_addr_t in
11932 (grub_file_read): Change the type of LEN to grub_size_t.
11933 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11935 (grub_file_size): Return grub_off_t.
11936 (grub_file_tell): Likewise.
11937 All callers and references changed.
11939 * include/grub/disk.h (struct grub_disk_dev): Change the types of
11940 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11942 (struct grub_disk): Change the type of "total_sectors" to
11943 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11945 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11946 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11947 (grub_disk_write): Likewise.
11948 All callers and references changed.
11950 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11951 char * for grub_strncmp to silence gcc.
11952 (grub_iso9660_mount): Likewise.
11953 (grub_iso9660_mount): Likewise.
11954 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11956 (grub_iso9660_iterate_dir): Likewise.
11957 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11959 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11960 LEN to grub_disk_addr_t and grub_size_t, respectively.
11962 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11964 * fs/jfs.c (grub_jfs_read_file): Likewise.
11966 * fs/minix.c (grub_jfs_read_file): Likewise.
11968 * fs/sfs.c (grub_jfs_read_file): Likewise.
11970 * fs/ufs.c (grub_jfs_read_file): Likewise.
11972 * fs/xfs.c (grub_jfs_read_file): Likewise.
11974 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11975 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11978 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11979 BLKNR to -1 instead of returning GRUB_ERRNO.
11980 (grub_ext2_read_file): Change the types of SECTOR and
11981 LEN to grub_disk_addr_t and grub_size_t, respectively.
11983 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11984 LEN to grub_disk_addr_t and grub_size_t, respectively.
11986 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11989 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11990 string. Do not cast SECTOR explicitly.
11992 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11993 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11994 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11995 grub_disk_addr_t and grub_size_t, respectively. If the sector is
11996 over 2TB and LBA mode is not supported, raise an error.
11997 (get_safe_sectors): New function.
11998 (grub_biosdisk_read): Use get_safe_sectors.
11999 (grub_biosdisk_write): Likewise.
12001 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12002 (grub_efidisk_write): Likewise.
12004 * disk/loopback.c (delete_loopback): Cosmetic changes.
12005 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12007 (grub_loopback_open): Likewise.
12008 (grub_loopback_read): Likewise. Also, change the type of POS to
12009 grub_off_t, and fix the usage of grub_memset.
12011 * commands/i386/pc/play.c: Include grub/machine/time.h.
12013 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12016 * commands/configfile.c: Include grub/env.h.
12018 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12019 GRUB_ERRNO directly instead. Change the type of POS to
12020 grub_off_t. Follow the coding standard.
12022 * commands/blocklist.c: Include grub/partition.h.
12023 (grub_cmd_blocklist): Return an error if the underlying device is
12024 not a disk. Take the starting sector of a partition into account,
12025 if a partition is used.
12027 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12029 (lba_mode): Support 64-bit addresses.
12030 (chs_mode): Likewise.
12031 (copy_buffer): Adapted to the new offsets of a length field and a
12033 (blocklist_default_start): Allocate 64-bit space.
12035 * boot/i386/pc/boot.S (force_lba): Removed.
12036 (boot_drive): Moved to under KERNEL_SECTOR.
12037 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12039 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12041 (lba_mode): Refactored to support a 64-bit address. More size
12043 (setup_sectors): Likewise.
12045 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12047 * DISTLIST: Added include/grub/i386/linux.h. Removed
12048 include/grub/i386/pc/linux.h
12050 * configure.ac (AC_INIT): Bumped to 1.94.
12052 * config.guess: Updated from gnulib.
12053 * config.sub: Likewise.
12054 * install-sh: Likewise.
12055 * mkinstalldirs: Likewise.
12057 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12059 * conf/common.rmk (grub_modules_init.lst): Depended on
12060 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12063 * genmk.rb (PModule::rule): Reverted the previous change.
12065 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12067 * conf/common.rmk (grub_modules_init.lst): Depends on
12068 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12069 that the target does not exist before producing.
12070 (grub_modules_init.h): Remove the target before generating.
12071 (grub_emu_init.c): Likewise.
12073 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12075 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12077 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12078 for the target-specific tests. Make sure that we also have the
12079 up-to-date target variables for those tests.
12081 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12083 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12084 (PModule::rule): Likewise.
12086 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12088 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12089 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12090 target-specific flags should be prefixed.
12091 (PModule::rule): Likewise.
12093 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12095 * configure.ac (CMP): Check if cmp is available explicitly.
12097 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12099 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12100 (target_cpu): New variable.
12101 (pkglibdir): Use target_cpu instead of host_cpu.
12103 * util/i386/pc/grub-install.in (host_cpu): Removed.
12104 (target_cpu): New variable.
12105 (pkglibdir): Use target_cpu instead of host_cpu.
12107 * util/genmoddep.c: Removed.
12109 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12110 instead of GRUB_HOST_SIZEOF_VOID_P.
12111 * kern/dl.c: Likewise.
12113 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12115 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12116 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12117 (GRUB_TARGET_SIZEOF_LONG): ... this.
12118 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12119 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12120 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12122 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12123 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12124 (GRUB_TARGET_SIZEOF_LONG): ... this.
12125 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12126 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12127 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12129 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12130 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12131 (GRUB_TARGET_SIZEOF_LONG): ... this.
12132 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12133 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12135 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12136 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12137 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12138 instead of GRUB_HOST_SIZEOF_LONG.
12139 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12140 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12141 GRUB_CPU_WORDS_BIGENDIAN.
12142 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12143 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12146 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12147 (genmoddep_SOURCES): Likewise.
12148 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12149 (genmoddep_SOURCES): Likewise.
12150 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12151 (genmoddep_SOURCES): Likewise.
12152 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12154 (genmoddep_SOURCES): Likewise.
12156 * genmoddep.awk: New file.
12158 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12159 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12160 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12161 (PModule::rule): Likewise.
12162 (Program::rule): Likewise.
12163 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12164 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12167 * configure.ac: Rewritten intensively to use host and target
12168 instead of build and host, respectively.
12170 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12171 (host_cpu): Removed.
12172 (target_cpu): New variable.
12173 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12174 (BUILD_CC): Removed.
12175 (BUILD_CFLAGS): Likewise.
12176 (BUILD_CPPFLAGS): Likewise.
12177 (TARGET_CC): New variable.
12178 (TARGET_CFLAGS): Likewise.
12179 (TARGET_CPPFLAGS): Likewise.
12180 (TARGET_LDFLAGS): Likewise.
12182 (include): Use target_cpu instead of host_cpu.
12183 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12185 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12187 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12189 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12190 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12191 field 'false' to 'exec_on_false'.
12192 (grub_script_create_cmdif): Renamed argument names to reflect above
12195 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12197 * normal/script.c (grub_script_create_cmdif): Likewise.
12199 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12201 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12203 (grub_hfsplus_btree_recptr): Likewise.
12204 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12205 FILEBLOCK both to pass a block number and store next block
12207 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12208 overflow file correctly. Specify errors appropriately, because
12209 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12210 grub_hfsplus_btree_recptr to get the pointer to a found key.
12211 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12214 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12216 (_linux_mod_SOURCES): New variable.
12217 (_linux_mod_CFLAGS): Likewise.
12218 (_linux_mod_LDFLAGS): Likewise.
12219 (linux_mod_SOURCES): Likewise.
12220 (linux_mod_CFLAGS): Likewise.
12221 (linux_mod_LDFLAGS): Likewise.
12223 * DISTLIST: Added loader/i386/efi/linux.c,
12224 loader/i386/efi/linux_normal.c and
12225 include/grub/i386/efi/loader.h.
12227 * loader/i386/efi/linux.c: New file.
12228 * loader/i386/efi/linux_normal.c: Likewise.
12229 * include/grub/i386/efi/loader.h: Likewise.
12231 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12233 * commands/blocklist.c: New file.
12235 * DISTLIST: Added commands/blocklist.c.
12237 * term/efi/console.c (grub_console_highlight_color): Use a lighter
12238 color for the background, and a darker color for the foreground.
12239 (grub_console_checkkey): Return READ_KEY.
12240 (grub_console_cls): Set the background to
12241 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12243 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12245 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12246 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12248 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12251 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12252 BG. The spec is wrong again.
12254 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12256 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12258 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12259 commands/blocklist.c.
12260 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12262 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12263 (blocklist_mod_SOURCES): New variable.
12264 (blocklist_mod_CFLAGS): Likewise.
12265 (blocklist_mod_LDFLAGS): Likewise.
12267 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12269 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12271 (lba_mode): Use %eax more intensively to reduce the code size.
12273 2006-05-20 Marco Gerards <marco@gnu.org>
12275 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12277 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12279 (script): Accept leading newlines.
12280 (newlines): New rule to describe 0 or more newlines.
12281 (commands): Accept `command' with trailing newline. Fixed the
12282 order in which arguments were passed to `grub_script_add_cmd'.
12283 Accept commands separated by newlines.
12284 (function): Changed to accept newlines.
12285 (menuentry) Rewritten.
12287 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12288 front of the list, instead of to the end.
12290 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12292 * util/i386/pc/grub-install.in (bindir): New variable.
12293 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12294 Shaver <lbgwjl@gmail.com>.
12296 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12298 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12299 grub/machine/linux.h
12300 * loader/i386/pc/linux.c: Likewise.
12302 * include/grub/i386/pc/linux.h: Moved to ...
12303 * include/grub/i386/linux.h: ... here.
12305 * include/grub/i386/linux.h (struct linux_kernel_params): New
12308 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12310 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12312 (grub_video_vbe_blit_glyph): Likewise.
12313 (grub_video_vbe_blit_bitmap): Likewise.
12314 (grub_video_vbe_blit_render_target): Likewise.
12316 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12318 * configure.ac (--with-platform): Properly quote the square
12321 2006-05-08 Marco Gerards <marco@gnu.org>
12323 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12325 (kernel_elf_HEADERS): ...to this. Updated all users.
12326 (grubof_symlist.c): Renamed from this...
12327 (kernel_elf_symlist.c): ...to this. Updated all users.
12328 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12329 (grubof_SOURCES): Renamed from this...
12330 (kernel_elf_SOURCES): ...to this.
12331 (grubof_HEADERS): Renamed from this...
12332 (kernel_elf_HEADERS): ...to this.
12333 (grubof_CFLAGS): Renamed from this...
12334 (kernel_elf_CFLAGS): ...to this.
12335 (grubof_ASFLAGS): Renamed from this...
12336 (kernel_elf_ASFLAGS): ...to this.
12337 (grubof_LDFLAGS): Renamed from this...
12338 (kernel_elf_LDFLAGS): ...to this.
12340 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12342 (kernel_elf_HEADERS): ...to this. Updated all users.
12343 (grubof_symlist.c): Renamed from this...
12344 (kernel_elf_symlist.c): ...to this. Updated all users.
12345 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12346 (grubof_SOURCES): Renamed from this...
12347 (kernel_elf_SOURCES): ...to this.
12348 (grubof_HEADERS): Renamed from this...
12349 (kernel_elf_HEADERS): ...to this.
12350 (grubof_CFLAGS): Renamed from this...
12351 (kernel_elf_CFLAGS): ...to this.
12352 (grubof_ASFLAGS): Renamed from this...
12353 (kernel_elf_ASFLAGS): ...to this.
12354 (grubof_LDFLAGS): Renamed from this...
12355 (kernel_elf_LDFLAGS): ...to this.
12357 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12358 `kernel.elf' instead of `grubof'.
12360 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12362 Add --with-platform to configure. Use pkglibdir instead of
12363 pkgdatadir. This is reported by Roger Leigh.
12365 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12366 (host_vendor): Likewise.
12367 (host_os): Likewise.
12368 (pkgdatadir): Likewise.
12369 (platform): New variable.
12370 (pkglibdir): Likewise.
12371 Use PKGLIBDIR instead of PKGDATADIR.
12373 * util/i386/pc/grub-install.in (datadir): Removed.
12374 (host_vendor): Likewise.
12375 (host_os): Likewise.
12376 (pkgdatadir): Likewise.
12377 (platform): New variable.
12378 (pkglibdir): Likewise.
12379 Use PKGLIBDIR instead of PKGDATADIR.
12381 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12382 instead of GRUB_DATADIR.
12384 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12386 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12389 * configure.ac (--with-platform): New option.
12390 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12392 * Makefile.in: Include a makefile based on PLATFORM instead of
12394 (pkgdatadir): Not appended by the machine type.
12395 (pkglibdir): Appended by the machine type.
12396 (host_vendor): Removed.
12397 (platform): New variable.
12398 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12399 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12400 (uninstall): Likewise.
12402 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12404 Use the environment context in the menu. Remove the commands
12405 "default" and "timeout", and use variables instead.
12407 * normal/menu.c: Include grub/env.h.
12408 (print_entry): Cast TITLE to silence gcc.
12409 (get_timeout): New function.
12410 (set_timeout): Likewise.
12411 (get_entry_number): Likewise.
12412 (run_menu): Use a default entry, a fallback entry and a timeout
12413 in the environment variables "default", "fallback" and
12414 "timeout". Also, tweak the default entry if it is not within the
12415 current menu entries.
12416 (grub_menu_run): Use a fallback entry in the environment variable
12419 * normal/main.c (read_config_file): Do not initialize
12420 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12422 (grub_normal_execute): Use a data slot to store the menu.
12424 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12425 fallback_entry and timeout.
12426 (struct grub_menu_list): Removed.
12427 (grub_menu_list_t): Likewise.
12428 (struct grub_context): Likewise.
12429 (grub_context_t): Likewise.
12430 (grub_context_get): Likewise.
12431 (grub_context_get_current_menu): Likewise.
12432 (grub_context_push_menu): Likewise.
12433 (grub_context_pop_menu): Likewise.
12434 (grub_default_init): Likewise.
12435 (grub_default_fini): Likewise.
12436 (grub_timeout_init): Likewise.
12437 (grub_timeout_fini): Likewise.
12439 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12441 (normal_mod_SOURCES): Removed normal/context.c.
12443 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12444 commands/default.c, commands/timeout.c and normal/context.c.
12445 (normal_mod_SOURCES): Removed normal/context.c.
12447 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12448 commands/timeout.c and normal/context.c.
12449 (normal_mod_SOURCES): Removed normal/context.c.
12451 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12452 commands/default.c, commands/timeout.c and normal/context.c.
12453 (normal_mod_SOURCES): Removed normal/context.c.
12455 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12457 (default_mod_SOURCES): Removed.
12458 (default_mod_CFLAGS): Likewise.
12459 (default_mod_LDFLAGS): Likewise.
12460 (timeout_mod_SOURCES): Removed.
12461 (timeout_mod_CFLAGS): Likewise.
12462 (timeout_mod_LDFLAGS): Likewise.
12464 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12467 * commands/default.c: Removed.
12468 * commands/timeout.c: Likewise.
12469 * normal/context.c: Likewise.
12471 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12473 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12475 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12477 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12478 "next" to "prev" for readability.
12479 (struct grub_env_sorted_var): New struct.
12480 (grub_env_context): Renamed to ...
12481 (initial_context): ... this.
12482 (grub_env_var_context): Renamed to ...
12483 (current_context): ... this.
12484 (grub_env_find): Look only at CURRENT_CONTEXT.
12485 (grub_env_context_open): Rewritten to copy exported variables from
12487 (grub_env_context_close): Rewritten according to the new
12488 scheme. Also, add an assertion to prevent the initial context from
12490 (grub_env_insert): Removed the code for the sorted list.
12491 (grub_env_remove): Likewise.
12492 (grub_env_export): Simply mark the variable with
12493 GRUB_ENV_VAR_GLOBAL.
12494 (grub_env_set): A cosmetic change for naming consistency.
12495 (grub_env_get): Likewise.
12496 (grub_env_unset): Likewise.
12497 (grub_env_iterate): Rewritten to sort variables within this
12499 (grub_register_variable_hook): Fixed for naming consistency. Call
12500 grub_env_find again, only if NAME is not found at the first time.
12501 (mangle_data_slot_name): New function.
12502 (grub_env_set_data_slot): Likewise.
12503 (grub_env_get_data_slot): Likewise.
12504 (grub_env_unset_data_slot): Likewise.
12506 * include/grub/env.h (grub_env_var_type): New enum.
12507 (GRUB_ENV_VAR_LOCAL): New constant.
12508 (GRUB_ENV_VAR_GLOBAL): Likewise.
12509 (GRUB_ENV_VAR_DATA): Likewise.
12510 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12512 (grub_env_set): Replace VAR with NAME for consistency.
12513 (grub_register_variable_hook): Likewise.
12514 (grub_env_export): Specify the name of the argument.
12515 (grub_env_set_data_slot): New prototype.
12516 (grub_env_get_data_slot): Likewise.
12517 (grub_env_unset_data_slot): Likewise.
12519 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12521 Extend the loader so that GRUB can accept a loader which comes
12522 back to GRUB when a loaded image exits. Also, this change adds
12523 support for a chainloader on EFI.
12525 * term/efi/console.c: Include grub/misc.h.
12526 (grub_console_checkkey): Display a scan code on the top for
12527 debugging. This will be removed once the EFI port gets stable.
12528 Correct the scan code mapping.
12530 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12531 allocate memory from larger regions, in order to reduce the number
12532 of allocated regions. Otherwise, the MacOSX loader panics.
12533 (filter_memory_map): Avoid less than 1MB for compatibility with
12535 (add_memory_regions): Allocate from the tail of a region, if
12536 possible, to avoid allocating a region near to 1MB, for the MacOSX
12539 * kern/efi/init.c (grub_efi_set_prefix): Specify
12540 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12542 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12543 argument IMAGE_HANDLE and specify it to get a loaded image.
12544 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12545 grub_efi_get_loaded_image.
12546 (grub_efi_get_filename): Divide the length by the size of
12548 (grub_efi_get_device_path): New function.
12549 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12550 the length by the size of grub_efi_char16_t for a file path device
12553 * kern/loader.c (grub_loader_noreturn): New variable.
12554 (grub_loader_set): Accept a new argument NORETURN. Set
12555 GRUB_LOADER_NORETURN to NORETURN.
12556 All callers changed.
12557 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12560 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12562 (grub_efi_get_loaded_image): Take an argument to specify an image
12565 * include/grub/loader.h (grub_loader_set): Added one more argument
12568 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12569 instead of grub_efi_open_protocol.
12570 (grub_efidisk_get_device_name): Likewise.
12571 (grub_efidisk_close): Print a newline.
12572 (grub_efidisk_get_device_handle): Fixed to use
12573 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12574 GRUB_EFI_DEVICE_PATH_TYPE.
12576 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12577 * kern/efi/efi.c (device_path_guid): ... here.
12579 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12581 (kernel_mod_HEADERS): Added efi/disk.h.
12582 (_chain_mod_SOURCES): New variable.
12583 (_chain_mod_CFLAGS): Likewise.
12584 (_chain_mod_LDFLAGS): Likewise.
12585 (chain_mod_SOURCES): Likewise.
12586 (chain_mod_CFLAGS): Likewise.
12587 (chain_mod_LDFLAGS): Likewise.
12589 * DISTLIST: Added include/grub/efi/chainloader.h,
12590 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12592 * include/grub/efi/chainloader.h: New file.
12593 * loader/efi/chainloader.c: Likewise.
12594 * loader/efi/chainloader_normal.c: Likewise.
12596 2006-04-30 Marco Gerards <marco@gnu.org>
12598 * commands/configfile.c (grub_cmd_source): New function.
12599 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12600 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12602 2006-04-30 Marco Gerards <marco@gnu.org>
12604 * normal/execute.c (grub_script_execute_cmd): Change the return
12605 type to `grub_err_t'. Correctly return the error.
12606 (grub_script_execute_cmdline): In case a command line is not a
12607 command or a function, try to interpret it as an assignment.
12609 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12611 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12612 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12613 skip a node whose name is obviously invalid as UTF-16,
12614 i.e. contains a NUL character. Stop the iteration when the last
12615 directory entry is found. Instead of using the return value of
12616 grub_hfsplus_btree_iterate_node, store the value in RET and use
12617 it, because the iterator can be stopped by the last directory
12620 2006-04-30 Marco Gerards <marco@gnu.org>
12622 * include/grub/env.h (grub_env_export): New prototype. Reported
12623 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12625 2006-04-30 Marco Gerards <marco@gnu.org>
12627 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12628 size of the extents in a catalog file record.
12630 2006-04-29 Marco Gerards <marco@gnu.org>
12632 * commands/configfile.c (grub_cmd_configfile): Execute the
12633 configfile within its own context.
12635 * include/grub/env.h (grub_env_context_open): New prototype.
12636 (grub_env_context_close): Likewise.
12638 * kern/env.c (grub_env): Removed.
12639 (grub_env_sorted): Likewise.
12640 (grub_env_context): New variable.
12641 (grub_env_var_context): Likewise.
12642 (grub_env_find): Search both the active context and the global
12644 (grub_env_context_open): New function.
12645 (grub_env_context_close): Likewise.
12646 (grub_env_insert): Likewise.
12647 (grub_env_remove): Likewise.
12648 (grub_env_export): Likewise.
12649 (grub_env_set): Changed to use helper functions to avoid code
12651 (grub_env_iterate): Rewritten so both the current context and the
12652 global context are being used.
12654 * normal/command.c (export_command): New function.
12655 (grub_command_init): Register the `export' function.
12657 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12659 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12660 explicitly to suppress gcc's warnings.
12661 * fs/fat.c (grub_fat_find_dir): Likewise.
12662 (grub_fat_label): Likewise.
12663 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12664 (grub_xfs_mount): Likewise.
12665 (grub_xfs_label): Likewise.
12666 * fs/affs.c (grub_affs_mount): Likewise.
12667 (grub_affs_label): Likewise.
12668 (grub_affs_iterate_dir): Likewise.
12669 * fs/sfs.c (grub_sfs_mount): Likewise.
12670 (grub_sfs_iterate_dir): Likewise.
12671 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12672 * fs/hfs.c (grub_hfs_mount): Likewise.
12673 (grub_hfs_cmp_catkeys): Likewise.
12674 (grub_hfs_find_dir): Likewise.
12675 (grub_hfs_dir): Likewise.
12676 (grub_hfs_label): Likewise.
12677 * fs/jfs.c (grub_jfs_mount): Likewise.
12678 (grub_jfs_opendir): Likewise.
12679 (grub_jfs_getent): Likewise.
12680 (grub_jfs_lookup_symlink): Likewise.
12681 (grub_jfs_label): Likewise.
12682 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12683 (grub_hfsplus_iterate_dir): Likewise.
12684 (grub_hfsplus_btree_iterate_node): Made static.
12686 * util/grub-emu.c (prefix): New variable.
12687 (grub_machine_set_prefix): New function.
12688 (main): Do not set the environment variable "prefix" here. Only
12689 set PREFIX, which is used later by grub_machine_set_prefix.
12691 * include/grub/video.h: Do not include grub/symbol.h.
12692 (grub_video_register): Not exported. This symbol is not defined in
12694 (grub_video_unregister): Likewise.
12695 (grub_video_iterate): Likewise.
12696 (grub_video_setup): Likewise.
12697 (grub_video_restore): Likewise.
12698 (grub_video_get_info): Likewise.
12699 (grub_video_get_blit_format): Likewise.
12700 (grub_video_set_palette): Likewise.
12701 (grub_video_get_palette): Likewise.
12702 (grub_video_set_viewport): Likewise.
12703 (grub_video_get_viewport): Likewise.
12704 (grub_video_map_color): Likewise.
12705 (grub_video_map_rgb): Likewise.
12706 (grub_video_map_rgba): Likewise.
12707 (grub_video_fill_rect): Likewise.
12708 (grub_video_blit_glyph): Likewise.
12709 (grub_video_blit_bitmap): Likewise.
12710 (grub_video_blit_render_target): Likewise.
12711 (grub_video_scroll): Likewise.
12712 (grub_video_swap_buffers): Likewise.
12713 (grub_video_create_render_target): Likewise.
12714 (grub_video_delete_render_target): Likewise.
12715 (grub_video_set_active_render_target): Likewise.
12717 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12719 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12721 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12722 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12723 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12724 instead of $(srcdir)/genkernsyms.sh.
12726 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12727 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12728 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12729 instead of $(srcdir)/genkernsyms.sh.
12731 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12732 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12733 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12734 instead of $(srcdir)/genkernsyms.sh.
12736 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12737 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12738 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12739 instead of $(srcdir)/genkernsyms.sh.
12741 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12744 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12746 (gensymlist.sh): New target.
12747 (genkernsyms.sh): Likewise.
12749 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12750 genkernsyms.sh.in and gensymlist.sh.in.
12752 * genkernsyms.sh: Removed.
12753 * gensymlist.sh: Likewise.
12755 * genkernsyms.sh.in: New file.
12756 * gensymlist.sh.in: Likewise.
12758 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12760 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12761 clobber "prefix", since we may have already set it manually.
12763 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12765 * kern/misc.c (abort): New alias for grub_abort.
12767 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12769 A new machine-specific function "grub_machine_set_prefix" is
12770 defined. This is called after loading modules, so that a prefix
12771 initialization can use modules. Also, this change adds an
12772 intensive debugging feature for the memory manager via the
12773 configure option "--enable-mm-debug".
12775 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12778 * kern/sparc64/ieee1275/init.c (abort): Removed.
12779 (grub_stop): Likewise.
12780 (grub_exit): New function.
12781 (grub_set_prefix): Renamed to ...
12782 (grub_machine_set_prefix): ... this.
12783 (grub_machine_init): Do not call grub_set_prefix.
12785 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12786 (grub_machine_set_prefix): ... this.
12787 (grub_machine_init): Do not call grub_set_prefix.
12789 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12790 (grub_machine_init): Do not set the prefix here.
12792 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12794 * kern/efi/init.c: Include grub/mm.h.
12795 (grub_efi_set_prefix): New function.
12797 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12798 (grub_efi_get_filename): New function.
12799 (grub_print_device_path): Renamed to ...
12800 (grub_efi_print_device_path): ... this.
12802 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12803 [MM_DEBUG] (grub_realloc): Likewise.
12804 [MM_DEBUG] (grub_free): Likewise.
12805 [MM_DEBUG] (grub_memalign): Likewise.
12806 [MM_DEBUG] (grub_mm_debug): New variable.
12807 [MM_DEBUG] (grub_debug_malloc): New function.
12808 [MM_DEBUG] (grub_debug_free): New function.
12809 [MM_DEBUG] (grub_debug_realloc): New function.
12810 [MM_DEBUG] (grub_debug_memalign): New function.
12812 * kern/misc.c (grub_abort): Print a newline to distinguish
12815 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12816 grub_set_root_dev after loading modules. This is necessary when
12817 setting a prefix depends on modules.
12819 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12820 (grub_efi_print_device_path): ... this.
12821 (grub_efi_get_filename): New prototype.
12822 (grub_efi_set_prefix): Likewise.
12824 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12826 (grub_efidisk_get_device_handle): New prototype.
12827 (grub_efidisk_get_device_name): Likewise.
12829 * include/grub/mm.h: Include config.h.
12830 (MM_DEBUG): Removed.
12831 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12832 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12833 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12834 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12835 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12836 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12837 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12838 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12839 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12841 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12843 * disk/efi/efidisk.c: Include grub/partition.h.
12844 (iterate_child_devices): New function.
12845 (add_device): First, compare only last device path nodes, so that
12846 devices are sorted by the types.
12847 (grub_efidisk_get_device_handle): New function.
12848 (grub_efidisk_get_device_name): Likewise.
12850 * configure.ac (--enable-mm-debug): New option to enable the
12851 memory manager debugging feature. This makes the binary much
12852 bigger, so is disabled by default.
12854 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12856 Use grub_abort instead of grub_stop, and grub_exit must be
12857 define in each architecture now. Also, this change adds support
12860 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12861 (grub_getkey): New function.
12862 (grub_term_get_current): Likewise.
12864 * util/i386/pc/grub-setup.c: Include grub/term.h.
12865 (grub_getkey): New function.
12866 (grub_term_get_current): Likewise.
12868 * util/misc.c (grub_stop): Renamed to ...
12869 (grub_exit): ... this.
12871 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12872 (grub_exit): ... this.
12873 (grub_machine_init): Use grub_abort instead of abort.
12874 (grub_stop): Removed.
12876 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12879 * kern/i386/pc/startup.S (grub_exit): New function.
12880 (cold_reboot): New label.
12882 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12883 (grub_efi_init): Call grub_efidisk_init.
12884 (grub_efi_fini): Call grub_efidisk_fini.
12886 * kern/efi/efi.c: Include grub/mm.h.
12887 (grub_efi_console_control_guid): Renamed to ...
12888 (console_control_guid): ... this.
12889 (grub_efi_loaded_image_guid): Renamed to ...
12890 (loaded_image_guid): ... this.
12891 (grub_efi_locate_handle): New function.
12892 (grub_efi_open_protocol): Likewise.
12893 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12894 GRUB_EFI_CONSOLE_CONTROL_GUID.
12895 (grub_efi_exit): Removed.
12896 (grub_stop): Likewise.
12897 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12898 (grub_exit): New function.
12899 (grub_print_device_path): Likewise.
12901 * kern/rescue.c (grub_rescue_cmd_exit): New function.
12902 (grub_enter_rescue_mode): Register "exit".
12904 * kern/misc.c (grub_real_dprintf): A cosmetic change.
12905 (grub_abort): New function.
12907 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12909 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12911 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12913 * include/grub/efi/efi.h (grub_efi_exit): Removed.
12914 (grub_print_device_path): New prototype.
12915 (grub_efi_locate_handle): Likewise.
12916 (grub_efi_open_protocol): Likewise.
12918 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12919 * disk/efi/efidisk.c: Likewise.
12921 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12923 * include/grub/efi/console_control.h
12924 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12926 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12927 last 8 bytes as an array.
12928 (GRUB_EFI_DISK_IO_GUID): New macro.
12929 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12930 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12931 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12933 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12934 (struct grub_efi_device_path): Rename the member "sub_type" to
12936 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12937 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12938 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12939 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12940 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12941 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12942 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12943 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12944 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12945 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12946 (struct grub_efi_pci_device_path): New structure.
12947 (grub_efi_pci_device_path_t): New type.
12948 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12949 (struct grub_efi_pccard_device_path): New structure.
12950 (grub_efi_pccard_device_path_t): New type.
12951 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12952 (struct grub_efi_memory_mapped_device_path): New structure.
12953 (grub_efi_memory_mapped_device_path_t): New type.
12954 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12955 (struct grub_efi_vendor_device_path): New structure.
12956 (grub_efi_vendor_device_path_t): New type.
12957 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12958 (struct grub_efi_controller_device_path): New structure.
12959 (grub_efi_controller_device_path_t): New type.
12960 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12961 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12962 (struct grub_efi_acpi_device_path): New structure.
12963 (grub_efi_acpi_device_path_t): New type.
12964 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12965 (struct grub_efi_expanded_acpi_device_path): New structure.
12966 (grub_efi_expanded_acpi_device_path_t): New type.
12967 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12968 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12969 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12970 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12971 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12972 (struct grub_efi_atapi_device_path): New structure.
12973 (grub_efi_atapi_device_path_t): New type.
12974 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12975 (struct grub_efi_fibre_channel_device_path): New structure.
12976 (grub_efi_fibre_channel_device_path_t): New type.
12977 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12978 (struct grub_efi_1394_device_path): New structure.
12979 (grub_efi_1394_device_path_t): New type.
12980 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12981 (struct grub_efi_usb_device_path): New structure.
12982 (grub_efi_usb_device_path_t): New type.
12983 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12984 (struct grub_efi_usb_class_device_path): New structure.
12985 (grub_efi_usb_class_device_path_t): New type.
12986 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12987 (struct grub_efi_i2o_device_path): New structure.
12988 (grub_efi_i2o_device_path_t): New type.
12989 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12990 (struct grub_efi_mac_address_device_path): New structure.
12991 (grub_efi_mac_address_device_path_t): New type.
12992 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12993 (struct grub_efi_ipv4_device_path): New structure.
12994 (grub_efi_ipv4_device_path_t): New type.
12995 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12996 (struct grub_efi_ipv6_device_path): New structure.
12997 (grub_efi_ipv6_device_path_t): New type.
12998 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12999 (struct grub_efi_infiniband_device_path): New structure.
13000 (grub_efi_infiniband_device_path_t): New type.
13001 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13002 (struct grub_efi_uart_device_path): New structure.
13003 (grub_efi_uart_device_path_t): New type.
13004 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13005 (struct grub_efi_vendor_messaging_device_path): New structure.
13006 (grub_efi_vendor_messaging_device_path_t): New type.
13007 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13008 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13009 (struct grub_efi_hard_drive_device_path): New structure.
13010 (grub_efi_hard_drive_device_path_t): New type.
13011 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13012 (struct grub_efi_cdrom_device_path): New structure.
13013 (grub_efi_cdrom_device_path_t): New type.
13014 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13015 (struct grub_efi_vendor_media_device_path): New structure.
13016 (grub_efi_vendor_media_device_path_t): New type.
13017 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13018 (struct grub_efi_file_path_device_path): New structure.
13019 (grub_efi_file_path_device_path_t): New type.
13020 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13021 (struct grub_efi_protocol_device_path): New structure.
13022 (grub_efi_protocol_device_path_t): New type.
13023 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13024 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13025 (struct grub_efi_bios_device_path): New structure.
13026 (grub_efi_bios_device_path_t): New type.
13027 (struct grub_efi_disk_io): New structure.
13028 (grub_efi_disk_io_t): New type.
13029 (struct grub_efi_block_io_media): New structure.
13030 (grub_efi_block_io_media_t): New type.
13031 (struct grub_efi_block_io): New structure.
13032 (grub_efi_block_io_t): New type.
13034 * include/grub/misc.h (grub_stop): Removed.
13035 (grub_exit): New prototype.
13036 (grub_abort): Likewise.
13038 * include/grub/disk.h (enum grub_disk_dev_id): Added
13039 GRUB_DISK_DEVICE_EFIDISK_ID.
13041 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13042 disk/efi/efidisk.c.
13043 (kernel_syms.lst): Remove the target if an error occurs.
13045 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13047 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13048 as it was simply too buggy.
13050 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13052 * kern/misc.c (grub_lltoa): New function.
13053 (grub_vsprintf): Added support for the long long suffix,
13056 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13058 * Makefile.in (LDFLAGS): Add variable.
13059 (LD): Remove variable.
13060 * configure.ac: Add -m32 to LDFLAGS.
13061 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13062 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13063 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13064 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13065 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13067 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13068 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13069 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13071 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13073 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13074 length for unknown glyph.
13076 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13078 Add support for pre-loaded modules into the EFI port.
13080 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13081 completely. Accept one more argument DIR. The caller has changed.
13083 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13085 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13086 (grub_efi_loaded_image_guid): New variable.
13087 (grub_efi_get_loaded_image): New function.
13088 (grub_arch_modules_addr): Likewise.
13090 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13093 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13094 (struct grub_efi_loaded_image): New structure.
13095 (grub_efi_loaded_image_t): New type.
13097 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13099 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13100 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13101 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13103 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13105 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13107 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13109 * DISTLIST: Added include/grub/efi/console.h,
13110 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13111 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13113 * include/grub/efi/console.h: New file.
13114 * include/grub/efi/time.h: Likewise.
13115 * include/grub/i386/efi/kernel.h: Likewise.
13116 * kern/efi/init.c: Likewise.
13117 * kern/efi/mm.c: Likewise.
13118 * term/efi/console.c: Likewise.
13120 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13121 (grub_stop): Removed.
13122 (grub_get_rtc): Likewise.
13123 (grub_machine_init): Simply call grub_efi_init.
13124 (grub_machine_fini): Call grub_efi_fini.
13126 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13127 (grub_efi_output_string): Removed.
13128 (grub_efi_stall): New function.
13129 (grub_stop): Likewise.
13130 (grub_get_rtc): Likewise.
13132 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13133 (grub_efi_stall): New prototype.
13134 (grub_efi_allocate_pages): Likewise.
13135 (grub_efi_free_pages): Likewise.
13136 (grub_efi_get_memory_map): Likewise.
13137 (grub_efi_mm_init): Likewise.
13138 (grub_efi_mm_fini): Likewise.
13139 (grub_efi_init): Likewise.
13140 (grub_efi_fini): Likewise.
13142 * include/grub/i386/efi/time.h: Do not include
13143 grub/symbol.h. Include grub/efi/time.h.
13144 (GRUB_TICKS_PER_SECOND): Removed.
13145 (grub_get_rtc): Likewise.
13147 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13148 Added padding. The EFI spec is buggy.
13149 (GRUB_EFI_BLACK): New macro.
13150 (GRUB_EFI_BLUE): Likewise.
13151 (GRUB_EFI_GREEN): Likewise.
13152 (GRUB_EFI_CYAN): Likewise.
13153 (GRUB_EFI_RED): Likewise.
13154 (GRUB_EFI_MAGENTA): Likewise.
13155 (GRUB_EFI_BROWN): Likewise.
13156 (GRUB_EFI_LIGHTGRAY): Likewise.
13157 (GRUB_EFI_BRIGHT): Likewise.
13158 (GRUB_EFI_DARKGRAY): Likewise.
13159 (GRUB_EFI_LIGHTBLUE): Likewise.
13160 (GRUB_EFI_LIGHTGREEN): Likewise.
13161 (GRUB_EFI_LIGHTCYAN): Likewise.
13162 (GRUB_EFI_LIGHTRED): Likewise.
13163 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13164 (GRUB_EFI_YELLOW): Likewise.
13165 (GRUB_EFI_WHITE): Likewise.
13166 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13167 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13168 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13169 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13170 (GRUB_EFI_BACKGROUND_RED): Likewise.
13171 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13172 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13173 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13174 (GRUB_EFI_TEXT_ATTR): Likewise.
13176 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13177 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13178 (kernel_mod_HEADERS): Added efi/time.h.
13180 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13182 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13183 include/grub/efi/api.h, include/grub/efi/console_control.h,
13184 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13185 include/grub/i386/efi/time.h, kern/efi/efi.c,
13186 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13187 and util/i386/efi/grub-mkimage.c.
13189 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13191 * genmk.rb (PModule#rule): Do not export symbols if
13192 #{prefix}_EXPORTS is set to "no".
13194 * conf/i386-efi.mk: New file.
13195 * conf/i386-efi.rmk: Likewise.
13196 * include/grub/efi/api.h: Likewise.
13197 * include/grub/efi/console_control.h: Likewise.
13198 * include/grub/efi/efi.h: Likewise.
13199 * include/grub/efi/pe32.h: Likewise.
13200 * include/grub/i386/efi/time.h: Likewise.
13201 * kern/efi/efi.c: Likewise.
13202 * kern/i386/efi/init.c: Likewise.
13203 * kern/i386/efi/startup.S: Likewise.
13204 * util/i386/efi/grub-mkimage.c: Likewise.
13206 2006-04-17 Marco Gerards <marco@gnu.org>
13208 * include/grub/script.h: Include <grub/parser.h> and
13209 "grub_script.tab.h".
13210 (struct grub_lexer_param): New struct.
13211 (struct grub_parser_param): Likewise.
13212 (grub_script_create_arglist): Pass the state in an argument.
13213 (grub_script_add_arglist): Likewise.
13214 (grub_script_create_cmdline): Likewise.
13215 (grub_script_create_cmdblock): Likewise.
13216 (grub_script_create_cmdif): Likewise.
13217 (grub_script_create_cmdmenu): Likewise.
13218 (grub_script_add_cmd): Likewise.
13219 (grub_script_arg_add): Likewise.
13220 (grub_script_lexer_ref): Likewise.
13221 (grub_script_lexer_deref): Likewise.
13222 (grub_script_lexer_record_start): Likewise.
13223 (grub_script_lexer_record_stop): Likewise.
13224 (grub_script_mem_record): Likewise.
13225 (grub_script_mem_record_stop): Likewise.
13226 (grub_script_malloc): Likewise.
13227 (grub_script_yylex): Likewise.
13228 (grub_script_yyparse): Likewise.
13229 (grub_script_yyerror): Likewise.
13230 (grub_script_yylex): Likewise.
13231 (grub_script_lexer_init): Return the state.
13233 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13234 (grub_script_lexer_done): Likewise.
13235 (grub_script_lexer_getline): Likewise.
13236 (grub_script_lexer_refs): Likewise.
13237 (script): Likewise.
13238 (newscript): Likewise.
13239 (record): Likewise.
13240 (recording): Likewise.
13241 (recordpos): Likewise.
13242 (recordlen): Likewise.
13243 (grub_script_lexer_init): Return the state instead of setting
13245 (grub_script_lexer_ref): Use the newly added argument for state
13246 instead of globals.
13247 (grub_script_lexer_deref): Likewise.
13248 (grub_script_lexer_record_start): Likewise.
13249 (grub_script_lexer_record_stop): Likewise.
13250 (recordchar): Likewise.
13251 (nextchar): Likewise.
13252 (grub_script_yylex2): Likewise.
13253 (grub_script_yylex): Likewise.
13254 (grub_script_yyerror): Likewise.
13256 * normal/parser.y (func_mem): Removed variable.
13257 (menu_entry): Likewise.
13259 (%lex-param): New parser option.
13260 (%parse-param): Likewise.
13261 (script): Always return the AST.
13262 (argument): Pass the state around.
13263 (arguments): Likewise.
13264 (grubcmd): Likewise.
13265 (commands): Likewise.
13266 (function): Likewise.
13267 (menuentry): Likewise.
13268 (if_statement): Likewise.
13271 * normal/script.c (grub_script_memused): Removed variable.
13272 (grub_script_parsed): Likewise.
13273 (grub_script_malloc): Added a state argument. Use that instead of
13275 (grub_script_mem_record): Likewise.
13276 (grub_script_mem_record_stop): Likewise.
13277 (grub_script_arg_add): Likewise.
13278 (grub_script_add_arglist): Likewise.
13279 (grub_script_create_cmdline): Likewise.
13280 (grub_script_create_cmdif): Likewise.
13281 (grub_script_create_cmdmenu): Likewise.
13282 (grub_script_add_cmd): Likewise.
13283 (grub_script_parse): Setup the state before calling the parser.
13285 2006-04-16 Marco Gerards <marco@gnu.org>
13287 * normal/command.c (grub_command_init): Remove the title command.
13289 * normal/lexer.c (grub_script_yylex): Renamed from this...
13290 (grub_script_yylex2): ... to this.
13291 (grub_script_yylex): New function. Temporary
13292 introduced to filter some tokens.
13293 (grub_script_yyerror): Print a newline.
13295 * normal/main.c (read_config_file): Output information about the
13296 lines that contain errors. Wait for a key after all lines have
13297 been processed. Don't return an empty menu.
13299 * normal/parser.y (func_mem): Don't initialize.
13300 (menu_entry): Likewise.
13301 (err): New variable.
13302 (script): Don't return anything when an error was encountered.
13303 (ws, returns): Removed rules.
13304 (argument): Disabled concatenated variable support.
13305 (arguments): Remove explicit separators.
13306 (grubcmd): Likewise.
13307 (function): Likewise.
13308 (menuentry): Likewise.
13310 (commands): Likewise. Add error handling.
13312 * normal/script.c (grub_script_create_cmdline): If
13313 `grub_script_parsed' is 0, assume the parser encountered an error.
13315 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13317 * configure.ac: Add support for EFI. Fix the typo
13318 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13320 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13322 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13323 foreign multibyte characters should be shown correctly.
13325 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13327 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13329 (read_config_file): Made it to close file before returning.
13331 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13333 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13334 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13335 video/i386/pc/vbefill.c.
13337 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13338 video/i386/pc/vbefill.c.
13340 * include/grub/video.h (grub_video_blit_format): New enum.
13341 (grub_video_mode_info): Added new member blit_format.
13342 (grub_video_get_blit_format): New function prototype.
13344 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13345 function prototype.
13346 (grub_video_vbe_map_rgb): Likewise.
13347 (grub_video_vbe_unmap_color): Likewise.
13349 * include/grub/i386/pc/vbeblit.h: New file.
13351 * include/grub/i386/pc/vbefill.h: New file.
13353 * video/video.c (grub_video_get_blit_format): New function.
13354 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13355 (grub_video_vbe_map_rgb): Likewise.
13356 (grub_video_vbe_unmap_color): Likewise.
13358 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13360 (grub_video_vbe_blit_render_target): Changed to use more optimized
13362 (grub_video_vbe_setup): Added detection for optimized settings.
13363 (grub_video_vbe_create_render_target): Likewise.
13365 * video/i386/pc/vbeblit.c: New file.
13367 * video/i386/pc/vbefill.c: New file.
13369 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13371 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13374 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13375 parsing to support both hex and dec ranges. If filename was missing
13376 show usage information.
13378 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13380 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13381 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13383 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13384 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13385 (video_mod_SOURCES): Added.
13386 (video_mod_CFLAGS): Likewise.
13387 (video_mod_LDFLAGS): Likewise.
13388 (gfxterm_mod_SOURCES): Likewise.
13389 (gfxterm_mod_CFLAGS): Likewise.
13390 (gfxterm_mod_LDFLAGS): Likewise.
13391 (videotest_mod_SOURCES): Likewise.
13392 (videotest_mod_CFLAGS): Likewise.
13393 (videotest_mod_LDFLAGS): Likewise.
13394 (vesafb_mod_SOURCES): Removed.
13395 (vesafb_mod_CFLAGS): Likewise.
13396 (vesafb_mod_LDFLAGS): Likewise.
13397 (vga_mod_SOURCES): Likewise.
13398 (vga_mod_CFLAGS): Likewise.
13399 (vga_mod_LDFLAGS): Likewise.
13401 * commands/videotest.c: New file.
13403 * font/manager.c (fill_with_default_glyph): Modified to use
13405 (grub_font_get_glyph): Likewise.
13406 (fontmanager): Renamed from this...
13407 (font_manager): ... to this.
13409 * include/grub/font.h (grub_font_glyph): Added new structure.
13410 (grub_font_get_glyph): Modified to use grub_font_glyph.
13412 * include/grub/misc.h (grub_abs): Added as inline function.
13414 * include/grub/video.h: New file.
13416 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13417 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13418 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13419 (grub_vbe_get_controller_info): Renamed from this...
13420 (grub_vbe_bios_get_controller_info): ... to this.
13421 (grub_vbe_get_mode_info): Renamed from this...
13422 (grub_vbe_bios_get_mode_info): ... to this.
13423 (grub_vbe_set_mode): Renamed from this...
13424 (grub_vbe_bios_set_mode): ... to this.
13425 (grub_vbe_get_mode): Renamed from this...
13426 (grub_vbe_bios_get_mode): ... to this.
13427 (grub_vbe_set_memory_window): Renamed from this...
13428 (grub_vbe_bios_set_memory_window): ... to this.
13429 (grub_vbe_get_memory_window): Renamed from this...
13430 (grub_vbe_bios_get_memory_window): ... to this.
13431 (grub_vbe_set_scanline_length): Renamed from this...
13432 (grub_vbe_set_scanline_length): ... to this.
13433 (grub_vbe_get_scanline_length): Renamed from this...
13434 (grub_vbe_bios_get_scanline_length): ... to this.
13435 (grub_vbe_set_display_start): Renamed from this...
13436 (grub_vbe_bios_set_display_start): ... to this.
13437 (grub_vbe_get_display_start): Renamed from this...
13438 (grub_vbe_bios_get_display_start): ... to this.
13439 (grub_vbe_set_palette_data): Renamed from this...
13440 (grub_vbe_bios_set_palette_data): ... to this.
13441 (grub_vbe_set_pixel_rgb): Removed.
13442 (grub_vbe_set_pixel_index): Likewise.
13444 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13446 (grub_vbe_bios_get_controller_info): ... to this.
13447 (grub_vbe_get_mode_info): Renamed from this...
13448 (grub_vbe_bios_get_mode_info): ... to this.
13449 (grub_vbe_set_mode): Renamed from this...
13450 (grub_vbe_bios_set_mode): ... to this.
13451 (grub_vbe_get_mode): Renamed from this...
13452 (grub_vbe_bios_get_mode): ... to this.
13453 (grub_vbe_set_memory_window): Renamed from this...
13454 (grub_vbe_bios_set_memory_window): ... to this.
13455 (grub_vbe_get_memory_window): Renamed from this...
13456 (grub_vbe_bios_get_memory_window): ... to this.
13457 (grub_vbe_set_scanline_length): Renamed from this...
13458 (grub_vbe_set_scanline_length): ... to this.
13459 (grub_vbe_get_scanline_length): Renamed from this...
13460 (grub_vbe_bios_get_scanline_length): ... to this.
13461 (grub_vbe_set_display_start): Renamed from this...
13462 (grub_vbe_bios_set_display_start): ... to this.
13463 (grub_vbe_get_display_start): Renamed from this...
13464 (grub_vbe_bios_get_display_start): ... to this.
13465 (grub_vbe_set_palette_data): Renamed from this...
13466 (grub_vbe_bios_set_palette_data): ... to this.
13467 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13468 getting corrupted after calling it. Added more pushes and pops.
13469 (grub_vbe_bios_set_mode): Likewise.
13470 (grub_vbe_bios_get_mode): Likewise.
13471 (grub_vbe_bios_get_memory_window): Likewise.
13472 (grub_vbe_bios_set_scanline_length): Likewise.
13473 (grub_vbe_bios_get_scanline_length): Likewise.
13474 (grub_vbe_bios_get_display_start): Likewise.
13475 (grub_vbe_bios_set_palette_data): Likewise.
13477 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13478 (cl_insert): Likewise.
13479 (cl_delete): Likewise.
13481 * term/gfxterm.c: New file.
13483 * term/i386/pc/vesafb.c: Removed file.
13485 * video/video.c: New file.
13487 * video/i386/pc/vbe.c (real2pm): Added new function.
13488 (grub_video_vbe_draw_pixel): Likewise.
13489 (grub_video_vbe_get_video_ptr): Likewise.
13490 (grub_video_vbe_get_pixel): Likewise
13491 (grub_video_vbe_init): Likewise.
13492 (grub_video_vbe_fini): Likewise.
13493 (grub_video_vbe_setup): Likewise.
13494 (grub_video_vbe_get_info): Likewise.
13495 (grub_video_vbe_set_palette): Likewise.
13496 (grub_video_vbe_get_palette): Likewise.
13497 (grub_video_vbe_set_viewport): Likewise.
13498 (grub_video_vbe_get_viewport): Likewise.
13499 (grub_video_vbe_map_color): Likewise.
13500 (grub_video_vbe_map_rgb): Likewise.
13501 (grub_video_vbe_map_rgba): Likewise.
13502 (grub_video_vbe_unmap_color): Likewise.
13503 (grub_video_vbe_fill_rect): Likewise.
13504 (grub_video_vbe_blit_glyph): Likewise.
13505 (grub_video_vbe_blit_bitmap): Likewise.
13506 (grub_video_vbe_blit_render_target): Likewise.
13507 (grub_video_vbe_scroll): Likewise.
13508 (grub_video_vbe_swap_buffers): Likewise.
13509 (grub_video_vbe_create_render_target): Likewise.
13510 (grub_video_vbe_delete_render_target): Likewise.
13511 (grub_video_vbe_set_active_render_target): Likewise.
13512 (grub_vbe_set_pixel_rgb): Remove function.
13513 (grub_vbe_set_pixel_index): Likewise.
13514 (index_color_mode): Remove static variable.
13515 (active_mode): Likewise.
13516 (framebuffer): Likewise.
13517 (bytes_per_scan_line): Likewise.
13518 (grub_video_vbe_adapter): Added new static variable.
13519 (framebuffer): Likewise.
13520 (render_target): Likewise.
13521 (initial_mode): Likewise.
13522 (mode_in_use): Likewise.
13523 (mode_list): Likewise.
13525 2006-03-10 Marco Gerards <marco@gnu.org>
13527 * configure.ac (AC_INIT): Bumped to 1.93.
13529 * DISTLIST: Added `include/grub/hfs.h'.
13531 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13533 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13534 18H, which might help the BIOS falling back to next boot media.
13536 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13538 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13539 Poe Chen <poe.poechen@gmail.com>.
13541 2006-01-17 Marco Gerards <marco@gnu.org>
13543 * include/grub/normal.h: Include <grub/script.h>.
13544 (grub_command_list): Removed struct.
13545 (grub_command_list_t): Removed type.
13546 (grub_menu_entry): Remove members `num' and `command_list'. Add
13547 members `commands' and `sourcecode'.
13548 * include/grub/script.h: Add inclusion guards.
13549 (grub_script_cmd_menuentry): New struct.
13550 (grub_script_execute_menuentry): New prototype.
13551 (grub_script_lexer_record_start): Likewise.
13552 (grub_script_lexer_record_stop): Likewise.
13553 * normal/execute.c (grub_script_execute_menuentry): New function.
13554 * normal/lexer.c (record, recording, recordpos, recordlen): New
13556 (grub_script_lexer_record_start): New function.
13557 (grub_script_lexer_record_stop): Likewise.
13558 (recordchar): Likewise.
13559 (nextchar): Likewise.
13560 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13561 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13562 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13563 (current_menu): New variable.
13564 (free_menu): Mainly rewritten.
13565 (grub_normal_menu_addentry): New function.
13566 (read_config_file): Rewritten.
13567 * normal/menu.c (run_menu_entry): Mainly rewritten.
13568 * normal/menu_entry.c (make_screen): Rewritten the code to insert
13570 (run): Mainly rewritten.
13571 * normal/parser.y (menu_entry): New variable.
13572 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13573 (menuentry): New rule.
13574 (command): Add `menuentry'.
13575 (if_statement): Allow additional returns before `fi'.
13576 * normal/script.c (grub_script_create_cmdmenu): New function.
13578 2006-01-03 Marco Gerards <marco@gnu.org>
13580 * INSTALL: GNU Bison is required.
13581 * configure.ac: Rewritten the test to detect Bison.
13582 * Makefile.in (YACC): New variable. Reported by Xun Sun
13583 <xun.sun.cn@gmail.com>.
13585 2006-01-03 Marco Gerards <marco@gnu.org>
13587 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13588 the HFS+ filesystem to filesystem blocks.
13589 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13590 GCC warning is silenced.
13592 2006-01-03 Marco Gerards <marco@gnu.org>
13594 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13595 read from disk from big endian to host byte order.
13597 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13599 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13601 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13602 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13603 embedded HFS+ filesystem.
13604 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13605 (grub_hfs_sblock): Move from here...
13606 * include/grub/hfs.h: To here... New file.
13607 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13609 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13611 (grub_hfsplus_volheader): Change type of member `magic' to
13613 (grub_hfsplus_data): Add new member `embedded_offset'.
13614 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13616 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13617 Calculate the offset.
13619 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13621 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13623 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13625 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13627 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13628 ENV->NAME is NULL after allocating ENV->VALUE.
13630 2005-12-25 Marco Gerards <marco@gnu.org>
13632 * kern/env.c (grub_env_set): Rewritten the error handling code.
13634 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13636 * geninit.sh: Made more robust, and more portable.
13638 2005-12-25 Marco Gerards <marco@gnu.org>
13640 Add support for Apple HFS+ filesystems.
13642 * fs/hfsplus.c: New file.
13644 * DISTLIST: Added `fs/hfsplus.c'.
13646 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13647 (hfsplus_mod_SOURCES): New variable.
13648 (hfsplus_mod_CFLAGS): Likewise.
13649 (hfsplus_mod_LDFLAGS): Likewise.
13650 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13651 (grub_setup_SOURCES): Likewise.
13652 (grub_mkdevicemap_SOURCES): Likewise.
13653 (grub_emu_SOURCES): Likewise.
13654 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13656 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13658 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13660 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13662 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13663 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13664 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13665 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13666 normal/lexer.c, normal/parser.y, normal/script.c, and
13668 Removed kern/sparc64/cache.c.
13670 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13671 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13674 * configure.ac (AC_INIT): Bumped to 1.92.
13676 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13678 * kern/err.c (grub_error_push): Added new function to support error
13680 (grub_error_pop): Likewise.
13681 (grub_error_stack_items): New local variable to support error stacks.
13682 (grub_error_stack_pos): Likewise.
13683 (grub_error_stack_assert): Likewise.
13684 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13686 (grub_print_error): Added support to print errors from error stack.
13688 * include/grub/err.h (grub_error_push): Added function prototype.
13689 (grub_error_pop): Likewise.
13691 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13693 * configure.ac: Accept `powerpc64' as host_cpu.
13694 (amd64): Rename to `biarch32'.
13696 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13697 non-cacheline-aligned addresses.
13699 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13700 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13701 if `size' is non-zero.
13703 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
13705 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13706 and `cd' to make sure the filename is not prefixed with a
13708 (pkgdata_MODULES): Add `gpt.mod'.
13709 (gpt_mod_SOURCES): New variable.
13710 (gpt_mod_CFLAGS): Likewise.
13711 (gpt_mod_LDFLAGS): Likewise.
13713 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13715 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13718 * partmap/gpt.c: New file.
13720 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13721 GPT partition map is detected.
13723 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13725 * commands/i386/pc/play.c: New file.
13726 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13727 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13730 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
13732 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13733 ((unused))' to silence gcc warning.
13735 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13737 * configure.ac: Correct `AC_PROG_YACC' test.
13739 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13741 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13742 check before installing files.
13744 2005-11-22 Mike Small <smallm@panix.com>
13746 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13747 number regex so multidigit numbers are recognized correctly.
13749 2005-11-22 Mike Small <smallm@panix.com>
13751 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13752 debugging message before attempting to claim memory.
13753 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13754 multiple addresses in case of failure.
13756 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13758 * term/tparm.c (get_space): Remove empty `if' statement.
13760 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13762 * kern/parser.c (check_varstate): Rename `state' to 's'.
13764 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13766 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13767 variable definitions to the beginning of each function. Sort stack
13769 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13770 `buf' argument to `char *'.
13772 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13774 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13775 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13776 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13777 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13778 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13779 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13780 configfile.mod, search.mod, gzio.mod and test.mod.
13781 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13782 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13783 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13784 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13785 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13786 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13787 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13788 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13789 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13790 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13791 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13792 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13793 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13794 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13795 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13796 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13797 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13798 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13799 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13800 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13801 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13802 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13803 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13805 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13807 (pkgdata_MODULES): Add test.mod.
13809 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13811 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13812 appending to variables with "+=".
13813 (PModule): Use full pathname to generate *.lst filenames.
13815 * Makefile.in: Fixed list rules moved from genmk.rb.
13816 (.DELETE_ON_ERROR): New special target.
13817 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13819 * conf/i386-pc.rmk: Include conf/common.mk.
13820 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13821 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13822 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13823 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13824 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13825 configfile.mod, search.mod, gzio.mod and test.mod.
13826 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13827 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13828 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13829 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13830 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13831 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13832 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13833 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13834 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13835 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13836 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13837 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13838 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13839 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13840 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13841 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13842 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13843 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13844 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13845 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13846 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13847 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13848 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13850 * conf/common.rmk: ... to here. New file.
13852 * conf/common.mk: New file.
13854 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13856 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13857 (grub_script.tab.c): ... here.
13859 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13860 (grub_script.tab.c): ... here.
13862 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13863 (grub_script.tab.c): ... here.
13865 * normal/command.c (grub_command_find): Fixed a memory leak of
13866 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13868 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13870 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13871 "@" which marks the start of a comment on ARM.
13872 (VARIABLE): Likewise.
13874 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13876 Add support for Linux/ADFS partition tables.
13878 * partmap/acorn.c: New file.
13880 * include/grub/acorn_filecore.h: Likewise.
13882 * DISTLIST: Added `partmap/acorn.c' and
13883 `include/grub/acorn_filecore.h'.
13885 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13887 (pkgdata_MODULES): Add `acorn.mod'.
13888 (acorn_mod_SOURCES): New variable.
13889 (acorn_mod_CFLAGS): Likewise.
13891 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13893 (pkgdata_MODULES): Add `acorn.mod'.
13894 (acorn_mod_SOURCES): New variable.
13895 (acorn_mod_CFLAGS): Likewise.
13897 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13898 (pkgdata_MODULES): Add `acorn.mod'.
13899 (acorn_mod_SOURCES): New variable.
13900 (acorn_mod_CFLAGS): Likewise.
13901 (acorn_mod_LDFLAGS): Likewise.
13903 * include/types.h (grub_disk_addr_t): New typedef.
13905 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
13907 * geninit.sh: New file.
13909 * geninitheader.sh: Likewise.
13911 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13912 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13913 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13914 * commands/configfile.c (grub_configfile_init)
13915 (grub_configfile_fini): Likewise.
13916 * commands/default.c (grub_default_init, grub_default_fini):
13918 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13919 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13920 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13921 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13923 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13924 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13926 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13927 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13929 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13931 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13933 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13934 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13935 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13936 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13937 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13938 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13939 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13940 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13941 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13942 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13943 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13944 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13945 * partmap/amiga.c (grub_amiga_partition_map_init)
13946 (grub_amiga_partition_map_fini): Likewise.
13947 * partmap/apple.c (grub_apple_partition_map_init)
13948 (grub_apple_partition_map_fini): Likewise.
13949 * partmap/pc.c (grub_pc_partition_map_init)
13950 (grub_pc_partition_map_fini): Likewise.
13951 * partmap/sun.c (grub_sun_partition_map_init,
13952 grub_sun_partition_map_fini): Likewise.
13953 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13956 * util/grub-emu.c: Include <grub_modules_init.h>.
13957 (main): Don't initialize and de-initialize any modules directly,
13958 use `grub_init_all' and `grub_fini_all' instead.
13960 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13961 `grub_vesafb_mod_init'.
13962 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
13964 * term/i386/pc/vga.c (grub_vga_init): Renamed to
13965 `grub_vga_mod_init'. Updated all users.
13966 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13968 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13969 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13972 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13973 Generate a function to initialize the module in utilities.
13974 Updated all callers.
13975 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
13976 initialize the module in utilities. Updated all callers.
13978 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13980 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13981 escape sequence and a literal ^L to clear the screen.
13983 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13984 when returning from Open Firmware.
13986 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
13988 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13989 (grub_ofconsole_height): Likewise.
13990 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13991 manually insert a '\n'.
13992 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13993 `grub_ofconsole_height'. Return early if these are already set.
13995 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
13997 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13998 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13999 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14000 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14001 and `normal/script.c'.
14002 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14003 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14004 (test_mod_SOURCES): New variable.
14005 (test_mod_CFLAGS): Likewise.
14006 (test_mod_LDFLAGS): Likewise.
14007 (pkgdata_MODULES): Add `test.mod'.
14008 (grub_script.tab.c): New rule.
14009 (grub_script.tab.h): Likewise.
14011 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
14013 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14014 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14015 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14016 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14017 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14018 (test_mod_SOURCES): New variable.
14019 (test_mod_CFLAGS): Likewise.
14020 (pkgdata_MODULES): Add `test.mod'.
14021 (grub_script.tab.c): New rule.
14022 (grub_script.tab.h): Likewise.
14024 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
14026 Add initial scripting support.
14028 * commands/test.c: New file.
14029 * include/grub/script.h: Likewise.
14030 * normal/execute.c: Likewise.
14031 * normal/function.c: Likewise.
14032 * normal/lexer.c: Likewise.
14033 * normal/parser.y: Likewise.
14034 * normal/script.c: Likewise.
14036 * configure.ac: Add `AC_PROG_YACC' test.
14038 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14039 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14040 `normal/function.c' and `normal/script.c'.
14041 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14042 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14043 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14045 (pkgdata_MODULES): Add `test.mod'.
14046 (grub_script.tab.c): New rule.
14047 (grub_script.tab.h): Likewise.
14049 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14051 * include/grub/normal.h (grub_test_init): New prototype.
14052 (grub_test_fini): Likewise.
14054 * normal/command.c: Include <grub/script.h>.
14055 (grub_command_execute): Rewritten.
14057 * util/grub-emu.c (main): Call `grub_test_init' and
14060 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14062 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14064 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14065 there are no pending characters.
14067 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14069 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14070 `grub_strndup' to drop device arguments. Replace unnecessary
14071 `grub_strndup' with `grub_strdup'.
14073 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14075 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14076 `debug' environment variable has been set.
14078 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
14080 * Makefile.in (install-local): Use $(DATA).
14081 (uninstall): Likewise.
14082 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14083 (sbin_UTILITIES): ... to here.
14084 (sbin_SCRIPTS): New variable.
14085 (grub_install_SOURCES): New variable.
14086 * util/powerpc/ieee1275/grub-install.in: New file.
14087 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14089 (add_segments): Call `grub_util_get_path'.
14091 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14093 From Timothy Baldwin:
14094 * commands/ls.c (grub_ls_list_files): Close FILE with
14096 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14098 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
14100 * include/grub/parser.h: New file.
14102 * kern/parser.c: Likewise.
14104 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14105 (grub_setup_SOURCES): Likewise.
14106 (grub_probefs_SOURCES): Likewise.
14107 (grub_emu_SOURCES): Likewise.
14108 (kernel_img_HEADERS): Add `parser.h'.
14110 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14111 (grub_emu_SOURCES): Add `kern/parser.c'.
14112 (grubof_SOURCES): Likewise.
14114 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14115 (grubof_SOURCES): Add `kern/parser.c'.
14117 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14119 * kern/misc.c (grub_split_cmdline): Removed function.
14121 * kern/rescue.c: Include <grub/parser.h>.
14122 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14123 of `grub_split_cmdline'.
14125 * normal/command.c: Include <grub/parser.h>.
14126 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14127 of `grub_split_cmdline'.
14129 * normal/completion.c: Include <grub/parser.h>.
14130 (cmdline_state): New variable.
14131 (iterate_dir): End the filename with a quote depending on the
14132 command line state.
14133 (get_state): new function.
14134 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14135 split the arguments and determine the current argument. When the
14136 argument string is not quoted, escape all spaces.
14138 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14140 * normal/sparc64/setjmp.S: New file.
14142 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14144 * include/grub/sparc64/libgcc.h: New file.
14145 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14146 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14147 normal/sparc64/setjmp.c.
14149 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14151 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14152 * kern/sparc64/cache.S: New file.
14153 * kern/sparc64/cache.c: Removed.
14154 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14155 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14157 (COMMON_LDFLAGS): Add -melf64_sparc.
14158 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14159 (grubof_SOURCES): Use cache.S instead of cache.c.
14160 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14161 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14162 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14164 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14165 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14166 (linux_mod_CFLAGS): Commented out.
14167 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14168 out because module isn't built.
14169 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14170 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14171 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14172 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14173 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14174 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14175 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14176 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14177 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14178 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14179 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14180 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14181 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14182 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14184 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14186 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14187 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14188 longer, because HFS should not be used on PC.
14190 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14192 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14193 consistently within the loop.
14195 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
14197 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14198 directory can not be read.
14200 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14202 * configure.ac (AC_INIT): Increase the version number to 1.91.
14204 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14205 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14206 term/i386/pc/serial.c.
14208 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14210 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14211 file size must be permitted.
14213 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14214 between %ah and %al.
14216 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14218 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14220 Call the hook with a NUL-terminated filename.
14221 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14224 * kern/term.c (cursor_state): New variable.
14225 (grub_term_set_current): Reset the cursor state on a new
14227 (grub_setcursor): Rewritten to use CURSOR_STATE.
14228 (grub_getcursor): New function.
14230 * include/grub/term.h (grub_getcursor): New prototype.
14232 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14233 integers on ARM. Reported by Timothy Baldwin
14234 <T.E.Baldwin99@members.leeds.ac.uk>.
14236 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
14238 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14240 (grub_sfs_dir): Likewise.
14242 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
14244 Add support for the SFS filesystem.
14246 * fs/sfs.c: New file.
14248 * DISTLIST: Added `fs/sfs.c'.
14250 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14251 (grub_probefs_SOURCES): Likewise.
14252 (grub_emu_SOURCES): Likewise.
14253 (pkgdata_MODULES): Add `sfs.mod'.
14254 (sfs_mod_SOURCES): New variable.
14255 (sfs_mod_CFLAGS): Likewise.
14256 (sfs_mod_LDFLAGS): Likewise.
14258 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14259 (pkgdata_MODULES): Add `sfs.mod'.
14260 (sfs_mod_SOURCES): New variable.
14261 (sfs_mod_CFLAGS): Likewise.
14263 * util/grub-emu.c (main): Call `grub_sfs_init' and
14266 * include/grub/fs.h (grub_sfs_init): New prototype.
14267 (grub_sfs_fini): Likewise.
14269 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
14271 Add support for the AFFS filesystem.
14273 * fs/affs.c: New file.
14275 * DISTLIST: Added `fs/affs.c'.
14277 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14278 (grub_probefs_SOURCES): Likewise.
14279 (grub_emu_SOURCES): Likewise.
14280 (pkgdata_MODULES): Add `affs.mod'.
14281 (affs_mod_SOURCES): New variable.
14282 (affs_mod_CFLAGS): Likewise.
14283 (affs_mod_LDFLAGS): Likewise.
14285 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14286 (pkgdata_MODULES): Add `affs.mod'.
14287 (affs_mod_SOURCES): New variable.
14288 (affs_mod_CFLAGS): Likewise.
14290 * util/grub-emu.c (main): Call `grub_affs_init' and
14293 * include/grub/fs.h (grub_affs_init): New prototype.
14294 (grub_affs_fini): Likewise.
14296 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14298 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14300 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14302 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14305 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14308 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14309 (COMMON_LDFLAGS): New variable.
14310 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14311 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14312 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14313 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14314 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14315 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14316 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14317 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14318 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14319 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14320 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14321 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14322 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14323 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14324 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14326 (normal_mod_ASFLAGS): Add `-m32'.
14328 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14329 (grub_host_size_t, grub_host_ssize_t): New types.
14330 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14331 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14332 `GRUB_HOST_SIZEOF_VOID_P'.
14334 * include/grub/kernel.h (struct grub_module_header): Type of
14335 member offset changed to `grub_host_off_t'. Type of member size
14336 changed to `grub_host_size_t'.
14337 (struct grub_module_info): Type of member offset changed to
14338 `grub_host_off_t'. Type of member size changed to
14339 `grub_host_size_t'.
14341 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14343 Make GRUB's kernel compliant to Multiboot Specification.
14345 * kern/i386/pc/startup.S (multiboot_header): New label.
14346 (multiboot_entry): Likewise.
14347 (multiboot_trampoline): Likewise.
14349 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14350 Increased to 0x4A0.
14352 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14353 put parentheses after a question mark.
14354 [!GRUB_UTIL] (my_mod): New variable.
14356 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14358 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
14360 Adds support for the XFS filesystem. Btrees are not supported
14363 * fs/xfs.c: New file.
14365 * DISTLIST: Added `fs/xfs.c'.
14367 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14368 (grub_probefs_SOURCES): Likewise.
14369 (grub_emu_SOURCES): Likewise.
14370 (pkgdata_MODULES): Add `xfs.mod'.
14371 (xfs_mod_SOURCES): New variable.
14372 (xfs_mod_CFLAGS): Likewise.
14374 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14375 (pkgdata_MODULES): Add `xfs.mod'.
14376 (xfs_mod_SOURCES): New variable.
14377 (xfs_mod_CFLAGS): Likewise.
14379 * util/grub-emu.c (main): Call `grub_xfs_init' and
14382 * include/grub/fs.h (grub_xfs_init): New prototype.
14383 (grub_xfs_fini): Likewise.
14386 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14388 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14389 color modes, allow greater than 16 colors to be configured as
14392 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14394 * normal/completion.c (complete_arguments): Add the qualifier
14395 const into OPTIONS.
14397 From Omniflux <omniflux+lists@omniflux.com>:
14398 * include/grub/terminfo.h: New file.
14399 * include/grub/tparm.h: Likewise.
14400 * include/grub/i386/pc/serial.h: Likewise.
14401 * term/terminfo.c: Likewise.
14402 * term/tparm.c: Likewise.
14403 * term/i386/pc/serial.c: Likewise.
14404 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14406 (terminfo_mod_SOURCES): New variable.
14407 (terminfo_mod_CFLAGS): Likewise.
14408 (serial_mod_SOURCES): Likewise.
14409 (serial_mod_CFLAGS): Likewise.
14411 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14413 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14414 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14415 and kern/powerpc/ieee1275/cmain.c, respectively.
14417 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14418 * kern/powerpc/ieee1275/crt0.S: ... here.
14420 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14421 * kern/powerpc/ieee1275/cmain.c: ... here.
14423 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14424 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14425 instead of boot/powerpc/ieee1275/crt0.S and
14426 boot/powerpc/ieee1275/cmain.c, respectively.
14428 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14429 sectors. It was not used anyway.
14431 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14433 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14434 `unused parameter' warning.
14436 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14438 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14440 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14443 2005-08-28 Marco Gerards <metgerards@student.han.nl>
14445 * include/grub/normal.h (enum grub_completion_type): Added
14446 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14448 * normal/cmdline.c (print_completion): Handle
14449 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14450 * normal/menu_entry.c (store_completion): Likewise.
14452 * normal/completion.c (complete_arguments): New function.
14453 (grub_normal_do_completion): Call `complete_arguments' when the
14454 current words start with a dash.
14456 2005-08-27 Marco Gerards <metgerards@student.han.nl>
14458 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14459 `gzio.mod' instead of `io.mod').
14461 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14463 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14464 (DISTDIRS): Added io and video.
14465 Rewrite the search routine to make an output consistently.
14467 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14468 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14469 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14470 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14471 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14472 util/powerpc/ieee1275/misc.c.
14474 * include/grub/gzio.h: New file.
14475 * io/gzio.c: Likewise.
14477 * kern/file.c (grub_file_close): Call grub_device_close only if
14478 FILE->DEVICE is not NULL.
14480 * include/grub/mm.h [!NULL] (NULL): New macro.
14482 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14484 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14485 (pkgdata_MODULES): Added gzio.mod.
14486 (gzio_mod_SOURCES): New variable.
14487 (gzio_mod_CFLAGS): Likewise.
14489 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14490 (pkgdata_MODULES): Added gzio.mod.
14491 (gzio_mod_SOURCES): New variable.
14492 (gzio_mod_CFLAGS): Likewise.
14494 * commands/cat.c: Include grub/gzio.h.
14495 (grub_cmd_cat): Use grub_gzfile_open instead of
14498 * commands/cmp.c: Include grub/gzio.h.
14499 (grub_cmd_cmp): Use grub_gzfile_open instead of
14502 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14503 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14505 (grub_rescue_cmd_module): Likewise.
14507 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14509 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14510 kern/sparc64/ieee1275/init.c because it contains _start.
14511 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14513 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14515 * configure.ac: Add support for sparc64 host with ieee1275
14517 * configure: Generated from configure.ac.
14518 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14520 (grub_ofdisk_read): Likewise.
14521 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14522 pointers as (void *) to remove a warning.
14523 (grub_ofdisk_close): Likewise.
14524 (grub_ofdisk_read): Likewise.
14525 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14526 returns, so make it return void to remove a warning.
14527 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14528 Corresponding prototype change.
14529 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14530 values, and cast the pointers as (void *) to remove a warning.
14531 (grub_mm_dump): Likewise.
14532 * conf/sparc64-ieee1275.mk: New file.
14533 * conf/sparc64-ieee1275.rmk: Likewise.
14534 * include/grub/sparc64/setjmp.h: Likewise.
14535 * include/grub/sparc64/types.h: Likewise.
14536 * include/grub/sparc64/ieee1275/console.h: Likewise.
14537 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14538 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14539 * include/grub/sparc64/ieee1275/time.h: Likewise.
14540 * kern/sparc64/cache.c: Likewise.
14541 * kern/sparc64/dl.c: Likewise.
14542 * kern/sparc64/ieee1275/init.c: Likewise.
14543 * kern/sparc64/ieee1275/openfw.c: Likewise.
14545 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14547 * util/console.c (grub_ncurses_putchar): If C is greater than
14548 0x7f, set C to a question mark.
14549 (grub_ncurses_getcharwidth): New function.
14550 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14553 * normal/menu.c (print_entry): Made aware of Unicode. First,
14554 convert TITLE to UCS-4, and predict the cursor position by
14557 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14559 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14561 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14563 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14564 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14567 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14568 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14569 grub_strcpy and grub_strlen. Take it into account that a space
14570 character is inserted as a delimiter.
14572 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14574 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14575 invalid magic in the error.
14577 * commands/search.c: New file.
14579 * util/grub-emu.c (main): Call grub_search_init and
14582 * kern/rescue.c (grub_rescue_print_disks): Removed.
14583 (grub_rescue_print_devices): New function.
14584 (grub_rescue_cmd_ls): Use grub_device_iterate with
14585 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14586 grub_rescue_print_disks.
14588 * kern/partition.c (grub_partition_iterate): Return the result of
14589 PARTMAP->ITERATE instead of GRUB_ERRNO.
14591 * kern/device.c: Include grub/partition.h.
14592 (grub_device_iterate): New function.
14594 * include/grub/partition.h (grub_partition_iterate): Return int
14595 instead of grub_err_t.
14597 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14599 [GRUB_UTIL] (grub_search_fini): Likewise.
14601 * include/grub/device.h (grub_device_iterate): New prototype.
14603 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14605 (pkgdata_MODULES): Added search.mod.
14606 (search_mod_SOURCES): New variable.
14607 (search_mod_CFLAGS): Likewise.
14609 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14610 (pkgdata_MODULES): Added search.mod.
14611 (search_mod_SOURCES): New variable.
14612 (search_mod_CFLAGS): Likewise.
14614 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14615 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14616 All callers changed.
14618 * DISTLIST: Added commands/search.c.
14620 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14622 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14624 (grub_getcharwidth): New function.
14626 * kern/misc.c (grub_utf8_to_ucs4): New function.
14628 * include/grub/term.h (struct grub_term): Added a new member
14630 (grub_getcharwidth): New prototype.
14632 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14634 * term/i386/pc/console.c (map_char): New function. Segregated from
14635 grub_console_putchar.
14636 (grub_console_putchar): Use map_char.
14637 (grub_console_getcharwidth): New function.
14638 (grub_console_term): Specified grub_console_getcharwidth as
14641 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14642 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14644 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14646 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14647 on grub_strtoul completely.
14648 (write_char): Declare local variables in the beginning of the
14650 (grub_vesafb_getcharwidth): New function.
14651 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14654 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14656 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14657 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14658 commands/i386/pc/vbetest.c.
14660 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14661 call grub_vbe_get_controller_info again, because the returned
14662 information is volatile.
14663 (grub_vbe_set_video_mode): Mostly rewritten.
14664 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14665 grub_vbe_status_t correctly.
14666 (grub_vbe_get_video_mode_info): Likewise.
14667 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14668 several if statements.
14670 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14671 * commands/i386/pc/vbeinfo.c: ... this.
14673 * commands/i386/pc/vbe_test.c: Renamed to ...
14674 * commands/i386/pc/vbetest.c: ... this.
14676 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14678 (grub_cmd_vbeinfo): ... this. Save video modes before
14679 iterating. Skip a video mode, if it is not available, not enough
14680 information is given or it is monochrome. Show the memory
14681 model. Leave the interpretation of MODEVAR to grub_strtoul
14683 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14684 (GRUB_MOD_FINI): Likewise.
14686 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14687 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14688 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14689 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14690 grub_strtoul completely.
14691 (real2pm): Removed.
14692 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14693 (GRUB_MOD_FINI): Likewise.
14695 * normal/misc.c: Include grub/mm.h.
14697 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14698 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14699 (vbe_list_modes_mod_SOURCES): Removed.
14700 (vbe_list_modes_mod_CFLAGS): Likewise.
14701 (vbe_test_mod_SOURCES): Likewise.
14702 (vbe_test_mod_CFLAGS): Likewise.
14703 (vbeinfo_mod_SOURCES): New variable.
14704 (vbeinfo_mod_CFLAGS): Likewise.
14705 (vbetest_mod_SOURCES): Likewise.
14706 (vbetest_mod_CFLAGS): Likewise.
14708 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14710 * normal/misc.c: New file.
14712 * DISTLIST: Added normal/misc.c.
14714 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14715 DISK to HOOK. Call HOOK with DISK.
14716 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14717 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14718 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14720 * normal/menu_entry.c (struct screen): Added a new member
14721 "completion_shown".
14722 (completion_buffer): New global variable.
14723 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14724 (store_completion): New function.
14725 (complete): Likewise.
14726 (clear_completions): Likewise.
14727 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14728 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14729 a tab, call complete.
14731 * normal/completion.c (disk_dev): Removed.
14732 (print_simple_completion): Likewise.
14733 (print_partition_completion): Likewise.
14734 (print_func): New global variable.
14735 (add_completion): Do not take the arguments WHAT or PRINT any
14736 longer. Added a new argument TYPE. Instead of printing directly,
14737 call PRINT_FUNC if not NULL.
14738 All callers changed.
14739 (complete_device): Use a local variable DEV instead of
14740 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14741 (grub_normal_do_completion): Take a new argument HOOK. Do not
14742 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14743 empty string, return NULL instead.
14744 All callers changed.
14746 * normal/cmdline.c (print_completion): New function.
14748 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14750 All callers changed.
14752 * kern/disk.c (grub_print_partinfo): Removed.
14754 * include/grub/partition.h (struct grub_partition_map): Add a new
14755 argument DISK into HOOK of ITERATE.
14756 (grub_partition_iterate): Add a new argument DISK to HOOK.
14758 * include/grub/normal.h (enum grub_completion_type): New enum.
14759 (grub_completion_type_t): New type.
14760 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14761 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14762 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14763 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14764 (grub_normal_do_completion): Added a new argument HOOK.
14765 (grub_normal_print_device_info): New prototype.
14767 * include/grub/disk.h (grub_print_partinfo): Removed.
14769 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14770 (normal_mod_SOURCES): Likewise.
14771 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14772 (normal_mod_SOURCES): Likewise.
14774 * commands/ls.c (grub_ls_list_disks): Use
14775 grub_normal_print_device_info instead of grub_print_partinfo. Free
14777 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14778 duplicating the code.
14780 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14782 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14783 follow GCS more precisely.
14784 * commands/i386/pc/vbe_test.c: Likewise.
14785 * include/grub/i386/pc/vbe.h: Likewise.
14786 * term/i386/pc/vesafb.c: Likewise.
14787 * video/i386/pc/vbe.c: Likewise.
14789 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14791 * DISTLIST: Added term/i386/pc/vesafb.c
14792 DISTLIST: Added video/i386/pc/vbe.c
14793 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14794 DISTLIST: Added commands/i386/pc/vbe_test.c.
14795 * commands/i386/pc/vbe_list_modes.c: New file.
14796 * commands/i386/pc/vbe_test.c: Likewise.
14797 * term/i386/pc/vesafb.c: Likewise.
14798 * video/i386/pc/vbe.c: Likewise.
14799 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14800 (grub_vbe_probe) Added prototype.
14801 (grub_vbe_set_video_mode) Likewise.
14802 (grub_vbe_get_video_mode) Likewise.
14803 (grub_vbe_get_video_mode_info) Likewise.
14804 (grub_vbe_set_pixel_rgb) Likewise.
14805 (grub_vbe_set_pixel_index) Likewise.
14806 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14807 (pkgdata_MODULES): Added vesafb.mod.
14808 (pkgdata_MODULES): Added vbe_list_modes.mod.
14809 (pkgdata_MODULES): Added vbe_test.mod.
14810 (vbe_mod_SOURCES): Added.
14811 (vbe_mod_CFLAGS): Likewise.
14812 (vesafb_mod_SOURCES): Likewise.
14813 (vesafb_mod_CFLAGS): Likewise.
14814 (vbe_list_modes_mod_SOURCES): Likewise.
14815 (vbe_list_modes_mod_CFLAGS): Likewise.
14816 (vbe_test_mod_SOURCES): Likewise.
14817 (vbe_test_mod_CFLAGS): Likewise.
14819 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14821 * normal/command.c (grub_command_execute): If INTERACTIVE is
14822 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14823 CMDLINE. Disable the pager if INTERACTIVE is true.
14824 All callers are changed.
14826 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14827 before reading a config file.
14828 * normal/main.c (read_config_file): Even if a command is not
14829 found, register it if it is within an entry.
14831 * util/grub-emu.c: Include sys/types.h and unistd.h.
14832 (options): Added --hold.
14833 (struct arguments): Added a new member "hold".
14834 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14836 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14837 cleared by a debugger, if it is not zero.
14839 * include/grub/normal.h (grub_command_execute): Add an argument
14842 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14844 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14846 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14848 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14849 program with another one, because the old one didn't detect a bug
14850 in gcc-3.4. Always use regparm 2, because the new test is still
14851 not enough for gcc-4.0. Someone must investigate a simple test
14852 case which detects a bug in gcc-4.0.
14854 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14856 * DISTLIST: Added normal/completion.c.
14858 * normal/completion.c: New file.
14860 * term/i386/pc/console.c (grub_console_getwh): New function.
14861 (grub_console_term): Assign grub_console_getwh to getwh.
14863 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14864 function is defined in normal/completion.c as
14865 grub_normal_do_completion.
14866 (grub_cmdline_get): Use grub_normal_do_completion instead of
14869 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14870 returns non-zero, otherwise return 0.
14871 (grub_partition_iterate): First, probe the partition map. Then,
14872 call ITERATE only for this partition map.
14874 * kern/misc.c (grub_strncmp): Rewritten.
14876 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14877 returns non-zero. Otherwise return 0.
14879 * include/grub/partition.h (grub_partition_map_iterate): Return
14880 int instead of void.
14882 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14884 * include/grub/misc.h (grub_strncmp): Change the type of N to
14887 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14890 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14891 unsigned explicitly before comparing it with I.
14893 * kern/main.c (grub_env_write_root): Add the attribute unused into
14896 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14897 normal/completion.c.
14898 (normal_mod_SOURCES): Likewise.
14899 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14900 (normal_mod_SOURCES): Likewise.
14902 * normal/command.c (grub_iterate_commands): If ITERATE returns
14903 non-zero, return one immediately.
14905 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
14907 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14908 * kern/i386/pc/startup.S: Updated Global Descriptor table's
14910 (grub_vbe_get_controller_info): New function.
14911 (grub_vbe_get_mode_info): Likewise.
14912 (grub_vbe_set_mode): Likewise.
14913 (grub_vbe_get_mode): Likewise.
14914 (grub_vbe_set_memory_window): Likewise.
14915 (grub_vbe_get_memory_window): Likewise.
14916 (grub_vbe_set_scanline_length): Likewise.
14917 (grub_vbe_get_scanline_length): Likewise.
14918 (grub_vbe_set_display_start): Likewise.
14919 (grub_vbe_get_display_start): Likewise.
14920 (grub_vbe_set_palette_data): Likewise.
14921 * include/grub/i386/pc/vbe.h: New file.
14923 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14925 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14926 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14927 * DISTLIST: Likewise.
14928 * kern/ieee1275/of.c: Moved to ...
14929 * kern/ieee1275/ieee1275.c: ... here.
14931 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14933 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14934 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14935 Pass 0 as `end' parameter to grub_strtoul().
14937 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
14939 * include/grub/powerpc/ieee1275/console.h: Do not include
14940 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
14942 (grub_console_cur_color): Remove i386-specific prototype.
14943 (grub_console_real_putchar): Likewise.
14944 (grub_console_checkkey): Likewise.
14945 (grub_console_getkey): Likewise.
14946 (grub_console_getxy): Likewise.
14947 (grub_console_gotoxy): Likewise.
14948 (grub_console_cls): Likewise.
14949 (grub_console_setcursor): Likewise.
14950 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14951 Include <grub/machine/console.h>.
14952 * term/ieee1275/ofconsole.c: Likewise.
14954 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
14956 * Makefile.in (LIBLZO): New variable.
14958 * configure.ac: Check for LZO version 2.
14960 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14961 lzo/lzo1x.h instead of lzo1x.h.
14963 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14966 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14967 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14969 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14970 copying the data from PARTITION to P.
14972 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
14974 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14975 negative, unload the module.
14977 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14978 map is "pc_partition_map" but not "pc".
14979 (usage): Fix the description. The options are --boot-image and
14980 --core-image but not --boot-file or --core-file.
14981 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14982 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14985 * util/i386/pc/grub-install.in: Do not specify --boot-file or
14986 --core-file. Specify INSTALL_DEVICE as an argument.
14988 * util/console.c: Include config.h.
14989 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14990 [HAVE_NCURSES_H]: Include ncurses.h.
14991 [HAVE_CURSES_H]: Include curses.h.
14992 [!A_NORMAL] (A_NORMAL): Defined as zero.
14993 [!A_STANDOUT] (A_STANDOUT): Likewise.
14995 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14997 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14999 * configure.ac: Check for curses libraries and headers.
15001 * Makefile.in (LIBCURSES): New variable.
15003 * genmk.rb (Script::rule): Set the executable bits.
15005 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15006 name of the PC partition map is "pc_partition_map" but not "pc".
15008 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15010 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15011 (modules): Likewise.
15012 (usage): Added descriptions for --modules and --grub-probefs.
15013 Handle --modules and --grub-probefs. Save the arguments in MODULES
15014 and GRUB_PROBEFS, respectively.
15015 Auto-detect a filesystem module against GRUBDIR. If the result is
15016 empty and modules are not specified explicitly, abort the
15017 installation. Add the result to MODULES.
15019 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15020 disk/powerpc/ieee1275/ofdisk.c,
15021 include/grub/powerpc/ieee1275/init.h and
15022 term/powerpc/ieee1275/ofconsole.c.
15023 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15024 term/ieee1275/ofconsole.c.
15026 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15028 * COPYING: Upgraded to the latest version. Only the address of the
15029 FSF office has changed.
15031 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15033 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15034 kern/ieee1275.c with kern/ieee1275/of.c.
15036 * kern/ieee1275.c: Moved to ...
15037 * kern/ieee1275/of.c: ... here.
15039 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15041 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15044 * config.guess: Updated to the latest version from gnulib.
15045 * config.sub: Likewise.
15046 * install.sh: Likewise.
15047 * mkinstalldirs: Likewise.
15049 * include/grub/console.h: Removed. This file is arch-specific. Do
15050 not put this in include/grub.
15052 * include/grub/i386/pc/console.h: Resurrected.
15054 * util/console.c: Include grub/machine/console.h instead of
15056 * util/grub-emu.c: Likewise.
15058 2005-08-04 Marco Gerards <metgerards@student.han.nl>
15060 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15063 From Vincent Pelletier <subdino2004@yahoo.fr>
15064 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15065 Redefined to use grub_getwh.
15066 (grub_term): New member named getwh.
15067 (grub_getwh): New prototype.
15068 * kern/term.c (grub_getwh): New function.
15069 * term/i386/pc/console.c (grub_console_getwh): New function.
15070 (grub_console_term): New member `getwh'.
15071 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15072 (grub_vga_term): New member `getwh'.
15073 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15075 (grub_ofconsole_getw): New function.
15076 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15077 (grub_ofconsole_term): New field named getwh and new initial
15080 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15082 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15083 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15084 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15085 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15086 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15087 of <grub/machine/ieee1275.h>.
15088 * commands/ieee1275/reboot.c: Likewise.
15089 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15090 * kern/ieee1275.c: ... to here. All users updated. Change all
15091 parameter structs to use new type `grub_ieee1275_cell_t'.
15092 * term/powerpc/ieee1275/ofconsole.c: Move ...
15093 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15094 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15095 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15096 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15098 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15099 Remove unused prototypes. All users updated.
15100 * include/grub/powerpc/ieee1275/console.h: Removed.
15101 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15102 `grub_ieee1275_cell_t'.
15103 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15104 Cast comparisons with -1 to the correct type.
15105 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15106 type to match `grub_ieee1275_entry_fn'.
15108 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15110 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15112 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15113 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15115 (grub_probefs_SOURCES): New variable.
15117 * util/i386/pc/grub-probefs.c: New file.
15119 * util/i386/pc/grub-setup.c (main): Call
15120 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15121 grub_hfs_init and grub_jfs_init to initialize the system. Call
15122 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15123 grub_pc_partition_map_fini to finish the system.
15125 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15127 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15129 (grub_multiboot_load_elf32): Likewise.
15130 (grub_multiboot_is_elf64): Likewise.
15131 (grub_multiboot_load_elf64): Likewise.
15132 (grub_multiboot_load_elf): Likewise.
15133 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15134 an ELF32 or ELF64 file.
15135 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15137 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15138 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15139 NULL before calling FS->LABEL.
15140 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15141 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15142 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15143 before calling FS->LABEL.
15145 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15147 * util/i386/pc/grub-install.in (datadir): New variable.
15149 (pkgdatadir): New variable.
15150 (pkglibdir): Removed.
15152 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15154 * DISTLIST: Added util/i386/pc/grub-install.in.
15156 * util/i386/pc/grub-install.in: New file.
15158 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15159 (grub_install_SOURCES): Likewise.
15161 * genmk.rb: Added support for scripts.
15162 (Script): New class.
15163 (scripts): New variable.
15165 * Makefile.in (install-local): Install sbin_SCRIPTS by
15167 (uninstall): Remove sbin_SCRIPTS.
15169 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15170 device, try to get a GRUB device by
15171 grub_util_biosdisk_get_grub_dev.
15174 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15175 description for --device-map.
15177 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15179 Change the semantics of variable hooks. They now return strings
15180 instead of error values.
15182 * util/i386/pc/grub-setup.c: Include grub/env.h.
15183 (setup): Use grub_device_set_root instead of grub_env_set.
15185 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15186 grub_env_get instead of grub_device_set_root and
15187 grub_device_get_root, respectively.
15189 * kern/main.c (grub_env_write_root): New function.
15190 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15191 grub_env_set instead of grub_device_set_root.
15193 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15195 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15196 rather than calling ENV->WRITE_HOOK afterwards.
15197 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15198 passing a pointer of a pointer.
15199 (grub_register_variable_hook): Change the types of "read_hook" and
15200 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15202 Allocate the default empty string on the heap, because this string
15203 may be freed later.
15205 * kern/device.c: Include grub/env.h.
15206 (grub_device_set_root): Removed.
15207 (grub_device_get_root): Likewise.
15208 (grub_device_open): Use grub_env_get instead of
15209 grub_device_get_root.
15211 * include/grub/env.h (grub_env_read_hook_t): New type.
15212 (grub_env_write_hook_t): Likewise.
15213 (grub_env_var): Change the types of "read_hook" and "write_hook"
15214 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15215 (grub_register_variable_hook): Likewise.
15217 * include/grub/device.h (grub_device_set_root): Removed.
15218 (grub_device_set_root): Likewise.
15220 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15221 make sure that DIRNAME terminates with '/', so that
15222 grub_fat_find_dir will fail if PATH is not a directory.
15224 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15226 Use the qualifier auto for print_files and print_files_long.
15227 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15229 Put a newline only if there is no error.
15230 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15233 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15235 * kern/partition.c (grub_partition_probe): Initialize PART to
15236 NULL. Otherwise, when no partition map is registered, this returns
15239 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15241 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15242 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15245 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15247 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15248 information on each device, if it does not have partitions. Print
15249 "Device" instead of "Disk", because this function is not specific
15252 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15253 static to ensure that it is put on the memory rather than a
15256 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15258 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15259 (grub_cat_init): Likewise.
15260 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15261 (options): Likewise.
15262 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15263 (grub_configfile_init): Likewise.
15264 * font/manager.c (GRUB_MOD_INIT): Likewise.
15265 * commands/help.c (GRUB_MOD_INIT): Likewise.
15266 (grub_help_init): Likewise.
15267 * normal/command.c (grub_command_init): Likewise.
15268 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15269 * disk/loopback.c (grub_loop_init): Likewise.
15270 (GRUB_MOD_INIT): Likewise.
15271 * commands/ls.c (grub_ls_init): Likewise.
15272 (GRUB_MOD_INIT): Likewise.
15273 (options): Likewise.
15274 * commands/boot.c (grub_boot_init): Likewise.
15275 (GRUB_MOD_INIT): Likewise.
15276 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15277 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15278 (GRUB_MOD_INIT): Likewise.
15279 * commands/cmp.c (grub_cmp_init): Likewise.
15280 (GRUB_MOD_INIT): Likewise.
15282 * normal/arg.c: Use <> instead of "" to include header files.
15283 (SHORT_ARG_HELP): New macro.
15284 (SHORT_ARG_USAGE): Likewise.
15285 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15286 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15288 (find_short): Check if C is 'h' or 'u' explicitly.
15289 (grub_arg_show_help): Use space characters instead of tabs. Treat
15290 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15291 are shown with --help and --usage only if they are not used for
15292 the command itself.
15293 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15296 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15297 const into "longarg". Change the type of "shortarg" to int.
15299 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15301 * boot/i386/pc/boot.S (boot_drive_check): New label.
15303 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15306 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15307 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15309 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15311 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15312 When turning off Gate A20, skip the check and return immediately,
15313 because this is not fatal usually.
15315 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15317 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15318 be 0x7C00 instead of 0x8000.
15320 * boot/i386/pc/pxeboot.S: Rewritten.
15322 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15324 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15327 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15329 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15330 robustness. This routine now supports a BIOS call and System
15331 Control Port A to modify the gate A20.
15333 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15334 Increased to 0x440.
15336 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15338 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15339 device path and resulting ihandle.
15340 (grub_ofdisk_close): dprintf the ihandle being closed.
15341 (grub_ofdisk_read): dprintf function parameters.
15342 * kern/mm.c (grub_mm_init_region): Likewise.
15343 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15344 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15345 size, and boot arguments.
15346 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15347 before loading into memory.
15348 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15349 before loading into memory.
15351 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15353 * kern/mm.c: Added much documentation.
15354 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15355 8, set to 5 instead of 8.
15357 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15359 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15361 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15362 (grub_mkdevicemap_SOURCES): New variable.
15364 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15365 lib/device.c of GRUB Legacy.
15367 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15369 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15370 instead of PATH is NULL.
15372 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15374 * commands/cmp.c (BUFFER_SIZE): New macro.
15375 (grub_cmd_cmp): Close the right file at the right time. Compare
15376 only data just read. Don't report files of different size as
15377 identical. Dynamically allocate buffers. Move variable
15378 declarations at the beginning of function.
15380 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
15382 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15385 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15387 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15388 when backspace is pressed at beginning of line.
15390 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
15392 * DISTLIST: Added genfslist.sh.
15394 * normal/main.c (fs_module_list): New variable.
15395 (autoload_fs_module): New function.
15396 (read_fs_list): Likewise.
15397 (grub_normal_execute): Call read_fs_list.
15399 * kern/fs.c (grub_fs_autoload_hook): New variable.
15400 (grub_fs_probe): Added support for auto-loading.
15402 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15403 (grub_fs_module_list_t): New type.
15405 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15406 (grub_fs_autoload_hook): New prototype.
15408 * genfslist.sh: New file.
15410 * genmk.rb: Added a rule to generate a filesystem list.
15412 2005-06-30 Marco Gerards <metgerards@student.han.nl>
15414 * configure.ac: Fix the test for cross-compiling.
15416 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15417 define GRUB_UTIL anymore.
15419 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15420 so this function works on other systems than just big endian.
15421 (load_modules): Likewise.
15422 (add_segments): Likewise.
15424 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15426 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15427 contains `l' modifier, get a long from va_arg().
15429 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15431 * kern/mm.c (grub_free): If the next free block which is being
15432 merged is the first free block, set the first block to the block
15434 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15436 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15438 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15439 `grub_ieee1275_chosen'.
15441 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15443 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15444 (grub_ieee1275_chosen): New variable.
15445 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15447 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15448 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15449 Rename first argument to `phandle' for consistency.
15450 (grub_ieee1275_get_property_length): Likewise.
15451 (grub_ieee1275_next_property): Likewise. Change type of first argument
15452 to grub_ieee1275_phandle_t.
15453 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15454 Move export next to declaration.
15455 (grub_ieee1275_chosen): New variable.
15456 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15457 Correct cosmetic typo.
15458 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15459 `grub_ieee1275_chosen'.
15460 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15461 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15462 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15463 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15464 `grub_ieee1275_chosen'.
15466 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15468 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15470 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15471 /chosen/bootargs as "variable=value" pairs.
15473 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15475 * include/grub/misc.h (grub_dprintf): New macro.
15476 (grub_real_dprintf): New prototype.
15477 (grub_strword): Likewise.
15478 (grub_iswordseparator): Likewise.
15479 * kern/misc.c (grub_real_dprintf): New function.
15480 (grub_strword): Likewise.
15481 (grub_iswordseparator): Likewise.
15483 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15485 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15486 (roundup): Remove macro.
15487 (grub_ieee1275_flags): Make static.
15488 (grub_ieee1275_realmode): Remove.
15489 (grub_ieee1275_test_flag): New function.
15490 (grub_ieee1275_set_flag): Likewise.
15491 (find_options): Rename to `grub_ieee1275_find_options'; update
15492 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15493 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15494 (cmain): New prototype.
15495 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15496 `grub_ieee1275_flags' directly.
15497 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15498 machine/biosdisk.h.
15499 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15500 Don't include grub/machine/init.h.
15501 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15502 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15504 (grub_ieee1275_realmode): Likewise.
15505 (grub_ieee1275_flag): New enum.
15506 (grub_ieee1275_test_flag): New prototype.
15507 (grub_ieee1275_set_flag): New prototype.
15508 * include/grub/powerpc/ieee1275/init.h: Remove file.
15509 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15510 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15511 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15512 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15514 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15515 `grub_ieee1275_test_flag'.
15516 (grub_ieee1275_encode_devname): Likewise.
15518 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15520 * include/grub/powerpc/ieee1275/ieee1275.h
15521 (grub_ieee1275_encode_devname): New prototype.
15522 (grub_ieee1275_get_filename): Likewise.
15523 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15525 (grub_set_prefix): Likewise.
15526 (grub_machine_init): Call grub_set_prefix.
15527 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15528 (grub_parse_type): New enum.
15529 (grub_ieee1275_get_devargs): New function.
15530 (grub_ieee1275_get_devname): Likewise.
15531 (grub_ieee1275_parse_args): Likewise.
15532 (grub_ieee1275_get_filename): Likewise.
15533 (grub_ieee1275_encode_devname): Likewise.
15535 2005-03-30 Marco Gerards <metgerards@student.han.nl>
15537 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15538 `grub_loader_unset'.
15540 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15542 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15543 instead of grub_ieee1275_interpret.
15544 (grub_halt_init): New function.
15545 (grub_halt_fini): Likewise.
15546 (GRUB_MOD_INIT): Correct message grammar.
15547 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15548 instead of grub_ieee1275_interpret.
15549 (grub_reboot_init): New function.
15550 (grub_reboot_fini): Likewise.
15551 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15552 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15553 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15554 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15555 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15557 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15559 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15561 (grub_halt): Likewise.
15562 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15563 (cmain): Remove __attribute__((unused)).
15564 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15565 (grub_heap_len): Likewise.
15566 (grub_machine_fini): New function.
15567 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15568 (grub_halt): Likewise.
15569 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15571 * util/powerpc/ieee1275/misc.c: New file.
15573 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15575 * DISTLIST: New file.
15576 * gendistlist.sh: Likewise.
15578 * Makefile.in (COMMON_DISTFILES): Removed.
15579 (BOOT_DISTFILES): Likewise.
15580 (CONF_DISTFILES): Likewise.
15581 (DISK_DISTFILES): Likewise.
15582 (FS_DISTFILES): Likewise.
15583 (INCLUDE_DISTFILES): Likewise.
15584 (KERN_DISTFILES): Likewise.
15585 (LOADER_DISTFILES): Likewise.
15586 (TERM_DISTFILES): Likewise.
15587 (UTIL_DISTFILES): Likewise.
15588 (DISTFILES): Likewise.
15589 (uninstall): Uninstall files in $(pkgdata_DATA).
15590 (DISTLIST): New target.
15591 (distdir): Use the contents of the file DISTLIST to get a list of
15594 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15596 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15597 descriptor. This is ported from GRUB Legacy.
15599 * gencmdlist.sh: Added an extra semicolon to make it work with
15600 old sed versions. Reported by Robert Bihlmeyer
15601 <robbe@orcus.priv.at>.
15603 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
15605 Automatic loading of commands is supported.
15607 * normal/main.c (read_command_list): New function.
15608 (grub_normal_execute): Call read_command_list.
15610 * normal/command.c (grub_register_command): Return zero or CMD.
15611 Allocate CMD->NAME from the heap.
15612 Initialize CMD->MODULE_NAME to zero.
15613 Find the same name as well. If the same command is found and it is
15614 a dummy command, overwrite members. If it is not a dummy command,
15616 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15617 (grub_command_find): If a dummy command is found, load a module
15618 and retry to find a command only once.
15620 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15621 make sure that each command is loaded.
15623 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15625 (struct grub_command): Remove const from the member `name'.
15626 Add a new member `module_name'.
15627 (grub_register_command): Return grub_command_t.
15629 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15630 sure that each command is loaded.
15632 * genmk.rb (PModule::rule): Specify a module name without the
15633 suffix ".mod" to gencmdlist.sh.
15635 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15637 * gencmdlist.sh: New file.
15639 * genmk.rb (PModule::rule): Generate a rule for a command list.
15641 Generate command.lst from $(COMMANDFILES).
15643 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15644 (DATA): Added $(pkgdata_DATA).
15645 (install-local): Install files in $(pkgdata_DATA).
15647 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15649 * term/i386/pc/vga.c (debug_command): Removed.
15650 (GRUB_MOD_INIT): Do not register the command "debug".
15652 From Hollis Blanchard:
15653 * commands/configfile.c: New file.
15654 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15655 commands/configfile.c.
15656 (pkgdata_MODULES): Added configfile.mod.
15657 (configfile_mod_SOURCES): New variable.
15658 (configfile_mod_CFLAGS): Likewise.
15659 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15660 commands/configfile.c.
15661 (pkgdata_MODULES): Added configfile.mod.
15662 (configfile_mod_SOURCES): New variable.
15663 (configfile_mod_CFLAGS): Likewise.
15664 * util/grub-emu.c (main): Call grub_configfile_init and
15665 grub_configfile_fini.
15666 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15668 [GRUB_UTIL] (grub_configfile_fini): Likewise.
15670 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15672 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15675 * commands/help.c (grub_cmd_help): Do not print newlines after
15676 the last command in print_command_help.
15678 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15680 * commands/default.h: New file.
15681 * commands/timeout.h: Likewise.
15682 * normal/context.c: Likewise.
15684 * util/misc.c: Do not include sys/times.h.
15685 Include sys/time.h and grub/machine/time.h.
15686 (grub_get_rtc): Rewritten with gettimeofday.
15688 * util/grub-emu.c (main): Call grub_default_init and
15689 grub_timeout_init before grub_normal_init, and call
15690 grub_timeout_fini and grub_default_fini after grub_main.
15692 * util/console.c (grub_ncurses_checkkey): Return the read
15695 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15698 * normal/main.c (read_config_file): Push MENU. If this fails,
15699 print an error and wait for a user input.
15700 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15701 If a menu is empty or an error occurs, pop MENU.
15702 (grub_normal_execute): Pop and free MENU after grub_menu_run
15705 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15707 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15709 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15711 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15713 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15716 * include/grub/normal.h (struct grub_menu_list): New struct.
15717 (grub_menu_list_t): New type.
15718 (struct grub_context): New struct.
15719 (grub_context_t): New type.
15720 (grub_register_command): Got rid of EXPORT_FUNC.
15721 (grub_unregister_command): Likewise.
15722 (grub_context_get): New prototype.
15723 (grub_context_get_current_menu): Likewise.
15724 (grub_context_push_menu): Likewise.
15725 (grub_context_pop_menu): Likewise.
15726 [GRUB_UTIL] (grub_default_init): Likewise.
15727 [GRUB_UTIL] (grub_default_fini): Likewise.
15728 [GRUB_UTIL] (grub_timeout_init): Likewise.
15729 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15731 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15732 commands/timeout.c and normal/context.c.
15733 (pkgdata_MODULES): Added default.mod and timeout.mod.
15734 (normal_mod_SOURCES): Added normal/context.c.
15735 (default_mod_SOURCES): New variable.
15736 (default_mod_CFLAGS): Likewise.
15737 (timeout_mod_SOURCES): Likewise.
15738 (timeout_mod_CFLAGS): Likewise.
15739 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15741 (pkgdata_MODULES): Added default.mod and timeout.mod.
15742 (normal_mod_SOURCES): Added normal/context.c.
15743 (default_mod_SOURCES): New variable.
15744 (default_mod_CFLAGS): Likewise.
15745 (timeout_mod_SOURCES): Likewise.
15746 (timeout_mod_CFLAGS): Likewise.
15748 * Makefile.in (all-local): Added $(MKFILES).
15750 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15752 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15753 (grub_emu_SOURCES): Likewise.
15754 (pkgdata_MODULES): Add `sun.mod'.
15755 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15756 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15758 (pkgdata_MODULES): Add `sun.mod'.
15759 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15760 * include/grub/partition.h (grub_sun_partition_map_init): New
15762 (grub_sun_partition_map_fini): Likewise.
15763 * partmap/sun.c: New file.
15764 * util/grub-emu.c (main): Initialize and de-initialize the sun
15765 partitionmap support.
15767 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15769 This implements an Emacs-like menu entry editor.
15771 * normal/menu_entry.c: New file.
15773 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15774 characters to ASCII.
15775 (saved_char): New variable.
15776 (grub_ncurses_checkkey): Rewritten completely.
15777 (grub_ncurses_getkey): Likewise.
15778 (grub_ncurses_init): Call raw instead of cbreak.
15780 * normal/menu.c (print_entry): Do not put a space.
15781 (init_page): Renamed to ...
15782 (grub_menu_init_page): ... this. All callers changed.
15783 (edit_menu_entry): Removed.
15784 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15786 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15788 * kern/misc.c (grub_vprintf): Call grub_refresh.
15790 * normal/menu.c (DISP_LEFT): Renamed to ...
15791 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15792 * normal/menu.c (DISP_UP): Renamed to ...
15793 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15794 * normal/menu.c (DISP_RIGHT): Renamed to ...
15795 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15796 * normal/menu.c (DISP_DOWN): Renamed to ...
15797 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15798 * normal/menu.c (DISP_HLINE): Renamed to ...
15799 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15800 * normal/menu.c (DISP_VLINE): Renamed to ...
15801 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15802 * normal/menu.c (DISP_UL): Renamed to ...
15803 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15804 * normal/menu.c (DISP_UR): Renamed to ...
15805 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15806 * normal/menu.c (DISP_LL): Renamed to ...
15807 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15808 * normal/menu.c (DISP_LR): Renamed to ...
15809 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15810 * normal/menu.c (TERM_WIDTH): Renamed to ...
15811 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15812 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15813 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15814 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15815 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15816 * normal/menu.c (TERM_MARGIN): Renamed to ...
15817 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15818 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15819 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15820 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15821 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15822 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15823 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15824 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15825 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15826 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15827 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15828 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15829 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15830 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15831 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15832 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15833 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15834 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15835 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15836 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15837 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15838 All callers changed.
15840 * include/grub/normal.h: New prototype.
15842 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15843 normal/menu_entry.c.
15844 (normal_mod_SOURCES): Likewise.
15845 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15846 (normal_mod_SOURCES): Likewise.
15848 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15850 * include/grub/normal.h (grub_halt_init): New prototype.
15851 (grub_halt_fini): Likewise.
15852 (grub_reboot_init): Likewise.
15853 (grub_reboot_fini): Likewise.
15855 * util/grub-emu.c: Include signal.h.
15856 (main_env): New global variable.
15857 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15859 (grub_machine_fini): New function.
15860 (main): Call grub_halt_init and grub_reboot_init before
15861 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15862 Call setjmp with MAIN_ENV to go back afterwards.
15863 Call grub_machine_fini right before return.
15865 * include/grub/util/misc.h: Include setjmp.h.
15866 (main_env): New prototype.
15868 * include/grub/kernel.h (grub_machine_fini): New prototype.
15869 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15870 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15872 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15873 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15874 * term/i386/pc/console.c (grub_console_fini): Likewise.
15876 * util/i386/pc/misc.c: New file.
15878 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15879 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15880 commands/i386/pc/reboot.c.
15882 2005-02-14 Guillem Jover <guillem@hadrons.org>
15884 * include/grub/dl.h (grub_dl_check_header): New prototype.
15885 (grub_arch_dl_check_header): Change return type to grub_err_t,
15886 remove size parameter and export function. Update all callers.
15887 * kern/dl.c (grub_dl_check_header): New function.
15888 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15889 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15890 are inside the core.
15891 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15892 independent ELF header checks.
15893 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15894 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15895 `grub_dl_check_header' instead of explicit checks. Check for the
15897 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15898 `grub_dl_check_header' instead of explicit checks. Remove arch
15899 specific ELF header checks.
15901 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15904 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
15906 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15907 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15909 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
15911 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15912 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15913 (part_map_iterate): Clear `grub_errno' and return 0 if
15914 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15915 * partmap/amiga.c (amiga_partition_map_iterate): Return
15916 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15917 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15919 2005-02-01 Guillem Jover <guillem@hadrons.org>
15921 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15924 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15926 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15928 (grub_rescue_cmd_linux): New prototype.
15929 (grub_rescue_cmd_initrd): Likewise.
15930 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15932 (grub_linux_release_mem): Release the memory for the initrd.
15933 (grub_load_linux): Renamed from this...
15934 (grub_rescue_cmd_linux): ...To this. Changed all callers.
15935 Changed `entry' not to be static. Loop over memory regions to
15936 find another one when the default fails.
15937 (grub_rescue_cmd_initrd): New function.
15938 (grub_linux_init): Remove function.
15939 (grub_linux_fini): Likewise.
15940 (GRUB_MOD_INIT): Register `initrd'.
15941 (GRUB_MOD_FINI): Unregister `initrd'.
15942 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15944 (grub_linux_normal_fini): Likewise.
15945 (GRUB_MOD_INIT): Register `initrd'.
15946 (GRUB_MOD_FINI): Unregister `initrd'.
15948 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15950 * commands/help.c: New file.
15951 * normal/arg.c (show_help): Renamed to...
15952 (grub_arg_show_help): ... this.
15953 * commands/i386/pc/halt.c: New file.
15954 * commands/i386/pc/reboot.c: Likewise.
15955 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15956 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15957 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15958 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15960 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15962 (pkgdata_MODULES): Add `help.mod'.
15963 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15964 * grub/i386/pc/init.h (grub_reboot): New prototype.
15965 (grub_halt): Likewise.
15966 * include/grub/normal.h (grub_arg_show_help): New prototype.
15967 (grub_help_init): Likewise.
15968 (grub_help_fini): Likewise.
15969 * util/grub-emu.c (main): Initialize and deinitialize the help
15972 * normal/cmdline.c (grub_cmdline_get): Doc fix.
15974 * normal/command.c (grub_command_init): Fixed the description of
15975 the `set' and `unset' commands.
15977 2005-01-31 Marco Gerards <metgerards@student.han.nl>
15979 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15981 * commands/ieee1275/halt.c: New file.
15982 * commands/ieee1275/reboot.c: Likewise.
15983 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15984 `__attribute__ ((unused))'. Some GCS related fixed.
15985 (grub_suspend_init) [GRUB_UTIL]: Function removed.
15986 (grub_suspend_fini): Likewise.
15987 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15989 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15990 (halt_mod_CFLAGS): New variables.
15991 * include/grub/powerpc/ieee1275/ieee1275.h
15992 (grub_ieee1275_interpret): New prototype.
15994 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
15996 * include/grub/misc.h (memmove): New prototype.
15997 (memcpy): Likewise.
15999 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16001 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16002 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16004 2005-01-22 Marco Gerards <metgerards@student.han.nl>
16006 * kern/misc.c (grub_strndup): Function rewritten.
16008 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16010 * normal/menu.c (TERM_WIDTH): Macro redefined.
16011 (TERM_TOP_BORDER_Y): Likewise.
16012 (draw_border): Replaced while-loop by a for-loop. Make the number
16013 of lines consistent with the number of lines displayed in
16014 print_entries. Added a margin below the rectangle.
16015 (print_entry): Make the entry fit in the rectangle.
16016 (print_entries): Display the scroll arrows next to the right
16019 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16021 * fs/minix.c (grub_minix_find_file): Reserve more space for
16022 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16023 `grub_strncpy' to copy `path' into it.
16025 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16027 Add the loopback device, a device via which files can be accessed
16030 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16031 (pkgdata_MODULES): Add loopback.mod.
16032 (loopback_mod_SOURCES): New variable.
16033 (loopback_mod_CFLAGS): Likewise.
16034 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16036 (pkgdata_MODULES): Add loopback.mod.
16037 (loopback_mod_SOURCES): New variable.
16038 (loopback_mod_CFLAGS): Likewise.
16039 * disk/loopback.c: new file.
16040 * include/grub/normal.h (grub_loop_init): New prototype.
16041 (grub_loop_fini): New prototype.
16042 * util/grub-emu.c (main): Initialize and de-initialize loopback
16044 * include/grub/disk.h (grub_disk_dev_id): Add
16045 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16047 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16049 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16051 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16052 (suspend_mod_SOURCES): New variable.
16053 (suspend_mod_CFLAGS): Likewise.
16054 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16056 * commands/ieee1275/suspend.c: New file.
16058 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16060 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16061 ((unused))' to `__attribute__ ((used))'.
16062 (GRUB_MOD_FINI): Likewise.
16063 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16064 * genmk.rb (PModule): Assign space to common symbols when linking
16067 2005-01-20 Marco Gerards <metgerards@student.han.nl>
16069 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16070 `unsigned' arguments to `grub_size_t'.
16071 (grub_malloc): Likewise.
16072 (grub_realloc): Likewise.
16073 (grub_memalign): Likewise.
16074 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16075 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16076 * util/misc.c (grub_malloc): Likewise.
16077 (grub_realloc): Likewise.
16078 * kern/mm.c (get_header_from_pointer): Change the casts to
16079 `unsigned' into a cast to `grub_size_t'.
16081 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16082 point to `currnode' when `currnode' is changed.
16084 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16085 Schottelius <nico-linux@schottelius.org>.
16087 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16089 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16090 (note_path): Remove variable.
16091 (GRUB_IEEE1275_NOTE_NAME): New macro.
16092 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16093 (grub_ieee1275_note_hdr): New structure.
16094 (grub_ieee1275_note_desc): Likewise.
16095 (grub_ieee1275_note): Likewise.
16096 (load_note): Remove `dir' argument. All callers updated. Remove
16097 `note_img' and `path'. Do not load a file from `note_path'.
16098 Initialize a struct grub_ieee1275_note and write that to `out'.
16099 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16101 2005-01-05 Marco Gerards <metgerards@student.han.nl>
16103 * util/misc.c (grub_util_read_image): Revert last change. It
16104 called `grub_util_read_at', which seeks from the beginning of the
16107 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16109 * TODO: Add note about endianness in grub-mkimage.
16110 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16112 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16113 (grub_mkimage_SOURCES): New target.
16114 * include/grub/kernel.h (grub_start_addr): Remove variable.
16115 (grub_end_addr): Likewise.
16116 (grub_total_module_size): Likewise.
16117 (grub_kernel_image_size): Likewise.
16118 (GRUB_MODULE_MAGIC): New constant.
16119 (grub_module_info): New structure.
16120 (grub_arch_modules_addr): New prototype.
16121 (grub_get_end_addr): Remove prototype.
16122 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16123 * include/grub/powerpc/ieee1275/kernel.h: New file.
16124 * include/grub/util/misc.h (grub_util_get_fp_size): New
16126 (grub_util_read_at): Likewise.
16127 (grub_util_write_image_at): Likewise.
16128 * kern/main.c (grub_get_end_addr): Remove function.
16129 (grub_load_modules): Call grub_arch_modules_addr instead of using
16130 grub_end_addr. Look for a grub_module_info struct in memory. Use
16131 the grub_module_info fields instead of calling grub_get_end_addr
16132 as loop conditions. Move grub_add_unused_region code here.
16133 (grub_add_unused_region): Remove function.
16134 * kern/i386/pc/init.c: Include grub/cache.h.
16135 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16136 one call to add_mem_region.
16137 (grub_arch_modules_addr): New function.
16138 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16139 (grub_total_module_size): Likewise.
16140 Include grub/machine/kernel.h.
16141 (grub_arch_modules_addr): New function.
16142 * util/grub-emu.c (grub_end_addr): Remove variable.
16143 (grub_total_module_size): Likewise.
16144 (grub_arch_modules_addr): New function.
16145 * util/misc.c: Include unistd.h.
16146 (grub_util_get_fp_size): New function.
16147 (grub_util_read_at): Likewise.
16148 (grub_util_write_image_at): Likewise.
16149 (grub_util_read_image): Call grub_util_read_at.
16150 (grub_util_write_image): Call grub_util_write_image_at.
16151 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16152 additional memory in kernel_img for a struct grub_module_info.
16153 Fill in that grub_module_info.
16154 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16156 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16158 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16160 * include/grub/powerpc/ieee1275/ieee1275.h
16161 (grub_ieee1275_milliseconds): New prototype.
16162 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16164 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16165 grub_ieee1275_milliseconds.
16167 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16169 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16171 (find_options): New function.
16172 (cmain): Call find_options.
16173 * include/grub/powerpc/ieee1275/ieee1275.h
16174 (grub_ieee1275_realmode): New extern variable.
16175 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16176 grub_map if grub_ieee1275_realmode is false.
16178 2004-12-29 Marco Gerards <metgerards@student.han.nl>
16180 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16181 lines are inserted and make it work like readline. Reported by
16182 Vincent Pelletier <subdino2004@yahoo.fr>.
16184 2004-12-28 Marco Gerards <metgerards@student.han.nl>
16186 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16188 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16189 `kern/powerpc/cache.S'.
16191 2004-12-27 Marco Gerards <metgerards@student.han.nl>
16193 * genmk.rb: Handle the `Program' class in the main loop. Written
16194 by Johan Rydberg <jrydberg@gnu.org>.
16195 (Program): New class.
16196 (programs): New variable.
16197 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16198 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16199 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16200 (help_arch): Function removed.
16201 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16202 `powerpc/libgcc.h' and `loader.h'.
16203 (pkgdata_PROGRAMS): New variable.
16204 (sbin_UTILITIES): Variable removed.
16205 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16206 (grubof_SOURCES): Variable re-defined so it only includes the
16207 core functionality.
16208 (grubof_CFLAGS): Remove `-DGRUBOF'.
16209 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16210 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16211 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16212 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16213 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16214 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16215 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16216 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16217 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16218 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16219 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16220 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16221 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16222 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16223 (pc_mod_CFLAGS): New variables.
16224 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16225 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16226 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16227 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16229 * include/grub/i386/pc/init.h (grub_os_area_addr)
16230 (rub_os_area_size): ... to here.
16231 * include/grub/powerpc/ieee1275/ieee1275.h
16232 (grub_ieee1275_entry_fn): Export symbol.
16233 * include/grub/powerpc/ieee1275/init.h: New file.
16234 * include/grub/powerpc/libgcc.h: Likewise.
16235 * include/grub/cache.h: Likewise.
16236 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16237 <hollis@penguinppc.org>.
16238 * kern/dl.c: Include <grub/cache.h>.
16239 (grub_dl_flush_cache): New function.
16240 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16242 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16243 (grub_console_init): Removed prototypes.
16244 (grub_machine_init): Don't initialize the modules anymore.
16245 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16247 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16248 Macro undef removed.
16249 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16250 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16251 relocation `R_PPC_REL32'. Return an error when the relocation is
16253 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16254 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16255 * util/misc.c (grub_arch_sync_caches): Likewise.
16257 2004-12-19 Marco Gerards <metgerards@student.han.nl>
16259 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16260 `symlist.c', add `grubof_symlist.c'.
16261 (symlist.c): Variable removed.
16262 (grubof_HEADERS): Variable added.
16263 (grubof_symlist.c): New target.
16264 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16265 `kernel_img_HEADERS'.
16266 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16267 * kern/powerpc/dl.c: New file.
16268 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16270 (grub_arch_dl_relocate_symbols): Likewise.
16271 (grub_register_exported_symbols): Likewise.
16273 2004-12-13 Marco Gerards <metgerards@student.han.nl>
16275 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16276 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16277 to fail instead. Reported by Vincent Pelletier
16278 <subdino2004@yahoo.fr>.
16280 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16281 it is not allocated. Reported by Vincent Pelletier
16282 <subdino2004@yahoo.fr>.
16284 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16285 output so the output looks better.
16287 2004-12-04 Marco Gerards <metgerards@student.han.nl>
16289 Modulize the partition map support and add support for the amiga
16292 * commands/ls.c: Include <grub/partition.h> instead of
16293 <grub/machine/partition.h>.
16294 * kern/disk.c: Likewise.
16295 * kern/rescue.c: Likewise.
16296 * loader/i386/pc/chainloader.c: Likewise.
16297 * normal/cmdline.c: Likewise.
16298 * kern/powerpc/ieee1275/init.c: Likewise.
16299 (grub_machine_init): Call `grub_pc_partition_map_init',
16300 `grub_amiga_partition_map_init' and
16301 `grub_apple_partition_map_init'.
16302 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16303 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16304 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16305 `partition.h' and `pc_partition.h'.
16306 (grub_setup_SOURCES): Remove
16307 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16308 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16309 (grub_emu_SOURCES): Likewise.
16310 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16311 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16312 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16313 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16314 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16315 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16316 (grubof_SOURCES): Likewise.
16317 * disk/i386/pc/partition.c: File removed.
16318 * disk/powerpc/ieee1275/partition.c: Likewise.
16319 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16320 * include/grub/i386/pc/partition.h: Likewise.
16321 * kern/partition.c: New file.
16322 * partmap/amiga.c: Likewise.
16323 * partmap/apple.c: Likewise.
16324 * partmap/pc.c: Likewise.
16325 * include/grub/partition.h: Likewise..
16326 * include/grub/pc_partition.h: Likewise.
16327 * util/grub-emu.c: Include <grub/partition.h> instead of
16328 <grub/machine/partition.h>.
16329 (main): Call `grub_pc_partition_map_init',
16330 `grub_amiga_partition_map_init' and
16331 `grub_apple_partition_map_init' and deinitialize afterwards.
16332 * util/i386/pc/biosdisk.c: Include `#include
16333 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16334 `<grub/machine/partition.h>'.
16335 * util/i386/pc/grub-setup.c: Likewise.
16336 * util/i386/pc/biosdisk.c: Likewise.
16337 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16338 partition information in case of a PC partition.
16339 * util/i386/pc/grub-setup.c: Include `#include
16340 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16341 `<grub/machine/partition.h>'.
16342 (setup): Only access the PC specific partition information in case
16345 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
16347 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16348 (grub_longjmp): Likewise.
16349 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16351 * normal/powerpc/setjmp.S: New file.
16352 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16353 `normal/powerpc/setjmp.S'.
16354 (grubof_CFLAGS): Add `-DGRUBOF'.
16355 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16356 [GRUB_UTIL && !GRUBOF].
16358 2004-11-16 Marco Gerards <metgerards@student.han.nl>
16360 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16361 property named `name'. Correctly handle the error returned by
16362 `grub_ieee1275_finddevice' if a device can not be opened.
16364 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16366 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16367 `actual' for negativity.
16368 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16371 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16373 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16374 (PAGE_OFFSET): New macro.
16375 (CRTC_ADDR_PORT): Likewise.
16376 (CRTC_DATA_PORT): Likewise.
16377 (START_ADDR_HIGH_REGISTER): Likewise.
16378 (START_ADDR_LOW_REGISTER): Likewise.
16379 (GRAPHICS_ADDR_PORT): Likewise.
16380 (GRAPHICS_DATA_PORT): Likewise.
16381 (READ_MAP_REGISTER): Likewise.
16382 (INPUT_STATUS1_REGISTER): Likewise.
16383 (INPUT_STATUS1_VERTR_BIT): Likewise.
16384 (page): New variable.
16385 (wait_vretrace): New function.
16386 (set_read_map): Likewise.
16387 (set_start_address): Likewise.
16388 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16390 (check_vga_mem): Take the page into account.
16391 (write_char): Likewise.
16392 (write_cursor): Likewise.
16393 (scroll_up): Likewise. Copy the page to the page that is not
16394 shown and switch between both pages.
16395 (grub_vga_putchar): Fix off by one error.
16396 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16399 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16401 Add support for iso9660 (including rockridge).
16403 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16404 (iso9660_mod_SOURCES): New variable.
16405 (iso9660_mod_CFLAGS): Likewise.
16406 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16407 * include/grub/fs.h (grub_iso9660_init): New prototype.
16408 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16409 * fs/iso9660.c: New file.
16411 * include/grub/misc.h (grub_strncat): New prototype.
16412 * kern/misc.c (grub_strncat): New function.
16414 * fs/hfs.c (grub_hfs_mount): Translate the error
16415 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16416 * fs/jfs.c (grub_jfs_mount): Likewise.
16417 * fs/ufs.c (grub_ufs_mount): Likewise.
16419 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16421 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16422 which initialized BAT registers.
16423 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16424 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16426 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16427 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16429 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16430 (grub_mapclaim): Likewise.
16431 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16432 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16435 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16437 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16438 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16439 -ffreestanding and -msoft-float.
16441 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16443 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16444 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16445 set in grub_ieee1275_flags.
16447 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16449 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16451 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16452 grub_console_init first.
16453 Change the memory range used for grub_ieee1275_claim and
16454 grub_mm_init_region.
16455 Print an error message if the claim fails.
16456 Include <grub/misc.h>.
16458 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16460 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16461 Call grub_children_iterate for device nodes of type `scsi',
16463 (grub_ofdisk_open): Remove manual device alias resolution.
16464 Fix memory leak when device cannot be opened.
16465 * include/grub/powerpc/ieee1275/ieee1275.h
16466 (grub_children_iterate): New prototype.
16467 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16469 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16470 Return -1 if args.size was -1.
16472 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16474 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16475 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16476 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16477 Open Firmware's memory for it; claim memory from _start to _end.
16478 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16479 (_end): New extern.
16480 (_start): Zero BSS from __bss_start to _end.
16481 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16483 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16485 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16487 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16488 -1 if args.base was -1.
16490 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16492 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16493 escape sequence instead of a literal ^L. Also call
16494 grub_ofconsole_gotoxy.
16496 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16498 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16499 void * arguments to grub_addr_t. All callers updated. Also make
16500 the `result' argument optional.
16501 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16502 All callers updated.
16504 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16506 * commands/ls.c (grub_ls_list_files): Use the string following the
16507 initial ')', if present, as the filesystem path.
16508 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16510 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16512 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16514 Make the source code of the menu interface more readable.
16516 * normal/menu.c: Include grub/mm.h.
16517 (TERM_WIDTH): New macro.
16518 (TERM_HEIGHT): Likewise.
16519 (TERM_INFO_HEIGHT): Likewise.
16520 (TERM_MARGIN): Likewise.
16521 (TERM_SCROLL_WIDTH): Likewise.
16522 (TERM_TOP_BORDER_Y): Likewise.
16523 (TERM_LEFT_BORDER_X): Likewise.
16524 (TERM_BORDER_WIDTH): Likewise.
16525 (TERM_MESSAGE_HEIGHT): Likewise.
16526 (TERM_BORDER_HEIGHT): Likewise.
16527 (TERM_NUM_ENTRIES): Likewise.
16528 (TERM_FIRST_ENTRY_Y): Likewise.
16529 (TERM_ENTRY_WIDTH): Likewise.
16530 (TERM_CURSOR_X): Likewise.
16531 (draw_border): Use macros instead of magic numbers.
16532 (print_entry): Likewise.
16533 (print_entries): Likewise.
16534 (run_menu): Likewise. Also, handle the key 'e'.
16535 (run_menu_entry): Ignore empty command lines.
16536 (print_message): Added a new argument EDIT. If EDIT is true,
16537 print a different message.
16538 (init_page): Likewise.
16539 (edit_menu_entry): New function. Not implemented yet.
16541 2004-09-17 Marco Gerards <metgerards@student.han.nl>
16543 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16544 can be loaded from normal mode.
16546 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16548 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16549 (multiboot_mod_CFLAGS): New variables.
16550 * loader/i386/pc/linux_normal.c: New file.
16551 * loader/i386/pc/multiboot_normal.c: Likewise.
16553 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16554 attribute `unused'.
16556 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16557 `fdiro' to read the mode information from instead of `diro'.
16559 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16560 looking up a symlink.
16562 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16564 * normal/command.c (grub_command_execute): Don't parse the
16565 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16566 flags of the command.
16568 * normal/menu.c (grub_menu_run): Fix typo.
16570 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16572 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16574 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16575 `y + 1' instead of `y - 1'.
16577 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16579 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16581 From Hollis Blanchard <hollis@penguinppc.org>:
16582 * kern/misc.c (memmove): New alias for grub_memmove.
16583 (memcmp): New alias for grub_memcmp.
16584 (memset): New alias for grub_memset.
16585 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16586 Change "int handle" to "grub_ieee1275_phandle_t handle".
16587 * include/grub/powerpc/ieee1275/ieee1275.h
16588 (grub_ieee1275_get_property): Likewise.
16590 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16592 Added normal mode command `chainloader' as module chain.mod, which
16593 depends on normal.mod and _chain.mod.
16595 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16596 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16597 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16599 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16600 but arguments parsing moved to ...
16601 (grub_chainloader_cmd): ... here. New function.
16602 * include/grub/i386/pc/chainloader.h: New file.
16603 * loader/i386/pc/chainloader_normal.c: Likewise.
16605 2004-09-11 Marco Gerards <metgerards@student.han.nl>
16607 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16608 (grub_mkimage_LDFLAGS): Likewise.
16609 (grub_emu_SOURCES): Likewise.
16610 (kernel_img_HEADERS): Added fshelp.h.
16611 * fs/ext2.c: Include <grub/fshelp.h>.
16612 (FILETYPE_REG): New macro.
16613 (FILETYPE_INO_REG): Likewise.
16614 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16616 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16618 (grub_fshelp_node): New struct.
16619 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16621 (grub_ext2_get_file_block): Removed function.
16622 (grub_ext2_read_block): New function.
16623 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16624 This function was written.
16625 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16626 (grub_ext2_find_file): Removed function.
16627 (grub_ext2_read_symlink): New function.
16628 (grub_ext2_iterate_dir): Likewise.
16629 (grub_ext2_open): Rewritten.
16630 (grub_ext2_dir): Rewritten.
16631 * include/grub/fshelp.h: New file.
16632 * fs/fshelp.c: Likewise.
16634 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16636 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16637 (print_message): Add a missing newline.
16638 (run_menu): Added timeout support.
16639 (run_menu_entry): New local function.
16640 (grub_menu_run): Added support for booting.
16642 * kern/loader.c (grub_loader_is_loaded): New function.
16644 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16645 (grub_get_rtc): Exported.
16647 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16648 (grub_get_rtc): Exported.
16650 * include/grub/normal.h (struct grub_command_list): Remove
16651 constant from the member `command'.
16653 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16655 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16657 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16659 2004-08-28 Marco Gerards <metgerards@student.han.nl>
16661 Add support for the JFS filesystem.
16663 * fs/jfs.c: New file.
16664 * include/grub/fs.h (grub_jfs_init): New prototype.
16665 (grub_jfs_fini): New prototype.
16666 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16667 (grub_emu_SOURCES): Likewise.
16668 (pkgdata_MODULES): Add jfs.mod.
16669 (jfs_mod_SOURCES): New variable.
16670 (jfs_mod_CFLAGS): Likewise.
16671 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16672 (grubof_SOURCES): Likewise.
16673 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16675 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16676 endian to the host endian.
16677 (grub_fat_utf16_to_utf8): Move function from there...
16678 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
16679 the endianness of the source string anymore.
16680 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16682 2004-08-24 Marco Gerards <metgerards@student.han.nl>
16684 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16685 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16686 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16687 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16689 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16690 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16691 for `node_found' and `it_dir'.
16692 (grub_hfs_dir): Add prototype for `dir_hook'.
16694 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16695 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16696 and `indir32' to silence a gcc warning.
16698 * include/grub/fs.h (grub_hfs_init): New prototype.
16699 (grub_hfs_fini): Likewise.
16702 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16704 Each disk device has its own id now. This is useful to make use
16705 of multiple disk devices.
16707 * include/grub/disk.h (grub_disk_dev_id): New enum.
16708 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16709 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16711 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16712 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16714 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16715 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16717 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16718 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16720 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16721 "id" which is used by the cache manager.
16723 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16726 2004-08-18 Marco Gerards <metgerards@student.han.nl>
16728 * fs/hfs.c: New file.
16729 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16730 (grub_emu_SOURCES): Likewise.
16731 (pkgdata_MODULES): Add hfs.mod.
16732 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16733 (grubof_SOURCES): Likewise.
16734 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16736 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16737 * kern/misc.c (grub_strncasecmp): Add function.
16739 2004-08-14 Marco Gerards <metgerards@student.han.nl>
16741 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16744 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16745 (grub_ext2_dir): In case the directory entry type is unknown, read
16748 2004-08-02 Peter Bruin <pjbruin@dds.nl>
16750 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16751 grub_load_linux instead of grub_rescue_cmd_linux as second
16752 argument of grub_rescue_register_command.
16754 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16756 2004-07-27 Marco Gerards <metgerards@student.han.nl>
16758 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16760 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16761 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16762 `loader/powerpc/ieee1275/linux.c',
16763 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16764 * include/grub/powerpc/ieee1275/ieee1275.h
16765 (grub_ieee1275_release): New prototype.
16766 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16767 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16768 normal, boot, linux and linux_normal.
16769 * loader/powerpc/ieee1275/linux.c: New file.
16770 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16772 2004-07-12 Marco Gerards <metgerards@student.han.nl>
16774 * normal/arg.c (grub_arg_parse): Correct error handling after
16775 reallocating the argumentlist (check if `argl' is not null instead
16776 of checking if `args' is not null).
16777 * kern/mm.c (grub_realloc): Return the same pointer when using the
16778 same region, instead of returning the header address.
16780 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16782 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16783 one block instead of two when looking for the initial partition.
16784 (grub_partition_probe): Initialize the local variable `p' with 0.
16785 Use base 10 for the grub_strtoul call.
16786 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16787 need for one local variable.
16788 (grub_strtoul): Don't add the new value to `num', instead of that
16791 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16793 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16794 (pxeboot_img_SOURCES): New variable.
16795 (pxeboot_img_ASFLAGS): Likewise.
16796 (pxeboot_img_LDFLAGS): Likewise.
16797 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16798 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16799 <lode_leroy@hotmail.com>.
16801 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16803 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16804 there was no input.
16806 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16808 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16809 the history buffer logic.
16811 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16813 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16814 (FILETYPE_INO_SYMLINK): New macros.
16815 (grub_ext2_find_file): Check if the node is a directory using the
16816 inode stat information instead of using the filetype in the
16817 dirent. Exclude the first character of an absolute symlink.
16818 (grub_ext2_dir): Mask out the filetype part of the mode member of
16821 2004-05-24 Marco Gerards <metgerards@student.han.nl>
16823 Add support for UFS version 1 and 2. Add support for the minix
16824 filesystem version 1 and 2, both the variants with 14 and 30 long
16827 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16829 (grub_emu_SOURCES): Likewise.
16830 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16831 (ufs_mod_SOURCES): New variable.
16832 (ufs_mod_CFLAGS): Likewise.
16833 (minix_mod_SOURCES): Likewise.
16834 (minix_mod_CFLAGS): Likewise.
16835 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16837 (grubof_SOURCES): Likewise.
16838 * fs/ufs.c: New file.
16839 * fs/minix.c: New file.
16840 * include/grub/fs.h (grub_ufs_init): New prototype.
16841 (grub_ufs_fini): Likewise.
16842 (grub_minix_init): Likewise.
16843 (grub_minix_fini): Likewise.
16844 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16847 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16849 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16850 commands/ls.c, commands/terminal.c, commands/boot.c,
16851 commands/cmp.c and commands/cat.c.
16852 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16854 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16857 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16859 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16860 and grub_, respectively. Because the conversion is trivial and
16861 mechanical, I omit the details here. Please refer to the CVS
16862 if you need more information.
16864 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16866 * include/pupa: Renamed to ...
16867 * include/grub: ... this.
16868 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16869 * util/i386/pc/grub-mkimage.c: ... this.
16870 * util/i386/pc/pupa-setup.c: Renamed to ...
16871 * util/i386/pc/grub-setup.c: ... this.
16872 * util/pupa-emu.c: Renamed to ...
16873 * util/grub-emu.c: ... this.
16875 2004-03-29 Marco Gerards <metgerards@student.han.nl>
16877 Add support for the newworld apple macintosh (PPC). This has been
16878 tested on the powerbook 2000 only. It only adds support for
16879 generic ieee1275 functions, console and disk support. This should
16880 be easy to port to other architectures with support for Open
16883 * configure.ac: Accept the powerpc as host_cpu. In the case of
16884 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16885 specific tests are only executed while building for the i386.
16886 Inverse test for crosscompile.
16887 * genmk.rb (Utility): Allow assembler files.
16888 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16889 * conf/powerpc-ieee1275.rmk: New file.
16890 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16891 * disk/powerpc/ieee1275/partition.c: Likewise.
16892 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16893 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16894 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16895 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16896 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16897 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16898 * include/pupa/powerpc/ieee1275/loader.h
16899 * include/pupa/powerpc/setjmp.h: Likewise.
16900 * include/pupa/powerpc/types.h: Likewise.
16901 * kern/powerpc/ieee1275/init.c: Likewise.
16902 * kern/powerpc/ieee1275/openfw.c: Likewise.
16903 * term/powerpc/ieee1275/ofconsole.c: Likewise.
16905 These files were written by Johan Rydberg
16906 (jrydberg@night.trouble.net) and I only modified them slightly.
16908 * boot/powerpc/ieee1275/cmain.c: New file.
16909 * boot/powerpc/ieee1275/crt0.S: Likewise.
16910 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16911 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16913 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
16915 * Makefile.in: Update copyright.
16916 * genmodsrc.sh: Likewise.
16917 * gensymlist.sh: Likewise.
16918 * term/i386/pc/vga.c: Indent correctly.
16920 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16921 bugreporting address.
16922 * util/i386/pc/pupa-setup.c (usage): Likewise,
16923 (main): Call pupa_ext2_init and pupa_ext2_fini.
16925 * fs/fat.c (log2): Renamed to ...
16926 (fat_log2): ... this.
16927 All callers changed.
16928 * kern/misc.c (memcpy): Alias to pupa_memmove.
16929 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16931 * util/console.c (pupa_ncurses_fini): Return 0.
16933 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16934 Move fail label here.
16935 [__GNU__]: Don't warn when using stat.
16936 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16937 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16938 long int. Use strtol instead of strtoul.
16940 2004-03-14 Marco Gerards <metgerards@student.han.nl>
16942 * commands/boot.c: New file.
16943 * commands/cat.c: Likewise.
16944 * commands/cmp.c: Likewise.
16945 * commands/ls.c: Likewise.
16946 * commands/terminal.c: Likewise.
16947 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16948 (pupa_register_command): Changed interface to match the new
16950 (pupa_command_execute): Changed (almost rewritten) so it uses
16951 pupa_split_command. Added support for setting variables using the
16953 (rescue_command): Changed to work with the new argument parser.
16954 (terminal_command): Moved from here to commands/terminal.c.
16955 (set_command): New function.
16956 (unset_command): New function.
16957 (insmod_command): New function.
16958 (rmmod_command): New function.
16959 (lsmod_command): New function.
16960 (pupa_command_init): Don't initialize the command terminal
16961 anymore. Initialize the commands set, unset, insmod, rmmod and
16963 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16964 (kernel_img_HEADERS): Add arg.h and env.h.
16965 (pupa_mkimage_LDFLAGS): Add kern/env.c.
16966 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16967 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16969 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16971 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16972 (boot_mod_SOURCES): New variable.
16973 (terminal_mod_SOURCES): Likewise.
16974 (ls_mod_SOURCES): Likewise.
16975 (cmp_mod_SOURCES): Likewise.
16976 (cat_mod_SOURCES): Likewise.
16978 * normal/arg.c: New file.
16979 * kern/env.c: Likewise.
16980 * include/pupa/arg.h: Likewise.
16981 * include/pupa/env.h: Likewise.
16982 * font/manager.c (font_command): Changed to match argument parsing
16984 (PUPA_MOD_INIT): Likewise.
16985 * hello/hello.c (pupa_cmd_hello): Likewise.
16986 (PUPA_MOD_INIT): Likewise.
16987 * include/pupa/disk.h: Include <pupa/device.h>.
16988 (pupa_print_partinfo): New prototype.
16989 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16990 (pupa_dl_get_prefix): Likewise.
16991 * include/pupa/misc.h: Include <pupa/err.h>.
16992 (pupa_isgraph): New prototype.
16993 (pupa_isdigit): Likewise.
16994 (pupa_split_cmdline): Likewise.
16995 * include/pupa/normal.h: Include <pupa/arg.h>.
16996 (pupa_command): Changed the prototype of the member `func' to
16997 match the argument parsing interface. Added member `options'.
16998 (pupa_register_command): Updated to match function.
16999 (pupa_arg_parse): New prototype.
17000 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17001 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17002 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17003 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17004 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17005 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17006 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17007 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17008 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17009 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17010 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17011 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17012 * kern/disk.c: Include <pupa/file.h>.
17013 (pupa_print_partinfo): New function.
17014 * kern/dl.c: Include <pupa/env.h>.
17015 (pupa_dl_dir): Variable removed.
17016 (pupa_dl_load): Use the environment variable `prefix' instead of
17017 the variable pupa_dl_dir.
17018 (pupa_dl_set_prefix): Function removed.
17019 (pupa_dl_get_prefix): Likewise.
17020 * kern/i386/pc/init.c: Include <pupa/env.h>.
17021 (pupa_machine_init): Use the environment variable `prefix' instead of
17022 using pupa_dl_set_prefix to set the prefix.
17023 * kern/main.c: Include <pupa/env.h>.
17024 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17025 using pupa_dl_get_prefix to get the prefix.
17026 * kern/misc.c: Include <pupa/env.h>.
17027 (pupa_isdigit): New function.
17028 (pupa_isgraph): Likewise.
17029 (pupa_ftoa): Likewise.
17030 (pupa_vsprintf): Added support for printing values of the type
17031 `double'. Make it possible to format variable output when using
17032 formatting like `%1.2%f'.
17033 (pupa_split_cmdline): New function.
17034 * kern/rescue.c: Include <pupa/env.h>.
17035 (next_word): Removed function.
17036 (pupa_rescue_cmd_prefix): Likewise.
17037 (pupa_rescue_cmd_set): New function.
17038 (pupa_rescue_cmd_unset): New function.
17039 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17040 split the command line instead of splitting it here. Added
17041 support for setting variables using the syntax `foo=bar'. Don't
17042 initialize the prefix command anymore. Initialized the set and
17044 * normal/cmdline.c: Include <pupa/env.h>.
17045 (pupa_tab_complete): Added prototypes for print_simple_completion,
17046 print_partition_completion, add_completion, iterate_commands,
17047 iterate_dev, iterate_part and iterate_dir. Moved code to print
17048 partition information from here to kern/disk.c.
17049 (pupa_cmdline_run): Don't check if the function exists anymore.
17050 * normal/main.c: Include <pupa/env.h>.
17051 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17052 instead of using pupa_dl_get_prefix to get the prefix.
17053 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17054 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17056 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17057 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17058 ((unused))' to silence a gcc warning.
17059 (pupa_vga_setcolor): Likewise.
17060 (debug_command): Changed to match argument parsing
17062 * util/pupa-emu.c: Include <pupa/env.h>.
17063 (options): Added 0's for unused fields to silence a gcc warning.
17065 (main): Use the environment variable `prefix' instead of using
17066 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17067 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17070 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17071 * util/misc.c: Include <malloc.h>.
17072 (pupa_malloc): Rewritten so errors are correctly reported.
17073 (pupa_realloc): Likewise.
17074 (pupa_memalign): Likewise.
17075 (pupa_mm_init_region): Declare unused variables with
17076 `__attribute__ ((unused))' to silence a gcc warning.
17077 * normal/i386/setjmp.S: Remove tab at the end of the file to
17078 silence a gcc warning.
17079 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17080 variables with `__attribute__ ((unused))' to silence a gcc
17082 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17083 local variable i unsigned to silence a gcc warning.
17085 * kern/term.c: Include <pupa/misc.h>.
17086 (pupa_more_lines): New variable.
17087 (pupa_more): Likewise.
17088 (pupa_putcode): When the pager is active pause at the end of every
17090 (pupa_set_more): New function.
17091 * include/pupa/term.h (pupa_set_more): New prototype.
17094 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17096 Now this project is GRUB 2 rather than PUPA. The location of
17097 the CVS repository was moved to GRUB's.
17099 * configure.ac: Use bug-grub as the reporting address.
17100 Use GRUB instead of PUPA.
17101 Change the version number to 1.90.
17103 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17105 * genkernsyms.sh: Updated copyright information.
17106 * genmk.rb: Likewise.
17107 * genmodsrc.sh: Likewise.
17108 * gensymlist.sh: Likewise.
17109 * boot/i386/pc/boot.S: Likewise.
17110 * boot/i386/pc/diskboot.S: Likewise.
17111 * disk/i386/pc/biosdisk.c: Likewise.
17112 * disk/i386/pc/partition.c: Likewise.
17113 * font/manager.c: Likewise.
17114 * fs/ext2.c: Likewise.
17115 * fs/fat.c: Likewise.
17116 * include/pupa/boot.h: Likewise.
17117 * include/pupa/device.h: Likewise.
17118 * include/pupa/disk.h: Likewise.
17119 * include/pupa/dl.h: Likewise.
17120 * include/pupa/elf.h: Likewise.
17121 * include/pupa/err.h: Likewise.
17122 * include/pupa/file.h: Likewise.
17123 * include/pupa/font.h: Likewise.
17124 * include/pupa/fs.h: Likewise.
17125 * include/pupa/kernel.h: Likewise.
17126 * include/pupa/loader.h: Likewise.
17127 * include/pupa/misc.h: Likewise.
17128 * include/pupa/mm.h: Likewise.
17129 * include/pupa/net.h: Likewise.
17130 * include/pupa/normal.h: Likewise.
17131 * include/pupa/rescue.h: Likewise.
17132 * include/pupa/setjmp.h: Likewise.
17133 * include/pupa/symbol.h: Likewise.
17134 * include/pupa/term.h: Likewise.
17135 * include/pupa/types.h: Likewise.
17136 * include/pupa/i386/setjmp.h: Likewise.
17137 * include/pupa/i386/types.h: Likewise.
17138 * include/pupa/i386/pc/biosdisk.h: Likewise.
17139 * include/pupa/i386/pc/boot.h: Likewise.
17140 * include/pupa/i386/pc/console.h: Likewise.
17141 * include/pupa/i386/pc/init.h: Likewise.
17142 * include/pupa/i386/pc/kernel.h: Likewise.
17143 * include/pupa/i386/pc/linux.h: Likewise.
17144 * include/pupa/i386/pc/loader.h: Likewise.
17145 * include/pupa/i386/pc/memory.h: Likewise.
17146 * include/pupa/i386/pc/multiboot.h: Likewise.
17147 * include/pupa/i386/pc/partition.h: Likewise.
17148 * include/pupa/i386/pc/time.h: Likewise.
17149 * include/pupa/i386/pc/vga.h: Likewise.
17150 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17151 * include/pupa/util/getroot.h: Likewise.
17152 * include/pupa/util/misc.h: Likewise.
17153 * include/pupa/util/resolve.h: Likewise.
17154 * kern/device.c: Likewise.
17155 * kern/disk.c: Likewise.
17156 * kern/dl.c: Likewise.
17157 * kern/err.c: Likewise.
17158 * kern/file.c: Likewise.
17159 * kern/fs.c: Likewise.
17160 * kern/loader.c: Likewise.
17161 * kern/main.c: Likewise.
17162 * kern/misc.c: Likewise.
17163 * kern/mm.c: Likewise.
17164 * kern/rescue.c: Likewise.
17165 * kern/term.c: Likewise.
17166 * kern/i386/dl.c: Likewise.
17167 * kern/i386/pc/init.c: Likewise.
17168 * kern/i386/pc/lzo1x.S: Likewise.
17169 * kern/i386/pc/startup.S: Likewise.
17170 * loader/i386/pc/chainloader.c: Likewise.
17171 * loader/i386/pc/linux.c: Likewise.
17172 * loader/i386/pc/multiboot.c: Likewise.
17173 * normal/cmdline.c: Likewise.
17174 * normal/command.c: Likewise.
17175 * normal/main.c: Likewise.
17176 * normal/menu.c: Likewise.
17177 * normal/i386/setjmp.S: Likewise.
17178 * term/i386/pc/console.c: Likewise.
17179 * term/i386/pc/vga.c: Likewise.
17180 * util/console.c: Likewise.
17181 * util/genmoddep.c: Likewise.
17182 * util/misc.c: Likewise.
17183 * util/pupa-emu.c: Likewise.
17184 * util/resolve.c: Likewise.
17185 * util/unifont2pff.rb: Likewise.
17186 * util/i386/pc/biosdisk.c: Likewise.
17187 * util/i386/pc/getroot.c: Likewise.
17188 * util/i386/pc/pupa-mkimage.c: Likewise.
17189 * util/i386/pc/pupa-setup.c: Likewise.
17191 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17193 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17194 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17195 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17196 reading and reset it after reading.
17197 (pupa_ext2_close): Return PUPA_ERR_NONE.
17199 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17201 (struct linux_kernel_header): Add kernel_version and
17203 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17204 pupa_file_read succeeds.
17205 (pupa_rescue_cmd_initrd): Implement.
17207 2003-12-03 Marco Gerards <metgerards@student.han.nl>
17209 * fs/ext2.c (pupa_ext2_label): New function.
17210 (pupa_ext2_fs): Added label.
17211 * fs/fat.c (pupa_fat_label): New function.
17212 (pupa_fat_fs): Added label.
17213 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17215 * kern/misc.c (pupa_strndup): New function.
17216 * include/pupa/misc.h (pupa_strndup): New prototype.
17218 * include/pupa/normal.h: Include <pupa/err.h>.
17219 (pupa_set_history): New prototype.
17220 (pupa_iterate_commands): New prototype.
17221 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17222 <pupa/disk.h>, <pupa/file.h>.
17223 (hist_size): New variable.
17224 (hist_lines): Likewise.
17225 (hist_end): Likewise.
17226 (hist_used): Likewise.
17227 (pupa_set_history): New function.
17228 (pupa_history_get): Likewise.
17229 (pupa_history_add): Likewise.
17230 (pupa_history_replace): Likewise.
17231 (pupa_tab_complete): Likewise.
17232 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17233 completion shows partitionnames while completing partitions, this
17234 feature was suggested by Jeff Bailey.
17235 * normal/command.c (pupa_iterate_commands): New function.
17236 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17237 (pupa_normal_init): Initialize history buffer.
17238 (PUPA_MOD_INIT): Likewise.
17239 (pupa_normal_fini): Free the history buffer.
17240 (PUPA_MOD_FINI): Likewise.
17242 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17245 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17246 * configure.ac [i386]: Check for regparam bug.
17247 (NESTED_FUNC_ATTR) [! i386]: Defined.
17249 2003-11-17 Marco Gerards <metgerards@student.han.nl>
17251 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17252 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17253 (pupa_emu_SOURCES): New variable.
17254 (pupa_emu_LDFLAGS): Likewise.
17255 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17256 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17257 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17258 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17259 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17260 (pupa_jmp_buf): New typedef.
17261 (pupa_setjmp) [PUPA_UTIL]: New macro.
17262 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17263 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17264 (pupa_refresh): New prototype.
17265 * include/pupa/util/getroot.h: New file.
17266 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17268 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17269 (pupa_rescue_cmd_cat): Likewise.
17270 (pupa_rescue_cmd_ls): Likewise.
17271 (pupa_rescue_cmd_testload): Likewise.
17272 (pupa_rescue_cmd_lsmod): Likewise.
17273 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17274 * normal/menu.c (run_menu): Likewise.
17275 * kern/term.c (pupa_cls): Likewise.
17276 (pupa_refresh): New function.
17277 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17278 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17279 * util/console.c: New file.
17281 * util/i386/pc/getroot.c: New file.
17282 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17283 (pupa_putchar): New function.
17284 (pupa_refresh): Likewise.
17285 (xgetcwd): Function moved to ...
17286 (strip_extra_slashes): Likewise.
17287 (get_prefix): Likewise.
17288 * util/i386/pc/getroot.c: ... here.
17289 (find_root_device): Function moved and renamed to...
17290 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17291 Changed all callers.
17292 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17294 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17295 Changed all callers.
17296 * util/misc.c (pupa_memalign): New function.
17297 (pupa_mm_init_region): Likewise.
17298 (pupa_register_exported_symbols): Likewise.
17299 (pupa_putchar): Function removed.
17300 * util/pupa-emu.c: New file.
17302 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17304 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17305 (_multiboot_mod_SOURCES): New variable.
17306 (_multiboot_mod_CFLAGS): Likewise.
17307 * loader/i386/pc/multiboot.c: New file.
17308 * include/pupa/i386/pc/multiboot.h: Likewise.
17309 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17310 (pupa_multiboot_real_boot): New function.
17311 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17312 (pupa_multiboot_real_boot): New prototype.
17313 (pupa_rescue_cmd_multiboot): Likewise
17314 (pupa_rescue_cmd_module): Likewise.
17316 * kern/loader.c (pupa_loader_set): Continue when
17317 pupa_loader_unload_func() fails.
17318 (pupa_loader_unset): New function.
17319 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17321 * kern/misc.c (pupa_stpcpy): New function.
17322 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17324 2003-11-12 Marco Gerards <metgerards@student.han.nl>
17326 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17327 for available extensions.
17329 * include/pupa/i386/pc/time.h: New file.
17330 * kern/disk.c: Include <pupa/machine/time.h>.
17331 (PUPA_CACHE_TIMEOUT): New macro.
17332 (pupa_last_time): New variable.
17333 (pupa_disk_open): Flush the cache when there was a timeout.
17334 (pupa_disk_close): Reset the timer.
17335 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17337 * util/misc.c: Include <sys/times.h>
17338 (pupa_get_rtc): New function.
17340 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17342 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17344 (pupa_ext2_get_file_block): Use blocks member.
17346 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17347 first block. Return -1 instead of pupa_errno on error.
17349 2003-10-27 Marco Gerards <metgerards@student.han.nl>
17351 * README: In the pupa-mkimage example use _chain instead of chain
17352 and ext2 instead of fat.
17353 * TODO: Replace ext2fs with jfs as an example. Add an item for
17354 adding journal playback for ext2fs.
17355 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17356 (pkgdata_MODULES): Added ext2.mod.
17357 (ext2_mod_SOURCES): New variable.
17358 (ext2_mod_CFLAGS): Likewise.
17359 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17360 * include/pupa/misc.h (pupa_strncpy): New prototype.
17361 (pupa_strcat): Likewise.
17362 (pupa_strncmp): Likewise.
17363 * kern/misc.c (pupa_strcat): Enable function.
17364 (pupa_strncpy): New function.
17365 (pupa_strncmp): Likewise.
17366 * fs/ext2.c: New file.
17368 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17369 when the read failed before retrying.
17370 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17371 (_FILE_OFFSET_BITS): Likewise.
17372 * configure.ac: Added AC_SYS_LARGEFILE.
17374 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17376 * genmk.rb (PModule#rule): Make sure to get only symbol names
17377 from the output of nm.
17378 Reported by Robert Millan <zeratul2@wanadoo.es>.
17380 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17382 I forgot to check in these changes for a long time. This adds
17383 incomplete support for VGA console, and this is still very
17384 buggy. Also, a lot of consideration is required for I18N,
17385 UNICODE, and VGA font issues. Therefore, assume that this is
17386 such that "better than nothing".
17388 * font/manager.c: New file.
17389 * include/pupa/font.h: Likewise.
17390 * include/pupa/i386/pc/vga.h: Likewise.
17391 * term/i386/pc/vga.c: Likewise.
17392 * util/unifont2pff.rb: Likewise.
17394 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17395 (pkgdata_MODULES): Added vga.mod and font.mod.
17396 (vga_mod_SOURCES): New variables.
17397 (vga_mod_CFLAGS): Likewise.
17398 (font_mod_SOURCES): Likewise.
17399 (font_mod_CFLAGS): Likewise.
17401 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17403 * include/pupa/term.h: Include pupa/err.h.
17404 (struct pupa_term): Added init and fini.
17405 Changed the argument of putchar to pupa_uint32_t.
17407 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17408 (pupa_console_real_putchar): New prototype.
17409 (pupa_console_putchar): Removed.
17410 (pupa_console_checkkey): Exported.
17411 (pupa_console_getkey): Likewise.
17413 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17416 * kern/term.c (pupa_term_set_current): Rewritten.
17417 (pupa_putchar): Likewise.
17418 (pupa_putcode): New function.
17420 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17421 (pupa_console_real_putchar): ... this.
17422 (pupa_vga_set_mode): New function.
17423 (pupa_vga_get_font): Likewise.
17425 * normal/command.c: Include pupa/term.h.
17426 (terminal_command): New function.
17427 (pupa_command_init): Register the command "terminal".
17429 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17430 (DISP_UP): Likewise.
17431 (DISP_RIGHT): Likewise.
17432 (DISP_DOWN): Likewise.
17433 (DISP_HLINE): Likewise.
17434 (DISP_VLINE): Likewise.
17435 (DISP_UL): Likewise.
17436 (DISP_UR): Likewise.
17437 (DISP_LL): Likewise.
17438 (DISP_LR): Likewise.
17440 * term/i386/pc/console.c (pupa_console_putchar): New function.
17442 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17444 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17445 FIX. Reverse the path_list.
17447 * include/pupa/normal.h: Export pupa_register_command and
17448 pupa_unregister_command.
17450 * hello/hello.c (pupa_cmd_hello): New module.
17451 * conf/i386-pc.rmk: Added hello.mod.
17453 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17455 * kern/i386/pc/lzo1x.S: New file.
17457 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17458 (compress_kernel): New variable.
17459 (generate_image): Heavily modified to support compressing a
17460 large part of the core image.
17462 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17464 (pupa_util_load_image): New function.
17466 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17467 (pupa_compressed_size): New variable.
17468 (codestart): Enable Gate A20 here.
17469 Decompress the compressed part of the core image.
17470 Rearrange the code to put functions and variables which are
17471 required for initialization in the non-compressed part.
17474 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17477 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17479 * include/pupa/i386/pc/kernel.h
17480 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17481 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17482 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17483 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17484 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17486 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17488 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17489 (Utility#rule): Likewise.
17491 * configure.ac: Check if LZO is available.
17493 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17495 * include/pupa/normal.h: New file.
17496 * include/pupa/setjmp.h: Likewise.
17497 * include/pupa/i386/setjmp.h: Likewise.
17498 * normal/cmdline.c: Likewise.
17499 * normal/command.c: Likewise.
17500 * normal/main.c: Likewise.
17501 * normal/menu.c: Likewise.
17502 * normal/i386/setjmp.S: Likewise.
17504 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17505 (pupa_rescue_cmd_initrd): Likewise.
17507 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17510 * kern/i386/pc/startup.S (translation_table): New variable.
17511 (translate_keycode): New function.
17512 (pupa_console_getkey): Call translate_keycode.
17514 * kern/rescue.c (attempt_normal_mode): New function.
17515 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17516 it failed, print a message.
17518 * kern/mm.c (pupa_real_malloc): Print more information when a
17519 free magic is broken.
17520 (pupa_free): If the first free header is not free actually, set
17523 * kern/main.c (pupa_load_normal_mode): Just load the module
17525 (pupa_main): Don't print the message
17526 "Entering into rescue mode..." here.
17528 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17530 (pupa_rescue_cmd_initrd): Likewise.
17531 (pupa_rescue_cmd_initrd): Likewise.
17533 * include/pupa/symbol.h (FUNCTION): Specify the type.
17534 (VARIABLE): Likewise.
17536 * include/pupa/err.h (pupa_err_t): Added
17537 PUPA_ERR_UNKNOWN_COMMAND.
17539 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17540 (pupa_dl_get_prefix): Likewise.
17542 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17543 Added _chain.mod and _linux.mod instead of chain.mod and
17545 (chain_mod_SOURCES): Renamed to ...
17546 (_chain_mod_SOURCES): ... this.
17547 (chain_mod_CFLAGS): Renamed to ...
17548 (_chain_mod_CFLAGS): ... this.
17549 (linux_mod_SOURCES): Renamed to ...
17550 (_linux_mod_SOURCES): ... this.
17551 (linux_mod_CFLAGS): Renamed to ...
17552 (_linux_mod_CFLAGS): ... this.
17553 (normal_mod_SOURCES): New variable.
17554 (normal_mod_CFLAGS): Likewise.
17555 (normal_mod_ASFLAGS): Likewise.
17557 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17559 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17562 * kern/dl.c (pupa_dl_ref): Refer depending modules
17564 (pupa_dl_unref): Unrefer depending modules recursively.
17565 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17566 a module is unloaded before one depending on that module is
17568 (pupa_dl_unload): Unload depending modules explicitly,
17571 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17573 * include/pupa/i386/pc/linux.h: New file.
17574 * loader/i386/pc/linux.c: Likewise.
17576 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17578 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17579 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17580 of PUPA_CHAINLOADER_BOOT_SECTOR.
17582 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17583 (pupa_linux_prot_size): New variable.
17584 (pupa_linux_tmp_addr): Likewise.
17585 (pupa_linux_real_addr): Likewise.
17586 (pupa_linux_boot_zimage): New function.
17587 (pupa_linux_boot_bzimage): Likewise.
17589 * kern/i386/pc/init.c (struct mem_region): New structure.
17590 (MAX_REGIONS): New macro.
17591 (mem_regions): New variable.
17592 (num_regions): Likewise.
17593 (pupa_os_area_addr): Likewise.
17594 (pupa_os_area_size): Likewise.
17595 (pupa_lower_mem): Likewise.
17596 (pupa_upper_mem): Likewise.
17597 (add_mem_region): New function.
17598 (compact_mem_regions): Likewise.
17599 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17600 the size of the conventional memory and that of so-called upper
17601 memory (before the first memory hole).
17602 Instead of adding each found region to free memory, use
17603 add_mem_region and add them after removing overlaps.
17604 Also, add only 1/4 of the upper memory to free memory. The rest
17605 is used for loading OS images. Maybe this is ad hoc, but this
17606 makes it much easier to relocate OS images when booting.
17608 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17609 (pupa_enter_rescue_mode): Don't register initrd and module.
17611 * kern/mm.c: Include pupa/dl.h.
17613 * kern/main.c: Include pupa/file.h and pupa/device.h.
17615 * kern/loader.c (pupa_loader_load_module_func): Removed.
17616 (pupa_loader_load_module): Likewise.
17618 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17621 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17622 (pupa_linux_tmp_addr): Likewise.
17623 (pupa_linux_real_addr): Likewise.
17624 (pupa_linux_boot_zimage): Likewise.
17625 (pupa_linux_boot_bzimage): Likewise.
17627 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17628 (pupa_upper_mem): Likewise.
17629 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17630 module is too dangerous.
17632 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17633 (pupa_os_area_size): Likewise.
17634 (pupa_loader_set): Remove the first argument. Loader doesn't
17635 manage modules or initrd any longer.
17636 (pupa_loader_load_module): Removed.
17638 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17639 (linux_mod_SOURCES): New variable.
17640 (linux_mod_CFLAGS): Likewise.
17642 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17644 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17645 the length of a blocklist correctly.
17647 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17648 Use ioctl only if the OS file is a block device.
17649 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17650 not very useful for normal files.
17652 * kern/main.c (pupa_set_root_dev): New function.
17653 (pupa_load_normal_mode): Likewise.
17654 (pupa_main): Call those above.
17656 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17659 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17661 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17663 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17664 (setup): Configure the installed partition information and the
17667 * loader/i386/pc/chainloader.c (my_mod): New variable.
17668 (pupa_chainloader_unload): New function.
17669 (pupa_rescue_cmd_chainloader): Refer itself.
17670 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17672 * kern/i386/pc/startup.S (install_partition): Removed.
17673 (version_string): Likewise.
17674 (config_file): Likewise.
17675 (pupa_install_dos_part): New variable.
17676 (pupa_install_bsd_part): Likewise.
17677 (pupa_prefix): Likewise.
17678 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17680 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17682 (make_install_device): New function.
17683 (pupa_machine_init): Set the dl prefix.
17685 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17686 (buf): Renamed to ...
17687 (linebuf): ... this.
17688 (pupa_rescue_cmd_prefix): New function.
17689 (pupa_rescue_cmd_insmod): Likewise.
17690 (pupa_rescue_cmd_rmmod): Likewise.
17691 (pupa_rescue_cmd_lsmod): Likewise.
17692 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17695 * kern/mm.c (pupa_memalign): If failed even after invalidating
17696 disk caches, unload unneeded modules and retry.
17698 * kern/misc.c (pupa_memmove): New function.
17699 (pupa_memcpy): Removed.
17700 (pupa_strcpy): New function.
17701 (pupa_itoa): Made static.
17703 * kern/dl.c (pupa_dl_iterate): New function.
17704 (pupa_dl_ref): Likewise.
17705 (pupa_dl_unref): Likewise.
17706 (pupa_dl_unload): Return if succeeded or not.
17707 (pupa_dl_unload_unneeded): New function.
17708 (pupa_dl_unload_all): Likewise.
17709 (pupa_dl_init): Renamed to ...
17710 (pupa_dl_set_prefix): ... this.
17711 (pupa_dl_get_prefix): New function.
17713 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17714 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17715 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17716 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17717 (pupa_install_dos_part): Declared.
17718 (pupa_install_bsd_part): Likewise.
17719 (pupa_prefix): Likewise.
17720 (pupa_boot_drive): Likewise.
17722 * include/pupa/types.h: Fix a typo.
17724 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17726 (pupa_memmove): Declared.
17727 (pupa_strcpy): Likewise.
17729 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17730 pupa_mod_init takes one argument, its own module.
17731 (pupa_dl_unload_unneeded): Declared.
17732 (pupa_dl_unload_all): Likewise.
17733 (pupa_dl_ref): Likewise.
17734 (pupa_dl_unref): Likewise.
17735 (pupa_dl_iterate): Likewise.
17736 (pupa_dl_init): Renamed to ...
17737 (pupa_dl_set_prefix): ... this.
17738 (pupa_dl_get_prefix): Declared.
17740 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17741 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17743 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17744 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17746 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17747 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17749 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17751 * util/i386/pc/pupa-setup.c (setup): Define the internal
17752 function find_first_partition_start at the top level, because GCC
17753 3.0.x cannot compile internal functions in deeper scopes
17755 (find_root_device): Use lstat instead of stat.
17756 Don't follow symbolic links.
17757 Fix the path-constructing code.
17759 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17760 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17761 by a BLKGETSIZE ioctl first, because block devices don't fill
17762 the member st_mode of the structure stat on Linux.
17763 [__linux__] (linux_find_partition): Use a temporary buffer
17764 REAL_DEV for the working space. Copy it to DEV before returning.
17765 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17766 buffer cache consistent.
17767 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17768 strncmp. The previous value was merely wrong.
17769 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17771 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17772 FAT size is 12. The previous value was merely wrong.
17774 * kern/main.c (pupa_main): Don't split the starting message from
17777 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17778 LF, because BIOS goes crazy about character attributes in this
17781 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17783 * include/i386/pc/util/biosdisk.h: New file.
17784 * util/i386/pc/biosdisk.c: Likewise.
17785 * util/i386/pc/pupa-setup.c: Likewise.
17787 * Makefile.in (INCLUDE_DISTFILES): Added
17788 include/pupa/i386/pc/util/biosdisk.h.
17789 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17790 directory util/i386/pc.
17791 (install-local): Added a rule for sbin_UTILITIES.
17792 (uninstall): Likewise.
17794 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17796 * util/misc.c (xrealloc): New function.
17797 (pupa_malloc): Likewise.
17798 (pupa_free): Likewise.
17799 (pupa_realloc): Likewise.
17800 (pupa_stop): Likewise.
17801 (pupa_putchar): Likewise.
17803 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17805 * include/pupa/util/misc.h (xrealloc): Declared.
17807 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17809 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17810 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17812 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17813 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17815 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17816 way should be implemented.
17817 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17819 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17820 the size of NAME for safety.
17821 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17824 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17825 (pupa_setup_SOURCES): Likewise.
17827 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17829 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17831 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17832 bunch of pushl's from pusha, because this destroys the return
17835 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17837 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17838 This means that any missing prototypes could be fatal. Also, you
17839 must take care when writing assembly code. See the comments at
17840 the beginning of startup.S, for more details.
17842 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17843 compilation mechanism.
17844 (pupa_chainloader_real_boot): Likewise.
17845 (pupa_biosdisk_rw_int13_extensions): Likewise.
17846 (pupa_biosdisk_rw_standard): Likewise.
17847 (pupa_biosdisk_check_int13_extensions): Likewise.
17848 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17849 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17850 (pupa_get_memsize): Likewise.
17851 (pupa_get_mmap_entry): Likewise.
17852 (pupa_console_putchar): Likewise.
17853 (pupa_console_setcursor): Likewise.
17854 (pupa_getrtsecs): Use pushl instead of push.
17856 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17857 memory instead of the stack for a mmap entry, because some
17858 BIOSes may ignore the maximum size and overflow.
17860 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17862 * genmk.rb (PModule#rule): Compile automatically generated
17863 sources with module-specific CFLAGS as well as other sources.
17865 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17867 * configure.ac: Check ld.
17868 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17869 respectively, before checking endianness and sizes.
17871 * Makefile.in (LD): New variable.
17873 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17875 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17877 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17879 * Changelog: New file.