1 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
3 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
5 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
6 assembly in final jump, using register constraints.
8 (grub_linux_boot): For text mode, initialize `have_vga' using
9 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
11 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
12 right before the final jump.
14 Set `video_mode' to 0x3.
16 Document initialization of `video_page', `video_mode' and
19 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
21 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
22 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
23 and set GRUB_LINUX_FLAG_QUIET appropiately.
25 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
27 Fix build on Debian / sparc.
29 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
31 2009-06-28 Pavel Roskin <proski@gnu.org>
33 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
36 * util/grub.d/10_linux.in: Match SUSE style initrd names.
38 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
40 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
43 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
47 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
48 file can't be opened. grub_file_open() is already supposed to set
49 grub_errno / grub_errmsg appropiately.
50 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
52 2009-06-27 Pavel Roskin <proski@gnu.org>
53 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
55 * include/grub/dl.h: Include grub/elf.h.
56 (struct grub_dl): Add symtab field.
57 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
58 GRUB_MODULES_MACHINE_READONLY.
59 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
60 of the header for read-only modules.
61 (grub_dl_unload): Free mod->symtab for read-only modules.
62 * kern/i386/dl.c: Use mod->symtab.
63 * kern/powerpc/dl.c: Likewise.
64 * kern/sparc64/dl.c: Likewise.
65 * kern/x86_64/dl.c: Likewise.
67 * conf/i386-qemu.rmk: New file.
68 * kern/i386/qemu/startup.S: Likewise.
69 * kern/i386/qemu/mmap.c: Likewise.
70 * boot/i386/qemu/boot.S: Likewise.
71 * include/grub/i386/qemu/time.h: Likewise.
72 * include/grub/i386/qemu/serial.h: Likewise.
73 * include/grub/i386/qemu/kernel.h: Likewise.
74 * include/grub/i386/qemu/console.h: Likewise.
75 * include/grub/i386/qemu/boot.h: Likewise.
76 * include/grub/i386/qemu/init.h: Likewise.
77 * include/grub/i386/qemu/machine.h: Likewise.
78 * include/grub/i386/qemu/loader.h: Likewise.
79 * include/grub/i386/qemu/memory.h: Likewise.
81 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
82 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
83 [qemu] (pkglib_IMAGES): Add `boot.img'.
84 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
85 [qemu] (boot_img_FORMAT): New variables.
86 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
87 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
88 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
89 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
90 [qemu] (kernel_img_FORMAT): New variables.
92 * configure.ac: Recognise `i386-qemu'.
94 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
96 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
97 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
98 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
99 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
102 2009-06-27 Pavel Roskin <proski@gnu.org>
104 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
106 * efiemu/prepare32.c: Likewise.
107 * efiemu/prepare64.c: Likewise.
109 2009-06-26 Pavel Roskin <proski@gnu.org>
111 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
112 * include/grub/elf.h: Define symbols without "32" or "64" based
113 on GRUB_TARGET_WORDSIZE.
114 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
115 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
117 * efiemu/loadcore64.c: Likewise.
118 * loader/i386/bsd32.c: Likewise.
119 * loader/i386/bsd64.c: Likewise.
120 * kern/dl.c: Remove own ELF definitions.
121 * util/i386/efi/grub-mkimage.c: Likewise.
123 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
125 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
126 segment 0x0 unconditionally, because the reference generated by
127 GAS is an absolute address.
129 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
131 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
132 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
134 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
136 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
137 indexes. Check for -f explicitly.
138 (search_file): Improve error message.
139 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
141 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
143 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
144 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
146 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
148 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
149 * conf/i386-ieee1275.rmk: Likewise.
150 * conf/i386-coreboot.rmk: Likewise.
152 * kern/i386/pc/startup.S (grub_stop): Remove function.
153 * kern/i386/ieee1275/startup.S: Likewise.
154 * kern/i386/coreboot/startup.S: Likewise.
155 * kern/i386/misc.S (grub_stop): New function.
157 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
159 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
160 * kern/i386/realmode.S (real_to_prot): ... to here.
162 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
164 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
166 (kernel_elf_SOURCES): Rename to ...
167 (kernel_img_SOURCES): ... this.
168 (kernel_elf_HEADERS): Rename to ...
169 (kernel_img_HEADERS): ... this. Update all users.
170 (kernel_elf_ASFLAGS): Rename to ...
171 (kernel_img_ASFLAGS): ... this.
172 (kernel_elf_CFLAGS): Rename to ...
173 (kernel_img_CFLAGS): ... this.
174 (kernel_elf_LDFLAGS): Rename to ...
175 (kernel_img_LDFLAGS): ... this.
176 * conf/i386-coreboot.rmk: Likewise.
177 * conf/powerpc-ieee1275.rmk: Likewise.
179 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
182 2009-06-21 Pavel Roskin <proski@gnu.org>
184 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
185 to match nested functions.
186 * loader/sparc64/ieee1275/linux.c: Likewise.
188 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
190 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
192 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
195 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
197 Fix asm file handling on ELF, and remove workarounds.
199 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
200 and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
201 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
202 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
204 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
208 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
209 and loader/i386/bsd64.c
210 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
211 (FREEBSD_MODTYPE_ELF_MODULE): New definition
212 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
213 (grub_freebsd_load_elfmodule32): New declaration
214 (grub_freebsd_load_elfmoduleobj64): Likewise
215 (grub_freebsd_load_elf_meta32): Likewise
216 (grub_freebsd_load_elf_meta64): Likewise
217 (grub_freebsd_add_meta): Likewise
218 (grub_freebsd_add_meta_module): Likewise
219 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
220 (grub_freebsd_add_meta_module): Likewise and move module-specific
221 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
222 (grub_cmd_freebsd): Add elf-kernel specific parts
223 based on grub_freebsd_add_meta_module
224 (grub_cmd_freebsd_module): Add type parsing moved from
225 grub_freebsd_add_meta_module
226 (grub_cmd_freebsd_module_elf): New function
227 (cmd_freebsd_module_elf): New variable
228 (GRUB_MOD_INIT): Register freebsd_module_elf
229 * loader/i386/bsd32.c: New file
230 * loader/i386/bsd64.c: Likewise
231 * loader/i386/bsdXX.c: Likewise
232 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
233 (grub_elf64_load): Likewise
234 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
236 (grub_elf64_load_hook_t): Likewise
238 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
240 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
242 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
243 don't write a menu entry for recovery mode.
245 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
247 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
248 after it's no longer needed.
250 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
252 * include/grub/i386/loader.h (grub_linux_prot_size)
253 (grub_linux_tmp_addr, grub_linux_real_addr)
254 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
256 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
257 common grub_util_info() call to ...
258 (generate_image): ... here.
259 Fix use of uninitialized memory, comparison of signed with
260 unsigned integers and memory leak.
261 Remove bogus module address message.
263 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
265 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
267 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
269 2009-06-19 Pavel Roskin <proski@gnu.org>
271 * configure.ac: Remove stray AC_MSG_CHECKING.
273 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
275 * disk/scsi.c (grub_scsi_open): use continue instead of big if
277 2009-06-18 Pavel Roskin <proski@gnu.org>
279 * conf/common.rmk: Add fs_file.mod.
280 * disk/fs_file.c: New file.
281 * include/grub/disk.h (enum grub_disk_dev_id): Add
282 GRUB_DISK_DEVICE_FILE_ID.
284 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
286 Fix build with Apple's toolchain. Part 2
288 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
291 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
293 Fix build with Apple's toolchain. Part 1
295 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
297 * configure.ac: remove a leftover AC_MSG_RESULT
298 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
301 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
305 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
306 (decomp_block): initialize ch
307 use grub_memcpy instead of memcpy
309 2009-06-17 Pavel Roskin <proski@gnu.org>
311 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
312 version, use declarations needed to use vga_text as the startup
315 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
316 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
318 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
319 and grub_at_keyboard_fini(), it's done on module load and
322 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
324 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
326 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
328 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
332 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
333 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
334 (grub_script_yylex): don't segfault on unterminated script
335 newline terminates command and variable
337 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
339 avoid double grub_adjust_range call. Bug reported by David Simner
341 * kern/disk.c (grub_disk_write): change to raw disk access before
344 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
346 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
347 spaces, for the benefit of help2man.
348 * util/i386/efi/grub-mkimage.c (usage): Likewise.
350 2009-06-16 Pavel Roskin <proski@gnu.org>
352 * kern/i386/halt.c: Include grub/machine/init.h.
353 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
355 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
357 * util/grub.d/30_os-prober.in: Use ${root} in the generated
360 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
362 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
365 2009-06-16 Pavel Roskin <proski@gnu.org>
367 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
368 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
369 save %dx, we only need %dl and we never change it.
370 * boot/i386/pc/cdboot.S: Don't set the root drive.
371 * boot/i386/pc/pxeboot.S: Likewise.
372 * include/grub/i386/pc/boot.h: Remove
373 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
374 GRUB_BOOT_MACHINE_DRIVE_CHECK.
375 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
376 * kern/i386/pc/init.c (make_install_device): Remove references
378 * kern/i386/pc/startup.S: Likewise.
379 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
381 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
385 * commands/xnu_uuid.c: new file
386 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
387 (xnu_uuid_mod_SOURCES): new variable
388 (xnu_uuid_mod_CFLAGS): likewise
389 (xnu_uuid_mod_LDFLAGS): likewise
390 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
391 * conf/i386-ieee1275.rmk: likewise
392 * conf/i386-pc.rmk: likewise
393 * conf/powerpc-ieee1275.rmk: likewise
394 * conf/sparc64-ieee1275.rmk: likewise
395 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
397 2009-06-16 Pavel Roskin <proski@gnu.org>
399 * configure.ac: Avoid '==' in test command, it's not portable.
401 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
405 * commands/probe.c: new file
406 * conf/common.rmk (pkglib_MODULES): add probe.mod
407 (probe_mod_SOURCES): new variable
408 (probe_mod_CFLAGS): likewise
409 (probe_mod_LDFLAGS): likewise
410 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
411 * conf/i386-ieee1275.rmk: likewise
412 * conf/i386-pc.rmk: likewise
413 * conf/powerpc-ieee1275.rmk: likewise
414 * conf/sparc64-ieee1275.rmk: likewise
416 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
418 Fix handling of string like \"hello\" and "a
421 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
422 (grub_script_yylex): fix parsing of quoting, escaping and newline
424 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
426 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
429 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
431 * util/grub-mkconfig.in: Fix parsing of --output option.
433 2009-06-12 Pavel Roskin <proski@gnu.org>
435 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
436 genmk.rb don't need to be generated or installed.
438 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
440 * commands/i386/pc/drivemap_int13h.S: add more comments
442 2009-06-11 Pavel Roskin <proski@gnu.org>
444 * Makefile.in (uninstall): Uninstall manuals.
446 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
447 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
448 and update-grub_lib in two places.
449 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
451 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
454 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
455 `entry_lo' to fix variable shadowing.
457 2009-06-11 Christian Franke <franke@computer.org>
459 * kern/misc.c (__enable_execute_stack): Add missing return type
460 to prevent gcc warning.
462 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
464 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
466 2009-06-11 Pavel Roskin <proski@gnu.org>
468 * Makefile.in: Don't rely on any scripts being executable.
469 Always use $(SHELL) to run shell scripts.
471 * configure.ac: Always define ___main if using -nostdlib. This
472 fixes tests on Cygwin.
474 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
478 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
479 is in bytes and not in blocks
481 2009-06-11 Pavel Roskin <proski@gnu.org>
483 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
486 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
488 * util/grub.d/30_os-prober.in: Fix a comment. Source
489 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
490 to set the root device. Place drivemap command in the generated
493 2009-06-11 Pavel Roskin <proski@gnu.org>
495 * configure.ac: Remove host_m32. Issues with 64-bit utilities
496 have long been resolved.
498 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
500 * util/grub.d/10_linux.in: Capitalise "Linux".
502 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
504 2009-06-11 Pavel Roskin <proski@gnu.org>
506 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
507 fix a gcc warning and ensure that the function won't ever exit.
509 * kern/i386/ieee1275/init.c: Add missing prototype for
512 * loader/ieee1275/multiboot2.c [__i386__]: Include
513 grub/cpu/multiboot.h.
515 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
516 casts to short - they are not portable and cause warnings. Fix
517 use of uninitialized values in input_buf. Use ARRAY_SIZE.
519 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
523 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
525 (grub_get_root_biosnumber_saved): new variable
526 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
527 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
528 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
529 %dx after the call if necessary
530 * conf/common.rmk (pkglib_MODULES): remove boot.mod
531 (boot_mod_SOURCES): remove
532 (boot_mod_CFLAGS): remove
533 (boot_mod_LDFLAGS): remove
534 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
535 (boot_mod_SOURCES): new variable
536 (boot_mod_CFLAGS): likewise
537 (boot_mod_LDFLAGS): likewise
538 * conf/i386-efi.rmk: likewise
539 * conf/i386-ieee1275.rmk: likewise
540 * conf/i386-pc.rmk: likewise
541 * conf/powerpc-ieee1275.rmk: likewise
542 * conf/sparc64-ieee1275.rmk: likewise
543 * conf/x86_64-efi.rmk: likewise
544 * include/grub/i386/pc/biosnum.h: new file
545 * lib/i386/pc/biosnum.c: likewise
546 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
547 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
548 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
550 2009-06-10 Pavel Roskin <proski@gnu.org>
552 * io/gzio.c (test_header): Don't reuse one buffer for all data.
553 Use separate variables. Read only the file size at the end, but
554 not the checksum that we don't use.
556 * kern/file.c (grub_file_read): Use void pointer for the buffer.
559 * kern/ieee1275/openfw.c: Remove libc includes.
560 * kern/ieee1275/cmain.c: Likewise.
561 * include/grub/ieee1275/ieee1275.h: Likewise.
563 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
566 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
568 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
569 `genparttoollist.sh'.
570 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
571 Add `*.sh' to the list find searches for and change `mdate.sh'
574 2009-06-10 Pavel Roskin <proski@gnu.org>
576 * include/grub/multiboot2.h: Provide compatibility defines for
578 * include/multiboot2.h: Include stdint.h only if needed, using
580 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
582 * loader/ieee1275/multiboot2.c: Likewise.
583 * loader/multiboot2.c: Likewise.
584 * loader/multiboot_loader.c: Likewise.
586 * configure.ac: Use -nostdlib when probing for the target. It
587 should not be required to have libc for the target.
589 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
590 they fail without libc headers for the target.
591 * include/grub/powerpc/libgcc.h: Use weak attribute for all
593 * include/grub/sparc64/libgcc.h: Likewise. Don't use
594 preprocessor conditionals.
596 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
597 build system doesn't need to be aware of the tar.c internals.
599 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
601 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
603 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
605 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
606 disk limit to 26 for IDE, Virtio, Xen and SCSI.
608 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
610 * util/i386/pc/grub-install.in: Change the error message if UUIDs
611 aren't available if ata.mod gets used.
613 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
615 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
616 initialising controller.
617 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
619 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
621 * util/i386/pc/grub-install.in: Add a parameter --disk-module
622 to choose between ata and biosdisk module on i386-pc.
624 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
626 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
627 Subclass and Programming Interface fields in terms of the 3 byte
629 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
631 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
632 interface is OHCI. Add grub_dprintf for symmetry with
634 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
635 interface is UHCI. Add interf variable for programming
636 interface. Print interface with class/subclass.
638 * bus/usb/ohci.c: Set interf with correct field.
640 * bus/usb/uhci.c: Remove unneeded doubled lines.
641 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
642 Remove whitespace inside comment.
644 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
646 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
647 as fallback an equivalent option without depth.
649 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
651 Not fail if unable to retrieve C/H/S on LBA disks
653 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
654 if unable to retrieve C/H/S on LBA disks
656 2009-06-08 Pavel Roskin <proski@gnu.org>
658 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
661 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
663 * Makefile.in (uninstall): Remove all $lib_DATA files.
665 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
667 Bugfix: install on partitionless device
669 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
672 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
674 * Makefile.in (uninstall): Remove all $include_DATA files.
676 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
678 * commands/true.c: New file. Implement the true and false commands.
679 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
680 (true_mod_SOURCES): New variable.
681 (true_mod_CFLAGS): Likewise.
682 (true_mod_LDFLAGS): Likewise.
684 2009-06-05 Colin D Bennett <colin@gibibit.com>
686 Optimized font character lookup using binary search instead of linear
687 search. Fonts now are required to have the character index ordered by
690 * font/font.c (load_font_index): Verify that fonts have ordered
692 (find_glyph): Use binary search instead of linear search to find a
695 2009-06-05 Michael Scherer <misc@mandriva.org>
697 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
698 uses case sensitive btree.
699 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
700 only for case insensitive filesystems.
702 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
704 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
705 * conf/common.rmk (search_mod_CFLAGS): likewise
707 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
709 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
710 compensate a compiler bug
712 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
714 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
717 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
719 Definitions for creating asm symbols with Apple's CC
721 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
722 [APPLE_CC] (VARIABLE): likewise
724 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
726 Disable lnxboot.img when compiled
729 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
730 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
731 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
732 [! APPLE_CC] (CODE_LENG): skip
733 [! APPLE_CC] (setup_sects): likewise
734 [! APPLE_CC]: skip filling
736 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
738 Address in trampolines based on 32-bit registers when compiled
741 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
743 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
745 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
747 Avoid aliases when compiling with Apple's CC for PCBIOS machine
749 * kern/misc.c [APPLE_CC] (memcpy): new function
750 [APPLE_CC] (memmove): likewise
751 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
752 (memcpy): define alias conditionally on !APPLE_CC
755 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
757 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
758 (grub_assert_fail): make prototype conditional
760 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
762 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
764 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
766 (CLEANFILES): add grub-macho2img
767 (grub_macho2img_SOURCES): new variable
768 * kern/i386/pc/startup.S (bss_start): new variable
770 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
771 * util/grub-macho2img.c: new file
773 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
775 Use objconv when compiling with Apple's CC
777 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
778 (efiemu64.o): likewise
779 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
780 when compiling with Apple's CC
781 (efiemu64_s.o): likewise
782 * configure.ac: check for objconv when compiling with Apple's CC
783 * genmk.rb: use objconv for modules when compiled with Apple's CC
785 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
787 Define segment as well as section when compiling with
790 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
791 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
792 (efiemu_convert_pointer): likewise
793 (efiemu_set_virtual_address_map): likewise
794 (efiemu_convert_pointer): likewise
795 (efiemu_getcrc32): likewise
796 (init_crc32_table): likewise
798 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
799 (GRUB_MOD_DEP): likewise
801 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
803 Allow a compilation without -mcmodel=large
805 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
806 when compiled without -mcmodel=large
807 (filter_memory_map): remove memory post 4 GiB when compiled
808 without -mcmodel=large
809 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
810 TARGET_CFLAGS when -mcmodel=large isn't supported
812 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
814 Remove nested functions in efiemu core
816 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
818 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
820 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
822 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
824 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
826 (grub_cpu_is_tsc_supported): likewise
827 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
829 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
831 Absolute addressing through constant with Apple's cc
833 * kern/i386/pc/startup.S: Define necessary constants
834 and address through it when using ABS with Apple's CC
835 * boot/i386/pc/diskboot.S: likewise
836 * boot/i386/pc/boot.S: likewise
837 * boot/i386/pc/lnxboot.S: likewise
838 * boot/i386/pc/cdboot.S: likewise
839 * mmap/i386/pc/mmap_helper.S: likewise
840 * commands/i386/pc/drivemap_int13h.S: likewise
842 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
844 Check if compiler is apple cc
846 * Makefile.in (ASFLAGS): new variable
847 (TARGET_ASFLAGS): likewise
848 (TARGET_MODULE_FORMAT): likewise
849 (TARGET_APPLE_CC): likewise
851 (TARGET_IMG_CFLAGS): likewise
852 (TARGET_CPPFLAGS): add includedir
853 * configure.ac: call grub_apple_cc and grub_apple_target_cc
854 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
855 Check for linker script only if compiler isn't Apple's CC
856 (TARGET_MODULE_FORMAT): set
857 (TARGET_APPLE_CC): likewise
858 (TARGET_ASFLAGS): likewise
860 Check for objcopy only if compiler isn't Apple's CC
861 Check for BSS symbol only if compiler isn't Apple's CC
862 * genmk.rb: adapt nm options if we use Apple's utils
863 * aclocal.m4 (grub_apple_cc): new test
864 (grub_apple_target_cc): likewise
866 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
868 Simplify sed expressions and improve awk
870 * Makefile.in (install-local): simplify sed expression
871 * gencmdlist.sh: likewise
872 * genmoddep.awk: avoid adding module as a dependency of itself
874 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
876 Add missing start symbols
878 * boot/i386/pc/boot.S: add start
879 * boot/i386/pc/pxeboot.S: likewise
881 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
883 Fix wrong assumptions with grub-mkimage on EFI
885 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
886 (relocate_addresses): consider both r_addend and value at offset
887 (make_mods_section): zerofill modinfo and header
888 (convert_elf): write prefix here
890 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
892 Use .asciz instead of .string
894 * i386/pc/diskboot.S: use .asciz instead of .string
895 * i386/pc/boot.S: likewise
896 * include/grub/dl.h (GRUB_MOD_DEP): likewise
897 (GRUB_MOD_NAME): likewise
899 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
903 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
904 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
905 (grub_video_setup): remove
906 (grub_video_set_mode): new prototype
907 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
909 (linux_vesafb_res): compile only on PCBIOS
910 (grub_linux_boot): support gfxpayload
911 * loader/i386/pc/xnu.c (video_hook): new function
912 (grub_xnu_set_video): support gfxpayload
913 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
914 (DEFAULT_VIDEO_HEIGHT): likewise
915 (DEFAULT_VIDEO_FLAGS): likewise
916 (DEFAULT_VIDEO_MODE): new definition
917 (video_hook): new function
918 (grub_gfxterm_init): use grub_video_set_mode
919 * util/grub.d/30_os-prober.in: remove explicit modesetting before
921 * video/video.c (grub_video_setup): removed
922 (grub_video_set_mode): new function based on grub_gfxterm_init and
925 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
927 Avoid calling biosdisk in drivemap
929 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
930 (revparse_biosdisk): likewise
931 (list_mappings): derive name from id directly
932 (grub_cmd_drivemap): use tryparse_diskstring
934 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
938 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
939 (grub_lexer_param): add tokenonhold
940 (grub_script_create_cmdline): remove cmdline. All callers updated
941 (grub_script_function_create): make functionname
942 grub_script_arg. All callers updated
943 (grub_script_execute_argument_to_string): new prototype
944 * kern/parser.c (state_transitions): reorder
945 (grub_parser_cmdline_state): fix a bug and make more compact
946 * script/sh/execute.c (grub_script_execute_argument_to_string):
948 (grub_script_execute_cmdline): use new format
949 * script/sh/function.c (grub_script_function_create): make functionname
950 grub_script_arg. All callers updated
951 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
952 (grub_script_yylex): remove
953 (grub_script_yylex2): renamed to ...
954 (grub_script_yylex): ...renamed
955 parse the expressions like a${b}c
956 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
957 (GRUB_PARSER_TOKEN_VAR): remove
958 (GRUB_PARSER_TOKEN_NAME): likewise
959 ("if"): declare as typeless
961 ("function"): likewise
967 (script): accept empty scripts and make exit on error
968 (arguments): use GRUB_PARSER_TOKEN_ARG
970 (command): move error handling to script
971 (menuentry): move grub_script_lexer_ref before
972 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
973 argument. All callers updated
975 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
977 Prevent GRUB from probing floppies during boot.
979 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
980 * commands/search.c (options): Add --no-floppy.
981 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
982 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
983 --no-floppy when searching for UUIDs.
985 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
987 Simplify the code duplication in commands/search.c.
989 * commands/search.c (search_label, search_fs_uuid): Merge into ...
990 (search_fs): ... this. Update all users.
992 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
994 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
996 2009-05-28 Pavel Roskin <proski@gnu.org>
998 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
999 Remove the original symlink explicitly.
1001 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1002 just one slash. That's how grub_fshelp_find_file() does it.
1004 2009-05-26 Pavel Roskin <proski@gnu.org>
1006 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1009 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1012 2009-05-25 Christian Franke <franke@computer.org>
1014 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1016 (grub_atapi_identify): Add wait after drive select.
1017 (grub_ata_identify): Do more strict status register check before
1018 calling grub_atapi_identify (). Suppress error message if status
1019 register is 0x00 after command failure. Add status register
1020 check after PIO read to avoid bogus identify due to stuck DRQ.
1021 Thanks to Pavel Roskin for testing.
1022 (grub_device_initialize): Remove unsafe status register check.
1023 Thanks to 'phcoder' for problem report and patch.
1024 Prevent sign extension in debug message.
1026 2009-05-23 Colin D Bennett <colin@gibibit.com>
1028 Cleaned up `include/grub/normal.h'. Grouped prototypes by
1029 definition file, and functions defined in `normal/menu.c' have had
1030 their prototypes moved to `include/grub/menu.h' for consistency.
1032 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1034 (grub_menu_get_entry): Likewise.
1035 (grub_menu_get_timeout): Likewise.
1036 (grub_menu_set_timeout): Likewise.
1037 (grub_menu_execute_entry): Likewise.
1038 (grub_menu_execute_with_fallback): Likewise.
1039 (grub_menu_entry_run): Likewise.
1041 * include/grub/normal.h: Re-ordered and grouped function
1042 prototypes by file that the function is defined in.
1043 (grub_menu_execute_callback): Removed; moved to menu.h.
1044 (grub_menu_get_entry): Likewise.
1045 (grub_menu_get_timeout): Likewise.
1046 (grub_menu_set_timeout): Likewise.
1047 (grub_menu_execute_entry): Likewise.
1048 (grub_menu_execute_with_fallback): Likewise.
1049 (grub_menu_entry_run): Likewise.
1050 (grub_menu_addentry): Renamed from this ...
1051 (grub_normal_add_menu_entry): ... to this.
1053 * normal/main.c (grub_menu_addentry): Renamed from this ...
1054 (grub_normal_add_menu_entry): ... to this.
1056 * script/sh/execute.c (grub_script_execute_menuentry): Update
1057 reference to renamed grub_menu_addentry function.
1059 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
1061 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1063 2009-05-22 Pavel Roskin <proski@gnu.org>
1065 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1066 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
1067 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
1068 compiling for the i386 targets, but not for the utilities.
1070 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1072 (grub_root_drive): Likewise.
1073 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1075 (grub_root_drive): Change size to byte.
1076 (grub_start_addr): Remove.
1077 (grub_end_addr): Likewise.
1078 (grub_apm_bios_info): Likewise.
1080 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
1082 * normal/i386: Remove.
1083 * normal/powerpc: Likewise.
1084 * normal/sparc64: Likewise.
1085 * normal/x86_64: Likewise.
1087 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
1089 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1090 * loader/i386/linux_trampoline.S: Fix indentation
1091 * loader/i386/xnu_helper.S: Likewise
1093 2009-05-18 Colin D Bennett <colin@gibibit.com>
1095 Display error messages when parsing a Lua statement fails.
1096 Previously, executing a syntactically invalid statement like
1097 ")foo" or "bar;" would silently fail.
1099 * script/lua/grub_main.c (handle_lua_error): New function.
1100 (grub_lua_parse_line): Improved reporting of Lua parser and
1103 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1105 Remove -Werror which causes build to fail on some systems
1107 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1108 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1109 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1111 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
1113 trampoline for linux on 64-bit platform
1115 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1116 loader/i386/efi/linux_trampoline.S
1117 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1119 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1121 * loader/i386/linux_trampoline.S: moved here
1122 * loader/i386/efi/linux.c (allocate_pages): reserve space for
1124 (jumpvector): removed
1125 (grub_linux_trampoline_start): new declaration
1126 (grub_linux_trampoline_end): likewise
1127 (grub_linux_boot): use trampoline when on 64-bit platform
1128 * loader/i386/linux.c: likewise
1130 2009-05-16 Pavel Roskin <proski@gnu.org>
1132 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1133 const to avoid a warning.
1134 (grub_lua_setenv): Likewise.
1135 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1136 lmsg to fix a warning.
1138 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1140 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1141 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1142 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1143 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1144 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1145 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1146 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1147 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1149 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
1151 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1153 2009-05-16 Bean <bean123ch@gmail.com>
1155 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1156 (lua_mod_SOURCES): New variable.
1157 (lua_mod_CFLAGS): Likewise.
1158 (lua_mod_LDFLAGS): Likewise.
1160 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1161 (setjmp_mod_SOURCES): New variable.
1162 (setjmp_mod_CFLAGS): Likewise.
1163 (setjmp_LDFLAGS): Likewise.
1165 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1166 (setjmp_mod_SOURCES): New variable.
1167 (setjmp_mod_CFLAGS): Likewise.
1168 (setjmp_LDFLAGS): Likewise.
1170 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1171 (setjmp_mod_SOURCES): New variable.
1172 (setjmp_mod_CFLAGS): Likewise.
1173 (setjmp_LDFLAGS): Likewise.
1175 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1176 (setjmp_mod_SOURCES): New variable.
1177 (setjmp_mod_CFLAGS): Likewise.
1178 (setjmp_LDFLAGS): Likewise.
1180 * normal/i386/setjmp.S: Moved from here ...
1181 * lib/i386/setjmp.S: ... Moved here
1182 * normal/x86_64/setjmp.S: Moved from here ...
1183 * lib/x86_64/setjmp.S: ... Moved here
1184 * normal/powerpc/setjmp.S: Moved from here ...
1185 * lib/powerpc/setjmp.S: ... Moved here
1186 * normal/sparc64/setjmp.S: Moved from here ...
1187 * lib/sparc64/setjmp.S: ... Moved here
1189 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1190 returns_twice in mingw.
1192 * script/lua/grub_lib.c: New file.
1193 * script/lua/grub_lib.h: Likewise.
1194 * script/lua/grub_lua.h: Likewise.
1195 * script/lua/grub_main.c: Likewise.
1196 * script/lua/lapi.c: Likewise.
1197 * script/lua/lapi.h: Likewise.
1198 * script/lua/lauxlib.c: Likewise.
1199 * script/lua/lauxlib.h: Likewise.
1200 * script/lua/lbaselib.c: Likewise.
1201 * script/lua/lcode.c: Likewise.
1202 * script/lua/lcode.h: Likewise.
1203 * script/lua/ldblib.c: Likewise.
1204 * script/lua/ldebug.c: Likewise.
1205 * script/lua/ldebug.h: Likewise.
1206 * script/lua/ldo.c: Likewise.
1207 * script/lua/ldo.h: Likewise.
1208 * script/lua/ldump.c: Likewise.
1209 * script/lua/lfunc.c: Likewise.
1210 * script/lua/lfunc.h: Likewise.
1211 * script/lua/lgc.c: Likewise.
1212 * script/lua/lgc.h: Likewise.
1213 * script/lua/linit.c: Likewise.
1214 * script/lua/liolib.c: Likewise.
1215 * script/lua/llex.c: Likewise.
1216 * script/lua/llex.h: Likewise.
1217 * script/lua/llimits.h: Likewise.
1218 * script/lua/lmathlib.c: Likewise.
1219 * script/lua/lmem.c: Likewise.
1220 * script/lua/lmem.h: Likewise.
1221 * script/lua/loadlib.c: Likewise.
1222 * script/lua/lobject.c: Likewise.
1223 * script/lua/lobject.h: Likewise.
1224 * script/lua/lopcodes.c: Likewise.
1225 * script/lua/lopcodes.h: Likewise.
1226 * script/lua/loslib.c: Likewise.
1227 * script/lua/lparser.c: Likewise.
1228 * script/lua/lparser.h: Likewise.
1229 * script/lua/lstate.c: Likewise.
1230 * script/lua/lstate.h: Likewise.
1231 * script/lua/lstring.c: Likewise.
1232 * script/lua/lstring.h: Likewise.
1233 * script/lua/lstrlib.c: Likewise.
1234 * script/lua/ltable.c: Likewise.
1235 * script/lua/ltable.h: Likewise.
1236 * script/lua/ltablib.c: Likewise.
1237 * script/lua/ltm.c: Likewise.
1238 * script/lua/ltm.h: Likewise.
1239 * script/lua/lua.h: Likewise.
1240 * script/lua/luaconf.h: Likewise.
1241 * script/lua/lualib.h: Likewise.
1242 * script/lua/lundump.c: Likewise.
1243 * script/lua/lundump.h: Likewise.
1244 * script/lua/lvm.c: Likewise.
1245 * script/lua/lvm.h: Likewise.
1246 * script/lua/lzio.c: Likewise.
1247 * script/lua/lzio.h: Likewise.
1249 2009-05-16 Bean <bean123ch@gmail.com>
1251 * include/grub/kernel.h (grub_module_header_types): Add type
1254 * kern/main.c (grub_load_config): New function.
1255 (grub_main): Call grub_load_config to read boot config.
1257 * grub-mkimage (generate_image): New parameter config_path.
1258 (options): New option --config.
1259 (main): Parse --config option, and pass it to generate_image.
1261 2009-05-14 Christian Franke <franke@computer.org>
1263 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1264 This fixes build on Cygwin.
1266 2009-05-14 Pavel Roskin <proski@gnu.org>
1268 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1269 jump. This saves two bytes, so the typical case of 2 swapped
1270 drives would fit 32 bytes.
1272 2009-05-13 Pavel Roskin <proski@gnu.org>
1274 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1275 grub_uint32_t to avoid a warning.
1277 * loader/i386/linux.c (allocate_pages): When assigning
1278 real_mode_mem, cast through grub_size_t to fix a warning. The
1279 code already makes sure that the value would fit a pointer.
1280 (grub_linux_setup_video): Cast render_target->data to
1281 grub_size_t to fix a warning.
1283 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
1285 * commands/i386/pc/drivemap.c: New file - implement drivemap
1287 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1288 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1290 2009-05-13 Pavel Roskin <proski@gnu.org>
1292 * util/i386/pc/grub-setup.c (setup): Remove unused variable
1293 embedding_area_exists.
1295 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
1297 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1298 it easier to understand / work with.
1299 Improve warning messages for cases where there's no embedding area,
1300 or when it is too small (or core.img too large).
1302 2009-05-13 Pavel Roskin <proski@gnu.org>
1304 * loader/i386/pc/multiboot2.c: Add necessary includes for
1305 grub_multiboot2_real_boot().
1307 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1308 PX record is always little-endian. We only need the lower 2
1311 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1312 facilitate code reuse.
1313 (grub_cpio_mount): Use "struct head", not a char buffer. This
1314 fixes a warning reported by gcc 4.4.
1316 * kernel/disk.c (grub_disk_read): Use void pointer for the
1318 (grub_disk_write): Use const void pointer for the buffer.
1319 Adjust all callers. Remove unnecessary casts.
1321 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
1323 * util/i386/pc/grub-install.in: Update copyright year.
1325 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1329 * commands/gptsync.c: new file
1330 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1331 (gptsync_mod_SOURCES): new variable
1332 (gptsync_mod_CFLAGS): likewise
1333 (gptsync_mod_LDFLAGS): likewise
1334 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1336 (GRUB_PC_PARTITION_TYPE_HFS): likewise
1337 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1338 * conf/i386-ieee1275.rmk: likewise
1339 * conf/i386-pc.rmk: likewise
1340 * conf/powerpc-ieee1275.rmk: likewise
1342 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
1346 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1347 (grub_dl_ref): likewise
1349 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
1351 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1352 split in two functions (one for msdos and one for gpt).
1354 2009-05-08 Pavel Roskin <proski@gnu.org>
1356 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1359 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1360 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
1361 Initialize them with -1. Add sanity check for bad1. Eliminate
1364 2009-05-08 David S. Miller <davem@davemloft.net>
1366 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1368 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
1370 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1373 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
1375 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1376 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1378 2009-05-05 David S. Miller <davem@davemloft.net>
1380 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1382 2009-05-05 Pavel Roskin <proski@gnu.org>
1384 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1385 of grub_dl_ref() and grub_dl_unref().
1386 * commands/parttool.c: Remove preprocessor conditionals around
1387 grub_dl_ref() and grub_dl_unref().
1388 * fs/affs.c: Likewise.
1389 * fs/afs.c: Likewise.
1390 * fs/cpio.c: Likewise.
1391 * fs/ext2.c: Likewise.
1392 * fs/fat.c: Likewise.
1393 * fs/hfs.c: Likewise.
1394 * fs/hfsplus.c: Likewise.
1395 * fs/iso9660.c: Likewise.
1396 * fs/jfs.c: Likewise.
1397 * fs/minix.c: Likewise.
1398 * fs/ntfs.c: Likewise.
1399 * fs/reiserfs.c: Likewise.
1400 * fs/sfs.c: Likewise.
1401 * fs/udf.c: Likewise.
1402 * fs/ufs.c: Likewise.
1403 * fs/xfs.c: Likewise.
1404 * include/grub/dl.h: Likewise.
1405 * loader/xnu.c: Likewise.
1407 2009-05-04 Pavel Roskin <proski@gnu.org>
1409 * commands/acpi.c: Remove unused variable my_mod.
1410 * partmap/amiga.c: Likewise.
1411 * partmap/apple.c: Likewise.
1412 * partmap/gpt.c: Likewise.
1413 * partmap/pc.c: Likewise.
1414 * partmap/sun.c: Likewise.
1415 * term/gfxterm.c: Likewise.
1416 * term/i386/pc/vesafb.c: Likewise.
1417 * term/i386/pc/vga.c: Likewise.
1419 2009-05-04 David S. Miller <davem@davemloft.net>
1421 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1422 pointer args to grub_ieee1275_get_property().
1424 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1426 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1427 devices, and do not traverse down under controller nodes.
1429 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1430 (grub_ofdisk_open): Use it to un-escape "," characters.
1431 * kern/disk.c (find_part_sep): New.
1432 (grub_disk_open): Use it to find the first non-escaped ','
1433 character in the disk name.
1434 * util/ieee1275/devicemap.c (escape_of_path): New.
1435 (grub_util_emit_devicemap_entry): Use it.
1436 * util/sparc64/ieee1275/grub-install.in: Update script to
1437 strip partition specifiers properly by not triggering on
1438 '\' escaped ',' characters.
1440 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1442 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1444 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1446 (linux_vesafb_modes): Add a lot of additional modes to the list (based
1447 on documentation from Wikipedia).
1449 2009-05-04 Pavel Roskin <proski@gnu.org>
1451 * disk/ata.c: Spelling fixes.
1452 * disk/raid.c: Likewise.
1453 * disk/usbms.c: Likewise.
1454 * disk/dmraid_nvidia.c: Likewise.
1455 * kern/ieee1275/openfw.c: Likewise.
1456 * kern/ieee1275/init.c: Likewise.
1457 * kern/ieee1275/cmain.c: Likewise.
1458 * boot/i386/pc/cdboot.S: Likewise.
1459 * video/readers/png.c: Likewise.
1460 * video/i386/pc/vbe.c: Likewise.
1461 * fs/udf.c: Likewise.
1462 * fs/hfs.c: Likewise.
1463 * fs/reiserfs.c: Likewise.
1464 * efiemu/runtime/efiemu.c: Likewise.
1465 * efiemu/main.c: Likewise.
1466 * efiemu/mm.c: Likewise.
1467 * include/grub/elf.h: Likewise.
1468 * include/grub/xnu.h: Likewise.
1469 * include/grub/usbdesc.h: Likewise.
1470 * include/grub/usb.h: Likewise.
1471 * include/grub/script_sh.h: Likewise.
1472 * include/grub/lib/LzmaEnc.h: Likewise.
1473 * include/grub/efiemu/efiemu.h: Likewise.
1474 * include/grub/command.h: Likewise.
1475 * normal/menu.c: Likewise.
1476 * normal/main.c: Likewise.
1477 * normal/datetime.c: Likewise.
1478 * bus/usb/uhci.c: Likewise.
1479 * mmap/i386/uppermem.c: Likewise.
1480 * mmap/mmap.c: Likewise.
1481 * commands/acpi.c: Likewise.
1482 * commands/test.c: Likewise.
1483 * partmap/apple.c: Likewise.
1484 * font/font.c: Likewise.
1485 * loader/sparc64/ieee1275/linux.c: Likewise.
1486 * loader/macho.c: Likewise.
1487 * loader/i386/bsd_trampoline.S: Likewise.
1488 * loader/i386/bsd.c: Likewise.
1489 * loader/xnu.c: Likewise.
1490 * term/i386/pc/vesafb.c: Likewise.
1491 * term/usb_keyboard.c: Likewise.
1492 * util/resolve.c: Likewise.
1493 * util/getroot.c: Likewise.
1495 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1497 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1499 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1501 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1504 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1506 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1507 parameter only available on BIOS.
1509 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1511 Removed wrong semicolon in declaration
1513 * grub/misc.h (grub_dprintf): remove semicolon
1515 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1517 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1518 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1519 is done by grub_cmd_linux() now).
1520 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1521 restore video to text mode.
1522 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1523 indicates lack of "vga=" parameter. "vga=0" is mapped to
1524 `GRUB_LINUX_VID_MODE_NORMAL'.
1526 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
1528 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1529 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1530 and `normal/script.c'. Add `kern/rescue_reader.c',
1531 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1532 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1533 `grub_script.tab.c'.
1535 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1536 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1537 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1538 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1539 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1541 * Makefile.in: Remove duplicated 2008 in Copyright line.
1543 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
1545 * util/misc.c (grub_util_warn): New function. Emits a warning
1547 * include/grub/util/misc.h (grub_util_warn): New declaration.
1549 * util/i386/pc/grub-install.in: Understand --force and pass it down
1552 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1554 (setup): Improve error messages and add warnings when requested to
1555 install in odd layouts. Refuse to install using blocklists unless
1558 2009-05-04 martin f. krafft <madduck@madduck.net>
1560 * disk/raid.c (grub_raid_scan_device): Improve debug message.
1562 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1564 Updated copyright year
1566 * fs/hfsplus.c: updated copyright year
1568 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
1572 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1573 in the space previously used by unused3
1574 (grub_hfsplus_uuid): new function
1575 (grub_hfsplus_fs): added uuid field
1577 2009-05-03 Pavel Roskin <proski@gnu.org>
1579 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1580 suppress warnings. It's no longer needed.
1581 * disk/host.c: Likewise.
1582 * disk/ata_pthru.c: Likewise.
1583 * disk/loopback.c: Likewise.
1584 * hook/datehook.c: Likewise.
1585 * parttool/pcpart.c: Likewise.
1586 * fs/i386/pc/pxe.c: Likewise.
1587 * fs/ntfscomp.c: Likewise.
1588 * efiemu/main.c: Likewise.
1589 * mmap/mmap.c: Likewise.
1590 * commands/crc.c: Likewise.
1591 * commands/hexdump.c: Likewise.
1592 * commands/hdparm.c: Likewise.
1593 * commands/acpi.c: Likewise.
1594 * commands/echo.c: Likewise.
1595 * commands/minicmd.c: Likewise.
1596 * commands/blocklist.c: Likewise.
1597 * commands/memrw.c: Likewise.
1598 * commands/loadenv.c: Likewise.
1599 * commands/usbtest.c: Likewise.
1600 * commands/lsmmap.c: Likewise.
1601 * commands/boot.c: Likewise.
1602 * commands/parttool.c: Likewise.
1603 * commands/configfile.c: Likewise.
1604 * commands/search.c: Likewise.
1605 * commands/ieee1275/suspend.c: Likewise.
1606 * commands/cat.c: Likewise.
1607 * commands/i386/pc/pxecmd.c: Likewise.
1608 * commands/i386/pc/play.c: Likewise.
1609 * commands/i386/pc/halt.c: Likewise.
1610 * commands/i386/pc/vbeinfo.c: Likewise.
1611 * commands/i386/pc/vbetest.c: Likewise.
1612 * commands/lspci.c: Likewise.
1613 * commands/date.c: Likewise.
1614 * commands/handler.c: Likewise.
1615 * commands/ls.c: Likewise.
1616 * commands/test.c: Likewise.
1617 * commands/cmp.c: Likewise.
1618 * commands/efi/loadbios.c: Likewise.
1619 * commands/efi/fixvideo.c: Likewise.
1620 * commands/halt.c: Likewise.
1621 * commands/help.c: Likewise.
1622 * commands/reboot.c: Likewise.
1623 * hello/hello.c: Likewise.
1624 * script/sh/main.c: Likewise.
1625 * loader/xnu.c: Likewise.
1626 * term/terminfo.c: Likewise.
1627 * term/i386/pc/serial.c: Likewise.
1628 * term/usb_keyboard.c: Likewise.
1630 2009-05-03 David S. Miller <davem@davemloft.net>
1632 * normal/menu.c: Include grub/parser.h
1634 2009-05-03 Pavel Roskin <proski@gnu.org>
1636 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1638 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1639 Suggested by Javier MartÃn <lordhabbit@gmail.com>
1641 * util/i386/pc/grub-mkrescue.in: Allow for the case when
1642 efiemu??.o doesn't exist.
1643 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
1646 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
1648 FreeBSD 64-bit support
1650 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1651 and loader/i386/bsd_trampoline.S
1652 (bsd_mod_ASFLAGS): new variable
1653 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1654 (FREEBSD_MODTYPE_KERNEL64): likewise
1655 (grub_bsd64_trampoline_start): likewise
1656 (grub_bsd64_trampoline_end): likewise
1657 (grub_bsd64_trampoline_selfjump): likewise
1658 (grub_bsd64_trampoline_gdt): likewise
1659 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1660 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1661 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1662 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1663 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1665 * loader/i386/bsd_pagetable.c: new file
1666 * loader/i386/bsd_trampoline.S: likewise
1667 * loader/i386/bsd.c (ALIGN_QWORD): new macro
1668 (ALIGN_VAR): likewise
1669 (entry_hi): new variable
1670 (kern_end_mdofs): likewise
1671 (is_64bit): likewise
1672 (grub_freebsd_add_meta): use ALIGN_VAR
1673 (grub_e820_mmap): new declaration
1674 (grub_freebsd_add_mmap): new function
1675 (grub_freebsd_add_meta_module): support 64 bit kernels
1676 (grub_freebsd_list_modules): use ALIGN_VAR
1677 (gdt_descriptor): new declaration
1678 (grub_freebsd_boot): support 64 bit kernels
1679 (grub_bsd_elf64_hook): new function
1680 (grub_bsd_load_elf): support elf64
1682 2009-05-03 Bean <bean123ch@gmail.com>
1684 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1685 after we get the result of if statement.
1687 2009-05-03 Bean <bean123ch@gmail.com>
1689 * Makefile.in (enable_efiemu): New variable.
1691 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1693 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1695 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1696 path, add -mno-red-zone option.
1697 (efiemu64_s.o): Likewise.
1698 (efiemu64.o): Use macro $^ for source file.
1700 * configure.ac (--enable-efiemu): New option.
1702 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
1706 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1707 (pkglib_MODULES): add xnu.mod
1708 (xnu_mod_SOURCES): new variable
1709 (xnu_mod_CFLAGS): likewise
1710 (xnu_mod_LDFLAGS): likewise
1711 (xnu_mod_ASFLAGS): likewise
1712 * conf/i386-pc.rmk: likewise
1713 * conf/x86_64-efi.rmk: likewise
1714 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1716 * include/grub/i386/macho.h: new file
1717 * include/grub/i386/xnu.h: likewise
1718 * include/grub/macho.h: likewise
1719 * include/grub/machoload.h: likewise
1720 * include/grub/x86_64/macho.h: likewise
1721 * include/grub/x86_64/xnu.h: likewise
1722 * include/grub/xnu.h: likewise
1723 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1724 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1725 * loader/i386/efi/xnu.c: new file
1726 * loader/i386/pc/xnu.c: likewise
1727 * loader/i386/xnu.c: likewise
1728 * loader/i386/xnu_helper.S: likewise
1729 * loader/macho.c: likewise
1730 * loader/xnu.c: likewise
1731 * loader/xnu_resume.c: likewise
1732 * util/grub-dumpdevtree: likewise
1733 * include/grub/i386/pit.h: include grub/err.h
1734 (grub_pit_wait): export
1735 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1737 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1741 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1742 _linux_efi, linux_efi.
1743 new files in grub-emu
1744 new targets efiemu32.o and efiemu64.o
1745 * loader/linux_normal_efiemu.c: likewise
1746 * loader/i386/efi/linux.c: added preliminary efiemu support
1747 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1749 * include/grub/autoefi.h: new file
1750 * include/grub/i386/efiemu.h: likewise
1751 * include/grub/i386/pc/efiemu.h: likewise
1752 * include/grub/efi/api.h: add LL suffix when necessary
1753 new definitions relating to tables
1754 * include/grub/efiemu/efiemu.h: new file
1755 * include/grub/efiemu/runtime.h: likewise
1756 * efiemu/prepare.c: likewise
1757 * efiemu/loadcore_common.c: likewise
1758 * efiemu/loadcore64.c: likewise
1759 * efiemu/runtime/efiemu.sh: likewise
1760 * efiemu/runtime/efiemu.S: likewise
1761 * efiemu/runtime/efiemu.c: likewise
1762 * efiemu/runtime/config.h: likewise
1763 * efiemu/prepare32.c: likewise
1764 * efiemu/main.c: likewise
1765 * efiemu/modules/pnvram.c: likewise
1766 * efiemu/modules/i386: likewise
1767 * efiemu/modules/i386/pc: likewise
1768 * efiemu/modules/acpi.c: likewise
1769 * efiemu/i386/pc/cfgtables.c: likewise
1770 * efiemu/i386/loadcore64.c: likewise
1771 * efiemu/i386/loadcore32.c: likewise
1772 * efiemu/prepare64.c: likewise
1773 * efiemu/loadcore.c: likewise
1774 * efiemu/symbols.c: likewise
1775 * efiemu/mm.c: likewise
1776 * efiemu/loadcore32.c: likewise
1778 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1782 * commands/acpi.c: new file
1783 * commands/i386/pc/acpi.c: likewise
1784 * commands/efi/acpi.c: likewise
1785 * include/grub/acpi.h: likewise
1786 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1787 (acpi_mod_SOURCES): new variable
1788 (acpi_mod_CFLAGS): likewise
1789 (acpi_mod_LDFLAGS): likewise
1790 * conf/i386-efi.rmk: likewise
1791 * conf/x86_64-efi.rmk: likewise
1793 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1795 Missing part from mmap patch
1797 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1798 (grub_mmap_unregister)
1799 (grub_mmap_free_and_unregister): use grub_mmap_register
1801 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
1805 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1806 * loader/i386/linux.c (find_mmap_size): likewise
1807 (allocate_pages): likewise
1808 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1809 (grub_fill_multiboot_mmap): likewise
1810 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1811 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1812 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1813 (OPENBSD_MMAP_RESERVED): likewise
1814 * include/grub/i386/pc/memory.h: include grub/memory.h
1815 (grub_lower_mem): removed
1816 (grub_upper_mem): likewise
1817 (GRUB_MACHINE_MEMORY_ACPI): new definition
1818 (GRUB_MACHINE_MEMORY_NVS): likewise
1819 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1820 (GRUB_MACHINE_MEMORY_HOLE): likewise
1821 (grub_machine_mmap_register): likewise
1822 (grub_machine_mmap_unregister): likewise
1823 (grub_machine_get_upper): likewise
1824 (grub_machine_get_lower): likewise
1825 (grub_machine_get_post64): likewise
1826 * include/grub/i386/efi/memory.h: new file
1827 * include/grub/x86_64/efi/memory.h: likewise
1828 * include/grub/efi/memory.h: likewise
1829 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1830 (mmap_mod_SOURCES): new variable
1831 (mmap_mod_LDFLAGS): likewise
1832 (mmap_mod_ASFLAGS): likewise
1833 * conf/i386-coreboot.rmk: likewise
1834 * conf/i386-ieee1275.rmk: likewise
1835 * conf/i386-efi.rmk: likewise
1836 * conf/x86_64-efi.rmk: likewise
1837 * include/grub/types.h (UINT_TO_PTR): new macro
1838 (PTR_TO_UINT32): likewise
1839 (PTR_TO_UINT64): likewise
1840 * include/grub/memory.h: new file
1841 * mmap/i386/pc/mmap.c: likewise
1842 * mmap/i386/pc/mmap_helper.S: likewise
1843 * mmap/i386/uppermem.c: likewise
1844 * mmap/mmap.c: likewise
1845 * mmap/efi/mmap.c: likewise
1846 * kern/i386/coreboot/init.c (grub_machine_init): don't use
1848 * kern/i386/pc/init.c (grub_lower_mem): removed variable
1849 (grub_upper_mem): likewise
1850 (grub_machine_init): don't use grub_upper_mem,
1851 make grub_lower_mem local
1852 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1853 grub_mmap_iterate and grub_mmap_get_upper
1854 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1856 2009-05-02 Bean <bean123ch@gmail.com>
1858 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1860 (pkglib_MODULES): Add normal.mod and sh.mod.
1861 (normal_SOURCES): New variable.
1862 (normal_mod_CFLAGS): Likewise.
1863 (normal_mod_LDFLAGS): Likewise.
1864 (sh_mod_SOURCES): Likewise.
1865 (sh_mod_CFLAGS): Likewise.
1866 (sh_mod_LDFLAGS): Likewise.
1868 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1869 script/sh/lexer.c_DEPENDENCIES.
1870 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1871 kern/rescue_reader.c and kern/rescue_parser.c.
1872 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1873 (grub_emu_SOURCES): Change source files.
1874 (pkglib_MODULES): Remove normal.mod.
1875 (normal_SOURCES): Removed.
1876 (normal_mod_CFLAGS): Likewise.
1877 (normal_mod_LDFLAGS): Likewise.
1878 * conf/i386-coreboot.rmk: Likewise.
1879 * conf/i386-efi.rmk: Likewise.
1880 * conf/i386-ieee1276.rmk: Likewise.
1881 * conf/powerpc-ieee1275.rmk: Likewise.
1882 * conf/sparc64-ieee1275.rmk: Likewise.
1883 * conf/x86_64-efi.rmk: Likewise.
1885 * include/grub/command.h (grub_command_execute): New inline function.
1887 * include/grub/menu.h (grub_menu_entry): Removed commands field.
1889 * include/grub/normal.h: Remove <grub/setjmp.h>.
1890 (grub_fs_module_list): Moved to normal/autofs.c.
1891 (grub_exit_env): Removed.
1892 (grub_command_execute): Likewise.
1893 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1895 (read_command_list): New function declaration.
1896 (read_fs_list): Likewise.
1898 * include/parser.h: Include <grub/reader.h>.
1899 (grub_parser_split_cmdline): Change type of getline parameter.
1900 (grub_parser): New structure.
1901 (grub_parser_class): New variable.
1902 (grub_parser_execute): New function declaration.
1903 (grub_register_rescue_parser): Likewise.
1904 (grub_parser_register): New inline function.
1905 (grub_parser_unregister): Likewise.
1906 (grub_parser_get_current): Likewise.
1907 (grub_parser_set_current): Likewise.
1909 * include/grub/reader.h: New file.
1910 * kern/reader.c: Likewise.
1911 * kern/rescue_parser.c: Likewise.
1912 * kern/rescue_reader.c: Likewise.
1913 * normal/autofs.c: Likewise.
1914 * normal/dyncmd.c: Likewise.
1916 * include/grub/rescue.h: Removed.
1917 * normal/command.h: Likewise.
1919 * include/grub/script.h: Moved to ...
1920 * include/grub/script_sh.h: ... Moved here.
1921 * normal/execute.c: Moved to ...
1922 * script/sh/execute.c: ... Moved here.
1923 * normal/function.c: Moved to ...
1924 * script/sh/function.c: ... Moved here.
1925 * normal/lexer.c: Moved to ...
1926 * script/sh/lexer.c: ... Moved here.
1927 * normal/parser.y: Moved to ...
1928 * script/sh/parser.y: ... Moved here.
1929 * normal/script.c: Moved to ...
1930 * script/sh/script.c: ... Moved here.
1932 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1934 (grub_exit_env): Removed.
1935 (fs_module_list): Moved to normal/autofs.c.
1936 (grub_file_getline): Don't handle comment here.
1937 (free_menu): Skip removed field entry->commands.
1938 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1940 (read_config_file): Removed nested parameter, change getline function.
1941 (grub_enter_normal_mode): Removed.
1942 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1943 (read_command_list): Likewise.
1944 (autoload_fs_module): Moved to normal/autofs.c.
1945 (read_fs_list): Likewise.
1946 (reader_nested): New variable.
1947 (grub_normal_execute): Run parser.sh to switch to sh parser.
1948 (grub_cmd_rescue): Removed.
1949 (cmd_normal): Removed.
1950 (grub_cmd_normal): Unregister itself at the beginning. Don't register
1952 (grub_cmdline_run): New function.
1953 (grub_normal_reader_init): Likewise.
1954 (grub_normal_read_line): Likewise.
1955 (grub_env_write_pager): Likewise.
1956 (cmdline): New variable.
1957 (grub_normal_reader): Likewise.
1958 (GRUB_MOD_INIT): Register normal reader and set as current, register
1959 pager hook, register normal command with grub_register_command_prio,
1960 so that it won't show up in command.lst.
1961 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1962 grub_fs_autoload_hook.
1964 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1965 (grub_menu_execute_entry): Replace grub_script_execute with
1966 grub_parser_execute, change parameter to grub_command_execute.
1968 * normal/menu_text.c: Remove <grub/script.h>.
1970 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1971 and <grub/parser.h>.
1972 (run): Change editor_getline to use new parser interface. Change
1973 parameter to grub_command_execute.
1975 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1976 <grub/reader.h> and <grub/parser.h>.
1977 (grub_load_normal_mode): Execute normal command.
1978 (grub_main): Call grub_register_core_commands,
1979 grub_register_rescue_parser and grub_register_rescue_reader, use
1980 grub_reader_loop to enter input loop.
1982 * kern/parser.c (grub_parser_split_cmdline): Change type of
1984 (grub_parser_class): New variable.
1985 (grub_parser_execute): New function.
1987 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1988 * loader/multiboot2.c: Likewise.
1989 * loader/sparc64/ieee1275/linux.c: Likewise.
1991 * util/grub-emu.c (read_command_list): New dummy function.
1993 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
1995 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1996 count to 16 for CCISS and IDA.
1998 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
2000 * normal/menu_text.c (grub_wait_after_message): Print a newline
2001 after waiting for user input.
2003 * loader/i386/linux.c: Include `<grub/normal.h>'.
2004 (grub_cmd_linux): Improve the error message about `ask' mode, by
2005 waiting for user input so it's not missed (we can do this, since
2006 user requested interaction).
2008 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2010 Added missing lst to grub-mkrescue
2012 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2013 and ${input_dir}/parttool.lst
2015 2009-04-30 David S. Miller <davem@davemloft.net>
2017 * util/hostdisk.c (device_is_wholedisk): New function.
2018 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2019 zero only if device_is_wholedisk() returns true.
2021 * util/hostdisk.c (convert_system_partition_to_system_disk):
2022 Handle virtual disk devices named /dev/vdiskX as found on sparc
2025 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2026 lettered partition specifier is found, convert to numbered.
2028 2009-04-29 David S. Miller <davem@davemloft.net>
2030 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2031 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2033 * normal/command.c: Add missing newline at end of file.
2035 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2037 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2038 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2039 grub_ofdisk_read): Likewise, and deal similarly with the fact that
2040 ihandles have a 32-bit type but need to be stored in a "void *".
2042 2009-04-28 Pavel Roskin <proski@gnu.org>
2044 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2045 not disk. Adjust all dependencies.
2046 (grub_fs_uuid_close): Use grub_device_close(), not
2049 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2050 parent's partition, don't copy it by reference, as it gets freed
2053 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2055 Preboot hooks support
2057 * commands/boot.c (struct grub_preboot_t): new declaration
2058 (preboots_head): new variable
2059 (preboots_tail): likewise
2060 (grub_loader_register_preboot_hook): new function
2061 (grub_loader_unregister_preboot_hook): likewise
2062 (grub_loader_set): launch preboot hooks
2063 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2064 (grub_loader_register_preboot_hook): new declaration
2065 (grub_loader_unregister_preboot_hook): likewise
2067 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
2071 * disk/scsi.c (grub_scsi_open): added missing cast when
2072 calling grub_dprintf
2074 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
2076 Bug and warning fixes
2078 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2080 * commands/test.c (test_parse): fixed bug with file tests and corrected
2081 declaration of find_file
2083 2009-04-26 Pavel Roskin <proski@gnu.org>
2085 * Makefile.in: Don't install empty manual pages if help2man is
2086 missing. Use help2man option for output, not shell redirection.
2088 2009-04-26 David S. Miller <davem@davemloft.net>
2090 * util/grub-mkdevicemap.c (make_device_map): Add missing
2091 NESTED_FUNC_ATTR to process_device().
2093 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2097 * commands/test.c: rewritten to use bash-like test
2099 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
2101 Parttool autoloading and improvements
2103 * Makefile.in (pkglib_DATA): add parttool.lst
2104 (parttool.lst): new target
2105 * genmk.rb: generate parttool-*
2106 (CLEANFILES): add #{parttool}
2107 (PARTTOOLFILES): new variable
2108 * genparttoollist.sh: new file
2109 * parttool/pcpart.c (grub_pcpart_boot): more feedback
2110 (grub_pcpart_type): likewise
2111 * commands/parttool.c (helpmsg): new variable
2112 (grub_cmd_parttool): output help if not enough arguments are supplied
2114 (GRUB_MOD_INIT(parttool)): use helpmsg
2116 2009-04-24 David S. Miller <davem@davemloft.net>
2118 Avoiding opening same device multiple times in device iterator.
2120 * kern/device.c: (grub_device_iterate): Define struct part_ent,
2121 and use it to build a list of partitions in iterate_disk() and
2122 iterate_partition().
2124 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2127 * disk/ieee1275/nand.c (grub_nand_iterate): Return
2128 grub_devalias_iterate() result instead of unconditional 0.
2129 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2130 Also, capture hook return value, either directly or via
2131 grub_children_iterate(), and propagate to caller.
2132 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2133 grub_children_iterate): Return value is now 'int' instead of
2135 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2136 like a proper iterator, stopping when hooks return non-zero.
2137 (grub_devalias_iterate): Likewise.
2139 2009-04-23 David S. Miller <davem@davemloft.net>
2141 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2143 2009-04-22 David S. Miller <davem@davemloft.net>
2145 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2146 is larger than address_cells, use that value for address_cells too.
2148 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2149 IEEE1275_MAX_PATH_LEN): Define.
2150 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2151 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2152 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2153 'devtype'. Explicitly NULL terminate devalias expansion.
2155 * util/sparc64/ieee1275/misc.c: New file.
2156 * util/sparc64/ieee1275/grub-setup.c: New file.
2157 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2158 * util/sparc64/ieee1275/grub-mkimage.c: New file.
2159 * util/sparc64/ieee1275/grub-install.in: New file.
2160 * util/ieee1275/ofpath.c: New file.
2161 * util/ieee1275/devicemap.c: New file.
2162 * util/devicemap.c: New file.
2163 * util/deviceiter.c: New file.
2164 * kern/sparc64/ieee1275/init.c: New file.
2165 * include/grub/util/ofpath.h: New file.
2166 * include/grub/util/deviceiter.h: New file.
2167 * util/grub-mkdevicemap.c: Include deviceiter.h.
2168 Implement using grub_util_emit_devicemap_entry and
2169 grub_util_iterate_devices.
2170 * conf/i386-corebook.rmk: Build util/deviceiter.c and
2171 util/devicemap.c into grub-mkdevicemap
2172 * conf/i386-efi.rmk: Likewise.
2173 * conf/i386-ieee1275.rmk: Likewise.
2174 * conf/i386-pc.rmk: Likewise.
2175 * conf/powerpc-ieee1275.rmk: Likewise.
2176 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2177 images and installation utilities. Build kernel as image
2178 instead of as elf binary. Use common rules as much as possible.
2180 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
2182 Correct GPT definition
2184 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2187 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
2189 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2191 2009-04-19 David S. Miller <davem@davemloft.net>
2193 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2194 (grub_rescue_cmd_linux): Rename to...
2195 (grub_cmd_linux): and fix prototype.
2196 (grub_rescue_cmd_initrd): Rename to...
2197 (grub_cmd_initrd): and fix prototype.
2198 (cmd_linux, cmd_initrd): New.
2199 (GRUB_MOD_INIT(linux)): Use grub_register_command().
2200 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2202 2009-04-17 Pavel Roskin <proski@gnu.org>
2204 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2206 (grub_ohci_transfer): Likewise.
2208 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2210 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2211 return without a value. Fix inconsistent indentation.
2213 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2214 match struct grub_fs.
2216 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2217 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2218 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2219 * commands/lspci.c (grub_lspci_iter): Likewise.
2221 2009-04-16 Bean <bean123ch@gmail.com>
2223 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2226 2009-04-15 Pavel Roskin <proski@gnu.org>
2228 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2229 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
2230 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2233 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2235 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2236 that no multiple data or metadata areas are supported and `Unknown
2239 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2241 Move loader out of the kernel
2243 * kern/loader.c: moved to ...
2244 * commands/boot.c: ... moved here
2245 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2246 * commands/boot.c (grub_cmd_boot): moved here. All users updated
2247 * include/grub/kernel.h (grub_machine_fini): export
2248 * include/grub/loader.h (grub_loader_is_loaded): update declaration
2249 (grub_loader_set): likewise
2250 (grub_loader_unset): likewise
2251 (grub_loader_boot): likewise
2252 * conf/common.rmk: new module boot.mod
2253 (pkglib_MODULES): add boot.mod
2254 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2255 (grub_emu_SOURCES): likewise
2256 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2257 (grub_emu_SOURCES): likewise
2258 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2259 (grub_emu_SOURCES): likewise
2260 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2261 (grub_emu_SOURCES): likewise
2262 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2263 (grub_emu_SOURCES): likewise
2264 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2265 (grub_emu_SOURCES): likewise
2266 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2267 (grub_emu_SOURCES): likewise
2269 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2271 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2273 * kern/misc.c (grub_itoa): Removed function
2274 (grub_ltoa): likewise
2275 (grub_vsprintf): use grub_lltoa
2277 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
2281 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2282 * conf/i386-coreboot.rmk: likewise
2283 * conf/i386-ieee1275.rmk: likewise
2284 * conf/powerpc-ieee1275.rmk: likewise
2286 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
2288 * INSTALL: Add that `./autogen.sh' needs to be run before
2291 2009-04-14 Bean <bean123ch@gmail.com>
2293 * Makefile.in (pkglib_DATA): Add handler.lst.
2294 (handler.lst): New rule.
2296 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2297 * conf/i386-coreboot.rmk: Likewise.
2298 * conf/i386-ieee1275.rmk: Likewise.
2299 * conf/i386-efi.rmk: Likewise.
2300 * conf/x86_64-efi.rmk: Likewise.
2301 * conf/powerpc-ieee1275.rmk: Likewise.
2302 * conf/sparc64-ieee1275.rmk: Likewise.
2304 * genhandlerlist.sh: New file.
2306 * genmk.rb: Add rules to generate handler.lst.
2308 * include/grub/normal.h (grub_file_getline): New function definition.
2309 (read_handler_list): Likewise.
2310 (free_handler_list): Likewise.
2312 * include/grub/term.h (grub_term_register_input): Add name parameter
2313 for auto generation of handler.lst.
2314 (grub_term_register_output): Likewise.
2316 * normal/handler.c: New file.
2318 * normal/main.c (get_line): Renamed to grub_file_getline.
2319 (read_config_file): Use the newly renamed grub_file_getline.
2320 (read_command_list): Likewise.
2321 (read_fs_list): Likewise.
2322 (grub_normal_execute): Call read_handler_list to parse handler.lst.
2323 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2325 * term/efi/console.c (grub_console_init): Add name parameter for auto
2326 generation of handler.lst.
2327 * term/gfxterm.c: Likewise.
2328 * term/i386/pc/at_keyboard.c: Likewise.
2329 * term/i386/pc/console.c: Likewise.
2330 * term/i386/pc/serial.c: Likewise.
2331 * term/i386/pc/vesafb.c: Likewise.
2332 * term/i386/pc/vga.c: Likewise.
2333 * term/i386/pc/vga_text.c: Likewise.
2334 * term/ieee1275/ofconsole.c: Likewise.
2335 * term/usb_keyboard.c: Likewise.
2337 2009-04-14 Bean <bean123ch@gmail.com>
2339 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2340 properly with null character.
2342 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2344 * configure: Remove.
2345 * config.h.in: Likewise.
2346 * stamp-h.in: Likewise.
2347 * DISTLIST: Likewise.
2348 * conf/common.mk: Likewise.
2349 * conf/i386-coreboot.mk: Likewise.
2350 * conf/i386-efi.mk: Likewise.
2351 * conf/i386-ieee1275.mk: Likewise.
2352 * conf/i386.mk: Likewise.
2353 * conf/i386-pc.mk: Likewise.
2354 * conf/powerpc-ieee1275.mk: Likewise.
2355 * conf/sparc64-ieee1275.mk: Likewise.
2356 * conf/x86_64-efi.mk: Likewise.
2358 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2361 2009-04-14 John Stanley <jpsinthemix@verizon.net>
2362 David S. Miller <davem@davemloft.net>
2364 * util/hostdisk.c (make_device_name): Fix buffer length
2367 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
2369 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2370 <sys/param.h> and <sys/sysctl.h>.
2371 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2372 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2373 opening the device and reset them afterwards.
2375 2009-04-13 Pavel Roskin <proski@gnu.org>
2377 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2378 Reported by John Stanley <jpsinthemix@verizon.net>
2380 2009-04-13 Robert Millan <rmh@aybabtu.com>
2382 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2383 that name for menuentries when appropriate.
2385 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2387 * util/grub.d/10_freebsd.in: Add a missing `fi'.
2389 2009-04-13 Robert Millan <rmh@aybabtu.com>
2391 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2392 to Linux, simply abort telling the user it's no longer supported.
2394 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2396 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2397 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
2398 `freebsd_loadenv' only when devices.hints exist.
2400 2009-04-13 Pavel Roskin <proski@gnu.org>
2402 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2404 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
2406 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2408 (grub_drive): Likewise.
2410 2009-04-13 David S. Miller <davem@davemloft.net>
2412 * kern/sparc64/ieee1275/ieee1275.c: New file.
2413 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2414 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2415 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2416 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2417 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2418 grub_ieee1275_alloc_physmem): Declare new exported functions.
2420 * include/grub/sparc64/ieee1275/loader.h: New file.
2421 * include/grub/sparc64/ieee1275/memory.h: Likewise.
2422 * include/grub/sparc64/kernel.h: Likewise.
2423 * loader/sparc64/ieee1275/linux.c: Likewise.
2425 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2426 (grub_fstest_SOURCES): Likewise.
2428 * util/hostdisk.c (make_device_name): Do not make any assumptions
2429 about the length of drive names.
2431 * kern/dl.c (grub_dl_load_file): Close file immediately when
2432 we are done using it.
2434 2009-04-12 David S. Miller <davem@davemloft.net>
2436 * kern/misc.c (grub_ltoa): Fix cast when handling negative
2437 values. Noticed by Pavel Roskin.
2439 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2442 * genmk.rb: Add more flexible image type specification, also
2443 pass --strip-unneeded to objcopy.
2444 * conf/i386-pc.rmk: Use *_FORMAT.
2445 * conf/i386-pc.mk: Rebuilt.
2447 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2448 (OFDISK_HASH_SZ): Define.
2449 (ofdisk_hash): New hash table.
2450 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2451 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2452 instead of device phandle which is not unique.
2454 * kern/sparc64/ieee1275/init.c: Delete, replace with...
2455 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2456 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2457 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2458 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2459 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2460 GRUB_KERNEL_MACHINE_DATA_END): Define.
2461 (grub_kernel_image_size, grub_total_module_size): Declare.
2463 2009-04-12 Pavel Roskin <proski@gnu.org>
2465 * configure.ac: Change the logic when we check for target tools.
2466 Do it when the target is specified and it's different from the
2467 specified value of the host.
2469 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
2471 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2472 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2473 GNU/kFreeBSD. Check if a device is a character device. Use
2474 DIOCGMEDIASIZE to get the size.
2475 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2476 support for GNU/kFreeBSD.
2477 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2478 is a character device instead of a block device. Add support for
2479 FreeBSD device names.
2481 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2482 is a character device instead of a block device.
2484 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2485 is a character device instead of a block device.
2487 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
2489 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2490 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2491 FreeBSD. Check if a device is a character device. Use
2492 DIOCGMEDIASIZE to get the size.
2493 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2494 support for FreeBSD.
2495 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2496 is a character device instead of a block device. Add support for
2497 FreeBSD device names.
2499 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2500 a character device instead of a block device.
2501 (grub_util_check_char_device): New function.
2503 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2504 a character device instead of a block device.
2506 * include/grub/util/getroot.h (grub_util_check_char_device): New
2509 2009-04-11 David S. Miller <davem@davemloft.net>
2511 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2513 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2514 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2515 function, if present.
2516 (__bswapdi2): Likewise.
2518 * include/grub/sparc64/ieee1275/boot.h: New file.
2519 * boot/sparc64/ieee1275/boot.S: Likewise.
2520 * boot/sparc64/ieee1275/diskboot.S: Likewise.
2522 * kern/misc.c (grub_ltoa): New function.
2523 (grub_vsprintf): Use it to format 'long' integers.
2525 2009-04-10 David S. Miller <davem@davemloft.net>
2527 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2528 slots are of type grub_ieee1275_cell_t.
2529 (grub_nand_read): Likewise.
2530 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2531 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2532 macros are used to compare values in arg/ret block of the call.
2533 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2534 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2535 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2536 grub_ieee1275_instance_to_path, grub_ieee1275_write,
2537 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2538 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2539 grub_ieee1275_close, grub_ieee1275_set_property,
2540 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2541 grub_ieee1275_cell_t.
2542 * kern/ieee1275/openfw.c (grub_map): Likewise.
2543 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2544 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2546 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2547 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2548 (grub_devalias_iterate): Likewise.
2550 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
2554 * fs/ufs.c (INODE_NBLOCKS): new definition
2555 (struct grub_ufs_dirent): added fields for non-BSD dirents
2556 (grub_ufs_get_file_block): fixed double indirect handling
2557 (grub_ufs_lookup_symlink): use more robust way to determine whether
2559 (grub_ufs_find_file): support for non-BSD dirents
2560 (grub_ufs_dir): support for non-BSD dirents
2562 2009-04-10 Bean <bean123ch@gnail.com>
2564 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2565 attribute, otherwise the size would be wrong for i386 platform.
2567 * include/grub/pci.h (grub_pci_read_word): New inline function.
2568 (grub_pci_read_byte): Likewise.
2569 (grub_pci_write): Likewise.
2570 (grub_pci_write_word): Likewise.
2571 (grub_pci_write_byte): Likewise.
2573 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2575 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2576 (find_framebuf): Scan pci to locate the frame buffer address.
2578 * commands/efi/fixvideo.c: New file.
2580 * commands/efi/loadbios.c: Likewise.
2582 * commands/memrw.c: Likewise.
2584 * util/grub-dumpbios.in: Likewise.
2586 * conf/common.rmk (grub-dumpbios): New utility.
2587 (pkglib_MODULES): New module memrw.mod.
2588 (memrw_mod_SOURCE): New macro.
2589 (memrw_mod_CFLAGS): Likewise.
2590 (memrw_mod_LDFLAGS): Likewise.
2592 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2594 (loadbios_mod_SOURCE): New macro.
2595 (loadbios_mod_CFLAGS): Likewise.
2596 (loadbios_mod_LDFLAGS): Likewise.
2597 (fixvideo_mod_SOURCE): Likewise.
2598 (fixvideo_mod_CFLAGS): Likewise.
2599 (fixvideo_mod_LDFLAGS): Likewise.
2601 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2603 (loadbios_mod_SOURCE): New macro.
2604 (loadbios_mod_CFLAGS): Likewise.
2605 (loadbios_mod_LDFLAGS): Likewise.
2606 (fixvideo_mod_SOURCE): Likewise.
2607 (fixvideo_mod_CFLAGS): Likewise.
2608 (fixvideo_mod_LDFLAGS): Likewise.
2610 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
2612 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2614 2009-04-07 David S. Miller <davem@davemloft.net>
2616 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2617 support for R_SPARC_OLO10 relocations. Fix compile warning for
2618 R_SPARC_WDISP30 case.
2619 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2621 2009-04-06 Pavel Roskin <proski@gnu.org>
2623 * include/grub/misc.h (ARRAY_SIZE): New macro.
2624 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2626 * loader/i386/linux.c (allocate_pages): Use free_pages().
2627 (grub_linux_unload): Don't use free_pages().
2628 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2629 wrong index. Treat all other modes as text modes.
2630 (grub_cmd_linux): Initialize vid_mode unconditionally to
2631 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
2633 * commands/help.c (print_command_help): Use cmd->prio, not
2634 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2636 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
2640 * parttool/pcpart.c: new file
2641 * commands/parttool.c: likewise
2642 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2643 (parttool_mod_SOURCES): new variable
2644 (parttool_mod_CFLAGS): likewise
2645 (parttool_mod_LDFLAGS): likewise
2646 (pcpart_mod_SOURCES): likewise
2647 (pcpart_mod_CFLAGS): likewise
2648 (pcpart_mod_LDFLAGS): likewise
2649 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2650 and parttool/pcpart.c
2651 * conf/i386-efi.rmk: likewise
2652 * conf/i386-ieee1275.rmk: likewise
2653 * conf/i386-pc.rmk: likewise
2654 * conf/powerpc-ieee1275.rmk: likewise
2655 * conf/sparc64-ieee1275.rmk: likewise
2656 * conf/x86_64-ieee1275.rmk: likewise
2658 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2660 Support for mtime and further expandability of dir command
2662 * include/grub/lib/datetime.h: moved to ...
2663 * include/grub/datetime.h: ... moved here and added
2664 declaration of grub_unixtime2datetime. All users updated
2665 * include/grub/fs.h: new syntax for dir and mtime functions in
2667 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2668 and GRUB_FSHELP_FLAGS_MASK
2669 * commands/ls.c (grub_ls_list_files): Write mtime in long format
2670 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2671 (grub_ext2_mtime): new function
2672 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2673 (grub_hfsplus_mtime): new function
2674 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2675 (GRUB_UFS_ATTR_FILE): likewise
2676 (GRUB_UFS_ATTR_LNK): likewise
2677 (struct grub_ufs_sblock): new fields mtime
2678 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2680 (grub_ufs_dir): mtime support
2681 (grub_ufs_mtime): new function
2682 * fs/affs.c (grub_affs_dir): use new dir syntax
2683 * fs/afs.c (grub_afs_dir): likewise
2684 * fs/cpio.c (grub_cpio_dir): likewise
2685 * fs/fat.c (grub_fat_find_dir): likewise
2686 * fs/hfs.c (grub_hfs_dir): likewise
2687 * fs/iso9660.c (grub_iso9660_dir): likewise
2688 * fs/jfs.c (grub_jfs_dir): likewise
2689 * fs/minix.c (grub_minix_dir): likewise
2690 * fs/ntfs.c (grub_ntfs_dir): likewise
2691 * fs/reiserfs.c (grub_reiserfs_dir): likewise
2692 * fs/sfs.c (grub_sfs_dir): likewise
2693 * fs/xfs.c (grub_xfs_dir): likewise
2694 * util/hostfs.c (grub_hostfs_dir): likewise
2695 * lib/datetime.c: moved to ...
2696 * normal/datetime.c: ... moved here
2697 (grub_unixtime2datetime): new function
2698 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2699 * normal/completion.c (iterate_dir): use new dir syntax
2700 * normal/misc.c (grub_normal_print_device_info): tell the
2701 last modification time of a volume
2702 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2703 * conf/common.rmk: added lib/datetime.c to ls.mod
2704 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2705 (normal_mod_SOURCES): likewise
2706 (datetime_mod_SOURCES): Removed lib/datetime.c
2707 * conf/i386-efi.rmk: likewise
2708 * conf/i386-ieee1275.rmk: likewise
2709 * conf/i386-pc.rmk: likewise
2710 * conf/powerpc-ieee1275.rmk: likewise
2711 * conf/sparc64-ieee1275.rmk: likewise
2712 * conf/x86_64-efi.rmk: likewise
2714 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
2716 Trim trailing spaces in FAT label and support mtools-like labels
2718 * fs/fat.c (grub_fat_iterate_dir): New function based
2719 on grub_fat_find_dir
2720 (grub_fat_find_dir): use grub_fat_iterate_dir
2721 (grub_fat_label): likewise
2723 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
2725 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2727 remove extraneous kernel_elf_HEADERS
2729 2009-04-04 Bean <bean123ch@gnail.com>
2731 * include/grub/util/misc.h: Add dummy function fsync for mingw.
2733 * util/misc.c: Likewise.
2735 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2737 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2738 instead of grub_printf.
2740 2009-04-03 Robert Millan <rmh@aybabtu.com>
2742 * loader/i386/linux.c (grub_linux_setup_video): Fill
2743 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2744 values from `mode info' structure instead of hardcoded
2747 2009-04-01 Pavel Roskin <proski@gnu.org>
2749 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2751 * genmk.rb: Likewise.
2752 * configure.ac: Likewise.
2754 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
2756 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2757 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
2759 2009-04-01 David S. Miller <davem@davemloft.net>
2761 * normal/sparc64/setjmp.S: Fix setjmp implementation.
2762 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2763 (grub_setjmp): Mark with 'returns_twice' attribute.
2764 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2765 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2766 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2768 2009-04-01 Robert Millan <rmh@aybabtu.com>
2770 Reapply fix from 2008-07-28 which was accidentally reverted; also
2771 perform the same fix to a similar check in same function.
2773 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2774 with the same number are found, just use issue a warning with
2775 grub_dprintf(), as this error has been reported to be non-fatal.
2777 2009-03-31 Pavel Roskin <proski@gnu.org>
2779 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2780 for cross-compilation.
2782 2009-03-30 Robert Millan <rmh@aybabtu.com>
2784 Fix i386-ieee1275 build.
2786 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2789 2009-03-30 Pavel Roskin <proski@gnu.org>
2791 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2792 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
2793 zero-terminated, rely only on the strlen value. Fix comparison
2794 of strings differing in length.
2796 2009-03-30 Robert Millan <rmh@aybabtu.com>
2798 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2799 checking for abi version. Improve error messages on BIOS to notify
2800 user about `linux16' command.
2802 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
2806 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2807 in case of collision
2808 * disk/scsi.c (grub_scsi_open): free scsi in case of error
2810 2009-03-29 Robert Millan <rmh@aybabtu.com>
2812 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2813 set `vid_mode' accordingly.
2814 (grub_linux_boot): Process `vid_mode' and set video mode.
2816 2009-03-29 Robert Millan <rmh@aybabtu.com>
2818 * util/grub.d/10_linux.in (linux_entry): New function.
2819 Factorize generation of Linux boot entries.
2821 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
2823 Make the format of Environment Block plain text. The boot loader
2824 part is not tested well yet.
2826 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2829 (usage): Remove "info" and "clear". Add "unset". Update the
2830 description of "set", as this does not delete variables any
2832 (create_envblk_file): Complete rewrite.
2833 (open_envblk_file): Likewise.
2834 (cmd_info): Removed.
2835 (cmd_list): Likewise.
2836 (cmd_set): Likewise.
2837 (cmd_clear): Likewise.
2838 (list_variables): New function.
2839 (write_envblk): Likewise.
2840 (set_variables): Likewise.
2841 (unset_variables): Likewise.
2842 (main): Complete rewrite.
2844 * commands/loadenv.c (buffer): Removed.
2846 (open_envblk_file): New function.
2847 (read_envblk_file): Complete rewrite.
2848 (grub_cmd_load_env): Likewise.
2849 (grub_cmd_list_env): Likewise.
2850 (struct blocklist): New struct.
2851 (free_blocklists): New function.
2852 (check_blocklists): Likewise.
2853 (write_blocklists): Likewise.
2854 (grub_cmd_save_env): Complete rewrite.
2856 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2857 a plain text signature.
2858 (GRUB_ENVBLK_MAXLEN): Removed.
2859 (struct grub_envblk): Complete rewrite.
2860 (grub_envblk_find): Removed.
2861 (grub_envblk_insert): Likewise.
2862 (grub_envblk_open): New prototype.
2863 (grub_envblk_set): Likewise.
2864 (grub_envblk_delete): Put const to VALUE.
2865 (grub_envblk_iterate): Put const to NAME and VALUE.
2866 (grub_envblk_close): New prototype.
2867 (grub_envblk_buffer): New inline function.
2868 (grub_envblk_size): Likewise.
2870 * lib/envblk.c: Include grub/mm.h.
2871 (grub_env_find): Removed.
2872 (grub_envblk_open): New function.
2873 (grub_envblk_close): Likewise.
2874 (escaped_value_len): Likewise.
2875 (find_next_line): Likewise.
2876 (grub_envblk_insert): Removed.
2877 (grub_envblk_set): New function.
2878 (grub_envblk_delete): Complete rewrite.
2879 (grub_envblk_iterate): Likewise.
2881 2009-03-28 Robert Millan <rmh@aybabtu.com>
2883 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2884 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2885 variables. Use 16-bit loader.
2886 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2888 * kern/i386/loader.S (grub_linux_boot): Rename to ...
2889 (grub_linux16_boot): ... this. Update all users.
2890 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2891 (grub_linux_boot): ... this. Update all users.
2893 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2894 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
2895 commands to `linux16' and `initrd16'.
2896 (GRUB_MOD_FINI(linux)): Rename to ...
2897 (GRUB_MOD_FINI(linux16)): ... this.
2899 2009-03-24 Pavel Roskin <proski@gnu.org>
2901 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2902 not just for compilation.
2904 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
2906 Move multiboot helper out of kernel
2908 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2909 `loader/i386/multiboot_helper.S'.
2910 * conf/i386-coreboot.rmk: Likewise
2911 * conf/i386-ieee1275.rmk: Likewise
2913 * kern/i386/loader.S: Move multiboot helpers from here...
2914 * loader/i386/multiboot_helper.S: ...moved here
2915 * include/grub/i386/loader.h: Move declarations of multiboot
2916 helpers from here...
2917 * include/grub/i386/multiboot.h: ...moved here
2918 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2920 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2922 * kern/env.c (grub_env_context_open): Added an argument to specify
2923 whether a new context inherits exported variables from current
2924 one. This is useful when making a sandbox to interpret a config
2926 All callers updated.
2928 * include/grub/env.h (grub_env_context_open): Updated the prototype.
2930 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2932 * kern/env.c (grub_env_context_close): Fix memory leaks.
2934 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
2936 * normal/main.c (grub_normal_execute): Added an argument
2937 BATCH to specify if an interactive interface should be provided
2938 after reading a config file.
2939 All callers updated.
2940 (read_command_list): Prevent being executed twice.
2941 (read_fs_list): Likewise.
2943 * include/grub/normal.h (grub_normal_execute): Updated the
2946 2009-03-22 Pavel Roskin <proski@gno.org>
2948 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2950 * kern/i386/pc/startup.S: Likewise.
2951 * kern/i386/efi/startup.S: Likewise.
2952 * kern/i386/ieee1275/startup.S: Likewise.
2953 * kern/i386/coreboot/startup.S: Likewise.
2954 * kern/x86_64/efi/startup.S: Likewise.
2956 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2957 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2958 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2960 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
2962 Bugfixes in multiboot for bugs uncovered by solaris kernel.
2964 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2966 Use vaddr of correct segment for entry_point.
2968 2009-03-21 Bean <bean123ch@gmail.com>
2970 * commands/blocklist.c: Add include file <grub/command.h>, remove
2971 <grub/normal.h> and <grub/arg.h>.
2972 (grub_cmd_blocklist): Use the new command interface.
2973 (GRUB_MOD_INIT): Likewise.
2974 (GRUB_MOD_FINI): Likewise.
2975 * commands/boot.c: Likewise.
2976 * commands/cat.c: Likewise.
2977 * commands/cmp.c: Likewise.
2978 * commands/configfile.c: Likewise.
2979 * commands/crc.c: Likewise.
2980 * commands/echo.c: Likewise.
2981 * commands/halt.c: Likewise.
2982 * commands/handler.c: Likewise.
2983 * commands/hdparm.c: Likewise.
2984 * commands/help.c: Likewise.
2985 * commands/hexdump.c: Likewise.
2986 * commands/loadenv.c: Likewise.
2987 * commands/ls.c: Likewise.
2988 * commands/lsmmap.c: Likewise.
2989 * commands/lspci.c: Likewise.
2990 * commands/loadenv.c: Likewise.
2991 * commands/read.c: Likewise.
2992 * commands/reboot.c: Likewise.
2993 * commands/search.c: Likewise.
2994 * commands/sleep.c: Likewise.
2995 * commands/test.c: Likewise.
2996 * commands/usbtest.c: Likewise.
2997 * commands/videotest.c: Likewise.
2998 * commands/i386/cpuid.c: Likewise.
2999 * commands/i386/pc/halt.c: Likewise.
3000 * commands/i386/pc/play.c: Likewise.
3001 * commands/i386/pc/pxecmd.c: Likewise.
3002 * commands/i386/pc/vbeinfo.c: Likewise.
3003 * commands/i386/pc/vbetest.c: Likewise.
3004 * commands/ieee1275/suspend.c: Likewise.
3005 * disk/loopback.c: Likewise.
3006 * font/font_cmd.c: Likewise.
3007 * hello/hello.c: Likewise.
3008 * loader/efi/appleloader.c: Likewise.
3009 * loader/efi/chainloader.c: Likewise.
3010 * loader/i386/bsd.c: Likewise.
3011 * loader/i386/efi/linux.c: Likewise.
3012 * loader/i386/ieee1275/linux.c: Likewise.
3013 * loader/i386/linux.c: Likewise.
3014 * loader/i386/pc/chainloader.c: Likewise.
3015 * loader/i386/pc/linux.c: Likewise.
3016 * loader/powerpc/ieee1275/linux.c: Likewise.
3017 * loader/multiboot_loader.c: Likewise.
3018 * term/gfxterm.c: Likewise.
3019 * term/i386/pc/serial.c: Likewise.
3020 * term/terminfo.c: Likewise.
3022 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3023 * term/i386/pc/vga.c: Likewise.
3024 * video/readers/jpeg.c: Likewise.
3025 * video/readers/png.c: Likewise.
3026 * video/readers/tga.c: Likewise.
3028 * util/grub-fstest (cmd_loopback): Removed.
3029 (cmd_blocklist): Likewise.
3031 (grub_register_command): Likewise.
3032 (grub_unregister_command): Likewise.
3033 (execute_command): Use grub_command_find to locate command and execute
3036 * include/grub/efi/chainloader.h: Removed.
3037 * loader/efi/chainloader_normal.c: Likewise.
3038 * loader/i386/bsd_normal.c: Likewise.
3039 * loader/i386/pc/chainloader_normal.c: Likewise.
3040 * loader/i386/pc/multiboot_normal.c: Likewise.
3041 * loader/linux_normal.c: Likewise.
3042 * loader/multiboot_loader_normal.c: Likewise.
3043 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3045 * gencmdlist.sh: Scan new registration command grub_register_extcmd
3046 and grub_register_command_p1.
3048 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3049 kern/command.c, lib/arg.c and commands/extcmd.c.
3050 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3051 (minicmd_mod_SOURCES): New variable.
3052 (minicmd_mod_CFLAGS): Likewise.
3053 (minicmd_mod_LDFLAGS): Likewise.
3054 (extcmd_mod_SOURCES): Likewise.
3055 (extcmd_mod_CFLAGS): Likewise.
3056 (extcmd_mod_LDFLAGS): Likewise.
3057 (boot_mod_SOURCES): Removed.
3058 (boot_mod_CFLAGS): Likewise.
3059 (boot_mod_LDFLAGS): Likewise.
3061 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3063 (kernel_img_HEADERS): Add command.h.
3064 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3065 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3067 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3068 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3069 remove the corresponding normal mode command.
3070 (normal_mod_SOURCES): Remove normal/arg.c.
3071 * conf/i386-coreboot.rmk: Likewise.
3072 * conf/i386-efi.rmk: Likewise.
3073 * conf/i386-ieee1275.rmk: Likewise.
3074 * conf/powerpc-ieee1275.rmk: Likewise.
3075 * conf/x86_64-efi.rmk: Likewise.
3077 * include/grub/arg.h: Move from here ...
3078 * include/grub/lib/arg.h: ... to here.
3080 * normal/arg.c: Move from here ...
3081 * lib/arg.c: ... to here.
3083 * commands/extcmd.c: New file.
3084 * commands/minicmd.c: Likewise.
3085 * include/grub/command.h: Likewise.
3086 * include/grub/extcmd.h: Likewise.
3087 * kern/command.c: Likewise.
3088 * kern/corecmd.c: Likewise.
3090 * kern/list.c (grub_list_iterate): Return int instead of void.
3091 (grub_list_insert): New function.
3092 (grub_prio_list_insert): Likewise.
3094 * kern/rescue.c (grub_rescue_command): Removed.
3095 (grub_rescue_command_list): Likewise.
3096 (grub_rescue_register_command): Likewise.
3097 (grub_rescue_unregister_command): Likewise.
3098 (grub_rescue_cmd_boot): Move to minicmd.c
3099 (grub_rescue_cmd_help): Likewise.
3100 (grub_rescue_cmd_info): Likewise.
3101 (grub_rescue_cmd_boot): Likewise.
3102 (grub_rescue_cmd_testload): Likewise.
3103 (grub_rescue_cmd_dump): Likewise.
3104 (grub_rescue_cmd_rmmod): Likewise.
3105 (grub_rescue_cmd_lsmod): Likewise.
3106 (grub_rescue_cmd_exit): Likewise.
3107 (grub_rescue_print_devices): Moved to corecmd.c.
3108 (grub_rescue_print_files): Likewise.
3109 (grub_rescue_cmd_ls): Likewise.
3110 (grub_rescue_cmd_insmod): Likewise.
3111 (grub_rescue_cmd_set): Likewise.
3112 (grub_rescue_cmd_unset): Likewise.
3113 (attempt_normal_mode): Use grub_command_find to get normal module.
3114 (grub_enter_rescue_mode): Use grub_register_core_commands to register
3115 commands, remove grub_rescue_register_command calls.
3117 * normal/command.c (grub_register_command): Removed.
3118 (grub_unregister_command): Likewise.
3119 (grub_command_find): Likewise.
3120 (grub_iterate_commands): Likewise.
3121 (rescue_command): Likewise.
3122 (export_command): Moved to corecmd.c.
3123 (set_command): Removed.
3124 (unset_command): Likewise.
3125 (insmod_command): Likewise.
3126 (rmmod_command): Likewise.
3127 (lsmod_command): Likewise.
3128 (grub_command_init): Likewise.
3130 * normal/completion.c (iterate_command): Use cmd->prio to check for
3132 (complete_arguments): Use grub_extcmd_t structure to find options.
3133 (grub_normal_do_completion): Change function grub_iterate_commands to
3134 grub_command_iterate.
3136 * normal/execute.c (grub_script_execute_cmd): No need to parse
3139 * normal/main.c (grub_dyncmd_dispatcher): New function.
3140 (read_command_list): Register unload commands as dyncmd.
3141 (grub_cmd_normal): Use new command interface, register rescue,
3142 unregister normal at entry, register normal, unregister rescue at exit.
3144 * include/grub/list.h (grub_list_test_t): New type.
3145 (grub_list_iterate): Return int instead of void.
3146 (grub_list_insert): New function.
3147 (GRUB_AS_NAMED_LIST_P): New macro.
3148 (GRUB_AS_PRIO_LIST): Likewise.
3149 (GRUB_AS_PRIO_LIST_P): Likewise.
3150 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3151 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3152 (grub_prio_list): New structure.
3153 (grub_prio_list_insert): New function.
3154 (grub_prio_list_remove): New inline function.
3156 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3157 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3158 (GRUB_COMMAND_FLAG_MENU): Likewise.
3159 (GRUB_COMMAND_FLAG_BOTH): Likewise.
3160 (GRUB_COMMAND_FLAG_TITLE): Likewise.
3161 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3162 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3163 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3164 (grub_command): Likewise.
3165 (grub_register_command): Likewise.
3166 (grub_command_find): Likewise.
3167 (grub_iterate_commands): Likewise.
3168 (grub_command_init): Likewise.
3169 (grub_arg_parse): Likewise.
3170 (grub_arg_show_help): Likewise.
3172 * include/grub/rescue.h (grub_rescue_register_command): Removed.
3173 (grub_rescue_unregister_command): Likewise.
3175 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3176 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3177 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3179 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3180 grub_rescue_cmd_initrd.
3181 * include/grub/i386/loader.h: Likewise.
3182 * include/grub/x86_64/loader.h: Likewise.
3184 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3186 2009-03-21 Bean <bean123ch@gmail.com>
3188 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3189 instead of stat in mingw environment.
3191 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3193 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3195 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3198 2009-03-21 Bean <bean123ch@gmail.com>
3200 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3203 2009-03-18 Michel Dänzer <michel@daenzer.net>
3205 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3206 checking inode flags for EXT4_EXTENTS_FLAG.
3208 2009-03-18 Robert Millan <rmh@aybabtu.com>
3210 * loader/i386/linux.c: Include `<grub/video.h>' and
3211 `<grub/i386/pc/vbe.h>'..
3212 (grub_linux_setup_video): New function. Loosely based on the EFI one.
3213 (grub_linux32_boot): Attempt to configure video settings with
3214 grub_linux_setup_video().
3215 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3216 to avoid grub_console_fini() which would step out of graphical mode
3219 2009-03-14 Robert Millan <rmh@aybabtu.com>
3221 Fix build on powerpc.
3222 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3224 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
3226 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3227 background image command.
3229 2009-03-12 Colin D Bennett <colin@gibibit.com>
3231 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3232 (grub_gfxterm_putchar): Extract pairs of identical calls to
3233 draw_cursor out of conditional blocks.
3235 2009-03-11 Pavel Roskin <proski@gnu.org>
3237 * fs/hfs.c (grub_hfs_strncasecmp): New function.
3238 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3240 2009-03-11 Robert Millan <rmh@aybabtu.com>
3242 * loader/i386/multiboot_elfxx.c
3243 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3245 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
3247 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3250 2009-03-11 Robert Millan <rmh@aybabtu.com>
3252 * loader/i386/multiboot.c (code_size): New variable.
3253 (grub_multiboot): Define offsets by adding to `code_size' rather
3254 than subtracting from `grub_multiboot_payload_size'. Provide
3255 4-byte alignment to MBI and others by increasing
3256 `boot_loader_name_length' appropriately.
3258 * loader/i386/multiboot_elfxx.c
3259 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3261 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
3263 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3266 2009-03-08 Robert Millan <rmh@aybabtu.com>
3268 Make loader/i386/linux.c usable on i386-pc again.
3270 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3272 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3275 2009-03-07 Bean <bean123ch@gmail.com>
3277 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3280 2009-03-06 Robert Millan <rmh@aybabtu.com>
3282 Fix display issue on terminals with screen size other than 80x25
3283 (e.g. gfxterm with resolution higher than 640x480).
3285 * normal/main.c (grub_normal_init_page): Display title text in a
3286 position relative to the center of the terminal instead of relying
3287 on a hardcoded offset.
3289 2009-03-04 Robert Millan <rmh@aybabtu.com>
3291 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3294 * Makefile.in (host_kernel): New variable.
3295 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3296 scripts instead of just the windows one.
3297 * configure.ac: Initialize and AC_SUBST `host_kernel'.
3299 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3301 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3303 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3304 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3305 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3306 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3307 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3308 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3310 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3312 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3313 or if there's no space for the disk label and print the partition number on a
3316 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
3318 * util/misc.c: Include <time.h>.
3319 (grub_millisleep): New function.
3321 2009-03-04 Bean <bean123ch@gmail.com>
3323 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3324 another option -mno-red-zone.
3326 * commands/handler.c: Change module description.
3328 * kern/handler.c: Add missing space at the end of description line.
3330 * kern/list.c: Likewise.
3332 2009-03-03 Robert Millan <rmh@aybabtu.com>
3334 Move more components to the relocation area, and fix mbi pointer
3335 handling to use the destination rather than the origin (thanks to
3336 Vladimir Serbinenko for spotting).
3338 * loader/i386/multiboot.c (mbi_dest): New variable.
3339 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3340 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3343 2009-03-01 Bean <bean123ch@gmail.com>
3345 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3346 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3347 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3348 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3350 * loader/i386/efi/linux.c (acpi_guid): New variable.
3351 (acpi_guid): Likewise.
3352 (EBDA_SEG_ADDR): New constant.
3353 (LOW_MEM_ADDR): Likewise.
3354 (FAKE_EBDA_SEG): Likewise.
3355 (fake_bios_data): New function.
3356 (grub_linux_boot): Call fake_bios_data.
3358 2009-03-01 Bean <bean123ch@gmail.com>
3360 * commands/terminal.c: Removed.
3362 * commands/handler.c: New file.
3364 * include/grub/list.h: Likewise.
3366 * include/grub/handler.h: Likewise.
3368 * kern/list.c: Likewise.
3370 * kern/handler.c: Likewise.
3372 * kern/term.h: Include header file <grub/handler.h>.
3373 (grub_term_input): Move next field to the beginning.
3374 (grub_term_output): Likewise.
3375 (grub_term_input_class): New variable.
3376 (grub_term_output_class): Likewise.
3377 (grub_term_register_input): Changed to inline function.
3378 (grub_term_register_output): Likewise.
3379 (grub_term_unregister_input): Likewise.
3380 (grub_term_unregister_output): Likewise.
3381 (grub_term_set_current_input): Likewise.
3382 (grub_term_set_current_output): Likewise.
3383 (grub_term_get_current_input): Likewise.
3384 (grub_term_get_current_output): Likewise.
3385 (grub_term_iterate_input): Removed.
3386 (grub_term_iterate_output): Likewise.
3388 * kern/term.c (grub_term_list_input): Removed.
3389 (grub_term_list_output): Likewise.
3390 (grub_term_input_class): New variable.
3391 (grub_term_output_class): Likewise.
3392 (grub_cur_term_input): Change variable as macro.
3393 (grub_cur_term_output): Likewise.
3394 (grub_term_register_input): Removed.
3395 (grub_term_register_output): Likewise.
3396 (grub_term_unregister_input): Likewise.
3397 (grub_term_unregister_output): Likewise.
3398 (grub_term_set_current_input): Likewise.
3399 (grub_term_set_current_output): Likewise.
3400 (grub_term_iterate_input): Likewise.
3401 (grub_term_iterate_output): Likewise.
3402 (grub_term_get_current_input): Likewise.
3403 (grub_term_get_current_output): Likewise.
3405 * util/grub-editenv.c: Include header file <grub/handler.h>.
3406 (grub_term_get_current_input): Removed.
3407 (grub_term_get_current_output): Likewise.
3408 (grub_term_input_class): New variable.
3409 (grub_term_output_class): Likewise.
3411 * util/grub-fstest.c (grub_term_get_current_input): Removed.
3412 (grub_term_get_current_output): Likewise.
3413 (grub_term_input_class): New variable.
3414 (grub_term_output_class): Likewise.
3416 * util/grub-probe.c (grub_term_get_current_input): Removed.
3417 (grub_term_get_current_output): Likewise.
3418 (grub_term_input_class): New variable.
3419 (grub_term_output_class): Likewise.
3421 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3422 (grub_term_get_current_output): Likewise.
3423 (grub_term_input_class): New variable.
3424 (grub_term_output_class): Likewise.
3426 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3427 (terminal_mod_SOURCES): Likewise.
3428 (terminal_mod_CFLAGS): Likewise.
3429 (terminal_mod_LDFLAGS): Likewise.
3431 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3433 (kernel_img_SOURCES): Add list.c and handler.c.
3434 (kernel_img_HEADERS): Add list.h and handler.h.
3436 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3438 (kernel_mod_SOURCES): Add list.c and handler.c.
3439 (kernel_mod_HEADERS): Add list.h and handler.h.
3441 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3443 (kernel_elf_SOURCES): Add list.c and handler.c.
3444 (kernel_elf_HEADERS): Add list.h and handler.h.
3446 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3448 (kernel_elf_SOURCES): Add list.c and handler.c.
3449 (kernel_elf_HEADERS): Add list.h and handler.h.
3451 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3453 (kernel_mod_SOURCES): Add list.c and handler.c.
3454 (kernel_mod_HEADERS): Add list.h and handler.h.
3456 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3458 (kernel_elf_SOURCES): Add list.c and handler.c.
3459 (kernel_elf_HEADERS): Add list.h and handler.h.
3461 2009-02-27 Robert Millan <rmh@aybabtu.com>
3463 Factorize elf32 / elf64 code in Multiboot loader. This will
3464 prevent it from getting out of sync again.
3466 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3467 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3468 grub_multiboot_load_elf64): Move from here ...
3469 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3470 grub_multiboot_load_elf): ... to here (new file).
3472 2009-02-27 Robert Millan <rmh@aybabtu.com>
3474 * util/grub.d/10_linux.in: Rename "single-user mode" to
3477 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3479 Don't leak in SCSI code.
3480 * disk/scsi.c (grub_scsi_close): free `scsi'.
3482 2009-02-27 Robert Millan <rmh@aybabtu.com>
3484 * loader/i386/pc/multiboot.c: Move from here ...
3485 * loader/i386/multiboot.c: ... to here. Update all users.
3487 2009-02-27 Robert Millan <rmh@aybabtu.com>
3489 Patch from Alexandre Bique <bique.alexandre@gmail.com>
3490 * util/i386/pc/grub-setup.c (setup): Fix directory path.
3492 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
3494 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3497 2009-02-27 Robert Millan <rmh@aybabtu.com>
3499 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3500 `0x' qualifier as 0 when base is specified as parameter).
3502 2009-02-24 Bean <bean123ch@gmail.com>
3504 * configure.ac: Check for -mcmodel=large in x86_64 target.
3506 * include/grub/efi/api.h (efi_call_10): New macro.
3507 (efi_wrap_10): New function.
3509 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3510 (GRUB_PE32_REL_BASED_HIGH): Likewise.
3511 (GRUB_PE32_REL_BASED_LOW): Likewise.
3512 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3513 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3514 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3515 (GRUB_PE32_REL_BASED_SECTION): Likewise.
3516 (GRUB_PE32_REL_BASED_REL): Likewise.
3517 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3518 (GRUB_PE32_REL_BASED_DIR64): Likewise.
3519 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3521 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3524 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3525 (efi_wrap_10): New function.
3527 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3529 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3530 MB/MBP model (NV chipset).
3531 (devdata_devs): Add devpath_5 to the list.
3533 * load/i386/efi/linux.c (video_base): Remove variable.
3534 (RGB_MASK): New macro.
3535 (RGB_MAGIC): Likewise.
3536 (LINE_MIN): Likewise.
3537 (LINE_MAX): Likewise.
3538 (FBTEST_STEP): Likewise.
3539 (FBTEST_COUNT): Likewise.
3540 (fb_list): New variable.
3541 (grub_find_video_card): Remove function.
3542 (find_framebuf): New function.
3543 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3546 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3549 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
3551 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3553 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3556 2009-02-22 Robert Millan <rmh@aybabtu.com>
3558 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3559 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3560 in our relocation, instead of using it directly from heap. Also
3561 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3563 2009-02-21 Robert Millan <rmh@aybabtu.com>
3565 Implement USB keyboard support (based on patch by Marco Gerards)
3567 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3568 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3569 (usb_keyboard_mod_LDFLAGS): New variables.
3571 * term/usb_keyboard.c: New file.
3573 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
3575 Corrected wrong declaration
3577 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3579 2009-02-14 Christian Franke <franke@computer.org>
3581 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3582 (grub_lspci_iter): Print class code and programming interface byte.
3584 2009-02-14 Christian Franke <franke@computer.org>
3586 * gendistlist.sh: Ignore `.svn' directories.
3588 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
3590 * fs/fat.c: Add 2009 to Copyright line.
3592 2009-02-14 Christian Franke <franke@computer.org>
3594 * commands/hdparm.c: New file. Provides `hdparm' command
3595 which sends ATA commands via grub_disk_ata_pass_through ().
3597 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3599 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
3600 and <grub/cpu/io.h> to include/grub/ata.h.
3601 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3602 (GRUB_CDROM_SECTOR_SIZE): Remove.
3603 (GRUB_ATA_*): Move to include/grub/ata.h.
3604 (GRUB_ATAPI_*): Likewise.
3605 (enum grub_ata_commands): Likewise.
3606 (enum grub_ata_timeout_milliseconds): Likewise.
3607 (struct grub_ata_device): Likewise.
3608 (grub_ata_regset): Likewise.
3609 (grub_ata_regget): Likewise.
3610 (grub_ata_regset2): Likewise.
3611 (grub_ata_regget2): Likewise.
3612 (grub_ata_check_ready): Likewise.
3613 (grub_ata_wait_not_busy): Remove static, exported in
3615 (grub_ata_wait_drq): Likewise.
3616 (grub_ata_pio_read): Likewise.
3618 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
3619 function for hdparm.mod.
3621 * include/grub/ata.h: New file, contains declarations from
3623 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3625 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3626 (grub_disk_ata_pass_through): New exported variable.
3628 * kern/disk.c (grub_disk_ata_pass_through): New variable.
3630 2009-02-13 Colin D Bennett <colin@gibibit.com>
3632 Support multiple fallback entries, and provide an API to support
3633 executing default+fallback menu entries. Renamed the `terminal' menu
3636 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3637 variable declaration.
3638 (grub_menu_execute_callback): New structure declaration.
3639 (grub_menu_execute_callback_t): New typedef.
3640 (grub_menu_execute_with_fallback): New function declaration.
3641 (grub_menu_get_entry): Likewise.
3642 (grub_menu_get_timeout): Likewise.
3643 (grub_menu_set_timeout): Likewise.
3645 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3647 * normal/menu.c (grub_wait_after_message): Moved to
3648 `normal/menu_text.c'.
3649 (draw_border): Likewise.
3650 (print_message): Likewise.
3651 (print_entry): Likewise.
3652 (print_entries): Likewise.
3653 (grub_menu_init_page): Likewise.
3654 (get_entry_number): Likewise.
3655 (print_timeout): Likewise.
3656 (run_menu): Likewise.
3657 (grub_menu_execute_entry): Likewise.
3658 (show_text_menu): Likewise.
3659 (get_and_remove_first_entry_number): New function.
3660 (grub_menu_execute_with_fallback): Likewise.
3661 (get_entry): Renamed to ...
3662 (grub_menu_get_entry): .. this and made it global.
3663 (get_timeout): Renamed to ...
3664 (grub_menu_get_timeout): ... this and made it global.
3665 (set_timeout): Renamed to ...
3666 (grub_menu_set_timeout): ... this and made it global.
3667 (grub_normal_terminal_menu_viewer): Renamed to ...
3668 (grub_normal_text_menu_viewer): ... this.
3670 * normal/menu_text.c: New file. Extracted text-menu-specific code
3673 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3674 (normal_mod_SOURCES): Likewise.
3676 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3677 (normal_mod_SOURCES): Likewise.
3679 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3680 (normal_mod_SOURCES): Likewise.
3682 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3683 (normal_mod_SOURCES): Likewise.
3685 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3686 (normal_mod_SOURCES): Likewise.
3688 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3689 (normal_mod_SOURCES): Likewise.
3691 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3692 (normal_mod_SOURCES): Likewise.
3694 2009-02-11 Robert Millan <rmh@aybabtu.com>
3696 * util/grub.d/00_header.in: Update old reference to `font' command.
3698 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
3700 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3702 Based on patch from Javier MartÃn.
3704 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3706 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3707 to avoid false positives with FAT.
3708 (grub_fstest_SOURCES): Likewise.
3709 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3710 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3711 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3712 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3713 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3714 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3716 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
3718 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3719 bpb.version_specific.fat12_or_fat16.fstype and
3720 bpb.version_specific.fat32.fstype.
3722 2009-02-08 Robert Millan <rmh@aybabtu.com>
3724 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3726 2009-02-08 Robert Millan <rmh@aybabtu.com>
3728 * Makefile.in (host_os, host_cpu): New variables.
3729 (target_os): Remove. Update all users.
3731 2009-02-08 Marco Gerards <marco@gnu.org>
3733 * Makefile.in (enable_grub_emu_usb): New variable.
3734 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3735 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3736 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3737 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3738 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3739 `usbtest.mod' and `usbms.mod'.
3740 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3741 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3742 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3743 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3744 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3747 * disk/usbms.c: New file.
3749 * include/grub/usb.h: Likewise.
3751 * include/grub/usbtrans.h: Likewise.
3753 * include/grub/usbdesc.h: Likewise.
3755 * bus/usb/usbtrans.c: Likewise.
3757 * bus/usb/ohci.c: Likewise.
3759 * bus/usb/uhci.c: Likewise.
3761 * bus/usb/usbhub.c: Likewise.
3763 * bus/usb/usb.c: Likewise.
3765 * commands/usbtest.c: Likewise.
3767 * util/usb.c: Likewise.
3769 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3771 * configure.ac: Test for libusb presence.
3773 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3775 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
3777 * kern/mm.c: Add more comments.
3779 2009-02-08 Robert Millan <rmh@aybabtu.com>
3781 Patch from Javier MartÃn.
3782 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3783 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3785 2009-02-08 Robert Millan <rmh@aybabtu.com>
3787 * fs/cpio.c: Split tar functionality to ...
3788 * fs/tar.c: ... here (new file). Update all users.
3790 2009-02-07 Robert Millan <rmh@aybabtu.com>
3792 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3793 backward-incompatible features.
3795 Based on patch from Javier MartÃn, with some adjustments.
3797 2009-02-07 Michael Scherer <misc@mandriva.org>
3799 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3801 2009-02-07 Robert Millan <rmh@aybabtu.com>
3803 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3804 position of `disk/lvm.c' to ensure grub_init_all() always picks it
3805 after the RAID stuff.
3807 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
3809 Fixes problem when running vbetest command as reported by
3810 Vladimir Serbinenko <phcoder@gmail.com>.
3812 * (grub_vbe_set_video_mode): Fixed problem with text modes.
3814 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
3816 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3817 /dev/md/NpN style mdraid devices.
3819 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3821 * util/unifont2pff.rb: Remove.
3823 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3825 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3828 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
3830 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3831 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3832 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3833 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3834 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3835 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3836 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3838 2009-02-02 Christian Franke <franke@computer.org>
3840 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3842 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
3844 * INSTALL: Note that we now require at least autoconf 2.59 and
3845 that LZO is optional.
3847 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3849 Base on patch on bug #24154 created by Tomas Tintera
3852 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3854 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
3856 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3857 <bero@arklinux.org>.
3859 * normal/parser.y (script_init): Add missing semicolon.
3861 2009-01-31 Colin D Bennett <colin@gibibit.com>
3863 * normal/main.c: Add include to grub/menu_viewer.h.
3864 (free_menu_entry_classes): Added.
3865 (grub_normal_menu_addentry): Added class property handling.
3866 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3867 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3869 * normal/menu_viewer.c: New file.
3871 * normal/menu.c (run_menu_entry): Renamed to ...
3872 (grub_menu_execute_entry): ... this and made it as global.
3873 (grub_menu_run): Renamed to ...
3874 (show_text_menu): ... this and made it local.
3875 (show_text_menu): Adapt to new function names.
3876 (grub_normal_terminal_menu_viewer): New global variable.
3878 * include/grub/menu.h: New file.
3880 * include/grub/menu_viewer.h: New file.
3882 * include/grub/normal.h: Added include to grub/menu.h.
3883 (grub_menu_entry): Moved to include/grub/menu.h.
3884 (grub_menu_entry_t): Likewise.
3885 (grub_menu): Likewise.
3886 (grub_menu_t): Likewise.
3887 (grub_normal_terminal_menu_viewer): Added.
3888 (grub_menu_execute_entry): Likewise.
3889 (grub_menu_run): Removed.
3891 * DISTLIST: Added include/grub/menu.h.
3892 Added include/grub/menu_viewer.h.
3893 Added normal/menu_viewer.c.
3895 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
3897 * normal/execute.c (grub_script_execute_menuentry): Changed to use
3898 arglist for menutitle arguments.
3900 * normal/main.c (grub_normal_menu_addentry): Likewise.
3902 * normal/parser.y (menuentry): Likewise.
3904 * normal/script.c (grub_script_create_cmdmenu): Likewise.
3906 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3907 (grub_script_create_cmdmenu): Likewise.
3909 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3911 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3914 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3916 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3918 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3920 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3922 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3924 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3926 2009-01-30 Christian Franke <franke@computer.org>
3928 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3929 in option help text.
3931 2009-01-27 Pavel Roskin <proski@gnu.org>
3933 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3935 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3937 * commands/lsmmap.c: Add include to grub/machine/memory.h.
3939 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3941 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3942 unregister function.
3944 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
3946 * disk/scsi.c (grub_scsi_read): Fix sign problem.
3948 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3950 * util/grub-mkfont.c (usage): Fix typo.
3952 * util/elf/grub-mkimage.c (load_modules): Fix warning.
3954 2009-01-26 Daniel Mierswa <impulze@impulze.org>
3956 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3958 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3960 * kern/misc.c (grub_strcasecmp): New function.
3961 (grub_strcasecmp): Use grub_size_t instead of int for length.
3963 * include/grub/misc.h: Update function prototypes.
3965 2009-01-26 Robert Millan <rmh@aybabtu.com>
3967 * configure.ac: Fix cross-compilation check.
3969 2009-01-22 Christian Franke <franke@computer.org>
3971 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3972 (precision) digit string. Allow `.format2' without `format1' (width).
3973 Limit input chars for `%s' output to `format2' if specified. This is
3974 compatible with standard printf ().
3976 2009-01-22 Christian Franke <franke@computer.org>
3978 * disk/ata.c (grub_ata_wait_status): Replace by ...
3979 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
3980 other status bits may be invalid while BSY is asserted.
3981 (grub_ata_check_ready): New function.
3982 (grub_ata_cmd): Removed.
3983 (grub_ata_wait_drq): New function.
3984 (grub_ata_strncpy): Remove inline.
3985 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
3986 and error check now done by grub_ata_wait_drq ().
3987 (grub_ata_pio_write): Likewise.
3988 (grub_atapi_identify): Set DEV before check for !BSY. Use
3989 grub_ata_wait_drq () to wait for data.
3990 (grub_ata_device_initialize): Add status register check to
3991 detect missing SATA slave devices. Add debug messages.
3992 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3993 (grub_atapi_packet): Set DEV before check for !BSY. Replace
3994 transfer loop by grub_ata_pio_write ().
3995 (grub_ata_identify): Set DEV before check for !BSY. Use
3996 grub_ata_wait_drq () to wait for data.
3997 (grub_ata_setaddress): Set DEV before check for !BSY.
3998 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3999 read/write in one loop. Fix invalid command on write. Fix incomplete
4000 command on (size % batch) == 0. Add missing error check after write of
4001 last block. Add debug messages.
4002 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
4004 2009-01-19 Christian Franke <franke@computer.org>
4006 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4007 (GRUB_ATAPI_IREASON_*): Likewise.
4008 (grub_ata_pio_write): Fix timeout error return.
4009 (grub_atapi_identify): Add grub_ata_wait () after cmd.
4010 (grub_atapi_wait_drq): New function.
4011 (grub_atapi_packet): New parameter `size'.
4012 Use grub_atapi_wait_drq () and direct write instead of
4013 grub_ata_pio_write ().
4014 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4015 reads the number of bytes requested by the device for each DRQ
4017 (grub_atapi_write): Remove old implementation, return not
4018 implemented instead.
4020 2009-01-19 Christian Franke <franke@computer.org>
4022 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4023 of 512 to calculate data size.
4024 (grub_scsi_read12): Likewise.
4025 (grub_scsi_write10): Likewise.
4026 (grub_scsi_write12): Likewise.
4027 (grub_scsi_read): Adjust size according to blocksize.
4028 Add checks for invalid blocksize and unaligned transfer.
4030 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
4032 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4034 * term/gfxterm.c (write_char): Fix background rendering for wide
4037 2009-01-19 Robert Millan <rmh@aybabtu.com>
4039 * config.guess: Update to latest version from config git.
4040 * config.sub: Likewise.
4042 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
4044 * Makefile.in: Change font compilation to use new grub-mkfont instead
4047 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4048 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4049 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4050 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4051 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4052 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4053 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4054 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4055 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4057 2009-01-16 Christian Franke <franke@computer.org>
4059 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4060 (enum grub_ata_timeout_milliseconds): New enum.
4061 (grub_ata_wait_status): Add parameter milliseconds.
4062 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
4063 recovery from timed-out commands.
4064 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
4065 return grub_errno instead of REG_ERROR.
4066 (grub_ata_pio_write): Add parameter milliseconds.
4067 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4068 Pass milliseconds to grub_ata_wait_status () and
4069 grub_ata_pio_read ().
4070 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4071 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
4072 grub_ata_wait_status (). Fix IDENTIFY timeout check.
4073 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4074 It is not suitable for device detection, because DEV bit is ignored,
4075 the command may run too long, and not all devices set the signature
4077 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4078 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4079 Fix device selection, DEV bit must be set first to address the registers
4080 of the correct device.
4081 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4082 grub_ata_pio_read/write ().
4083 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4084 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4086 2009-01-13 Carles Pina i Estany <carles@pina.cat>
4088 * util/grub-editenv.c (main): Use fseeko(), not fseek().
4090 2009-01-13 Bean <bean123ch@gmail.com>
4092 * util/grub-mkfont.c (write_font): forget to remove some debug code.
4094 2009-01-13 Bean <bean123ch@gmail.com>
4096 * Makefile.in: (enable_grub_mkfont): New variable.
4097 (freetype_cflags): Likewise.
4098 (freetype_libs): Likewise.
4100 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4101 (grub_mkfont_SOURCES): New variable.
4102 (grub_mkfont_CFLAGS): Likewise.
4103 (grub_mkfont_LDFLAGS): Likewise.
4105 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4106 library if `--enable-grub-mkfont' is requested.
4107 (enable_grub_mkfont): New variable.
4108 (freetype_cflags): Likewise.
4109 (freetype_libs): Likewise.
4111 * util/grub-mkfont.c: New file.
4113 2009-01-12 Christian Franke <franke@computer.org>
4115 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4116 mode check. Fix setting of compat_use[].
4118 2009-01-10 Robert Millan <rmh@aybabtu.com>
4120 Update a few copyright years which we forgot to do in 2008 (only for
4121 files whose changes made in 2008 were copyright-significant)
4123 * Makefile.in: Add 2008 to Copyright line.
4124 * disk/ieee1275/ofdisk.c: Likewise.
4125 * disk/efi/efidisk.c: Likewise.
4126 * kern/dl.c: Likewise.
4127 * kern/sparc64/ieee1275/init.c: Likewise.
4128 * kern/mm.c: Likewise.
4129 * kern/efi/mm.c: Likewise.
4130 * boot/i386/pc/boot.S: Likewise.
4131 * genfslist.sh: Likewise.
4132 * fs/iso9660.c: Likewise.
4133 * fs/hfs.c: Likewise.
4134 * fs/jfs.c: Likewise.
4135 * fs/minix.c: Likewise.
4136 * fs/ufs.c: Likewise.
4137 * gensymlist.sh.in: Likewise.
4138 * genkernsyms.sh.in: Likewise.
4139 * include/grub/misc.h: Likewise.
4140 * include/grub/types.h: Likewise.
4141 * include/grub/symbol.h: Likewise.
4142 * include/grub/elf.h: Likewise.
4143 * include/grub/kernel.h: Likewise.
4144 * include/grub/disk.h: Likewise.
4145 * include/grub/dl.h: Likewise.
4146 * include/grub/i386/linux.h: Likewise.
4147 * include/grub/i386/pc/biosdisk.h: Likewise.
4148 * include/grub/efi/api.h: Likewise.
4149 * include/grub/efi/pe32.h: Likewise.
4150 * include/grub/util/misc.h: Likewise.
4151 * normal/execute.c: Likewise.
4152 * normal/arg.c: Likewise.
4153 * normal/completion.c: Likewise.
4154 * normal/lexer.c: Likewise.
4155 * normal/parser.y: Likewise.
4156 * normal/misc.c: Likewise.
4157 * commands/i386/pc/vbeinfo.c: Likewise.
4158 * commands/hexdump.c: Likewise.
4159 * commands/terminal.c: Likewise.
4160 * commands/ls.c: Likewise.
4161 * commands/help.c: Likewise.
4162 * partmap/pc.c: Likewise.
4163 * loader/efi/chainloader.c: Likewise.
4164 * loader/multiboot_loader.c: Likewise.
4165 * loader/i386/pc/multiboot2.c: Likewise.
4166 * term/efi/console.c: Likewise.
4167 * term/i386/pc/serial.c: Likewise.
4168 * util/lvm.c: Likewise.
4169 * util/console.c: Likewise.
4170 * util/i386/efi/grub-mkimage.c: Likewise.
4171 * util/raid.c: Likewise.
4173 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
4175 * commands/videotest.c: Removed include to grub/machine/memory.h.
4177 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4178 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4179 (video_mod_SOURCES): Removed.
4180 (video_mod_CFLAGS): Likewise.
4181 (video_mod_LDFLAGS): Likewise.
4182 (gfxterm_mod_SOURCES): Likewise.
4183 (gfxterm_mod_CFLAGS): Likewise.
4184 (gfxterm_mod_LDFLAGS): Likewise.
4185 (videotest_mod_SOURCES): Likewise.
4186 (videotest_mod_CFLAGS): Likewise.
4187 (videotest_mod_LDFLAGS): Likewise.
4188 (bitmap_mod_SOURCES): Likewise.
4189 (bitmap_mod_CFLAGS): Likewise.
4190 (bitmap_mod_LDFLAGS): Likewise.
4191 (tga_mod_SOURCES): Likewise.
4192 (tga_mod_CFLAGS): Likewise.
4193 (tga_mod_LDFLAGS): Likewise.
4194 (jpeg_mod_SOURCES): Likewise.
4195 (jpeg_mod_CFLAGS): Likewise.
4196 (jpeg_mod_LDFLAGS): Likewise.
4197 (png_mod_SOURCES): Likewise.
4198 (png_mod_CFLAGS): Likewise.
4199 (png_mod_LDFLAGS): Likewise.
4201 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4202 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4203 (video_mod_SOURCES): Added.
4204 (video_mod_CFLAGS): Likewise.
4205 (video_mod_LDFLAGS): Likewise.
4206 (videotest_mod_SOURCES): Likewise.
4207 (videotest_mod_CFLAGS): Likewise.
4208 (videotest_mod_LDFLAGS): Likewise.
4209 (bitmap_mod_SOURCES): Likewise.
4210 (bitmap_mod_CFLAGS): Likewise.
4211 (bitmap_mod_LDFLAGS): Likewise.
4212 (tga_mod_SOURCES): Likewise.
4213 (tga_mod_CFLAGS): Likewise.
4214 (tga_mod_LDFLAGS): Likewise.
4215 (jpeg_mod_SOURCES): Likewise.
4216 (jpeg_mod_CFLAGS): Likewise.
4217 (jpeg_mod_LDFLAGS): Likewise.
4218 (png_mod_SOURCES): Likewise.
4219 (png_mod_CFLAGS): Likewise.
4220 (png_mod_LDFLAGS): Likewise.
4221 (gfxterm_mod_SOURCES): Likewise.
4222 (gfxterm_mod_CFLAGS): Likewise.
4223 (gfxterm_mod_LDFLAGS): Likewise.
4225 * term/gfxterm.c: Removed include to grub/machine/memory.h,
4226 grub/machine/console.h.
4228 2009-01-04 Jerone Young <jerone@gmail.com>
4230 Make on screen instructions clearer
4232 Based on patch created by Jidanni <jidanni@jidanni.org>
4234 * normal/menu.c: print clearer instructions on the screen
4236 2009-01-02 Colin D Bennett <colin@gibibit.com>
4240 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4241 build system and fixed gfxterm.c to work with different sized fonts.
4243 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4245 * configure: Re-generated.
4247 * DISTLIST: Removed font/manager.c.
4249 Added font/font_cmd.c.
4251 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
4254 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
4256 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4258 * kern/term.c: Changed users of grub_utf8_to_ucs4.
4260 * normal/menu.c: Likewise.
4262 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4263 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4265 * include/grub/font.h: Replaced with new file.
4267 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4268 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4269 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4270 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4271 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4272 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4273 fg_red, fg_green, fg_blue, fg_alpha.
4274 (grub_video_adapter): Removed blit_glyph.
4275 (grub_video_blit_glyph): Removed.
4277 * font/manager.c: Removed file.
4279 * font/font.c: New file.
4281 * font/font_cmd.c: Likewise.
4283 * video/video.c (grub_video_blit_glyph): Removed.
4285 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4286 (grub_video_vbe_map_rgba): Likewise.
4287 (grub_video_vbe_unmap_color_int): Likewise.
4288 (grub_video_vbe_blit_glyph): Removed.
4289 (grub_video_vbe_adapter): Removed blit_glyph.
4291 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4292 (get_pixel): Likewise.
4293 (set_pixel): Likewise.
4295 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4297 * term/gfxterm.c: Adapted to new font engine.
4299 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
4301 * term/i386/pc/vga.c: Likewise.
4303 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4305 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4307 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4309 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4311 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4313 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4315 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4317 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4319 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4321 * util/grub.d/00_header.in: Changed to use new loadfont command.
4323 * util/grub-mkconfig_lib.in: Changed font extension.
4325 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
4327 * util/getroot.c (grub_util_get_grub_dev): Add support for
4328 /dev/md/dNNpNN style partitionable mdraid devices.
4330 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
4332 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4333 at a time limit of the PXE TFTP API correctly.
4334 (grub_pxefs_close): Likewise.
4336 2008-11-29 Robert Millan <rmh@aybabtu.com>
4338 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4339 grub_ata_device_initialize() calls.
4341 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
4343 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4345 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4347 2008-11-28 Robert Millan <rmh@aybabtu.com>
4349 Fix build on powerpc-ieee1275. Based on patch created by
4350 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4351 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4352 `kern/ieee1275/mmap.c'.
4353 * include/grub/powerpc/ieee1275/memory.h: New file.
4355 Provide grub-install on coreboot.
4356 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4357 (grub_install_SOURCES): New variable.
4358 * util/i386/pc/grub-install.in: Add a few condition checks to make it
4361 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
4363 * util/grub-fstest.c (grub_term_get_current_input): Change return type
4364 to `grub_term_input_t'.
4365 (grub_term_get_current_output): Change return type to
4366 `grub_term_output_t'.
4368 2008-11-22 Robert Millan <rmh@aybabtu.com>
4370 Fix breakage on coreboot due to declaration mismatch.
4371 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4372 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4373 grub_vga_text_cls().
4375 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4376 comments. Avoid copying one more byte than necessary (just in case).
4378 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4379 to 0x200000 (avoids trouble with some OFW implementations, and matches
4380 with the one in Yaboot).
4381 Reported by Manoel Abranches
4383 2008-11-20 Robert Millan <rmh@aybabtu.com>
4385 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4386 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4388 * util/grub-mkconfig_lib.in (grub_warn): New function.
4389 (convert_system_path_to_grub_path): Use grub_warn() when issuing
4390 warnings, to obtain consistent formatting.
4391 * util/grub.d/00_header.in: Likewise.
4392 * util/update-grub_lib.in: Likewise.
4394 * loader/i386/linux.c (allocate_pages): Fix a warning.
4395 Move comment text to `#error' stanza.
4397 Harmonize ieee1275's grub_available_iterate() with the generic
4398 grub_machine_mmap_iterate() interface (fixes a recently-introduced
4399 build problem on i386-ieee1275):
4400 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4401 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
4402 parameter `type'. Update all users of this function.
4403 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4404 `kern/ieee1275/mmap.c'.
4405 * kern/ieee1275/init.c
4406 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4408 (grub_machine_mmap_iterate): ... this.
4409 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4410 return type to `grub_err_t'. Update all implementations of this
4412 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4415 Add `lsmmap' command (lists firmware-provided memory map):
4416 * commands/lsmmap.c: New file.
4417 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4418 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4420 * conf/powerpc-ieee1275.rmk: Likewise.
4421 * conf/i386-coreboot.rmk: Likewise.
4422 * conf/i386-ieee1275.rmk: Likewise.
4424 2008-11-19 Robert Millan <rmh@aybabtu.com>
4426 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4427 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4428 constraints to initrd allocation (based on code from
4429 loader/i386/pc/linux.c). Without them, initrd was allocated too high
4430 for Linux to find it.
4432 2008-11-14 Robert Millan <rmh@aybabtu.com>
4434 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4435 order to cope with duplicate slashes.
4437 2008-11-14 Robert Millan <rmh@aybabtu.com>
4439 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4440 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
4441 don't want to mess with lower memory, because it is used in the Linux
4444 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4445 an appropriate place in lower memory, between 0x10000 and 0x90000,
4446 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
4447 is in our heap (probably as a result of it being corrupted during
4448 decompression). Add #error instance with comment to explain why this
4449 loader isn't currently usable on PC/BIOS.
4451 2008-11-14 Robert Millan <rmh@aybabtu.com>
4453 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4454 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4456 2008-11-12 Robert Millan <rmh@aybabtu.com>
4458 Make loader/i386/linux.c buildable on i386-pc (although disabled).
4460 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4461 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4463 * include/grub/i386/pc/memory.h: ... to here.
4465 2008-11-12 Robert Millan <rmh@aybabtu.com>
4467 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4470 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4471 (grub_console_cur_color, grub_console_real_putchar)
4472 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4473 (grub_console_setcolorstate, grub_console_setcolor)
4474 (grub_console_getcolor): Move from here ...
4475 * include/grub/i386/vga_common.h: ... to here (new file).
4477 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4478 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4480 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4481 `<grub/i386/vga_common.h>'.
4483 2008-11-12 Robert Millan <rmh@aybabtu.com>
4485 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4486 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4487 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4489 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4490 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4492 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4493 grub_console_init() with call to grub_vga_text_init().
4494 (grub_machine_fini): Replace call to
4495 grub_console_fini() with call to grub_vga_text_fini() and
4496 grub_at_keyboard_fini().
4498 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4499 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4500 (grub_console_setcolorstate, grub_console_setcolor)
4501 (grub_console_getcolor): New function prototypes.
4503 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4504 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4505 (grub_vga_text_setcursor): Static-ize.
4506 (grub_vga_text_term): New structure.
4507 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4509 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4510 (grub_console_cur_color, grub_console_standard_color)
4511 (grub_console_normal_color, grub_console_highlight_color)
4512 (map_char, grub_console_putchar, grub_console_getcharwidth)
4513 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4514 (grub_console_getcolor): Move from here ...
4515 * term/i386/vga_common.c: ... to here (same function names).
4517 2008-11-12 Robert Millan <rmh@aybabtu.com>
4519 Use newly-added Multiboot support in coreboot.
4521 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4522 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4524 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4525 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4526 (codestart): Store the MBI in `startup_multiboot_info' when we're
4527 being loaded using Multiboot.
4529 * kern/i386/coreboot/init.c (grub_machine_init): Move
4530 grub_at_keyboard_init() call to beginning of function (useful for
4531 debugging). Call grub_machine_mmap_init() before attempting to use
4532 grub_machine_mmap_iterate().
4533 (grub_lower_mem, grub_upper_mem): Move from here ...
4534 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4537 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4540 2008-11-12 Robert Millan <rmh@aybabtu.com>
4542 Fix a regression introduced by the at_keyboard.mod split. Because
4543 some terminals are default on some platforms and non-default on
4544 others, the first terminal being registered determines which is
4545 going to be default.
4547 * kern/term.c (grub_term_register_input): If this is the first
4548 terminal being registered, set it as the current one.
4549 (grub_term_register_output): Likewise.
4551 * term/efi/console.c (grub_console_init): Do not call
4552 grub_term_set_current_output() or grub_term_set_current_input().
4553 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4554 * term/i386/pc/console.c (grub_console_init): Likewise.
4555 (grub_console_fini): Do not call grub_term_set_current_input()
4556 (but leave grub_term_set_current_output() to restore text mode).
4558 2008-11-10 Robert Millan <rmh@aybabtu.com>
4560 * util/grub.d/00_header.in: Add backward compatibility check for
4561 versions of terminal.mod that don't understand `terminal_input' or
4564 2008-11-09 Robert Millan <rmh@aybabtu.com>
4566 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4567 `terminal_input' / `terminal_output', not `terminal'.
4569 2008-11-08 Robert Millan <rmh@aybabtu.com>
4571 * Makefile.in (include_DATA): Fix srcdir=. assumption.
4572 (DISTCLEANFILES): Add `build_env.mk'.
4574 2008-11-08 Robert Millan <rmh@aybabtu.com>
4576 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4577 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4578 members. Update all users.
4579 * util/console.c (grub_ncurses_term): Split in ...
4580 (grub_ncurses_term_input): ... this, and ...
4581 (grub_ncurses_term_output): ... this. Update all users.
4582 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4584 2008-11-08 Robert Millan <rmh@aybabtu.com>
4586 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4587 (PKGDATA): Add $(pkgdata_SRCDIR).
4588 (pkglib_BUILDDIR): New variable.
4589 (pkgdata_SRCDIR): New variable.
4590 (build_env.mk): New target.
4591 (include_DATA): New variable.
4592 (install-local): Install $(include_DATA) files in $(includedir).
4594 2008-11-07 Pavel Roskin <proski@gnu.org>
4596 * gendistlist.sh: Use C locale for sorting to ensure consistent
4597 output on all systems.
4599 * util/grub.d/00_header.in: Remove incorrect space before
4602 2008-11-07 Robert Millan <rmh@aybabtu.com>
4604 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4606 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4607 * loader/multiboot_loader.c (find_multi_boot2_header): New function
4608 (based on find_multi_boot1_header).
4609 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4610 using find_multi_boot2_header(), and abort if neither Multiboot or
4611 Multiboot headers were found.
4613 2008-11-07 Robert Millan <rmh@aybabtu.com>
4615 Modularize at_keyboard.mod:
4617 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4618 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4619 (at_keyboard_mod_LDFLAGS): New variables.
4621 Actual terminal split:
4623 * include/grub/term.h (struct grub_term): Split in ...
4624 (struct grub_term_input): ... this, and ...
4625 (struct grub_term_output): ... this. Update all users.
4626 (grub_term_set_current): Split in ...
4627 (grub_term_set_current_input): ... this, and ...
4628 (grub_term_set_current_output): ... this.
4629 (grub_term_get_current): Split in ...
4630 (grub_term_get_current_input): ... this, and ...
4631 (grub_term_get_current_output): ... this.
4632 (grub_term_register): Split in ...
4633 (grub_term_register_input): ... this, and ...
4634 (grub_term_register_output): ... this.
4635 (grub_term_unregister): Split in ...
4636 (grub_term_unregister_input): ... this, and ...
4637 (grub_term_unregister_output): ... this.
4638 (grub_term_iterate): Split in ...
4639 (grub_term_iterate_input): ... this, and ...
4640 (grub_term_iterate_output): ... this.
4642 * kern/term.c (grub_term_list): Split in ...
4643 (grub_term_list_input): ... this, and ...
4644 (grub_term_list_output): ... this. Update all users.
4645 (grub_cur_term): Split in ...
4646 (grub_cur_term_input): ... this, and ...
4647 (grub_cur_term_output): ... this. Update all users.
4648 (grub_term_set_current): Split in ...
4649 (grub_term_set_current_input): ... this, and ...
4650 (grub_term_set_current_output): ... this.
4651 (grub_term_get_current): Split in ...
4652 (grub_term_get_current_input): ... this, and ...
4653 (grub_term_get_current_output): ... this.
4654 (grub_term_register): Split in ...
4655 (grub_term_register_input): ... this, and ...
4656 (grub_term_register_output): ... this.
4657 (grub_term_unregister): Split in ...
4658 (grub_term_unregister_input): ... this, and ...
4659 (grub_term_unregister_output): ... this.
4660 (grub_term_iterate): Split in ...
4661 (grub_term_iterate_input): ... this, and ...
4662 (grub_term_iterate_output): ... this.
4664 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4665 a check for input and one for output (and only attempt to get keys
4666 from user when input works).
4668 * util/grub-probe.c (grub_term_get_current): Split in ...
4669 (grub_term_get_current_input): ... this, and ...
4670 (grub_term_get_current_output): ... this.
4671 * util/grub-fstest.c: Likewise.
4672 * util/i386/pc/grub-setup.c: Likewise.
4673 * util/grub-editenv.c: Likewise.
4675 Portability adjustments:
4677 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4678 `term/i386/pc/at_keyboard.c'.
4679 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4680 grub_keyboard_controller_init() (now handled by terminal .init).
4681 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4682 grub_at_keyboard_init().
4683 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4684 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4685 at_keyboard.mod via input terminal interface).
4686 * include/grub/i386/coreboot/console.h: Convert into a stub for
4687 `<grub/i386/pc/console.h>'.
4689 Migrate full terminals to new API:
4691 * term/efi/console.c (grub_console_term): Split into ...
4692 (grub_console_term_input): ... this, and ...
4693 (grub_console_term_output): ... this. Update all users.
4694 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4695 (grub_ofconsole_init): Split into ...
4696 (grub_ofconsole_init_input): ... this, and ...
4697 (grub_ofconsole_init_output): ... this.
4698 (grub_ofconsole_term): Split into ...
4699 (grub_ofconsole_term_input): ... this, and ...
4700 (grub_ofconsole_term_output): ... this. Update all users.
4701 * term/i386/pc/serial.c (grub_serial_term): Split into ...
4702 (grub_serial_term_input): ... this, and ...
4703 (grub_serial_term_output): ... this. Update all users.
4704 * term/i386/pc/console.c (grub_console_term): Split into ...
4705 (grub_console_term_input): ... this, and ...
4706 (grub_console_term_output): ... this. Update all users.
4707 (grub_console_term_input): Only enable it on PC/BIOS platform.
4708 (grub_console_init): Remove grub_keyboard_controller_init() call.
4710 Migrate input terminals to new API:
4712 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4713 `i386' and `i386/pc' to enable build on x86_64 (this driver is
4714 i386-specific anyway).
4715 (grub_console_checkkey): Rename to ...
4716 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
4718 (grub_keyboard_controller_orig): New variable.
4719 (grub_console_getkey): Rename to ...
4720 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
4722 (grub_keyboard_controller_init): Static-ize. Save original
4723 controller value so that it can be restored ...
4724 (grub_keyboard_controller_fini): ... here (new function).
4725 (grub_at_keyboard_term): New structure.
4726 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4729 Migrate output terminals to new API:
4731 * term/i386/pc/vga.c (grub_vga_term): Change type to
4732 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4733 members. Update all users.
4734 * term/gfxterm.c (grub_video_term): Change type to
4735 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
4736 members. Update all users.
4737 * include/grub/i386/pc/console.h (grub_console_checkkey)
4738 (grub_console_getkey): Do not export (no longer needed by gfxterm,
4741 Migrate `terminal' command and userland tools to new API:
4743 * commands/terminal.c (grub_cmd_terminal): Split into ...
4744 (grub_cmd_terminal_input): ... this, and ...
4745 (grub_cmd_terminal_output): ... this.
4746 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4747 `terminal_input' and `terminal_output'.
4748 * util/grub.d/00_header.in: Adjust `terminal' calls to new
4749 `terminal_input' / `terminal_output' API.
4750 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4751 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4752 provided ${GRUB_TERMINAL}, convert it).
4754 2008-11-04 Robert Millan <rmh@aybabtu.com>
4756 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
4758 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4760 2008-11-03 Bean <bean123ch@gmail.com>
4762 * kern/elf.c (grub_elf32_load): Revert to previous code.
4763 (grub_elf64_load): Likewise.
4765 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4767 2008-11-01 Robert Millan <rmh@aybabtu.com>
4769 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4770 (TARGET_CPPFLAGS): Likewise.
4771 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4773 2008-11-01 Carles Pina i Estany <carles@pina.cat>
4775 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4777 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4779 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4780 addition of objects until the code is not going to be able to fail.
4782 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
4784 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4785 (add a missing NULL check, and correct them by moving the pointer
4786 operations after the actual check).
4788 2008-10-29 Robert Millan <rmh@aybabtu.com>
4790 * util/i386/pc/grub-install.in: Handle empty string as output from
4791 make_system_path_relative_to_its_root().
4793 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
4795 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4796 circular metadata worst case scenario. If the metadata is circular
4797 then copy the wrap in place.
4798 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4799 project lib/format_text/layout.h
4800 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4802 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4804 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4806 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
4808 * util/update-grub_lib.in: Mention filename in warning message.
4810 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4812 * NEWS: Update for rename of update-grub to grub-mkconfig.
4814 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
4816 * util/update-grub_lib.in: Copy to ...
4817 * util/grub-mkconfig_lib.in: ... this. Update all users.
4818 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4819 * util/update-grub.in: Rename to ...
4820 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
4821 option. Add `--output' option to allow users to specify the generated
4822 configuration file. Default to stdout.
4823 (update_grub_dir): Rename to ...
4824 (grub_mkconfig_dir): ... this.
4825 (grub_cfg): Default to an empty string.
4826 * conf/common.rmk (update-grub): Rename to ...
4827 (grub-mkconfig): ... this.
4828 (update-grub_lib): Copy to ...
4829 (grub-mkconfig_lib): ... this.
4830 (update-grub_SCRIPTS): Copy to ...
4831 (grub-mkconfig_SCRIPTS): ... this. Update all users.
4832 (update-grub_DATA): Rename to ...
4833 (grub-mkconfig_DATA): ... this.
4835 2008-09-28 Robert Millan <rmh@aybabtu.com>
4837 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4838 to `modified'. Add the real `created' field.
4839 (grub_iso9660_uuid): Use `modified' rather than `created' for
4840 constructing the UUID.
4842 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
4844 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4845 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4847 2008-09-28 Bean <bean123ch@gmail.com>
4849 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4850 Thanks to Christian Franke for finding this bug.
4852 2008-09-25 Robert Millan <rmh@aybabtu.com>
4854 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4855 instances of grub_util_get_disk_name() (see previous commit).
4857 2008-09-25 Robert Millan <rmh@aybabtu.com>
4859 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4860 `util/i386/get_disk_name.c'.
4861 * conf/i386-efi.rmk: Likewise.
4862 * conf/x86_64-efi.rmk: Likewise.
4863 * conf/i386-coreboot.rmk: Likewise.
4864 * conf/i386-ieee1275.rmk: Likewise.
4865 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4866 `util/ieee1275/get_disk_name.c'.
4867 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4868 * util/ieee1275/get_disk_name.c: Remove file.
4869 * util/i386/get_disk_name.c: Remove file.
4870 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4871 "hd%d" for device.map entries, rather than using
4872 grub_util_get_disk_name().
4874 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4876 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4878 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4880 2008-09-24 Carles Pina i Estany <carles@pina.cat>
4882 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4884 (GRUB_TERM_PPAGE): Changed to 0x4900.
4886 2008-09-24 Robert Millan <rmh@aybabtu.com>
4888 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4889 macros (they were i386-pc specific).
4890 * include/grub/sparc64/ieee1275/console.h: Likewise.
4891 * include/grub/efi/console.h: Likewise.
4893 2008-09-22 Bean <bean123ch@gmail.com>
4895 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4896 resident and in attribute list.
4898 * include/grub/ntfs.h (BMP_LEN): Removed.
4900 2008-09-22 Bean <bean123ch@gmail.com>
4902 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4903 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4905 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4906 error occurs, as grub_disk_open will call grub_disk_close, which will
4907 call p->close (scsi).
4909 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4911 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4912 (AC_PREREQ): Bumped to 2.59.
4913 (AC_TRY_COMPILE): Replace obsolete macro with ...
4914 (AC_COMPILE_IFELSE): ... this.
4915 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4916 (AC_LINK_IFELSE): ... this.
4918 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
4920 * autogen.sh: Add a call to `gendistlist.sh'.
4922 2008-09-19 Christian Franke <franke@computer.org>
4924 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4925 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4926 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4927 Export __enable_execute_stack() to modules.
4928 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4931 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4933 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4936 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
4938 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4939 #include <grub/util/hostdisk.h>.
4941 2008-09-08 Robert Millan <rmh@aybabtu.com>
4943 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4944 segments when their filesz is zero (grub_file_read() interprets
4945 zero-size as "read until EOF", which results in memory corruption).
4946 Use `lowest_segment' rather than 0 for calculating the current
4947 segment load address.
4949 2008-09-08 Robert Millan <rmh@aybabtu.com>
4951 * util/hostdisk.c (open_device): Replace a grub_util_info() call
4952 with grub_dprintf("hostdisk", ...), as it was so verbose that it
4953 clobbered useful information.
4955 2008-09-08 Robert Millan <rmh@aybabtu.com>
4957 * include/grub/util/biosdisk.h: Move to ...
4958 * include/grub/util/hostdisk.h: ... here. Update all users.
4959 * util/biosdisk.c: Move to ...
4960 * util/hostdisk.c: ... here. Update all users.
4962 2008-09-07 Robert Millan <rmh@aybabtu.com>
4964 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4966 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4967 and length can be stored directly in the `mbi->mmap_addr' and
4968 `mbi->mmap_length' struct fields.
4970 2008-09-07 Robert Millan <rmh@aybabtu.com>
4972 * conf/i386.rmk: New file. Provides declaration for building
4974 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4975 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4977 Include `conf/i386.mk'.
4978 * conf/i386-efi.rmk: Likewise.
4979 * conf/x86_64-efi.rmk: Likewise.
4980 * conf/i386-coreboot.rmk: Likewise.
4981 * conf/i386-ieee1275.rmk: Likewise.
4983 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
4985 Based on patch created by Colin D Bennett <colin@gibibit.com>.
4986 Adds optimization support for BGR based modes.
4988 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4989 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4990 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4991 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4992 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4993 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4994 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4995 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4996 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4997 (grub_video_i386_vbeblit_index_index): Likewise.
4998 (grub_video_i386_vbeblit_replace_directN): Added.
4999 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5000 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5001 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5002 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5003 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5004 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5005 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5006 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5007 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5008 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5009 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5010 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5011 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5013 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5014 (grub_video_i386_vbefill_R8G8B8): Likewise.
5015 (grub_video_i386_vbefill_index): Likewise.
5016 (grub_video_i386_vbefill_direct32): Added.
5017 (grub_video_i386_vbefill_direct24): Likewise.
5018 (grub_video_i386_vbefill_direct16): Likewise.
5019 (grub_video_i386_vbefill_direct8): Likewise.
5021 * include/grub/video.h (grub_video_blit_format): Removed
5022 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5023 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5024 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5025 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5026 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5028 * video/video.c (grub_video_get_blit_format): Updated to use new
5029 blit formats. Added handling for 16 bit color modes.
5031 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5033 (common_blitter): Updated to use new blitters.
5035 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5037 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5038 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5039 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5040 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5041 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5042 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5043 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5044 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5045 (grub_video_i386_vbeblit_index_index): Likewise.
5046 (grub_video_i386_vbeblit_replace_directN): Added.
5047 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5048 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5049 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5050 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5051 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5052 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5053 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5054 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5055 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5056 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5057 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5058 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5059 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5061 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5062 (grub_video_i386_vbefill_R8G8B8): Likewise.
5063 (grub_video_i386_vbefill_index): Likewise.
5064 (grub_video_i386_vbefill_direct32): Added.
5065 (grub_video_i386_vbefill_direct24): Likewise.
5066 (grub_video_i386_vbefill_direct16): Likewise.
5067 (grub_video_i386_vbefill_direct8): Likewise.
5069 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5072 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5075 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5078 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5081 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5083 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5086 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
5088 * fs/iso9660.c (grub_iso9660_date): New structure.
5089 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5090 (grub_iso9660_uuid): New function.
5092 2008-09-05 Bean <bean123ch@gmail.com>
5094 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5096 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5097 insensitive bit for names in Win32 and Win32 & DOS namespace.
5099 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5101 * include/grub/types.h (LONG_MAX): Likewise.
5103 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5105 * util/getroot.c: Include <config.h>.
5106 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5107 add support for /dev/md/N devices and handle LVM double dash escaping.
5109 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
5111 * config.guess: Update to latest version from config git.
5112 * config.sub: Likewise.
5114 2008-09-03 Robert Millan <rmh@aybabtu.com>
5116 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5117 `disk->total_sectors'.
5119 2008-09-01 Colin D Bennett <colin@gibibit.com>
5121 * include/grub/normal.h: Fixed incorrect comment for
5122 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5124 2008-09-01 Colin D Bennett <colin@gibibit.com>
5126 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5127 values with defines.
5129 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5130 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5131 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5132 (GRUB_VBE_MODEATTR_COLOR): Likewise.
5133 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5134 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5135 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5136 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5137 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5138 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5139 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5140 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5141 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5142 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5143 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5144 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5145 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5146 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5147 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5149 2008-08-31 Robert Millan <rmh@aybabtu.com>
5151 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5153 (grub_multiboot): Fix a few warnings.
5155 2008-08-31 Robert Millan <rmh@aybabtu.com>
5157 * loader/i386/pc/multiboot.c: Update comment not to say that
5158 boot_device support is unimplemented.
5160 2008-08-31 Robert Millan <rmh@aybabtu.com>
5162 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5163 or memory map support are unimplemented.
5165 2008-08-31 Colin D Bennett <colin@gibibit.com>
5167 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5169 2008-08-31 Colin D Bennett <colin@gibibit.com>
5171 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5172 total video memory in 'vbeinfo' output; show color format details for
5175 2008-08-30 Pavel Roskin <proski@gnu.org>
5177 * util/genmoddep.c: Remove for real this time.
5178 * DISTLIST: Remove util/genmoddep.c.
5180 2008-08-30 Robert Millan <rmh@aybabtu.com>
5182 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5183 as required by Multiboot spec (it was already 4-byte aligned, but
5186 2008-08-29 Pavel Roskin <proski@gnu.org>
5188 * kern/powerpc/ieee1275/crt0.S: Rename to ...
5189 * kern/powerpc/ieee1275/startup.S: ... this.
5190 * conf/powerpc-ieee1275.rmk: Adjust for the above.
5191 * DISTLIST: Likewise.
5193 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5194 grub/cpu/kernel.h. Add start label for consistency with other
5195 platforms. Add grub_prefix immediately after start. Add jump
5196 to the code after grub_prefix.
5197 * include/grub/powerpc/kernel.h: Provide valid values for
5198 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5200 2008-08-29 Bean <bean123ch@gmail.com>
5202 * configure.ac: Change host_os to cygwin for mingw.
5203 (asprintf): New check for function.
5205 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5206 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5208 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5209 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5210 sync, sleep and grub_util_get_disk_size for mingw.
5212 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5213 to get size in mingw.
5214 (open_device): Use flag O_BINARY if it's defined.
5215 (find_root_device): Add dummy code for mingw.
5217 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5218 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5219 (get_scsi_disk_name): Return 0 for mingw.
5221 * util/hostfs.c: #include <grub/util/misc.h>.
5222 (grub_hostfs_open): Use "rb" flag to open file, use
5223 grub_util_get_disk_size to get disk size for mingw.
5225 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5226 (asprintf): New function if HAVE_ASPRINTF is not set.
5227 (sync): New function for mingw.
5229 (grub_util_get_disk_size): Likewise.
5231 2008-08-28 Pavel Roskin <proski@gnu.org>
5233 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5236 2008-08-28 Robert Millan <rmh@aybabtu.com>
5238 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5240 2008-08-28 Robert Millan <rmh@aybabtu.com>
5242 Change find_grub_drive() syntax so it doesn't prevent it from
5243 detecting NULL names as errors.
5245 * util/biosdisk.c (find_grub_drive): Move free slot search code
5247 (find_free_slot): ... to here.
5248 (read_device_map): Use find_free_slot() to search for free slots.
5250 2008-08-27 Marco Gerards <marco@gnu.org>
5252 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5253 (scsi_mod_SOURCES): New variable.
5254 (scsi_mod_CFLAGS): Likewise
5255 (scsi_mod_LDFLAGS): Likewise.
5257 * disk/scsi.c: New file.
5259 * include/grub/scsi.h: Likewise.
5261 * include/grub/scsicmd.h: Likewise.
5263 * disk/ata.c: Include <grub/scsi.h>.
5264 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5266 (grub_ata_iterate): Skip ATAPI devices.
5267 (grub_ata_open): Only handle ATAPI devices.
5268 (struct grub_atapi_read): Removed.
5269 (grub_atapi_readsector): Likewise.
5270 (grub_ata_read): No longer handle ATAPI devices.
5271 (grub_ata_write): Likewise.
5272 (grub_atapi_iterate): New function.
5273 (grub_atapi_read): Likewise.
5274 (grub_atapi_write): Likewise.
5275 (grub_atapi_open): Likewise.
5276 (grub_atapi_close): Likewise.
5277 (grub_atapi_dev): New variable.
5278 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5279 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5281 * include/grub/disk.h (enum grub_disk_dev_id): Add
5282 `GRUB_DISK_DEVICE_SCSI_ID'.
5284 2008-08-26 Robert Millan <rmh@aybabtu.com>
5286 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5287 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5290 2008-08-23 Bean <bean123ch@gmail.com>
5292 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5293 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5294 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5295 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5297 (raid5rec_mod_SOURCES): New macro.
5298 (raid5rec_mod_CFLAGS): Likewise.
5299 (raid5rec_mod_LDFLAGS): Likewise.
5300 (raid6rec_mod_SOURCES): Likewise.
5301 (raid6rec_mod_CFLAGS): Likewise.
5302 (raid6rec_mod_LDFLAGS): Likewise.
5303 (mdraid_mod_SOURCES): Likewise.
5304 (mdraid_mod_CFLAGS): Likewise.
5305 (mdraid_mod_LDFLAGS): Likewise.
5306 (dm_nv_mod_SOURCES): Likewise.
5307 (dm_nv_mod_CFLAGS): Likewise.
5308 (dm_nv_mod_LDFLAGS): Likewise.
5310 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5311 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5312 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5314 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5315 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5317 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5319 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5321 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5323 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5325 * disk/raid5_recover.c: New file.
5327 * disk/raid6_recover.c: Likewise.
5329 * disk/mdraid_linux.c: Likewise.
5331 * disk/dmraid_nvidia.c: Likewise.
5333 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5336 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5337 calculate the size of raid device.
5338 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5339 different layout of raid5.
5340 (grub_raid_scan_device): Remove code specific to mdraid.
5341 (grub_raid_list): New variable.
5342 (free_array): New function.
5343 (grub_raid_register): Likewise.
5344 (grub_raid_unregister): Likewise.
5345 (grub_raid_rescan): Likewise.
5346 (GRUB_MOD_INIT): Don't iterate device here.
5347 (GRUB_MOD_FINI): Use free_array to release resource.
5349 * include/grub/raid.h: Remove macro and structure specific to mdraid.
5350 (grub_raid5_recover_func_t): New function variable type.
5351 (grub_raid6_recover_func_t): Likewise.
5352 (grub_raid5_recover_func): New variable.
5353 (grub_raid6_recover_func): Likewise.
5354 (grub_raid_register): New function.
5355 (grub_raid_unregister): Likewise.
5356 (grub_raid_rescan): Likewise.
5357 (grub_raid_block_xor): Likewise.
5359 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5360 (CMD_CRC): New macro.
5362 (read_file): Handle device as well as file.
5363 (cmd_crc): New function.
5364 (fstest): Handle multiple disks.
5365 (options): Remove part, raw and long, add root and diskcount.
5366 (usage): Add crc, remove -p, -r, -l, add -r and -c.
5367 (main): Find the first non option entry and ignore subsequent options,
5368 add handling for the new options, support multiple disks.
5370 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5372 2008-08-23 Bean <bean123ch@gmail.com>
5374 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5376 * genfslist.sh: Ignore kernel.mod.
5378 * genpartmaplist.sh: Likewise.
5380 2008-08-23 Robert Millan <rmh@aybabtu.com>
5382 * util/getroot.c (find_root_device): Skip anything that starts with
5383 a dot, not just directories. This avoids things like /dev/.tmp.md0.
5385 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
5387 * util/update-grub.in (GRUB_GFXMODE): Export variable.
5388 * util/grub.d/00_header.in: Allow the administrator to change default
5389 gfxmode via ${GRUB_GFXMODE}.
5391 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
5393 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5395 2008-08-21 Robert Millan <rmh@aybabtu.com>
5397 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
5399 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5400 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5402 2008-08-20 Carles Pina i Estany <carles@pina.cat>
5404 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5405 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5407 2008-08-19 Robert Millan <rmh@aybabtu.com>
5409 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5410 (struct grub_virtual_screen): Remove `cursor_color'.
5411 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5413 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5415 2008-08-18 Robert Millan <rmh@aybabtu.com>
5417 Unify (identical) linux_normal.c files.
5418 * loader/i386/efi/linux_normal.c: Move from here ...
5419 * loader/linux_normal.c: ... to here. Update all users.
5420 * loader/i386/pc/linux_normal.c: Delete. Update all users.
5421 * loader/i386/ieee1275/linux_normal.c: Likewise.
5423 2008-08-18 Robert Millan <rmh@aybabtu.com>
5425 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5426 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5427 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5428 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5429 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5431 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5432 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5433 (GRUB_LINUX_CL_END_OFFSET): ... to here.
5434 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5435 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
5436 (GRUB_EFI_CL_END_OFFSET): Rename to ...
5437 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
5438 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5439 Initialize `params->video_cursor_x' and `params->video_cursor_y'
5440 portably using grub_getxy().
5441 Replace `-EFI' with `-bzImage' in boot message.
5443 2008-08-17 Robert Millan <rmh@aybabtu.com>
5445 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5447 2008-08-17 Robert Millan <rmh@aybabtu.com>
5449 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5451 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5452 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5453 (grub_machine_mmap_iterate): New function declaration.
5454 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5456 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5459 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5460 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5461 Move e820 parsing from here ...
5462 * kern/i386/pc/mmap.c: New file.
5463 (grub_machine_mmap_iterate): ... to here.
5465 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5466 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5467 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
5468 (grub_available_iterate): Redeclare to return `void', and redeclare
5469 its hook to use grub_uint64_t as addr and size parameters, and rename
5471 (grub_machine_mmap_iterate): ... this. Update all users.
5473 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5474 to make it more readable. Rename to ...
5475 (grub_machine_mmap_iterate): ... this.
5477 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5478 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5479 (grub_multiboot): Allocate an extra region after the payload, and fill
5480 it with a Multiboot memory map. Adjust a.out loader to calculate size
5481 with the extra space.
5482 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5483 with the extra space.
5485 2008-08-17 Carles Pina i Estany <carles@pina.cat>
5487 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5489 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
5491 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5492 mdate-sh to the list `find' searches for.
5493 * DISTLIST: Regenerated.
5495 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
5497 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5498 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5499 genmoddep.awk, gensymlist.sh.in.
5500 (DISTDIRS): Add bus, docs, hook, lib.
5501 * DISTLIST: Regenerated.
5502 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5504 2008-08-16 Robert Millan <rmh@aybabtu.com>
5506 * disk/raid.c (grub_raid_init): Handle/report errors set by
5507 grub_device_iterate().
5508 * disk/lvm.c (grub_lvm_init): Likewise.
5510 2008-08-15 Bean <bean123ch@gmail.com>
5512 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5514 (datetime_mod_SOURCES): New macro.
5515 (datetime_mod_CFLAGS): Likewise.
5516 (datetime_mod_LDFLAGS): Likewise.
5517 (date_mod_SOURCES): Likewise.
5518 (date_mod_CFLAGS): Likewise.
5519 (date_mod_LDFLAGS): Likewise.
5520 (datehook_mod_SOURCES): Likewise.
5521 (datehook_mod_CFLAGS): Likewise.
5522 (datehook_mod_LDFLAGS): Likewise.
5524 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5526 (datetime_mod_SOURCES): New macro.
5527 (datetime_mod_CFLAGS): Likewise.
5528 (datetime_mod_LDFLAGS): Likewise.
5529 (date_mod_SOURCES): Likewise.
5530 (date_mod_CFLAGS): Likewise.
5531 (date_mod_LDFLAGS): Likewise.
5532 (datehook_mod_SOURCES): Likewise.
5533 (datehook_mod_CFLAGS): Likewise.
5534 (datehook_mod_LDFLAGS): Likewise.
5536 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5538 (datetime_mod_SOURCES): New macro.
5539 (datetime_mod_CFLAGS): Likewise.
5540 (datetime_mod_LDFLAGS): Likewise.
5541 (date_mod_SOURCES): Likewise.
5542 (date_mod_CFLAGS): Likewise.
5543 (date_mod_LDFLAGS): Likewise.
5544 (datehook_mod_SOURCES): Likewise.
5545 (datehook_mod_CFLAGS): Likewise.
5546 (datehook_mod_LDFLAGS): Likewise.
5548 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5550 (datetime_mod_SOURCES): New macro.
5551 (datetime_mod_CFLAGS): Likewise.
5552 (datetime_mod_LDFLAGS): Likewise.
5553 (date_mod_SOURCES): Likewise.
5554 (date_mod_CFLAGS): Likewise.
5555 (date_mod_LDFLAGS): Likewise.
5556 (datehook_mod_SOURCES): Likewise.
5557 (datehook_mod_CFLAGS): Likewise.
5558 (datehook_mod_LDFLAGS): Likewise.
5560 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5562 (datetime_mod_SOURCES): New macro.
5563 (datetime_mod_CFLAGS): Likewise.
5564 (datetime_mod_LDFLAGS): Likewise.
5565 (date_mod_SOURCES): Likewise.
5566 (date_mod_CFLAGS): Likewise.
5567 (date_mod_LDFLAGS): Likewise.
5568 (datehook_mod_SOURCES): Likewise.
5569 (datehook_mod_CFLAGS): Likewise.
5570 (datehook_mod_LDFLAGS): Likewise.
5572 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5574 * commands/date.c: New file.
5576 * hook/datehook.c: Likewise.
5578 * include/grub/lib/datetime.h: Likewise.
5580 * include/grub/i386/cmos.h: Likewise.
5582 * lib/datetime.c: Likewise.
5584 * lib/i386/datetime.c: Likewise.
5586 * lib/efi/datetime.c: Likewise.
5588 2008-08-14 Robert Millan <rmh@aybabtu.com>
5590 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5591 (grub_mkelfimage_SOURCES): New variable.
5592 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5594 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5595 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5596 * conf/powerpc-ieee1275.rmk: Likewise.
5597 * conf/i386-ieee1275.rmk: Likewise.
5599 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5600 * kern/i386/coreboot/init.c: Likewise.
5602 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5603 with `<grub/cpu/kernel.h>'.
5604 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5606 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5607 * kern/i386/coreboot/startup.S: Likewise.
5609 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5610 (GRUB_MOD_GAP): Remove.
5611 * include/grub/powerpc/kernel.h: New file.
5612 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5613 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5614 * include/grub/i386/kernel.h: New file.
5615 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5616 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5617 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5619 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5621 Use --directory when invoking grub_mkimage.
5623 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5624 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5625 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5626 and GRUB_KERNEL_CPU_PREFIX.
5628 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
5630 * include/grub/err.h (grub_err_printf): New function prototype.
5631 * util/misc.c (grub_err_printf): New function.
5632 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5634 * kern/err.c (grub_print_error): Use grub_err_printf.
5636 2008-08-13 Robert Millan <rmh@aybabtu.com>
5638 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5640 2008-08-13 Robert Millan <rmh@aybabtu.com>
5642 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5645 2008-08-12 Robert Millan <rmh@aybabtu.com>
5647 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5648 of the relocation code from here ...
5649 (grub_multiboot): ... to here.
5650 (forward_relocator, backward_relocator): Move from here ...
5651 * kern/i386/loader.S (grub_multiboot_forward_relocator)
5652 (grub_multiboot_backward_relocator): ... to here.
5653 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
5654 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
5655 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5656 (grub_multiboot_forward_relocator_end)
5657 (grub_multiboot_backward_relocator)
5658 (grub_multiboot_backward_relocator_end): New variables.
5660 2008-08-12 Bean <bean123ch@gmail.com>
5662 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5664 2008-08-11 Robert Millan <rmh@aybabtu.com>
5666 * kern/i386/linuxbios/startup.S: Move from here ...
5667 * kern/i386/coreboot/startup.S: ... to here.
5669 * kern/i386/linuxbios/init.c: Move from here ...
5670 * kern/i386/coreboot/init.c: ... to here.
5672 * kern/i386/linuxbios/table.c: Move from here ...
5673 * kern/i386/coreboot/mmap.c: ... to here.
5675 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5677 2008-08-11 Robert Millan <rmh@aybabtu.com>
5679 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5680 errors. Leave it to the upper layer to handle them.
5682 2008-08-09 Christian Franke <franke@computer.org>
5684 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5685 * conf/common.rmk: Install `grub-pe2elf' only if requested.
5686 Install `grub.d/10_windows' only on Cygwin.
5687 * configure.ac: Add subst of `target_os'.
5688 Check `target_os' also before setting TARGET_OBJ2ELF.
5689 Add `--enable-grub-pe2elf'.
5691 2008-08-08 Robert Millan <rmh@aybabtu.com>
5693 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5694 (grub_last_time): Change type to grub_uint64_t.
5695 (grub_disk_open): Migrate code from to using grub_get_time_ms().
5696 (grub_disk_close): Likewise.
5698 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5699 (run_menu): Migrate code from to using grub_get_time_ms().
5701 * util/misc.c (grub_get_time_ms): New function.
5703 2008-08-08 Marco Gerards <marco@gnu.org>
5705 * disk/ata.c (grub_ata_regget): Change return type to
5707 (grub_ata_regget2): Likewise.
5708 (grub_ata_wait_status): New function.
5709 (grub_ata_wait_busy): Removed function, updated all users to use
5710 `grub_ata_wait_status'.
5711 (grub_ata_wait_drq): Likewise.
5712 (grub_ata_cmd): New function.
5713 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
5715 (grub_ata_pio_write): Add error handling.
5716 (grub_atapi_identify): Likewise.
5717 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5719 (grub_ata_identify): Use `grub_ata_cmd' and improve error
5720 handling. Actually use the detected registers. Reorder the
5721 detection logic such that it is easier to read.
5722 (grub_ata_pciinit): Do not assign the same ID to each controller.
5723 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5725 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5727 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5729 2008-08-08 Marco Gerards <marco@gnu.org>
5733 2008-08-07 Bean <bean123ch@gmail.com>
5735 * include/grub/x86_64/pci.h: New file.
5737 2008-08-07 Christian Franke <franke@computer.org>
5739 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5740 (TIMER2_GATE): Likewise.
5741 (grub_pit_wait): Add enable/disable of the timer2 gate
5742 bit of port 0x61. This fixes a possible infinite loop.
5744 2008-08-07 Bean <bean123ch@gmail.com>
5746 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5747 kern/i386/tsc.c and kern/i386/pit.c.
5749 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5752 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5755 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5757 2008-08-07 Bean <bean123ch@gmail.com>
5759 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5761 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5763 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5764 multiple inclusion. Add #include <grub/types.h>.
5766 2008-08-06 Christian Franke <franke@computer.org>
5768 * conf/common.rmk: Build and install `10_windows'.
5769 * util/grub.d/10_windows.in: New script.
5771 2008-08-06 Pavel Roskin <proski@gnu.org>
5773 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5775 2008-08-06 Robert Millan <rmh@aybabtu.com>
5777 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5778 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5780 2008-08-06 Bean <bean123ch@gmail.com>
5782 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5783 (grub_pxefs_fs_int): Remove dummy definition.
5784 (grub_pxefs_open): Use data->block_size to store the current block
5786 (grub_pxefs_read): Use block size stored in data->block_size. As the
5787 value of grub_pxe_blksize can be changed after the file is opened.
5789 2008-08-06 Bean <bean123ch@gmail.com>
5791 * fs/i386/pc/pxe.c (curr_file): new variable.
5792 (grub_pxefs_open): Simply the handling of pxe file system. Don't
5793 require the dummy internal file system anymore.
5794 (grub_pxefs_read): Removed.
5795 (grub_pxefs_close): Likewise.
5796 (grub_pxefs_fs_int): Likewise.
5797 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5798 connection when we switch file.
5799 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5801 2008-08-06 Robert Millan <rmh@aybabtu.com>
5803 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5805 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5806 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5808 * kern/i386/halt.c: New file.
5809 * kern/i386/reboot.c: Likewise.
5810 * include/grub/i386/reboot.h: Likewise.
5811 * include/grub/i386/halt.h: Likewise.
5813 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5814 Include `<grub/cpu/halt.h>'.
5815 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5816 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5818 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5819 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5820 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5821 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5822 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5823 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5825 * include/grub/i386/at_keyboard.h: ... to here.
5827 2008-08-05 Robert Millan <rmh@aybabtu.com>
5829 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5830 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5831 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5832 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5833 `kern/generic/millisleep.c'.
5835 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5836 instead of grub_get_rtc().
5837 (grub_tsc_init): Initialize `tsc_boot_time'.
5839 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5840 (grub_machine_init): Use grub_tsc_init() rather than
5841 installing an RTC-based handler via grub_install_get_time_ms().
5843 * kern/i386/pit.c: New file.
5844 * include/grub/i386/pit.h: Likewise.
5846 2008-08-05 Bean <bean123ch@gmail.com>
5848 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5850 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5851 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5852 (pxe_mod_SOURCES): New macro.
5853 (pxe_mod_CFLAGS): Likewise.
5854 (pxe_mod_LDFLAGS): Likewise.
5855 (pxecmd_mod_SOURCES): Likewise.
5856 (pxecmd_mod_CFLAGS): Likewise.
5857 (pxecmd_mod_LDFLAGS): Likewise.
5859 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5860 (grub_pxe_call): Likewise.
5862 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5864 * commands/i386/pc/pxecmd.c: New file.
5866 * fs/i386/pc/pxe.c: Likewise.
5868 * include/grub/i386/pc/pxe.h: Likewise.
5870 2008-08-05 Bean <bean123ch@gmail.com>
5872 * util/console.c (grub_console_cur_color): New variable.
5873 (grub_console_standard_color): Likewise.
5874 (grub_console_normal_color): Likewise.
5875 (grub_console_highlight_color): Likewise.
5876 (color_map): Likewise.
5877 (use_color): Likewise.
5878 (NUM_COLORS): New macro.
5879 (grub_ncurses_setcolorstate): Handle color properly.
5880 (grub_ncurses_setcolor): Don't change color here, just remember the
5881 settings, color will be set in grub_ncurses_setcolorstate.
5882 (grub_ncurses_getcolor): New function.
5883 (grub_ncurses_init): Initialize color pairs.
5884 (grub_ncurses_term): New member grub_ncurses_getcolor.
5886 2008-08-05 Colin D Bennett <colin@gibibit.com>
5888 High resolution timer support. Implemented for x86 CPUs using TSC.
5889 Extracted generic grub_millisleep() so it's linked in only as needed.
5890 This requires a Pentium compatible CPU; if the RDTSC instruction is
5891 not supported, then it falls back on the generic grub_get_time_ms()
5892 implementation that uses the machine's RTC.
5894 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5895 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5896 `kern/generic/millisleep.c'.
5898 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5899 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5901 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5902 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5904 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5906 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5907 `kern/generic/millisleep.c'.
5909 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5911 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5913 * kern/generic/rtc_get_time_ms.c: New file.
5915 * kern/generic/millisleep.c: New file.
5917 * kern/misc.c: Don't include
5918 <kern/time.h> anymore.
5919 (grub_millisleep_generic): Removed.
5921 * commands/sleep.c (grub_interruptible_millisleep): Uses
5922 grub_get_time_ms() instead of grub_get_rtc().
5924 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
5926 (grub_cpu_is_cpuid_supported): New inline function.
5927 (grub_cpu_is_tsc_supported): New inline function.
5928 (grub_tsc_init): New function prototype.
5929 (grub_tsc_get_time_ms): New function prototype.
5931 * kern/i386/tsc.c (grub_get_time_ms): New file.
5933 * include/grub/time.h: Include <grub/types.h.
5934 (grub_millisleep_generic): Removed.
5935 (grub_get_time_ms): New prototype.
5936 (grub_install_get_time_ms): New prototype.
5937 (grub_rtc_get_time_ms): New prototype.
5939 * kern/time.c (grub_get_time_ms): New function.
5940 (grub_install_get_time_ms): New function.
5942 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
5943 <grub/time.h> anymore.
5944 (grub_millisleep): Removed.
5945 (grub_machine_init): Call grub_tsc_init.
5947 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5948 get_time_ms() implementation.
5950 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5951 (ieee1275_get_time_ms): New function.
5952 (grub_machine_init): Install get_time_ms() implementation.
5954 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5955 (grub_machine_init): Call grub_tsc_init().
5956 (grub_millisleep): Removed.
5958 * kern/ieee1275/init.c (grub_millisleep): Removed.
5959 (grub_machine_init): Install ieee1275_get_time_ms()
5961 (ieee1275_get_time_ms): New function.
5962 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5965 2008-08-05 Marco Gerards <marco@gnu.org>
5967 * disk/ata.c: Include <grub/pci.h>.
5968 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5969 (grub_ata_initialize): Rewritten.
5970 (grub_ata_device_initialize): New function.
5972 2008-08-04 Pavel Roskin <proski@gnu.org>
5974 * kern/main.c: Include grub/mm.h.
5976 2008-08-04 Robert Millan <rmh@aybabtu.com>
5978 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5979 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5980 corruption problem).
5982 2008-08-04 Robert Millan <rmh@aybabtu.com>
5984 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5985 warnings introduced in my last commit.
5987 2008-08-03 Robert Millan <rmh@aybabtu.com>
5989 Make PCI available on all i386 architectures.
5991 * include/grub/i386/pc/pci.h: Move from here ...
5992 * include/grub/i386/pci.h: ... to here.
5994 * include/grub/i386/pc/pci.h: Remove.
5995 * include/grub/i386/efi/pci.h: Remove.
5996 * include/grub/x86_64/efi/pci.h: Remove.
5998 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6001 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6002 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6003 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6005 * conf/i386-ieee1275.rmk: Likewise.
6007 2008-08-03 Robert Millan <rmh@aybabtu.com>
6009 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6010 (grub_console_setcursor): Make it possible to set cursor off.
6012 2008-08-03 Robert Millan <rmh@aybabtu.com>
6014 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
6015 of modules instead of assuming which platform provides what.
6016 * util/update-grub.in: Likewise.
6018 2008-08-03 Robert Millan <rmh@aybabtu.com>
6020 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6021 instead of `grub_install_dos_part' to determine whether a drive needs
6022 to be prepended to prefix (`grub_install_dos_part' is not reliable,
6023 because it can be overridden when loading GRUB via Multiboot).
6025 2008-08-02 Robert Millan <rmh@aybabtu.com>
6027 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6029 2008-08-02 Robert Millan <rmh@aybabtu.com>
6031 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6032 of informational grub_dprintf() calls.
6034 2008-08-02 Robert Millan <rmh@aybabtu.com>
6036 * disk/memdisk.c (memdisk_size): Don't initialize.
6037 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6039 * include/grub/i386/pc/kernel.h
6040 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6041 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6042 (grub_memdisk_image_size, grub_arch_memdisk_addr)
6043 (grub_arch_memdisk_size): Remove.
6045 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6046 field (was only used to transfer a constant). Add `type' field to
6047 support multiple module types.
6048 (grub_module_iterate): New function.
6050 * kern/device.c (grub_device_open): Do not hide error messages
6051 when grub_disk_open() fails. Use grub_print_error() instead.
6053 * kern/i386/pc/init.c (grub_arch_modules_addr)
6054 (grub_arch_memdisk_size): Remove functions.
6055 (grub_arch_modules_addr): Return the module address in high memory
6056 (now that it isn't copied anymore).
6058 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6059 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6060 decompression routine (grub_total_module_size already includes that
6061 now). Don't copy modules back to low memory.
6063 * kern/main.c: Include `<grub/mm.h>'.
6064 (grub_load_modules): Split out (and use) ...
6065 (grub_module_iterate): ... this function, which iterates through
6066 module objects and runs a hook.
6067 Comment out grub_mm_init_region() call, as it would cause non-ELF
6068 modules to be overwritten.
6070 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6071 the memdisk image in its own region, make it part of the module list.
6072 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6073 (main): Parse --memdisk|-m option, and pass user-provided path as
6074 parameter to generate_image().
6075 (add_segments): Pass `memdisk_path' down to load_modules().
6076 (load_modules): Embed memdisk image in module section when requested.
6077 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6078 `header.type' instead of `header.offset'.
6080 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6081 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6082 (memdisk_mod_LDFLAGS): New variables.
6083 * conf/i386-coreboot.rmk: Likewise.
6084 * conf/i386-ieee1275.rmk: Likewise.
6086 2008-08-02 Robert Millan <rmh@aybabtu.com>
6088 * loader/i386/pc/multiboot.c (playground, forward_relocator)
6089 (backward_relocator): New variables. Used to allocate and relocate
6090 the payload, respectively.
6091 (grub_multiboot_load_elf32): Load into heap instead of requested
6092 address, install the appropriate relocator code in each bound of
6093 the payload, and set the entry point such that
6094 grub_multiboot_real_boot() will jump to one of them.
6096 * kern/i386/loader.S (grub_multiboot_payload_size)
6097 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6098 (grub_multiboot_payload_entry_offset): New variables.
6099 (grub_multiboot_real_boot): Set cpu context to what the relocator
6100 expects, and jump to the relocator instead of the payload.
6102 * include/grub/i386/loader.h (grub_multiboot_payload_size)
6103 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6104 (grub_multiboot_payload_entry_offset): Export.
6106 2008-08-01 Bean <bean123ch@gmail.com>
6108 * normal/menu_entry.c (editor_getline): Don't return the original
6109 string as result, as it will be released by lexer once it has done
6112 2008-08-01 Robert Millan <rmh@aybabtu.com>
6114 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6115 within menuentries, not before them.
6116 util/grub.d/10_hurd.in: Likewise.
6118 2008-08-01 Bean <bean123ch@gmail.com>
6120 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6121 (bufio_mod_SOURCES): New macro.
6122 (bufio_mod_CFLAGS): Likewise.
6123 (bufio_mod_LDFLAGS): Likewise.
6125 * include/grub/bufio.h: New file.
6127 * io/bufio.c: Likewise.
6129 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6130 (grub_video_reader_png): Use grub_buffile_open to open file.
6132 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6133 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6135 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6136 (grub_video_reader_tga): Use grub_buffile_open to open file.
6138 * font/manager.c: Include <grub/bufio.h>.
6139 (add_font): Use grub_buffile_open to open file.
6141 2008-07-31 Robert Millan <rmh@aybabtu.com>
6143 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6144 ELF segments, use a macro for arbitrarily accessing any of them instead
6145 of preparing a pointer that allows access to one at a time.
6146 (grub_multiboot_load_elf64): Likewise.
6148 2008-07-31 Bean <bean123ch@gmail.com>
6150 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6151 GRUB_KERNEL_MACHINE_DATA_END.
6153 2008-07-30 Robert Millan <rmh@aybabtu.com>
6155 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6156 Increase from 0x50 to 0x60.
6157 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6158 use UUIDs to identify the root drive for them. If that's not
6160 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6161 check, for cross-disk installs.
6163 2008-07-30 Robert Millan <rmh@aybabtu.com>
6165 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6166 is non-empty, use it to set the `prefix' environment variable instead
6167 of the usual approach.
6168 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6169 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6170 environment variable instead of dummy make_install_device().
6172 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6173 (start): Insert a data section, with `grub_prefix' variable.
6174 * kern/i386/linuxbios/startup.S: Likewise.
6176 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6177 New variable reference.
6178 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6179 New macro. Defines offset of `grub_prefix' within startup.S (relative
6181 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
6182 section within startup.S (relative to `start').
6183 * include/grub/i386/coreboot/kernel.h: Likewise.
6185 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6186 Overwrite grub_prefix with its contents, at the beginning of the
6188 (main): Understand -p|--prefix.
6190 2008-07-30 Robert Millan <rmh@aybabtu.com>
6192 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6194 2008-07-30 Robert Millan <rmh@aybabtu.com>
6196 * term/i386/pc/vga_text.c (grub_console_cls): Use
6197 grub_console_gotoxy() to go back to beginning of the screen.
6198 Found by Patrick Georgi <patrick.georgi@coresystems.de>
6200 2008-07-29 Christian Franke <franke@computer.org>
6202 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6203 Add conversion of emulated mount points on Cygwin.
6205 2008-07-29 Christian Franke <franke@computer.org>
6207 * util/update-grub.in: Add a check for admin
6209 Remove old `grub.cfg.new' before creation.
6210 Add `-f' to `mv' to handle the different filesystem
6211 semantics of Windows.
6213 2008-07-29 Bean <bean123ch@gmail.com>
6215 * normal/main.c (get_line): Fix buffer overflow bug.
6217 2008-07-28 Robert Millan <rmh@aybabtu.com>
6219 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6220 (struct grub_apple_header): New struct. Describes the layout of
6222 (apple_partition_map_iterate): Check the header magic as well as the
6223 partition magic (which was already being checked).
6225 2008-07-28 Pavel Roskin <proski@gnu.org>
6227 * genmk.rb: Add a warning to the beginning of the output that
6228 it's a generated file and should not be edited.
6230 2008-07-28 Robert Millan <rmh@aybabtu.com>
6232 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6233 with the same number are found, just use issue a warning with
6234 grub_dprintf(), as this error has been reported to be non-fatal.
6236 2008-07-27 Robert Millan <rmh@aybabtu.com>
6238 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6241 2008-07-27 Bean <bean123ch@gmail.com>
6243 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6244 (grub_fat_find_dir): Ignore case when comparing filename.
6246 2008-07-27 Bean <bean123ch@gmail.com>
6248 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6249 smallino, as it's more descriptive, and i8count can be confused with
6250 the other field count.
6251 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6254 2008-07-27 Bean <bean123ch@gmail.com>
6256 * commands/crc.c: New file.
6258 * lib/crc.c: Likewise.
6260 * include/grub/lib/crc.h: Likewise.
6262 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6264 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6265 (hexdump): Move this function to ...
6267 * lib/hexdump.c: ... here.
6269 * include/grub/hexdump.h: Renamed to ...
6271 * include/grub/lib/hexdump.h: ... this.
6273 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6275 * util/grub-editenv.c: Likewise.
6277 * include/envblk.h: Renamed to ...
6279 * include/lib/envblk.h: ... this.
6281 * util/envblk.c: Renamed to ...
6283 * lib/envblk.c: ... this.
6285 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6287 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6288 (pkglib_MODULES): Add crc.mod.
6289 (hexdump_mod_SOURCES): Add lib/hexdump.c.
6290 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6291 (crc_mod_SOURCES): New macro.
6292 (crc_mod_CFLAGS): Likewise.
6293 (crc_mod_LDFLAGS): Likewise.
6295 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6297 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6299 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6301 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6303 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6305 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
6307 * commands/help.c: Include <grub/term.h>.
6308 (TERM_WIDTH): Removed. Updated all users.
6310 2008-07-27 Pavel Roskin <proski@gnu.org>
6312 * util/getroot.c (find_root_device): Rephrase a comment to avoid
6313 spurious warnings about a comment within a comment.
6315 2008-07-25 Robert Millan <rmh@aybabtu.com>
6317 * util/getroot.c (find_root_device): Skip devices that match
6318 /dev/dm-[0-9]. This lets the real device be found for any type of
6319 abstraction (LVM, EVMS, RAID..).
6320 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6321 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
6322 device is found first, find_root_device() will now skip it.
6324 2008-07-24 Pavel Roskin <proski@gnu.org>
6326 * include/grub/types.h: Use __builtin_bswap32() and
6327 __builtin_bswap64() with gcc 4.3 and newer.
6329 2008-07-24 Christian Franke <franke@computer.org>
6331 * util/i386/pc/grub-install.in: If `--debug' is specified,
6332 pass `--verbose' to grub-setup.
6333 Abort script if make_system_path_relative_to_its_root() fails.
6335 2008-07-24 Bean <bean123ch@gmail.com>
6337 * configure.ac: Fixed a bug caused by the previous cygwin patch,
6338 variable `target_platform' should be `platform'.
6340 2008-07-24 Bean <bean123ch@gmail.com>
6342 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6343 (grub_png_init_fixed_block): New function.
6344 (grub_png_decode_image_data): Handle fixed huffman code compression.
6346 2008-07-24 Bean <bean123ch@gmail.com>
6348 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6349 (grub_pe2elf_SOURCES): New macro.
6350 (CLEANFILES): Add grub-pe2elf.
6352 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6353 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6354 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6355 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6356 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6357 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6358 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6359 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6360 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6361 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6362 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6363 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6364 (GRUB_PE32_DT_FUNCTION): Likewise.
6365 (GRUB_PE32_REL_I386_DIR32): Likewise.
6366 (GRUB_PE32_REL_I386_REL32): Likewise.
6367 (grub_pe32_symbol): New structure.
6368 (grub_pe32_reloc): Likewise.
6370 * util/grub-pe2elf.c: New file.
6372 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6373 start symbol in non pc platform.
6375 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6377 The following patches are from Christian Franke.
6379 * include/grub/dl.h: Remove .previous, gas supports this only
6382 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6383 Remove .type, gas supports this only for ELF format.
6385 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6386 nullbytes in symbol table. This fixes an infinite loop if table is
6389 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6390 TARGET_IMG_LDFLAGS and EXEEXT.
6392 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6393 TARGET_IMG_LDFLAGS_AC.
6394 (grub_CHECK_STACK_ARG_PROBE): New function.
6396 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6398 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6400 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6401 to set TARGET_IMG_LD* accordingly.
6402 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6403 Add call to grub_CHECK_STACK_ARG_PROBE.
6404 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6406 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6408 * genmk.rb: Add EXEEXT to CLEANFILES.
6410 2008-07-23 Robert Millan <rmh@aybabtu.com>
6412 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6413 define the codes for arrows and lines used for the menu).
6414 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6417 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6418 fonts, because the latter are too slow.
6420 2008-07-21 Bean <bean123ch@gmail.com>
6422 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6423 a20. Run keyboard test last, as it will cause macbook to halt.
6425 2008-07-18 Pavel Roskin <proski@gnu.org>
6427 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
6428 load foreign architecture modules correctly anyway. Keep
6429 support for loading host architecture modules, whether we
6430 compile them or not.
6432 2008-07-17 Pavel Roskin <proski@gnu.org>
6434 * configure.ac: Use -m32 or -m64 regardless of whether we had to
6435 change target_cpu. The compiler default can mismatch target_cpu
6438 * disk/efi/efidisk.c: Fix format warnings on x86_64.
6439 * kern/efi/efi.c: Likewise.
6441 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
6442 target compiler is functional.
6443 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6446 * configure.ac: Default to efi platform for x86_64-apple. Allow
6447 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
6448 adjustments from the rest, only do them if target is not
6449 explicitly given. Merge other adjustments with the final sanity
6450 check. Remove an extraneous check for supported CPU. Be
6451 specific which CPU and which platform is not supported.
6453 * configure.ac: Default to pc platform for x86_64.
6455 2008-07-17 Robert Millan <rmh@aybabtu.com>
6457 Partial LinuxBIOS -> Coreboot rename.
6459 * conf/i386-linuxbios.rmk: Renamed to ...
6460 * conf/i386-coreboot.rmk: ... this.
6461 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6462 * configure.ac: Accept "coreboot" as input platform (but maintain
6463 compatibility with "linuxbios").
6464 * include/grub/i386/linuxbios: Renamed to ...
6465 * include/grub/i386/coreboot: ... this.
6467 2008-07-17 Bean <bean123ch@gmail.com>
6469 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6470 (appleldr_mod_SOURCE): New variable.
6471 (appleldr_mod_CFLAGS): Likewise.
6472 (appleldr_mod_LDFLAGS): Likewise.
6473 (pci_mod_SOURCES): Likewise.
6474 (pci_mod_CFLAGS): Likewise.
6475 (pci_mod_LDFLAGS): Likewise.
6476 (lspci_mod_SOURCES): Likewise.
6477 (lspci_mod_CFLAGS): Likewise.
6478 (lspci_mod_LDFLAGS): Likewise.
6480 * conf/x86_64-efi.rmk: New file.
6482 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6484 (grub_efidisk_write): Likewise.
6486 * include/efi/api.h (efi_call_0): New macro.
6487 (efi_call_1): Likewise.
6488 (efi_call_2): Likewise.
6489 (efi_call_3): Likewise.
6490 (efi_call_4): Likewise.
6491 (efi_call_5): Likewise.
6492 (efi_call_6): Likewise.
6494 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6495 grub_rescue_cmd_chainloader.
6497 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6498 (grub_pe32_optional_header): Change some fields based on i386 or
6500 (GRUB_PE32_PE32_MAGIC): Likewise.
6502 * include/grub/efi/uga_draw.h: New file.
6504 * include/grub/elf.h (STN_ABS): New constant.
6505 (R_X86_64_NONE): Relocation constant for x86_64.
6506 (R_X86_64_64): Likewise.
6507 (R_X86_64_PC32): Likewise.
6508 (R_X86_64_GOT32): Likewise.
6509 (R_X86_64_PLT32): Likewise.
6510 (R_X86_64_COPY): Likewise.
6511 (R_X86_64_GLOB_DAT): Likewise.
6512 (R_X86_64_JUMP_SLOT): Likewise.
6513 (R_X86_64_RELATIVE): Likewise.
6514 (R_X86_64_GOTPCREL): Likewise.
6515 (R_X86_64_32): Likewise.
6516 (R_X86_64_32S): Likewise.
6517 (R_X86_64_16): Likewise.
6518 (R_X86_64_PC16): Likewise.
6519 (R_X86_64_8): Likewise.
6520 (R_X86_64_PC8): Likewise.
6522 * include/grub/i386/efi/pci.h: New file.
6524 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6525 Change it value based on platform.
6526 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6527 (GRUB_E820_RAM): Likewise.
6528 (GRUB_E820_RESERVED): Likewise.
6529 (GRUB_E820_ACPI): Likewise.
6530 (GRUB_E820_NVS): Likewise.
6531 (GRUB_E820_EXEC_CODE): Likewise.
6532 (GRUB_E820_MAX_ENTRY): Likewise.
6533 (grub_e820_mmap): New structure.
6534 (linux_kernel_header): Change the efi field according to different
6535 kernel version, also field from linux_kernel_header.
6537 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6539 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6540 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6541 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6542 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6543 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6544 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6545 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6546 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6547 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6548 (GRUB_PCI_ADDR_IO_MASK): Likewise.
6550 * include/grub/x86_64/efi/kernel.h: New file.
6552 * include/grub/x86_64/efi/loader.h: Likewise.
6554 * include/grub/x86_64/efi/machine.h: Likewise.
6556 * include/grub/x86_64/efi/pci.h: Likewise.
6558 * include/grub/x86_64/efi/time.h: Likewise.
6560 * include/grub/x86_64/linux.h: Likewise.
6562 * include/grub/x86_64/setjmp.h: Likewise.
6564 * include/grub/x86_64/time.h: Likewise.
6566 * include/grub/x86_64/types.h: Likewise.
6568 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6569 GRUB_TARGET_SIZEOF_VOID_P.
6571 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6572 (grub_efi_locate_handle): Likewise.
6573 (grub_efi_open_protocol): Likewise.
6574 (grub_efi_set_text_mode): Likewise.
6575 (grub_efi_stall): Likewise.
6576 (grub_exit): Likewise.
6577 (grub_reboot): Likewise.
6578 (grub_halt): Likewise.
6579 (grub_efi_exit_boot_services): Likewise.
6580 (grub_get_rtc): Likewise.
6582 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6583 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6584 (grub_efi_allocate_pages): Wrap efi calls.
6585 (grub_efi_free_pages): Wrap efi calls.
6586 (grub_efi_get_memory_map): Wrap efi calls.
6588 * kern/x86_64/dl.c: New file.
6590 * kern/x86_64/efi/callwrap.S: Likewise.
6592 * kern/x86_64/efi/startup.S: Likewise.
6594 * loader/efi/appleloader.c: Likewise.
6596 * loader/efi/chainloader.c (cmdline): New variable.
6597 (grub_chainloader_unload): Wrap efi calls.
6598 (grub_chainloader_boot): Likewise.
6599 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6602 * loader/efi/chainloader_normal.c (chainloader_command):
6603 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6606 * loader/i386/efi/linux.c (allocate_pages): Change allocation
6608 (grub_e820_add_region): New function.
6609 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6611 (grub_find_video_card): New function.
6612 (grub_linux_setup_video): New function.
6613 (grub_rescue_cmd_linux): Probe for video information.
6615 * normal/x86_64/setjmp.S: New file.
6617 * term/efi/console.c (map_char): New function.
6618 (grub_console_putchar): Map unicode char.
6619 (grub_console_checkkey): Wrap efi calls.
6620 (grub_console_getkey): Likewise.
6621 (grub_console_getwh): Likewise.
6622 (grub_console_gotoxy): Likewise.
6623 (grub_console_cls): Likewise.
6624 (grub_console_setcolorstate): Likewise.
6625 (grub_console_setcursor): Likewise.
6627 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6629 2008-07-16 Pavel Roskin <proski@gnu.org>
6631 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6634 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6635 pointer, not an integer. This fixes a warning and prevents
6636 precision loss on 64-bit systems.
6637 (relocate_addresses): Remove unneeded cast.
6639 2008-07-15 Pavel Roskin <proski@gnu.org>
6641 * kern/i386/ieee1275/init.c: Include grub/cache.h.
6643 * term/ieee1275/ofconsole.c: Disable code unused on i386.
6645 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6646 Fix comparison between signed and unsigned.
6648 * include/grub/i386/ieee1275/console.h: Declare
6649 grub_console_init() and grub_console_fini().
6651 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6652 It's empty and unused.
6654 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6655 beginning to avoid warnings with some compilers.
6657 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6658 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6660 2008-07-14 Pavel Roskin <proski@gnu.org>
6662 * kern/env.c (grub_register_variable_hook): Don't copy empty
6663 string, it leaks memory. Pass "" to grub_env_set(), it should
6664 handle constant strings.
6666 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6667 * commands/cmp.c (grub_cmd_cmp): Likewise.
6668 * kern/dl.c (grub_dl_flush_cache): Likewise.
6669 (grub_dl_load_core): Likewise.
6670 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6671 (grub_elf64_load_phdrs): Likewise.
6673 2008-07-13 Pavel Roskin <proski@gnu.org>
6675 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6676 between signed and unsigned.
6677 (LzmaEnc_Finish): Fix warning about an unused parameter.
6679 2008-07-13 Bean <bean123ch@gmail.com>
6681 * Makefile.in (enable_lzo): New rule.
6683 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6685 * configure.ac (ENABLE_LZO): New option --enable-lzo.
6687 * boot/i386/pc/lnxboot.S: #include <config.h>.
6689 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6690 its value according to the compression algorithm used, lzo or lzma.
6692 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6693 compression algorithm according to configure macro.
6695 * kern/i386/pc/startup.S (codestart): Likewise.
6697 * kern/i386/pc/lzma_decode.S: New file.
6699 * include/grub/lib/LzFind.h: Likewise.
6701 * include/grub/lib/LzHash.h: Likewise.
6703 * include/grub/lib/LzmaDec.h: Likewise.
6705 * include/grub/lib/LzmaEnc.h: Likewise.
6707 * include/grub/lib/LzmaTypes.h: Likewise.
6709 * lib/LzFind.c: Likewise.
6711 * lib/LzmaDec.c: Likewise.
6713 * lib/LzmaEnc.c: Likewise.
6715 2008-07-13 Bean <bean123ch@gmail.com>
6717 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6718 (grub_ext4_extent_header): New structure.
6719 (grub_ext4_extent): Likewise.
6720 (grub_ext4_extent_idx): Likewise.
6721 (grub_ext4_find_leaf): New function.
6722 (grub_ext2_read_block): Handle extents.
6724 2008-07-12 Robert Millan <rmh@aybabtu.com>
6726 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6728 2008-07-11 Robert Millan <rmh@aybabtu.com>
6730 * util/grub.d/40_custom.in: New file. Example on how to add custom
6731 entries to /etc/grub.d.
6732 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6733 40_custom (implicitly, by merging all the grub.d rules).
6735 2008-07-11 Pavel Roskin <proski@gnu.org>
6737 * commands/read.c (grub_getline): Fix invalid memory access.
6738 Don't add newline to the variable value.
6740 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6741 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6742 (serial_hw_get_port): Check validity of the port number.
6743 (grub_cmd_serial): Check return value of serial_hw_get_port().
6745 2008-07-07 Pavel Roskin <proski@gnu.org>
6747 * boot/i386/pc/diskboot.S (notification_string): Replace
6748 "Loading kernel" with just "loading". This is shorter, less
6749 confusing and saves a few bytes for possible future changes.
6751 2008-07-05 Pavel Roskin <proski@gnu.org>
6753 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6754 size for ATAPI devices, they are undefined. Output sector
6755 number in decimal form.
6757 * disk/ata.c: Use named constants for status bits.
6759 2008-07-04 Pavel Roskin <proski@gnu.org>
6761 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6762 grub_addr_t before casting it to the void pointer to fix a
6763 warning. Non-addressable regions are discarded earlier.
6764 (grub_arch_modules_addr): Cast _end to grub_addr_t.
6765 * kern/i386/linuxbios/table.c: Include grub/misc.h.
6766 (check_signature): Don't shadow table_header.
6767 (grub_linuxbios_table_iterate): Cast numeric constants to
6768 grub_linuxbios_table_header_t.
6769 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6772 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6775 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6776 pointer, which can cause warnings. Support 64-bit addresses.
6778 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6779 of sizeof(long). This fixes PowerPC image generation on x86_64.
6781 2008-07-04 Robert Millan <rmh@aybabtu.com>
6783 This fixes a performance issue when pc & gpt partmap iterators
6784 didn't abort iteration even after our hook found what it was
6785 looking for (often causing expensive probes of non-existent drives).
6787 Some callers relied on previous buggy behaviour, since they would
6788 raise an error when their own hooks caused early abortion of its
6791 * kern/device.c (grub_device_open): Improve error message.
6792 * disk/lvm.c (grub_lvm_open): Likewise.
6793 * disk/raid.c (grub_raid_open): Likewise.
6795 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6796 when hook requests it, independently of grub_errno.
6797 (pc_partition_map_probe): Do not fail when find_func() caused
6798 early abortion of pc_partition_map_iterate().
6800 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6801 when hook requests it, independently of grub_errno.
6802 (gpt_partition_map_probe): Do not fail when find_func() caused
6803 early abortion of gpt_partition_map_iterate().
6805 * kern/partition.c (grub_partition_iterate): Abort parent iteration
6806 when hook requests it, independently of grub_errno. Do not fail when
6807 part_map_iterate_hook() caused early abortion of p->iterate().
6809 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6810 when grub_partition_iterate() returned with non-zero.
6812 2008-07-03 Pavel Roskin <proski@gnu.org>
6814 * disk/ata.c (grub_ata_pio_write): Check status before writing,
6815 like we do in grub_ata_pio_read().
6816 (grub_ata_readwrite): Always write individual sectors. Fix the
6817 sector count for the remainder.
6818 (grub_ata_write): Enable writing to ATA devices. Correctly
6819 report error for ATAPI devices.
6821 2008-07-02 Pavel Roskin <proski@gnu.org>
6823 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6826 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6827 for every read sector, we already increment it for the whole
6828 batch. This fixes reading more than 256 sectors at once.
6830 * util/grub-editenv.c (cmd_info): Cast argument to long
6831 explicitly. ptrdiff_t reduces to int on i386.
6833 * util/grub-editenv.c (main): Be specific which parameter is
6836 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6837 (memdisk): Make memdisk_orig_addr a pointer.
6839 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6840 for file offsets, use grub_off_t instead. Fix printf format
6843 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6844 there. Real unexpected warnings should not drown in the noise
6845 about known problems.
6847 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6848 grub_disk_addr_t for memory addresses.
6850 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6851 explicitly to fix a warning.
6853 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6855 * Makefile.in (MODULE_LDFLAGS): New variable.
6856 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
6857 the linker accepts --build-id=none.
6858 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
6860 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6862 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6863 those in Linux XFS code. Provide a way to access 64-bit parent
6865 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
6866 the end of struct grub_xfs_dir_header.
6868 2008-07-02 Bean <bean123ch@gmail.com>
6870 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6871 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6872 and GRUB_IEEE1275_FLAG_NO_ANSI.
6874 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6875 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6876 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6878 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6879 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6881 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6882 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6884 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6885 esc sequence on non ANSI terminal.
6886 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6888 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6891 2008-07-02 Bean <bean123ch@gmail.com>
6893 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6894 (grub_editenv_SOURCES): New variable.
6895 (pkglib_MODULES): Add loadenv.mod.
6896 (loadenv_mod_SOURCES): New variable.
6897 (loadenv_mod_CFLAGS): Likewise.
6898 (loadenv_mod_LDFLAGS): Likewise.
6900 * include/grub/envblk.h: New file.
6902 * util/envblk.c: New file.
6904 * util/grub-editenv.c: New file.
6906 * commands/loadenv.c: New file.
6908 2008-07-01 Pavel Roskin <proski@gnu.org>
6910 * include/multiboot2.h (struct multiboot_tag_module): Use char,
6911 not unsigned char. This fixes warnings and is consistent with
6914 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6916 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6918 * term/tparm.c (analyze): Always set *popcount.
6920 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6921 cast to fix a warning.
6923 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6924 cast to suppress a warning.
6926 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6927 grub_fshelp_read_file() expects.
6929 * fs/fat.c: Fix UUID calculation on big-endian systems. We
6930 write uuid as a 32-bit value in CPU byte order, so declare and
6933 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6934 long if the format specifier expects it.
6935 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6936 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6937 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6938 long to fix a warning.
6939 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6940 grub_dprintf() arguments to fix warnings.
6942 2008-06-30 Pavel Roskin <proski@gnu.org>
6944 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6945 install_bsd_part immediately before core.img is embedded or
6946 modified on disk. This fixes core.img verification if core.img
6949 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6950 core_path to calculate the blocklist.
6951 Patch from Javier MartÃn <lordhabbit@gmail.com>
6953 2008-06-29 Robert Millan <rmh@aybabtu.com>
6955 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
6956 block to disk block.
6957 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6958 Patch from Niels Böhm <bitbucket@arcor.de>
6960 2008-06-29 Robert Millan <rmh@aybabtu.com>
6962 * util/update-grub_lib.in (font_path): Search for fonts in
6963 /boot/grub first, which is more likely to be readable (we aren't
6964 deciding where fonts live, just looking for them).
6966 2008-06-26 Pavel Roskin <proski@gnu.org>
6968 * util/biosdisk.c (read_device_map): Don't leave dead map
6969 entries for devices failing stat() check.
6971 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6972 core_path_dev for the core.img path on the target device.
6974 2008-06-26 Robert Millan <rmh@aybabtu.com>
6976 * disk/fs_uuid.c: New file.
6977 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6978 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6979 (fs_uuid_mod_LDFLAGS): New variables.
6980 * include/grub/disk.h (grub_disk_dev_id): Add
6981 `GRUB_DISK_DEVICE_UUID_ID'.
6982 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6983 implement iterate().
6985 2008-06-26 Robert Millan <rmh@aybabtu.com>
6987 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6988 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6989 Linux image includes no initrd.
6991 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
6993 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6994 call to resolve the core image location that effectively appended the
6997 2008-06-21 Robert Millan <rmh@aybabtu.com>
6999 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7002 * util/grub.d/10_hurd.in: ... to here ...
7003 * util/grub.d/10_linux.in: ... and here.
7005 2008-06-19 Robert Millan <rmh@aybabtu.com>
7007 * kern/main.c (grub_main): Export `prefix' variable immediately
7008 after it has been set by grub_machine_set_prefix().
7010 2008-06-19 Robert Millan <rmh@aybabtu.com>
7012 * commands/search.c (search_label, search_fs_uuid, search_file): Print
7013 search result when not saving to variable, not the other way around.
7014 When saving to variable, abort iteration as soon as a match is found.
7016 2008-06-19 Robert Millan <rmh@aybabtu.com>
7018 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7019 check for partition that provides /boot/grub. Its logic is flawed,
7020 as it prevents prepare_grub_to_access_device() from being called
7023 2008-06-19 Robert Millan <rmh@aybabtu.com>
7025 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7026 "insmod" command directly when abstraction modules are needed,
7027 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7028 since it had already been processed).
7030 2008-06-19 Pavel Roskin <proski@gnu.org>
7032 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7033 changed. This is needed in case GRUB_LIBDIR changes.
7034 * conf/i386-ieee1275.rmk: Likewise.
7035 * conf/i386-linuxbios.rmk: Likewise.
7036 * conf/i386-pc.rmk: Likewise.
7037 * conf/powerpc-ieee1275.rmk: Likewise.
7039 2008-06-18 Pavel Roskin <proski@gnu.org>
7041 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7042 kernel_elf_symlist.c to symlist.c for consistency with other
7043 architectures. Update all users.
7044 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7046 2008-06-18 Robert Millan <rmh@aybabtu.com>
7048 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7051 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
7052 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
7053 a RAID device, run setup() for all members independently on whether
7054 LVM abstraction is being used.
7055 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7056 If grub-mkimage has set `*install_dos_part == -2', don't override this
7058 Perform *install_dos_part adjustments independently on whether
7059 we're embedding or not.
7060 Clarify error message when image is too big for embedding.
7061 Remove duplicate *install_dos_part stanza.
7063 2008-06-17 Robert Millan <rmh@aybabtu.com>
7065 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7066 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7068 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7069 values in grub_ofconsole_normal_color and
7070 grub_ofconsole_highlight_color (they're not directly related to
7071 background and foreground).
7072 (grub_ofconsole_setcolorstate): Extract background and foreground
7073 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7075 2008-06-17 Robert Millan <rmh@aybabtu.com>
7077 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7078 /boot/grub for the check in last commit, not /boot (they could be
7079 different partitions).
7081 2008-06-16 Robert Millan <rmh@aybabtu.com>
7083 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7084 asked to setup access for the same partition that provides /boot,
7085 don't bother using UUIDs since our root already has the value we
7088 2008-06-16 Robert Millan <rmh@aybabtu.com>
7090 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7092 Patch from Sven Mueller <sven@debian.org>.
7094 2008-06-16 Robert Millan <rmh@aybabtu.com>
7096 * util/update-grub.in: Check for $EUID instead of $UID.
7097 Reported by Vincent Zweije.
7099 2008-06-16 Bean <bean123ch@gmail.com>
7101 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7102 (grub_ext2_read_block): Likewise.
7103 (grub_ext2_read_inode): Likewise.
7104 (grub_ext2_mount): Likewise.
7105 (grub_ext2_close): Likewise.
7106 (grub_ext3_get_journal): Removed.
7108 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7109 (grub_reiserfs_read_symlink): Likewise.
7110 (grub_reiserfs_mount): Likewise.
7111 (grub_reiserfs_open): Likewise.
7112 (grub_reiserfs_read): Likewise.
7113 (grub_reiserfs_close): Likewise.
7114 (grub_reiserfs_get_journal): Removed.
7116 * fs/fshelp.c (grub_fshelp_read): Removed.
7117 (grub_fshelp_map_block): Likewise.
7119 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7120 (grub_fshelp_journal): Likewise.
7121 (grub_fshelp_read): Likewise.
7122 (grub_fshelp_map_block): Likewise.
7124 2008-06-16 Pavel Roskin <proski@gnu.org>
7126 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7127 floating point anymore.
7128 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7130 2008-06-15 Pavel Roskin <proski@gnu.org>
7132 * commands/ls.c (grub_ls_list_files): Use integer calculations
7133 for human readable format, avoid floating point use.
7134 * kern/misc.c (grub_ftoa): Remove.
7135 (grub_vsprintf): Remove floating point support.
7137 2008-06-15 Robert Millan <rmh@aybabtu.com>
7139 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7141 Reported by Max Vozeler.
7143 2008-06-15 Robert Millan <rmh@aybabtu.com>
7145 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7146 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7148 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7149 the beginning of the prefix.
7151 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7152 It is assumed that if we have a memdisk, grub-mkimage has set
7153 grub_prefix to include the "(memdisk)" drive in it.
7155 2008-06-15 Robert Millan <rmh@aybabtu.com>
7157 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7158 Initialize keyboard controller after registering the terminal, so that
7159 grub_printf() can be called from grub_keyboard_controller_init().
7161 2008-06-15 Robert Millan <rmh@aybabtu.com>
7163 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7164 extent-btree which is written as big endian on disk.
7165 Reported by Alain Greppin <al@chilibi.org>.
7167 2008-06-14 Robert Millan <rmh@aybabtu.com>
7169 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7170 * util/i386/pc/grub-install.in (modules): Likewise.
7172 2008-06-13 Pavel Roskin <proski@gnu.org>
7174 * commands/ls.c (grub_ls_list_files): Fix format warnings.
7176 2008-06-13 Bean <bean123ch@gmail.com>
7178 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7180 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7182 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7183 to indicate sparse block.
7185 2008-06-12 Pavel Roskin <proski@gnu.org>
7187 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7188 number, grub_fshelp_read() does it for us.
7190 * fs/fshelp.c (grub_fshelp_read): New function. Implement
7191 linear disk read with journal translation.
7192 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7193 * include/grub/fshelp.h: Declare grub_fshelp_read().
7195 2008-06-09 Pavel Roskin <proski@gnu.org>
7197 * fs/minix.c (grub_minix_mount): Handle error reading
7200 2008-06-08 Robert Millan <rmh@aybabtu.com>
7202 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7203 don't append the RAID prefix afterwards.
7204 Reported by Clint Adams.
7206 2008-06-08 Robert Millan <rmh@aybabtu.com>
7208 Based on description from Pavel:
7209 * kern/disk.c (grub_disk_check_range): Rename to ...
7210 (grub_disk_adjust_range): ... this. Add a comment explaining the
7211 tasks performed by this function.
7213 2008-06-08 Robert Millan <rmh@aybabtu.com>
7215 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7216 `num_serial' (for consistency with other variables).
7217 (struct grub_ntfs_data): Add `uuid' member.
7218 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7219 (grub_ntfs_uuid): New function.
7220 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7222 2008-06-07 Pavel Roskin <proski@gnu.org>
7224 * util/biosdisk.c (open_device): Revert last change to the
7225 function, it broke installation. The sector needs to be
7226 different dependent on which device is opened.
7228 2008-06-06 Robert Millan <rmh@aybabtu.com>
7230 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7231 rest of GRUB, and breakage doesn't happen if its value were modified.
7233 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7234 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7235 a constant (same value).
7236 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7237 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7239 2008-06-06 Robert Millan <rmh@aybabtu.com>
7241 * util/biosdisk.c (open_device): Do not modify sector offset when
7242 accessing a partition. kern/disk.c already handles this for us.
7244 2008-06-06 Robert Millan <rmh@aybabtu.com>
7246 * util/grub-emu.c (grub_machine_init): Move code in this function from
7248 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7249 segfault in case grub_printf() is called).
7251 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7252 grub_probe. Update all users not to explicitly add it again.
7253 (grub_device): New variable; contains corresponding device for grubdir.
7254 (fs_module, partmap_module, devabstraction_module): Pass
7255 `--device ${grub_device}' to grub_probe to avoid traversing /dev
7258 2008-06-05 Robert Millan <rmh@aybabtu.com>
7260 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7261 is found, print it (same layout as with labels).
7263 2008-06-04 Robert Millan <rmh@aybabtu.com>
7265 * util/biosdisk.c (get_drive): Rename to ...
7266 (find_grub_drive): ... this. Update all users.
7268 (get_os_disk): Rename to ...
7269 (convert_system_partition_to_system_disk): ... this. Update all users.
7271 (find_drive): Rename to ...
7272 (find_system_device): ... this. Update all users.
7274 2008-06-04 Robert Millan <rmh@aybabtu.com>
7276 * util/biosdisk.c (get_os_disk): Handle IDA devices.
7277 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7278 (make_device_map): Likewise.
7280 2008-06-01 Robert Millan <rmh@aybabtu.com>
7282 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7283 before dereferencing it.
7285 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7286 union with fat12/fat16-specific ones. Add some new fields, including
7287 `num_serial' for both versions.
7288 (struct grub_fat_data): Add `uuid' member.
7289 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7290 names. Initialize `data->uuid' using `num_serial'.
7291 (grub_fat_uuid): New function.
7292 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7294 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7295 (grub_reiserfs_uuid): New function.
7296 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7299 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7300 (grub_xfs_uuid): New function.
7301 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7303 2008-06-01 Robert Millan <rmh@aybabtu.com>
7305 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7306 code that is backward compatible with pre-uuid search command.
7308 2008-05-31 Robert Millan <rmh@aybabtu.com>
7310 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7311 floppies after everything else, to ensure floppy drive isn't accessed
7312 unnecessarily (patch from Bean).
7314 2008-05-31 Robert Millan <rmh@aybabtu.com>
7316 * commands/search.c (search_label, search_fs_uuid, search_file): Do
7317 not print device names when we were asked to set a variable.
7319 2008-05-31 Robert Millan <rmh@aybabtu.com>
7321 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7322 using "cursor-on" and "cursor-off" commands (understood at least by
7323 the Open Firmware flavour on OLPC).
7325 2008-05-31 Michael Gorven <michael@gorven.za.net>
7327 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7328 on and off sequences.
7330 2008-05-31 Robert Millan <rmh@aybabtu.com>
7332 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7333 * util/update-grub.in: Likewise.
7335 2008-05-30 Pavel Roskin <proski@gnu.org>
7337 * util/biosdisk.c (linux_find_partition): Simplify logic and
7338 make the code more universal. Keep special processing for
7339 devfs, but use a simple rule for all other devices. If the
7340 device ends with a number, append 'p' and the partition number.
7341 Otherwise, append only the partition number.
7343 2008-05-30 Robert Millan <rmh@aybabtu.com>
7345 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7346 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7347 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7348 the `root' parameter to Linux.
7350 2008-05-30 Robert Millan <rmh@aybabtu.com>
7352 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7353 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7354 --fs_uuid with --fs-uuid.
7355 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7356 all filesystems support them).
7358 2008-05-30 Robert Millan <rmh@aybabtu.com>
7360 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7361 grub_printf() flags, since we're printing in units of 2 bytes.
7363 2008-05-30 Robert Millan <rmh@aybabtu.com>
7365 * util/grub.d/00_header.in: Remove obsolete comment referencing
7366 convert_system_path_to_grub_path().
7367 * util/update-grub.in: Likewise.
7368 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7369 (convert_system_path_to_grub_path): Add a warning message explaining
7370 that this function is deprecated. Rely on is_path_readable_by_grub()
7371 for the readability checks.
7372 (font_path): Use is_path_readable_by_grub() for the readability
7373 check rather than convert_system_path_to_grub_path().
7375 2008-05-30 Robert Millan <rmh@aybabtu.com>
7377 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7378 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7379 converting it first.
7380 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7381 grub.cfg for access to font file, and afterwards call it again to set
7384 2008-05-30 Robert Millan <rmh@aybabtu.com>
7386 * commands/search.c (options): Add --fs_uuid option.
7387 (search_fs_uuid): New function.
7388 (grub_cmd_search): Fix --set argument passing.
7389 Use search_fs_uuid() when requested via --fs_uuid.
7390 (grub_search_init): Update help message.
7391 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7392 and redeclare it as an array of 16-bit words.
7393 (grub_ext2_uuid): New function.
7394 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7395 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7396 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7397 (GRUB_DEVICE_BOOT_UUID): New variables.
7398 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7399 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7401 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
7402 just assume `root' variable has the right value.
7403 * util/grub.d/10_linux.in: Likewise.
7404 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7406 (main): Recognise `-t fs_uuid' argument.
7408 2008-05-30 Robert Millan <rmh@aybabtu.com>
7410 * util/biosdisk.c (map): Redefine structure to hold information
7411 about GRUB drive name.
7412 (get_drive): Reimplement without assuming (and verifying) BIOS-like
7414 (call_hook): Remove.
7415 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7416 member. Assume drive has partitions.
7417 (grub_util_biosdisk_open): Access device names via `.device' struct
7419 (open_device): Likewise.
7420 (find_drive): Likewise.
7421 (read_device_map): Adjust map[] usage to match the new struct
7422 definition. Don't check for duplicates (still possible, but not cheap
7424 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7425 (make_device_name): Remove assumption of BIOS-like drive names.
7427 2008-05-30 Pavel Roskin <proski@gnu.org>
7429 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7430 compiling execute.c doesn't need grub_script.tab.h anymore.
7431 (normal/command.c_DEPENDENCIES): Likewise.
7432 (normal/function.c_DEPENDENCIES): Likewise.
7433 * conf/i386-ieee1275.rmk: Likewise.
7434 * conf/i386-linuxbios.rmk: Likewise.
7435 * conf/i386-pc.rmk: Likewise.
7436 * conf/powerpc-ieee1275.rmk: Likewise.
7437 * conf/sparc64-ieee1275.rmk: Likewise.
7439 2008-05-29 Pavel Roskin <proski@gnu.org>
7441 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7442 when scanning metadata for volume group name.
7444 * include/grub/script.h: Don't include grub_script.tab.h. It's
7445 a generated file, which may only be included from the files with
7446 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
7447 use union YYSTYPE, as the later allows forward declaration.
7448 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7450 2008-05-29 Robert Millan <rmh@aybabtu.com>
7452 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7453 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7454 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7455 (grub_console_checkkey): Add grub_dprintf() call to report unknown
7458 2008-05-29 Robert Millan <rmh@aybabtu.com>
7460 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7461 control key combinations.
7463 2008-05-29 Robert Millan <rmh@aybabtu.com>
7465 * util/powerpc/ieee1275/grub-install.in: Move from here ...
7466 * util/ieee1275/grub-install.in: ... to here.
7467 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7468 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7469 (grub_install_SOURCES): Likewise.
7471 2008-05-29 Robert Millan <rmh@aybabtu.com>
7473 * fs/affs.c: Update copyright year.
7474 * fs/ext2.c: Likewise.
7475 * fs/fshelp.c: Likewise.
7476 * fs/hfsplus.c: Likewise.
7477 * fs/ntfs.c: Likewise.
7478 * fs/xfs.c: Likewise.
7479 * include/grub/fshelp.h: Likewise.
7480 * util/grub-mkdevicemap.c: Likewise.
7482 2008-05-28 Robert Millan <rmh@aybabtu.com>
7484 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7485 might need to be fatfs to support some firmware implementations
7488 2008-05-28 Robert Millan <rmh@aybabtu.com>
7490 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7492 * util/grub-mkdevicemap.c (get_mmc_disk_name)
7493 (make_device_map): Likewise.
7495 2008-05-20 Bean <bean123ch@gmail.com>
7497 * fs/fshelp.c (grub_fshelp_map_block): New function.
7498 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7499 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7501 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7502 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7503 (grub_fshelp_journal): New structure.
7504 (grub_fshelp_map_block): New function prototype.
7505 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7506 (grub_fshelp_map_block): Likewise.
7508 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7509 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7510 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7511 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7512 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7513 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7514 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7515 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7516 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7517 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7518 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7519 (grub_ext2_sblock): New members for journal support.
7520 (grub_ext3_journal_header): New structure.
7521 (grub_ext3_journal_revoke_header): Likewise.
7522 (grub_ext3_journal_block_tag): Likewise.
7523 (grub_ext3_journal_sblock): Likewise.
7524 (grub_fshelp_node): New members logfile and journal.
7525 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7526 grub_fshelp_map_block to get real block number.
7527 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7529 (grub_ext2_read_inode): Likewise.
7530 (grub_ext3_get_journal): New function.
7531 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7532 (grub_ext2_close): Release memory used by journal.
7534 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7535 (REISERFS_MAGIC_DESC_BLOCK): New macro.
7536 (grub_reiserfs_transaction_header): Renamed to
7537 grub_reiserfs_description_block, replace field data with real_blocks.
7538 (grub_reiserfs_commit_block): New structure.
7539 (grub_reiserfs_data): New member journal.
7540 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7542 (grub_reiserfs_read_symlink): Likewise.
7543 (grub_reiserfs_iterate_dir): Likewise.
7544 (grub_reiserfs_open): Likewise.
7545 (grub_reiserfs_read): Likewise.
7546 (grub_reiserfs_get_journal): New function.
7547 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7548 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7549 using grub_reiserfs_get_journal.
7550 (grub_reiserfs_close): Release memory used by journal.
7552 * fs/affs.c (grub_affs_read_block): Change block type to
7553 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7555 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7557 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7559 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7561 * fs/udf.c (grub_udf_read_block): Change block type to
7562 grub_disk_addr_t. Use type cast to avoid warning.
7564 * fs/xfs.c (grub_xfs_read_block): Likewise.
7566 2008-05-16 Christian Franke <franke@computer.org>
7568 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7569 to ensure that break with ESC will always work.
7570 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7571 Remove ESC from keyboard queue.
7573 2008-05-16 Christian Franke <franke@computer.org>
7575 * util/biosdisk.c: [__CYGWIN__] Add includes.
7576 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7577 (get_os_disk): Move variable declarations to OS specific
7578 parts to avoid warning.
7579 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7580 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7581 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7583 * util/getroot.c: [__CYGWIN__] Add includes.
7584 (strip_extra_slashes): Fix "/" case.
7585 [__CYGWIN__] (get_win32_path): New function.
7586 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7587 [__CYGWIN__] (find_root_device): Disable.
7588 [__CYGWIN__] (get_bootsec_serial): New function.
7589 [__CYGWIN__] (find_cygwin_root_device): Likewise.
7590 [__linux__] (grub_guess_root_device): Add early returns to simplify
7592 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7593 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7594 check for Linux only.
7596 2008-05-15 Bean <bean123ch@gmail.com>
7598 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7599 keyboard hang problem in apple's intel mac.
7601 2008-05-09 Robert Millan <rmh@aybabtu.com>
7603 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7605 * util/grub-mkdevicemap.c (get_virtio_disk_name)
7606 (make_device_map): Likewise.
7607 Reported by Aurelien Jarno <aurel32@debian.org>
7609 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
7611 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7612 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7613 (make_device_map): Output entries for xvd type disks.
7615 2008-05-07 Robert Millan <rmh@aybabtu.com>
7617 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7619 * util/grub-mkdevicemap.c (get_cciss_disk_name)
7620 (make_device_map): Likewise.
7621 Reported by Roland Dreier <rdreier@cisco.com>
7623 2008-05-07 Robert Millan <rmh@aybabtu.com>
7625 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7626 grub_strstr() call. Correct a few mistakes in failure path handling.
7628 2008-05-06 Robert Millan <rmh@aybabtu.com>
7630 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7631 Do not print a trailing slash (therefore, the root directory is an
7633 (convert_system_path_to_grub_path): Do not remove trailing slash
7634 from make_system_path_relative_to_its_root() output.
7636 * util/i386/pc/grub-install.in: Add trailing slash to output from
7637 make_system_path_relative_to_its_root().
7639 2008-05-06 Robert Millan <rmh@aybabtu.com>
7641 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
7642 ensures that output lines aren't intermangled with those sent to
7643 stderr (via grub_util_info()).
7644 * util/grub-probe.c (grub_refresh): Likewise.
7645 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7647 2008-05-05 Christian Franke <franke@computer.org>
7649 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7650 Add Cygwin device names.
7651 (get_ide_disk_name) [__CYGWIN__]: Likewise.
7652 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7653 (check_device): Return error instead of success on empty name.
7654 (make_device_map): Move label inside linux specific code to
7655 prevent compiler warning.
7657 2008-04-30 Robert Millan <rmh@aybabtu.com>
7659 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7660 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7662 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7664 2008-04-29 Robert Millan <rmh@aybabtu.com>
7666 * docs/grub.cfg: New file (example GRUB configuration).
7668 2008-04-26 Robert Millan <rmh@aybabtu.com>
7670 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
7671 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7672 and `disk/ieee1275/nand.c'.
7674 2008-04-25 Bean <bean123ch@gmail.com>
7676 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7679 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7680 change the buffer size to 4096 for cdrom device.
7682 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7684 (_linux_mod_SOURCES): New variable.
7685 (_linux_mod_CFLAGS): Likewise.
7686 (_linux_mod_LDFLAGS): Likewise.
7687 (linux_mod_SOURCES): Likewise.
7688 (linux_mod_CFLAGS): Likewise.
7689 (linux_mod_LDFLAGS): Likewise.
7690 (nand_mod_SOURCES): Likewise.
7691 (nand_mod_CFLAGS): Likewise.
7692 (nand_mod_LDFLAGS): Likewise.
7694 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7695 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7696 type property. (nand device in olpc don't have this property)
7698 * include/grub/disk.h (grub_disk_dev_id): New macro
7699 GRUB_DISK_DEVICE_NAND_ID.
7701 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7703 (grub_rescue_cmd_initrd): Likewise.
7705 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7706 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7707 ofw_cif_handler and ofw_idt, adjust padding number.
7709 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7710 GRUB_MACHINE_IEEE1275 is defined.
7712 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7713 Use NESTED_FUNC_ATTR attribute on the hook parameter.
7715 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7716 on nested function heap_init.
7717 (grub_upper_mem): New variable for i386-ieee1275.
7718 (grub_get_extended_memory): New function for i386-ieee1275.
7719 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7721 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7722 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7725 * loader/i386/ieee1275/linux.c: New file.
7727 * loader/i386/ieee1275/linux_normal.c: New file.
7729 * disk/ieee1275/nand.c: New file.
7731 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
7733 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7735 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7737 2008-04-18 Robert Millan <rmh@aybabtu.com>
7739 Restructures early code path on ieee1275 to unify grub_main() as
7740 the first C function that is executed in every platform.
7742 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7743 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7745 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7746 * kern/ieee1275/cmain.c (cmain): Rename to ...
7747 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7748 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7751 2008-04-18 Robert Millan <rmh@aybabtu.com>
7753 * util/update-grub.in: Fix syntax error when setting
7754 `GRUB_PRELOAD_MODULES'.
7755 Reported by Stephane Chazelas <stephane@artesyncp.com>
7757 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
7759 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7760 section into account, newer toolchains generate unique build ids
7761 * configure.ac: remove the test for --build-id=none acceptance,
7762 we want build ids to be preserved
7763 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7764 far from other sections don't cause the raw binary images grow
7767 2008-04-15 Robert Millan <rmh@aybabtu.com>
7769 * disk/lvm.c: Update copyright year.
7770 * kern/misc.c: Likewise.
7772 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7774 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7775 there is no memory left for physical volume name.
7777 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
7779 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7780 volume name mapping to support bigger than 9 character names properly.
7782 2008-04-13 Robert Millan <rmh@aybabtu.com>
7784 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7785 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7787 2008-04-13 Christian Franke <franke@computer.org>
7789 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7790 to create a floppy emulation boot CD when non emulation mode
7792 Enable Joliet CD filesystem extension.
7794 2008-04-13 Robert Millan <rmh@aybabtu.com>
7796 * kern/misc.c (grub_strncat): Fix off-by-one error.
7797 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7799 * kern/env.c (grub_env_context_close): Clear current context, not
7801 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7803 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7805 2008-04-13 Robert Millan <rmh@aybabtu.com>
7807 Improve robustness when handling LVM.
7809 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7810 (and leave `*p' unmodified).
7811 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7813 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7814 iterating through it.
7815 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7817 (grub_lvm_scan_device): Check the return value (and fail gracefully
7818 when due) on each grub_lvm_getvalue() or grub_strstr() call.
7819 Don't assume `vg->pvs != NULL' when iterating through it.
7821 2008-04-13 Robert Millan <rmh@aybabtu.com>
7823 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7824 * genmk.rb (partmap): New variable.
7825 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7826 (#{partmap}): New target rule.
7827 * genpartmaplist.sh: New file.
7828 * Makefile.in (pkglib_DATA): Add partmap.lst.
7829 (partmap.lst): New target rule.
7830 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7831 modules (including all partition maps), instead of preloading them.
7833 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
7835 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7836 `linux-boot-prober' (if installed) to detect other operating
7837 systems which are installed on the computer and add them to
7839 * conf/common.rmk: Build and install 30_os-prober.
7841 2008-04-12 Robert Millan <rmh@aybabtu.com>
7843 * kern/powerpc/ieee1275/init.c: Move from here ...
7844 * kern/ieee1275/init.c: ... to here. Update all users.
7846 * kern/powerpc/ieee1275/cmain.c: Move from here ...
7847 * kern/ieee1275/cmain.c: ... to here. Update all users.
7849 * kern/powerpc/ieee1275/openfw.c: Move from here ...
7850 * kern/ieee1275/openfw.c: ... to here. Update all users.
7852 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7853 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
7855 2008-04-10 Pavel Roskin <proski@gnu.org>
7857 * configure.ac: Always use "_cv_" in cache variables for
7858 compatibility with Autoconf 2.62.
7860 2008-04-07 Robert Millan <rmh@aybabtu.com>
7862 Revert grub/machine/init.h addition by Pavel (since it breaks on
7863 i386-ieee1275 and others):
7864 * util/i386/pc/misc.c: Remove grub/machine/init.h.
7865 * util/powerpc/ieee1275/misc.c: Likewise.
7867 2008-04-07 Robert Millan <rmh@aybabtu.com>
7869 * util/grub-probe.c (probe): Improve error message.
7871 2008-04-07 Robert Millan <rmh@aybabtu.com>
7873 * util/biosdisk.c (read_device_map): Skip devices that don't exist
7874 (this prevents the presence of a bogus entry from ruining the whole
7877 2008-04-06 Pavel Roskin <proski@gnu.org>
7879 * util/biosdisk.c: Include grub/util/biosdisk.h.
7880 * util/grub-fstest.c (execute_command): Make static.
7881 * util/grub-mkdevicemap.c (check_device): Likewise.
7882 * util/i386/pc/misc.c: Include grub/machine/init.h.
7883 * util/powerpc/ieee1275/misc.c: Likewise.
7884 * util/lvm.c: Include grub/util/lvm.h.
7885 * util/misc.c: Include grub/kernel.h, grub/misc.h and
7887 * util/raid.c: Include grub/util/raid.h.
7888 (grub_util_getdiskname): Make static.
7890 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7891 grub_hostfs_fini(), as they are called from grub_init_all() and
7892 grub_fini_all() respectively. This fixes an infinite loop in
7893 grub-fstest due to double registration of hostfs.
7894 Reported by Christian Franke <Christian.Franke@t-online.de>
7896 2008-04-05 Pavel Roskin <proski@gnu.org>
7898 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7899 all 8 functions. Otherwise, probe function 0 only.
7901 2008-04-04 Pavel Roskin <proski@gnu.org>
7903 * commands/lspci.c (grub_lspci_iter): Print the bus number
7906 * commands/lspci.c (grub_pci_classes): Fix typos.
7907 (grub_lspci_iter): Don't print func twice. Print vendor ID
7908 before device ID, as it's normally done.
7910 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7911 Fix signedness warnings.
7912 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7914 * util/ieee1275/get_disk_name.c: Include config.h so that
7915 _GNU_SOURCE is defined and getline() is declared. Mark an
7916 unused argument as such. Fix a signedness warning.
7918 2008-04-02 Pavel Roskin <proski@gnu.org>
7920 * genkernsyms.sh.in: Use more robust assignments for CC and
7921 srcdir. Quote srcdir.
7922 * gensymlist.sh.in: Likewise. Assert at the compile time that
7923 the symbol table is not empty.
7925 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7926 * fs/cpio.c (grub_cpio_read): Likewise.
7928 2008-04-01 Pavel Roskin <proski@gnu.org>
7930 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7931 * disk/host.c (grub_host_open): Likewise.
7932 * disk/loopback.c (grub_loopback_open): Likewise.
7933 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7934 disk->id as in disk/host.c, not a multi-character constant.
7936 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
7937 later is obsolete, potentially dangerous and sets a bad example.
7938 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7939 * util/misc.c (grub_util_get_image_size): Likewise.
7941 * disk/loopback.c (options): Improve help for "--partitions".
7943 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7944 options to align them with the short options, e.g. "echo -e".
7946 2008-03-31 Bean <bean123ch@gmail.com>
7948 * video/reader/png.c (grub_png_data): New member is_16bit and
7950 (grub_png_decode_image_header): Detect 16 bit png image.
7951 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7952 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7953 (grub_video_reader_png): Release memory occupied by image_data.
7955 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7957 (grub_nfs_mount): Skip the test for sector per cluster.
7959 * include/grub/ntfs.h (MAX_SPC): Removed.
7961 2008-03-31 Bean <bean123ch@gmail.com>
7963 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7964 (grub_probe_SOURCES): Add fs/afs.c.
7965 (grub_fstest_SOURCES): Likewise.
7966 (afs_mod_SOURCES): New variable.
7967 (afs_mod_CFLAGS): Likewise.
7968 (afs_mod_LDFLAGS): Likewise.
7970 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7971 (grub_emu_SOURCES): Likewise.
7973 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7975 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7977 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7979 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7981 * fs/afs.c: New file.
7983 2008-03-30 Pavel Roskin <proski@gnu.org>
7985 * disk/host.c: Include grub/misc.h to fix a warning.
7986 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7987 warnings about implicit declarations.
7989 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7991 * include/grub/i386/loader.h: Change declaration of
7992 grub_linux_boot() to match what grub_loader_set() expects.
7993 * util/getroot.c (grub_guess_root_device): Return const char* to
7995 * util/grub-probe.c (probe): Fix a warning about uninitialized
7996 abstraction_name variable.
7997 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7998 second argument as unused to fix a warning.
8000 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8001 missing grub_error() call.
8003 * util/update-grub_lib.in: Define datarootdir, since Autoconf
8004 2.60 and newer uses it to define datadir.
8006 * commands/sleep.c: Fix warning about implicit declaration.
8007 * disk/memdisk.c: Likewise.
8008 * loader/aout.c: Likewise.
8009 * loader/i386/bsd_normal.c: Likewise.
8010 * util/grub-probe.c: Likewise.
8012 * commands/i386/cpuid.c (has_longmode): Make static.
8013 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8014 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8016 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8017 GDT. This is more robust, as %ds can change.
8018 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8019 calling real_to_prot().
8020 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8022 2008-03-28 Pavel Roskin <proski@gnu.org>
8024 * kern/i386/pc/startup.S: Assert that uncompressed functions
8025 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8026 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8027 code, as they push parts of the code (error handlers) beyond
8028 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
8029 code as correctness and size.
8031 2008-03-28 Pavel Roskin <proski@gnu.org>
8033 * kern/i386/pc/startup.S
8034 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8035 data block address to the real mode, keep offset minimal. This
8036 works around a bug in AWARD BIOS on old Athlon systems, which
8037 makes CD detection hang.
8039 2008-03-26 Pavel Roskin <proski@gnu.org>
8041 * normal/color.c (grub_parse_color_name_pair): Make `name' a
8043 * include/grub/normal.h: Add grub_parse_color_name_pair()
8046 2008-03-24 Bean <bean123ch@gmail.com>
8048 * disk/i386/pc/biosdisk.c (cd_start): Removed.
8049 (cd_count): Removed.
8050 (cd_drive): New variable.
8051 (grub_biosdisk_get_drive): Don't check for (cdN) device.
8052 (grub_biosdisk_call_hook): Likewise.
8053 (grub_biosdisk_iterate): Change cdrom detection method.
8054 (grub_biosdisk_open): Replace cd_start with cd_drive.
8055 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8056 detect cdrom device.
8058 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8060 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8061 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8062 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8063 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8064 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8065 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8066 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8067 (grub_biosdisk_cdrp): New structure.
8068 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8070 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8072 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8075 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8078 2008-03-20 Robert Millan <rmh@aybabtu.com>
8080 Remove 2 TiB limit in ata.mod.
8081 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8082 (grub_ata_dumpinfo): Print sector count with 0x%llx.
8083 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8084 grub_uint64_t instead of grub_uint32_t.
8086 2008-03-05 Bean <bean123ch@gmail.com>
8088 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8089 (grub_multiboot): Set boot device.
8091 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8093 2008-03-02 Bean <bean123ch@gmail.com>
8095 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8098 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
8100 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8103 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8106 * docs/fdl.texi: New file.
8108 * docs/mdate-sh: New file. Copied from gnulib.
8109 * docs/texinfo.tex: Likewise.
8111 * config.guess: Updated from gnulib.
8112 * install-sh: Likewise.
8114 2008-02-28 Robert Millan <rmh@aybabtu.com>
8116 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8117 (aout_mod_SOURCES): New variable.
8118 (aout_mod_CFLAGS): Likewise.
8119 (aout_mod_LDFLAGS): Likewise.
8121 * conf/i386-ieee1275.rmk: Likewise.
8123 2008-02-28 Robert Millan <rmh@aybabtu.com>
8125 * util/update-grub.in: Reorganise terminal validity check. Accept
8126 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8127 Based on suggestion by Franklin PIAT.
8129 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
8131 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8133 * util/getroot.c (grub_util_check_block_device): New function that
8134 returns the given argument if it is a block device and returns NULL else.
8135 * util/grub-probe.c (argument_is_device): New variable.
8136 (probe): Promote device_name from a variable to an argument. Receive
8137 device_name from grub_util_check_block_device() if path is NULL and from
8138 grub_guess_root_device() else. Do not free() device_name anymore.
8139 (options): Introduce new parameter '-d, --device'.
8140 (main): Add description of the new parameter to the help screen.
8141 Rename path variable to argument. Set argument_is_device if the '-d'
8142 option is given. Pass argument to probe() depending on
8145 2008-02-24 Bean <bean123ch@gmail.com>
8147 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8148 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8149 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8150 (GRUB_ISO9660_VOLDESC_PART): Likewise.
8151 (GRUB_ISO9660_VOLDESC_END): Likewise.
8152 (grub_iso9660_primary_voldesc): New member escape.
8153 (grub_iso9660_data): New member joliet.
8154 (grub_iso9660_convert_string): New function.
8155 (grub_iso9660_mount): Detect joliet extension.
8156 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8157 (grub_iso9660_iso9660_label): Likewise.
8159 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8160 (grub_setup_SOURCES): Add fs/udf.c.
8161 (grub_fstest_SOURCES): Likewise.
8162 (udf_mod_SOURCES): New variable.
8163 (udf_mod_CFLAGS): Likewise.
8164 (udf_mod_LDFLAGS): Likewise.
8166 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8167 (grub_emu_SOURCES): Likewise.
8169 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8171 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8173 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8175 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8177 * fs/udf.c: New file.
8179 2008-02-24 Robert Millan <rmh@aybabtu.com>
8181 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8182 (normal/lexer.c_DEPENDENCIES): New variables.
8183 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8184 (normal/lexer.c_DEPENDENCIES): Likewise.
8185 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8186 (normal/lexer.c_DEPENDENCIES): Likewise.
8187 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8188 (normal/lexer.c_DEPENDENCIES): Likewise.
8189 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8190 (normal/lexer.c_DEPENDENCIES): Likewise.
8191 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8192 (normal/lexer.c_DEPENDENCIES): Likewise.
8194 2008-02-23 Robert Millan <rmh@aybabtu.com>
8196 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8197 since they were intended to be in hex. This didn't break previously
8198 because of a bug in gpt_partition_map_iterate() (see below).
8200 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8201 when checking the validity of GPT header.
8202 Remove `partno', since it always provides the same information as `i'.
8204 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
8206 * include/grub/efi/time.h: Fix a wrong comment.
8208 2008-02-19 Pavel Roskin <proski@gnu.org>
8210 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8213 2008-02-19 Bean <bean123ch@gmail.com>
8215 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8216 (aout_mod_SOURCES): New variable.
8217 (aout_mod_CFLAGS): Likewise.
8218 (aout_mod_LDFLAGS): Likewise.
8219 (_bsd_mod_SOURCES): New variable.
8220 (_bsd_mod_CFLAGS): Likewise.
8221 (_bsd_mod_LDFLAGS): Likewise.
8222 (bsd_mod_SOURCES): New variable.
8223 (bsd_mod_CFLAGS): Likewise.
8224 (bsd_mod_LDFLAGS): Likewise.
8226 * include/grub/aout.h: New file.
8228 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8230 * include/grub/i386/bsd.h: New file.
8232 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8235 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8236 function is called, so that it's possible to change it inside the hook.
8237 (grub_elf64_load): Likewise.
8238 (grub_elf_file): Don't close the file if elf header is not found.
8239 (grub_elf_close): Close the file if grub_elf_file fails (The new
8240 grub_elf_file won't close it).
8241 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8242 (grub_elf64_size): Likewise.
8244 * kern/i386/loader.S (grub_unix_real_boot): New function.
8246 * loader/aout.c: New file.
8248 * loader/i386/bsd.c: New file.
8250 * loader/i386/bsd_normal.c: New file.
8252 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8254 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8255 can test other formats.
8257 2008-02-19 Robert Millan <rmh@aybabtu.com>
8259 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8260 (grub_gpt_partition_type_empty): Redefine with macro from
8261 `<grub/gpt_partition.h>'.
8262 (gpt_partition_map_iterate): Adjust partition type comparison.
8264 Export `entry' as partmap-specific `part.data' struct.
8265 (grub_gpt_header, grub_gpt_partentry): Move from here ...
8267 * include/grub/gpt_partition.h (grub_gpt_header)
8268 (grub_gpt_partentry): ... to here (new file).
8270 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8272 (grub_gpt_partition_type_bios_boot): New const variable, defined
8273 with macro from `<grub/gpt_partition.h>'.
8275 (setup): Replace `first_start' with `embed_region', which keeps
8276 track of the embed region (and is partmap-agnostic).
8278 Replace find_first_partition_start() with find_usable_region(),
8279 which finds a usable region for embedding using partmap-specific
8280 knowledge (supports PC/MSDOS and GPT).
8282 Fix all assumptions that the embed region start at sector 1, using
8283 `embed_region.start' from now on. Similarly, use `embed_region.end'
8284 rather than `first_start' to calculate available size.
8286 In grub_util_info() message, replace "into after the MBR" with an
8287 indication of the specific sector our embed region starts at.
8289 2008-02-19 Robert Millan <rmh@aybabtu.com>
8291 * DISTLIST: Replace `commands/ieee1275/halt.c' and
8292 `commands/ieee1275/reboot.c' with `commands/halt.c' and
8293 `commands/reboot.c'.
8294 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8295 (halt_mod_SOURCES): Likewise.
8296 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8297 (halt_mod_SOURCES): Likewise.
8299 2008-02-17 Christian Franke <franke@computer.org>
8301 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8303 2008-02-17 Robert Millan <rmh@aybabtu.com>
8305 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8306 set `first_start' to 0 for non-PC/MSDOS partition maps.
8308 2008-02-16 Robert Millan <rmh@aybabtu.com>
8310 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8311 do not assume partition map is PC/MSDOS before performing checks that
8312 are specific to that layout.
8314 2008-02-13 Robert Millan <rmh@aybabtu.com>
8316 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8317 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8318 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8320 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
8322 * configure.ac: Only a cosmetic change on the handling of
8323 -fno-stack-protector.
8325 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
8327 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8328 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8330 (grub_install_SOURCES): Add halt.mod and reboot.mod.
8331 (halt_mod_SOURCES): New variable.
8332 (halt_mod_CFLAGS): Likewise.
8333 (halt_mod_LDFLAGS): Likewise.
8334 (reboot_mod_SOURCES): Likewise.
8335 (reboot_mod_CFLAGS): Likewise.
8336 (reboot_mod_LDFLAGS): Likewise.
8338 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8339 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8341 (halt_mod_SOURCES): Likewise.
8342 (reboot_mod_SOURCES): Likewise.
8344 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8345 commands/i386/pc/reboot.c by commands/reboot.c.
8346 (reboot_mod_SOURCES): Likewise.
8348 * commands/i386/pc/reboot.c: merge this file ...
8350 * commands/ieee1275/reboot.c: ... and this file ...
8352 * commands/reboot.c: ... to this file.
8353 Add some precompiler directive to include the correct header for
8356 * commands/ieee1275/halt.c: move this file ...
8358 * commands/halt.c: ... to here.
8359 Add some precompiler directive to include the correct header for
8362 * include/grub/efi/efi.h (grub_reboot): New function declaration.
8363 (grub_halt): Likewise.
8365 * kern/efi/efi.c (grub_reboot): New function.
8366 (grub_halt): Likewise.
8368 2008-02-12 Robert Millan <rmh@aybabtu.com>
8370 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8371 /dev (like it is done for /dev/mapper). This doesn't provide support
8372 for EVMS, but at least it is now easy to identify the problem when it
8375 2008-02-11 Robert Millan <rmh@aybabtu.com>
8377 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8378 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8379 comparing it with -1, not 0.
8381 2008-02-10 Robert Millan <rmh@aybabtu.com>
8383 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8385 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8386 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8388 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8389 `disk/lvm.c' to the end of the list.
8390 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8391 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8393 2008-02-10 Robert Millan <rmh@aybabtu.com>
8395 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
8396 grub_print_error() instead. This will let user know why we're entering
8398 Based on suggestions from Sam Morris.
8400 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
8402 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8403 on remaining N args, instead of "--" arg N times.
8405 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
8407 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8408 (fill_with_default_glyph): Changed to use unknown_glyph for fill
8409 pattern for unknown glyphs.
8411 2008-02-09 Robert Millan <rmh@aybabtu.com>
8413 * configure.ac: Probe for `help2man'.
8414 * Makefile.in (builddir): New variable.
8415 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
8416 or otherwise add a few flags/options to it.
8417 (install-local): For every executable utility or script that is
8418 installed, invoke $(HELP2MAN) to install a manpage based on --help
8421 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8422 that it doesn't prevent --help from working in build tree.
8424 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8425 with `bug-grub@gnu.org'.
8426 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8427 * util/update-grub.in (usage): New function.
8428 Implement proper argument check, with support for --help and --version
8429 (as well as existing -y).
8431 2008-02-09 Christian Franke <franke@computer.org>
8433 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8434 avoid overwriting previous output.
8435 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8437 2008-02-09 Robert Millan <rmh@aybabtu.com>
8439 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8442 2008-02-09 Robert Millan <rmh@aybabtu.com>
8444 * commands/sleep.c: New file.
8445 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8446 (sleep_mod_SOURCES): New variable.
8447 (sleep_mod_CFLAGS): Likewise.
8448 (sleep_mod_LDFLAGS): Likewise.
8450 2008-02-09 Robert Millan <rmh@aybabtu.com>
8452 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8453 situations in which we can deduce the RAID size and the superblock
8456 2008-02-09 Robert Millan <rmh@aybabtu.com>
8458 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
8459 and return a grub_diskmemberlist_t composed of LVM physical volumes.
8460 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8462 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
8463 and return a grub_diskmemberlist_t composed of physical array members.
8464 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8466 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8468 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8469 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8470 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8472 * util/grub-probe.c (probe): Move partmap probing code from here ...
8473 (probe_partmap): ... to here.
8474 (probe): Use probe_partmap() once for the disk we're probing, and
8475 additionally, when such disk contains a memberlist() struct member,
8476 once for each disk that is contained in the structure returned by
8479 2008-02-09 Robert Millan <rmh@aybabtu.com>
8481 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8482 environment variable to 'all' in order to obtain debug output from
8484 * util/i386/pc/grub-setup.c (main): Likewise.
8486 2008-02-08 Robert Millan <rmh@aybabtu.com>
8488 * disk/raid.c (grub_raid_scan_device): Check for
8489 `array->device[sb.this_disk.number]' rather than for
8490 `array->device[sb.this_disk.number]->name', since the latter is not
8491 guaranteed to be accessible.
8493 2008-02-08 Robert Millan <rmh@aybabtu.com>
8495 * disk/raid.c: Update copyright.
8496 * fs/cpio.c: Likewise.
8497 * include/grub/raid.h: Likewise.
8498 * loader/i386/pc/multiboot.c: Likewise.
8499 * util/hostfs.c: Likewise.
8501 2008-02-08 Robert Millan <rmh@aybabtu.com>
8503 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8504 to a grub_disk_t array.
8505 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8507 (grub_raid_scan_device): Replace `device[x].name' accesses with
8508 `device[x]->name'. Simplify initialization of `array->device[x]'.
8510 2008-02-08 Robert Millan <rmh@aybabtu.com>
8512 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8513 grub_dprintf() calls.
8514 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8517 2008-02-07 Christian Franke <franke@computer.org>
8519 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8520 instead of fseek and ftell to support large files.
8521 (grub_hostfs_read): Likewise.
8523 2008-02-07 Robert Millan <rmh@aybabtu.com>
8525 Patch from Jeroen Dekkers.
8526 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8527 failure, since successfully reading all array members might not be
8530 2008-02-06 Robert Millan <rmh@aybabtu.com>
8532 * util/grub-probe.c (probe): Simplify partmap probing (with the
8533 assumption that the first word up to the underscore equals to
8536 2008-02-06 Christian Franke <franke@computer.org>
8538 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8539 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8540 last block of a cpio or tar stream.
8541 Check for "TRAILER!!!" instead of any empty data
8542 block to detect last block of a cpio stream.
8543 (grub_cpio_dir): Fix constness of variable np.
8544 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8545 cpio or tar trailer is detected. This fixes a crash
8546 on open of a non existing file.
8548 2008-02-05 Bean <bean123ch@gmail.com>
8550 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8552 (grub_multiboot_load_elf64): Likewise.
8553 (grub_multiboot): Initialize mbi structure.
8555 * util/grub-fstest.c: Don't include unused header file script.h.
8557 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8559 (grub_fstest_SOURCES): Likewise.
8561 2008-02-05 Robert Millan <rmh@aybabtu.com>
8563 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8564 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8565 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8566 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8568 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8569 (translation_table): Replace hardcoded values with macros
8570 provided by `<grub/term.h>'.
8572 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8573 (keyboard_map): Correct/add a few values, with macros provided
8575 (keyboard_map_shift): Zero values that don't differ from their
8576 `keyboard_map' equivalents.
8577 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8578 Discard the second scan code that is always sent by Caps lock.
8579 Only use `keyboard_map_shift' when it provides a non-zero value,
8580 otherwise fallback to `keyboard_map'.
8582 2008-02-04 Bean <bean123ch@gmail.com>
8584 * Makefile.in (enable_grub_fstest): New variable.
8586 * conf/common.rmk (grub_fstest_init.lst): New rule.
8587 (grub_fstest_init.h): Likewise.
8588 (grub_fstest_init.c): Likewise.
8589 (util/grub-fstest.c_DEPENDENCIES): New variable.
8590 (grub_fstest_SOURCES): Likewise.
8592 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8594 * util/grub-fstest.c: New file.
8596 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8598 Make grub-setup handle a separate root device.
8600 * util/i386/pc/grub-setup.c (setup): Always open the root device,
8601 so that the root device can be compared with the destination
8603 When embedding the core image, if the root and destination devices
8604 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8606 When not embedding, set ROOT_DRIVE to 0xFF.
8608 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8610 Add support for having a grub directory in a different drive. This
8611 is still only the data handling part.
8613 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8614 (codestart): Save %dh in GRUB_ROOT_DRIVE.
8615 (grub_root_drive): New variable.
8617 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8618 instead of GRUB_BOOT_DRIVE to construct a device name. Set
8619 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8622 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8624 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8626 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8628 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8629 is bogus, because PXE booting does not specify any drive
8632 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8633 am not sure if this is really correct.
8635 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8636 is always identical to the boot drive when booting from a CD.
8638 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8640 (root_drive): New variable.
8641 (real_start): Unconditionally set %dh to ROOT_DRIVE.
8642 (setup_sectors): Push %dx right after popping it, because %dh will
8644 (copy_buffer): Restore %dx.
8646 2008-02-03 Robert Millan <rmh@aybabtu.com>
8648 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8649 use `cdboot.img' for cdrom images.
8651 2008-02-03 Robert Millan <rmh@aybabtu.com>
8653 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8654 only setup gfxterm when `font' command has succeeded.
8656 2008-02-03 Robert Millan <rmh@aybabtu.com>
8658 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8659 (grub_rescue_cmd_multiboot_loader)
8660 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8662 2008-02-03 Pavel Roskin <proski@gnu.org>
8664 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8665 %edx and %esi from stack only after grub_gate_a20() is called.
8666 grub_gate_a20() clobbers %edx.
8668 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
8670 * configure.ac (AC_INIT): Bumped to 1.96.
8672 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8673 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8674 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8675 video/readers/png.c.
8677 2008-02-03 Bean <bean123ch@gmail.com>
8679 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8680 (cdboot_img_SOURCES): New variable.
8681 (cdboot_img_ASFLAGS): New variable.
8682 (cdboot_img_LDFLAGS): New variable.
8684 * boot/i386/pc/cdboot.S: New file.
8686 * disk/i386/pc/biosdisk.c (cd_start): New variable.
8687 (cd_count): Likewise.
8688 (grub_biosdisk_get_drive): Add support for cd device.
8689 (grub_biosdisk_call_hook): Likewise.
8690 (grub_biosdisk_iterate): Likewise.
8691 (grub_biosdisk_open): Likewise.
8692 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8693 (grub_biosdisk_rw): Support reading from cd device.
8694 (GRUB_MOD_INIT): Iterate cd devices.
8696 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8697 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8698 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8700 * kern/i386/pc/init.c (make_install_device): Check for cd device.
8702 2008-02-02 Robert Millan <rmh@aybabtu.com>
8704 * commands/read.c: New file.
8705 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8706 (read_mod_SOURCES): New variable.
8707 (read_mod_CFLAGS): Likewise.
8708 (read_mod_LDFLAGS): Likewise.
8710 2008-02-02 Robert Millan <rmh@aybabtu.com>
8712 * normal/main.c (grub_normal_execute): Check for `menu->size' when
8713 determining whether menu has to be displayed.
8715 2008-02-02 Marco Gerards <marco@gnu.org>
8717 * bus/pci.c: New file.
8719 * include/grub/pci.h: Likewise.
8721 * include/grub/i386/pc/pci.h: Likewise.
8723 * commands/lspci.c: Likewise.
8725 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8727 (pci_mod_SOURCES): New variable.
8728 (pci_mod_CFLAGS): Likewise.
8729 (pci_mod_LDFLAGS): Likewise.
8730 (lspci_mod_SOURCES): Likewise.
8731 (lspci_mod_CFLAGS): Likewise.
8732 (lspci_mod_LDFLAGS): Likewise.
8734 2008-02-02 Bean <bean123ch@gmail.com>
8736 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8737 (grub_ufs_get_file_block): Fix indirect block calculation problem.
8739 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8740 (grub_xfs_btree_node): New structure.
8741 (grub_xfs_btree_root): New structure.
8742 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8743 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8744 (GRUB_XFS_EXTENT_BLOCK): Likewise.
8745 (GRUB_XFS_EXTENT_SIZE): Likewise.
8746 (grub_xfs_read_block): Support btree format type.
8747 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8748 Use directory block as basic unit.
8750 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8752 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8753 __attribute__ ((__regparm__ (1))).
8755 2008-02-01 Robert Millan <rmh@aybabtu.com>
8757 Correct a mistake in previous commit.
8759 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8761 (normal/command.c_DEPENDENCIES): New variable.
8763 2008-02-01 Robert Millan <rmh@aybabtu.com>
8765 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8767 (normal/command.c_DEPENDENCIES): New variable.
8768 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8769 * conf/i386-ieee1275.rmk: Likewise.
8770 * conf/i386-linuxbios.rmk: Likewise.
8771 * conf/i386-pc.rmk: Likewise.
8772 * conf/sparc64-ieee1275.rmk: Likewise.
8773 * conf/powerpc-ieee1275.rmk: Likewise.
8774 (grub_emu_SOURCES): Add `fs/fshelp.c'.
8776 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8778 2008-02-01 Robert Millan <rmh@aybabtu.com>
8780 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8781 call at beginning of function.
8783 2008-01-31 Pavel Roskin <proski@gnu.org>
8785 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8786 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8787 (grub_mkrescue_SOURCES): Likewise.
8788 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8790 2008-01-30 Robert Millan <rmh@aybabtu.com>
8792 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8793 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8794 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8795 (grub_probe_SOURCES): ... to here.
8797 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8798 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8799 * conf/i386-ieee1275.rmk: Likewise.
8800 * conf/i386-linuxbios.rmk: Likewise.
8801 * conf/powerpc-ieee1275.rmk: Likewise.
8803 2008-01-30 Tristan Gingold <gingold@free.fr>
8805 * kern/rescue.c: Silently accept empty lines.
8807 2008-01-29 Bean <bean123ch@gmail.com>
8809 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8810 (real_code_2): Code cleanup and change comment style.
8811 (move_memory): Avoid using 32-bit address mode.
8813 2008-01-29 Bean <bean123ch@gmail.com>
8815 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8816 (png_mod_SOURCES): New variable.
8817 (png_mod_CFLAGS): Likewise.
8818 (png_mod_LDFLAGS): Likewise.
8820 * video/readers/png.c: New file.
8822 2008-01-28 Robert Millan <rmh@aybabtu.com>
8824 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8825 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8826 `ifndef GRUB_MOD_GAP' hack.
8827 * util/elf/grub-mkimage.c (add_segments): Likewise.
8829 2008-01-27 Robert Millan <rmh@aybabtu.com>
8831 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8832 `GRUB_MOD_GAP' for platforms in which it's not defined.
8833 * util/elf/grub-mkimage.c (add_segments): Likewise.
8835 2008-01-27 Robert Millan <rmh@aybabtu.com>
8837 Get grub-emu to build again (including parallel builds).
8839 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8841 (util/grub-emu.c_DEPENDENCIES): ... this, ...
8842 (normal/execute.c_DEPENDENCIES): ... this, ...
8843 (grub-emu_DEPENDENCIES): ... and this.
8845 * conf/i386-efi.rmk: Likewise.
8846 * conf/i386-linuxbios.rmk: Likewise.
8847 * conf/i386-ieee1275.rmk: Likewise.
8848 * conf/powerpc-ieee1275.rmk: Likewise.
8849 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8851 2008-01-27 Robert Millan <rmh@aybabtu.com>
8853 * NEWS: Add a few items.
8855 2008-01-27 Robert Millan <rmh@aybabtu.com>
8857 Fix parallel builds with grub-emu. Based on earlier commit for
8858 grub-probe and grub-setup.
8860 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8861 (util/grub-emu.c_DEPENDENCIES): ... this.
8862 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8863 (util/grub-emu.c_DEPENDENCIES): ... this.
8864 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8865 (util/grub-emu.c_DEPENDENCIES): ... this.
8866 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8867 (util/grub-emu.c_DEPENDENCIES): ... this.
8868 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8869 (util/grub-emu.c_DEPENDENCIES): ... this.
8871 2008-01-27 Pavel Roskin <proski@gnu.org>
8873 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8874 to create a gap between _end and the modules added to the image
8875 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
8876 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8877 * util/elf/grub-mkimage.c (add_segments): Likewise.
8879 2008-01-26 Pavel Roskin <proski@gnu.org>
8881 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8882 just return an error.
8884 2008-01-26 Bean <bean123ch@gmail.com>
8886 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8887 (grub_reiserfs_get_item): Save offset of the next item.
8888 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8890 2008-01-25 Robert Millan <rmh@aybabtu.com>
8892 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8893 make all filesystem sources appear together (possibly fixing omissions
8895 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8896 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8897 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8898 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8900 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
8902 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8903 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8904 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8905 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8907 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8908 (probe): Add a sanity check to make sure of our ability to read
8909 requested files when probing for filesystem type.
8911 * genmk.rb: Update copyright year (2007).
8913 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8914 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8915 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8916 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8917 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8918 : Remove function prototypes.
8920 2008-01-25 Robert Millan <rmh@aybabtu.com>
8922 Revert my previous commits (based on wrong assumption of how grub_errno
8925 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8926 * kern/file.c (grub_file_open): Likewise.
8928 2008-01-24 Pavel Roskin <proski@gnu.org>
8930 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8931 that hang if GRUB tries to setup colors.
8932 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8933 colors for firmwares that don't support it.
8934 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8935 Recognize Open Hack'Ware, set flags to work around its
8938 2008-01-24 Robert Millan <rmh@aybabtu.com>
8940 * kern/file.c (grub_file_open): Do not account previous failures of
8941 unrelated functions when grub_errno is checked for.
8942 Reported by Oleg Strikov.
8944 2008-01-24 Bean <bean123ch@gmail.com>
8946 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8947 (grub_ufs_sblock): New member volume name.
8948 (grub_ufs_find_file): Fix string copy bug.
8949 (grub_ufs_label): Implement this function properly.
8951 * fs/hfs.c (grub_hfs_cnid_type): New enum.
8952 (grub_hfs_iterate_records): Use the correct file number for extents
8953 and catalog file. Fix problem in next index calculation.
8954 (grub_hfs_find_node): Replace recursive function call with loop.
8955 (grub_hfs_iterate_dir): Replace recursive function call with loop.
8957 2008-01-23 Robert Millan <rmh@aybabtu.com>
8959 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8960 `<grub/symbol.h>' and `<grub/multiboot.h>'.
8961 (grub_multiboot2_real_boot): New function prototype.
8963 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8964 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8966 * kern/i386/ieee1275/init.c (grub_os_area_addr)
8967 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8969 2008-01-23 Robert Millan <rmh@aybabtu.com>
8971 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8972 #ifdef'ed out grub_printf().
8974 2008-01-23 Robert Millan <rmh@aybabtu.com>
8976 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8977 grub_dprintf calls, since they make "debug=all" mode unusable.
8978 (grub_console_checkkey): Likewise.
8980 2008-01-23 Robert Millan <rmh@aybabtu.com>
8982 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8983 `term/i386/pc/at_keyboard.c'.
8984 (pkglib_MODULES): Add `serial.mod'.
8985 (serial_mod_SOURCES): New variable.
8986 (serial_mod_CFLAGS): Likewise.
8987 (serial_mod_LDFLAGS): Likewise.
8989 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
8990 `<grub/powerpc/ieee1275/console.h>'.
8991 (grub_keyboard_controller_init): New function prototype.
8992 (grub_console_checkkey): Likewise.
8993 (grub_console_getkey): Likewise.
8995 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8998 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8999 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9001 2008-01-23 Robert Millan <rmh@aybabtu.com>
9003 * kern/i386/pc/init.c (make_install_device): When memdisk image is
9004 present, "(memdisk)/boot/grub" becomes the default prefix.
9006 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9007 a memdisk tarball with all the modules. Add --overlay=DIR option that
9008 allows users to overlay additional files into the image.
9010 2008-01-23 Robert Millan <rmh@aybabtu.com>
9012 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9013 and `machine/memory.h'.
9014 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9015 (_multiboot_mod_SOURCES): New variable.
9016 (_multiboot_mod_CFLAGS): Likewise.
9017 (_multiboot_mod_LDFLAGS): Likewise.
9018 (multiboot_mod_SOURCES): Likewise.
9019 (multiboot_mod_CFLAGS): Likewise.
9020 (multiboot_mod_LDFLAGS): Likewise.
9022 * include/grub/i386/ieee1275/loader.h: New file.
9024 * include/grub/i386/ieee1275/machine.h: Likewise.
9026 * include/grub/i386/ieee1275/memory.h: Likewise.
9028 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9029 variable declaration.
9030 (grub_os_area_size): Likewise.
9032 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9033 (grub_lower_mem, grub_upper_mem): New variables.
9034 (grub_stop_floppy): New function (just to make
9035 grub_multiboot2_real_boot() happy).
9037 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9038 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9039 (grub_stop): New function.
9040 Include `"../realmode.S"' and `"../loader.S"'.
9042 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9043 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9045 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9046 rely on grub_multiboot2_real_boot() for final boot.
9048 2008-01-22 Robert Millan <rmh@aybabtu.com>
9050 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9051 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9052 device that doesn't look like an SD card.
9053 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9054 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9055 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9056 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9059 2008-01-22 Robert Millan <rmh@aybabtu.com>
9061 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9062 avoid claiming over our own code.
9064 2008-01-22 Bean <bean123ch@gmail.com>
9066 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9067 (jpeg_mod_SOURCES): New variable.
9068 (jpeg_mod_CFLAGS): Likewise.
9069 (jpeg_mod_LDFLAGS): Likewise.
9071 * video/readers/jpeg.c : New file.
9073 2008-01-22 Bean <bean123ch@gmail.com>
9075 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9076 there are no more items.
9078 2008-01-21 Robert Millan <rmh@aybabtu.com>
9080 * kern/mm.c (grub_mm_init_region): Improve debug message.
9082 2008-01-21 Robert Millan <rmh@aybabtu.com>
9084 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9085 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9087 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9089 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9090 Indicates start of upper memory.
9091 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9092 (generate_image): Abort when image size is big enough to corrupt
9095 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9096 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9097 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9098 instead of hardcoding 0xA0000.
9099 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9100 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9101 instead of hardcoding 0xA0000.
9103 2008-01-21 Robert Millan <rmh@aybabtu.com>
9105 * disk/memdisk.c (memdisk_size): New variable.
9106 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9108 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
9109 image to dynamic memory.
9110 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9111 `memdisk_size'. Free memdisk block.
9113 2008-01-21 Robert Millan <rmh@aybabtu.com>
9115 Fix detection of very small filesystems (like tar).
9117 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9118 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9119 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9120 a problem with this disk).
9122 2008-01-21 Robert Millan <rmh@aybabtu.com>
9124 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9125 on grub_biosdisk_rw_standard() error.
9127 2008-01-21 Robert Millan <rmh@aybabtu.com>
9129 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9131 * kern/elf.c: Likewise.
9132 * kern/ieee1275/ieee1275.c: Likewise.
9133 * kern/powerpc/ieee1275/openfw.c: Likewise.
9134 * term/ieee1275/ofconsole.c: Likewise.
9136 2008-01-21 Robert Millan <rmh@aybabtu.com>
9138 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9140 * include/grub/kernel.h (grub_arch_memdisk_addr)
9141 (grub_arch_memdisk_size): Moved from here ...
9143 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9144 (grub_arch_memdisk_size): ... to here.
9146 2008-01-21 Robert Millan <rmh@aybabtu.com>
9148 Mostly based on bugfix from Bean.
9150 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9151 attribute with hook() parameter.
9152 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9154 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9155 attribute with hook() parameter.
9156 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9159 2008-01-21 Robert Millan <rmh@aybabtu.com>
9161 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9162 (pkglib_MODULES): Add `memdisk.mod'.
9163 (memdisk_mod_SOURCES): New variable.
9164 (memdisk_mod_CFLAGS): Likewise.
9165 (memdisk_mod_LDFLAGS): Likewise.
9167 * disk/memdisk.c: New file.
9169 * include/grub/disk.h (grub_disk_dev_id): Add
9170 `GRUB_DISK_DEVICE_MEMDISK_ID'.
9172 * include/grub/i386/pc/kernel.h
9173 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9174 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9175 (grub_kernel_image_size): New variable declaration.
9176 (grub_total_module_size): Likewise.
9177 (grub_memdisk_image_size): Likewise.
9179 * include/grub/i386/pc/memory.h
9180 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9182 * include/grub/kernel.h: Include `<grub/symbol.h>'.
9183 (grub_arch_memdisk_addr): New variable declaration.
9184 (grub_arch_memdisk_size): Likewise.
9186 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9187 (grub_arch_memdisk_size): Likewise.
9189 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9190 (codestart): Replace hardcoded `0x100000' with
9191 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9193 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9194 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
9195 not NULL, append the contents of the file it refers to, at the end of
9196 the compressed kernel image. Initialize `grub_memdisk_image_size'
9197 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9198 (options): Add "memdisk"|'m' option.
9199 (main): Parse --memdisk|-m option, and pass user-provided path as
9200 parameter to generate_image().
9202 2008-01-20 Robert Millan <rmh@aybabtu.com>
9204 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9205 grub_dprintf() calls from here ...
9206 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9208 2008-01-20 Robert Millan <rmh@aybabtu.com>
9210 Fix detection of "real mode" when /options/real-mode? doesn't exist.
9212 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9214 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9215 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9216 `GRUB_IEEE1275_FLAG_REAL_MODE'.
9217 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9219 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9220 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9222 2008-01-19 Robert Millan <rmh@aybabtu.com>
9224 Get rid of confusing function (superseded by
9225 `grub_ieee1275_get_integer_property')
9226 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9228 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9230 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9231 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9232 in native endianness from grub_ieee1275_get_integer_property().
9234 2008-01-19 Robert Millan <rmh@aybabtu.com>
9236 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9237 command after "shut-down", since implementations differ on which
9238 the command for halt is.
9240 2008-01-19 Robert Millan <rmh@aybabtu.com>
9242 * include/grub/i386/linuxbios/console.h: Add header protection.
9243 (grub_keyboard_controller_init): New function prototype.
9244 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9245 (KEYBOARD_COMMAND_READ): Likewise.
9246 (KEYBOARD_COMMAND_WRITE): Likewise.
9247 (KEYBOARD_SCANCODE_SET1): Likewise.
9248 (grub_keyboard_controller_write): New function.
9249 (grub_keyboard_controller_read): Likewise.
9250 (grub_keyboard_controller_init): Likewise.
9252 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9253 (grub_console_init): On coreboot/LinuxBIOS, call
9254 grub_keyboard_controller_init().
9256 2008-01-19 Robert Millan <rmh@aybabtu.com>
9258 PowerPC changes provided by Pavel Roskin.
9260 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9261 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9262 don't rely on cmain() doing it.
9263 * kern/i386/ieee1275/startup.S (_start): Store %eax in
9264 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9266 2008-01-16 Robert Millan <rmh@aybabtu.com>
9268 * include/grub/i386/linuxbios/memory.h
9269 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9270 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9271 receive `table_header' as argument. Instead, probe for it in the
9272 known memory ranges where it can be present.
9273 (grub_available_iterate): Do not pass a fixed `table_header' address
9274 to grub_linuxbios_table_iterate().
9276 2008-01-15 Robert Millan <rmh@aybabtu.com>
9278 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9279 * conf/i386-ieee1275.rmk: New file.
9280 * include/grub/i386/ieee1275/console.h: Likewise.
9281 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9282 * include/grub/i386/ieee1275/kernel.h: Likewise.
9283 * include/grub/i386/ieee1275/time.h: Likewise.
9284 * kern/i386/ieee1275/init.c: Likewise.
9285 * kern/i386/ieee1275/startup.S: Likewise.
9287 2008-01-15 Robert Millan <rmh@aybabtu.com>
9289 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9290 when pointers are 32-bit (but still do set it to one when they are
9293 2008-01-15 Robert Millan <rmh@aybabtu.com>
9295 * include/grub/ieee1275/ieee1275.h
9296 (grub_ieee1275_get_integer_property): New function prototype.
9298 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9299 (grub_ieee1275_get_integer_property): New function. Wraps around
9300 grub_ieee1275_get_property() to handle endianness.
9302 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9303 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9305 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9306 (grub_map): Likewise.
9307 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9309 2008-01-15 Bean <bean123ch@gmail.com>
9311 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9312 (grub_script_execute_cmdline): Reset grub_errno.
9314 * normal/main.c (read_config_file): Reset grub_errno.
9316 * normal/parse.y (script_init): New.
9317 (script): Move function and menuentry here.
9319 (command): Add delimiter at the end of command.
9320 (commands): Adjust to match the new command.
9321 (commandblock): Remove grub_script_lexer_record_start.
9322 (menuentry): Add grub_script_lexer_record_start, use the new commands.
9323 (if): Use the new commands.
9325 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9327 2008-01-15 Robert Millan <rmh@aybabtu.com>
9329 * normal/menu.c (run_menu): Move timeout message from here ...
9330 (print_timeout): ... to here.
9331 (run_menu): Use print_timeout() once during initial draw to print
9332 the whole message, and again in every clock tick to update only
9333 the number of seconds.
9335 2008-01-15 Robert Millan <rmh@aybabtu.com>
9337 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9338 actual size of `available' from grub_ieee1275_get_property(), and
9339 restrict parsing to that bound.
9341 2008-01-15 Christian Franke <franke@computer.org>
9343 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9344 (argp_program_version): Remove variable.
9345 (argp_program_bug_address): Likewise.
9346 (options): Convert from struct argp_option to struct option.
9347 (struct arguments): Remove.
9348 (parse_opt): Remove.
9349 (usage): New function.
9350 (main): Replace struct args members by simple variables.
9351 Replace argp_parse() by getopt_long().
9352 Add switch to evaluate options.
9353 Add missing "(...)" around root_dev in prefix string.
9355 2008-01-14 Robert Millan <rmh@aybabtu.com>
9357 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9358 for grub_ieee1275_exit(), in order to improve portability.
9360 2008-01-14 Robert Millan <rmh@aybabtu.com>
9362 * util/grub.d/10_linux.in (prefix): Define.
9363 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
9365 2008-01-13 Pavel Roskin <proski@gnu.org>
9367 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9368 grub_errno if no errors have been detected.
9370 2008-01-12 Robert Millan <rmh@aybabtu.com>
9372 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9373 (grub_util_get_dev_abstraction): New function prototype.
9375 * util/getroot.c: Include `<grub/util/getroot.h>'
9376 (grub_util_get_grub_dev): Move detection of abstraction type to ...
9377 (grub_util_get_dev_abstraction): ... here (new function).
9379 * util/grub-probe.c: Convert PRINT_* to an enum. Add
9380 `PRINT_ABSTRACTION'.
9381 (probe): Probe for abstraction type when requested.
9382 (main): Understand `--target=abstraction'.
9384 * util/i386/efi/grub-install.in: Add abstraction module to core
9385 image when it is found to be necessary.
9386 * util/i386/pc/grub-install.in: Likewise.
9387 * util/powerpc/ieee1275/grub-install.in: Likewise.
9389 * util/update-grub_lib.in (font_path): Return system path without
9390 converting to GRUB path.
9391 * util/update-grub.in: Convert system path returned by font_path()
9392 to a GRUB path. Use `grub-probe -t abstraction' to determine what
9393 abstraction module is needed for loading fonts (if any). Export
9394 that as `GRUB_PRELOAD_MODULES'.
9395 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9398 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
9400 Remove some unused code from reiserfs.
9402 * fs/reiserfs.c (struct grub_reiserfs_key)
9403 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9404 (struct grub_reiserfs_node_body): Removed.
9405 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9407 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9409 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9411 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9413 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9415 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9417 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9418 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9419 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9421 2008-01-10 Robert Millan <rmh@aybabtu.com>
9423 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9424 Determines if a file is garbage left by packaging systems, etc.
9425 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9426 for processing /etc/grub.d scripts.
9427 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9428 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
9429 as a condition for processing Linux images.
9431 2008-01-10 Pavel Roskin <proski@gnu.org>
9433 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
9434 to compile reiserfs.c on PowerPC.
9436 2008-01-10 Robert Millan <rmh@aybabtu.com>
9438 * kern/device.c (grub_device_iterate): Do not abort device iteration
9439 when one of the devices cannot be opened.
9440 * kern/disk.c (grub_disk_open): Do not account previous failures of
9441 unrelated functions when grub_errno is checked for.
9443 2008-01-08 Robert Millan <rmh@aybabtu.com>
9445 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9446 `! grub_linux_is_bzimage', change order of address comparison to make
9447 it more intuitive, and improve "too big zImage" error message.
9449 2008-01-08 Robert Millan <rmh@aybabtu.com>
9451 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9452 `$(update-grub_DATA)'.
9453 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9456 2008-01-07 Robert Millan <rmh@aybabtu.com>
9458 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9459 which instruction is modified by grub-setup during installation
9460 (since it wasn't obvious by only looking at this file).
9462 2008-01-07 Robert Millan <rmh@aybabtu.com>
9464 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
9465 listing actual TODO items.
9467 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9469 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9471 (grub_reiserfs_get_key_offset): Likewise.
9472 (grub_reiserfs_set_key_offset): Likewise.
9473 (grub_reiserfs_set_key_type): Likewise.
9474 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9476 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9477 better to remove the bitfield version completely.
9479 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9481 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9482 allocated from the heap, due to the fshelp implementation.
9483 (grub_reiserfs_dir): Free NODE, due to the same reason.
9485 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9487 Mostly from Vincent Pelletier:
9489 * fs/reiserfs.c: New file.
9491 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9492 (reiserfs_mod_SOURCES): New variable.
9493 (reiserfs_mod_CFLAGS): Likewise.
9494 (reiserfs_mod_LDFLAGS): Likewise.
9496 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9497 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9498 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9501 2008-01-06 Robert Millan <rmh@aybabtu.com>
9503 * normal/color.c: Remove `<grub/env.h>'.
9505 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
9507 * include/grub/normal.h: Include <grub/env.h>.
9509 2008-01-05 Robert Millan <rmh@aybabtu.com>
9511 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9512 usage example with `(hd0,1)'.
9513 Reported by Samuel Thibault.
9515 2008-01-05 Robert Millan <rmh@aybabtu.com>
9517 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9518 (grub_linux_boot_zimage): Rename to ...
9519 (grub_linux_boot): ... this.
9520 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9521 (grub_linux_boot_zimage): Conditionalize zImage copy.
9523 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9524 (grub_linux_boot_bzimage): Remove prototype.
9525 (grub_linux_boot_zimage): Rename to ...
9526 (grub_linux_boot): ... this.
9528 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9529 (grub_linux_boot): Remove function.
9531 2008-01-05 Robert Millan <rmh@aybabtu.com>
9533 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9534 (grub_env_write_color_highlight): Likewise.
9535 (grub_wait_after_message): Likewise.
9537 * normal/color.c: New file.
9539 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9540 (normal_mod_DEPENDENCIES): Likewise.
9542 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9543 (normal_mod_DEPENDENCIES): Likewise.
9545 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9546 (normal_mod_DEPENDENCIES): Likewise.
9548 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9549 (normal_mod_DEPENDENCIES): Likewise.
9551 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9552 for waiting after a message is printed.
9553 * normal/main.c (read_config_file): Likewise.
9554 (grub_normal_init): Register grub_env_write_color_normal() and
9555 grub_env_write_color_highlight() hooks. Mark `color_normal' and
9556 `color_highlight' variables as global.
9558 * normal/menu.c (grub_wait_after_message): New function.
9559 (grub_color_menu_normal): New variable. Replaces ...
9560 (GRUB_COLOR_MENU_NORMAL): ... this macro.
9561 (grub_color_menu_highlight): New variable. Replaces ...
9562 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9563 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9564 `GRUB_TERM_COLOR_STANDARD'.
9565 (print_message): Use `grub_setcolorstate' to reload colors. Rename
9566 `normal_code' and `highlight_code' to `old_color_normal' and
9567 `old_color_highlight', respectively.
9568 (grub_menu_init_page): Update colors when drawing the menu, based on
9569 `menu_color_normal' and `menu_color_highlight' variables.
9570 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9571 a message is printed.
9573 2008-01-05 Robert Millan <rmh@aybabtu.com>
9575 * kern/env.c (grub_env_context_open): Propagate hooks for global
9576 variables to new context.
9578 * kern/main.c (grub_set_root_dev): Export `root' variable.
9580 2008-01-05 Robert Millan <rmh@aybabtu.com>
9582 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9583 discs unconditionally, since udev and others have options to provide
9586 2008-01-05 Robert Millan <rmh@aybabtu.com>
9588 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9590 2008-01-04 Christian Franke <franke@computer.org>
9592 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9595 2008-01-03 Pavel Roskin <proski@gnu.org>
9597 * kern/i386/linuxbios/init.c: Put "void" to all function
9598 declarations with no arguments.
9599 * kern/powerpc/ieee1275/init.c: Likewise.
9600 * term/i386/pc/at_keyboard.c: Likewise.
9601 * term/i386/pc/vga_text.c: Likewise.
9602 * util/grub-mkdevicemap.c: Likewise.
9604 2008-01-02 Robert Millan <rmh@aybabtu.com>
9606 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9607 message when loaded image is out of bounds.
9608 (grub_multiboot_load_elf64): Likewise.
9610 2008-01-02 Pavel Roskin <proski@gnu.org>
9612 * util/grub.d/10_linux.in: Try version without ".old" when
9613 looking for initrd. It's better to use initrd from the newer
9614 kernel of the same version than no initrd at all.
9616 2008-01-01 Robert Millan <rmh@aybabtu.com>
9618 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9620 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
9622 * include/grub/video.h: Added grub_video_unmap_color and
9623 grub_video_get_active_render_target.
9624 (grub_video_adapter): Added unmap_color and get_active_render_target.
9626 * video/video.c: Added grub_video_unmap_color and
9627 grub_video_get_active_render_target.
9628 (grub_video_get_info): Changed method to accept NULL pointer as an
9629 argument to allow detection of active video adapter.
9631 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9632 grub_video_vbe_unmap_color_int.
9633 Added grub_video_vbe_unmap_color and
9634 grub_video_vbe_get_active_render_target.
9635 (grub_video_vbe_adapter): Added unmap_color and
9636 get_active_render_target.
9638 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9639 with grub_video_vbe_unmap_color_int.
9641 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9642 (DEFAULT_NORMAL_COLOR): Likewise.
9643 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9644 (DEFAULT_FG_COLOR): Removed.
9645 (DEFAULT_BG_COLOR): Likewise.
9646 (DEFAULT_CURSOR_COLOR): Changed value.
9647 (grub_virtual_screen): Added standard_color_setting,
9648 normal_color_setting, highlight_color_setting and term_color.
9649 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9650 (bitmap_width): Added.
9651 (bitmap_height): Likewise.
9653 (set_term_color): Likewise.
9654 (grub_virtual_screen_setup): Changed to use new terminal coloring
9656 (grub_gfxterm_init): Added init for bitmap.
9657 (grub_gfxterm_fini): Added destroy for bitmap.
9658 (redraw_screen_rect): Updated to use background bitmap and new
9660 (scroll_up): Added optimization for case when there is no bitmap.
9661 (grub_gfxterm_cls): Fixed to use correct background color.
9662 (grub_virtual_screen_setcolorstate): Changed to use new terminal
9664 (grub_virtual_screen_setcolor): Likewise.
9665 (grub_virtual_screen_getcolor): Added.
9666 (grub_gfxterm_background_image_cmd): Likewise.
9667 (grub_video_term): Added setcolor and getcolor.
9668 (MOD_INIT): Added registration of background_image command.
9669 (MOD_TERM): Added unregistration for background_image command.
9671 2007-12-30 Pavel Roskin <proski@gnu.org>
9673 * loader/multiboot_loader.c: Fix multiboot command
9674 unregistration. Fix all typos in the word "multiboot".
9676 2007-12-29 Pavel Roskin <proski@gnu.org>
9678 * util/grub.d/10_linux.in: Refactor search for initrd. Add
9679 support for initrd names used in Fedora.
9681 2007-12-26 Bean <bean123ch@gmail.com>
9683 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9684 (cpio_mod_SOURCES): New variable.
9685 (cpio_mod_CFLAGS): Likewise.
9686 (cpio_mod_LDFLAGS): Likewise.
9688 * fs/cpio.c: New file.
9690 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9692 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9694 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9696 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9698 2007-12-25 Robert Millan <rmh@aybabtu.com>
9700 * include/grub/term.h (struct grub_term): Add `getcolor' function.
9701 (grub_getcolor): New function.
9703 * kern/term.c (grub_getcolor): New function.
9704 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9705 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9706 (print_entry): Set normal and highlight colors to
9707 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9708 respectively, before printing and restore them to old
9710 (grub_menu_init_page): Likewise. Fill an additional colored space
9711 that would otherwise be left blank.
9713 * term/efi/console.c (grub_console_getcolor): New function.
9714 (struct grub_console_term.getcolor): New variable.
9715 * term/i386/pc/console.c (grub_console_getcolor): New function.
9716 (struct grub_console_term.getcolor): New variable.
9717 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9718 (struct grub_console_term.getcolor): New variable.
9720 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9721 (struct grub_console_term.setcolor): Remove variable.
9722 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9723 (struct grub_console_term.setcolor): Remove variable.
9724 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9725 (struct grub_console_term.setcolor): Remove variable.
9726 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9727 (struct grub_console_term.setcolor): Remove variable.
9729 2007-12-25 Robert Millan <rmh@aybabtu.com>
9731 * configure.ac: Search for possible unifont.hex locations, and
9732 define UNIFONT_HEX if found.
9734 * Makefile.in (UNIFONT_HEX): Define variable.
9735 (DATA): Rename to ...
9736 (PKGLIB): ... this. Update all users.
9737 (PKGDATA): New variable.
9738 (pkgdata_IMAGES): Rename to ...
9739 (pkglib_IMAGES): ... this. Update all users.
9740 (pkgdata_MODULES): Rename to ...
9741 (pkglib_MODULES): ... this. Update all users.
9742 (pkgdata_PROGRAMS): Rename to ...
9743 (pkglib_PROGRAMS): ... this. Update all users.
9744 (pkgdata_DATA): Rename to ...
9745 (pkglib_DATA): ... this. Update all users.
9746 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9747 (unicode.pff, ascii.pff): New rules.
9748 (all-local): Add `$(PKGDATA)' dependency.
9749 (install-local): Process `$(PKGDATA)'.
9751 * util/update-grub_lib.in (font_path): Search for *.pff files in
9752 a few more locations, including `${pkgdata}'.
9754 2007-12-23 Robert Millan <rmh@aybabtu.com>
9756 Patch from Bean <bean123ch@gmail.com>:
9757 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9760 2007-12-21 Bean <bean123ch@gmail.com>
9762 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9763 (ntfscomp_mod_SOURCES): New variable.
9764 (ntfscomp_mod_CFLAGS): Likewise.
9765 (ntfscomp_mod_LDFLAGS): Likewise.
9767 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9768 (grub_probe_SOURCES): Likewise.
9769 (grub_emu_SOURCES): Likewise.
9771 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9772 (grub_emu_SOURCES): Likewise.
9774 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9775 (grub_emu_SOURCES): Likewise.
9777 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9778 (grub_emu_SOURCES): Likewise.
9780 * fs/ntfs.c (grub_ntfscomp_func): New variable.
9781 (read_run_list): Renamed to grub_ntfs_read_run_list.
9782 (decomp_nextvcn): Moved to ntfscomp.c.
9783 (decomp_getch): Likewise.
9784 (decomp_get16): Likewise.
9785 (decomp_block): Likewise.
9786 (read_block): Likewise.
9787 (read_data): Partially moved to ntfscomp.c.
9788 (fixup): Change unsigned to grub_uint16_t.
9789 (read_mft): Change unsigned long to grub_uint32_t.
9790 (read_attr): Likewise.
9791 (read_data): Likewise.
9792 (read_run_data): Likewise.
9793 (read_run_list): Likewise.
9794 (read_mft): Likewise.
9796 * fs/ntfscomp.c: New file.
9798 * include/grub/ntfs.h: New file.
9800 2007-12-16 Robert Millan <rmh@aybabtu.com>
9802 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9803 IDE disk check, since Linux is known to support 20 IDE disks.
9804 Reported by Colin Watson.
9806 2007-12-15 Bean <bean123ch@gmail.com>
9808 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9809 (lnxboot_img_SOURCES): New variable.
9810 (lnxboot_img_ASFLAGS): Likewise.
9811 (lnxboot_img_LDFLAGS): Likewise.
9813 * boot/i386/pc/lnxboot.S: New file.
9815 2007-11-24 Pavel Roskin <proski@gnu.org>
9817 * configure.ac: Test if '--build-id=none' is supported by the
9818 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
9819 objcopy to generate incorrect binary files (binutils
9820 2.17.50.0.18-1 as shipped by Fedora 8).
9821 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9822 linking, so that build ID doesn't break the test.
9824 2007-11-24 Pavel Roskin <proski@gnu.org>
9826 * include/grub/i386/time.h: use "void" in the argument list
9828 * include/grub/powerpc/time.h: Likewise.
9829 * include/grub/sparc64/time.h: Likewise.
9831 2007-11-18 Christian Franke <franke@computer.org>
9833 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9834 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9835 This fixes the problem that function keys did not work in grub-emu.
9837 2007-11-18 Christian Franke <franke@computer.org>
9839 * disk/host.c (grub_host_open): Remove attribute unused from
9840 name parameter. Add check for "host". This fixes the problem
9841 that grub-emu does not find partitions.
9843 2007-11-18 Christian Franke <franke@computer.org>
9845 * util/hostfs.c (is_dir): New function.
9846 (grub_hostfs_dir): Handle missing dirent.d_type case.
9847 (grub_hostfs_read): Add missing fseek().
9848 (grub_hostfs_label): Clear label pointer. This fixes a crash
9849 of grub-emu on "ls (host)".
9851 2007-11-18 Christian Franke <franke@computer.org>
9853 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9854 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9855 to 64 bit boundary by default.
9857 2007-11-18 Bean <bean123ch@gmail.com>
9859 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9860 (hexdump_mod_SOURCES): New variable.
9861 (hexdump_mod_CFLAGS): Likewise.
9862 (hexdump_mod_LDFLAGS): Likewise.
9864 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9866 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9868 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9870 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9872 * include/grub/hexdump.h: New file.
9874 * commands/hexdump.c: New file.
9876 2007-11-10 Robert Millan <rmh@aybabtu.com>
9878 * commands/i386/pc/play.c (beep_off): Switch order of arguments
9879 in grub_outb() calls.
9880 (beep_on): Likewise.
9882 2007-11-10 Christian Franke <franke@computer.org>
9884 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9885 (grub_menu_run): Likewise.
9887 2007-11-10 Robert Millan <rmh@aybabtu.com>
9889 * include/grub/i386/efi/machine.h: New file.
9890 * include/grub/i386/linuxbios/machine.h: Likewise.
9891 * include/grub/i386/pc/machine.h: Likewise.
9892 * include/grub/powerpc/ieee1275/machine.h: Likewise.
9893 * include/grub/sparc64/ieee1275/machine.h: Likewise.
9895 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9896 (serial_hw_io_addr): New variable.
9897 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9898 instead of `(unsigned short *) 0x400'.
9900 2007-11-10 Bean <bean123ch@gmail.com>
9902 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9904 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9906 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9907 (vga_mod_SOURCES): Added.
9908 (vga_mod_CFLAGS): Likewise.
9909 (vga_mod_LDFLAGS): Likewise.
9911 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9913 (set_map_mask): Likewise.
9914 (set_read_map): Likewise.
9915 (set_read_address): Likewise.
9916 (vga_font): Removed variable.
9917 (get_vga_glyph): Removed function.
9918 (invalidate_char): Likewise.
9919 (write_char): Changed to use grub_font_get_glyph() for font
9921 (grub_vga_putchar): Likewise.
9922 (grub_vga_getcharwidth): Likewise.
9924 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
9926 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9928 (pxeboot_img_LDFLAGS): Likewise.
9929 (diskboot_img_LDFLAGS): Likewise.
9930 (kernel_img_LDFLAGS): Likewise.
9932 2007-11-06 Robert Millan <rmh@aybabtu.com>
9934 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9935 in grub_outb() calls.
9936 (serial_hw_init): Likewise.
9938 2007-11-05 Robert Millan <rmh@aybabtu.com>
9940 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9941 spaces. Skip non-regular files.
9943 2007-11-05 Robert Millan <rmh@aybabtu.com>
9945 * kern/disk.c (grub_disk_firmware_fini)
9946 (grub_disk_firmware_is_tainted): New variables.
9948 * include/grub/disk.h (grub_disk_firmware_fini)
9949 (grub_disk_firmware_is_tainted): Likewise.
9951 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9952 (grub_disk_biosdisk_fini): ... to here.
9953 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9954 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9955 is set. Register grub_disk_biosdisk_fini() in
9956 `grub_disk_firmware_fini'.
9958 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9959 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9960 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9961 to finish existing firmware disk interface.
9963 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9964 (ata_mod_SOURCES): New variable.
9965 (ata_mod_CFLAGS): Likewise.
9966 (ata_mod_LDFLAGS): Likewise.
9968 2007-11-05 Robert Millan <rmh@aybabtu.com>
9970 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
9971 (grub_ata_wait): Reimplement using grub_millisleep().
9973 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9974 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9976 2007-11-03 Marco Gerards <marco@gnu.org>
9978 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9979 (CRTC_ADDR_PORT): New macro.
9980 (CRTC_DATA_PORT): Likewise.
9981 (CRTC_CURSOR): Likewise.
9982 (CRTC_CURSOR_ADDR_HIGH): Likewise.
9983 (CRTC_CURSOR_ADDR_LOW): Likewise.
9984 (update_cursor): New function.
9985 (grub_console_real_putchar): Call `update_cursor'.
9986 (grub_console_gotoxy): Likewise.
9987 (grub_console_cls): Set the default color when clearing the
9989 (grub_console_setcursor): Implemented.
9991 2007-11-03 Marco Gerards <marco@gnu.org>
9993 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9995 (grub_ata_pio_write): Likewise.
9997 (grub_atapi_identify): Wait after issuing an ATA command.
9998 (grub_atapi_packet): Likewise.
9999 (grub_ata_identify): Likewise.
10000 (grub_ata_readwrite): Likewise.
10002 2007-11-03 Marco Gerards <marco@gnu.org>
10004 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10005 (grub_ata_pio_write): Likewise.
10006 (grub_ata_readwrite): Use `grub_error', instead of
10007 returning `grub_errno'.
10009 2007-11-03 Marco Gerards <marco@gnu.org>
10011 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10012 grub_ata_pio_write once for every single sector, instead of for
10015 2007-10-31 Robert Millan <rmh@aybabtu.com>
10017 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10019 * conf/i386-linuxbios.rmk: New file.
10021 * kern/i386/pc/hardware.c: Likewise.
10022 * term/i386/pc/at_keyboard.c: Likewise.
10023 * term/i386/pc/vga_text.c: Likewise.
10025 * include/grub/i386/linuxbios/boot.h: Likewise.
10026 * include/grub/i386/linuxbios/console.h: Likewise.
10027 * include/grub/i386/linuxbios/init.h: Likewise.
10028 * include/grub/i386/linuxbios/kernel.h: Likewise.
10029 * include/grub/i386/linuxbios/loader.h: Likewise.
10030 * include/grub/i386/linuxbios/memory.h: Likewise.
10031 * include/grub/i386/linuxbios/serial.h: Likewise.
10032 * include/grub/i386/linuxbios/time.h: Likewise.
10034 * kern/i386/linuxbios/init.c: Likewise.
10035 * kern/i386/linuxbios/startup.S: Likewise.
10036 * kern/i386/linuxbios/table.c: Likewise.
10038 2007-10-31 Marco Gerards <marco@gnu.org>
10040 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10041 (ata_mod_SOURCES): New variable.
10042 (ata_mod_CFLAGS): Likewise.
10043 (ata_mod_LDFLAGS): Likewise.
10045 * disk/ata.c: New file.
10047 * include/grub/disk.h (grub_disk_dev_id): Add
10048 `GRUB_DISK_DEV_ATA_ID'.
10050 2007-10-31 Robert Millan <rmh@aybabtu.com>
10052 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10053 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10055 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10056 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10058 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10061 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10063 2007-10-27 Robert Millan <rmh@aybabtu.com>
10065 * include/grub/types.h (ULONG_MAX): Define macro.
10067 2007-10-22 Robert Millan <rmh@aybabtu.com>
10069 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
10071 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
10073 2007-10-22 Robert Millan <rmh@aybabtu.com>
10075 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10076 (pkgdata_MODULES): Add `biosdisk.mod'.
10077 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10080 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10081 (grub_biosdisk_init): Replace with ...
10082 (GRUB_MOD_INIT(biosdisk)): ... this.
10083 (grub_biosdisk_fini): Replace with ...
10084 (GRUB_MOD_FINI(biosdisk)): ... this.
10086 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10087 (grub_machine_init): Remove call to grub_biosdisk_init().
10088 (grub_machine_fini): Remove call to grub_machine_fini().
10090 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10092 2007-10-22 Robert Millan <rmh@aybabtu.com>
10094 * include/grub/time.h: New file.
10095 * include/grub/i386/time.h: Likewise.
10096 * include/grub/powerpc/time.h: Likewise.
10097 * include/grub/sparc64/time.h: Likewise.
10099 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10101 (KERNEL_MACHINE_TIME_HEADER): ... this.
10102 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10104 (KERNEL_MACHINE_TIME_HEADER): ... this.
10105 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10107 (KERNEL_MACHINE_TIME_HEADER): ... this.
10109 * kern/i386/efi/init.c: Include `<grub/time.h>'.
10110 (grub_millisleep): New function.
10111 * kern/i386/pc/init.c: Include `<grub/time.h>'.
10112 (grub_millisleep): New function.
10113 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10114 Remove `grub/machine/time.h' include.
10115 (grub_millisleep): New function.
10116 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10117 Remove `grub/machine/time.h' include.
10118 (grub_millisleep): New function.
10120 * include/grub/misc.h (grub_div_roundup): New function.
10122 * kern/misc.c: Include `<grub/time.h>'.
10123 (grub_millisleep_generic): New function.
10125 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10127 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10129 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10130 `machine/time.h'. Add `time.h'.
10131 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10133 2007-10-21 Robert Millan <rmh@aybabtu.com>
10135 * include/grub/misc.h (grub_max): New function.
10137 2007-10-21 Robert Millan <rmh@aybabtu.com>
10139 * util/misc.c (grub_util_info): Call fflush() before returning.
10141 2007-10-20 Robert Millan <rmh@aybabtu.com>
10143 * genmk.rb (Image): Copy `extra_flags' from here ...
10144 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
10146 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10147 to `argc' and `args' arguments.
10149 2007-10-17 Robert Millan <rmh@aybabtu.com>
10151 * kern/i386/loader.S: New file.
10153 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10154 * kern/i386/loader.S (grub_linux_prot_size)... to here.
10155 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10156 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10157 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10158 * kern/i386/loader.S (grub_linux_real_addr)... to here.
10159 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10160 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10161 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10162 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10163 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10164 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10165 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10166 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10168 * kern/i386/realmode.S: New file.
10170 * kern/i386/pc/startup.S (protstack): Moved from here ...
10171 * kern/i386/realmode.S (protstack)... to here.
10172 * kern/i386/pc/startup.S (gdt): Moved from here ...
10173 * kern/i386/realmode.S (gdt)... to here.
10174 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10175 * kern/i386/realmode.S (prot_to_real)... to here.
10177 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10178 `kern/i386/realmode.S'.
10180 2007-10-17 Robert Millan <rmh@aybabtu.com>
10182 * include/grub/i386/loader.h: New file.
10184 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10185 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10186 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10187 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10188 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10189 * include/grub/i386/loader.h (grub_linux_prot_size)
10190 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10191 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10192 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10193 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10195 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10197 2007-10-15 Robert Millan <rmh@aybabtu.com>
10199 * normal/misc.c (grub_normal_print_device_info): Do not probe for
10200 filesystem when dev->disk is unset.
10201 Do probe for filesystem even when dev->disk->has_partitions is set.
10202 In case a filesystem is found, always report it.
10203 In case it isn't, if dev->disk->has_partitions is set, report that
10204 a partition table was found instead of reporting that no filesystem
10205 could be identified.
10207 2007-10-12 Robert Millan <rmh@aybabtu.com>
10209 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10210 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10212 * include/grub/types.h (grub_host_to_target16): New macro.
10213 (grub_host_to_target32): Likewise.
10214 (grub_host_to_target64): Likewise.
10215 (grub_target_to_host16): Likewise.
10216 (grub_target_to_host32): Likewise.
10217 (grub_target_to_host64): Likewise.
10219 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10220 Renamed from to ...
10221 (GRUB_MOD_ALIGN): ...this. Update all users.
10223 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10224 grub_host_to_target32.
10225 Replace grub_be_to_cpu32 with grub_target_to_host32.
10226 (load_modules): Likewise.
10227 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10228 Replace grub_be_to_cpu32 with grub_target_to_host32.
10229 Replace grub_cpu_to_be16 with grub_host_to_target16.
10230 Replace grub_cpu_to_be32 grub_host_to_target32.
10232 2007-10-12 Robert Millan <rmh@aybabtu.com>
10234 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10235 * util/elf/grub-mkimage.c: ... here.
10237 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
10238 `util/powerpc/ieee1275/grub-mkimage.c'.
10240 2007-10-07 Robert Millan <rmh@aybabtu.com>
10242 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10243 and make it easier to figure out.
10244 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10245 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10246 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10247 leave us with less than HEAP_MIN_SIZE total heap.
10248 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10250 2007-10-03 Robert Millan <rmh@aybabtu.com>
10252 * include/grub/i386/io.h: New file.
10253 * commands/i386/pc/play.c (inb): Removed.
10255 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10257 * term/i386/pc/serial.c (inb): Removed.
10259 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10261 * term/i386/pc/vga.c (inb): Removed.
10263 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
10266 2007-10-02 Robert Millan <rmh@aybabtu.com>
10268 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10270 Reported by Marcin Kurek.
10272 2007-09-07 Robert Millan <rmh@aybabtu.com>
10274 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10275 SmartFirmware version updates (as released by Sven Luther), and avoid
10276 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10277 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10280 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10282 From Hitoshi Ozeki:
10283 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10284 when merging two regions.
10286 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10288 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10289 * normal/completion.c (grub_normal_do_completion): Likewise.
10290 Reported by Hitoshi Ozeki.
10292 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10294 Do not use devices at boot in chainloading.
10296 * loader/i386/pc/chainloader.c (boot_drive): New variable.
10297 (boot_part_addr): Likewise.
10298 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10299 with BOOT_DRIVE and BOOT_PART_ADDR.
10300 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10301 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10303 2007-08-29 Robert Millan <rmh@aybabtu.com>
10305 Patch from Simon Peter <dn.tlp@gmx.net>:
10306 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10307 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10308 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
10309 util/i386/pc/grub-setup.c_DEPENDENCIES.
10310 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10311 util/grub-probe.c_DEPENDENCIES.
10312 * conf/powerpc-ieee1275.rmk: Likewise.
10314 2007-08-28 Robert Millan <rmh@aybabtu.com>
10316 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
10317 to tell grub-mkdevicemap how to name devices.
10318 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10321 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10322 util/i386/get_disk_name.c.
10323 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10324 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10325 util/ieee1275/get_disk_name.c.
10327 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10329 * DISTLIST: Add util/i386/get_disk_name.c and
10330 util/ieee1275/get_disk_name.c.
10332 * util/grub-mkdevicemap.c: Replace device naming logic with
10333 grub_util_get_disk_name() calls.
10335 2007-08-20 Robert Millan <rmh@aybabtu.com>
10337 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10338 (so that it works for both plural and singular quantities).
10340 2007-08-05 Robert Millan <rmh@aybabtu.com>
10342 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10343 so that [xz] isn't taken into account when determining order.
10345 2007-08-02 Marco Gerards <marco@gnu.org>
10347 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10348 `include/multiboot2.h', `include/grub/elfload.h',
10349 `include/multiboot.h', `include/grub/multiboot.h',
10350 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10351 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10352 `kern/elf.c', `loader/multiboot_loader.c',
10353 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10354 `loader/i386/pc/multiboot2.c',
10355 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10356 `util/i386/pc/grub-mkrescue.in'. Remove
10357 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10358 `include/grub/i386/pc/util/biosdisk.h' and
10359 `include/grub/powerpc/ieee1275/multiboot.h'.
10361 2007-08-02 Bean <bean123ch@gmail.com>
10363 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10364 (ntfs_mod_SOURCES): New variable.
10365 (ntfs_mod_CFLAGS): Likewise.
10366 (ntfs_mod_LDFLAGS): Likewise.
10368 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10369 (grub_probe_SOURCES): Likewise.
10370 (grub_emu_SOURCES): Likewise.
10372 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10373 (grub_emu_SOURCES): Likewise.
10375 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10376 (grub_emu_SOURCES): Likewise.
10378 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10380 * fs/ntfs.c: New file.
10382 2007-08-02 Bean <bean123ch@gmail.com>
10384 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10386 * file.h (grub_file): Likewise.
10388 * fshelp.h (grub_fshelp_read_file): Likewise.
10390 * util/i386/pc/grub-setup.c (setup): Likewise.
10391 (save_first_sector): Likewise.
10392 (save_blocklists): Likewise.
10394 * fs/affs.c (grub_affs_read_file): Likewise.
10396 * fs/ext2.c (grub_ext2_read_file): Likewise.
10398 * fs/fat.c (grub_fat_read_data): Likewise.
10400 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10402 * fs/hfs.c (grub_hfs_read_file): Likewise.
10404 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10406 * fs/jfs.c (grub_jfs_read_file): Likewise.
10408 * fs/minix.c (grub_minix_read_file): Likewise.
10410 * fs/sfs.c (grub_sfs_read_file): Likewise.
10412 * fs/ufs.c (grub_ufs_read_file): Likewise.
10414 * fs/xfs.c (grub_xfs_read_file): Likewise.
10416 * command/blocklist.c (read_blocklist): Likewise.
10417 (print_blocklist): Likewise.
10419 2007-08-02 Marco Gerards <marco@gnu.org>
10421 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10424 * disk/host.c: New file.
10426 * util/hostfs.c: Likewise.
10428 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10429 return `GRUB_ERR_BAD_FS'.
10430 * fs/sfs.c (grub_sfs_mount): Likewise.
10431 * fs/xfs.c (grub_xfs_mount): Likewise.
10433 * include/grub/disk.h (enum grub_disk_dev_id): Add
10434 `GRUB_DISK_DEVICE_HOST_ID'.
10436 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10438 2007-07-24 Jerone Young <jerone@gmail.com>
10440 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10441 modules for compilation.
10442 * conf/powerpc-ieee1275.rmk: Likewise.
10444 * include/multiboot.h: Move multiboot definitions to one file. Rename
10445 many definitions to not get grub specific.
10446 * include/multiboot2.h: Create header with multiboot 2 definitions.
10447 * include/grub/multiboot.h: Header for grub specific function
10448 prototypes and definitions.
10449 * include/grub/multiboot2.h: Likewise.
10450 * include/grub/multiboot_loader.h: Likewise.
10451 * include/grub/i386/pc/multiboot.h: Removed.
10452 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10454 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10455 and 2 to allow for one multiboot and module commands.
10456 * loader/multiboot2.c: Add multiboot2 functionality.
10457 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10458 and definition names.
10459 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10461 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10462 ieee1275 specific multiboot2 code.
10464 * kern/i386/pc/startup.S: Change headers and definition names for
10465 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10467 2007-07-22 Robert Millan <rmh@aybabtu.com>
10469 * geninitheader.sh: Process file specified in first parameter rather
10470 than hardcoding grub_modules_init.lst.
10471 * geninit.sh: Likewise. Also, construct header name dynamically rather
10472 than hardcoding grub_modules_init.h.
10474 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10475 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
10476 grub_probe_init.[ch] and grub_setup_init.[ch].
10478 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10479 grub_modules_init.h with grub_emu_init.h.
10480 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10481 grub_probe_init.[ch] files.
10482 * conf/i386-efi.rmk: Likewise.
10483 * conf/i386-pc.rmk: Likewise.
10484 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10485 grub_setup_init.[ch] files.
10487 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10488 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
10489 to initialize modules rather than a list of hardcoded functions.
10490 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
10491 grub_init_all() to initialize modules rather than a list of hardcoded
10494 2007-07-22 Robert Millan <rmh@aybabtu.com>
10496 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10497 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10499 2007-07-22 Robert Millan <rmh@aybabtu.com>
10501 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10502 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10503 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10504 flag when running on SmartFirmware.
10505 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10506 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10509 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10510 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10511 rather than decreasing it.
10513 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10514 there's not enough space to do it, fail in the same way as when it
10515 can't be done because there are no partitions.
10517 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10518 when nvsetenv failed.
10520 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10522 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10523 because this rule is automatically generated.
10524 (grub-mkrescue): Removed for the same reason as above.
10526 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
10528 Migrate to GNU General Public License Version 3.
10530 * COPYING: Replaced with the plain text version of GPLv3.
10532 * config.guess: Updated from gnulib.
10533 * config.sub: Likewise.
10535 * geninit.sh: Output a GPLv3 copyright notice.
10536 * geninitheader.sh: Likewise.
10537 * genmodsrc.sh: Likewise.
10538 * gensymlist.sh.in: Likewise.
10540 * boot/i386/pc/boot.S: Upgraded to GPLv3.
10541 * boot/i386/pc/diskboot.S: Likewise.
10542 * boot/i386/pc/pxeboot.S: Likewise.
10543 * commands/blocklist.c: Likewise.
10544 * commands/boot.c: Likewise.
10545 * commands/cat.c: Likewise.
10546 * commands/cmp.c: Likewise.
10547 * commands/configfile.c: Likewise.
10548 * commands/echo.c: Likewise.
10549 * commands/help.c: Likewise.
10550 * commands/ls.c: Likewise.
10551 * commands/search.c: Likewise.
10552 * commands/terminal.c: Likewise.
10553 * commands/test.c: Likewise.
10554 * commands/videotest.c: Likewise.
10555 * commands/i386/cpuid.c: Likewise.
10556 * commands/i386/pc/halt.c: Likewise.
10557 * commands/i386/pc/play.c: Likewise.
10558 * commands/i386/pc/reboot.c: Likewise.
10559 * commands/i386/pc/vbeinfo.c: Likewise.
10560 * commands/i386/pc/vbetest.c: Likewise.
10561 * commands/ieee1275/halt.c: Likewise.
10562 * commands/ieee1275/reboot.c: Likewise.
10563 * commands/ieee1275/suspend.c: Likewise.
10564 * disk/loopback.c: Likewise.
10565 * disk/lvm.c: Likewise.
10566 * disk/raid.c: Likewise.
10567 * disk/efi/efidisk.c: Likewise.
10568 * disk/i386/pc/biosdisk.c: Likewise.
10569 * disk/ieee1275/ofdisk.c: Likewise.
10570 * font/manager.c: Likewise.
10571 * fs/affs.c: Likewise.
10572 * fs/ext2.c: Likewise.
10573 * fs/fat.c: Likewise.
10574 * fs/fshelp.c: Likewise.
10575 * fs/hfs.c: Likewise.
10576 * fs/hfsplus.c: Likewise.
10577 * fs/iso9660.c: Likewise.
10578 * fs/jfs.c: Likewise.
10579 * fs/minix.c: Likewise.
10580 * fs/sfs.c: Likewise.
10581 * fs/ufs.c: Likewise.
10582 * fs/xfs.c: Likewise.
10583 * hello/hello.c: Likewise.
10584 * include/grub/acorn_filecore.h: Likewise.
10585 * include/grub/arg.h: Likewise.
10586 * include/grub/bitmap.h: Likewise.
10587 * include/grub/boot.h: Likewise.
10588 * include/grub/cache.h: Likewise.
10589 * include/grub/device.h: Likewise.
10590 * include/grub/disk.h: Likewise.
10591 * include/grub/dl.h: Likewise.
10592 * include/grub/elfload.h: Likewise.
10593 * include/grub/env.h: Likewise.
10594 * include/grub/err.h: Likewise.
10595 * include/grub/file.h: Likewise.
10596 * include/grub/font.h: Likewise.
10597 * include/grub/fs.h: Likewise.
10598 * include/grub/fshelp.h: Likewise.
10599 * include/grub/gzio.h: Likewise.
10600 * include/grub/hfs.h: Likewise.
10601 * include/grub/kernel.h: Likewise.
10602 * include/grub/loader.h: Likewise.
10603 * include/grub/lvm.h: Likewise.
10604 * include/grub/misc.h: Likewise.
10605 * include/grub/mm.h: Likewise.
10606 * include/grub/net.h: Likewise.
10607 * include/grub/normal.h: Likewise.
10608 * include/grub/parser.h: Likewise.
10609 * include/grub/partition.h: Likewise.
10610 * include/grub/pc_partition.h: Likewise.
10611 * include/grub/raid.h: Likewise.
10612 * include/grub/rescue.h: Likewise.
10613 * include/grub/script.h: Likewise.
10614 * include/grub/setjmp.h: Likewise.
10615 * include/grub/symbol.h: Likewise.
10616 * include/grub/term.h: Likewise.
10617 * include/grub/terminfo.h: Likewise.
10618 * include/grub/tparm.h: Likewise.
10619 * include/grub/types.h: Likewise.
10620 * include/grub/video.h: Likewise.
10621 * include/grub/efi/api.h: Likewise.
10622 * include/grub/efi/chainloader.h: Likewise.
10623 * include/grub/efi/console.h: Likewise.
10624 * include/grub/efi/console_control.h: Likewise.
10625 * include/grub/efi/disk.h: Likewise.
10626 * include/grub/efi/efi.h: Likewise.
10627 * include/grub/efi/pe32.h: Likewise.
10628 * include/grub/efi/time.h: Likewise.
10629 * include/grub/i386/linux.h: Likewise.
10630 * include/grub/i386/setjmp.h: Likewise.
10631 * include/grub/i386/types.h: Likewise.
10632 * include/grub/i386/efi/kernel.h: Likewise.
10633 * include/grub/i386/efi/loader.h: Likewise.
10634 * include/grub/i386/efi/time.h: Likewise.
10635 * include/grub/i386/pc/biosdisk.h: Likewise.
10636 * include/grub/i386/pc/boot.h: Likewise.
10637 * include/grub/i386/pc/chainloader.h: Likewise.
10638 * include/grub/i386/pc/console.h: Likewise.
10639 * include/grub/i386/pc/init.h: Likewise.
10640 * include/grub/i386/pc/kernel.h: Likewise.
10641 * include/grub/i386/pc/loader.h: Likewise.
10642 * include/grub/i386/pc/memory.h: Likewise.
10643 * include/grub/i386/pc/multiboot.h: Likewise.
10644 * include/grub/i386/pc/serial.h: Likewise.
10645 * include/grub/i386/pc/time.h: Likewise.
10646 * include/grub/i386/pc/vbe.h: Likewise.
10647 * include/grub/i386/pc/vbeblit.h: Likewise.
10648 * include/grub/i386/pc/vbefill.h: Likewise.
10649 * include/grub/i386/pc/vbeutil.h: Likewise.
10650 * include/grub/i386/pc/vga.h: Likewise.
10651 * include/grub/ieee1275/ieee1275.h: Likewise.
10652 * include/grub/ieee1275/ofdisk.h: Likewise.
10653 * include/grub/powerpc/libgcc.h: Likewise.
10654 * include/grub/powerpc/setjmp.h: Likewise.
10655 * include/grub/powerpc/types.h: Likewise.
10656 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10657 * include/grub/powerpc/ieee1275/console.h: Likewise.
10658 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10659 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10660 * include/grub/powerpc/ieee1275/loader.h: Likewise.
10661 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10662 * include/grub/powerpc/ieee1275/time.h: Likewise.
10663 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10664 * include/grub/sparc64/libgcc.h: Likewise.
10665 * include/grub/sparc64/setjmp.h: Likewise.
10666 * include/grub/sparc64/types.h: Likewise.
10667 * include/grub/sparc64/ieee1275/console.h: Likewise.
10668 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10669 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10670 * include/grub/sparc64/ieee1275/time.h: Likewise.
10671 * include/grub/util/biosdisk.h: Likewise.
10672 * include/grub/util/getroot.h: Likewise.
10673 * include/grub/util/lvm.h: Likewise.
10674 * include/grub/util/misc.h: Likewise.
10675 * include/grub/util/raid.h: Likewise.
10676 * include/grub/util/resolve.h: Likewise.
10677 * io/gzio.c: Likewise.
10678 * kern/device.c: Likewise.
10679 * kern/disk.c: Likewise.
10680 * kern/dl.c: Likewise.
10681 * kern/elf.c: Likewise.
10682 * kern/env.c: Likewise.
10683 * kern/err.c: Likewise.
10684 * kern/file.c: Likewise.
10685 * kern/fs.c: Likewise.
10686 * kern/loader.c: Likewise.
10687 * kern/main.c: Likewise.
10688 * kern/misc.c: Likewise.
10689 * kern/mm.c: Likewise.
10690 * kern/parser.c: Likewise.
10691 * kern/partition.c: Likewise.
10692 * kern/rescue.c: Likewise.
10693 * kern/term.c: Likewise.
10694 * kern/efi/efi.c: Likewise.
10695 * kern/efi/init.c: Likewise.
10696 * kern/efi/mm.c: Likewise.
10697 * kern/i386/dl.c: Likewise.
10698 * kern/i386/efi/init.c: Likewise.
10699 * kern/i386/efi/startup.S: Likewise.
10700 * kern/i386/pc/init.c: Likewise.
10701 * kern/i386/pc/lzo1x.S: Likewise.
10702 * kern/i386/pc/startup.S: Likewise.
10703 * kern/ieee1275/ieee1275.c: Likewise.
10704 * kern/powerpc/cache.S: Likewise.
10705 * kern/powerpc/dl.c: Likewise.
10706 * kern/powerpc/ieee1275/cmain.c: Likewise.
10707 * kern/powerpc/ieee1275/crt0.S: Likewise.
10708 * kern/powerpc/ieee1275/init.c: Likewise.
10709 * kern/powerpc/ieee1275/openfw.c: Likewise.
10710 * kern/sparc64/cache.S: Likewise.
10711 * kern/sparc64/dl.c: Likewise.
10712 * kern/sparc64/ieee1275/init.c: Likewise.
10713 * kern/sparc64/ieee1275/openfw.c: Likewise.
10714 * loader/efi/chainloader.c: Likewise.
10715 * loader/efi/chainloader_normal.c: Likewise.
10716 * loader/i386/efi/linux.c: Likewise.
10717 * loader/i386/efi/linux_normal.c: Likewise.
10718 * loader/i386/pc/chainloader.c: Likewise.
10719 * loader/i386/pc/chainloader_normal.c: Likewise.
10720 * loader/i386/pc/linux.c: Likewise.
10721 * loader/i386/pc/linux_normal.c: Likewise.
10722 * loader/i386/pc/multiboot.c: Likewise.
10723 * loader/i386/pc/multiboot_normal.c: Likewise.
10724 * loader/powerpc/ieee1275/linux.c: Likewise.
10725 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10726 * normal/arg.c: Likewise.
10727 * normal/cmdline.c: Likewise.
10728 * normal/command.c: Likewise.
10729 * normal/completion.c: Likewise.
10730 * normal/execute.c: Likewise.
10731 * normal/function.c: Likewise.
10732 * normal/lexer.c: Likewise.
10733 * normal/main.c: Likewise.
10734 * normal/menu.c: Likewise.
10735 * normal/menu_entry.c: Likewise.
10736 * normal/misc.c: Likewise.
10737 * normal/parser.y: Likewise.
10738 * normal/script.c: Likewise.
10739 * normal/i386/setjmp.S: Likewise.
10740 * normal/powerpc/setjmp.S: Likewise.
10741 * normal/sparc64/setjmp.S: Likewise.
10742 * partmap/acorn.c: Likewise.
10743 * partmap/amiga.c: Likewise.
10744 * partmap/apple.c: Likewise.
10745 * partmap/gpt.c: Likewise.
10746 * partmap/pc.c: Likewise.
10747 * partmap/sun.c: Likewise.
10748 * term/gfxterm.c: Likewise.
10749 * term/terminfo.c: Likewise.
10750 * term/efi/console.c: Likewise.
10751 * term/i386/pc/console.c: Likewise.
10752 * term/i386/pc/serial.c: Likewise.
10753 * term/i386/pc/vesafb.c: Likewise.
10754 * term/i386/pc/vga.c: Likewise.
10755 * term/ieee1275/ofconsole.c: Likewise.
10756 * util/biosdisk.c: Likewise.
10757 * util/console.c: Likewise.
10758 * util/genmoddep.c: Likewise.
10759 * util/getroot.c: Likewise.
10760 * util/grub-emu.c: Likewise.
10761 * util/grub-mkdevicemap.c: Likewise.
10762 * util/grub-probe.c: Likewise.
10763 * util/lvm.c: Likewise.
10764 * util/misc.c: Likewise.
10765 * util/raid.c: Likewise.
10766 * util/resolve.c: Likewise.
10767 * util/update-grub.in: Likewise.
10768 * util/update-grub_lib.in: Likewise.
10769 * util/grub.d/00_header.in: Likewise.
10770 * util/grub.d/10_hurd.in: Likewise.
10771 * util/grub.d/10_linux.in: Likewise.
10772 * util/i386/efi/grub-install.in: Likewise.
10773 * util/i386/efi/grub-mkimage.c: Likewise.
10774 * util/i386/pc/grub-install.in: Likewise.
10775 * util/i386/pc/grub-mkimage.c: Likewise.
10776 * util/i386/pc/grub-mkrescue.in: Likewise.
10777 * util/i386/pc/grub-setup.c: Likewise.
10778 * util/i386/pc/misc.c: Likewise.
10779 * util/powerpc/ieee1275/grub-install.in: Likewise.
10780 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10781 * util/powerpc/ieee1275/misc.c: Likewise.
10782 * video/bitmap.c: Likewise.
10783 * video/video.c: Likewise.
10784 * video/i386/pc/vbe.c: Likewise.
10785 * video/i386/pc/vbeblit.c: Likewise.
10786 * video/i386/pc/vbefill.c: Likewise.
10787 * video/i386/pc/vbeutil.c: Likewise.
10788 * video/readers/tga.c: Likewise.
10790 2007-07-02 Robert Millan <rmh@aybabtu.com>
10792 * conf/i386-efi.rmk: Replace obsolete reference to
10793 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10794 with util/getroot.c.
10795 * conf/powerpc-ieee1275.rmk: Likewise.
10796 * conf/sparc64-ieee1275.rmk: Likewise.
10798 * util/grub-emu.c (main): Fix unchecked pointer handling.
10800 2007-07-02 Robert Millan <rmh@aybabtu.com>
10802 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10803 invocation to fail, in order to support partition-less media.
10805 * util/i386/pc/grub-install.in: Likewise.
10807 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10808 which fs or partmap modules are needed (akin to its sister scripts).
10810 Also use grub-probe to get rid of unportable /proc/mounts check.
10812 Print the same informational message that the other scripts do, before
10815 2007-06-23 Robert Millan <rmh@aybabtu.com>
10817 * util/update-grub_lib.in (font_path): New function. Determine whether
10818 a font file can be found and, if so, echo the GRUB path to it.
10820 * util/update-grub.in: Handle multiple terminals depending on user
10821 input, platform availability and font file presence. Propagate
10822 variables of our findings to /etc/grub.d/ children.
10824 * util/grub.d/00_header.in: Handle multiple terminals, based on
10825 environment setup by update-grub.
10827 2007-06-23 Robert Millan <rmh@aybabtu.com>
10829 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10831 2007-06-21 Robert Millan <rmh@aybabtu.com>
10833 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10834 indicate end of data section in kernel image.
10835 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10836 GRUB_KERNEL_MACHINE_DATA_END.
10838 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10840 * kern/i386/efi/startup.S: Likewise.
10842 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10843 during image generation. Implement --prefix option to override this
10845 * util/i386/efi/grub-mkimage.c: Likewise.
10847 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10848 code to make path relative to its root into a separate function.
10850 * util/i386/pc/grub-install.in: Use newly provided
10851 make_system_path_relative_to_its_root() to convert ${grubdir}, then
10852 pass the result to grub-install --prefix.
10854 2007-06-13 Robert Millan <rmh@aybabtu.com>
10856 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10857 DEFAULT_DEVICE_MAP.
10858 * util/grub-emu.c: Use above definitions from misc.h instead of
10860 * util/grub-mkdevicemap.c: Likewise.
10861 * util/i386/pc/grub-setup.c: Likewise.
10862 * util/grub-probe.c: Likewise.
10863 (probe): Abort with grub_util_error() when either
10864 grub_guess_root_device or grub_util_get_grub_dev fails.
10866 2007-06-12 Robert Millan <rmh@aybabtu.com>
10868 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10869 "pager" assignment.
10870 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10872 * util/grub-probe.c (probe): Likewise for "drive_name".
10874 2007-06-11 Robert Millan <rmh@aybabtu.com>
10876 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10877 not just the cdrom one.
10879 2007-06-11 Robert Millan <rmh@aybabtu.com>
10881 * util/i386/pc/grub-mkrescue.in: Add "set -e".
10882 Add --pkglibdir=DIR option to override pkglibdir.
10883 Mention --image-type=TYPE in help output.
10884 Fix --grub-mkimage (it was a no-op).
10885 Abort gracefully when no parameter is given.
10887 2007-06-11 Robert Millan <rmh@aybabtu.com>
10889 * util/i386/pc/grub-mkrescue.in: New file.
10890 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
10891 * Makefile.in: Handle bin_SCRIPTS.
10893 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
10895 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10896 list of video modes.
10898 2007-06-06 Robert Millan <rmh@aybabtu.com>
10900 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10901 file doesn't exist, or if it is in a filesystem grub can't read.
10903 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
10904 not abort if GRUB_DRIVE could not be defined. Rearrange generated
10905 header comment to fit in 80 columns when the variables are resolved.
10907 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10908 could be identified by update-grub. Remove redundant check for
10909 unifont.pff existence (since convert_system_path_to_grub_path now
10912 2007-06-04 Robert Millan <rmh@aybabtu.com>
10914 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10916 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10918 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10920 2007-06-04 Robert Millan <rmh@aybabtu.com>
10922 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10924 * include/grub/partition.h: Declare grub_apple_partition_map_init and
10925 grub_apple_partition_map_fini.
10928 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10929 to access >2 TiB disks).
10931 Print disk->total_sectors with %llu instead of %lu, since this
10932 variable is always 64-bit (prevents wrong disk size from being displayed
10933 on either >2 TiB disk or big-endian CPU).
10935 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10936 into a generic case that supports all (sane) partition maps.
10938 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10941 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10942 and grub_apple_partition_map_fini() after that.
10944 2007-06-01 Robert Millan <rmh@aybabtu.com>
10946 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10948 * util/grub.d/00_header.in: Only enable gfxterm when
10949 convert_system_path_to_grub_path() succeeds.
10951 2007-05-20 Robert Millan <rmh@aybabtu.com>
10953 * util/update-grub_lib.in: New file.
10954 * DISTLIST: Add update-grub_lib.in.
10955 * conf/common.rmk: Generate update-grub_lib and install it in
10957 * Makefile.in: Add install routine for $(lib_DATA).
10959 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10960 function provided by update-grub_lib to support arbitrary paths of
10962 * util/update-grub.in: Use convert_system_path_to_grub_path() to
10963 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10965 2007-05-19 Robert Millan <rmh@aybabtu.com>
10967 * commands/i386/cpuid.c: New module.
10968 * DISTLIST: Add it.
10969 * conf/i386-efi.rmk: Enable cpuid.mod.
10970 * conf/i386-pc.rmk: Likewise.
10972 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10974 * kern/disk.c (grub_disk_read): Check return value of
10977 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
10979 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10981 * disk/raid.c (grub_raid_open): Likewise.
10983 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10985 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10986 stack instead of on the heap.
10988 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10989 before doing a read on it.
10991 * configure.ac: Only use -fno-stack-protector for the target
10994 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
10996 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10997 __attribute_ ((unused)) to mode_type argument.
10999 * util/getroot.c (grub_guess_root_device): Fix #endif.
11001 * kern/misc.c (memcmp): Fix prototype.
11003 * include/grub/partition.h [GRUB_UTIL]
11004 (grub_gpt_partition_map_init): Add prototype.
11005 (grub_gpt_partition_map_fini): Likewise.
11007 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11008 at the right place.
11010 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11011 (grub_fat_read_data): Likewise.
11012 (grub_fat_find_dir): Likewise.
11014 * font/manager.c (find_glyph): Make table a const.
11015 (grub_font_get_glyph): Remove bitmap from if statement.
11017 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
11019 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11020 code, first search for device in /dev/mapper, then in /dev.
11021 (grub_util_get_grub_dev): New function.
11022 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11024 * util/grub-probe.c (probe): Remove check for RAID, call
11025 grub_util_get_grub_dev() instead of
11026 grub_util_biosdisk_get_grub_dev().
11027 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11028 grub_util_biosdisk_get_grub_dev().
11029 * util/i386/pc/grub-setup.c (main): Likewise.
11031 2007-05-16 Robert Millan <rmh@aybabtu.com>
11033 * DISTLIST: Update for the latest changes.
11034 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11035 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11036 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11037 grub/util/biosdisk.h.
11038 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11039 grub/util/biosdisk.h.
11041 2007-05-16 Robert Millan <rmh@aybabtu.com>
11043 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11045 2007-05-16 Robert Millan <rmh@aybabtu.com>
11047 * util/i386/efi/grub-install.in: New.
11048 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11049 newly added grub-install.
11050 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11052 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11053 grub/util/biosdisk.h.
11054 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11055 grub/util/biosdisk.h.
11057 2007-05-16 Robert Millan <rmh@aybabtu.com>
11059 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11060 * include/grub/util/biosdisk.h: ... here.
11061 * util/i386/pc/biosdisk.c: Moved to ...
11062 * util/biosdisk.c: ... here.
11063 * util/i386/pc/getroot.c: Moved to ...
11064 * util/getroot.c: ... here.
11065 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11066 * util/grub-mkdevicemap.c: ... here.
11067 * util/i386/pc/grub-probe.c: Moved to ...
11068 * util/grub-probe.c: ... here.
11070 2007-05-15 Robert Millan <rmh@aybabtu.com>
11072 * util/update-grub.in: Remove duplicated line in grub.cfg header
11075 2007-05-13 Robert Millan <rmh@aybabtu.com>
11077 * util/update-grub.in: Fix a few assumptions about the devices holding
11078 /, /boot and /boot/grub being the same.
11079 * util/grub.d/00_header.in: Likewise.
11080 * util/grub.d/10_hurd.in: Likewise.
11081 * util/grub.d/10_linux.in: Likewise.
11083 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11084 patterns. Use that to define the `.old' suffix as older than `'.
11086 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11088 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11089 the grub.cfg header message.
11091 2007-05-11 Robert Millan <rmh@aybabtu.com>
11093 * util/update-grub.in: Create device.map if it doesn't already exist,
11094 before attempting to run grub-probe.
11095 Check for grub-probe and grub-mkdevicemap with the same code
11096 grub-install is using.
11099 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
11101 * Makefile.in: Add the datarootdir autoconf variable.
11103 2007-05-09 Robert Millan <rmh@aybabtu.com>
11105 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11106 fail gracefully if dev->disk->partition == NULL.
11108 2007-05-07 Robert Millan <rmh@aybabtu.com>
11110 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11111 determine partition map module.
11112 * util/i386/pc/grub-install.in: Use this feature to decide which
11113 partition module to load, instead of hardcoding pc and gpt.
11115 2007-05-07 Robert Millan <rmh@aybabtu.com>
11117 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11118 source directory differs from build directory.
11120 2007-05-05 Robert Millan <rmh@aybabtu.com>
11122 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11125 2007-05-05 Robert Millan <rmh@aybabtu.com>
11127 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11129 2007-05-05 Robert Millan <rmh@aybabtu.com>
11131 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11132 command-line arguments via ${GRUB_CMDLINE_LINUX}.
11134 2007-05-05 Robert Millan <rmh@aybabtu.com>
11136 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11137 (grub_probe_SOURCES): Likewise.
11138 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11139 GPT and initialize dos_part and bsd_part accordingly.
11140 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11142 (main): Activate gpt module for use during partition identification,
11143 and deactivate it afterwards.
11144 * util/i386/pc/grub-install.in: Add gpt module to core.img.
11145 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11146 partition identification, and deactivate it afterwards.
11148 2007-05-05 Robert Millan <rmh@aybabtu.com>
11150 * term/i386/pc/console.c (grub_console_fini): Call
11151 grub_term_set_current() before grub_term_unregister().
11153 2007-05-04 Robert Millan <rmh@aybabtu.com>
11155 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11156 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11157 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
11158 and update-grub_DATA.
11159 * conf/common.rmk: Build and install update-grub components.
11160 * conf/common.mk: Regenerate.
11161 * util/update-grub.in: New. Core of update-grub.
11162 * util/grub.d/00_header.in: New. Generates grub.cfg header.
11163 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
11164 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
11165 * util/grub.d/README: New. Document grub.d directory layout.
11167 2007-05-01 Robert Millan <rmh@aybabtu.com>
11169 * util/grub-emu.c: Move initialization functions
11170 grub_util_biosdisk_init() and grub_init_all() before
11171 grub_util_biosdisk_get_grub_dev(), which relies on them.
11173 2007-04-19 Robert Millan <rmh@aybabtu.com>
11175 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11178 2007-04-18 Jerone Young <jerone@gmail.com>
11180 * kernel/elf.c: Add missing parenthesis for conditional statement
11183 2007-04-10 Jerone Young <jerone@gmail.com>
11185 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11186 continue on and look for device node with real device name.
11188 2007-04-10 Jerone Young <jerone@gmail.com>
11190 * configure.ac: Add argument for autoconf to use transformation
11192 * Makefile.in: Add autoconf package transformation code.
11193 * util/i386/pc/grub-install.in: Likewise.
11194 * util/powerpc/ieee1275/grub-install.in: Likewise.
11196 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11198 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11199 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11200 (EXT2_REVISION): Likewise.
11201 (EXT2_INODE_SIZE): Likewise.
11202 (struct grub_ext2_block_group): Added a missing member
11204 (grub_ext2_read_inode): Divide by the inode size in a superblock
11205 instead of 128 to obtain INODES_PER_BLOCK.
11206 Use the macro EXT2_INODE_SIZE instead of directly using
11207 SBLOCK->INODE_SIZE.
11209 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11211 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11212 superblock instead of the structure size to compute an
11213 offset. This fixes the problem that GRUB could not read a
11214 filesystem when inode size is different from 128-byte.
11216 2007-03-05 Marco Gerards <marco@gnu.org>
11218 * normal/main.c (read_config_file): When "menu" is not set, create
11219 an initial context.
11221 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11223 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11224 (HEAP_LIMIT): New macro.
11225 (grub_claim_heap): Claim memory up to `heaplimit'.
11227 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
11229 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11230 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11231 (_start): Likewise.
11232 (grub_arch_modules_addr): Return address after `_end'.
11233 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11234 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11235 (add_segments): Calculate `_end' from phdr size and location.
11236 (ALIGN_UP): Moved to ...
11237 * include/grub/misc.h: here.
11238 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11240 (GRUB_IEEE1275_MODULE_BASE): Removed.
11242 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11244 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11247 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11249 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11251 (grub_elf64_load_hook_t): Likewise.
11252 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11255 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
11257 * kern/mm.c: Update copyright.
11258 (grub_mm_debug): Correct syntax error.
11259 (grub_mm_dump_free): New function.
11260 (grub_debug_free): Call `grub_free'.
11261 * include/grub/mm.h: Update copyright.
11262 (grub_mm_dump_free): Add declaration.
11264 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11266 * include/grub/ieee1275/ieee1275.h: Update copyright.
11267 * kern/powerpc/ieee1275/init.c: Likewise.
11268 * kern/powerpc/ieee1275/openfw.c: Likewise.
11270 * loader/powerpc/ieee1275/linux.c: Likewise.
11271 * include/grub/elfload.h: Likewise.
11272 * kern/elf.c: Likewise.
11273 (grub_elf32_load): Pass `base' and `size' parameters. Update all
11275 (grub_elf64_load): Likewise.
11276 (grub_elf32_load_segment): Move to a nested function.
11277 (grub_elf64_load_segment): Likewise.
11279 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
11281 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11283 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11284 (grub_heap_len): Likewise.
11285 (HEAP_SIZE): New macro.
11286 (grub_claim_heap): New function.
11287 (grub_machine_init): Don't claim heap directly. Call
11289 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11290 (grub_available_iterate): New function.
11292 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
11294 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11295 * configure.ac: Use it for testing the HOST and TARGET compilers.
11297 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
11299 * Makefile.in (enable_grub_emu): New variable.
11300 * configure.ac (--enable-grub-emu): New option.
11301 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11302 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11303 * conf/i386-pc.rmk: Likewise.
11304 * conf/powerpc-ieee1275.rmk: Likewise.
11305 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11307 2006-12-12 Marco Gerards <marco@gnu.org>
11309 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11311 * kern/env.c (grub_env_unset): Don't free the member `value' when
11312 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11315 * normal/main.c (current_menu): Removed.
11316 (free_menu): Unset the `menu' environment variable.
11317 (grub_normal_menu_addentry): Make use of the environment variable
11318 `menu', instead of using the global `current_menu'. Allocate
11319 memory for the sourcecode of this entry.
11320 (read_config_file): New argument `nested', changed all callers.
11321 Only in the case of a new context, initialize a new menu. Set the
11322 `menu' environment variable.
11323 (grub_normal_execute): Don't set and unset the environment
11324 variable `menu' here anymore. Only free the menu when leaving the
11327 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11330 2006-12-11 Marco Gerards <marco@gnu.org>
11332 * normal/menu_entry.c (run): Fix off by one bug so the last line
11333 is executed. Move the loader check to outside the loop.
11335 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
11337 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11339 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
11341 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11342 the number of sectors. Reported by Andrey Shuvikov
11343 <mr_hyro@yahoo.com>.
11345 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
11347 * kern/disk.c (grub_disk_read): When there is a read error, always
11348 try to read only the necessary data.
11350 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11352 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11354 [GRUB_UTIL] (grub_raid_fini): Likewise.
11355 [GRUB_UTIL] (grub_lvm_init): Likewise.
11356 [GRUB_UTIL] (grub_lvm_fini): Likewise.
11357 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11358 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11359 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11360 and grub_raid_fini().
11362 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11364 * include/grub/types.h (__unused): Rename to UNUSED.
11365 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11366 (grub_elf64_size): Likewise.
11368 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11370 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11371 grub_error_push and grub_error_pop in the error-handling path.
11372 (grub_elf32_load_segment): Only call grub_file_read with non-zero
11375 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
11377 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11378 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11379 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11380 (kernel_elf_SOURCES): Likewise.
11381 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11382 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11383 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11384 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11385 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11386 (elf_mod_SOURCES): New variable.
11387 (elf_mod_CFLAGS): Likewise.
11388 (elf_mod_LDFLAGS): Likewise.
11389 * include/grub/types.h (__unused): New macro.
11390 * include/grub/elfload.h: New file.
11391 * kern/elf.c: Likewise.
11392 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11393 (ELF32_LOADMASK): New macro.
11394 (ELF64_LOADMASK): Likewise.
11395 (vmlinux): Removed.
11396 (grub_linux_load32): New function.
11397 (grub_linux_load64): Likewise.
11398 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11399 Use grub_elf_t instead of grub_file_t.
11401 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
11403 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11404 `catch_result' to struct set_color_args.
11406 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11408 * normal/menu.c: Include grub/script.h.
11409 * normal/menu_entry.c: Likewise.
11410 * include/grub/normal.h: Do not include grub/script.h.
11412 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11414 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11416 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11418 * kern/disk.c (grub_disk_open): Print debug messages when opening a
11420 (grub_disk_close): Print debug messages when closing a disk.
11421 (grub_disk_read): Print debug messages when disk read fails.
11422 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11424 * kern/partition.c: Include misc.h.
11425 (grub_partition_iterate): Print debug messages when detecting
11428 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
11430 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11432 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11434 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
11436 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11437 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11439 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
11441 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11442 instead of sizeof(lv). Patch by Michael Guntsche.
11444 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
11446 * disk/lvm.c: Rename VGS to VG_LIST.
11447 (grub_lvm_iterate): Change VGS->LV to VG-LV.
11448 (grub_lvm_open): Likewise.
11449 Thanks to Michael Guntsche for finding this bug.
11451 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11453 * configure.ac (AC_INIT): Bumped to 1.95.
11455 2006-10-14 Robert Millan <rmh@aybabtu.com>
11457 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11458 with "/dev/.static/dev/md".
11460 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11462 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11463 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11464 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11465 DRIVE_NAME are always freed.
11467 * util/i386/pc/biosdisk.c (make_device_name): Add one into
11468 DOS_PART, as a DOS partition is counted from one instead of zero
11469 now. Reported by Robert Millan.
11471 2006-10-14 Robert Millan <rmh@aybabtu.com>
11473 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11474 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11475 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11476 string returned by grub_guess_root_device.
11477 * util/i386/pc/grub-setup.c: Likewise.
11478 * util/i386/pc/grub-probefs.c: Likewise.
11480 * util/i386/pc/grub-probefs.c: Rename to ...
11481 * util/i386/pc/grub-probe.c: ... this.
11482 * DISTLIST: Remove grub-probefs, add grub-probe.
11483 * conf/i386-efi.rmk: Likewise.
11484 * conf/i386-pc.rmk: Likewise.
11485 * util/i386/pc/grub-install.in: Likewise.
11487 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11488 choose which information we want to print.
11490 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
11492 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11493 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11494 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11495 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11496 video/readers/tga.c and video/i386/pc/vbeutil.c.
11498 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
11500 Added support for RAID and LVM.
11502 * disk/lvm.c: New file.
11503 * disk/raid.c: Likewise.
11504 * include/grub/lvm.h: Likewise.
11505 * include/grub/raid.h: Likewise.
11506 * include/grub/util/lvm.h: Likewise.
11507 * include/grub/util/raid.h: Likewise.
11508 * util/lvm.c: Likewise.
11509 * util/raid.c: Likewise.
11511 * include/grub/disk.h (grub_disk_dev_id): Add
11512 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11513 (grub_disk_get_size): New prototype.
11514 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11515 returns a partition.
11516 (grub_disk_get_size): New function.
11518 * kern/i386/pc/init.c (make_install_device): Copy the prefix
11519 verbatim if grub_install_dos_part is -2.
11521 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11524 * util/i386/pc/grub-setup.c (setup): New argument
11525 MUST_EMBED. Force embedding of GRUB when the argument is
11526 true. Close FILE before returning.
11527 (main): Add support for RAID and LVM.
11529 * conf/common.rmk: Add RAID and LVM modules.
11530 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11532 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11534 * kern/misc.c (grub_strstr): New function.
11535 * include/grub/misc.h (grub_strstr): New prototype.
11537 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
11539 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11541 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
11543 * kern/misc.c (grub_strtoull): Guess the base only if not
11546 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11548 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11551 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11553 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11555 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11556 Remove `flags' argument. All callers changed.
11557 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11558 (IEEE1275_IHANDLE_INVALID): New variable.
11559 (IEEE1275_CELL_INVALID): New variable.
11560 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11561 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11562 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11563 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11564 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11565 codes from Open Firmware. All callers updated.
11566 (grub_ieee1275_next_property): Directly return Open Firmware return
11568 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11569 Standardize error checking from `grub_ieee1275_get_property'.
11570 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11571 `devalias' to `aliases'. Correct comments. Consolidate error paths.
11573 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
11575 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11576 `instance_to_package_args' to `instance_to_path_args'.
11578 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11579 `grub_ieee1275_chosen'.
11581 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11582 `grub_ieee1275_interpret'.
11584 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11586 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11588 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
11590 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11591 (__cmpdi): Likewise.
11593 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11594 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
11597 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11599 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11600 to type `grub_ssize_t'.
11601 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11603 2006-09-22 Marco Gerards <marco@gnu.org>
11605 * normal/script.c (grub_script_create_cmdmenu): Skip leading
11608 2006-09-22 Marco Gerards <marco@gnu.org>
11610 * commands/echo.c: New file.
11612 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11614 * conf/common.rmk (echo_mod_SOURCES): New variable.
11615 (echo_mod_CFLAGS): Likewise.
11616 (echo_mod_LDFLAGS): Likewise.
11618 2006-09-22 Marco Gerards <marco@gnu.org>
11620 * normal/main.c (get_line): Malloc memory instead of using
11621 preallocated memory. Removed the arguments `cmdline' and
11622 `max_len'. Updated all callers.
11624 2006-09-22 Marco Gerards <marco@gnu.org>
11626 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11627 (normal_mod_DEPENDENCIES): Likewise.
11629 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11630 (normal_mod_DEPENDENCIES): Likewise.
11632 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11634 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
11636 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11638 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11639 (normal_mod_DEPENDENCIES): Likewise.
11640 * conf/i386-pc.mk: Regenerate.
11641 * conf/i386-efi.mk: Likewise
11642 * conf/common.mk: Likewise.
11643 * conf/powerpc-ieee1275.mk: Likewise.
11644 * conf/sparc64-ieee1275.mk: Likewise.
11646 2006-09-22 Robert Millan <rmh@aybabtu.com>
11648 Sync with i386 version.
11649 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11650 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11652 2006-09-21 Robert Millan <rmh@aybabtu.com>
11654 Import from GRUB Legacy (lib/device.c):
11655 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11656 (init_device_map) [__linux__]: Add support for I2O devices.
11658 2006-09-14 Marco Gerards <marco@gnu.org>
11660 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11663 2006-09-14 Robert Millan <rmh@aybabtu.com>
11665 * util/i386/pc/grub-install.in: Skip menu.lst when removing
11668 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11670 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11671 before adding it to device.map.
11673 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
11675 * genmk.rb: Let GCC generate dependencies the first time it
11676 compiles a file; using the -MD option.
11677 * conf/common.mk: Regenerate.
11678 * conf/i386-pc.mk: Likewise.
11679 * conf/i386-efi.mk: Likewise.
11680 * conf/powerpc-ieee1275.mk: Likewise.
11681 * conf/sparc64-ieee1275.mk: Likewise.
11683 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
11685 Move the prototypes of grub_setjmp and grub_longjmp to
11686 cpu/setjmp.h, so that each architecture may specify different
11689 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11690 (grub_longjmp): Likewise.
11691 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11692 (grub_longjmp): Likewise.
11693 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11694 (grub_longjmp): Likewise.
11696 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11697 [!GRUB_UTIL] (grub_longjmp): Removed.
11699 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
11701 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11702 "color!" method does not return any value.
11704 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11706 * include/grub/bitmap.h: New file.
11708 * include/grub/i386/pc/vbeutil.h: Likewise.
11710 * video/bitmap.c: Likewise.
11712 * video/readers/tga.c: Likewise.
11714 * video/i386/pc/vbeutil.c: Likewise.
11716 * commands/videotest.c: Code cleanup and updated to reflect to new
11719 * term/gfxterm.c: Likewise.
11721 * video/video.c: Likewise.
11723 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11724 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11725 (bitmap_mod_SOURCES): New entry.
11726 (bitmap_mod_CFLAGS): Likewise.
11727 (bitmap_mod_LDFLAGS): Likewise.
11728 (tga_mod_SOURCES): Likewise.
11729 (tga_mod_CFLAGS): Likewise.
11730 (tga_mod_LDFLAGS): Likewise.
11732 * include/grub/video.h (grub_video_blit_operators): New enum type.
11733 (grub_video_render_target): Changed as forward declaration and moved
11734 actual definition to be video driver specific.
11735 (grub_video_adapter.blit_bitmap): Added blitting operator.
11736 (grub_video_adapter.blit_render_target): Likewise.
11737 (grub_video_blit_bitmap): Likewise.
11738 (grub_video_blit_render_target): Likewise.
11740 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11741 driver specific render target definition.
11742 (grub_video_vbe_map_rgba): Added driver internal helper.
11743 (grub_video_vbe_unmap_color): Updated to use
11744 grub_video_i386_vbeblit_info.
11745 (grub_video_vbe_get_video_ptr): Likewise.
11747 * include/grub/i386/pc/vbeblit.h
11748 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11749 grub_video_i386_vbeblit_info.
11750 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11751 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11752 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11753 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11754 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11755 (grub_video_i386_vbeblit_index_index): Likewise.
11756 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11757 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11758 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11759 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11761 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11764 * video/i386/pc/vbeblit.c: Updated to reflect changes on
11765 include/grub/i386/pc/vbeblit.h.
11767 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11768 Updated to use grub_video_i386_vbeblit_info.
11769 (grub_video_i386_vbefill_R8G8B8): Likewise.
11770 (grub_video_i386_vbefill_index): Likewise.
11771 (grub_video_i386_vbefill): Added generic filler.
11773 * video/i386/pc/vbefill.c: Updated to reflect changes on
11774 include/grub/i386/pc/vbefill.h.
11776 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11777 grub_video_i386_vbeblit_info.
11778 (grub_video_vbe_unmap_color): Likewise.
11779 (grub_video_vbe_blit_glyph): Likewise.
11780 (grub_video_vbe_scroll): Likewise.
11781 (grub_video_vbe_draw_pixel): Removed function.
11782 (grub_video_vbe_get_pixel): Likewise.
11783 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11784 updated code to use it.
11785 (common_blitter): Added common blitter for render target and bitmap.
11786 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11787 (grub_video_vbe_blit_render_target): Likewise.
11789 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
11791 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11792 is in text mode if there is no console control protocol instance
11795 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11797 * include/grub/video.h: Code cleanup.
11799 * include/grub/i386/pc/vbe.h: Likewise.
11801 * video/i386/pc/vbe.c: Likewise.
11803 * video/i386/pc/vbeblit.c: Likewise.
11805 * video/i386/pc/vbefill.c: Likewise.
11807 * video/video.c: Likewise. Also added more comments.
11809 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
11811 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11812 (struct grub_biosdisk_dap): Likewise.
11814 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
11815 linkage settings for all functions.
11817 2006-07-12 Marco Gerards <marco@gnu.org>
11819 * configure.ac (--enable-mm-debug): Fix typo.
11821 * genkernsyms.sh.in: Use proper quoting for `CC'.
11823 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
11825 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11826 (normal_mod_ASFLAGS): Remove "-m32".
11828 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
11830 * util/misc.c: Include config.h.
11831 [!HAVE_MEMALIGN]: Do not include malloc.h.
11832 (grub_memalign): Use posix_memalign, if present. Then, use
11833 memalign, if present. Otherwise, emit an error.
11835 * util/grub-emu.c: Do not include malloc.h.
11837 * include/grub/util/misc.h: Include unistd.h. This is required for
11838 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11839 D. Eades III <hde@foobar-qux.org>.
11841 * configure.ac (AC_GNU_SOURCE): Added.
11842 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11845 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
11847 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11848 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11850 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
11852 * include/grub/types.h (grub_host_addr_t): Rename to
11853 grub_target_addr_t.
11854 (grub_host_off_t): Rename to grub_target_off_t.
11855 (grub_host_size_t): Rename to grub_target_size_t.
11856 (grub_host_ssize_t): Rename to grub_target_ssize_t.
11857 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11859 * include/grub/kernel.h (struct grub_module_header): Change type
11860 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11861 (grub_module_info): Likewise.
11863 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11865 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11866 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11867 Velazquez <jesus.velazquez@gmail.com>.
11869 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
11871 Count partitions from 1 instead of 0 in the string representation
11872 of partitions. Still use 0-based internally.
11874 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11875 (sun_partition_map_iterate): Use grub_partition_t instead of
11876 struct grub_partition *. Cast DESC->START_CYLINDER to
11877 grub_uint64_t after converting the endian.
11878 (sun_partition_map_probe): Subtract 1 for PARTNUM.
11879 (sun_partition_map_get_name): Add 1 to P->INDEX.
11881 * partmap/pc.c (grub_partition_parse): Subtract 1 for
11883 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11885 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11886 zero instead of one.
11887 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11888 (gpt_partition_map_get_name): Add 1 into P->INDEX.
11890 * partmap/apple.c (apple_partition_map_iterate): Change the type
11891 of POS to unsigned.
11892 (apple_partition_map_probe): Subtract 1 for PARTNUM.
11893 (apple_partition_map_get_name): Add 1 into P->INDEX.
11895 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11896 of POS to unsigned.
11897 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11898 calculate the offset of a partition.
11899 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11900 (amiga_partition_map_get_name): Add 1 into P->INDEX.
11902 * partmap/acorn.c (acorn_partition_map_find): Change the type of
11903 SECTOR to grub_disk_addr_t.
11904 (acorn_partition_map_iterate): Likewise.
11905 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11906 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11908 (acorn_partition_map_get_name): Add 1 into P->INDEX.
11910 * kern/i386/pc/init.c (make_install_device): Add 1 into
11911 GRUB_INSTALL_DOS_PART.
11913 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11916 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11918 Clean up the code to support 64-bit addressing in disks and
11919 files. This change is not enough for filesystems yet.
11921 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11922 type of "start" to grub_uint64_t.
11923 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11924 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11925 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11928 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11929 to grub_disk_addr_t.
11931 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11934 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11936 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11939 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11941 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11943 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11945 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11946 to grub_off_t, to detect an error from grub_file_seek.
11947 (grub_multiboot_load_elf32): Likewise.
11949 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11950 maximum unsigned long value when an overflow is detected.
11951 (grub_strtoull): New function.
11952 (grub_divmod64): Likewise.
11953 (grub_lltoa): use grub_divmod64.
11955 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11957 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11958 the pointer to next character. Use grub_strtoull instead of
11960 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11961 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11964 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11965 return value is signed.
11966 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11967 test if OFFSET is less than zero, as OFFSET is unsigned now.
11969 * kern/disk.c (struct grub_disk_cache): Change the type of
11970 "sector" to grub_disk_addr_t.
11971 (grub_disk_cache_get_index): Change the type of SECTOR to
11972 grub_disk_addr_t. Calculate the hash with SECTOR casted to
11973 unsigned after shifting.
11974 (grub_disk_cache_invalidate): Change the type of SECTOR to
11976 (grub_disk_cache_unlock): Likewise.
11977 (grub_disk_cache_store): Likewise.
11978 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11979 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11980 grub_disk_addr_t and grub_uint64_t, respectively.
11981 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11982 body, as the value of OFFSET is tweaked by
11983 grub_disk_check_range. Change the types of START_SECTOR, LEN and
11984 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11986 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11987 body, as the value of OFFSET is tweaked by
11988 grub_disk_check_range. Change the types of LEN and N to
11991 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11992 and "saved_offset" to grub_off_t.
11993 (test_header): Cast BUF to char *.
11994 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11996 (grub_gzio_read): Change the types of OFFSET and SIZE to
11997 grub_off_t and grub_size_t, respectively.
11999 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12001 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12002 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12003 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12004 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12005 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12007 * include/grub/types.h (grub_off_t): Unconditionally set to
12009 (grub_disk_addr_t): Changed to grub_uint64_t.
12011 * include/grub/partition.h (struct grub_partition): Change the
12012 types of "start", "len" and "offset" to grub_disk_addr_t,
12013 grub_uint64_t and grub_disk_addr_t, respectively.
12014 (grub_partition_get_start): Return grub_disk_addr_t.
12015 (grub_partition_get_len): Return grub_uint64_t.
12017 * include/grub/misc.h (grub_strtoull): New prototype.
12018 (grub_divmod64): Likewise.
12020 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12021 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12022 grub_off_t, respectively.
12023 All callers and references changed.
12025 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12026 grub_size_t in "read".
12027 All callers and references changed.
12029 * include/grub/file.h (struct grub_file): Change the types of
12030 "offset" and "size" to grub_off_t and grub_off_t,
12031 respectively. Change the type of SECTOR to grub_disk_addr_t in
12033 (grub_file_read): Change the type of LEN to grub_size_t.
12034 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12036 (grub_file_size): Return grub_off_t.
12037 (grub_file_tell): Likewise.
12038 All callers and references changed.
12040 * include/grub/disk.h (struct grub_disk_dev): Change the types of
12041 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12043 (struct grub_disk): Change the type of "total_sectors" to
12044 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12046 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12047 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12048 (grub_disk_write): Likewise.
12049 All callers and references changed.
12051 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12052 char * for grub_strncmp to silence gcc.
12053 (grub_iso9660_mount): Likewise.
12054 (grub_iso9660_mount): Likewise.
12055 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12057 (grub_iso9660_iterate_dir): Likewise.
12058 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12060 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12061 LEN to grub_disk_addr_t and grub_size_t, respectively.
12063 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12065 * fs/jfs.c (grub_jfs_read_file): Likewise.
12067 * fs/minix.c (grub_jfs_read_file): Likewise.
12069 * fs/sfs.c (grub_jfs_read_file): Likewise.
12071 * fs/ufs.c (grub_jfs_read_file): Likewise.
12073 * fs/xfs.c (grub_jfs_read_file): Likewise.
12075 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12076 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12079 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12080 BLKNR to -1 instead of returning GRUB_ERRNO.
12081 (grub_ext2_read_file): Change the types of SECTOR and
12082 LEN to grub_disk_addr_t and grub_size_t, respectively.
12084 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12085 LEN to grub_disk_addr_t and grub_size_t, respectively.
12087 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12090 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12091 string. Do not cast SECTOR explicitly.
12093 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12094 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12095 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12096 grub_disk_addr_t and grub_size_t, respectively. If the sector is
12097 over 2TB and LBA mode is not supported, raise an error.
12098 (get_safe_sectors): New function.
12099 (grub_biosdisk_read): Use get_safe_sectors.
12100 (grub_biosdisk_write): Likewise.
12102 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12103 (grub_efidisk_write): Likewise.
12105 * disk/loopback.c (delete_loopback): Cosmetic changes.
12106 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12108 (grub_loopback_open): Likewise.
12109 (grub_loopback_read): Likewise. Also, change the type of POS to
12110 grub_off_t, and fix the usage of grub_memset.
12112 * commands/i386/pc/play.c: Include grub/machine/time.h.
12114 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12117 * commands/configfile.c: Include grub/env.h.
12119 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12120 GRUB_ERRNO directly instead. Change the type of POS to
12121 grub_off_t. Follow the coding standard.
12123 * commands/blocklist.c: Include grub/partition.h.
12124 (grub_cmd_blocklist): Return an error if the underlying device is
12125 not a disk. Take the starting sector of a partition into account,
12126 if a partition is used.
12128 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12130 (lba_mode): Support 64-bit addresses.
12131 (chs_mode): Likewise.
12132 (copy_buffer): Adapted to the new offsets of a length field and a
12134 (blocklist_default_start): Allocate 64-bit space.
12136 * boot/i386/pc/boot.S (force_lba): Removed.
12137 (boot_drive): Moved to under KERNEL_SECTOR.
12138 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12140 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12142 (lba_mode): Refactored to support a 64-bit address. More size
12144 (setup_sectors): Likewise.
12146 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12148 * DISTLIST: Added include/grub/i386/linux.h. Removed
12149 include/grub/i386/pc/linux.h
12151 * configure.ac (AC_INIT): Bumped to 1.94.
12153 * config.guess: Updated from gnulib.
12154 * config.sub: Likewise.
12155 * install-sh: Likewise.
12156 * mkinstalldirs: Likewise.
12158 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12160 * conf/common.rmk (grub_modules_init.lst): Depended on
12161 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12164 * genmk.rb (PModule::rule): Reverted the previous change.
12166 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
12168 * conf/common.rmk (grub_modules_init.lst): Depends on
12169 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12170 that the target does not exist before producing.
12171 (grub_modules_init.h): Remove the target before generating.
12172 (grub_emu_init.c): Likewise.
12174 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12176 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
12178 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12179 for the target-specific tests. Make sure that we also have the
12180 up-to-date target variables for those tests.
12182 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12184 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12185 (PModule::rule): Likewise.
12187 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
12189 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12190 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12191 target-specific flags should be prefixed.
12192 (PModule::rule): Likewise.
12194 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
12196 * configure.ac (CMP): Check if cmp is available explicitly.
12198 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
12200 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12201 (target_cpu): New variable.
12202 (pkglibdir): Use target_cpu instead of host_cpu.
12204 * util/i386/pc/grub-install.in (host_cpu): Removed.
12205 (target_cpu): New variable.
12206 (pkglibdir): Use target_cpu instead of host_cpu.
12208 * util/genmoddep.c: Removed.
12210 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12211 instead of GRUB_HOST_SIZEOF_VOID_P.
12212 * kern/dl.c: Likewise.
12214 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12216 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12217 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12218 (GRUB_TARGET_SIZEOF_LONG): ... this.
12219 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12220 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12221 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12223 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12224 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12225 (GRUB_TARGET_SIZEOF_LONG): ... this.
12226 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12227 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12228 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12230 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12231 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12232 (GRUB_TARGET_SIZEOF_LONG): ... this.
12233 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12234 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12236 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12237 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12238 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12239 instead of GRUB_HOST_SIZEOF_LONG.
12240 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12241 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12242 GRUB_CPU_WORDS_BIGENDIAN.
12243 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12244 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12247 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12248 (genmoddep_SOURCES): Likewise.
12249 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12250 (genmoddep_SOURCES): Likewise.
12251 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12252 (genmoddep_SOURCES): Likewise.
12253 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12255 (genmoddep_SOURCES): Likewise.
12257 * genmoddep.awk: New file.
12259 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12260 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12261 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12262 (PModule::rule): Likewise.
12263 (Program::rule): Likewise.
12264 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12265 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12268 * configure.ac: Rewritten intensively to use host and target
12269 instead of build and host, respectively.
12271 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12272 (host_cpu): Removed.
12273 (target_cpu): New variable.
12274 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12275 (BUILD_CC): Removed.
12276 (BUILD_CFLAGS): Likewise.
12277 (BUILD_CPPFLAGS): Likewise.
12278 (TARGET_CC): New variable.
12279 (TARGET_CFLAGS): Likewise.
12280 (TARGET_CPPFLAGS): Likewise.
12281 (TARGET_LDFLAGS): Likewise.
12283 (include): Use target_cpu instead of host_cpu.
12284 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12286 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12288 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
12290 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12291 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
12292 field 'false' to 'exec_on_false'.
12293 (grub_script_create_cmdif): Renamed argument names to reflect above
12296 * normal/execute.c (grub_script_execute_cmdif): Likewise.
12298 * normal/script.c (grub_script_create_cmdif): Likewise.
12300 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
12302 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12304 (grub_hfsplus_btree_recptr): Likewise.
12305 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12306 FILEBLOCK both to pass a block number and store next block
12308 (grub_hfsplus_read_block): Rewritten heavily to support an extent
12309 overflow file correctly. Specify errors appropriately, because
12310 fshelp expects that GRUB_ERRNO is set when fails. Reuse
12311 grub_hfsplus_btree_recptr to get the pointer to a found key.
12312 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12315 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12317 (_linux_mod_SOURCES): New variable.
12318 (_linux_mod_CFLAGS): Likewise.
12319 (_linux_mod_LDFLAGS): Likewise.
12320 (linux_mod_SOURCES): Likewise.
12321 (linux_mod_CFLAGS): Likewise.
12322 (linux_mod_LDFLAGS): Likewise.
12324 * DISTLIST: Added loader/i386/efi/linux.c,
12325 loader/i386/efi/linux_normal.c and
12326 include/grub/i386/efi/loader.h.
12328 * loader/i386/efi/linux.c: New file.
12329 * loader/i386/efi/linux_normal.c: Likewise.
12330 * include/grub/i386/efi/loader.h: Likewise.
12332 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
12334 * commands/blocklist.c: New file.
12336 * DISTLIST: Added commands/blocklist.c.
12338 * term/efi/console.c (grub_console_highlight_color): Use a lighter
12339 color for the background, and a darker color for the foreground.
12340 (grub_console_checkkey): Return READ_KEY.
12341 (grub_console_cls): Set the background to
12342 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12344 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12346 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12347 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12349 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12352 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12353 BG. The spec is wrong again.
12355 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12357 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12359 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12360 commands/blocklist.c.
12361 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12363 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12364 (blocklist_mod_SOURCES): New variable.
12365 (blocklist_mod_CFLAGS): Likewise.
12366 (blocklist_mod_LDFLAGS): Likewise.
12368 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
12370 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12372 (lba_mode): Use %eax more intensively to reduce the code size.
12374 2006-05-20 Marco Gerards <marco@gnu.org>
12376 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12378 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
12380 (script): Accept leading newlines.
12381 (newlines): New rule to describe 0 or more newlines.
12382 (commands): Accept `command' with trailing newline. Fixed the
12383 order in which arguments were passed to `grub_script_add_cmd'.
12384 Accept commands separated by newlines.
12385 (function): Changed to accept newlines.
12386 (menuentry) Rewritten.
12388 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12389 front of the list, instead of to the end.
12391 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
12393 * util/i386/pc/grub-install.in (bindir): New variable.
12394 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12395 Shaver <lbgwjl@gmail.com>.
12397 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
12399 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12400 grub/machine/linux.h
12401 * loader/i386/pc/linux.c: Likewise.
12403 * include/grub/i386/pc/linux.h: Moved to ...
12404 * include/grub/i386/linux.h: ... here.
12406 * include/grub/i386/linux.h (struct linux_kernel_params): New
12409 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
12411 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12413 (grub_video_vbe_blit_glyph): Likewise.
12414 (grub_video_vbe_blit_bitmap): Likewise.
12415 (grub_video_vbe_blit_render_target): Likewise.
12417 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
12419 * configure.ac (--with-platform): Properly quote the square
12422 2006-05-08 Marco Gerards <marco@gnu.org>
12424 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12426 (kernel_elf_HEADERS): ...to this. Updated all users.
12427 (grubof_symlist.c): Renamed from this...
12428 (kernel_elf_symlist.c): ...to this. Updated all users.
12429 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12430 (grubof_SOURCES): Renamed from this...
12431 (kernel_elf_SOURCES): ...to this.
12432 (grubof_HEADERS): Renamed from this...
12433 (kernel_elf_HEADERS): ...to this.
12434 (grubof_CFLAGS): Renamed from this...
12435 (kernel_elf_CFLAGS): ...to this.
12436 (grubof_ASFLAGS): Renamed from this...
12437 (kernel_elf_ASFLAGS): ...to this.
12438 (grubof_LDFLAGS): Renamed from this...
12439 (kernel_elf_LDFLAGS): ...to this.
12441 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12443 (kernel_elf_HEADERS): ...to this. Updated all users.
12444 (grubof_symlist.c): Renamed from this...
12445 (kernel_elf_symlist.c): ...to this. Updated all users.
12446 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12447 (grubof_SOURCES): Renamed from this...
12448 (kernel_elf_SOURCES): ...to this.
12449 (grubof_HEADERS): Renamed from this...
12450 (kernel_elf_HEADERS): ...to this.
12451 (grubof_CFLAGS): Renamed from this...
12452 (kernel_elf_CFLAGS): ...to this.
12453 (grubof_ASFLAGS): Renamed from this...
12454 (kernel_elf_ASFLAGS): ...to this.
12455 (grubof_LDFLAGS): Renamed from this...
12456 (kernel_elf_LDFLAGS): ...to this.
12458 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12459 `kernel.elf' instead of `grubof'.
12461 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
12463 Add --with-platform to configure. Use pkglibdir instead of
12464 pkgdatadir. This is reported by Roger Leigh.
12466 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12467 (host_vendor): Likewise.
12468 (host_os): Likewise.
12469 (pkgdatadir): Likewise.
12470 (platform): New variable.
12471 (pkglibdir): Likewise.
12472 Use PKGLIBDIR instead of PKGDATADIR.
12474 * util/i386/pc/grub-install.in (datadir): Removed.
12475 (host_vendor): Likewise.
12476 (host_os): Likewise.
12477 (pkgdatadir): Likewise.
12478 (platform): New variable.
12479 (pkglibdir): Likewise.
12480 Use PKGLIBDIR instead of PKGDATADIR.
12482 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12483 instead of GRUB_DATADIR.
12485 * util/i386/pc/grub-mkimage.c (usage): Likewise.
12487 * util/i386/efi/grub-mkimage.c (usage): Likewise.
12490 * configure.ac (--with-platform): New option.
12491 Use PLATFORM instead of HOST_VENDOR to specify a platform.
12493 * Makefile.in: Include a makefile based on PLATFORM instead of
12495 (pkgdatadir): Not appended by the machine type.
12496 (pkglibdir): Appended by the machine type.
12497 (host_vendor): Removed.
12498 (platform): New variable.
12499 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12500 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12501 (uninstall): Likewise.
12503 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
12505 Use the environment context in the menu. Remove the commands
12506 "default" and "timeout", and use variables instead.
12508 * normal/menu.c: Include grub/env.h.
12509 (print_entry): Cast TITLE to silence gcc.
12510 (get_timeout): New function.
12511 (set_timeout): Likewise.
12512 (get_entry_number): Likewise.
12513 (run_menu): Use a default entry, a fallback entry and a timeout
12514 in the environment variables "default", "fallback" and
12515 "timeout". Also, tweak the default entry if it is not within the
12516 current menu entries.
12517 (grub_menu_run): Use a fallback entry in the environment variable
12520 * normal/main.c (read_config_file): Do not initialize
12521 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12523 (grub_normal_execute): Use a data slot to store the menu.
12525 * include/grub/normal.h (struct grub_menu): Removed default_entry,
12526 fallback_entry and timeout.
12527 (struct grub_menu_list): Removed.
12528 (grub_menu_list_t): Likewise.
12529 (struct grub_context): Likewise.
12530 (grub_context_t): Likewise.
12531 (grub_context_get): Likewise.
12532 (grub_context_get_current_menu): Likewise.
12533 (grub_context_push_menu): Likewise.
12534 (grub_context_pop_menu): Likewise.
12535 (grub_default_init): Likewise.
12536 (grub_default_fini): Likewise.
12537 (grub_timeout_init): Likewise.
12538 (grub_timeout_fini): Likewise.
12540 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12542 (normal_mod_SOURCES): Removed normal/context.c.
12544 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12545 commands/default.c, commands/timeout.c and normal/context.c.
12546 (normal_mod_SOURCES): Removed normal/context.c.
12548 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12549 commands/timeout.c and normal/context.c.
12550 (normal_mod_SOURCES): Removed normal/context.c.
12552 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12553 commands/default.c, commands/timeout.c and normal/context.c.
12554 (normal_mod_SOURCES): Removed normal/context.c.
12556 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12558 (default_mod_SOURCES): Removed.
12559 (default_mod_CFLAGS): Likewise.
12560 (default_mod_LDFLAGS): Likewise.
12561 (timeout_mod_SOURCES): Removed.
12562 (timeout_mod_CFLAGS): Likewise.
12563 (timeout_mod_LDFLAGS): Likewise.
12565 * DISTLIST: Removed commands/default.c, commands/timeout.c and
12568 * commands/default.c: Removed.
12569 * commands/timeout.c: Likewise.
12570 * normal/context.c: Likewise.
12572 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
12574 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12576 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
12578 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12579 "next" to "prev" for readability.
12580 (struct grub_env_sorted_var): New struct.
12581 (grub_env_context): Renamed to ...
12582 (initial_context): ... this.
12583 (grub_env_var_context): Renamed to ...
12584 (current_context): ... this.
12585 (grub_env_find): Look only at CURRENT_CONTEXT.
12586 (grub_env_context_open): Rewritten to copy exported variables from
12588 (grub_env_context_close): Rewritten according to the new
12589 scheme. Also, add an assertion to prevent the initial context from
12591 (grub_env_insert): Removed the code for the sorted list.
12592 (grub_env_remove): Likewise.
12593 (grub_env_export): Simply mark the variable with
12594 GRUB_ENV_VAR_GLOBAL.
12595 (grub_env_set): A cosmetic change for naming consistency.
12596 (grub_env_get): Likewise.
12597 (grub_env_unset): Likewise.
12598 (grub_env_iterate): Rewritten to sort variables within this
12600 (grub_register_variable_hook): Fixed for naming consistency. Call
12601 grub_env_find again, only if NAME is not found at the first time.
12602 (mangle_data_slot_name): New function.
12603 (grub_env_set_data_slot): Likewise.
12604 (grub_env_get_data_slot): Likewise.
12605 (grub_env_unset_data_slot): Likewise.
12607 * include/grub/env.h (grub_env_var_type): New enum.
12608 (GRUB_ENV_VAR_LOCAL): New constant.
12609 (GRUB_ENV_VAR_GLOBAL): Likewise.
12610 (GRUB_ENV_VAR_DATA): Likewise.
12611 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12613 (grub_env_set): Replace VAR with NAME for consistency.
12614 (grub_register_variable_hook): Likewise.
12615 (grub_env_export): Specify the name of the argument.
12616 (grub_env_set_data_slot): New prototype.
12617 (grub_env_get_data_slot): Likewise.
12618 (grub_env_unset_data_slot): Likewise.
12620 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12622 Extend the loader so that GRUB can accept a loader which comes
12623 back to GRUB when a loaded image exits. Also, this change adds
12624 support for a chainloader on EFI.
12626 * term/efi/console.c: Include grub/misc.h.
12627 (grub_console_checkkey): Display a scan code on the top for
12628 debugging. This will be removed once the EFI port gets stable.
12629 Correct the scan code mapping.
12631 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12632 allocate memory from larger regions, in order to reduce the number
12633 of allocated regions. Otherwise, the MacOSX loader panics.
12634 (filter_memory_map): Avoid less than 1MB for compatibility with
12636 (add_memory_regions): Allocate from the tail of a region, if
12637 possible, to avoid allocating a region near to 1MB, for the MacOSX
12640 * kern/efi/init.c (grub_efi_set_prefix): Specify
12641 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12643 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12644 argument IMAGE_HANDLE and specify it to get a loaded image.
12645 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12646 grub_efi_get_loaded_image.
12647 (grub_efi_get_filename): Divide the length by the size of
12649 (grub_efi_get_device_path): New function.
12650 (grub_efi_print_device_path): Print End Device Path nodes. Divide
12651 the length by the size of grub_efi_char16_t for a file path device
12654 * kern/loader.c (grub_loader_noreturn): New variable.
12655 (grub_loader_set): Accept a new argument NORETURN. Set
12656 GRUB_LOADER_NORETURN to NORETURN.
12657 All callers changed.
12658 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12661 * include/grub/efi/efi.h (grub_efi_get_device_path): New
12663 (grub_efi_get_loaded_image): Take an argument to specify an image
12666 * include/grub/loader.h (grub_loader_set): Added one more argument
12669 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12670 instead of grub_efi_open_protocol.
12671 (grub_efidisk_get_device_name): Likewise.
12672 (grub_efidisk_close): Print a newline.
12673 (grub_efidisk_get_device_handle): Fixed to use
12674 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12675 GRUB_EFI_DEVICE_PATH_TYPE.
12677 * disk/efi/efidisk.c (device_path_guid): Moved to ...
12678 * kern/efi/efi.c (device_path_guid): ... here.
12680 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12682 (kernel_mod_HEADERS): Added efi/disk.h.
12683 (_chain_mod_SOURCES): New variable.
12684 (_chain_mod_CFLAGS): Likewise.
12685 (_chain_mod_LDFLAGS): Likewise.
12686 (chain_mod_SOURCES): Likewise.
12687 (chain_mod_CFLAGS): Likewise.
12688 (chain_mod_LDFLAGS): Likewise.
12690 * DISTLIST: Added include/grub/efi/chainloader.h,
12691 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12693 * include/grub/efi/chainloader.h: New file.
12694 * loader/efi/chainloader.c: Likewise.
12695 * loader/efi/chainloader_normal.c: Likewise.
12697 2006-04-30 Marco Gerards <marco@gnu.org>
12699 * commands/configfile.c (grub_cmd_source): New function.
12700 (GRUB_MOD_INIT): Register the commands `source' and `.'.
12701 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12703 2006-04-30 Marco Gerards <marco@gnu.org>
12705 * normal/execute.c (grub_script_execute_cmd): Change the return
12706 type to `grub_err_t'. Correctly return the error.
12707 (grub_script_execute_cmdline): In case a command line is not a
12708 command or a function, try to interpret it as an assignment.
12710 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
12712 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12713 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12714 skip a node whose name is obviously invalid as UTF-16,
12715 i.e. contains a NUL character. Stop the iteration when the last
12716 directory entry is found. Instead of using the return value of
12717 grub_hfsplus_btree_iterate_node, store the value in RET and use
12718 it, because the iterator can be stopped by the last directory
12721 2006-04-30 Marco Gerards <marco@gnu.org>
12723 * include/grub/env.h (grub_env_export): New prototype. Reported
12724 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12726 2006-04-30 Marco Gerards <marco@gnu.org>
12728 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12729 size of the extents in a catalog file record.
12731 2006-04-29 Marco Gerards <marco@gnu.org>
12733 * commands/configfile.c (grub_cmd_configfile): Execute the
12734 configfile within its own context.
12736 * include/grub/env.h (grub_env_context_open): New prototype.
12737 (grub_env_context_close): Likewise.
12739 * kern/env.c (grub_env): Removed.
12740 (grub_env_sorted): Likewise.
12741 (grub_env_context): New variable.
12742 (grub_env_var_context): Likewise.
12743 (grub_env_find): Search both the active context and the global
12745 (grub_env_context_open): New function.
12746 (grub_env_context_close): Likewise.
12747 (grub_env_insert): Likewise.
12748 (grub_env_remove): Likewise.
12749 (grub_env_export): Likewise.
12750 (grub_env_set): Changed to use helper functions to avoid code
12752 (grub_env_iterate): Rewritten so both the current context and the
12753 global context are being used.
12755 * normal/command.c (export_command): New function.
12756 (grub_command_init): Register the `export' function.
12758 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
12760 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12761 explicitly to suppress gcc's warnings.
12762 * fs/fat.c (grub_fat_find_dir): Likewise.
12763 (grub_fat_label): Likewise.
12764 * fs/xfs.c (grub_xfs_read_inode): Likewise.
12765 (grub_xfs_mount): Likewise.
12766 (grub_xfs_label): Likewise.
12767 * fs/affs.c (grub_affs_mount): Likewise.
12768 (grub_affs_label): Likewise.
12769 (grub_affs_iterate_dir): Likewise.
12770 * fs/sfs.c (grub_sfs_mount): Likewise.
12771 (grub_sfs_iterate_dir): Likewise.
12772 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12773 * fs/hfs.c (grub_hfs_mount): Likewise.
12774 (grub_hfs_cmp_catkeys): Likewise.
12775 (grub_hfs_find_dir): Likewise.
12776 (grub_hfs_dir): Likewise.
12777 (grub_hfs_label): Likewise.
12778 * fs/jfs.c (grub_jfs_mount): Likewise.
12779 (grub_jfs_opendir): Likewise.
12780 (grub_jfs_getent): Likewise.
12781 (grub_jfs_lookup_symlink): Likewise.
12782 (grub_jfs_label): Likewise.
12783 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12784 (grub_hfsplus_iterate_dir): Likewise.
12785 (grub_hfsplus_btree_iterate_node): Made static.
12787 * util/grub-emu.c (prefix): New variable.
12788 (grub_machine_set_prefix): New function.
12789 (main): Do not set the environment variable "prefix" here. Only
12790 set PREFIX, which is used later by grub_machine_set_prefix.
12792 * include/grub/video.h: Do not include grub/symbol.h.
12793 (grub_video_register): Not exported. This symbol is not defined in
12795 (grub_video_unregister): Likewise.
12796 (grub_video_iterate): Likewise.
12797 (grub_video_setup): Likewise.
12798 (grub_video_restore): Likewise.
12799 (grub_video_get_info): Likewise.
12800 (grub_video_get_blit_format): Likewise.
12801 (grub_video_set_palette): Likewise.
12802 (grub_video_get_palette): Likewise.
12803 (grub_video_set_viewport): Likewise.
12804 (grub_video_get_viewport): Likewise.
12805 (grub_video_map_color): Likewise.
12806 (grub_video_map_rgb): Likewise.
12807 (grub_video_map_rgba): Likewise.
12808 (grub_video_fill_rect): Likewise.
12809 (grub_video_blit_glyph): Likewise.
12810 (grub_video_blit_bitmap): Likewise.
12811 (grub_video_blit_render_target): Likewise.
12812 (grub_video_scroll): Likewise.
12813 (grub_video_swap_buffers): Likewise.
12814 (grub_video_create_render_target): Likewise.
12815 (grub_video_delete_render_target): Likewise.
12816 (grub_video_set_active_render_target): Likewise.
12818 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12820 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12822 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12823 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12824 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12825 instead of $(srcdir)/genkernsyms.sh.
12827 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12828 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12829 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12830 instead of $(srcdir)/genkernsyms.sh.
12832 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12833 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12834 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12835 instead of $(srcdir)/genkernsyms.sh.
12837 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12838 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12839 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12840 instead of $(srcdir)/genkernsyms.sh.
12842 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12845 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12847 (gensymlist.sh): New target.
12848 (genkernsyms.sh): Likewise.
12850 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12851 genkernsyms.sh.in and gensymlist.sh.in.
12853 * genkernsyms.sh: Removed.
12854 * gensymlist.sh: Likewise.
12856 * genkernsyms.sh.in: New file.
12857 * gensymlist.sh.in: Likewise.
12859 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12861 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12862 clobber "prefix", since we may have already set it manually.
12864 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
12866 * kern/misc.c (abort): New alias for grub_abort.
12868 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
12870 A new machine-specific function "grub_machine_set_prefix" is
12871 defined. This is called after loading modules, so that a prefix
12872 initialization can use modules. Also, this change adds an
12873 intensive debugging feature for the memory manager via the
12874 configure option "--enable-mm-debug".
12876 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12879 * kern/sparc64/ieee1275/init.c (abort): Removed.
12880 (grub_stop): Likewise.
12881 (grub_exit): New function.
12882 (grub_set_prefix): Renamed to ...
12883 (grub_machine_set_prefix): ... this.
12884 (grub_machine_init): Do not call grub_set_prefix.
12886 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12887 (grub_machine_set_prefix): ... this.
12888 (grub_machine_init): Do not call grub_set_prefix.
12890 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12891 (grub_machine_init): Do not set the prefix here.
12893 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12895 * kern/efi/init.c: Include grub/mm.h.
12896 (grub_efi_set_prefix): New function.
12898 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12899 (grub_efi_get_filename): New function.
12900 (grub_print_device_path): Renamed to ...
12901 (grub_efi_print_device_path): ... this.
12903 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12904 [MM_DEBUG] (grub_realloc): Likewise.
12905 [MM_DEBUG] (grub_free): Likewise.
12906 [MM_DEBUG] (grub_memalign): Likewise.
12907 [MM_DEBUG] (grub_mm_debug): New variable.
12908 [MM_DEBUG] (grub_debug_malloc): New function.
12909 [MM_DEBUG] (grub_debug_free): New function.
12910 [MM_DEBUG] (grub_debug_realloc): New function.
12911 [MM_DEBUG] (grub_debug_memalign): New function.
12913 * kern/misc.c (grub_abort): Print a newline to distinguish
12916 * kern/main.c (grub_main): Call grub_machine_set_prefix and
12917 grub_set_root_dev after loading modules. This is necessary when
12918 setting a prefix depends on modules.
12920 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12921 (grub_efi_print_device_path): ... this.
12922 (grub_efi_get_filename): New prototype.
12923 (grub_efi_set_prefix): Likewise.
12925 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12927 (grub_efidisk_get_device_handle): New prototype.
12928 (grub_efidisk_get_device_name): Likewise.
12930 * include/grub/mm.h: Include config.h.
12931 (MM_DEBUG): Removed.
12932 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12933 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12934 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12935 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12936 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12937 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12938 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12939 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12940 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12942 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12944 * disk/efi/efidisk.c: Include grub/partition.h.
12945 (iterate_child_devices): New function.
12946 (add_device): First, compare only last device path nodes, so that
12947 devices are sorted by the types.
12948 (grub_efidisk_get_device_handle): New function.
12949 (grub_efidisk_get_device_name): Likewise.
12951 * configure.ac (--enable-mm-debug): New option to enable the
12952 memory manager debugging feature. This makes the binary much
12953 bigger, so is disabled by default.
12955 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
12957 Use grub_abort instead of grub_stop, and grub_exit must be
12958 define in each architecture now. Also, this change adds support
12961 * util/i386/pc/grub-probefs.c: Include grub/term.h.
12962 (grub_getkey): New function.
12963 (grub_term_get_current): Likewise.
12965 * util/i386/pc/grub-setup.c: Include grub/term.h.
12966 (grub_getkey): New function.
12967 (grub_term_get_current): Likewise.
12969 * util/misc.c (grub_stop): Renamed to ...
12970 (grub_exit): ... this.
12972 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12973 (grub_exit): ... this.
12974 (grub_machine_init): Use grub_abort instead of abort.
12975 (grub_stop): Removed.
12977 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12980 * kern/i386/pc/startup.S (grub_exit): New function.
12981 (cold_reboot): New label.
12983 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12984 (grub_efi_init): Call grub_efidisk_init.
12985 (grub_efi_fini): Call grub_efidisk_fini.
12987 * kern/efi/efi.c: Include grub/mm.h.
12988 (grub_efi_console_control_guid): Renamed to ...
12989 (console_control_guid): ... this.
12990 (grub_efi_loaded_image_guid): Renamed to ...
12991 (loaded_image_guid): ... this.
12992 (grub_efi_locate_handle): New function.
12993 (grub_efi_open_protocol): Likewise.
12994 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12995 GRUB_EFI_CONSOLE_CONTROL_GUID.
12996 (grub_efi_exit): Removed.
12997 (grub_stop): Likewise.
12998 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12999 (grub_exit): New function.
13000 (grub_print_device_path): Likewise.
13002 * kern/rescue.c (grub_rescue_cmd_exit): New function.
13003 (grub_enter_rescue_mode): Register "exit".
13005 * kern/misc.c (grub_real_dprintf): A cosmetic change.
13006 (grub_abort): New function.
13008 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13010 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13012 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13014 * include/grub/efi/efi.h (grub_efi_exit): Removed.
13015 (grub_print_device_path): New prototype.
13016 (grub_efi_locate_handle): Likewise.
13017 (grub_efi_open_protocol): Likewise.
13019 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13020 * disk/efi/efidisk.c: Likewise.
13022 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13024 * include/grub/efi/console_control.h
13025 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13027 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13028 last 8 bytes as an array.
13029 (GRUB_EFI_DISK_IO_GUID): New macro.
13030 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13031 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13032 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13034 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13035 (struct grub_efi_device_path): Rename the member "sub_type" to
13037 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13038 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13039 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13040 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13041 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13042 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13043 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13044 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13045 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13046 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13047 (struct grub_efi_pci_device_path): New structure.
13048 (grub_efi_pci_device_path_t): New type.
13049 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13050 (struct grub_efi_pccard_device_path): New structure.
13051 (grub_efi_pccard_device_path_t): New type.
13052 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13053 (struct grub_efi_memory_mapped_device_path): New structure.
13054 (grub_efi_memory_mapped_device_path_t): New type.
13055 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13056 (struct grub_efi_vendor_device_path): New structure.
13057 (grub_efi_vendor_device_path_t): New type.
13058 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13059 (struct grub_efi_controller_device_path): New structure.
13060 (grub_efi_controller_device_path_t): New type.
13061 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13062 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13063 (struct grub_efi_acpi_device_path): New structure.
13064 (grub_efi_acpi_device_path_t): New type.
13065 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13066 (struct grub_efi_expanded_acpi_device_path): New structure.
13067 (grub_efi_expanded_acpi_device_path_t): New type.
13068 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13069 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13070 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13071 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13072 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13073 (struct grub_efi_atapi_device_path): New structure.
13074 (grub_efi_atapi_device_path_t): New type.
13075 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13076 (struct grub_efi_fibre_channel_device_path): New structure.
13077 (grub_efi_fibre_channel_device_path_t): New type.
13078 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13079 (struct grub_efi_1394_device_path): New structure.
13080 (grub_efi_1394_device_path_t): New type.
13081 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13082 (struct grub_efi_usb_device_path): New structure.
13083 (grub_efi_usb_device_path_t): New type.
13084 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13085 (struct grub_efi_usb_class_device_path): New structure.
13086 (grub_efi_usb_class_device_path_t): New type.
13087 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13088 (struct grub_efi_i2o_device_path): New structure.
13089 (grub_efi_i2o_device_path_t): New type.
13090 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13091 (struct grub_efi_mac_address_device_path): New structure.
13092 (grub_efi_mac_address_device_path_t): New type.
13093 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13094 (struct grub_efi_ipv4_device_path): New structure.
13095 (grub_efi_ipv4_device_path_t): New type.
13096 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13097 (struct grub_efi_ipv6_device_path): New structure.
13098 (grub_efi_ipv6_device_path_t): New type.
13099 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13100 (struct grub_efi_infiniband_device_path): New structure.
13101 (grub_efi_infiniband_device_path_t): New type.
13102 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13103 (struct grub_efi_uart_device_path): New structure.
13104 (grub_efi_uart_device_path_t): New type.
13105 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13106 (struct grub_efi_vendor_messaging_device_path): New structure.
13107 (grub_efi_vendor_messaging_device_path_t): New type.
13108 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13109 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13110 (struct grub_efi_hard_drive_device_path): New structure.
13111 (grub_efi_hard_drive_device_path_t): New type.
13112 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13113 (struct grub_efi_cdrom_device_path): New structure.
13114 (grub_efi_cdrom_device_path_t): New type.
13115 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13116 (struct grub_efi_vendor_media_device_path): New structure.
13117 (grub_efi_vendor_media_device_path_t): New type.
13118 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13119 (struct grub_efi_file_path_device_path): New structure.
13120 (grub_efi_file_path_device_path_t): New type.
13121 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13122 (struct grub_efi_protocol_device_path): New structure.
13123 (grub_efi_protocol_device_path_t): New type.
13124 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13125 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13126 (struct grub_efi_bios_device_path): New structure.
13127 (grub_efi_bios_device_path_t): New type.
13128 (struct grub_efi_disk_io): New structure.
13129 (grub_efi_disk_io_t): New type.
13130 (struct grub_efi_block_io_media): New structure.
13131 (grub_efi_block_io_media_t): New type.
13132 (struct grub_efi_block_io): New structure.
13133 (grub_efi_block_io_t): New type.
13135 * include/grub/misc.h (grub_stop): Removed.
13136 (grub_exit): New prototype.
13137 (grub_abort): Likewise.
13139 * include/grub/disk.h (enum grub_disk_dev_id): Added
13140 GRUB_DISK_DEVICE_EFIDISK_ID.
13142 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13143 disk/efi/efidisk.c.
13144 (kernel_syms.lst): Remove the target if an error occurs.
13146 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
13148 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13149 as it was simply too buggy.
13151 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
13153 * kern/misc.c (grub_lltoa): New function.
13154 (grub_vsprintf): Added support for the long long suffix,
13157 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
13159 * Makefile.in (LDFLAGS): Add variable.
13160 (LD): Remove variable.
13161 * configure.ac: Add -m32 to LDFLAGS.
13162 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13163 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13164 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13165 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13166 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13168 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13169 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13170 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13172 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
13174 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13175 length for unknown glyph.
13177 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13179 Add support for pre-loaded modules into the EFI port.
13181 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13182 completely. Accept one more argument DIR. The caller has changed.
13184 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13186 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13187 (grub_efi_loaded_image_guid): New variable.
13188 (grub_efi_get_loaded_image): New function.
13189 (grub_arch_modules_addr): Likewise.
13191 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13194 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13195 (struct grub_efi_loaded_image): New structure.
13196 (grub_efi_loaded_image_t): New type.
13198 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
13200 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13201 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13202 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13204 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
13206 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13208 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
13210 * DISTLIST: Added include/grub/efi/console.h,
13211 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13212 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13214 * include/grub/efi/console.h: New file.
13215 * include/grub/efi/time.h: Likewise.
13216 * include/grub/i386/efi/kernel.h: Likewise.
13217 * kern/efi/init.c: Likewise.
13218 * kern/efi/mm.c: Likewise.
13219 * term/efi/console.c: Likewise.
13221 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13222 (grub_stop): Removed.
13223 (grub_get_rtc): Likewise.
13224 (grub_machine_init): Simply call grub_efi_init.
13225 (grub_machine_fini): Call grub_efi_fini.
13227 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13228 (grub_efi_output_string): Removed.
13229 (grub_efi_stall): New function.
13230 (grub_stop): Likewise.
13231 (grub_get_rtc): Likewise.
13233 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13234 (grub_efi_stall): New prototype.
13235 (grub_efi_allocate_pages): Likewise.
13236 (grub_efi_free_pages): Likewise.
13237 (grub_efi_get_memory_map): Likewise.
13238 (grub_efi_mm_init): Likewise.
13239 (grub_efi_mm_fini): Likewise.
13240 (grub_efi_init): Likewise.
13241 (grub_efi_fini): Likewise.
13243 * include/grub/i386/efi/time.h: Do not include
13244 grub/symbol.h. Include grub/efi/time.h.
13245 (GRUB_TICKS_PER_SECOND): Removed.
13246 (grub_get_rtc): Likewise.
13248 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13249 Added padding. The EFI spec is buggy.
13250 (GRUB_EFI_BLACK): New macro.
13251 (GRUB_EFI_BLUE): Likewise.
13252 (GRUB_EFI_GREEN): Likewise.
13253 (GRUB_EFI_CYAN): Likewise.
13254 (GRUB_EFI_RED): Likewise.
13255 (GRUB_EFI_MAGENTA): Likewise.
13256 (GRUB_EFI_BROWN): Likewise.
13257 (GRUB_EFI_LIGHTGRAY): Likewise.
13258 (GRUB_EFI_BRIGHT): Likewise.
13259 (GRUB_EFI_DARKGRAY): Likewise.
13260 (GRUB_EFI_LIGHTBLUE): Likewise.
13261 (GRUB_EFI_LIGHTGREEN): Likewise.
13262 (GRUB_EFI_LIGHTCYAN): Likewise.
13263 (GRUB_EFI_LIGHTRED): Likewise.
13264 (GRUB_EFI_LIGHTMAGENTA): Likewise.
13265 (GRUB_EFI_YELLOW): Likewise.
13266 (GRUB_EFI_WHITE): Likewise.
13267 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13268 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13269 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13270 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13271 (GRUB_EFI_BACKGROUND_RED): Likewise.
13272 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13273 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13274 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13275 (GRUB_EFI_TEXT_ATTR): Likewise.
13277 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13278 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13279 (kernel_mod_HEADERS): Added efi/time.h.
13281 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
13283 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13284 include/grub/efi/api.h, include/grub/efi/console_control.h,
13285 include/grub/efi/efi.h, include/grub/efi/pe32.h,
13286 include/grub/i386/efi/time.h, kern/efi/efi.c,
13287 kern/i386/efi/init.c, kern/i386/efi/startup.S,
13288 and util/i386/efi/grub-mkimage.c.
13290 * Makefile.in (RMKFILES): Added i386-efi.rmk.
13292 * genmk.rb (PModule#rule): Do not export symbols if
13293 #{prefix}_EXPORTS is set to "no".
13295 * conf/i386-efi.mk: New file.
13296 * conf/i386-efi.rmk: Likewise.
13297 * include/grub/efi/api.h: Likewise.
13298 * include/grub/efi/console_control.h: Likewise.
13299 * include/grub/efi/efi.h: Likewise.
13300 * include/grub/efi/pe32.h: Likewise.
13301 * include/grub/i386/efi/time.h: Likewise.
13302 * kern/efi/efi.c: Likewise.
13303 * kern/i386/efi/init.c: Likewise.
13304 * kern/i386/efi/startup.S: Likewise.
13305 * util/i386/efi/grub-mkimage.c: Likewise.
13307 2006-04-17 Marco Gerards <marco@gnu.org>
13309 * include/grub/script.h: Include <grub/parser.h> and
13310 "grub_script.tab.h".
13311 (struct grub_lexer_param): New struct.
13312 (struct grub_parser_param): Likewise.
13313 (grub_script_create_arglist): Pass the state in an argument.
13314 (grub_script_add_arglist): Likewise.
13315 (grub_script_create_cmdline): Likewise.
13316 (grub_script_create_cmdblock): Likewise.
13317 (grub_script_create_cmdif): Likewise.
13318 (grub_script_create_cmdmenu): Likewise.
13319 (grub_script_add_cmd): Likewise.
13320 (grub_script_arg_add): Likewise.
13321 (grub_script_lexer_ref): Likewise.
13322 (grub_script_lexer_deref): Likewise.
13323 (grub_script_lexer_record_start): Likewise.
13324 (grub_script_lexer_record_stop): Likewise.
13325 (grub_script_mem_record): Likewise.
13326 (grub_script_mem_record_stop): Likewise.
13327 (grub_script_malloc): Likewise.
13328 (grub_script_yylex): Likewise.
13329 (grub_script_yyparse): Likewise.
13330 (grub_script_yyerror): Likewise.
13331 (grub_script_yylex): Likewise.
13332 (grub_script_lexer_init): Return the state.
13334 * normal/lexer.c (grub_script_lexer_state): Removed variable.
13335 (grub_script_lexer_done): Likewise.
13336 (grub_script_lexer_getline): Likewise.
13337 (grub_script_lexer_refs): Likewise.
13338 (script): Likewise.
13339 (newscript): Likewise.
13340 (record): Likewise.
13341 (recording): Likewise.
13342 (recordpos): Likewise.
13343 (recordlen): Likewise.
13344 (grub_script_lexer_init): Return the state instead of setting
13346 (grub_script_lexer_ref): Use the newly added argument for state
13347 instead of globals.
13348 (grub_script_lexer_deref): Likewise.
13349 (grub_script_lexer_record_start): Likewise.
13350 (grub_script_lexer_record_stop): Likewise.
13351 (recordchar): Likewise.
13352 (nextchar): Likewise.
13353 (grub_script_yylex2): Likewise.
13354 (grub_script_yylex): Likewise.
13355 (grub_script_yyerror): Likewise.
13357 * normal/parser.y (func_mem): Removed variable.
13358 (menu_entry): Likewise.
13360 (%lex-param): New parser option.
13361 (%parse-param): Likewise.
13362 (script): Always return the AST.
13363 (argument): Pass the state around.
13364 (arguments): Likewise.
13365 (grubcmd): Likewise.
13366 (commands): Likewise.
13367 (function): Likewise.
13368 (menuentry): Likewise.
13369 (if_statement): Likewise.
13372 * normal/script.c (grub_script_memused): Removed variable.
13373 (grub_script_parsed): Likewise.
13374 (grub_script_malloc): Added a state argument. Use that instead of
13376 (grub_script_mem_record): Likewise.
13377 (grub_script_mem_record_stop): Likewise.
13378 (grub_script_arg_add): Likewise.
13379 (grub_script_add_arglist): Likewise.
13380 (grub_script_create_cmdline): Likewise.
13381 (grub_script_create_cmdif): Likewise.
13382 (grub_script_create_cmdmenu): Likewise.
13383 (grub_script_add_cmd): Likewise.
13384 (grub_script_parse): Setup the state before calling the parser.
13386 2006-04-16 Marco Gerards <marco@gnu.org>
13388 * normal/command.c (grub_command_init): Remove the title command.
13390 * normal/lexer.c (grub_script_yylex): Renamed from this...
13391 (grub_script_yylex2): ... to this.
13392 (grub_script_yylex): New function. Temporary
13393 introduced to filter some tokens.
13394 (grub_script_yyerror): Print a newline.
13396 * normal/main.c (read_config_file): Output information about the
13397 lines that contain errors. Wait for a key after all lines have
13398 been processed. Don't return an empty menu.
13400 * normal/parser.y (func_mem): Don't initialize.
13401 (menu_entry): Likewise.
13402 (err): New variable.
13403 (script): Don't return anything when an error was encountered.
13404 (ws, returns): Removed rules.
13405 (argument): Disabled concatenated variable support.
13406 (arguments): Remove explicit separators.
13407 (grubcmd): Likewise.
13408 (function): Likewise.
13409 (menuentry): Likewise.
13411 (commands): Likewise. Add error handling.
13413 * normal/script.c (grub_script_create_cmdline): If
13414 `grub_script_parsed' is 0, assume the parser encountered an error.
13416 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
13418 * configure.ac: Add support for EFI. Fix the typo
13419 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13421 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13423 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
13424 foreign multibyte characters should be shown correctly.
13426 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13428 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13430 (read_config_file): Made it to close file before returning.
13432 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
13434 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13435 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13436 video/i386/pc/vbefill.c.
13438 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13439 video/i386/pc/vbefill.c.
13441 * include/grub/video.h (grub_video_blit_format): New enum.
13442 (grub_video_mode_info): Added new member blit_format.
13443 (grub_video_get_blit_format): New function prototype.
13445 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13446 function prototype.
13447 (grub_video_vbe_map_rgb): Likewise.
13448 (grub_video_vbe_unmap_color): Likewise.
13450 * include/grub/i386/pc/vbeblit.h: New file.
13452 * include/grub/i386/pc/vbefill.h: New file.
13454 * video/video.c (grub_video_get_blit_format): New function.
13455 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13456 (grub_video_vbe_map_rgb): Likewise.
13457 (grub_video_vbe_unmap_color): Likewise.
13459 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13461 (grub_video_vbe_blit_render_target): Changed to use more optimized
13463 (grub_video_vbe_setup): Added detection for optimized settings.
13464 (grub_video_vbe_create_render_target): Likewise.
13466 * video/i386/pc/vbeblit.c: New file.
13468 * video/i386/pc/vbefill.c: New file.
13470 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
13472 * font/manager.c (grub_font_get_glyph): Removed font fixup from
13475 * util/unifont2pff.rb: ... and moved it to here. Improved argument
13476 parsing to support both hex and dec ranges. If filename was missing
13477 show usage information.
13479 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
13481 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13482 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
13484 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13485 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
13486 (video_mod_SOURCES): Added.
13487 (video_mod_CFLAGS): Likewise.
13488 (video_mod_LDFLAGS): Likewise.
13489 (gfxterm_mod_SOURCES): Likewise.
13490 (gfxterm_mod_CFLAGS): Likewise.
13491 (gfxterm_mod_LDFLAGS): Likewise.
13492 (videotest_mod_SOURCES): Likewise.
13493 (videotest_mod_CFLAGS): Likewise.
13494 (videotest_mod_LDFLAGS): Likewise.
13495 (vesafb_mod_SOURCES): Removed.
13496 (vesafb_mod_CFLAGS): Likewise.
13497 (vesafb_mod_LDFLAGS): Likewise.
13498 (vga_mod_SOURCES): Likewise.
13499 (vga_mod_CFLAGS): Likewise.
13500 (vga_mod_LDFLAGS): Likewise.
13502 * commands/videotest.c: New file.
13504 * font/manager.c (fill_with_default_glyph): Modified to use
13506 (grub_font_get_glyph): Likewise.
13507 (fontmanager): Renamed from this...
13508 (font_manager): ... to this.
13510 * include/grub/font.h (grub_font_glyph): Added new structure.
13511 (grub_font_get_glyph): Modified to use grub_font_glyph.
13513 * include/grub/misc.h (grub_abs): Added as inline function.
13515 * include/grub/video.h: New file.
13517 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13518 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13519 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13520 (grub_vbe_get_controller_info): Renamed from this...
13521 (grub_vbe_bios_get_controller_info): ... to this.
13522 (grub_vbe_get_mode_info): Renamed from this...
13523 (grub_vbe_bios_get_mode_info): ... to this.
13524 (grub_vbe_set_mode): Renamed from this...
13525 (grub_vbe_bios_set_mode): ... to this.
13526 (grub_vbe_get_mode): Renamed from this...
13527 (grub_vbe_bios_get_mode): ... to this.
13528 (grub_vbe_set_memory_window): Renamed from this...
13529 (grub_vbe_bios_set_memory_window): ... to this.
13530 (grub_vbe_get_memory_window): Renamed from this...
13531 (grub_vbe_bios_get_memory_window): ... to this.
13532 (grub_vbe_set_scanline_length): Renamed from this...
13533 (grub_vbe_set_scanline_length): ... to this.
13534 (grub_vbe_get_scanline_length): Renamed from this...
13535 (grub_vbe_bios_get_scanline_length): ... to this.
13536 (grub_vbe_set_display_start): Renamed from this...
13537 (grub_vbe_bios_set_display_start): ... to this.
13538 (grub_vbe_get_display_start): Renamed from this...
13539 (grub_vbe_bios_get_display_start): ... to this.
13540 (grub_vbe_set_palette_data): Renamed from this...
13541 (grub_vbe_bios_set_palette_data): ... to this.
13542 (grub_vbe_set_pixel_rgb): Removed.
13543 (grub_vbe_set_pixel_index): Likewise.
13545 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13547 (grub_vbe_bios_get_controller_info): ... to this.
13548 (grub_vbe_get_mode_info): Renamed from this...
13549 (grub_vbe_bios_get_mode_info): ... to this.
13550 (grub_vbe_set_mode): Renamed from this...
13551 (grub_vbe_bios_set_mode): ... to this.
13552 (grub_vbe_get_mode): Renamed from this...
13553 (grub_vbe_bios_get_mode): ... to this.
13554 (grub_vbe_set_memory_window): Renamed from this...
13555 (grub_vbe_bios_set_memory_window): ... to this.
13556 (grub_vbe_get_memory_window): Renamed from this...
13557 (grub_vbe_bios_get_memory_window): ... to this.
13558 (grub_vbe_set_scanline_length): Renamed from this...
13559 (grub_vbe_set_scanline_length): ... to this.
13560 (grub_vbe_get_scanline_length): Renamed from this...
13561 (grub_vbe_bios_get_scanline_length): ... to this.
13562 (grub_vbe_set_display_start): Renamed from this...
13563 (grub_vbe_bios_set_display_start): ... to this.
13564 (grub_vbe_get_display_start): Renamed from this...
13565 (grub_vbe_bios_get_display_start): ... to this.
13566 (grub_vbe_set_palette_data): Renamed from this...
13567 (grub_vbe_bios_set_palette_data): ... to this.
13568 (grub_vbe_bios_get_controller_info): Fixed problem with registers
13569 getting corrupted after calling it. Added more pushes and pops.
13570 (grub_vbe_bios_set_mode): Likewise.
13571 (grub_vbe_bios_get_mode): Likewise.
13572 (grub_vbe_bios_get_memory_window): Likewise.
13573 (grub_vbe_bios_set_scanline_length): Likewise.
13574 (grub_vbe_bios_get_scanline_length): Likewise.
13575 (grub_vbe_bios_get_display_start): Likewise.
13576 (grub_vbe_bios_set_palette_data): Likewise.
13578 * normal/cmdline.c (cl_set_pos): Refresh the screen.
13579 (cl_insert): Likewise.
13580 (cl_delete): Likewise.
13582 * term/gfxterm.c: New file.
13584 * term/i386/pc/vesafb.c: Removed file.
13586 * video/video.c: New file.
13588 * video/i386/pc/vbe.c (real2pm): Added new function.
13589 (grub_video_vbe_draw_pixel): Likewise.
13590 (grub_video_vbe_get_video_ptr): Likewise.
13591 (grub_video_vbe_get_pixel): Likewise
13592 (grub_video_vbe_init): Likewise.
13593 (grub_video_vbe_fini): Likewise.
13594 (grub_video_vbe_setup): Likewise.
13595 (grub_video_vbe_get_info): Likewise.
13596 (grub_video_vbe_set_palette): Likewise.
13597 (grub_video_vbe_get_palette): Likewise.
13598 (grub_video_vbe_set_viewport): Likewise.
13599 (grub_video_vbe_get_viewport): Likewise.
13600 (grub_video_vbe_map_color): Likewise.
13601 (grub_video_vbe_map_rgb): Likewise.
13602 (grub_video_vbe_map_rgba): Likewise.
13603 (grub_video_vbe_unmap_color): Likewise.
13604 (grub_video_vbe_fill_rect): Likewise.
13605 (grub_video_vbe_blit_glyph): Likewise.
13606 (grub_video_vbe_blit_bitmap): Likewise.
13607 (grub_video_vbe_blit_render_target): Likewise.
13608 (grub_video_vbe_scroll): Likewise.
13609 (grub_video_vbe_swap_buffers): Likewise.
13610 (grub_video_vbe_create_render_target): Likewise.
13611 (grub_video_vbe_delete_render_target): Likewise.
13612 (grub_video_vbe_set_active_render_target): Likewise.
13613 (grub_vbe_set_pixel_rgb): Remove function.
13614 (grub_vbe_set_pixel_index): Likewise.
13615 (index_color_mode): Remove static variable.
13616 (active_mode): Likewise.
13617 (framebuffer): Likewise.
13618 (bytes_per_scan_line): Likewise.
13619 (grub_video_vbe_adapter): Added new static variable.
13620 (framebuffer): Likewise.
13621 (render_target): Likewise.
13622 (initial_mode): Likewise.
13623 (mode_in_use): Likewise.
13624 (mode_list): Likewise.
13626 2006-03-10 Marco Gerards <marco@gnu.org>
13628 * configure.ac (AC_INIT): Bumped to 1.93.
13630 * DISTLIST: Added `include/grub/hfs.h'.
13632 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
13634 * boot/i386/pc/boot.S (general_error): Before looping, try INT
13635 18H, which might help the BIOS falling back to next boot media.
13637 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
13639 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13640 Poe Chen <poe.poechen@gmail.com>.
13642 2006-01-17 Marco Gerards <marco@gnu.org>
13644 * include/grub/normal.h: Include <grub/script.h>.
13645 (grub_command_list): Removed struct.
13646 (grub_command_list_t): Removed type.
13647 (grub_menu_entry): Remove members `num' and `command_list'. Add
13648 members `commands' and `sourcecode'.
13649 * include/grub/script.h: Add inclusion guards.
13650 (grub_script_cmd_menuentry): New struct.
13651 (grub_script_execute_menuentry): New prototype.
13652 (grub_script_lexer_record_start): Likewise.
13653 (grub_script_lexer_record_stop): Likewise.
13654 * normal/execute.c (grub_script_execute_menuentry): New function.
13655 * normal/lexer.c (record, recording, recordpos, recordlen): New
13657 (grub_script_lexer_record_start): New function.
13658 (grub_script_lexer_record_stop): Likewise.
13659 (recordchar): Likewise.
13660 (nextchar): Likewise.
13661 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
13662 2048 as the buffer size. Add the tokens `menuentry' and `@'.
13663 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13664 (current_menu): New variable.
13665 (free_menu): Mainly rewritten.
13666 (grub_normal_menu_addentry): New function.
13667 (read_config_file): Rewritten.
13668 * normal/menu.c (run_menu_entry): Mainly rewritten.
13669 * normal/menu_entry.c (make_screen): Rewritten the code to insert
13671 (run): Mainly rewritten.
13672 * normal/parser.y (menu_entry): New variable.
13673 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13674 (menuentry): New rule.
13675 (command): Add `menuentry'.
13676 (if_statement): Allow additional returns before `fi'.
13677 * normal/script.c (grub_script_create_cmdmenu): New function.
13679 2006-01-03 Marco Gerards <marco@gnu.org>
13681 * INSTALL: GNU Bison is required.
13682 * configure.ac: Rewritten the test to detect Bison.
13683 * Makefile.in (YACC): New variable. Reported by Xun Sun
13684 <xun.sun.cn@gmail.com>.
13686 2006-01-03 Marco Gerards <marco@gnu.org>
13688 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13689 the HFS+ filesystem to filesystem blocks.
13690 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13691 GCC warning is silenced.
13693 2006-01-03 Marco Gerards <marco@gnu.org>
13695 * partmap/apple.c (apple_partition_map_iterate): Convert the data
13696 read from disk from big endian to host byte order.
13698 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
13700 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
13702 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13703 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13704 embedded HFS+ filesystem.
13705 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13706 (grub_hfs_sblock): Move from here...
13707 * include/grub/hfs.h: To here... New file.
13708 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
13710 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13712 (grub_hfsplus_volheader): Change type of member `magic' to
13714 (grub_hfsplus_data): Add new member `embedded_offset'.
13715 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13717 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13718 Calculate the offset.
13720 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13722 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13724 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13726 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13728 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13729 ENV->NAME is NULL after allocating ENV->VALUE.
13731 2005-12-25 Marco Gerards <marco@gnu.org>
13733 * kern/env.c (grub_env_set): Rewritten the error handling code.
13735 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13737 * geninit.sh: Made more robust, and more portable.
13739 2005-12-25 Marco Gerards <marco@gnu.org>
13741 Add support for Apple HFS+ filesystems.
13743 * fs/hfsplus.c: New file.
13745 * DISTLIST: Added `fs/hfsplus.c'.
13747 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13748 (hfsplus_mod_SOURCES): New variable.
13749 (hfsplus_mod_CFLAGS): Likewise.
13750 (hfsplus_mod_LDFLAGS): Likewise.
13751 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13752 (grub_setup_SOURCES): Likewise.
13753 (grub_mkdevicemap_SOURCES): Likewise.
13754 (grub_emu_SOURCES): Likewise.
13755 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13757 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13759 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13761 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
13763 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13764 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13765 include/grub/parser.h, include/grub/script.h, kern/parser.c,
13766 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13767 normal/lexer.c, normal/parser.y, normal/script.c, and
13769 Removed kern/sparc64/cache.c.
13771 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13772 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13775 * configure.ac (AC_INIT): Bumped to 1.92.
13777 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
13779 * kern/err.c (grub_error_push): Added new function to support error
13781 (grub_error_pop): Likewise.
13782 (grub_error_stack_items): New local variable to support error stacks.
13783 (grub_error_stack_pos): Likewise.
13784 (grub_error_stack_assert): Likewise.
13785 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13787 (grub_print_error): Added support to print errors from error stack.
13789 * include/grub/err.h (grub_error_push): Added function prototype.
13790 (grub_error_pop): Likewise.
13792 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
13794 * configure.ac: Accept `powerpc64' as host_cpu.
13795 (amd64): Rename to `biarch32'.
13797 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13798 non-cacheline-aligned addresses.
13800 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13801 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
13802 if `size' is non-zero.
13804 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
13806 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13807 and `cd' to make sure the filename is not prefixed with a
13809 (pkgdata_MODULES): Add `gpt.mod'.
13810 (gpt_mod_SOURCES): New variable.
13811 (gpt_mod_CFLAGS): Likewise.
13812 (gpt_mod_LDFLAGS): Likewise.
13814 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13816 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13819 * partmap/gpt.c: New file.
13821 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13822 GPT partition map is detected.
13824 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
13826 * commands/i386/pc/play.c: New file.
13827 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13828 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13831 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
13833 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13834 ((unused))' to silence gcc warning.
13836 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
13838 * configure.ac: Correct `AC_PROG_YACC' test.
13840 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13842 * util/powerpc/ieee1275/grub-install.in: Run the mount point
13843 check before installing files.
13845 2005-11-22 Mike Small <smallm@panix.com>
13847 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13848 number regex so multidigit numbers are recognized correctly.
13850 2005-11-22 Mike Small <smallm@panix.com>
13852 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13853 debugging message before attempting to claim memory.
13854 (grub_rescue_cmd_initrd): Add a claim debugging message and try
13855 multiple addresses in case of failure.
13857 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13859 * term/tparm.c (get_space): Remove empty `if' statement.
13861 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13863 * kern/parser.c (check_varstate): Rename `state' to 's'.
13865 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13867 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
13868 variable definitions to the beginning of each function. Sort stack
13870 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
13871 `buf' argument to `char *'.
13873 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
13875 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13876 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13877 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13878 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13879 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13880 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13881 configfile.mod, search.mod, gzio.mod and test.mod.
13882 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13883 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13884 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13885 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13886 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13887 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13888 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13889 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13890 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13891 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13892 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13893 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13894 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13895 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13896 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13897 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13898 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13899 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13900 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13901 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13902 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13903 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13904 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13906 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13908 (pkgdata_MODULES): Add test.mod.
13910 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13912 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
13913 appending to variables with "+=".
13914 (PModule): Use full pathname to generate *.lst filenames.
13916 * Makefile.in: Fixed list rules moved from genmk.rb.
13917 (.DELETE_ON_ERROR): New special target.
13918 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13920 * conf/i386-pc.rmk: Include conf/common.mk.
13921 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13922 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13923 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13924 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13925 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13926 configfile.mod, search.mod, gzio.mod and test.mod.
13927 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13928 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13929 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13930 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13931 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13932 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13933 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13934 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13935 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13936 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13937 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13938 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13939 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13940 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13941 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13942 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13943 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13944 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13945 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13946 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13947 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13948 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13949 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13951 * conf/common.rmk: ... to here. New file.
13953 * conf/common.mk: New file.
13955 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
13957 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13958 (grub_script.tab.c): ... here.
13960 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13961 (grub_script.tab.c): ... here.
13963 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13964 (grub_script.tab.c): ... here.
13966 * normal/command.c (grub_command_find): Fixed a memory leak of
13967 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13969 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13971 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13972 "@" which marks the start of a comment on ARM.
13973 (VARIABLE): Likewise.
13975 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13977 Add support for Linux/ADFS partition tables.
13979 * partmap/acorn.c: New file.
13981 * include/grub/acorn_filecore.h: Likewise.
13983 * DISTLIST: Added `partmap/acorn.c' and
13984 `include/grub/acorn_filecore.h'.
13986 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13988 (pkgdata_MODULES): Add `acorn.mod'.
13989 (acorn_mod_SOURCES): New variable.
13990 (acorn_mod_CFLAGS): Likewise.
13992 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13994 (pkgdata_MODULES): Add `acorn.mod'.
13995 (acorn_mod_SOURCES): New variable.
13996 (acorn_mod_CFLAGS): Likewise.
13998 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13999 (pkgdata_MODULES): Add `acorn.mod'.
14000 (acorn_mod_SOURCES): New variable.
14001 (acorn_mod_CFLAGS): Likewise.
14002 (acorn_mod_LDFLAGS): Likewise.
14004 * include/types.h (grub_disk_addr_t): New typedef.
14006 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
14008 * geninit.sh: New file.
14010 * geninitheader.sh: Likewise.
14012 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14013 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14014 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14015 * commands/configfile.c (grub_configfile_init)
14016 (grub_configfile_fini): Likewise.
14017 * commands/default.c (grub_default_init, grub_default_fini):
14019 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14020 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14021 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14022 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14024 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14025 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14027 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14028 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14030 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14032 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14034 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14035 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14036 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14037 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14038 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14039 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14040 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14041 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14042 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14043 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14044 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14045 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14046 * partmap/amiga.c (grub_amiga_partition_map_init)
14047 (grub_amiga_partition_map_fini): Likewise.
14048 * partmap/apple.c (grub_apple_partition_map_init)
14049 (grub_apple_partition_map_fini): Likewise.
14050 * partmap/pc.c (grub_pc_partition_map_init)
14051 (grub_pc_partition_map_fini): Likewise.
14052 * partmap/sun.c (grub_sun_partition_map_init,
14053 grub_sun_partition_map_fini): Likewise.
14054 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14057 * util/grub-emu.c: Include <grub_modules_init.h>.
14058 (main): Don't initialize and de-initialize any modules directly,
14059 use `grub_init_all' and `grub_fini_all' instead.
14061 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14062 `grub_vesafb_mod_init'.
14063 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
14065 * term/i386/pc/vga.c (grub_vga_init): Renamed to
14066 `grub_vga_mod_init'. Updated all users.
14067 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14069 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14070 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14073 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14074 Generate a function to initialize the module in utilities.
14075 Updated all callers.
14076 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
14077 initialize the module in utilities. Updated all callers.
14079 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14081 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14082 escape sequence and a literal ^L to clear the screen.
14084 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14085 when returning from Open Firmware.
14087 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
14089 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14090 (grub_ofconsole_height): Likewise.
14091 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14092 manually insert a '\n'.
14093 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14094 `grub_ofconsole_height'. Return early if these are already set.
14096 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
14098 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14099 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14100 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14101 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14102 and `normal/script.c'.
14103 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14104 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14105 (test_mod_SOURCES): New variable.
14106 (test_mod_CFLAGS): Likewise.
14107 (test_mod_LDFLAGS): Likewise.
14108 (pkgdata_MODULES): Add `test.mod'.
14109 (grub_script.tab.c): New rule.
14110 (grub_script.tab.h): Likewise.
14112 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
14114 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14115 `commands/test.c', `normal/execute.c', `normal/lexer.c',
14116 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14117 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14118 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14119 (test_mod_SOURCES): New variable.
14120 (test_mod_CFLAGS): Likewise.
14121 (pkgdata_MODULES): Add `test.mod'.
14122 (grub_script.tab.c): New rule.
14123 (grub_script.tab.h): Likewise.
14125 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
14127 Add initial scripting support.
14129 * commands/test.c: New file.
14130 * include/grub/script.h: Likewise.
14131 * normal/execute.c: Likewise.
14132 * normal/function.c: Likewise.
14133 * normal/lexer.c: Likewise.
14134 * normal/parser.y: Likewise.
14135 * normal/script.c: Likewise.
14137 * configure.ac: Add `AC_PROG_YACC' test.
14139 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14140 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14141 `normal/function.c' and `normal/script.c'.
14142 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14143 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14144 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14146 (pkgdata_MODULES): Add `test.mod'.
14147 (grub_script.tab.c): New rule.
14148 (grub_script.tab.h): Likewise.
14150 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14152 * include/grub/normal.h (grub_test_init): New prototype.
14153 (grub_test_fini): Likewise.
14155 * normal/command.c: Include <grub/script.h>.
14156 (grub_command_execute): Rewritten.
14158 * util/grub-emu.c (main): Call `grub_test_init' and
14161 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14163 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14165 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14166 there are no pending characters.
14168 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14170 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14171 `grub_strndup' to drop device arguments. Replace unnecessary
14172 `grub_strndup' with `grub_strdup'.
14174 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
14176 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14177 `debug' environment variable has been set.
14179 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
14181 * Makefile.in (install-local): Use $(DATA).
14182 (uninstall): Likewise.
14183 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14184 (sbin_UTILITIES): ... to here.
14185 (sbin_SCRIPTS): New variable.
14186 (grub_install_SOURCES): New variable.
14187 * util/powerpc/ieee1275/grub-install.in: New file.
14188 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14190 (add_segments): Call `grub_util_get_path'.
14192 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
14194 From Timothy Baldwin:
14195 * commands/ls.c (grub_ls_list_files): Close FILE with
14197 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14199 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
14201 * include/grub/parser.h: New file.
14203 * kern/parser.c: Likewise.
14205 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14206 (grub_setup_SOURCES): Likewise.
14207 (grub_probefs_SOURCES): Likewise.
14208 (grub_emu_SOURCES): Likewise.
14209 (kernel_img_HEADERS): Add `parser.h'.
14211 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14212 (grub_emu_SOURCES): Add `kern/parser.c'.
14213 (grubof_SOURCES): Likewise.
14215 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14216 (grubof_SOURCES): Add `kern/parser.c'.
14218 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14220 * kern/misc.c (grub_split_cmdline): Removed function.
14222 * kern/rescue.c: Include <grub/parser.h>.
14223 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14224 of `grub_split_cmdline'.
14226 * normal/command.c: Include <grub/parser.h>.
14227 (grub_command_execute): Use `grub_parser_split_cmdline' instead
14228 of `grub_split_cmdline'.
14230 * normal/completion.c: Include <grub/parser.h>.
14231 (cmdline_state): New variable.
14232 (iterate_dir): End the filename with a quote depending on the
14233 command line state.
14234 (get_state): new function.
14235 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14236 split the arguments and determine the current argument. When the
14237 argument string is not quoted, escape all spaces.
14239 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14241 * normal/sparc64/setjmp.S: New file.
14243 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14245 * include/grub/sparc64/libgcc.h: New file.
14246 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14247 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14248 normal/sparc64/setjmp.c.
14250 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
14252 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14253 * kern/sparc64/cache.S: New file.
14254 * kern/sparc64/cache.c: Removed.
14255 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14256 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
14258 (COMMON_LDFLAGS): Add -melf64_sparc.
14259 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14260 (grubof_SOURCES): Use cache.S instead of cache.c.
14261 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
14262 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14263 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14265 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14266 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14267 (linux_mod_CFLAGS): Commented out.
14268 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14269 out because module isn't built.
14270 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14271 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14272 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14273 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14274 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14275 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14276 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14277 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14278 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14279 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14280 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14281 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14282 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14283 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14285 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
14287 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14288 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14289 longer, because HFS should not be used on PC.
14291 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14293 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14294 consistently within the loop.
14296 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
14298 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14299 directory can not be read.
14301 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14303 * configure.ac (AC_INIT): Increase the version number to 1.91.
14305 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14306 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14307 term/i386/pc/serial.c.
14309 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14311 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14312 file size must be permitted.
14314 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14315 between %ah and %al.
14317 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
14319 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14321 Call the hook with a NUL-terminated filename.
14322 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14325 * kern/term.c (cursor_state): New variable.
14326 (grub_term_set_current): Reset the cursor state on a new
14328 (grub_setcursor): Rewritten to use CURSOR_STATE.
14329 (grub_getcursor): New function.
14331 * include/grub/term.h (grub_getcursor): New prototype.
14333 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14334 integers on ARM. Reported by Timothy Baldwin
14335 <T.E.Baldwin99@members.leeds.ac.uk>.
14337 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
14339 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14341 (grub_sfs_dir): Likewise.
14343 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
14345 Add support for the SFS filesystem.
14347 * fs/sfs.c: New file.
14349 * DISTLIST: Added `fs/sfs.c'.
14351 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14352 (grub_probefs_SOURCES): Likewise.
14353 (grub_emu_SOURCES): Likewise.
14354 (pkgdata_MODULES): Add `sfs.mod'.
14355 (sfs_mod_SOURCES): New variable.
14356 (sfs_mod_CFLAGS): Likewise.
14357 (sfs_mod_LDFLAGS): Likewise.
14359 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14360 (pkgdata_MODULES): Add `sfs.mod'.
14361 (sfs_mod_SOURCES): New variable.
14362 (sfs_mod_CFLAGS): Likewise.
14364 * util/grub-emu.c (main): Call `grub_sfs_init' and
14367 * include/grub/fs.h (grub_sfs_init): New prototype.
14368 (grub_sfs_fini): Likewise.
14370 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
14372 Add support for the AFFS filesystem.
14374 * fs/affs.c: New file.
14376 * DISTLIST: Added `fs/affs.c'.
14378 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14379 (grub_probefs_SOURCES): Likewise.
14380 (grub_emu_SOURCES): Likewise.
14381 (pkgdata_MODULES): Add `affs.mod'.
14382 (affs_mod_SOURCES): New variable.
14383 (affs_mod_CFLAGS): Likewise.
14384 (affs_mod_LDFLAGS): Likewise.
14386 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14387 (pkgdata_MODULES): Add `affs.mod'.
14388 (affs_mod_SOURCES): New variable.
14389 (affs_mod_CFLAGS): Likewise.
14391 * util/grub-emu.c (main): Call `grub_affs_init' and
14394 * include/grub/fs.h (grub_affs_init): New prototype.
14395 (grub_affs_fini): Likewise.
14397 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14399 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14401 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
14403 * configure.ac: Accept `x86_64' as host_cpu. In that case add
14406 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14409 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14410 (COMMON_LDFLAGS): New variable.
14411 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14412 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14413 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14414 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14415 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14416 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14417 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14418 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14419 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14420 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14421 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14422 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14423 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14424 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14425 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14427 (normal_mod_ASFLAGS): Add `-m32'.
14429 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14430 (grub_host_size_t, grub_host_ssize_t): New types.
14431 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14432 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14433 `GRUB_HOST_SIZEOF_VOID_P'.
14435 * include/grub/kernel.h (struct grub_module_header): Type of
14436 member offset changed to `grub_host_off_t'. Type of member size
14437 changed to `grub_host_size_t'.
14438 (struct grub_module_info): Type of member offset changed to
14439 `grub_host_off_t'. Type of member size changed to
14440 `grub_host_size_t'.
14442 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
14444 Make GRUB's kernel compliant to Multiboot Specification.
14446 * kern/i386/pc/startup.S (multiboot_header): New label.
14447 (multiboot_entry): Likewise.
14448 (multiboot_trampoline): Likewise.
14450 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14451 Increased to 0x4A0.
14453 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14454 put parentheses after a question mark.
14455 [!GRUB_UTIL] (my_mod): New variable.
14457 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14459 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
14461 Adds support for the XFS filesystem. Btrees are not supported
14464 * fs/xfs.c: New file.
14466 * DISTLIST: Added `fs/xfs.c'.
14468 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14469 (grub_probefs_SOURCES): Likewise.
14470 (grub_emu_SOURCES): Likewise.
14471 (pkgdata_MODULES): Add `xfs.mod'.
14472 (xfs_mod_SOURCES): New variable.
14473 (xfs_mod_CFLAGS): Likewise.
14475 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14476 (pkgdata_MODULES): Add `xfs.mod'.
14477 (xfs_mod_SOURCES): New variable.
14478 (xfs_mod_CFLAGS): Likewise.
14480 * util/grub-emu.c (main): Call `grub_xfs_init' and
14483 * include/grub/fs.h (grub_xfs_init): New prototype.
14484 (grub_xfs_fini): Likewise.
14487 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
14489 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14490 color modes, allow greater than 16 colors to be configured as
14493 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
14495 * normal/completion.c (complete_arguments): Add the qualifier
14496 const into OPTIONS.
14498 From Omniflux <omniflux+lists@omniflux.com>:
14499 * include/grub/terminfo.h: New file.
14500 * include/grub/tparm.h: Likewise.
14501 * include/grub/i386/pc/serial.h: Likewise.
14502 * term/terminfo.c: Likewise.
14503 * term/tparm.c: Likewise.
14504 * term/i386/pc/serial.c: Likewise.
14505 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14507 (terminfo_mod_SOURCES): New variable.
14508 (terminfo_mod_CFLAGS): Likewise.
14509 (serial_mod_SOURCES): Likewise.
14510 (serial_mod_CFLAGS): Likewise.
14512 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
14514 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14515 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14516 and kern/powerpc/ieee1275/cmain.c, respectively.
14518 * boot/powerpc/ieee1275/crt0.S: Moved to ...
14519 * kern/powerpc/ieee1275/crt0.S: ... here.
14521 * boot/powerpc/ieee1275/cmain.c: Moved to ...
14522 * kern/powerpc/ieee1275/cmain.c: ... here.
14524 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14525 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14526 instead of boot/powerpc/ieee1275/crt0.S and
14527 boot/powerpc/ieee1275/cmain.c, respectively.
14529 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14530 sectors. It was not used anyway.
14532 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14534 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14535 `unused parameter' warning.
14537 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
14539 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14541 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14544 2005-08-28 Marco Gerards <metgerards@student.han.nl>
14546 * include/grub/normal.h (enum grub_completion_type): Added
14547 `GRUB_COMPLETION_TYPE_ARGUMENT'.
14549 * normal/cmdline.c (print_completion): Handle
14550 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14551 * normal/menu_entry.c (store_completion): Likewise.
14553 * normal/completion.c (complete_arguments): New function.
14554 (grub_normal_do_completion): Call `complete_arguments' when the
14555 current words start with a dash.
14557 2005-08-27 Marco Gerards <metgerards@student.han.nl>
14559 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14560 `gzio.mod' instead of `io.mod').
14562 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
14564 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14565 (DISTDIRS): Added io and video.
14566 Rewrite the search routine to make an output consistently.
14568 * DISTLIST: Added conf/sparc64-ieee1275.mk,
14569 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14570 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14571 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14572 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14573 util/powerpc/ieee1275/misc.c.
14575 * include/grub/gzio.h: New file.
14576 * io/gzio.c: Likewise.
14578 * kern/file.c (grub_file_close): Call grub_device_close only if
14579 FILE->DEVICE is not NULL.
14581 * include/grub/mm.h [!NULL] (NULL): New macro.
14583 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14585 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14586 (pkgdata_MODULES): Added gzio.mod.
14587 (gzio_mod_SOURCES): New variable.
14588 (gzio_mod_CFLAGS): Likewise.
14590 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14591 (pkgdata_MODULES): Added gzio.mod.
14592 (gzio_mod_SOURCES): New variable.
14593 (gzio_mod_CFLAGS): Likewise.
14595 * commands/cat.c: Include grub/gzio.h.
14596 (grub_cmd_cat): Use grub_gzfile_open instead of
14599 * commands/cmp.c: Include grub/gzio.h.
14600 (grub_cmd_cmp): Use grub_gzfile_open instead of
14603 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14604 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14606 (grub_rescue_cmd_module): Likewise.
14608 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14610 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14611 kern/sparc64/ieee1275/init.c because it contains _start.
14612 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14614 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
14616 * configure.ac: Add support for sparc64 host with ieee1275
14618 * configure: Generated from configure.ac.
14619 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14621 (grub_ofdisk_read): Likewise.
14622 (grub_ofdisk_open): Use %p to print pointer values, and cast the
14623 pointers as (void *) to remove a warning.
14624 (grub_ofdisk_close): Likewise.
14625 (grub_ofdisk_read): Likewise.
14626 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14627 returns, so make it return void to remove a warning.
14628 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14629 Corresponding prototype change.
14630 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14631 values, and cast the pointers as (void *) to remove a warning.
14632 (grub_mm_dump): Likewise.
14633 * conf/sparc64-ieee1275.mk: New file.
14634 * conf/sparc64-ieee1275.rmk: Likewise.
14635 * include/grub/sparc64/setjmp.h: Likewise.
14636 * include/grub/sparc64/types.h: Likewise.
14637 * include/grub/sparc64/ieee1275/console.h: Likewise.
14638 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14639 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14640 * include/grub/sparc64/ieee1275/time.h: Likewise.
14641 * kern/sparc64/cache.c: Likewise.
14642 * kern/sparc64/dl.c: Likewise.
14643 * kern/sparc64/ieee1275/init.c: Likewise.
14644 * kern/sparc64/ieee1275/openfw.c: Likewise.
14646 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14648 * util/console.c (grub_ncurses_putchar): If C is greater than
14649 0x7f, set C to a question mark.
14650 (grub_ncurses_getcharwidth): New function.
14651 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14654 * normal/menu.c (print_entry): Made aware of Unicode. First,
14655 convert TITLE to UCS-4, and predict the cursor position by
14658 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14660 * kern/misc.c (grub_utf16_to_utf8): Likewise.
14662 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14664 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14665 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14668 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14669 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14670 grub_strcpy and grub_strlen. Take it into account that a space
14671 character is inserted as a delimiter.
14673 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14675 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14676 invalid magic in the error.
14678 * commands/search.c: New file.
14680 * util/grub-emu.c (main): Call grub_search_init and
14683 * kern/rescue.c (grub_rescue_print_disks): Removed.
14684 (grub_rescue_print_devices): New function.
14685 (grub_rescue_cmd_ls): Use grub_device_iterate with
14686 grub_rescue_print_devices instead of grub_disk_dev_iterate with
14687 grub_rescue_print_disks.
14689 * kern/partition.c (grub_partition_iterate): Return the result of
14690 PARTMAP->ITERATE instead of GRUB_ERRNO.
14692 * kern/device.c: Include grub/partition.h.
14693 (grub_device_iterate): New function.
14695 * include/grub/partition.h (grub_partition_iterate): Return int
14696 instead of grub_err_t.
14698 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14700 [GRUB_UTIL] (grub_search_fini): Likewise.
14702 * include/grub/device.h (grub_device_iterate): New prototype.
14704 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14706 (pkgdata_MODULES): Added search.mod.
14707 (search_mod_SOURCES): New variable.
14708 (search_mod_CFLAGS): Likewise.
14710 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14711 (pkgdata_MODULES): Added search.mod.
14712 (search_mod_SOURCES): New variable.
14713 (search_mod_CFLAGS): Likewise.
14715 * commands/ls.c (grub_ls_list_disks): Renamed to ...
14716 (grub_ls_list_devices): ... this, and use grub_device_iterate.
14717 All callers changed.
14719 * DISTLIST: Added commands/search.c.
14721 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
14723 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14725 (grub_getcharwidth): New function.
14727 * kern/misc.c (grub_utf8_to_ucs4): New function.
14729 * include/grub/term.h (struct grub_term): Added a new member
14731 (grub_getcharwidth): New prototype.
14733 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14735 * term/i386/pc/console.c (map_char): New function. Segregated from
14736 grub_console_putchar.
14737 (grub_console_putchar): Use map_char.
14738 (grub_console_getcharwidth): New function.
14739 (grub_console_term): Specified grub_console_getcharwidth as
14742 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14743 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14745 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14747 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14748 on grub_strtoul completely.
14749 (write_char): Declare local variables in the beginning of the
14751 (grub_vesafb_getcharwidth): New function.
14752 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14755 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
14757 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14758 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14759 commands/i386/pc/vbetest.c.
14761 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14762 call grub_vbe_get_controller_info again, because the returned
14763 information is volatile.
14764 (grub_vbe_set_video_mode): Mostly rewritten.
14765 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14766 grub_vbe_status_t correctly.
14767 (grub_vbe_get_video_mode_info): Likewise.
14768 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14769 several if statements.
14771 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14772 * commands/i386/pc/vbeinfo.c: ... this.
14774 * commands/i386/pc/vbe_test.c: Renamed to ...
14775 * commands/i386/pc/vbetest.c: ... this.
14777 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14779 (grub_cmd_vbeinfo): ... this. Save video modes before
14780 iterating. Skip a video mode, if it is not available, not enough
14781 information is given or it is monochrome. Show the memory
14782 model. Leave the interpretation of MODEVAR to grub_strtoul
14784 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14785 (GRUB_MOD_FINI): Likewise.
14787 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14788 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14789 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14790 duplicated grub_env_get. Leave the interpretation of MODEVAR to
14791 grub_strtoul completely.
14792 (real2pm): Removed.
14793 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14794 (GRUB_MOD_FINI): Likewise.
14796 * normal/misc.c: Include grub/mm.h.
14798 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14799 vbe_list_modes with vbetest.mod and vbeinfo.mod.
14800 (vbe_list_modes_mod_SOURCES): Removed.
14801 (vbe_list_modes_mod_CFLAGS): Likewise.
14802 (vbe_test_mod_SOURCES): Likewise.
14803 (vbe_test_mod_CFLAGS): Likewise.
14804 (vbeinfo_mod_SOURCES): New variable.
14805 (vbeinfo_mod_CFLAGS): Likewise.
14806 (vbetest_mod_SOURCES): Likewise.
14807 (vbetest_mod_CFLAGS): Likewise.
14809 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
14811 * normal/misc.c: New file.
14813 * DISTLIST: Added normal/misc.c.
14815 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14816 DISK to HOOK. Call HOOK with DISK.
14817 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14818 * partmap/pc.c (pc_partition_map_iterate): Likewise.
14819 * partmap/sun.c (sun_partition_map_iterate): Likewise.
14821 * normal/menu_entry.c (struct screen): Added a new member
14822 "completion_shown".
14823 (completion_buffer): New global variable.
14824 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14825 (store_completion): New function.
14826 (complete): Likewise.
14827 (clear_completions): Likewise.
14828 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14829 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14830 a tab, call complete.
14832 * normal/completion.c (disk_dev): Removed.
14833 (print_simple_completion): Likewise.
14834 (print_partition_completion): Likewise.
14835 (print_func): New global variable.
14836 (add_completion): Do not take the arguments WHAT or PRINT any
14837 longer. Added a new argument TYPE. Instead of printing directly,
14838 call PRINT_FUNC if not NULL.
14839 All callers changed.
14840 (complete_device): Use a local variable DEV instead of
14841 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14842 (grub_normal_do_completion): Take a new argument HOOK. Do not
14843 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14844 empty string, return NULL instead.
14845 All callers changed.
14847 * normal/cmdline.c (print_completion): New function.
14849 * kern/partition.c (grub_partition_iterate): Add an argument DISK
14851 All callers changed.
14853 * kern/disk.c (grub_print_partinfo): Removed.
14855 * include/grub/partition.h (struct grub_partition_map): Add a new
14856 argument DISK into HOOK of ITERATE.
14857 (grub_partition_iterate): Add a new argument DISK to HOOK.
14859 * include/grub/normal.h (enum grub_completion_type): New enum.
14860 (grub_completion_type_t): New type.
14861 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14862 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14863 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14864 (GRUB_COMPLETION_TYPE_FILE): Likewise.
14865 (grub_normal_do_completion): Added a new argument HOOK.
14866 (grub_normal_print_device_info): New prototype.
14868 * include/grub/disk.h (grub_print_partinfo): Removed.
14870 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14871 (normal_mod_SOURCES): Likewise.
14872 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14873 (normal_mod_SOURCES): Likewise.
14875 * commands/ls.c (grub_ls_list_disks): Use
14876 grub_normal_print_device_info instead of grub_print_partinfo. Free
14878 (grub_ls_list_files): Use grub_normal_print_device_info instead of
14879 duplicating the code.
14881 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14883 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14884 follow GCS more precisely.
14885 * commands/i386/pc/vbe_test.c: Likewise.
14886 * include/grub/i386/pc/vbe.h: Likewise.
14887 * term/i386/pc/vesafb.c: Likewise.
14888 * video/i386/pc/vbe.c: Likewise.
14890 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
14892 * DISTLIST: Added term/i386/pc/vesafb.c
14893 DISTLIST: Added video/i386/pc/vbe.c
14894 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14895 DISTLIST: Added commands/i386/pc/vbe_test.c.
14896 * commands/i386/pc/vbe_list_modes.c: New file.
14897 * commands/i386/pc/vbe_test.c: Likewise.
14898 * term/i386/pc/vesafb.c: Likewise.
14899 * video/i386/pc/vbe.c: Likewise.
14900 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14901 (grub_vbe_probe) Added prototype.
14902 (grub_vbe_set_video_mode) Likewise.
14903 (grub_vbe_get_video_mode) Likewise.
14904 (grub_vbe_get_video_mode_info) Likewise.
14905 (grub_vbe_set_pixel_rgb) Likewise.
14906 (grub_vbe_set_pixel_index) Likewise.
14907 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14908 (pkgdata_MODULES): Added vesafb.mod.
14909 (pkgdata_MODULES): Added vbe_list_modes.mod.
14910 (pkgdata_MODULES): Added vbe_test.mod.
14911 (vbe_mod_SOURCES): Added.
14912 (vbe_mod_CFLAGS): Likewise.
14913 (vesafb_mod_SOURCES): Likewise.
14914 (vesafb_mod_CFLAGS): Likewise.
14915 (vbe_list_modes_mod_SOURCES): Likewise.
14916 (vbe_list_modes_mod_CFLAGS): Likewise.
14917 (vbe_test_mod_SOURCES): Likewise.
14918 (vbe_test_mod_CFLAGS): Likewise.
14920 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
14922 * normal/command.c (grub_command_execute): If INTERACTIVE is
14923 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14924 CMDLINE. Disable the pager if INTERACTIVE is true.
14925 All callers are changed.
14927 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14928 before reading a config file.
14929 * normal/main.c (read_config_file): Even if a command is not
14930 found, register it if it is within an entry.
14932 * util/grub-emu.c: Include sys/types.h and unistd.h.
14933 (options): Added --hold.
14934 (struct arguments): Added a new member "hold".
14935 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14937 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14938 cleared by a debugger, if it is not zero.
14940 * include/grub/normal.h (grub_command_execute): Add an argument
14943 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
14945 * DISTLIST: Added include/grub/i386/pc/vbe.h.
14947 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
14949 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14950 program with another one, because the old one didn't detect a bug
14951 in gcc-3.4. Always use regparm 2, because the new test is still
14952 not enough for gcc-4.0. Someone must investigate a simple test
14953 case which detects a bug in gcc-4.0.
14955 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
14957 * DISTLIST: Added normal/completion.c.
14959 * normal/completion.c: New file.
14961 * term/i386/pc/console.c (grub_console_getwh): New function.
14962 (grub_console_term): Assign grub_console_getwh to getwh.
14964 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14965 function is defined in normal/completion.c as
14966 grub_normal_do_completion.
14967 (grub_cmdline_get): Use grub_normal_do_completion instead of
14970 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14971 returns non-zero, otherwise return 0.
14972 (grub_partition_iterate): First, probe the partition map. Then,
14973 call ITERATE only for this partition map.
14975 * kern/misc.c (grub_strncmp): Rewritten.
14977 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14978 returns non-zero. Otherwise return 0.
14980 * include/grub/partition.h (grub_partition_map_iterate): Return
14981 int instead of void.
14983 * include/grub/normal.h (grub_normal_do_completion): New prototype.
14985 * include/grub/misc.h (grub_strncmp): Change the type of N to
14988 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14991 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14992 unsigned explicitly before comparing it with I.
14994 * kern/main.c (grub_env_write_root): Add the attribute unused into
14997 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14998 normal/completion.c.
14999 (normal_mod_SOURCES): Likewise.
15000 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15001 (normal_mod_SOURCES): Likewise.
15003 * normal/command.c (grub_iterate_commands): If ITERATE returns
15004 non-zero, return one immediately.
15006 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
15008 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15009 * kern/i386/pc/startup.S: Updated Global Descriptor table's
15011 (grub_vbe_get_controller_info): New function.
15012 (grub_vbe_get_mode_info): Likewise.
15013 (grub_vbe_set_mode): Likewise.
15014 (grub_vbe_get_mode): Likewise.
15015 (grub_vbe_set_memory_window): Likewise.
15016 (grub_vbe_get_memory_window): Likewise.
15017 (grub_vbe_set_scanline_length): Likewise.
15018 (grub_vbe_get_scanline_length): Likewise.
15019 (grub_vbe_set_display_start): Likewise.
15020 (grub_vbe_get_display_start): Likewise.
15021 (grub_vbe_set_palette_data): Likewise.
15022 * include/grub/i386/pc/vbe.h: New file.
15024 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15026 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15027 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15028 * DISTLIST: Likewise.
15029 * kern/ieee1275/of.c: Moved to ...
15030 * kern/ieee1275/ieee1275.c: ... here.
15032 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15034 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15035 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15036 Pass 0 as `end' parameter to grub_strtoul().
15038 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
15040 * include/grub/powerpc/ieee1275/console.h: Do not include
15041 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
15043 (grub_console_cur_color): Remove i386-specific prototype.
15044 (grub_console_real_putchar): Likewise.
15045 (grub_console_checkkey): Likewise.
15046 (grub_console_getkey): Likewise.
15047 (grub_console_getxy): Likewise.
15048 (grub_console_gotoxy): Likewise.
15049 (grub_console_cls): Likewise.
15050 (grub_console_setcursor): Likewise.
15051 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15052 Include <grub/machine/console.h>.
15053 * term/ieee1275/ofconsole.c: Likewise.
15055 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
15057 * Makefile.in (LIBLZO): New variable.
15059 * configure.ac: Check for LZO version 2.
15061 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15062 lzo/lzo1x.h instead of lzo1x.h.
15064 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15067 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15068 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15070 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15071 copying the data from PARTITION to P.
15073 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15075 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15076 negative, unload the module.
15078 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15079 map is "pc_partition_map" but not "pc".
15080 (usage): Fix the description. The options are --boot-image and
15081 --core-image but not --boot-file or --core-file.
15082 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15083 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15086 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15087 --core-file. Specify INSTALL_DEVICE as an argument.
15089 * util/console.c: Include config.h.
15090 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15091 [HAVE_NCURSES_H]: Include ncurses.h.
15092 [HAVE_CURSES_H]: Include curses.h.
15093 [!A_NORMAL] (A_NORMAL): Defined as zero.
15094 [!A_STANDOUT] (A_STANDOUT): Likewise.
15096 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15098 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15100 * configure.ac: Check for curses libraries and headers.
15102 * Makefile.in (LIBCURSES): New variable.
15104 * genmk.rb (Script::rule): Set the executable bits.
15106 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15107 name of the PC partition map is "pc_partition_map" but not "pc".
15109 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15111 * util/i386/pc/grub-install.in (grub_probefs): New variable.
15112 (modules): Likewise.
15113 (usage): Added descriptions for --modules and --grub-probefs.
15114 Handle --modules and --grub-probefs. Save the arguments in MODULES
15115 and GRUB_PROBEFS, respectively.
15116 Auto-detect a filesystem module against GRUBDIR. If the result is
15117 empty and modules are not specified explicitly, abort the
15118 installation. Add the result to MODULES.
15120 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15121 disk/powerpc/ieee1275/ofdisk.c,
15122 include/grub/powerpc/ieee1275/init.h and
15123 term/powerpc/ieee1275/ofconsole.c.
15124 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15125 term/ieee1275/ofconsole.c.
15127 * include/grub/powerpc/ieee1275/console.h: Resurrected.
15129 * COPYING: Upgraded to the latest version. Only the address of the
15130 FSF office has changed.
15132 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
15134 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15135 kern/ieee1275.c with kern/ieee1275/of.c.
15137 * kern/ieee1275.c: Moved to ...
15138 * kern/ieee1275/of.c: ... here.
15140 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
15142 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15145 * config.guess: Updated to the latest version from gnulib.
15146 * config.sub: Likewise.
15147 * install.sh: Likewise.
15148 * mkinstalldirs: Likewise.
15150 * include/grub/console.h: Removed. This file is arch-specific. Do
15151 not put this in include/grub.
15153 * include/grub/i386/pc/console.h: Resurrected.
15155 * util/console.c: Include grub/machine/console.h instead of
15157 * util/grub-emu.c: Likewise.
15159 2005-08-04 Marco Gerards <metgerards@student.han.nl>
15161 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15164 From Vincent Pelletier <subdino2004@yahoo.fr>
15165 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15166 Redefined to use grub_getwh.
15167 (grub_term): New member named getwh.
15168 (grub_getwh): New prototype.
15169 * kern/term.c (grub_getwh): New function.
15170 * term/i386/pc/console.c (grub_console_getwh): New function.
15171 (grub_console_term): New member `getwh'.
15172 * term/i386/pc/vga.c (grub_vga_getwh): New function.
15173 (grub_vga_term): New member `getwh'.
15174 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15176 (grub_ofconsole_getw): New function.
15177 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15178 (grub_ofconsole_term): New field named getwh and new initial
15181 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
15183 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15184 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
15185 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15186 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15187 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15188 of <grub/machine/ieee1275.h>.
15189 * commands/ieee1275/reboot.c: Likewise.
15190 * boot/powerpc/ieee1275/ieee1275.c: Move ...
15191 * kern/ieee1275.c: ... to here. All users updated. Change all
15192 parameter structs to use new type `grub_ieee1275_cell_t'.
15193 * term/powerpc/ieee1275/ofconsole.c: Move ...
15194 * term/ieee1275/ofconsole.c: ... to here. All users updated.
15195 * disk/powerpc/ieee1275/ofdisk.c: Move ...
15196 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
15197 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15199 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15200 Remove unused prototypes. All users updated.
15201 * include/grub/powerpc/ieee1275/console.h: Removed.
15202 * include/grub/powerpc/ieee1275/ieee1275.h: Define
15203 `grub_ieee1275_cell_t'.
15204 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15205 Cast comparisons with -1 to the correct type.
15206 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15207 type to match `grub_ieee1275_entry_fn'.
15209 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
15211 * DISTLIST: Added util/i386/pc/grub-probefs.c.
15213 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15214 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15216 (grub_probefs_SOURCES): New variable.
15218 * util/i386/pc/grub-probefs.c: New file.
15220 * util/i386/pc/grub-setup.c (main): Call
15221 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15222 grub_hfs_init and grub_jfs_init to initialize the system. Call
15223 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15224 grub_pc_partition_map_fini to finish the system.
15226 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
15228 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15230 (grub_multiboot_load_elf32): Likewise.
15231 (grub_multiboot_is_elf64): Likewise.
15232 (grub_multiboot_load_elf64): Likewise.
15233 (grub_multiboot_load_elf): Likewise.
15234 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15235 an ELF32 or ELF64 file.
15236 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15238 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15239 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15240 NULL before calling FS->LABEL.
15241 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15242 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15243 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15244 before calling FS->LABEL.
15246 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
15248 * util/i386/pc/grub-install.in (datadir): New variable.
15250 (pkgdatadir): New variable.
15251 (pkglibdir): Removed.
15253 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
15255 * DISTLIST: Added util/i386/pc/grub-install.in.
15257 * util/i386/pc/grub-install.in: New file.
15259 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15260 (grub_install_SOURCES): Likewise.
15262 * genmk.rb: Added support for scripts.
15263 (Script): New class.
15264 (scripts): New variable.
15266 * Makefile.in (install-local): Install sbin_SCRIPTS by
15268 (uninstall): Remove sbin_SCRIPTS.
15270 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15271 device, try to get a GRUB device by
15272 grub_util_biosdisk_get_grub_dev.
15275 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15276 description for --device-map.
15278 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15280 Change the semantics of variable hooks. They now return strings
15281 instead of error values.
15283 * util/i386/pc/grub-setup.c: Include grub/env.h.
15284 (setup): Use grub_device_set_root instead of grub_env_set.
15286 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15287 grub_env_get instead of grub_device_set_root and
15288 grub_device_get_root, respectively.
15290 * kern/main.c (grub_env_write_root): New function.
15291 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15292 grub_env_set instead of grub_device_set_root.
15294 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15296 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15297 rather than calling ENV->WRITE_HOOK afterwards.
15298 (grub_env_get): Return the result of ENV->READ_HOOK rather than
15299 passing a pointer of a pointer.
15300 (grub_register_variable_hook): Change the types of "read_hook" and
15301 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15303 Allocate the default empty string on the heap, because this string
15304 may be freed later.
15306 * kern/device.c: Include grub/env.h.
15307 (grub_device_set_root): Removed.
15308 (grub_device_get_root): Likewise.
15309 (grub_device_open): Use grub_env_get instead of
15310 grub_device_get_root.
15312 * include/grub/env.h (grub_env_read_hook_t): New type.
15313 (grub_env_write_hook_t): Likewise.
15314 (grub_env_var): Change the types of "read_hook" and "write_hook"
15315 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15316 (grub_register_variable_hook): Likewise.
15318 * include/grub/device.h (grub_device_set_root): Removed.
15319 (grub_device_set_root): Likewise.
15321 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15322 make sure that DIRNAME terminates with '/', so that
15323 grub_fat_find_dir will fail if PATH is not a directory.
15325 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15327 Use the qualifier auto for print_files and print_files_long.
15328 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15330 Put a newline only if there is no error.
15331 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15334 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
15336 * kern/partition.c (grub_partition_probe): Initialize PART to
15337 NULL. Otherwise, when no partition map is registered, this returns
15340 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
15342 * partmap/apple.c (apple_partition_map_iterate): Check if POS
15343 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15346 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
15348 * commands/ls.c (grub_ls_list_disks): Print the filesystem
15349 information on each device, if it does not have partitions. Print
15350 "Device" instead of "Disk", because this function is not specific
15353 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15354 static to ensure that it is put on the memory rather than a
15357 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15359 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15360 (grub_cat_init): Likewise.
15361 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15362 (options): Likewise.
15363 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15364 (grub_configfile_init): Likewise.
15365 * font/manager.c (GRUB_MOD_INIT): Likewise.
15366 * commands/help.c (GRUB_MOD_INIT): Likewise.
15367 (grub_help_init): Likewise.
15368 * normal/command.c (grub_command_init): Likewise.
15369 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15370 * disk/loopback.c (grub_loop_init): Likewise.
15371 (GRUB_MOD_INIT): Likewise.
15372 * commands/ls.c (grub_ls_init): Likewise.
15373 (GRUB_MOD_INIT): Likewise.
15374 (options): Likewise.
15375 * commands/boot.c (grub_boot_init): Likewise.
15376 (GRUB_MOD_INIT): Likewise.
15377 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15378 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15379 (GRUB_MOD_INIT): Likewise.
15380 * commands/cmp.c (grub_cmp_init): Likewise.
15381 (GRUB_MOD_INIT): Likewise.
15383 * normal/arg.c: Use <> instead of "" to include header files.
15384 (SHORT_ARG_HELP): New macro.
15385 (SHORT_ARG_USAGE): Likewise.
15386 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15387 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15389 (find_short): Check if C is 'h' or 'u' explicitly.
15390 (grub_arg_show_help): Use space characters instead of tabs. Treat
15391 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15392 are shown with --help and --usage only if they are not used for
15393 the command itself.
15394 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15397 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15398 const into "longarg". Change the type of "shortarg" to int.
15400 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15402 * boot/i386/pc/boot.S (boot_drive_check): New label.
15404 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15407 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15408 which do not pass a boot drive correctly. Copied from GRUB Legacy.
15410 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15412 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15413 When turning off Gate A20, skip the check and return immediately,
15414 because this is not fatal usually.
15416 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
15418 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15419 be 0x7C00 instead of 0x8000.
15421 * boot/i386/pc/pxeboot.S: Rewritten.
15423 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15425 (gate_a20_check_state): Read a byte from 0x108000. Invert the
15428 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
15430 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15431 robustness. This routine now supports a BIOS call and System
15432 Control Port A to modify the gate A20.
15434 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15435 Increased to 0x440.
15437 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
15439 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15440 device path and resulting ihandle.
15441 (grub_ofdisk_close): dprintf the ihandle being closed.
15442 (grub_ofdisk_read): dprintf function parameters.
15443 * kern/mm.c (grub_mm_init_region): Likewise.
15444 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15445 (grub_linux_boot): dprintf the Linux entry point, initrd address and
15446 size, and boot arguments.
15447 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15448 before loading into memory.
15449 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15450 before loading into memory.
15452 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
15454 * kern/mm.c: Added much documentation.
15455 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15456 8, set to 5 instead of 8.
15458 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15460 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15462 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15463 (grub_mkdevicemap_SOURCES): New variable.
15465 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15466 lib/device.c of GRUB Legacy.
15468 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
15470 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15471 instead of PATH is NULL.
15473 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
15475 * commands/cmp.c (BUFFER_SIZE): New macro.
15476 (grub_cmd_cmp): Close the right file at the right time. Compare
15477 only data just read. Don't report files of different size as
15478 identical. Dynamically allocate buffers. Move variable
15479 declarations at the beginning of function.
15481 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
15483 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15486 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
15488 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15489 when backspace is pressed at beginning of line.
15491 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
15493 * DISTLIST: Added genfslist.sh.
15495 * normal/main.c (fs_module_list): New variable.
15496 (autoload_fs_module): New function.
15497 (read_fs_list): Likewise.
15498 (grub_normal_execute): Call read_fs_list.
15500 * kern/fs.c (grub_fs_autoload_hook): New variable.
15501 (grub_fs_probe): Added support for auto-loading.
15503 * include/grub/normal.h (struct grub_fs_module_list): New struct.
15504 (grub_fs_module_list_t): New type.
15506 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15507 (grub_fs_autoload_hook): New prototype.
15509 * genfslist.sh: New file.
15511 * genmk.rb: Added a rule to generate a filesystem list.
15513 2005-06-30 Marco Gerards <metgerards@student.han.nl>
15515 * configure.ac: Fix the test for cross-compiling.
15517 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
15518 define GRUB_UTIL anymore.
15520 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15521 so this function works on other systems than just big endian.
15522 (load_modules): Likewise.
15523 (add_segments): Likewise.
15525 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
15527 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
15528 contains `l' modifier, get a long from va_arg().
15530 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
15532 * kern/mm.c (grub_free): If the next free block which is being
15533 merged is the first free block, set the first block to the block
15535 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15537 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15539 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15540 `grub_ieee1275_chosen'.
15542 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
15544 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15545 (grub_ieee1275_chosen): New variable.
15546 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15548 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15549 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15550 Rename first argument to `phandle' for consistency.
15551 (grub_ieee1275_get_property_length): Likewise.
15552 (grub_ieee1275_next_property): Likewise. Change type of first argument
15553 to grub_ieee1275_phandle_t.
15554 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15555 Move export next to declaration.
15556 (grub_ieee1275_chosen): New variable.
15557 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15558 Correct cosmetic typo.
15559 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15560 `grub_ieee1275_chosen'.
15561 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15562 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15563 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15564 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15565 `grub_ieee1275_chosen'.
15567 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
15569 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15571 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15572 /chosen/bootargs as "variable=value" pairs.
15574 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
15576 * include/grub/misc.h (grub_dprintf): New macro.
15577 (grub_real_dprintf): New prototype.
15578 (grub_strword): Likewise.
15579 (grub_iswordseparator): Likewise.
15580 * kern/misc.c (grub_real_dprintf): New function.
15581 (grub_strword): Likewise.
15582 (grub_iswordseparator): Likewise.
15584 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
15586 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15587 (roundup): Remove macro.
15588 (grub_ieee1275_flags): Make static.
15589 (grub_ieee1275_realmode): Remove.
15590 (grub_ieee1275_test_flag): New function.
15591 (grub_ieee1275_set_flag): Likewise.
15592 (find_options): Rename to `grub_ieee1275_find_options'; update
15593 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15594 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15595 (cmain): New prototype.
15596 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15597 `grub_ieee1275_flags' directly.
15598 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15599 machine/biosdisk.h.
15600 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15601 Don't include grub/machine/init.h.
15602 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15603 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15605 (grub_ieee1275_realmode): Likewise.
15606 (grub_ieee1275_flag): New enum.
15607 (grub_ieee1275_test_flag): New prototype.
15608 (grub_ieee1275_set_flag): New prototype.
15609 * include/grub/powerpc/ieee1275/init.h: Remove file.
15610 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15611 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15612 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
15613 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
15615 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15616 `grub_ieee1275_test_flag'.
15617 (grub_ieee1275_encode_devname): Likewise.
15619 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
15621 * include/grub/powerpc/ieee1275/ieee1275.h
15622 (grub_ieee1275_encode_devname): New prototype.
15623 (grub_ieee1275_get_filename): Likewise.
15624 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15626 (grub_set_prefix): Likewise.
15627 (grub_machine_init): Call grub_set_prefix.
15628 * kern/powerpc/ieee1275/openfw.c: Fix typos.
15629 (grub_parse_type): New enum.
15630 (grub_ieee1275_get_devargs): New function.
15631 (grub_ieee1275_get_devname): Likewise.
15632 (grub_ieee1275_parse_args): Likewise.
15633 (grub_ieee1275_get_filename): Likewise.
15634 (grub_ieee1275_encode_devname): Likewise.
15636 2005-03-30 Marco Gerards <metgerards@student.han.nl>
15638 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15639 `grub_loader_unset'.
15641 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
15643 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15644 instead of grub_ieee1275_interpret.
15645 (grub_halt_init): New function.
15646 (grub_halt_fini): Likewise.
15647 (GRUB_MOD_INIT): Correct message grammar.
15648 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15649 instead of grub_ieee1275_interpret.
15650 (grub_reboot_init): New function.
15651 (grub_reboot_fini): Likewise.
15652 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15653 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15654 util/i386/pc/misc.c with commands/ieee1275/halt.c,
15655 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15656 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15658 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15660 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15662 (grub_halt): Likewise.
15663 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15664 (cmain): Remove __attribute__((unused)).
15665 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15666 (grub_heap_len): Likewise.
15667 (grub_machine_fini): New function.
15668 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15669 (grub_halt): Likewise.
15670 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15672 * util/powerpc/ieee1275/misc.c: New file.
15674 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
15676 * DISTLIST: New file.
15677 * gendistlist.sh: Likewise.
15679 * Makefile.in (COMMON_DISTFILES): Removed.
15680 (BOOT_DISTFILES): Likewise.
15681 (CONF_DISTFILES): Likewise.
15682 (DISK_DISTFILES): Likewise.
15683 (FS_DISTFILES): Likewise.
15684 (INCLUDE_DISTFILES): Likewise.
15685 (KERN_DISTFILES): Likewise.
15686 (LOADER_DISTFILES): Likewise.
15687 (TERM_DISTFILES): Likewise.
15688 (UTIL_DISTFILES): Likewise.
15689 (DISTFILES): Likewise.
15690 (uninstall): Uninstall files in $(pkgdata_DATA).
15691 (DISTLIST): New target.
15692 (distdir): Use the contents of the file DISTLIST to get a list of
15695 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
15697 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15698 descriptor. This is ported from GRUB Legacy.
15700 * gencmdlist.sh: Added an extra semicolon to make it work with
15701 old sed versions. Reported by Robert Bihlmeyer
15702 <robbe@orcus.priv.at>.
15704 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
15706 Automatic loading of commands is supported.
15708 * normal/main.c (read_command_list): New function.
15709 (grub_normal_execute): Call read_command_list.
15711 * normal/command.c (grub_register_command): Return zero or CMD.
15712 Allocate CMD->NAME from the heap.
15713 Initialize CMD->MODULE_NAME to zero.
15714 Find the same name as well. If the same command is found and it is
15715 a dummy command, overwrite members. If it is not a dummy command,
15717 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15718 (grub_command_find): If a dummy command is found, load a module
15719 and retry to find a command only once.
15721 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15722 make sure that each command is loaded.
15724 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15726 (struct grub_command): Remove const from the member `name'.
15727 Add a new member `module_name'.
15728 (grub_register_command): Return grub_command_t.
15730 * commands/help.c (grub_cmd_help): Call grub_command_find to make
15731 sure that each command is loaded.
15733 * genmk.rb (PModule::rule): Specify a module name without the
15734 suffix ".mod" to gencmdlist.sh.
15736 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15738 * gencmdlist.sh: New file.
15740 * genmk.rb (PModule::rule): Generate a rule for a command list.
15742 Generate command.lst from $(COMMANDFILES).
15744 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15745 (DATA): Added $(pkgdata_DATA).
15746 (install-local): Install files in $(pkgdata_DATA).
15748 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
15750 * term/i386/pc/vga.c (debug_command): Removed.
15751 (GRUB_MOD_INIT): Do not register the command "debug".
15753 From Hollis Blanchard:
15754 * commands/configfile.c: New file.
15755 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15756 commands/configfile.c.
15757 (pkgdata_MODULES): Added configfile.mod.
15758 (configfile_mod_SOURCES): New variable.
15759 (configfile_mod_CFLAGS): Likewise.
15760 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15761 commands/configfile.c.
15762 (pkgdata_MODULES): Added configfile.mod.
15763 (configfile_mod_SOURCES): New variable.
15764 (configfile_mod_CFLAGS): Likewise.
15765 * util/grub-emu.c (main): Call grub_configfile_init and
15766 grub_configfile_fini.
15767 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15769 [GRUB_UTIL] (grub_configfile_fini): Likewise.
15771 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15773 * normal/arg.c (grub_arg_show_help): Do not show the bug report
15776 * commands/help.c (grub_cmd_help): Do not print newlines after
15777 the last command in print_command_help.
15779 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
15781 * commands/default.h: New file.
15782 * commands/timeout.h: Likewise.
15783 * normal/context.c: Likewise.
15785 * util/misc.c: Do not include sys/times.h.
15786 Include sys/time.h and grub/machine/time.h.
15787 (grub_get_rtc): Rewritten with gettimeofday.
15789 * util/grub-emu.c (main): Call grub_default_init and
15790 grub_timeout_init before grub_normal_init, and call
15791 grub_timeout_fini and grub_default_fini after grub_main.
15793 * util/console.c (grub_ncurses_checkkey): Return the read
15796 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15799 * normal/main.c (read_config_file): Push MENU. If this fails,
15800 print an error and wait for a user input.
15801 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15802 If a menu is empty or an error occurs, pop MENU.
15803 (grub_normal_execute): Pop and free MENU after grub_menu_run
15806 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15808 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15810 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15812 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15814 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15817 * include/grub/normal.h (struct grub_menu_list): New struct.
15818 (grub_menu_list_t): New type.
15819 (struct grub_context): New struct.
15820 (grub_context_t): New type.
15821 (grub_register_command): Got rid of EXPORT_FUNC.
15822 (grub_unregister_command): Likewise.
15823 (grub_context_get): New prototype.
15824 (grub_context_get_current_menu): Likewise.
15825 (grub_context_push_menu): Likewise.
15826 (grub_context_pop_menu): Likewise.
15827 [GRUB_UTIL] (grub_default_init): Likewise.
15828 [GRUB_UTIL] (grub_default_fini): Likewise.
15829 [GRUB_UTIL] (grub_timeout_init): Likewise.
15830 [GRUB_UTIL] (grub_timeout_fini): Likewise.
15832 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15833 commands/timeout.c and normal/context.c.
15834 (pkgdata_MODULES): Added default.mod and timeout.mod.
15835 (normal_mod_SOURCES): Added normal/context.c.
15836 (default_mod_SOURCES): New variable.
15837 (default_mod_CFLAGS): Likewise.
15838 (timeout_mod_SOURCES): Likewise.
15839 (timeout_mod_CFLAGS): Likewise.
15840 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15842 (pkgdata_MODULES): Added default.mod and timeout.mod.
15843 (normal_mod_SOURCES): Added normal/context.c.
15844 (default_mod_SOURCES): New variable.
15845 (default_mod_CFLAGS): Likewise.
15846 (timeout_mod_SOURCES): Likewise.
15847 (timeout_mod_CFLAGS): Likewise.
15849 * Makefile.in (all-local): Added $(MKFILES).
15851 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
15853 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15854 (grub_emu_SOURCES): Likewise.
15855 (pkgdata_MODULES): Add `sun.mod'.
15856 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15857 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15859 (pkgdata_MODULES): Add `sun.mod'.
15860 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15861 * include/grub/partition.h (grub_sun_partition_map_init): New
15863 (grub_sun_partition_map_fini): Likewise.
15864 * partmap/sun.c: New file.
15865 * util/grub-emu.c (main): Initialize and de-initialize the sun
15866 partitionmap support.
15868 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
15870 This implements an Emacs-like menu entry editor.
15872 * normal/menu_entry.c: New file.
15874 * util/console.c (grub_ncurses_putchar): Translate some Unicode
15875 characters to ASCII.
15876 (saved_char): New variable.
15877 (grub_ncurses_checkkey): Rewritten completely.
15878 (grub_ncurses_getkey): Likewise.
15879 (grub_ncurses_init): Call raw instead of cbreak.
15881 * normal/menu.c (print_entry): Do not put a space.
15882 (init_page): Renamed to ...
15883 (grub_menu_init_page): ... this. All callers changed.
15884 (edit_menu_entry): Removed.
15885 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15887 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15889 * kern/misc.c (grub_vprintf): Call grub_refresh.
15891 * normal/menu.c (DISP_LEFT): Renamed to ...
15892 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15893 * normal/menu.c (DISP_UP): Renamed to ...
15894 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15895 * normal/menu.c (DISP_RIGHT): Renamed to ...
15896 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15897 * normal/menu.c (DISP_DOWN): Renamed to ...
15898 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15899 * normal/menu.c (DISP_HLINE): Renamed to ...
15900 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15901 * normal/menu.c (DISP_VLINE): Renamed to ...
15902 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15903 * normal/menu.c (DISP_UL): Renamed to ...
15904 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15905 * normal/menu.c (DISP_UR): Renamed to ...
15906 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15907 * normal/menu.c (DISP_LL): Renamed to ...
15908 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15909 * normal/menu.c (DISP_LR): Renamed to ...
15910 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15911 * normal/menu.c (TERM_WIDTH): Renamed to ...
15912 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15913 * normal/menu.c (TERM_HEIGHT): Renamed to ...
15914 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15915 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15916 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15917 * normal/menu.c (TERM_MARGIN): Renamed to ...
15918 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15919 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15920 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15921 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15922 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15923 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15924 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15925 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15926 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15927 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15928 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15929 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15930 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15931 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15932 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15933 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15934 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15935 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15936 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15937 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15938 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15939 All callers changed.
15941 * include/grub/normal.h: New prototype.
15943 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15944 normal/menu_entry.c.
15945 (normal_mod_SOURCES): Likewise.
15946 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15947 (normal_mod_SOURCES): Likewise.
15949 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
15951 * include/grub/normal.h (grub_halt_init): New prototype.
15952 (grub_halt_fini): Likewise.
15953 (grub_reboot_init): Likewise.
15954 (grub_reboot_fini): Likewise.
15956 * util/grub-emu.c: Include signal.h.
15957 (main_env): New global variable.
15958 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15960 (grub_machine_fini): New function.
15961 (main): Call grub_halt_init and grub_reboot_init before
15962 grub_main, and grub_reboot_fini and grub_halt_fini after it.
15963 Call setjmp with MAIN_ENV to go back afterwards.
15964 Call grub_machine_fini right before return.
15966 * include/grub/util/misc.h: Include setjmp.h.
15967 (main_env): New prototype.
15969 * include/grub/kernel.h (grub_machine_fini): New prototype.
15970 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15971 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15973 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15974 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15975 * term/i386/pc/console.c (grub_console_fini): Likewise.
15977 * util/i386/pc/misc.c: New file.
15979 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15980 util/i386/pc/misc.c, commands/i386/pc/halt.c and
15981 commands/i386/pc/reboot.c.
15983 2005-02-14 Guillem Jover <guillem@hadrons.org>
15985 * include/grub/dl.h (grub_dl_check_header): New prototype.
15986 (grub_arch_dl_check_header): Change return type to grub_err_t,
15987 remove size parameter and export function. Update all callers.
15988 * kern/dl.c (grub_dl_check_header): New function.
15989 (grub_dl_load_core): Use `grub_dl_check_header' instead of
15990 `grub_arch_dl_check_header'. Check ELF type. Check if sections
15991 are inside the core.
15992 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15993 independent ELF header checks.
15994 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15995 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15996 `grub_dl_check_header' instead of explicit checks. Check for the
15998 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15999 `grub_dl_check_header' instead of explicit checks. Remove arch
16000 specific ELF header checks.
16002 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16005 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
16007 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16008 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16010 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
16012 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16013 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16014 (part_map_iterate): Clear `grub_errno' and return 0 if
16015 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16016 * partmap/amiga.c (amiga_partition_map_iterate): Return
16017 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16018 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16020 2005-02-01 Guillem Jover <guillem@hadrons.org>
16022 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16025 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16027 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16029 (grub_rescue_cmd_linux): New prototype.
16030 (grub_rescue_cmd_initrd): Likewise.
16031 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16033 (grub_linux_release_mem): Release the memory for the initrd.
16034 (grub_load_linux): Renamed from this...
16035 (grub_rescue_cmd_linux): ...To this. Changed all callers.
16036 Changed `entry' not to be static. Loop over memory regions to
16037 find another one when the default fails.
16038 (grub_rescue_cmd_initrd): New function.
16039 (grub_linux_init): Remove function.
16040 (grub_linux_fini): Likewise.
16041 (GRUB_MOD_INIT): Register `initrd'.
16042 (GRUB_MOD_FINI): Unregister `initrd'.
16043 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16045 (grub_linux_normal_fini): Likewise.
16046 (GRUB_MOD_INIT): Register `initrd'.
16047 (GRUB_MOD_FINI): Unregister `initrd'.
16049 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16051 * commands/help.c: New file.
16052 * normal/arg.c (show_help): Renamed to...
16053 (grub_arg_show_help): ... this.
16054 * commands/i386/pc/halt.c: New file.
16055 * commands/i386/pc/reboot.c: Likewise.
16056 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16057 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16058 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16059 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16061 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16063 (pkgdata_MODULES): Add `help.mod'.
16064 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16065 * grub/i386/pc/init.h (grub_reboot): New prototype.
16066 (grub_halt): Likewise.
16067 * include/grub/normal.h (grub_arg_show_help): New prototype.
16068 (grub_help_init): Likewise.
16069 (grub_help_fini): Likewise.
16070 * util/grub-emu.c (main): Initialize and deinitialize the help
16073 * normal/cmdline.c (grub_cmdline_get): Doc fix.
16075 * normal/command.c (grub_command_init): Fixed the description of
16076 the `set' and `unset' commands.
16078 2005-01-31 Marco Gerards <metgerards@student.han.nl>
16080 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16082 * commands/ieee1275/halt.c: New file.
16083 * commands/ieee1275/reboot.c: Likewise.
16084 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16085 `__attribute__ ((unused))'. Some GCS related fixed.
16086 (grub_suspend_init) [GRUB_UTIL]: Function removed.
16087 (grub_suspend_fini): Likewise.
16088 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16090 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16091 (halt_mod_CFLAGS): New variables.
16092 * include/grub/powerpc/ieee1275/ieee1275.h
16093 (grub_ieee1275_interpret): New prototype.
16095 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
16097 * include/grub/misc.h (memmove): New prototype.
16098 (memcpy): Likewise.
16100 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
16102 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16103 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
16105 2005-01-22 Marco Gerards <metgerards@student.han.nl>
16107 * kern/misc.c (grub_strndup): Function rewritten.
16109 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
16111 * normal/menu.c (TERM_WIDTH): Macro redefined.
16112 (TERM_TOP_BORDER_Y): Likewise.
16113 (draw_border): Replaced while-loop by a for-loop. Make the number
16114 of lines consistent with the number of lines displayed in
16115 print_entries. Added a margin below the rectangle.
16116 (print_entry): Make the entry fit in the rectangle.
16117 (print_entries): Display the scroll arrows next to the right
16120 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16122 * fs/minix.c (grub_minix_find_file): Reserve more space for
16123 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
16124 `grub_strncpy' to copy `path' into it.
16126 2005-01-21 Marco Gerards <metgerards@student.han.nl>
16128 Add the loopback device, a device via which files can be accessed
16131 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16132 (pkgdata_MODULES): Add loopback.mod.
16133 (loopback_mod_SOURCES): New variable.
16134 (loopback_mod_CFLAGS): Likewise.
16135 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16137 (pkgdata_MODULES): Add loopback.mod.
16138 (loopback_mod_SOURCES): New variable.
16139 (loopback_mod_CFLAGS): Likewise.
16140 * disk/loopback.c: new file.
16141 * include/grub/normal.h (grub_loop_init): New prototype.
16142 (grub_loop_fini): New prototype.
16143 * util/grub-emu.c (main): Initialize and de-initialize loopback
16145 * include/grub/disk.h (grub_disk_dev_id): Add
16146 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16148 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
16150 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16152 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16153 (suspend_mod_SOURCES): New variable.
16154 (suspend_mod_CFLAGS): Likewise.
16155 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16157 * commands/ieee1275/suspend.c: New file.
16159 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
16161 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16162 ((unused))' to `__attribute__ ((used))'.
16163 (GRUB_MOD_FINI): Likewise.
16164 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16165 * genmk.rb (PModule): Assign space to common symbols when linking
16168 2005-01-20 Marco Gerards <metgerards@student.han.nl>
16170 * include/grub/mm.h (grub_mm_init_region): Change the type of the
16171 `unsigned' arguments to `grub_size_t'.
16172 (grub_malloc): Likewise.
16173 (grub_realloc): Likewise.
16174 (grub_memalign): Likewise.
16175 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16176 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16177 * util/misc.c (grub_malloc): Likewise.
16178 (grub_realloc): Likewise.
16179 * kern/mm.c (get_header_from_pointer): Change the casts to
16180 `unsigned' into a cast to `grub_size_t'.
16182 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16183 point to `currnode' when `currnode' is changed.
16185 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
16186 Schottelius <nico-linux@schottelius.org>.
16188 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
16190 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16191 (note_path): Remove variable.
16192 (GRUB_IEEE1275_NOTE_NAME): New macro.
16193 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16194 (grub_ieee1275_note_hdr): New structure.
16195 (grub_ieee1275_note_desc): Likewise.
16196 (grub_ieee1275_note): Likewise.
16197 (load_note): Remove `dir' argument. All callers updated. Remove
16198 `note_img' and `path'. Do not load a file from `note_path'.
16199 Initialize a struct grub_ieee1275_note and write that to `out'.
16200 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16202 2005-01-05 Marco Gerards <metgerards@student.han.nl>
16204 * util/misc.c (grub_util_read_image): Revert last change. It
16205 called `grub_util_read_at', which seeks from the beginning of the
16208 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
16210 * TODO: Add note about endianness in grub-mkimage.
16211 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16213 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16214 (grub_mkimage_SOURCES): New target.
16215 * include/grub/kernel.h (grub_start_addr): Remove variable.
16216 (grub_end_addr): Likewise.
16217 (grub_total_module_size): Likewise.
16218 (grub_kernel_image_size): Likewise.
16219 (GRUB_MODULE_MAGIC): New constant.
16220 (grub_module_info): New structure.
16221 (grub_arch_modules_addr): New prototype.
16222 (grub_get_end_addr): Remove prototype.
16223 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16224 * include/grub/powerpc/ieee1275/kernel.h: New file.
16225 * include/grub/util/misc.h (grub_util_get_fp_size): New
16227 (grub_util_read_at): Likewise.
16228 (grub_util_write_image_at): Likewise.
16229 * kern/main.c (grub_get_end_addr): Remove function.
16230 (grub_load_modules): Call grub_arch_modules_addr instead of using
16231 grub_end_addr. Look for a grub_module_info struct in memory. Use
16232 the grub_module_info fields instead of calling grub_get_end_addr
16233 as loop conditions. Move grub_add_unused_region code here.
16234 (grub_add_unused_region): Remove function.
16235 * kern/i386/pc/init.c: Include grub/cache.h.
16236 (grub_machine_init): Remove call to grub_get_end_addr. Remove
16237 one call to add_mem_region.
16238 (grub_arch_modules_addr): New function.
16239 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16240 (grub_total_module_size): Likewise.
16241 Include grub/machine/kernel.h.
16242 (grub_arch_modules_addr): New function.
16243 * util/grub-emu.c (grub_end_addr): Remove variable.
16244 (grub_total_module_size): Likewise.
16245 (grub_arch_modules_addr): New function.
16246 * util/misc.c: Include unistd.h.
16247 (grub_util_get_fp_size): New function.
16248 (grub_util_read_at): Likewise.
16249 (grub_util_write_image_at): Likewise.
16250 (grub_util_read_image): Call grub_util_read_at.
16251 (grub_util_write_image): Call grub_util_write_image_at.
16252 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16253 additional memory in kernel_img for a struct grub_module_info.
16254 Fill in that grub_module_info.
16255 * util/powerpc/ieee1275/grub-mkimage.c: New file.
16257 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16259 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16261 * include/grub/powerpc/ieee1275/ieee1275.h
16262 (grub_ieee1275_milliseconds): New prototype.
16263 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16265 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16266 grub_ieee1275_milliseconds.
16268 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
16270 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16272 (find_options): New function.
16273 (cmain): Call find_options.
16274 * include/grub/powerpc/ieee1275/ieee1275.h
16275 (grub_ieee1275_realmode): New extern variable.
16276 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16277 grub_map if grub_ieee1275_realmode is false.
16279 2004-12-29 Marco Gerards <metgerards@student.han.nl>
16281 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16282 lines are inserted and make it work like readline. Reported by
16283 Vincent Pelletier <subdino2004@yahoo.fr>.
16285 2004-12-28 Marco Gerards <metgerards@student.han.nl>
16287 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16289 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16290 `kern/powerpc/cache.S'.
16292 2004-12-27 Marco Gerards <metgerards@student.han.nl>
16294 * genmk.rb: Handle the `Program' class in the main loop. Written
16295 by Johan Rydberg <jrydberg@gnu.org>.
16296 (Program): New class.
16297 (programs): New variable.
16298 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16299 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
16300 instead of "grub/kernel.h". Include <grub/machine/init.h>.
16301 (help_arch): Function removed.
16302 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16303 `powerpc/libgcc.h' and `loader.h'.
16304 (pkgdata_PROGRAMS): New variable.
16305 (sbin_UTILITIES): Variable removed.
16306 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16307 (grubof_SOURCES): Variable re-defined so it only includes the
16308 core functionality.
16309 (grubof_CFLAGS): Remove `-DGRUBOF'.
16310 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16311 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16312 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16313 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16314 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16315 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16316 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16317 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16318 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16319 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16320 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16321 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16322 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16323 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16324 (pc_mod_CFLAGS): New variables.
16325 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16326 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16327 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16328 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16330 * include/grub/i386/pc/init.h (grub_os_area_addr)
16331 (rub_os_area_size): ... to here.
16332 * include/grub/powerpc/ieee1275/ieee1275.h
16333 (grub_ieee1275_entry_fn): Export symbol.
16334 * include/grub/powerpc/ieee1275/init.h: New file.
16335 * include/grub/powerpc/libgcc.h: Likewise.
16336 * include/grub/cache.h: Likewise.
16337 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
16338 <hollis@penguinppc.org>.
16339 * kern/dl.c: Include <grub/cache.h>.
16340 (grub_dl_flush_cache): New function.
16341 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16343 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16344 (grub_console_init): Removed prototypes.
16345 (grub_machine_init): Don't initialize the modules anymore.
16346 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16348 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16349 Macro undef removed.
16350 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16351 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16352 relocation `R_PPC_REL32'. Return an error when the relocation is
16354 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16355 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16356 * util/misc.c (grub_arch_sync_caches): Likewise.
16358 2004-12-19 Marco Gerards <metgerards@student.han.nl>
16360 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16361 `symlist.c', add `grubof_symlist.c'.
16362 (symlist.c): Variable removed.
16363 (grubof_HEADERS): Variable added.
16364 (grubof_symlist.c): New target.
16365 (kernel_syms.lst): Use `grubof_HEADERS' instead of
16366 `kernel_img_HEADERS'.
16367 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16368 * kern/powerpc/dl.c: New file.
16369 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16371 (grub_arch_dl_relocate_symbols): Likewise.
16372 (grub_register_exported_symbols): Likewise.
16374 2004-12-13 Marco Gerards <metgerards@student.han.nl>
16376 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16377 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
16378 to fail instead. Reported by Vincent Pelletier
16379 <subdino2004@yahoo.fr>.
16381 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16382 it is not allocated. Reported by Vincent Pelletier
16383 <subdino2004@yahoo.fr>.
16385 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16386 output so the output looks better.
16388 2004-12-04 Marco Gerards <metgerards@student.han.nl>
16390 Modulize the partition map support and add support for the amiga
16393 * commands/ls.c: Include <grub/partition.h> instead of
16394 <grub/machine/partition.h>.
16395 * kern/disk.c: Likewise.
16396 * kern/rescue.c: Likewise.
16397 * loader/i386/pc/chainloader.c: Likewise.
16398 * normal/cmdline.c: Likewise.
16399 * kern/powerpc/ieee1275/init.c: Likewise.
16400 (grub_machine_init): Call `grub_pc_partition_map_init',
16401 `grub_amiga_partition_map_init' and
16402 `grub_apple_partition_map_init'.
16403 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16404 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
16405 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
16406 `partition.h' and `pc_partition.h'.
16407 (grub_setup_SOURCES): Remove
16408 `disk/i386/pc/partition.c'. Add `kern/partition.c',
16409 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16410 (grub_emu_SOURCES): Likewise.
16411 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16412 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16413 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16414 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16415 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
16416 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16417 (grubof_SOURCES): Likewise.
16418 * disk/i386/pc/partition.c: File removed.
16419 * disk/powerpc/ieee1275/partition.c: Likewise.
16420 * include/grub/powerpc/ieee1275/partition.h: Likewise.
16421 * include/grub/i386/pc/partition.h: Likewise.
16422 * kern/partition.c: New file.
16423 * partmap/amiga.c: Likewise.
16424 * partmap/apple.c: Likewise.
16425 * partmap/pc.c: Likewise.
16426 * include/grub/partition.h: Likewise..
16427 * include/grub/pc_partition.h: Likewise.
16428 * util/grub-emu.c: Include <grub/partition.h> instead of
16429 <grub/machine/partition.h>.
16430 (main): Call `grub_pc_partition_map_init',
16431 `grub_amiga_partition_map_init' and
16432 `grub_apple_partition_map_init' and deinitialize afterwards.
16433 * util/i386/pc/biosdisk.c: Include `#include
16434 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16435 `<grub/machine/partition.h>'.
16436 * util/i386/pc/grub-setup.c: Likewise.
16437 * util/i386/pc/biosdisk.c: Likewise.
16438 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16439 partition information in case of a PC partition.
16440 * util/i386/pc/grub-setup.c: Include `#include
16441 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16442 `<grub/machine/partition.h>'.
16443 (setup): Only access the PC specific partition information in case
16446 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
16448 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16449 (grub_longjmp): Likewise.
16450 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16452 * normal/powerpc/setjmp.S: New file.
16453 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16454 `normal/powerpc/setjmp.S'.
16455 (grubof_CFLAGS): Add `-DGRUBOF'.
16456 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16457 [GRUB_UTIL && !GRUBOF].
16459 2004-11-16 Marco Gerards <metgerards@student.han.nl>
16461 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16462 property named `name'. Correctly handle the error returned by
16463 `grub_ieee1275_finddevice' if a device can not be opened.
16465 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
16467 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16468 `actual' for negativity.
16469 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16472 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16474 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16475 (PAGE_OFFSET): New macro.
16476 (CRTC_ADDR_PORT): Likewise.
16477 (CRTC_DATA_PORT): Likewise.
16478 (START_ADDR_HIGH_REGISTER): Likewise.
16479 (START_ADDR_LOW_REGISTER): Likewise.
16480 (GRAPHICS_ADDR_PORT): Likewise.
16481 (GRAPHICS_DATA_PORT): Likewise.
16482 (READ_MAP_REGISTER): Likewise.
16483 (INPUT_STATUS1_REGISTER): Likewise.
16484 (INPUT_STATUS1_VERTR_BIT): Likewise.
16485 (page): New variable.
16486 (wait_vretrace): New function.
16487 (set_read_map): Likewise.
16488 (set_start_address): Likewise.
16489 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
16491 (check_vga_mem): Take the page into account.
16492 (write_char): Likewise.
16493 (write_cursor): Likewise.
16494 (scroll_up): Likewise. Copy the page to the page that is not
16495 shown and switch between both pages.
16496 (grub_vga_putchar): Fix off by one error.
16497 (grub_vga_cls): Wait for the vertical retrace. Take the page into
16500 2004-11-01 Marco Gerards <metgerards@student.han.nl>
16502 Add support for iso9660 (including rockridge).
16504 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16505 (iso9660_mod_SOURCES): New variable.
16506 (iso9660_mod_CFLAGS): Likewise.
16507 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16508 * include/grub/fs.h (grub_iso9660_init): New prototype.
16509 * util/grub-emu.c (main): Call `grub_iso9660_init'.
16510 * fs/iso9660.c: New file.
16512 * include/grub/misc.h (grub_strncat): New prototype.
16513 * kern/misc.c (grub_strncat): New function.
16515 * fs/hfs.c (grub_hfs_mount): Translate the error
16516 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16517 * fs/jfs.c (grub_jfs_mount): Likewise.
16518 * fs/ufs.c (grub_ufs_mount): Likewise.
16520 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
16522 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16523 which initialized BAT registers.
16524 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16525 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16527 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16528 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16530 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16531 (grub_mapclaim): Likewise.
16532 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16533 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
16536 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
16538 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16539 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16540 -ffreestanding and -msoft-float.
16542 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
16544 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16545 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16546 set in grub_ieee1275_flags.
16548 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
16550 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16552 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16553 grub_console_init first.
16554 Change the memory range used for grub_ieee1275_claim and
16555 grub_mm_init_region.
16556 Print an error message if the claim fails.
16557 Include <grub/misc.h>.
16559 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
16561 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16562 Call grub_children_iterate for device nodes of type `scsi',
16564 (grub_ofdisk_open): Remove manual device alias resolution.
16565 Fix memory leak when device cannot be opened.
16566 * include/grub/powerpc/ieee1275/ieee1275.h
16567 (grub_children_iterate): New prototype.
16568 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16570 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16571 Return -1 if args.size was -1.
16573 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16575 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16576 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16577 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16578 Open Firmware's memory for it; claim memory from _start to _end.
16579 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16580 (_end): New extern.
16581 (_start): Zero BSS from __bss_start to _end.
16582 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16584 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16586 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
16588 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16589 -1 if args.base was -1.
16591 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
16593 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16594 escape sequence instead of a literal ^L. Also call
16595 grub_ofconsole_gotoxy.
16597 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
16599 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16600 void * arguments to grub_addr_t. All callers updated. Also make
16601 the `result' argument optional.
16602 (grub_ieee1275_release): change void * arguments to grub_addr_t.
16603 All callers updated.
16605 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
16607 * commands/ls.c (grub_ls_list_files): Use the string following the
16608 initial ')', if present, as the filesystem path.
16609 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16611 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16613 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
16615 Make the source code of the menu interface more readable.
16617 * normal/menu.c: Include grub/mm.h.
16618 (TERM_WIDTH): New macro.
16619 (TERM_HEIGHT): Likewise.
16620 (TERM_INFO_HEIGHT): Likewise.
16621 (TERM_MARGIN): Likewise.
16622 (TERM_SCROLL_WIDTH): Likewise.
16623 (TERM_TOP_BORDER_Y): Likewise.
16624 (TERM_LEFT_BORDER_X): Likewise.
16625 (TERM_BORDER_WIDTH): Likewise.
16626 (TERM_MESSAGE_HEIGHT): Likewise.
16627 (TERM_BORDER_HEIGHT): Likewise.
16628 (TERM_NUM_ENTRIES): Likewise.
16629 (TERM_FIRST_ENTRY_Y): Likewise.
16630 (TERM_ENTRY_WIDTH): Likewise.
16631 (TERM_CURSOR_X): Likewise.
16632 (draw_border): Use macros instead of magic numbers.
16633 (print_entry): Likewise.
16634 (print_entries): Likewise.
16635 (run_menu): Likewise. Also, handle the key 'e'.
16636 (run_menu_entry): Ignore empty command lines.
16637 (print_message): Added a new argument EDIT. If EDIT is true,
16638 print a different message.
16639 (init_page): Likewise.
16640 (edit_menu_entry): New function. Not implemented yet.
16642 2004-09-17 Marco Gerards <metgerards@student.han.nl>
16644 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16645 can be loaded from normal mode.
16647 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16649 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16650 (multiboot_mod_CFLAGS): New variables.
16651 * loader/i386/pc/linux_normal.c: New file.
16652 * loader/i386/pc/multiboot_normal.c: Likewise.
16654 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16655 attribute `unused'.
16657 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
16658 `fdiro' to read the mode information from instead of `diro'.
16660 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16661 looking up a symlink.
16663 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16665 * normal/command.c (grub_command_execute): Don't parse the
16666 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16667 flags of the command.
16669 * normal/menu.c (grub_menu_run): Fix typo.
16671 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
16673 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16675 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16676 `y + 1' instead of `y - 1'.
16678 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16680 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
16682 From Hollis Blanchard <hollis@penguinppc.org>:
16683 * kern/misc.c (memmove): New alias for grub_memmove.
16684 (memcmp): New alias for grub_memcmp.
16685 (memset): New alias for grub_memset.
16686 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16687 Change "int handle" to "grub_ieee1275_phandle_t handle".
16688 * include/grub/powerpc/ieee1275/ieee1275.h
16689 (grub_ieee1275_get_property): Likewise.
16691 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
16693 Added normal mode command `chainloader' as module chain.mod, which
16694 depends on normal.mod and _chain.mod.
16696 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16697 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16698 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16700 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16701 but arguments parsing moved to ...
16702 (grub_chainloader_cmd): ... here. New function.
16703 * include/grub/i386/pc/chainloader.h: New file.
16704 * loader/i386/pc/chainloader_normal.c: Likewise.
16706 2004-09-11 Marco Gerards <metgerards@student.han.nl>
16708 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16709 (grub_mkimage_LDFLAGS): Likewise.
16710 (grub_emu_SOURCES): Likewise.
16711 (kernel_img_HEADERS): Added fshelp.h.
16712 * fs/ext2.c: Include <grub/fshelp.h>.
16713 (FILETYPE_REG): New macro.
16714 (FILETYPE_INO_REG): Likewise.
16715 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16717 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
16719 (grub_fshelp_node): New struct.
16720 (grub_ext2_data): Added member `diropen'. Changed member `inode'
16722 (grub_ext2_get_file_block): Removed function.
16723 (grub_ext2_read_block): New function.
16724 (grub_ext2_read_file): Replaced parameter `data' by `node'.
16725 This function was written.
16726 (grub_ext2_mount): Read the root inode. Create a diropen struct.
16727 (grub_ext2_find_file): Removed function.
16728 (grub_ext2_read_symlink): New function.
16729 (grub_ext2_iterate_dir): Likewise.
16730 (grub_ext2_open): Rewritten.
16731 (grub_ext2_dir): Rewritten.
16732 * include/grub/fshelp.h: New file.
16733 * fs/fshelp.c: Likewise.
16735 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
16737 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16738 (print_message): Add a missing newline.
16739 (run_menu): Added timeout support.
16740 (run_menu_entry): New local function.
16741 (grub_menu_run): Added support for booting.
16743 * kern/loader.c (grub_loader_is_loaded): New function.
16745 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16746 (grub_get_rtc): Exported.
16748 * include/grub/i386/pc/time.h: Include grub/symbol.h.
16749 (grub_get_rtc): Exported.
16751 * include/grub/normal.h (struct grub_command_list): Remove
16752 constant from the member `command'.
16754 * include/grub/loader.h (grub_loader_is_loaded): Declared.
16756 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16758 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16760 2004-08-28 Marco Gerards <metgerards@student.han.nl>
16762 Add support for the JFS filesystem.
16764 * fs/jfs.c: New file.
16765 * include/grub/fs.h (grub_jfs_init): New prototype.
16766 (grub_jfs_fini): New prototype.
16767 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16768 (grub_emu_SOURCES): Likewise.
16769 (pkgdata_MODULES): Add jfs.mod.
16770 (jfs_mod_SOURCES): New variable.
16771 (jfs_mod_CFLAGS): Likewise.
16772 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16773 (grubof_SOURCES): Likewise.
16774 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16776 * fs/fat.c (grub_fat_find_dir): Convert the filename little
16777 endian to the host endian.
16778 (grub_fat_utf16_to_utf8): Move function from there...
16779 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
16780 the endianness of the source string anymore.
16781 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16783 2004-08-24 Marco Gerards <metgerards@student.han.nl>
16785 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16786 (grub_boot_fini) [GRUB_UTIL]: Likewise.
16787 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16788 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16790 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16791 (grub_hfs_iterate_dir): Make the function static. Add prototypes
16792 for `node_found' and `it_dir'.
16793 (grub_hfs_dir): Add prototype for `dir_hook'.
16795 * fs/minix.c (grub_minix_get_file_block): Add prototype for
16796 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
16797 and `indir32' to silence a gcc warning.
16799 * include/grub/fs.h (grub_hfs_init): New prototype.
16800 (grub_hfs_fini): Likewise.
16803 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
16805 Each disk device has its own id now. This is useful to make use
16806 of multiple disk devices.
16808 * include/grub/disk.h (grub_disk_dev_id): New enum.
16809 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16810 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16812 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16813 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16815 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16816 GRUB_DISK_DEVICE_OFDISK_ID as an id.
16818 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16819 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16821 * include/grub/disk.h (struct grub_disk_dev): Added a new member
16822 "id" which is used by the cache manager.
16824 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16827 2004-08-18 Marco Gerards <metgerards@student.han.nl>
16829 * fs/hfs.c: New file.
16830 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16831 (grub_emu_SOURCES): Likewise.
16832 (pkgdata_MODULES): Add hfs.mod.
16833 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16834 (grubof_SOURCES): Likewise.
16835 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16837 * include/grub/misc.h (grub_strncasecmp): Add prototype.
16838 * kern/misc.c (grub_strncasecmp): Add function.
16840 2004-08-14 Marco Gerards <metgerards@student.han.nl>
16842 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16845 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16846 (grub_ext2_dir): In case the directory entry type is unknown, read
16849 2004-08-02 Peter Bruin <pjbruin@dds.nl>
16851 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16852 grub_load_linux instead of grub_rescue_cmd_linux as second
16853 argument of grub_rescue_register_command.
16855 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16857 2004-07-27 Marco Gerards <metgerards@student.han.nl>
16859 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16861 * commands/boot.c: Remove the check for `GRUB_UTIL'.
16862 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16863 `loader/powerpc/ieee1275/linux.c',
16864 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16865 * include/grub/powerpc/ieee1275/ieee1275.h
16866 (grub_ieee1275_release): New prototype.
16867 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16868 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16869 normal, boot, linux and linux_normal.
16870 * loader/powerpc/ieee1275/linux.c: New file.
16871 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16873 2004-07-12 Marco Gerards <metgerards@student.han.nl>
16875 * normal/arg.c (grub_arg_parse): Correct error handling after
16876 reallocating the argumentlist (check if `argl' is not null instead
16877 of checking if `args' is not null).
16878 * kern/mm.c (grub_realloc): Return the same pointer when using the
16879 same region, instead of returning the header address.
16881 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16883 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16884 one block instead of two when looking for the initial partition.
16885 (grub_partition_probe): Initialize the local variable `p' with 0.
16886 Use base 10 for the grub_strtoul call.
16887 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
16888 need for one local variable.
16889 (grub_strtoul): Don't add the new value to `num', instead of that
16892 2004-07-11 Marco Gerards <metgerards@student.han.nl>
16894 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16895 (pxeboot_img_SOURCES): New variable.
16896 (pxeboot_img_ASFLAGS): Likewise.
16897 (pxeboot_img_LDFLAGS): Likewise.
16898 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
16899 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
16900 <lode_leroy@hotmail.com>.
16902 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16904 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16905 there was no input.
16907 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16909 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
16910 the history buffer logic.
16912 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
16914 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16915 (FILETYPE_INO_SYMLINK): New macros.
16916 (grub_ext2_find_file): Check if the node is a directory using the
16917 inode stat information instead of using the filetype in the
16918 dirent. Exclude the first character of an absolute symlink.
16919 (grub_ext2_dir): Mask out the filetype part of the mode member of
16922 2004-05-24 Marco Gerards <metgerards@student.han.nl>
16924 Add support for UFS version 1 and 2. Add support for the minix
16925 filesystem version 1 and 2, both the variants with 14 and 30 long
16928 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16930 (grub_emu_SOURCES): Likewise.
16931 (pkgdata_MODULES): Add ufs.mod and minix.mod.
16932 (ufs_mod_SOURCES): New variable.
16933 (ufs_mod_CFLAGS): Likewise.
16934 (minix_mod_SOURCES): Likewise.
16935 (minix_mod_CFLAGS): Likewise.
16936 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16938 (grubof_SOURCES): Likewise.
16939 * fs/ufs.c: New file.
16940 * fs/minix.c: New file.
16941 * include/grub/fs.h (grub_ufs_init): New prototype.
16942 (grub_ufs_fini): Likewise.
16943 (grub_minix_init): Likewise.
16944 (grub_minix_fini): Likewise.
16945 * util/grub-emu.c (main): Initialize and deinitialize UFS and
16948 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
16950 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16951 commands/ls.c, commands/terminal.c, commands/boot.c,
16952 commands/cmp.c and commands/cat.c.
16953 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16955 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16958 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16960 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16961 and grub_, respectively. Because the conversion is trivial and
16962 mechanical, I omit the details here. Please refer to the CVS
16963 if you need more information.
16965 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
16967 * include/pupa: Renamed to ...
16968 * include/grub: ... this.
16969 * util/i386/pc/pupa-mkimage.c: Renamed to ...
16970 * util/i386/pc/grub-mkimage.c: ... this.
16971 * util/i386/pc/pupa-setup.c: Renamed to ...
16972 * util/i386/pc/grub-setup.c: ... this.
16973 * util/pupa-emu.c: Renamed to ...
16974 * util/grub-emu.c: ... this.
16976 2004-03-29 Marco Gerards <metgerards@student.han.nl>
16978 Add support for the newworld apple macintosh (PPC). This has been
16979 tested on the powerbook 2000 only. It only adds support for
16980 generic ieee1275 functions, console and disk support. This should
16981 be easy to port to other architectures with support for Open
16984 * configure.ac: Accept the powerpc as host_cpu. In the case of
16985 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
16986 specific tests are only executed while building for the i386.
16987 Inverse test for crosscompile.
16988 * genmk.rb (Utility): Allow assembler files.
16989 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16990 * conf/powerpc-ieee1275.rmk: New file.
16991 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16992 * disk/powerpc/ieee1275/partition.c: Likewise.
16993 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16994 * include/pupa/powerpc/ieee1275/console.h: Likewise.
16995 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16996 * include/pupa/powerpc/ieee1275/time.h: Likewise.
16997 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16998 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16999 * include/pupa/powerpc/ieee1275/loader.h
17000 * include/pupa/powerpc/setjmp.h: Likewise.
17001 * include/pupa/powerpc/types.h: Likewise.
17002 * kern/powerpc/ieee1275/init.c: Likewise.
17003 * kern/powerpc/ieee1275/openfw.c: Likewise.
17004 * term/powerpc/ieee1275/ofconsole.c: Likewise.
17006 These files were written by Johan Rydberg
17007 (jrydberg@night.trouble.net) and I only modified them slightly.
17009 * boot/powerpc/ieee1275/cmain.c: New file.
17010 * boot/powerpc/ieee1275/crt0.S: Likewise.
17011 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17012 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17014 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
17016 * Makefile.in: Update copyright.
17017 * genmodsrc.sh: Likewise.
17018 * gensymlist.sh: Likewise.
17019 * term/i386/pc/vga.c: Indent correctly.
17021 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17022 bugreporting address.
17023 * util/i386/pc/pupa-setup.c (usage): Likewise,
17024 (main): Call pupa_ext2_init and pupa_ext2_fini.
17026 * fs/fat.c (log2): Renamed to ...
17027 (fat_log2): ... this.
17028 All callers changed.
17029 * kern/misc.c (memcpy): Alias to pupa_memmove.
17030 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17032 * util/console.c (pupa_ncurses_fini): Return 0.
17034 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17035 Move fail label here.
17036 [__GNU__]: Don't warn when using stat.
17037 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17038 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17039 long int. Use strtol instead of strtoul.
17041 2004-03-14 Marco Gerards <metgerards@student.han.nl>
17043 * commands/boot.c: New file.
17044 * commands/cat.c: Likewise.
17045 * commands/cmp.c: Likewise.
17046 * commands/ls.c: Likewise.
17047 * commands/terminal.c: Likewise.
17048 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17049 (pupa_register_command): Changed interface to match the new
17051 (pupa_command_execute): Changed (almost rewritten) so it uses
17052 pupa_split_command. Added support for setting variables using the
17054 (rescue_command): Changed to work with the new argument parser.
17055 (terminal_command): Moved from here to commands/terminal.c.
17056 (set_command): New function.
17057 (unset_command): New function.
17058 (insmod_command): New function.
17059 (rmmod_command): New function.
17060 (lsmod_command): New function.
17061 (pupa_command_init): Don't initialize the command terminal
17062 anymore. Initialize the commands set, unset, insmod, rmmod and
17064 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17065 (kernel_img_HEADERS): Add arg.h and env.h.
17066 (pupa_mkimage_LDFLAGS): Add kern/env.c.
17067 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17068 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17070 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17072 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17073 (boot_mod_SOURCES): New variable.
17074 (terminal_mod_SOURCES): Likewise.
17075 (ls_mod_SOURCES): Likewise.
17076 (cmp_mod_SOURCES): Likewise.
17077 (cat_mod_SOURCES): Likewise.
17079 * normal/arg.c: New file.
17080 * kern/env.c: Likewise.
17081 * include/pupa/arg.h: Likewise.
17082 * include/pupa/env.h: Likewise.
17083 * font/manager.c (font_command): Changed to match argument parsing
17085 (PUPA_MOD_INIT): Likewise.
17086 * hello/hello.c (pupa_cmd_hello): Likewise.
17087 (PUPA_MOD_INIT): Likewise.
17088 * include/pupa/disk.h: Include <pupa/device.h>.
17089 (pupa_print_partinfo): New prototype.
17090 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17091 (pupa_dl_get_prefix): Likewise.
17092 * include/pupa/misc.h: Include <pupa/err.h>.
17093 (pupa_isgraph): New prototype.
17094 (pupa_isdigit): Likewise.
17095 (pupa_split_cmdline): Likewise.
17096 * include/pupa/normal.h: Include <pupa/arg.h>.
17097 (pupa_command): Changed the prototype of the member `func' to
17098 match the argument parsing interface. Added member `options'.
17099 (pupa_register_command): Updated to match function.
17100 (pupa_arg_parse): New prototype.
17101 (pupa_hello_init) [PUPA_UTIL]: New prototype.
17102 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17103 (pupa_ls_init) [PUPA_UTIL]: Likewise.
17104 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17105 (pupa_cat_init) [PUPA_UTIL]: Likewise.
17106 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17107 (pupa_boot_init) [PUPA_UTIL]: Likewise.
17108 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17109 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17110 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17111 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17112 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17113 * kern/disk.c: Include <pupa/file.h>.
17114 (pupa_print_partinfo): New function.
17115 * kern/dl.c: Include <pupa/env.h>.
17116 (pupa_dl_dir): Variable removed.
17117 (pupa_dl_load): Use the environment variable `prefix' instead of
17118 the variable pupa_dl_dir.
17119 (pupa_dl_set_prefix): Function removed.
17120 (pupa_dl_get_prefix): Likewise.
17121 * kern/i386/pc/init.c: Include <pupa/env.h>.
17122 (pupa_machine_init): Use the environment variable `prefix' instead of
17123 using pupa_dl_set_prefix to set the prefix.
17124 * kern/main.c: Include <pupa/env.h>.
17125 (pupa_set_root_dev): Use the environment variable `prefix' instead of
17126 using pupa_dl_get_prefix to get the prefix.
17127 * kern/misc.c: Include <pupa/env.h>.
17128 (pupa_isdigit): New function.
17129 (pupa_isgraph): Likewise.
17130 (pupa_ftoa): Likewise.
17131 (pupa_vsprintf): Added support for printing values of the type
17132 `double'. Make it possible to format variable output when using
17133 formatting like `%1.2%f'.
17134 (pupa_split_cmdline): New function.
17135 * kern/rescue.c: Include <pupa/env.h>.
17136 (next_word): Removed function.
17137 (pupa_rescue_cmd_prefix): Likewise.
17138 (pupa_rescue_cmd_set): New function.
17139 (pupa_rescue_cmd_unset): New function.
17140 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17141 split the command line instead of splitting it here. Added
17142 support for setting variables using the syntax `foo=bar'. Don't
17143 initialize the prefix command anymore. Initialized the set and
17145 * normal/cmdline.c: Include <pupa/env.h>.
17146 (pupa_tab_complete): Added prototypes for print_simple_completion,
17147 print_partition_completion, add_completion, iterate_commands,
17148 iterate_dev, iterate_part and iterate_dir. Moved code to print
17149 partition information from here to kern/disk.c.
17150 (pupa_cmdline_run): Don't check if the function exists anymore.
17151 * normal/main.c: Include <pupa/env.h>.
17152 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17153 instead of using pupa_dl_get_prefix to get the prefix.
17154 * term/i386/pc/vga.c: Include <pupa/arg.h>.
17155 (check_vga_mem): Cast pointers to `void *' to silence a gcc
17157 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17158 (pupa_vga_setcolor): Declare unused variables with `__attribute__
17159 ((unused))' to silence a gcc warning.
17160 (pupa_vga_setcolor): Likewise.
17161 (debug_command): Changed to match argument parsing
17163 * util/pupa-emu.c: Include <pupa/env.h>.
17164 (options): Added 0's for unused fields to silence a gcc warning.
17166 (main): Use the environment variable `prefix' instead of using
17167 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
17168 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
17171 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17172 * util/misc.c: Include <malloc.h>.
17173 (pupa_malloc): Rewritten so errors are correctly reported.
17174 (pupa_realloc): Likewise.
17175 (pupa_memalign): Likewise.
17176 (pupa_mm_init_region): Declare unused variables with
17177 `__attribute__ ((unused))' to silence a gcc warning.
17178 * normal/i386/setjmp.S: Remove tab at the end of the file to
17179 silence a gcc warning.
17180 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17181 variables with `__attribute__ ((unused))' to silence a gcc
17183 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17184 local variable i unsigned to silence a gcc warning.
17186 * kern/term.c: Include <pupa/misc.h>.
17187 (pupa_more_lines): New variable.
17188 (pupa_more): Likewise.
17189 (pupa_putcode): When the pager is active pause at the end of every
17191 (pupa_set_more): New function.
17192 * include/pupa/term.h (pupa_set_more): New prototype.
17195 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
17197 Now this project is GRUB 2 rather than PUPA. The location of
17198 the CVS repository was moved to GRUB's.
17200 * configure.ac: Use bug-grub as the reporting address.
17201 Use GRUB instead of PUPA.
17202 Change the version number to 1.90.
17204 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
17206 * genkernsyms.sh: Updated copyright information.
17207 * genmk.rb: Likewise.
17208 * genmodsrc.sh: Likewise.
17209 * gensymlist.sh: Likewise.
17210 * boot/i386/pc/boot.S: Likewise.
17211 * boot/i386/pc/diskboot.S: Likewise.
17212 * disk/i386/pc/biosdisk.c: Likewise.
17213 * disk/i386/pc/partition.c: Likewise.
17214 * font/manager.c: Likewise.
17215 * fs/ext2.c: Likewise.
17216 * fs/fat.c: Likewise.
17217 * include/pupa/boot.h: Likewise.
17218 * include/pupa/device.h: Likewise.
17219 * include/pupa/disk.h: Likewise.
17220 * include/pupa/dl.h: Likewise.
17221 * include/pupa/elf.h: Likewise.
17222 * include/pupa/err.h: Likewise.
17223 * include/pupa/file.h: Likewise.
17224 * include/pupa/font.h: Likewise.
17225 * include/pupa/fs.h: Likewise.
17226 * include/pupa/kernel.h: Likewise.
17227 * include/pupa/loader.h: Likewise.
17228 * include/pupa/misc.h: Likewise.
17229 * include/pupa/mm.h: Likewise.
17230 * include/pupa/net.h: Likewise.
17231 * include/pupa/normal.h: Likewise.
17232 * include/pupa/rescue.h: Likewise.
17233 * include/pupa/setjmp.h: Likewise.
17234 * include/pupa/symbol.h: Likewise.
17235 * include/pupa/term.h: Likewise.
17236 * include/pupa/types.h: Likewise.
17237 * include/pupa/i386/setjmp.h: Likewise.
17238 * include/pupa/i386/types.h: Likewise.
17239 * include/pupa/i386/pc/biosdisk.h: Likewise.
17240 * include/pupa/i386/pc/boot.h: Likewise.
17241 * include/pupa/i386/pc/console.h: Likewise.
17242 * include/pupa/i386/pc/init.h: Likewise.
17243 * include/pupa/i386/pc/kernel.h: Likewise.
17244 * include/pupa/i386/pc/linux.h: Likewise.
17245 * include/pupa/i386/pc/loader.h: Likewise.
17246 * include/pupa/i386/pc/memory.h: Likewise.
17247 * include/pupa/i386/pc/multiboot.h: Likewise.
17248 * include/pupa/i386/pc/partition.h: Likewise.
17249 * include/pupa/i386/pc/time.h: Likewise.
17250 * include/pupa/i386/pc/vga.h: Likewise.
17251 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17252 * include/pupa/util/getroot.h: Likewise.
17253 * include/pupa/util/misc.h: Likewise.
17254 * include/pupa/util/resolve.h: Likewise.
17255 * kern/device.c: Likewise.
17256 * kern/disk.c: Likewise.
17257 * kern/dl.c: Likewise.
17258 * kern/err.c: Likewise.
17259 * kern/file.c: Likewise.
17260 * kern/fs.c: Likewise.
17261 * kern/loader.c: Likewise.
17262 * kern/main.c: Likewise.
17263 * kern/misc.c: Likewise.
17264 * kern/mm.c: Likewise.
17265 * kern/rescue.c: Likewise.
17266 * kern/term.c: Likewise.
17267 * kern/i386/dl.c: Likewise.
17268 * kern/i386/pc/init.c: Likewise.
17269 * kern/i386/pc/lzo1x.S: Likewise.
17270 * kern/i386/pc/startup.S: Likewise.
17271 * loader/i386/pc/chainloader.c: Likewise.
17272 * loader/i386/pc/linux.c: Likewise.
17273 * loader/i386/pc/multiboot.c: Likewise.
17274 * normal/cmdline.c: Likewise.
17275 * normal/command.c: Likewise.
17276 * normal/main.c: Likewise.
17277 * normal/menu.c: Likewise.
17278 * normal/i386/setjmp.S: Likewise.
17279 * term/i386/pc/console.c: Likewise.
17280 * term/i386/pc/vga.c: Likewise.
17281 * util/console.c: Likewise.
17282 * util/genmoddep.c: Likewise.
17283 * util/misc.c: Likewise.
17284 * util/pupa-emu.c: Likewise.
17285 * util/resolve.c: Likewise.
17286 * util/unifont2pff.rb: Likewise.
17287 * util/i386/pc/biosdisk.c: Likewise.
17288 * util/i386/pc/getroot.c: Likewise.
17289 * util/i386/pc/pupa-mkimage.c: Likewise.
17290 * util/i386/pc/pupa-setup.c: Likewise.
17292 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
17294 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17295 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
17296 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
17297 reading and reset it after reading.
17298 (pupa_ext2_close): Return PUPA_ERR_NONE.
17300 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17302 (struct linux_kernel_header): Add kernel_version and
17304 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17305 pupa_file_read succeeds.
17306 (pupa_rescue_cmd_initrd): Implement.
17308 2003-12-03 Marco Gerards <metgerards@student.han.nl>
17310 * fs/ext2.c (pupa_ext2_label): New function.
17311 (pupa_ext2_fs): Added label.
17312 * fs/fat.c (pupa_fat_label): New function.
17313 (pupa_fat_fs): Added label.
17314 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17316 * kern/misc.c (pupa_strndup): New function.
17317 * include/pupa/misc.h (pupa_strndup): New prototype.
17319 * include/pupa/normal.h: Include <pupa/err.h>.
17320 (pupa_set_history): New prototype.
17321 (pupa_iterate_commands): New prototype.
17322 * normal/cmdline.c: Include <pupa/machine/partition.h>,
17323 <pupa/disk.h>, <pupa/file.h>.
17324 (hist_size): New variable.
17325 (hist_lines): Likewise.
17326 (hist_end): Likewise.
17327 (hist_used): Likewise.
17328 (pupa_set_history): New function.
17329 (pupa_history_get): Likewise.
17330 (pupa_history_add): Likewise.
17331 (pupa_history_replace): Likewise.
17332 (pupa_tab_complete): Likewise.
17333 (pupa_cmdline_run): Added tab completion and history buffer. Tab
17334 completion shows partitionnames while completing partitions, this
17335 feature was suggested by Jeff Bailey.
17336 * normal/command.c (pupa_iterate_commands): New function.
17337 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17338 (pupa_normal_init): Initialize history buffer.
17339 (PUPA_MOD_INIT): Likewise.
17340 (pupa_normal_fini): Free the history buffer.
17341 (PUPA_MOD_FINI): Likewise.
17343 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17346 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17347 * configure.ac [i386]: Check for regparam bug.
17348 (NESTED_FUNC_ATTR) [! i386]: Defined.
17350 2003-11-17 Marco Gerards <metgerards@student.han.nl>
17352 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17353 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17354 (pupa_emu_SOURCES): New variable.
17355 (pupa_emu_LDFLAGS): Likewise.
17356 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17357 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17358 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17359 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17360 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17361 (pupa_jmp_buf): New typedef.
17362 (pupa_setjmp) [PUPA_UTIL]: New macro.
17363 (pupa_longjmp) [PUPA_UTIL]: Likewise.
17364 * include/pupa/term.h (struct pupa_term): New member `refresh'.
17365 (pupa_refresh): New prototype.
17366 * include/pupa/util/getroot.h: New file.
17367 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17369 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17370 (pupa_rescue_cmd_cat): Likewise.
17371 (pupa_rescue_cmd_ls): Likewise.
17372 (pupa_rescue_cmd_testload): Likewise.
17373 (pupa_rescue_cmd_lsmod): Likewise.
17374 * normal/cmdline.c (pupa_cmdline_get): Likewise.
17375 * normal/menu.c (run_menu): Likewise.
17376 * kern/term.c (pupa_cls): Likewise.
17377 (pupa_refresh): New function.
17378 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17379 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17380 * util/console.c: New file.
17382 * util/i386/pc/getroot.c: New file.
17383 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17384 (pupa_putchar): New function.
17385 (pupa_refresh): Likewise.
17386 (xgetcwd): Function moved to ...
17387 (strip_extra_slashes): Likewise.
17388 (get_prefix): Likewise.
17389 * util/i386/pc/getroot.c: ... here.
17390 (find_root_device): Function moved and renamed to...
17391 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17392 Changed all callers.
17393 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17395 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17396 Changed all callers.
17397 * util/misc.c (pupa_memalign): New function.
17398 (pupa_mm_init_region): Likewise.
17399 (pupa_register_exported_symbols): Likewise.
17400 (pupa_putchar): Function removed.
17401 * util/pupa-emu.c: New file.
17403 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
17405 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17406 (_multiboot_mod_SOURCES): New variable.
17407 (_multiboot_mod_CFLAGS): Likewise.
17408 * loader/i386/pc/multiboot.c: New file.
17409 * include/pupa/i386/pc/multiboot.h: Likewise.
17410 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17411 (pupa_multiboot_real_boot): New function.
17412 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17413 (pupa_multiboot_real_boot): New prototype.
17414 (pupa_rescue_cmd_multiboot): Likewise
17415 (pupa_rescue_cmd_module): Likewise.
17417 * kern/loader.c (pupa_loader_set): Continue when
17418 pupa_loader_unload_func() fails.
17419 (pupa_loader_unset): New function.
17420 * include/pupa/loader.h (pupa_loader_unset): New prototype.
17422 * kern/misc.c (pupa_stpcpy): New function.
17423 * include/pupa/misc.h (pupa_stpcpy): New prototype.
17425 2003-11-12 Marco Gerards <metgerards@student.han.nl>
17427 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17428 for available extensions.
17430 * include/pupa/i386/pc/time.h: New file.
17431 * kern/disk.c: Include <pupa/machine/time.h>.
17432 (PUPA_CACHE_TIMEOUT): New macro.
17433 (pupa_last_time): New variable.
17434 (pupa_disk_open): Flush the cache when there was a timeout.
17435 (pupa_disk_close): Reset the timer.
17436 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17438 * util/misc.c: Include <sys/times.h>
17439 (pupa_get_rtc): New function.
17441 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
17443 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17445 (pupa_ext2_get_file_block): Use blocks member.
17447 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17448 first block. Return -1 instead of pupa_errno on error.
17450 2003-10-27 Marco Gerards <metgerards@student.han.nl>
17452 * README: In the pupa-mkimage example use _chain instead of chain
17453 and ext2 instead of fat.
17454 * TODO: Replace ext2fs with jfs as an example. Add an item for
17455 adding journal playback for ext2fs.
17456 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17457 (pkgdata_MODULES): Added ext2.mod.
17458 (ext2_mod_SOURCES): New variable.
17459 (ext2_mod_CFLAGS): Likewise.
17460 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17461 * include/pupa/misc.h (pupa_strncpy): New prototype.
17462 (pupa_strcat): Likewise.
17463 (pupa_strncmp): Likewise.
17464 * kern/misc.c (pupa_strcat): Enable function.
17465 (pupa_strncpy): New function.
17466 (pupa_strncmp): Likewise.
17467 * fs/ext2.c: New file.
17469 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17470 when the read failed before retrying.
17471 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17472 (_FILE_OFFSET_BITS): Likewise.
17473 * configure.ac: Added AC_SYS_LARGEFILE.
17475 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17477 * genmk.rb (PModule#rule): Make sure to get only symbol names
17478 from the output of nm.
17479 Reported by Robert Millan <zeratul2@wanadoo.es>.
17481 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
17483 I forgot to check in these changes for a long time. This adds
17484 incomplete support for VGA console, and this is still very
17485 buggy. Also, a lot of consideration is required for I18N,
17486 UNICODE, and VGA font issues. Therefore, assume that this is
17487 such that "better than nothing".
17489 * font/manager.c: New file.
17490 * include/pupa/font.h: Likewise.
17491 * include/pupa/i386/pc/vga.h: Likewise.
17492 * term/i386/pc/vga.c: Likewise.
17493 * util/unifont2pff.rb: Likewise.
17495 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17496 (pkgdata_MODULES): Added vga.mod and font.mod.
17497 (vga_mod_SOURCES): New variables.
17498 (vga_mod_CFLAGS): Likewise.
17499 (font_mod_SOURCES): Likewise.
17500 (font_mod_CFLAGS): Likewise.
17502 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17504 * include/pupa/term.h: Include pupa/err.h.
17505 (struct pupa_term): Added init and fini.
17506 Changed the argument of putchar to pupa_uint32_t.
17508 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17509 (pupa_console_real_putchar): New prototype.
17510 (pupa_console_putchar): Removed.
17511 (pupa_console_checkkey): Exported.
17512 (pupa_console_getkey): Likewise.
17514 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17517 * kern/term.c (pupa_term_set_current): Rewritten.
17518 (pupa_putchar): Likewise.
17519 (pupa_putcode): New function.
17521 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17522 (pupa_console_real_putchar): ... this.
17523 (pupa_vga_set_mode): New function.
17524 (pupa_vga_get_font): Likewise.
17526 * normal/command.c: Include pupa/term.h.
17527 (terminal_command): New function.
17528 (pupa_command_init): Register the command "terminal".
17530 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17531 (DISP_UP): Likewise.
17532 (DISP_RIGHT): Likewise.
17533 (DISP_DOWN): Likewise.
17534 (DISP_HLINE): Likewise.
17535 (DISP_VLINE): Likewise.
17536 (DISP_UL): Likewise.
17537 (DISP_UR): Likewise.
17538 (DISP_LL): Likewise.
17539 (DISP_LR): Likewise.
17541 * term/i386/pc/console.c (pupa_console_putchar): New function.
17543 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
17545 * util/resolve.c (pupa_util_resolve_dependencies): BUG
17546 FIX. Reverse the path_list.
17548 * include/pupa/normal.h: Export pupa_register_command and
17549 pupa_unregister_command.
17551 * hello/hello.c (pupa_cmd_hello): New module.
17552 * conf/i386-pc.rmk: Added hello.mod.
17554 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
17556 * kern/i386/pc/lzo1x.S: New file.
17558 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17559 (compress_kernel): New variable.
17560 (generate_image): Heavily modified to support compressing a
17561 large part of the core image.
17563 * util/misc.c (pupa_util_read_image): Fix a file descriptor
17565 (pupa_util_load_image): New function.
17567 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17568 (pupa_compressed_size): New variable.
17569 (codestart): Enable Gate A20 here.
17570 Decompress the compressed part of the core image.
17571 Rearrange the code to put functions and variables which are
17572 required for initialization in the non-compressed part.
17575 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17578 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17580 * include/pupa/i386/pc/kernel.h
17581 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17582 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17583 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17584 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17585 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17587 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17589 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17590 (Utility#rule): Likewise.
17592 * configure.ac: Check if LZO is available.
17594 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
17596 * include/pupa/normal.h: New file.
17597 * include/pupa/setjmp.h: Likewise.
17598 * include/pupa/i386/setjmp.h: Likewise.
17599 * normal/cmdline.c: Likewise.
17600 * normal/command.c: Likewise.
17601 * normal/main.c: Likewise.
17602 * normal/menu.c: Likewise.
17603 * normal/i386/setjmp.S: Likewise.
17605 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17606 (pupa_rescue_cmd_initrd): Likewise.
17608 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17611 * kern/i386/pc/startup.S (translation_table): New variable.
17612 (translate_keycode): New function.
17613 (pupa_console_getkey): Call translate_keycode.
17615 * kern/rescue.c (attempt_normal_mode): New function.
17616 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17617 it failed, print a message.
17619 * kern/mm.c (pupa_real_malloc): Print more information when a
17620 free magic is broken.
17621 (pupa_free): If the first free header is not free actually, set
17624 * kern/main.c (pupa_load_normal_mode): Just load the module
17626 (pupa_main): Don't print the message
17627 "Entering into rescue mode..." here.
17629 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17631 (pupa_rescue_cmd_initrd): Likewise.
17632 (pupa_rescue_cmd_initrd): Likewise.
17634 * include/pupa/symbol.h (FUNCTION): Specify the type.
17635 (VARIABLE): Likewise.
17637 * include/pupa/err.h (pupa_err_t): Added
17638 PUPA_ERR_UNKNOWN_COMMAND.
17640 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17641 (pupa_dl_get_prefix): Likewise.
17643 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17644 Added _chain.mod and _linux.mod instead of chain.mod and
17646 (chain_mod_SOURCES): Renamed to ...
17647 (_chain_mod_SOURCES): ... this.
17648 (chain_mod_CFLAGS): Renamed to ...
17649 (_chain_mod_CFLAGS): ... this.
17650 (linux_mod_SOURCES): Renamed to ...
17651 (_linux_mod_SOURCES): ... this.
17652 (linux_mod_CFLAGS): Renamed to ...
17653 (_linux_mod_CFLAGS): ... this.
17654 (normal_mod_SOURCES): New variable.
17655 (normal_mod_CFLAGS): Likewise.
17656 (normal_mod_ASFLAGS): Likewise.
17658 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
17660 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17663 * kern/dl.c (pupa_dl_ref): Refer depending modules
17665 (pupa_dl_unref): Unrefer depending modules recursively.
17666 Don't call pupa_dl_unload implicitly, because PUPA can crash if
17667 a module is unloaded before one depending on that module is
17669 (pupa_dl_unload): Unload depending modules explicitly,
17672 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
17674 * include/pupa/i386/pc/linux.h: New file.
17675 * loader/i386/pc/linux.c: Likewise.
17677 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17679 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17680 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17681 of PUPA_CHAINLOADER_BOOT_SECTOR.
17683 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17684 (pupa_linux_prot_size): New variable.
17685 (pupa_linux_tmp_addr): Likewise.
17686 (pupa_linux_real_addr): Likewise.
17687 (pupa_linux_boot_zimage): New function.
17688 (pupa_linux_boot_bzimage): Likewise.
17690 * kern/i386/pc/init.c (struct mem_region): New structure.
17691 (MAX_REGIONS): New macro.
17692 (mem_regions): New variable.
17693 (num_regions): Likewise.
17694 (pupa_os_area_addr): Likewise.
17695 (pupa_os_area_size): Likewise.
17696 (pupa_lower_mem): Likewise.
17697 (pupa_upper_mem): Likewise.
17698 (add_mem_region): New function.
17699 (compact_mem_regions): Likewise.
17700 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17701 the size of the conventional memory and that of so-called upper
17702 memory (before the first memory hole).
17703 Instead of adding each found region to free memory, use
17704 add_mem_region and add them after removing overlaps.
17705 Also, add only 1/4 of the upper memory to free memory. The rest
17706 is used for loading OS images. Maybe this is ad hoc, but this
17707 makes it much easier to relocate OS images when booting.
17709 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17710 (pupa_enter_rescue_mode): Don't register initrd and module.
17712 * kern/mm.c: Include pupa/dl.h.
17714 * kern/main.c: Include pupa/file.h and pupa/device.h.
17716 * kern/loader.c (pupa_loader_load_module_func): Removed.
17717 (pupa_loader_load_module): Likewise.
17719 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17722 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17723 (pupa_linux_tmp_addr): Likewise.
17724 (pupa_linux_real_addr): Likewise.
17725 (pupa_linux_boot_zimage): Likewise.
17726 (pupa_linux_boot_bzimage): Likewise.
17728 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17729 (pupa_upper_mem): Likewise.
17730 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17731 module is too dangerous.
17733 * include/pupa/loader.h (pupa_os_area_addr): Declared.
17734 (pupa_os_area_size): Likewise.
17735 (pupa_loader_set): Remove the first argument. Loader doesn't
17736 manage modules or initrd any longer.
17737 (pupa_loader_load_module): Removed.
17739 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17740 (linux_mod_SOURCES): New variable.
17741 (linux_mod_CFLAGS): Likewise.
17743 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
17745 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17746 the length of a blocklist correctly.
17748 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17749 Use ioctl only if the OS file is a block device.
17750 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17751 not very useful for normal files.
17753 * kern/main.c (pupa_set_root_dev): New function.
17754 (pupa_load_normal_mode): Likewise.
17755 (pupa_main): Call those above.
17757 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17760 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17762 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
17764 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17765 (setup): Configure the installed partition information and the
17768 * loader/i386/pc/chainloader.c (my_mod): New variable.
17769 (pupa_chainloader_unload): New function.
17770 (pupa_rescue_cmd_chainloader): Refer itself.
17771 (PUPA_MOD_INIT): Save its own module in MY_MOD.
17773 * kern/i386/pc/startup.S (install_partition): Removed.
17774 (version_string): Likewise.
17775 (config_file): Likewise.
17776 (pupa_install_dos_part): New variable.
17777 (pupa_install_bsd_part): Likewise.
17778 (pupa_prefix): Likewise.
17779 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17781 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17783 (make_install_device): New function.
17784 (pupa_machine_init): Set the dl prefix.
17786 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17787 (buf): Renamed to ...
17788 (linebuf): ... this.
17789 (pupa_rescue_cmd_prefix): New function.
17790 (pupa_rescue_cmd_insmod): Likewise.
17791 (pupa_rescue_cmd_rmmod): Likewise.
17792 (pupa_rescue_cmd_lsmod): Likewise.
17793 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17796 * kern/mm.c (pupa_memalign): If failed even after invalidating
17797 disk caches, unload unneeded modules and retry.
17799 * kern/misc.c (pupa_memmove): New function.
17800 (pupa_memcpy): Removed.
17801 (pupa_strcpy): New function.
17802 (pupa_itoa): Made static.
17804 * kern/dl.c (pupa_dl_iterate): New function.
17805 (pupa_dl_ref): Likewise.
17806 (pupa_dl_unref): Likewise.
17807 (pupa_dl_unload): Return if succeeded or not.
17808 (pupa_dl_unload_unneeded): New function.
17809 (pupa_dl_unload_all): Likewise.
17810 (pupa_dl_init): Renamed to ...
17811 (pupa_dl_set_prefix): ... this.
17812 (pupa_dl_get_prefix): New function.
17814 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17815 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17816 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17817 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17818 (pupa_install_dos_part): Declared.
17819 (pupa_install_bsd_part): Likewise.
17820 (pupa_prefix): Likewise.
17821 (pupa_boot_drive): Likewise.
17823 * include/pupa/types.h: Fix a typo.
17825 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17827 (pupa_memmove): Declared.
17828 (pupa_strcpy): Likewise.
17830 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17831 pupa_mod_init takes one argument, its own module.
17832 (pupa_dl_unload_unneeded): Declared.
17833 (pupa_dl_unload_all): Likewise.
17834 (pupa_dl_ref): Likewise.
17835 (pupa_dl_unref): Likewise.
17836 (pupa_dl_iterate): Likewise.
17837 (pupa_dl_init): Renamed to ...
17838 (pupa_dl_set_prefix): ... this.
17839 (pupa_dl_get_prefix): Declared.
17841 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17842 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17844 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17845 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17847 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17848 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17850 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17852 * util/i386/pc/pupa-setup.c (setup): Define the internal
17853 function find_first_partition_start at the top level, because GCC
17854 3.0.x cannot compile internal functions in deeper scopes
17856 (find_root_device): Use lstat instead of stat.
17857 Don't follow symbolic links.
17858 Fix the path-constructing code.
17860 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17861 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17862 by a BLKGETSIZE ioctl first, because block devices don't fill
17863 the member st_mode of the structure stat on Linux.
17864 [__linux__] (linux_find_partition): Use a temporary buffer
17865 REAL_DEV for the working space. Copy it to DEV before returning.
17866 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17867 buffer cache consistent.
17868 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17869 strncmp. The previous value was merely wrong.
17870 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17872 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17873 FAT size is 12. The previous value was merely wrong.
17875 * kern/main.c (pupa_main): Don't split the starting message from
17878 * kern/term.c (pupa_putchar): Put CR after LF instead of before
17879 LF, because BIOS goes crazy about character attributes in this
17882 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
17884 * include/i386/pc/util/biosdisk.h: New file.
17885 * util/i386/pc/biosdisk.c: Likewise.
17886 * util/i386/pc/pupa-setup.c: Likewise.
17888 * Makefile.in (INCLUDE_DISTFILES): Added
17889 include/pupa/i386/pc/util/biosdisk.h.
17890 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17891 directory util/i386/pc.
17892 (install-local): Added a rule for sbin_UTILITIES.
17893 (uninstall): Likewise.
17895 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17897 * util/misc.c (xrealloc): New function.
17898 (pupa_malloc): Likewise.
17899 (pupa_free): Likewise.
17900 (pupa_realloc): Likewise.
17901 (pupa_stop): Likewise.
17902 (pupa_putchar): Likewise.
17904 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17906 * include/pupa/util/misc.h (xrealloc): Declared.
17908 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17910 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17911 (PUPA_BOOT_MACHINE_BPB_END): ... this.
17913 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17914 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17916 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17917 way should be implemented.
17918 [PUPA_UTIL] (pupa_fat_fini): Likewise.
17920 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17921 the size of NAME for safety.
17922 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17925 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17926 (pupa_setup_SOURCES): Likewise.
17928 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17930 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17932 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17933 bunch of pushl's from pusha, because this destroys the return
17936 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
17938 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17939 This means that any missing prototypes could be fatal. Also, you
17940 must take care when writing assembly code. See the comments at
17941 the beginning of startup.S, for more details.
17943 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17944 compilation mechanism.
17945 (pupa_chainloader_real_boot): Likewise.
17946 (pupa_biosdisk_rw_int13_extensions): Likewise.
17947 (pupa_biosdisk_rw_standard): Likewise.
17948 (pupa_biosdisk_check_int13_extensions): Likewise.
17949 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17950 (pupa_biosdisk_get_diskinfo_standard): Likewise.
17951 (pupa_get_memsize): Likewise.
17952 (pupa_get_mmap_entry): Likewise.
17953 (pupa_console_putchar): Likewise.
17954 (pupa_console_setcursor): Likewise.
17955 (pupa_getrtsecs): Use pushl instead of push.
17957 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17958 memory instead of the stack for a mmap entry, because some
17959 BIOSes may ignore the maximum size and overflow.
17961 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17963 * genmk.rb (PModule#rule): Compile automatically generated
17964 sources with module-specific CFLAGS as well as other sources.
17966 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17968 * configure.ac: Check ld.
17969 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17970 respectively, before checking endianness and sizes.
17972 * Makefile.in (LD): New variable.
17974 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17976 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17978 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
17980 * Changelog: New file.